/*
 * styles.css — все стили приложения.
 * Стиль — нативный iOS / Telegram: плоские сгруппированные карточки на сером фоне,
 * без теней, иконки в цветных скруглённых квадратах, системные размеры шрифтов.
 *
 * Цвета берутся из темы Telegram (--tg-theme-*), их SDK выставляет сам.
 * Вне Telegram работают запасные цвета (--fb-*) — светлые или тёмные по теме системы.
 * Акцент по умолчанию — #2AABEE.
 */

/* ---------- Запасные цвета (вне Telegram), значения как у системных iOS ---------- */
:root {
  --fb-bg: #f2f2f7;
  --fb-card: #ffffff;
  --fb-text: #000000;
  --fb-hint: #8e8e93;
  --fb-sep: rgba(60, 60, 67, 0.18);
  --fb-accent: #2AABEE;
  --fb-accent-text: #ffffff;
  --fb-header: #6d6d72;
  --fb-danger: #ff3b30;
  --fb-fill: rgba(118, 118, 128, 0.12);
  --fb-skeleton: rgba(120, 120, 128, 0.14);
}
@media (prefers-color-scheme: dark) {
  :root {
    --fb-bg: #000000;
    --fb-card: #1c1c1e;
    --fb-text: #ffffff;
    --fb-hint: #8e8e93;
    --fb-sep: rgba(84, 84, 88, 0.6);
    --fb-header: #8d8d93;
    --fb-danger: #ff453a;
    --fb-fill: rgba(118, 118, 128, 0.24);
    --fb-skeleton: rgba(255, 255, 255, 0.08);
  }
}

/* ---------- Рабочие токены: сначала тема Telegram, потом запасные ---------- */
:root {
  --bg: var(--tg-theme-secondary-bg-color, var(--fb-bg));
  --card: var(--tg-theme-section-bg-color, var(--tg-theme-bg-color, var(--fb-card)));
  --text: var(--tg-theme-text-color, var(--fb-text));
  --hint: var(--tg-theme-hint-color, var(--fb-hint));
  --sep: var(--tg-theme-section-separator-color, var(--fb-sep));
  --accent: var(--tg-theme-button-color, var(--fb-accent));
  --accent-text: var(--tg-theme-button-text-color, var(--fb-accent-text));
  --link: var(--tg-theme-link-color, var(--accent));
  --header: var(--tg-theme-section-header-text-color, var(--fb-header));
  --danger: var(--tg-theme-destructive-text-color, var(--fb-danger));
  --fill: var(--fb-fill);           /* серая подложка полей и чипов, как в iOS */
  --skeleton: var(--fb-skeleton);

  /* Мягкая подложка акцента (выбранные плитки, кнопки-«капсулы») */
  --accent-soft: rgba(42, 171, 238, 0.12);
  --accent-soft: color-mix(in srgb, var(--accent) 12%, transparent);
  --press: rgba(0, 0, 0, 0.06);     /* подсветка нажатой строки */

  /* Системные цвета иконок (как в «Настройках») */
  --c-blue: #2AABEE;
  --c-green: #34c759;
  --c-orange: #ff9500;
  --c-red: #ff3b30;
  --c-gray: #8e8e93;
  --c-purple: #af52de;
  --c-ok: #34c759;

  --radius: 14px;      /* карточки — как сгруппированные списки iOS/Telegram */
  --radius-sm: 10px;
  --gap: 10px;
  --side: 16px;
  --dur: 280ms;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);  /* «пружинистая» кривая переходов iOS */

  /* Отступы безопасной зоны (Telegram выставляет их в полноэкранном режиме) */
  --safe-top: calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px));
  --safe-bottom: max(var(--tg-safe-area-inset-bottom, 0px), env(safe-area-inset-bottom, 0px));
  --dock-h: 0px; /* высота запасной панели кнопок (только вне Telegram) */
}
/* Тёмная тема Telegram */
html.dark { --press: rgba(255, 255, 255, 0.08); --fill: rgba(118, 118, 128, 0.24); --skeleton: rgba(255, 255, 255, 0.08); }

