/* ==========================================================================
   eSIM-магазин — ОБЩИЕ стили (дизайн-система)
   Снята с личного кабинета ElevenLabs (elevenlabs.io/app), 27.10.2026.
   Значения — computed styles при ширине окна 1440px.

   Правило против конфликтов:
   - здесь только токены, каркас и компоненты, которые есть на многих страницах;
   - всё, что относится к одной странице, лежит в pages.css внутри
     [data-page="имя"] { … } и на другие страницы не влияет.

   Шрифт заголовков у ElevenLabs — Waldenburg (платный, только у них),
   здесь замена: Onest (бесплатный, с кириллицей).
   ========================================================================== */

:root {
  /* ---------- Фон ---------- */
  --bg: #ffffff;
  --bg-alt: #fcfcfc;
  --sidebar: #fafafa;
  --surface: #ffffff;

  /* ---------- Текст ---------- */
  --fg: #0f0f10;              /* основной (hsl 240 3% 6%) */
  --fg-strong: #171717;       /* активный пункт меню */
  --fg-2: rgba(0,0,0,.53);    /* вторичный */
  --fg-3: rgba(0,0,0,.44);    /* неактивная кнопка */
  --fg-chip: rgba(0,0,0,.643);/* текст чипов */
  --icon: #757575;            /* иконки в плитках */

  /* ---------- Прозрачные серые ---------- */
  --a-50:  rgba(0,0,0,.02);
  --a-75:  rgba(0,0,0,.03);
  --a-100: rgba(0,0,0,.043);
  --a-150: rgba(0,0,0,.075);
  --a-200: rgba(0,0,0,.1);
  --a-300: rgba(0,0,0,.16);

  /* ---------- Акцент / состояния ---------- */
  --primary: #0f0f10;
  --primary-hover: #262628;
  --primary-press: #3a3a3d;
  --primary-fg: #ffffff;
  --disabled: #a3a3a3;
  --disabled-fg: #e3e3e3;
  --blue: #007aff;
  --ok: #16a34a;   --ok-bg: rgba(22,163,74,.1);
  --warn: #d97706; --warn-bg: rgba(217,119,6,.1);
  --err: #dc2626;  --err-bg: rgba(220,38,38,.1);
  --toast: hsl(0 0% 13% / .85);
  --amber: #f5b301;            /* жёлтое предупреждение */
  --amber-bg: #fff8e1;
  --amber-line: rgba(214,153,0,.28);
  --amber-fg: #5a4300;
  --brand: linear-gradient(110deg, #ff9a3d 0%, #f2553c 55%, #c43069 100%);

  /* ---------- Тени ---------- */
  --sh-xs: 0 0 0 1px rgba(0,0,0,.06), 0 1px 1px -.5px rgba(0,0,0,.06), 0 3px 3px -1.5px rgba(0,0,0,.06);
  --sh-sm: 0 0 1.072px 0 rgba(0,0,0,.4), 0 2px 4px 0 rgba(0,0,0,.04);
  --sh-card: 0 2px 1px 0 rgba(0,0,0,.04), 0 0 1px 0 rgba(0,0,0,.4);
  --sh-pop: 0 0 0 1px rgba(0,0,0,.043), 0 4px 6px -2px rgba(16,24,40,.03), 0 12px 16px -4px rgba(16,24,40,.08);

  /* ---------- Скругления ---------- */
  --r-6: 6px; --r-8: 8px; --r-10: 10px; --r-12: 12px; --r-14: 14px;
  --r-16: 16px; --r-24: 24px; --r-26: 26px; --r-full: 9999px;

  /* ---------- Шрифты ---------- */
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Onest", "Inter", system-ui, sans-serif;

  /* ---------- Каркас ---------- */
  --sidebar-w: 256px;
  --sidebar-w-min: 52px;
  --header-h: 50px;
  --gutter: 20px;

  /* ---------- Сдержанный люкс (партнёрка, по мотивам 01.tech) ---------- */
  --stone: #f5f3f1;           /* фон карточек шагов на партнёрке ElevenLabs */
  --stone-fg: #777169;        /* текст на «камне» */

  /* ---------- Переходы между разделами ---------- */
  --leave-ms: 150ms;
  --enter-ms: 220ms;

  /* ---------- Нажатие ---------- */
  --press-scale: .97;
  --press-ease: cubic-bezier(.2, .8, .2, 1);
}

/* ==========================================================================
   База
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;   /* убирает серую подсветку тапа в Safari */
}
body {
  min-height: 100%; margin: 0;
  background: var(--bg); color: var(--fg);
  font: 400 16px/24px var(--font);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 2px; }