/* ---------- База ---------- */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0; height: 100%; overflow: hidden;
  background: var(--bg); color: var(--text);
  font: 17px/1.3 -apple-system, BlinkMacSystemFont, "SF Pro Text", Roboto, "Helvetica Neue", system-ui, sans-serif;
  letter-spacing: -0.2px;
  -webkit-font-smoothing: antialiased; -webkit-text-size-adjust: 100%;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
button { font: inherit; color: inherit; letter-spacing: inherit; border: 0; background: none; padding: 0; cursor: pointer; touch-action: manipulation; }
input { font: inherit; color: inherit; }
img { display: block; max-width: 100%; -webkit-user-drag: none; }
svg { display: block; flex: none; }
::-webkit-scrollbar { display: none; }

/* ---------- Стек экранов и переходы (как push в UINavigationController) ---------- */
#stack { position: fixed; inset: 0; overflow: hidden; background: var(--bg); }
.screen {
  position: absolute; inset: 0;
  overflow-y: auto; overflow-x: hidden;
  -webkit-overflow-scrolling: touch; overscroll-behavior-y: contain; scrollbar-width: none;
  background: var(--bg);
  padding: calc(var(--safe-top) + 12px) var(--side) calc(var(--safe-bottom) + var(--dock-h) + 28px);
  transition: transform var(--dur) var(--ease), opacity var(--dur) var(--ease);
  will-change: transform;
}
.screen > .wrap { max-width: 480px; margin: 0 auto; }
/* Новый экран въезжает справа, старый уходит влево на треть и чуть темнеет */
.screen.from-right { transform: translate3d(100%, 0, 0); }
.screen.to-left    { transform: translate3d(-30%, 0, 0); opacity: 0.7; }
.screen.from-left  { transform: translate3d(-30%, 0, 0); opacity: 0.7; }
.screen.to-right   { transform: translate3d(100%, 0, 0); }
.screen.fade-in    { opacity: 0; }
.screen.front      { z-index: 2; box-shadow: -1px 0 0 var(--sep), -10px 0 30px rgba(0, 0, 0, 0.1); }
@media (prefers-reduced-motion: reduce) { .screen { transition-duration: 1ms; } }

/* ---------- Типографика (размеры iOS) ---------- */
.title { font-size: 32px; font-weight: 700; letter-spacing: 0.2px; line-height: 1.15; margin: 6px 4px 14px; }
.section-title {
  font-size: 14px; font-weight: 400; text-transform: uppercase; letter-spacing: 0;
  color: var(--header); margin: 22px 16px 7px;
}
.hint { color: var(--hint); font-size: 15px; }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.head-row .title { margin-bottom: 10px; }

/* ---------- Сгруппированные карточки и строки списка ---------- */
.card { background: var(--card); border-radius: var(--radius); overflow: hidden; }
.card + .card { margin-top: 20px; }
.row {
  display: flex; align-items: center; gap: 14px; width: 100%;
  min-height: 52px; padding: 8px 16px; text-align: left; position: relative;
  transition: background-color 160ms ease;
}
/* Разделитель как в iOS: начинается после иконки */
.row + .row::before {
  content: ""; position: absolute; top: 0; left: 60px; right: 0;
  height: 1px; transform: scaleY(0.5); transform-origin: top; background: var(--sep);
}
.row .ico { width: 30px; flex: none; font-size: 20px; text-align: center; }
.row .main { flex: 1; min-width: 0; font-size: 17px; }
.row .main .sub { color: var(--hint); font-size: 15px; margin-top: 1px; }
.row .side { flex: none; color: var(--hint); font-size: 17px; display: flex; align-items: center; gap: 4px; }
.chev { color: var(--hint); opacity: 0.55; display: flex; margin-right: -4px; }
.chev svg { width: 16px; height: 16px; stroke-width: 2.6; }

/* Иконка в цветном квадрате (как в «Настройках») */
.icon-tile {
  width: 30px; height: 30px; border-radius: 8px; flex: none;
  display: grid; place-items: center; color: #fff;
}
.icon-tile svg { width: 18px; height: 18px; }
.c-blue   { background: var(--c-blue); }
.c-green  { background: var(--c-green); }
.c-orange { background: var(--c-orange); }
.c-red    { background: var(--c-red); }
.c-gray   { background: var(--c-gray); }
.c-purple { background: var(--c-purple); }

/* ---------- Отклик на касание ---------- */
.tap { transition: transform 140ms ease, background-color 140ms ease, opacity 140ms ease; }
/* Плитки чуть «вдавливаются» */
.tap:active, .tap.pressed { transform: scale(0.96); }
/* Строки и текстовые кнопки — подсветка/прозрачность, как в нативных списках */
.row.tap:active, .row.tap.pressed { transform: none; background-color: var(--press); }
.text-btn.tap:active, .icon-btn.tap:active, .copy-btn.tap:active, .info-btn.tap:active { transform: none; opacity: 0.45; }

/* ---------- Строка контактов (шапка экранов 1–3): ячейка списка ---------- */
.contact-strip {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border-radius: var(--radius);
  padding: 6px 8px 6px 14px; min-height: 60px; margin-bottom: 8px;
}
.contact-strip .info {
  flex: 1; min-width: 0; min-height: 48px; display: flex; align-items: center; gap: 12px; text-align: left;
}
.contact-strip .info.tap:active { transform: none; opacity: 0.55; }
.contact-strip .txt { min-width: 0; }
.contact-strip .place { font-size: 17px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.contact-strip .status { font-size: 15px; color: var(--hint); }
.icon-btn {
  flex: none; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; font-size: 19px;
  background: var(--accent-soft); color: var(--accent);
}
.icon-btn svg { width: 21px; height: 21px; }

/* Статус «открыто/закрыто»: цветная точка вместо эмодзи */
.status-dot { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.status-dot::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--hint); flex: none;
}
.status-dot.on::before { background: var(--c-ok); box-shadow: 0 0 0 3px rgba(52, 199, 89, 0.18); }

/* ---------- «Моё устройство» ---------- */
.my-device { display: flex; align-items: center; gap: 14px; padding: 10px 14px; width: 100%; text-align: left; margin-top: 12px; }
.my-device .art { width: 44px; height: 56px; flex: none; }
.my-device .lbl { font-size: 14px; color: var(--hint); }
.my-device .name { font-size: 17px; font-weight: 600; }
/* Кнопка-капсула как «Загрузить» в App Store */
.my-device .go {
  margin-left: auto; height: 32px; padding: 0 18px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-size: 15px; font-weight: 700;
  display: flex; align-items: center; letter-spacing: 0;
}

/* ---------- Плитки устройств (экран 1) ---------- */
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.tile {
  background: var(--card); border-radius: var(--radius);
  min-height: 136px; padding: 16px 12px 14px;
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 10px;
}
.tile .art { height: 78px; width: 100%; display: flex; justify-content: center; }
.tile .art svg { height: 100%; width: auto; }
.tile .name { font-size: 17px; font-weight: 600; }
.tile.wide { grid-column: span 2; flex-direction: row; justify-content: flex-start; min-height: 96px; padding: 12px 20px; gap: 18px; }
.tile.wide .art { width: 64px; height: 72px; }
/* Фото моделей: вписываем целиком, без искажений */
.art img { width: 100%; height: 100%; object-fit: contain; }