[hidden] { display: none !important; }
.tnum { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Иконки — обводка 1.5 */
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.ic-16 { width: 16px; height: 16px; }
.ic-20 { width: 20px; height: 20px; }

/* Флаги — круглые */
.flag { display: inline-flex; width: 20px; height: 20px; border-radius: 50%; overflow: hidden; flex: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
.flag svg { width: 100%; height: 100%; display: block; }

/* ==========================================================================
   ЭФФЕКТ НАЖАТИЯ — для всех кликабельных элементов.
   :active — для мыши; .is-pressed — ставит JS (ui.js) на касание,
   потому что Safari на iPhone :active почти не показывает.
   ========================================================================== */
.btn, .btn-pill, .btn-round, .btn-send, .chip, .seg button, .tab, .nav-item,
.tile, .item, .coll, .header-search, .sb-card, .hdr-logo, .sb-logo, .plan .btn, .dest, .shelf, .sg-item, .dev-strip {
  -webkit-user-select: none; user-select: none;
  -webkit-touch-callout: none;          /* без меню «Открыть ссылку» при долгом тапе */
  touch-action: manipulation;           /* без задержки 300 мс */
  transition: transform .14s var(--press-ease), background-color .1s, box-shadow .12s, color .1s, border-color .1s;
}
:is(.btn, .btn-pill, .btn-round, .btn-send, .chip, .header-search, .hdr-logo, .sb-logo):is(:active, .is-pressed):not(:disabled) { transform: scale(var(--press-scale)); }
:is(.seg button, .tab > span):is(:active, .is-pressed) { transform: scale(.95); }
.tab:is(:active, .is-pressed) > span { transform: scale(.95); }
.tab:is(:active, .is-pressed) { transform: none; }
.tab > span { transition: transform .14s var(--press-ease), border-color .1s; }
.nav-item:is(:active, .is-pressed) { background: var(--a-150); transform: scale(.98); }
.item:is(:active, .is-pressed) { background: var(--a-75); transform: scale(.985); }
.tile .tile-ic { transition: transform .14s var(--press-ease), box-shadow .1s, color .1s; }
.tile:is(:active, .is-pressed) .tile-ic { transform: scale(.9); }
.coll:is(:active, .is-pressed), .sb-card:is(:active, .is-pressed) { transform: scale(.98); }

/* ==========================================================================
   Типографика
   ========================================================================== */
.t-hero    { font: 400 28px/36px var(--font-display); letter-spacing: -.21px; text-wrap: balance; }
.t-h1      { font: 400 24px/30px var(--font-display); letter-spacing: -.15px; }
.t-card    { font: 700 20px/24px var(--font-display); letter-spacing: -.1px; text-wrap: balance; }
.t-section { font: 550 16px/24px var(--font); letter-spacing: -.2px; }
.t-body    { font: 400 16px/24px var(--font); }
.t-ui      { font: 500 14px/20px var(--font); }
.t-ui-400  { font: 400 14px/20px var(--font); }
.t-title   { font: 600 14px/20px var(--font); }
.t-sm      { font: 500 13px/20px var(--font); }
.t-meta    { font: 400 13px/19.5px var(--font); color: var(--fg-2); }
.t-xs      { font: 500 12px/16px var(--font); letter-spacing: .03px; }
.t-2xs     { font: 600 10px/16px var(--font); letter-spacing: .025px; }
.t-price   { font: 600 24px/27px var(--font); letter-spacing: -.24px; }
.muted     { color: var(--fg-2); }

/* ==========================================================================
   Каркас: меню + промо + шапка + #app
   ========================================================================== */
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 40;
  width: var(--sidebar-w); background: var(--sidebar); border-right: 1px solid var(--a-150);
  display: flex; flex-direction: column; padding: 12px;
  transition: width .2s ease;
}
.sb-logo { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 6px; margin-bottom: 6px; font: 700 17px/1 var(--font-display); letter-spacing: -.3px; white-space: nowrap; }
.logo-mark { width: 24px; height: 24px; flex: none; display: block; color: var(--fg); --logo-fg: #fff; }
.sb-logo .logo-mark { margin-left: -3px; }
.hdr-logo { display: none; align-items: center; justify-content: center; width: 28px; height: 32px; flex: none; }
.hdr-logo .logo-mark { width: 26px; height: 26px; }
.sb-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; display: flex; flex-direction: column; gap: 4px; scrollbar-width: none; }
.sb-label { font: 500 14px/20px var(--font); color: var(--fg-2); padding: 12px 6px 4px; white-space: nowrap; }
.nav-item { display: flex; align-items: center; gap: 8px; height: 32px; padding: 0 8px; border-radius: var(--r-10); font: 500 14px/20px var(--font); color: var(--fg-2); white-space: nowrap; flex: none; }
.nav-item .ic, .nav-item .flag { width: 18px; height: 18px; }
.nav-item:hover, .nav-item.is-active { background: var(--a-100); color: var(--fg-strong); }
.nav-item .end { margin-left: auto; color: var(--fg-2); }
.sb-bottom { display: flex; flex-direction: column; gap: 8px; padding-top: 8px; }
.sb-card { text-align: left; background: var(--surface); border-radius: var(--r-14); box-shadow: var(--sh-xs); padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.sb-card .icon-dot { width: 24px; height: 24px; border-radius: 50%; background: var(--a-100); display: grid; place-items: center; }
.sb-card .icon-dot .ic { width: 14px; height: 14px; }
.sb-card .t-ui { margin-top: 6px; }
.sb-card .t-meta { font-size: 12px; line-height: 16px; }

body.sb-collapsed .sidebar { width: var(--sidebar-w-min); padding-inline: 8px; }
body.sb-collapsed .sb-hide { display: none; }
body.sb-collapsed .nav-item { padding: 0 9px; }
body.sb-collapsed .sb-label { height: 1px; padding: 0; margin: 10px 4px; background: var(--a-150); overflow: hidden; color: transparent; }
body.sb-collapsed .main { margin-left: var(--sidebar-w-min); }

.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; transition: margin-left .2s ease; }


.header {
  position: sticky; top: 0; z-index: 30; height: var(--header-h); flex: none;
  display: flex; align-items: center; gap: 12px; padding: 0 12px 0 10px;
  background: rgba(255,255,255,.9); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--a-150);
}
.crumbs { display: flex; align-items: center; gap: 6px; font: 500 14px/20px var(--font); min-width: 0; white-space: nowrap; overflow: hidden; }
.crumbs .sep { color: var(--fg-2); }
.crumbs a { color: var(--fg-2); }
.crumbs a:hover { color: var(--fg); }
.crumbs span:last-child { overflow: hidden; text-overflow: ellipsis; }
.header-search {
  position: absolute; left: 50%; width: 256px; height: 32px; padding: 0 7px 0 8px;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--a-200); border-radius: var(--r-12);
  font: 500 13px/20px var(--font); color: var(--fg-2);
}
/* у поиска свой transform (центровка), поэтому нажатие отдельно */
.header-search:is(:active, .is-pressed) { transform: translateX(-50%) scale(var(--press-scale)); }
.header-search .grow { flex: 1; text-align: left; }
.kbd-wrap { display: flex; gap: 4px; }
.kbd { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 4px; border-radius: var(--r-6); background: #fafafa; border: 1px solid rgba(15,15,16,.15); font: 500 11px/1 var(--font); color: var(--fg-2); }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

/* Контейнер, куда роутер рисует страницы */
#app { width: 100%; max-width: 1169px; padding: 23px var(--gutter) 64px; flex: 1; outline: none; }
/* Смена разделов: только прозрачность — старый гаснет (fade out), новый проявляется (fade in) */
#app.page-leave { opacity: 0; transition: opacity var(--leave-ms) ease; pointer-events: none; }
#app.page-enter { animation: page-in var(--enter-ms) ease both; }
@keyframes page-in { from { opacity: 0; } }
/* Плавное появление данных после загрузки и при переключении табов */
.fade-in { animation: fade-in .26s ease both; }
@keyframes fade-in { from { opacity: 0; } }
.crumbs.swap { animation: fade-in .22s ease both; }

/* Полоска загрузки сверху при переходе */
.route-bar { position: fixed; top: 0; left: 0; height: 2px; width: 0; z-index: 70; background: var(--fg); opacity: 0; transition: width .3s ease, opacity .2s; pointer-events: none; }
.route-bar.on { opacity: 1; width: 70%; }
.route-bar.done { opacity: 0; width: 100%; }

/* ==========================================================================
   Кнопки
   ========================================================================== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: var(--r-10); font: 500 14px/20px var(--font); white-space: nowrap; }
.btn .ic { width: 16px; height: 16px; }
.btn-primary { background: var(--primary); color: var(--primary-fg); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-primary:is(:active, .is-pressed) { background: var(--primary-press); }
.btn-secondary { background: var(--surface); color: var(--fg); border: 1px solid var(--a-200); }
.btn-secondary:hover { background: #fafafa; }
.btn-secondary:is(:active, .is-pressed) { background: #f0f0f0; }
.btn-ghost { color: var(--fg); }
.btn-ghost:hover { background: var(--a-100); }
.btn-ghost:is(:active, .is-pressed) { background: var(--a-150); }
.btn-white { background: #fff; color: #000; box-shadow: var(--sh-xs); }
.btn-white:hover { background: #f2f2f2; }
.btn-white:is(:active, .is-pressed) { background: #e8e8e8; }
.btn-ghost-light { color: #fff; }
.btn-ghost-light:hover { background: rgba(255,255,255,.12); }
.btn-ghost-light:is(:active, .is-pressed) { background: rgba(255,255,255,.2); }
.btn:disabled, .btn.is-disabled { background: var(--surface); color: var(--fg-3); border: 1px solid var(--a-200); cursor: default; }
.btn-sm { height: 32px; padding: 0 10px; border-radius: var(--r-8); font: 500 13px/20px var(--font); }
.btn-hdr { height: 32px; padding: 0 10px; border-radius: 9.6px; font: 500 13px/20px var(--font); }
.btn-banner { height: 32px; padding: 0 10px; border-radius: var(--r-10); font: 500 14px/20px var(--font); }
.btn-pill { height: 26px; padding: 0 10px; border-radius: var(--r-full); background: var(--surface); box-shadow: var(--sh-xs); font: 500 13px/20px var(--font); }
.btn-pill:is(:active, .is-pressed) { background: #f0f0f0; }
.btn-lg { height: 40px; padding: 0 16px; border-radius: var(--r-12); }
.btn-block { width: 100%; }
.btn-icon { width: 36px; padding: 0; }
.btn-icon.btn-sm, .btn-icon.btn-hdr { width: 32px; }
.btn-icon.btn-lg { width: 40px; }
.btn-round { width: 28px; height: 28px; padding: 5px; border-radius: 39px; background: var(--surface); box-shadow: var(--sh-sm); display: inline-grid; place-items: center; }
.btn-round .ic { width: 16px; height: 16px; }
.btn-send { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--primary); color: #fff; flex: none; }
.btn-send:disabled { background: var(--disabled); color: var(--disabled-fg); cursor: default; }

/* ==========================================================================
   Поля
   ========================================================================== */
.field { display: flex; align-items: center; gap: 8px; height: 40px; padding: 0 4px 0 12px; border-radius: var(--r-12); background: var(--surface); border: 1px solid var(--a-200); transition: border-color .1s, box-shadow .1s; }
.field:focus-within { border-color: var(--fg); box-shadow: 0 0 0 .5px var(--fg); }
.field input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; font: 400 16px/20px var(--font); }
@media (min-width: 1024px) { .field input { font-size: 14px; } }  /* на телефоне 16px — иначе iPhone приближает страницу */
.field input::placeholder { color: var(--fg-2); }
.label { font: 500 14px/20px var(--font); display: block; margin-bottom: 6px; }
.hint { font: 400 13px/19.5px var(--font); color: var(--fg-2); margin-top: 6px; }
.field.is-error, .field.is-error:focus-within { border-color: var(--err); box-shadow: 0 0 0 .5px var(--err); }
.hint.is-error { color: var(--err); }