/* ---------- Бейджи доверия — подпись под группой, как footer в iOS ---------- */
.trust {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 4px 8px;
  margin-top: 14px; min-height: 44px; padding: 6px 12px; border-radius: var(--radius-sm);
  color: var(--hint); font-size: 14px; width: 100%;
}
.trust.tap:active { transform: none; opacity: 0.55; }
.trust b { color: var(--text); font-weight: 600; }
.trust .star { color: var(--c-orange); }

/* ---------- Поиск (как UISearchBar) ---------- */
.search {
  display: flex; align-items: center; gap: 6px; height: 44px; padding: 0 10px;
  background: var(--fill); border-radius: var(--radius-sm); margin-bottom: 16px; color: var(--hint);
}
.search svg { width: 18px; height: 18px; }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 17px; height: 100%; color: var(--text); user-select: text; -webkit-user-select: text; -webkit-appearance: none; appearance: none; }
.search input::-webkit-search-cancel-button { display: none; }
.search input::placeholder { color: var(--hint); }
.search .clear { width: 36px; height: 36px; display: none; place-items: center; color: var(--hint); margin-right: -6px; }
.search .clear svg { width: 18px; height: 18px; }
.search.has-text .clear { display: grid; }

/* ---------- Сетка моделей (экран 2) и поломок (экран 3) ---------- */
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.model {
  background: var(--card); border-radius: var(--radius);
  min-height: 134px; padding: 14px 6px 12px;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 8px; text-align: center;
}
.model .art { height: 74px; width: 100%; display: flex; justify-content: center; }
.model .art svg { height: 100%; width: auto; }
.model .name { font-size: 14px; font-weight: 600; line-height: 1.2; word-break: break-word; letter-spacing: -0.1px; }

.issue {
  position: relative; background: var(--card); border-radius: var(--radius);
  min-height: 104px; padding: 14px 4px 12px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  box-shadow: inset 0 0 0 2px transparent;
  transition: transform 140ms ease, box-shadow 160ms ease, background-color 160ms ease;
}
/* Эмодзи поломки — в мягком скруглённом квадрате */
.issue .emo {
  width: 48px; height: 48px; border-radius: 12px; background: var(--fill);
  display: grid; place-items: center; font-size: 26px; line-height: 1;
  transition: background-color 160ms ease;
}
.issue .name { font-size: 14px; font-weight: 500; }
/* Кружок выбора как в iOS */
.issue .check {
  position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 50%;
  box-shadow: inset 0 0 0 1.5px var(--sep); display: grid; place-items: center; color: transparent;
  transition: background-color 160ms ease, box-shadow 160ms ease, color 160ms ease;
}
.issue .check svg { width: 14px; height: 14px; stroke-width: 3; }
.issue.on { box-shadow: inset 0 0 0 2px var(--accent); }
.issue.on .emo { background: var(--accent-soft); }
.issue.on .check { background: var(--accent); box-shadow: none; color: var(--accent-text); }

/* ---------- Строка модели в шапке экранов 3–4 ---------- */
.model-head { display: flex; align-items: center; gap: 12px; margin: 6px 4px 16px; }
.model-head .art { width: 40px; height: 54px; flex: none; display: flex; justify-content: center; }
.model-head .art svg { height: 100%; width: auto; }
.model-head .name { font-size: 26px; font-weight: 700; letter-spacing: 0.1px; line-height: 1.15; flex: 1; min-width: 0; }
/* Текстовая кнопка, как в навбаре iOS («Изменить») */
.text-btn {
  flex: none; min-height: 44px; min-width: 44px; padding: 0 4px;
  color: var(--accent); font-size: 17px; font-weight: 400;
  display: inline-flex; align-items: center; justify-content: center;
}
/* Кнопка-капсула (как «Загрузить» в App Store) */
.pill-btn {
  flex: none; min-height: 44px; padding: 0 16px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); font-size: 15px; font-weight: 700; letter-spacing: 0;
  display: inline-flex; align-items: center; gap: 6px;
}
.pill-btn svg { width: 17px; height: 17px; }
.pill-btn.solid { background: var(--accent); color: var(--accent-text); }

/* ---------- Экран цены ---------- */
.job { padding: 14px 16px 14px; position: relative; }
.job + .job::before {
  content: ""; position: absolute; top: 0; left: 16px; right: 0;
  height: 1px; transform: scaleY(0.5); transform-origin: top; background: var(--sep);
}
.job .top { display: flex; align-items: center; gap: 12px; min-height: 36px; }
.job .top .emo {
  width: 30px; height: 30px; border-radius: 8px; background: var(--fill);
  display: grid; place-items: center; font-size: 17px; flex: none;
}
.job .top .lbl { flex: 1; font-size: 17px; font-weight: 600; min-width: 0; }
.job .top .price { font-size: 17px; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.job .top .pill-btn { margin: -4px -4px -4px 0; padding: 0 14px; }
.chips { display: flex; gap: 6px; margin-top: 10px; padding-left: 42px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 10px;
  border-radius: 8px; background: var(--fill); font-size: 14px; color: var(--text);
}
/* Сегментированный переключатель как UISegmentedControl */
.seg {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 0; margin: 12px 0 0;
  padding: 2px; border-radius: 9px; background: var(--fill); position: relative;
}
.seg button {
  min-height: 48px; padding: 4px; border-radius: 7px; font-size: 14px; line-height: 1.15;
  white-space: pre-line; color: var(--text); font-weight: 500; letter-spacing: -0.1px; position: relative;
  transition: background-color 200ms ease, box-shadow 200ms ease;
}
.seg button + button::before {
  content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 1px; background: var(--sep); transition: opacity 200ms ease;
}
.seg button.on::before, .seg button.on + button::before { opacity: 0; }
.seg button.on { background: var(--card); font-weight: 600; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.12), 0 3px 1px rgba(0, 0, 0, 0.04); }
html.dark .seg button.on { background: #636366; color: #fff; }
.total { padding: 16px; }
.total .sum { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.total .sum .lbl { font-size: 17px; font-weight: 600; }
.total .sum .val { font-size: 28px; font-weight: 700; letter-spacing: 0.2px; color: var(--text); white-space: nowrap; font-variant-numeric: tabular-nums; }
.total .note { margin-top: 4px; color: var(--hint); font-size: 14px; }
.total .free { margin-top: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.info-row { display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 2px 0 2px 16px; font-size: 14px; color: var(--hint); }
.info-row .txt { flex: 1; }
.info-btn { width: 44px; height: 44px; display: grid; place-items: center; color: var(--accent); flex: none; }
.info-btn svg { width: 22px; height: 22px; }

/* ---------- Контакты ---------- */
.photo { border-radius: var(--radius); overflow: hidden; aspect-ratio: 4 / 3; background: var(--skeleton); margin-bottom: 20px; }
.photo img { width: 100%; height: 100%; object-fit: cover; object-position: center 62%; }
.copy-btn { width: 44px; height: 44px; display: grid; place-items: center; color: var(--accent); flex: none; margin-right: -10px; }
.copy-btn svg { width: 20px; height: 20px; }

/* ---------- Пусто / ошибка ---------- */
.empty { text-align: center; color: var(--hint); padding: 48px 16px; font-size: 17px; }
.empty .big { display: flex; justify-content: center; margin-bottom: 10px; opacity: 0.6; }
.empty .big svg { width: 44px; height: 44px; stroke-width: 1.6; }
.error-box { text-align: center; padding: 80px 24px; }
.error-box .big { font-size: 52px; }
.error-box .msg { font-size: 20px; font-weight: 600; margin: 12px 0 20px; }

/* ---------- Скелетоны ---------- */
.sk { background: var(--skeleton); border-radius: var(--radius); position: relative; overflow: hidden; }
.sk::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transform: translateX(-100%); animation: sk 1.2s infinite;
}
html.dark .sk::after { background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.06), transparent); }
@keyframes sk { to { transform: translateX(100%); } }