.prompt { position: relative; width: 100%; max-width: 650px; min-height: 52px; border-radius: var(--r-26); background: var(--surface); box-shadow: var(--sh-xs); display: flex; align-items: center; gap: 4px; padding: 0 8px 0 10px; cursor: text; }
.prompt:focus-within { box-shadow: 0 0 0 1px rgba(0,0,0,.16), 0 1px 1px -.5px rgba(0,0,0,.06), 0 3px 3px -1.5px rgba(0,0,0,.06); }
.prompt input { flex: 1; min-width: 0; height: 52px; border: 0; outline: 0; background: transparent; font: 400 16px/24px var(--font); padding: 0 8px; }
.prompt input::placeholder { color: var(--fg-2); }
.prompt .orb { width: 32px; height: 32px; border-radius: 50%; background: var(--brand); flex: none; box-shadow: inset 0 -4px 8px rgba(0,0,0,.25), inset 0 3px 6px rgba(255,255,255,.35); }
.prompt .btn-icon { width: 32px; height: 32px; border-radius: 50%; }

/* ==========================================================================
   Бейджи, пилюли, чипы
   ========================================================================== */
.pill { display: inline-flex; align-items: center; gap: 4px; height: 20px; padding: 0 8px; border-radius: var(--r-full); background: var(--a-100); border: 1px solid transparent; font: 500 12px/16px var(--font); letter-spacing: .03px; color: var(--fg); white-space: nowrap; }
.pill-muted { color: var(--fg-2); }
.count { display: inline-flex; align-items: center; height: 20px; padding: 2px 4px; border-radius: var(--r-full); background: var(--a-75); font: 600 10px/16px var(--font); letter-spacing: .025px; color: var(--fg-2); }
.badge-hot { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: var(--r-full); background: var(--brand); color: #fff; font: 500 12px/16px var(--font); letter-spacing: .03px; }
.status { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 10px; border-radius: var(--r-full); font: 500 12px/16px var(--font); white-space: nowrap; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status-ok { background: var(--ok-bg); color: var(--ok); }
.status-warn { background: var(--warn-bg); color: var(--warn); }
.status-err { background: var(--err-bg); color: var(--err); }
.status-idle { background: var(--a-100); color: var(--fg-2); }

.chip { display: inline-flex; align-items: center; gap: 6px; flex: none; height: 40px; padding: 0 12px; border-radius: var(--r-12); border: 1px solid var(--a-200); background: var(--surface); font: 500 14px/20px var(--font); color: var(--fg); }
.chip .ic { width: 16px; height: 16px; }
.chip span { color: var(--fg-chip); }
.chip:hover { background: #fafafa; }
.chip:is(:active, .is-pressed) { background: #f0f0f0; }
.chip[aria-pressed="true"] { background: var(--primary); border-color: var(--primary); color: #fff; }
.chip[aria-pressed="true"] span { color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }

/* ==========================================================================
   Табы и сегменты
   ========================================================================== */
.tabs { display: flex; gap: 6px; height: 44px; padding-top: 2px; border-bottom: 1px solid var(--a-150); align-items: flex-end; overflow-x: auto; scrollbar-width: none; }
.tabs.no-line { border-bottom: 0; }
.tab { height: 42px; padding: 4px 0 10px; display: inline-flex; align-items: flex-start; flex: none; font: 500 14px/20px var(--font); color: var(--fg-2); border-bottom: 1px solid transparent; margin-bottom: -1px; }
.tab > span { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid transparent; border-radius: var(--r-10); }
.tab:hover { color: var(--fg); }
.tab[aria-selected="true"] { color: var(--fg); border-bottom-color: rgba(0,0,0,.8); }
.tab[aria-selected="true"] > span { border-color: var(--a-200); }
.tab .ic { width: 16px; height: 16px; }

.seg { display: inline-flex; gap: 4px; padding: 3px; border-radius: var(--r-10); background: var(--a-100); }
.seg button { height: 32px; padding: 0 12px; border-radius: var(--r-8); font: 500 12px/16px var(--font); letter-spacing: .03px; color: var(--fg-2); white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--fg); box-shadow: var(--sh-sm); }

/* ==========================================================================
   Карточки
   ========================================================================== */
.card { background: var(--surface); border-radius: var(--r-16); box-shadow: var(--sh-sm); padding: 20px; }
.card-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.progress { height: 11px; border-radius: 3px; background: var(--a-200); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 3px; background: var(--fg); }

/* Плитки быстрых действий */
.tiles { display: flex; flex-wrap: wrap; justify-content: center; gap: 32px 16px; }
.tile { width: 81px; display: flex; flex-direction: column; align-items: center; gap: 10px; font: 500 14px/20px var(--font); text-align: center; }
.tile-ic { width: 40px; height: 40px; border-radius: var(--r-12); background: var(--surface); box-shadow: var(--sh-xs); display: grid; place-items: center; color: var(--icon); }
.tile-ic .ic { width: 20px; height: 20px; }
.tile:hover .tile-ic { box-shadow: 0 0 0 1px rgba(0,0,0,.1), 0 2px 4px -1px rgba(0,0,0,.08); color: var(--fg); }

/* Большой баннер, 24px.
   Фон с размытием лежит в отдельном .banner-bg, который обрезается clip-path:
   в Safari overflow:hidden + border-radius не обрезает размытый слой — отсюда
   были прямые углы на iPhone. */
.banner { position: relative; isolation: isolate; border-radius: var(--r-24); box-shadow: var(--sh-card); min-height: 191px; padding: 24px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 18px; text-align: center; color: #fff; background: #120806; }
.banner-bg { position: absolute; inset: 0; z-index: -1; border-radius: inherit; overflow: hidden; -webkit-clip-path: inset(0 round var(--r-24)); clip-path: inset(0 round var(--r-24)); }
.banner-bg::before { content: ""; position: absolute; inset: -20%;
  background:
    radial-gradient(40% 70% at 18% 55%, #ff7a2f 0%, rgba(255,122,47,0) 70%),
    radial-gradient(35% 60% at 82% 40%, #b8341a 0%, rgba(184,52,26,0) 70%),
    radial-gradient(30% 50% at 55% 85%, #3a1408 0%, rgba(58,20,8,0) 70%),
    linear-gradient(110deg, #1a0a05 0%, #3b1608 40%, #0d0705 100%);
  filter: blur(18px); }
.banner h2 { font: 400 28px/34px var(--font-display); letter-spacing: -.3px; max-width: 520px; text-wrap: balance; }
.banner .actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

/* Плашка результата проверки eSIM */
.dev-strip { display: inline-flex; align-items: center; gap: 8px; min-height: 36px; padding: 6px 10px 6px 6px; border-radius: var(--r-full); font: 500 13px/18px var(--font); max-width: 100%; text-align: left; }
.dev-strip .dev-ic { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.dev-strip .dev-ic .ic { width: 14px; height: 14px; stroke-width: 2; }
.dev-strip .dev-text { min-width: 0; }
.dev-strip .dev-go { color: var(--fg-2); flex: none; }
.dev-ok { background: var(--ok-bg); color: #11612f; }
.dev-ok .dev-ic { background: var(--ok); color: #fff; }
.dev-unknown { background: var(--a-100); color: var(--fg); }
.dev-unknown .dev-ic { background: var(--surface); color: var(--fg); box-shadow: var(--sh-xs); }
.dev-strip:is(:active, .is-pressed) { transform: scale(.97); }

/* Строка списка (страна) */
.list-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px 24px; }
.item { display: flex; align-items: center; gap: 16px; min-height: 64px; border-radius: var(--r-12); padding: 4px; margin: -4px; min-width: 0; }
.item:hover { background: var(--a-50); }
.item-av { width: 64px; height: 64px; border-radius: var(--r-12); background: var(--a-75); display: grid; place-items: center; flex: none; }
.item-av .flag { width: 40px; height: 40px; }
.item-body { min-width: 0; display: flex; flex-direction: column; }
.item-title { font: 600 14px/20px var(--font); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.item-sub { font: 400 13px/19.5px var(--font); color: var(--fg-2); }
.item-meta { display: flex; align-items: center; gap: 6px; margin-top: 2px; font: 500 12px/16px var(--font); color: var(--fg-2); }
.item-meta .flag { width: 14px; height: 14px; }

/* Подборки — обычная сетка карточек, без слайдера */
.collections { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.coll { height: 165px; border-radius: var(--r-16); position: relative; overflow: hidden; padding: 16px 16px 16px 186px; display: flex; flex-direction: column; justify-content: space-between; }
.coll .art { position: absolute; left: 8px; top: 8px; bottom: 8px; width: 170px; border-radius: var(--r-12); overflow: hidden; display: grid; place-items: center; }
.coll .art .flag { width: 96px; height: 96px; }
.coll .art .ic { width: 64px; height: 64px; stroke-width: 1; }
.coll .go { align-self: flex-end; width: 24px; height: 24px; border-radius: 50%; background: #0f0f10; color: #fff; display: grid; place-items: center; }
.coll .go .ic { width: 14px; height: 14px; stroke-width: 2; }

/* Карточки тарифов — сетка, без слайдера */
.plans { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 20px; align-items: stretch; }
.plan { border-radius: var(--r-12); box-shadow: var(--sh-sm); display: flex; flex-direction: column; min-width: 0; }
.plan.is-hot { box-shadow: 0 0 0 1.5px var(--fg), var(--sh-sm); }
.plan-top { background: var(--surface); border-radius: var(--r-12) var(--r-12) 0 0; padding: 26px 20px 20px; display: flex; flex-direction: column; }
.plan-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 24px; margin-top: -2px; }
.plan-name { font: 500 14px/20px var(--font); white-space: nowrap; }
.plan-price { display: flex; align-items: baseline; gap: 6px; margin-top: 14px; }
.plan-price s { font: 500 16px/24px var(--font); letter-spacing: -.16px; color: var(--fg-2); }
.plan-note { font: 400 12px/16px var(--font); letter-spacing: .03px; color: var(--fg-2); margin-top: 6px; min-height: 16px; }
.plan-top .btn { margin-top: 24px; }
.plan-bottom { flex: 1; background: var(--a-50); border-radius: 0 0 var(--r-12) var(--r-12); padding: 16px 16px 20px; display: flex; flex-direction: column; gap: 10px; }
.feat { display: flex; gap: 3px; font: 500 13px/19.5px var(--font); }
.feat .ic { width: 18px; height: 18px; margin-top: 1px; }
.feat.off { color: var(--fg-2); font-weight: 400; text-decoration: line-through; }
.feat.more { color: var(--fg-2); font-weight: 400; }

/* Скелетоны — пока данные «грузятся» */
.skel { border-radius: var(--r-12); background: linear-gradient(90deg, var(--a-75) 25%, var(--a-150) 50%, var(--a-75) 75%); background-size: 200% 100%; animation: skel 1.2s linear infinite; }
@keyframes skel { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.skel-item { display: flex; gap: 16px; align-items: center; }
.skel-item .a { width: 64px; height: 64px; flex: none; }
.skel-item .b { height: 14px; width: 60%; border-radius: 6px; }
.skel-item .c { height: 12px; width: 40%; border-radius: 6px; margin-top: 8px; }
.skel-plan { height: 380px; border-radius: var(--r-12); }

/* Тосты */
.toasts { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { background: var(--toast); color: #fff; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-radius: 12px; padding: 10px 14px; font: 500 14px/20px var(--font); box-shadow: inset 0 .5px 0 rgba(255,255,255,.35), inset 0 0 0 .5px rgba(255,255,255,.075), 0 0 0 .5px rgba(0,0,0,.44), 0 2px 6px -2px rgba(0,0,0,.2), 0 12px 24px -8px rgba(0,0,0,.25); display: flex; align-items: center; gap: 8px; animation: toast-in .18s ease-out; }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } }

/* ==========================================================================
   Чат-помощник (js/chat.js) — как виджет ElevenLabs:
   кнопка-пилюля 56px радиус 28 → окно 380px радиус 28; на телефоне — весь экран.
   ========================================================================== */
.chat { --chat-ring: 0 0 0 1px rgba(0,0,0,.08); --chat-sh: 0 2px 4px rgba(0,0,0,.04), 0 6px 16px rgba(0,0,0,.06); --chat-ease: cubic-bezier(.2,.8,.2,1); }
.chat-launch {
  position: fixed; z-index: 50;
  right: max(20px, env(safe-area-inset-right, 0px)); bottom: max(20px, env(safe-area-inset-bottom, 0px));
  display: inline-flex; align-items: center; gap: 10px; height: 56px; padding: 0 20px 0 10px; border-radius: 28px;
  background: var(--surface); color: var(--fg); box-shadow: var(--chat-ring), var(--chat-sh);
  font: 500 15px/20px var(--font); white-space: nowrap;
  transition: transform .22s var(--chat-ease), opacity .18s ease, box-shadow .15s;
  -webkit-user-select: none; user-select: none; touch-action: manipulation;
}
.chat-launch:hover { box-shadow: 0 0 0 1px rgba(0,0,0,.12), 0 2px 4px rgba(0,0,0,.05), 0 10px 24px rgba(0,0,0,.1); }
.chat-launch:is(:active, .is-pressed) { transform: scale(.96); }
.chat.is-open .chat-launch { opacity: 0; transform: scale(.85); pointer-events: none; }
.chat-orb {
  width: 36px; height: 36px; border-radius: 50%; flex: none; position: relative; overflow: hidden;
  background: conic-gradient(from 180deg, #ff9a3d, #f2553c, #c43069, #ff7a2f, #ffb35c, #ff9a3d);
  box-shadow: inset 0 -4px 8px rgba(0,0,0,.22), inset 0 3px 6px rgba(255,255,255,.4);
  animation: chat-spin 9s linear infinite;
}
.chat-orb::after { content: ""; position: absolute; inset: 22%; border-radius: 50%; background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.75), rgba(255,255,255,0) 70%); }
.chat-orb-sm { width: 32px; height: 32px; }
@keyframes chat-spin { to { transform: rotate(360deg); } }

.chat-panel {
  position: fixed; z-index: 51;
  right: max(20px, env(safe-area-inset-right, 0px)); bottom: max(20px, env(safe-area-inset-bottom, 0px));
  width: 380px; height: min(620px, calc(100dvh - 40px)); border-radius: 28px;
  background: var(--surface); box-shadow: var(--chat-ring), 0 4px 8px rgba(0,0,0,.04), 0 24px 48px -12px rgba(0,0,0,.18);
  display: flex; flex-direction: column; overflow: hidden;
  transform-origin: bottom right; opacity: 0; transform: translateY(16px) scale(.94);
  transition: opacity .2s ease, transform .3s var(--chat-ease);
}
.chat.is-open .chat-panel { opacity: 1; transform: none; }
.chat-head { display: flex; align-items: center; gap: 10px; padding: 14px 12px 12px 16px; border-bottom: 1px solid var(--a-150); }
.chat-head-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.chat-head-text b { font: 600 15px/20px var(--font); }
.chat-head-text span { font: 400 12px/16px var(--font); color: var(--fg-2); }
.chat-icon-btn { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; color: var(--fg-2); background: var(--a-100); transition: transform .14s var(--chat-ease), background-color .1s, color .1s; touch-action: manipulation; }
.chat-icon-btn:hover { color: var(--fg); background: var(--a-150); }
.chat-icon-btn:is(:active, .is-pressed) { transform: scale(.9); }

.chat-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 16px; scrollbar-width: thin; }
.chat-list { display: flex; flex-direction: column; gap: 10px; }
.chat-msg { max-width: 86%; padding: 10px 14px; border-radius: 18px; font: 400 14px/21px var(--font); overflow-wrap: anywhere; animation: chat-in .22s var(--chat-ease) both; }
.chat-msg p { margin: 0; }
.chat-msg p + p, .chat-msg p + ul, .chat-msg p + ol, .chat-msg ul + p, .chat-msg ol + p { margin-top: 6px; }
.chat-msg ul, .chat-msg ol { margin: 4px 0 0; padding-left: 18px; }
.chat-msg li + li { margin-top: 2px; }
.chat-assistant { align-self: flex-start; background: var(--a-75); border-bottom-left-radius: 6px; }
.chat-user { align-self: flex-end; background: var(--fg); color: #fff; border-bottom-right-radius: 6px; }
.chat-assistant.is-error { background: var(--err-bg); color: #8f1d1d; }
.chat-link { color: inherit; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--a-300); }
.chat-link:hover { text-decoration-color: currentColor; }
@keyframes chat-in { from { opacity: 0; transform: translateY(6px); } }
.chat-dots { display: inline-flex; gap: 4px; padding: 4px 0; }
.chat-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--fg-2); animation: chat-dot 1s ease-in-out infinite; }
.chat-dots i:nth-child(2) { animation-delay: .15s; } .chat-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes chat-dot { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.chat-suggest { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; margin-top: 2px; }
.chat-chip { text-align: left; padding: 8px 12px; border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--a-200); font: 500 13px/18px var(--font); color: var(--fg); transition: transform .14s var(--chat-ease), background-color .1s; touch-action: manipulation; }
.chat-chip:hover { background: #fafafa; }
.chat-chip:is(:active, .is-pressed) { transform: scale(.97); }

.chat-form { padding: 12px 16px 16px; }
.chat-input { display: flex; align-items: flex-end; gap: 6px; padding: 6px 6px 6px 16px; border-radius: 24px; background: var(--surface);
  box-shadow: 0 0 0 .5px rgba(0,0,0,.125), 0 1px 1px rgba(0,0,0,.04), 0 2px 4px rgba(0,0,0,.04); transition: box-shadow .12s; }
.chat-input:focus-within { box-shadow: 0 0 0 1px rgba(0,0,0,.35), 0 1px 1px rgba(0,0,0,.04), 0 2px 4px rgba(0,0,0,.04); }
.chat-input textarea { flex: 1; min-width: 0; resize: none; border: 0; outline: 0; background: transparent; font: 400 16px/22px var(--font); padding: 7px 0; max-height: 120px; color: var(--fg); }
.chat-input textarea::placeholder { color: var(--fg-2); }
.chat-send { width: 36px; height: 36px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--fg); color: #fff; transition: transform .14s var(--chat-ease), background-color .1s; }
.chat-send:disabled { background: var(--disabled); color: var(--disabled-fg); cursor: default; }
.chat-send:not(:disabled):is(:active, .is-pressed) { transform: scale(.9); }

/* Телефон: окно на весь экран, выезжает снизу */
@media (max-width: 640px) {
  .chat-launch { height: 48px; padding: 0 16px 0 8px; gap: 8px; font-size: 14px; right: max(16px, env(safe-area-inset-right, 0px)); bottom: max(16px, env(safe-area-inset-bottom, 0px)); }
  .chat-launch .chat-orb { width: 32px; height: 32px; }
  .chat-panel { inset: 0; width: auto; height: 100dvh; border-radius: 0; box-shadow: none; transform: translateY(100%); opacity: 1; transform-origin: bottom center; transition: transform .34s var(--chat-ease); }
  .chat-head { padding-top: max(14px, env(safe-area-inset-top, 0px)); padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(12px, env(safe-area-inset-right, 0px)); }
  .chat-form { padding-bottom: max(16px, env(safe-area-inset-bottom, 0px)); }
  .chat-msg { max-width: 90%; }
}
html.chat-lock, html.chat-lock body { overflow: hidden; }
body.sb-open .chat-launch { opacity: 0; pointer-events: none; }
@media (prefers-reduced-motion: reduce) { .chat-orb { animation: none; } }

/* ==========================================================================
   Вспомогательное
   ========================================================================== */
.row { display: flex; align-items: center; gap: 8px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.sec-head .t-section { display: inline-flex; align-items: center; gap: 2px; }
.sec-head .t-section .ic { width: 16px; height: 16px; color: var(--fg-2); }
.divider { height: 1px; background: var(--a-150); border: 0; margin: 0; }
.empty { padding: 24px 0; }

/* ==========================================================================
   Адаптив: на узких экранах меню выезжает
   ========================================================================== */
.only-mobile { display: none; }
.scrim { display: none; }
@media (max-width: 1023px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s ease; width: var(--sidebar-w) !important; padding: calc(12px + env(safe-area-inset-top, 0px)) 12px calc(12px + env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px)); box-shadow: var(--sh-pop); }
  body.sb-open .sidebar { transform: none; }
  body.sb-open .scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(0,0,0,.2); }
  body.sb-collapsed .sb-hide { display: initial; }
  body.sb-collapsed .nav-item { padding: 0 8px; }
  body.sb-collapsed .sb-label { height: auto; margin: 0; padding: 12px 6px 4px; background: none; color: var(--fg-2); }
  .main, body.sb-collapsed .main { margin-left: 0; }
  .only-mobile { display: inline-flex; }
  .only-desktop { display: none !important; }
  .header-search { position: static; transform: none; width: 32px; padding: 0; justify-content: center; flex: none; }
  .header-search:is(:active, .is-pressed) { transform: scale(var(--press-scale)); }
  .header-search .grow, .header-search .kbd-wrap { display: none; }
  .header { top: env(safe-area-inset-top, 0px); padding-left: max(10px, env(safe-area-inset-left, 0px)); padding-right: max(12px, env(safe-area-inset-right, 0px)); }
  #app { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
}
@media (max-width: 560px) {
  .tiles { gap: 20px 4px; }
  .tile { width: 76px; font-size: 13px; }
  .banner h2 { font-size: 22px; line-height: 28px; }
  .coll { padding-left: 16px; height: 112px; }
  .tile-more { display: none; }   /* 8 плиток = ровно 2 ряда по 4 */
  .coll .art { display: none; }
  .list-grid, .collections { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