/* ---------- Шторка (как sheet в iOS) ---------- */
.sheet-back {
  position: fixed; inset: 0; z-index: 50; background: rgba(0, 0, 0, 0.35);
  opacity: 0; transition: opacity var(--dur) ease;
}
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 51;
  max-width: 480px; margin: 0 auto;
  background: var(--bg); border-radius: 14px 14px 0 0;
  padding: 8px var(--side) calc(var(--safe-bottom) + 16px);
  transform: translateY(100%); transition: transform 380ms var(--ease);
  box-shadow: 0 -8px 40px rgba(0, 0, 0, 0.15);
}
.sheet.open { transform: none; }
.sheet-back.open { opacity: 1; }
.sheet .grab { width: 36px; height: 5px; border-radius: 3px; background: var(--hint); opacity: 0.4; margin: 0 auto 16px; }
.sheet .path { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px; font-size: 17px; font-weight: 600; margin-bottom: 16px; }
.sheet .path .arr { color: var(--hint); }
.big-btn {
  width: 100%; min-height: 50px; border-radius: 12px; margin-top: 16px;
  background: var(--accent); color: var(--accent-text); font-size: 17px; font-weight: 600;
}
.big-btn.tap:active { transform: none; opacity: 0.75; }
/* Нарисованный экран «Об этом устройстве» */
.mock { padding: 0; }
.mock .bar { font-size: 14px; color: var(--header); text-transform: uppercase; margin: 0 16px 7px; }
.mock .list { background: var(--card); border-radius: var(--radius-sm); overflow: hidden; }
.mock .item { display: flex; justify-content: space-between; gap: 12px; padding: 13px 16px; font-size: 17px; position: relative; }
.mock .item + .item::before { content: ""; position: absolute; top: 0; left: 16px; right: 0; height: 1px; transform: scaleY(0.5); background: var(--sep); }
.mock .item .v { color: var(--hint); }
.mock .item.hl { background: var(--accent-soft); }
.mock .item.hl .v { color: var(--accent); font-weight: 600; }

/* ---------- Тост (как системное уведомление) ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--safe-bottom) + var(--dock-h) + 24px); z-index: 60;
  transform: translate(-50%, 16px) scale(0.96); opacity: 0; pointer-events: none;
  background: rgba(40, 40, 42, 0.92); color: #fff; padding: 12px 20px; border-radius: 999px;
  font-size: 15px; font-weight: 500; transition: all 260ms var(--ease); white-space: nowrap;
  -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0) scale(1); }

/* ---------- Запасная панель кнопок и «Назад» (только вне Telegram, для проверки в браузере) ---------- */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  padding: 10px var(--side) calc(var(--safe-bottom) + 10px);
  background: var(--bg); box-shadow: 0 -0.5px 0 var(--sep);
  display: none; flex-direction: column; gap: 8px;
}
@supports ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .dock { background: color-mix(in srgb, var(--bg) 82%, transparent); -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px); }
}
.dock.show { display: flex; }
.dock button { min-height: 50px; border-radius: 12px; font-size: 17px; font-weight: 600; }
.dock button.tap:active { transform: none; opacity: 0.75; }
.dock .main { background: var(--accent); color: var(--accent-text); }
.dock .main:disabled { opacity: 0.4; }
.dock .second { background: var(--accent-soft); color: var(--accent); }
.dev-back {
  position: fixed; top: calc(var(--safe-top) + 8px); left: 6px; z-index: 45;
  height: 44px; padding: 0 10px 0 4px; border-radius: 10px;
  font-size: 30px; font-weight: 300; line-height: 1; display: none; align-items: center; color: var(--accent);
}
.dev-back.show { display: flex; }
.dev-back.tap:active { transform: none; opacity: 0.45; }
html.dev-back-on .screen { padding-top: calc(var(--safe-top) + 56px); }
