/* =========================================================
   Подбор — визуальный язык: Apple (WWDC «Designing Fluid Interfaces»,
   «UI Typography») + DesignBookmark Motion.
   Без рамок и теней: слои разделяет только тон поверхности.
   Один белый «инверсный» элемент на экране — главное действие.
   ========================================================= */
:root {
  --font: "Inter", -apple-system, "SF Pro Text", "Segoe UI", system-ui, sans-serif;
  --display: "Inter Tight", "Inter", -apple-system, "SF Pro Display", system-ui, sans-serif;
  --r-card: 28px; --r-tile: 20px; --r-row: 14px; --r-pill: 999px;
  --ease: cubic-bezier(.32, .72, 0, 1); /* кривая листов iOS */
}
[data-theme="dark"] {
  --stage: #000;
  --card: #111112;
  --surface: #1c1c1e;
  --fill-1: rgba(255,255,255,.055);
  --fill-2: rgba(255,255,255,.09);
  --fill-3: rgba(255,255,255,.15);
  --text: #f5f5f7;
  --text-2: rgba(245,245,247,.72);
  --muted: #8e8e93;
  --inverse: #f5f5f7;
  --on-inverse: #000;
  --green: #34d17a; --green-text: #3ce085; --green-soft: rgba(52,209,122,.14); --on-green: #04140a;
  --red: #ff5a5f; --orange: #ff9f0a; --yellow: #ffd23f; --blue: #3ec9ff; --purple: #c69bff; --pink: #ff6ad5; --heart: #ff4d6d;
  --glass: rgba(28,28,30,.62);
  --glass-edge: rgba(255,255,255,.08);
  --scrim: rgba(0,0,0,.55);
  color-scheme: dark;
}
[data-theme="light"] {
  --stage: #f5f5f7;
  --card: #ffffff;
  --surface: #ebebef;
  --fill-1: rgba(0,0,0,.04);
  --fill-2: rgba(0,0,0,.065);
  --fill-3: rgba(0,0,0,.11);
  --text: #0b0b0c;
  --text-2: rgba(11,11,12,.7);
  --muted: #6e6e73;
  --inverse: #0b0b0c;
  --on-inverse: #fff;
  --green: #1fb466; --green-text: #12804a; --green-soft: rgba(31,180,102,.12); --on-green: #fff;
  --red: #e5383b; --orange: #e08600; --yellow: #f2b600; --blue: #0a84ff; --purple: #8e5cf0; --pink: #e0409f; --heart: #ff2d55;
  --glass: rgba(255,255,255,.66);
  --glass-edge: rgba(255,255,255,.9);
  --scrim: rgba(20,20,24,.28);
  color-scheme: light;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 110px; }
body {
  margin: 0; min-height: 100vh; overflow-x: hidden;
  background: var(--stage); color: var(--text);
  font: 400 15px/1.47 var(--font); letter-spacing: -.008em;
  font-feature-settings: "cv11", "ss01", "ss03";
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  transition: background-color .45s var(--ease), color .45s var(--ease);
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--text); outline-offset: 3px; }
::selection { background: var(--inverse); color: var(--on-inverse); }
kbd {
  display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 5px;
  border-radius: 6px; background: var(--fill-2); color: var(--muted);
  font: 600 11px/1 var(--font); letter-spacing: 0;
}
.num, .t-num, .hero-num, .price b { font-variant-numeric: tabular-nums; }

/* ================= Остров навигации ================= */
.island {
  position: fixed; top: 14px; left: 50%; z-index: 40; transform: translateX(-50%);
  display: flex; align-items: center; gap: 6px; padding: 6px;
  border-radius: var(--r-pill); background: var(--glass);
  backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: inset 0 1px 0 var(--glass-edge);
  max-width: calc(100vw - 20px);
}
.brand { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; color: var(--text); }
.tabs { position: relative; display: flex; }
.tabs button {
  position: relative; z-index: 1; height: 40px; padding: 0 16px; border: 0; border-radius: var(--r-pill);
  background: none; color: var(--muted); font-size: 14px; font-weight: 500; white-space: nowrap;
  display: flex; align-items: center; gap: 7px; transition: color .3s var(--ease);
}
.tabs button:hover { color: var(--text); }
.tabs button[aria-selected="true"] { color: var(--on-inverse); }
.tab-pill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: var(--r-pill); background: var(--inverse); will-change: transform, width; }
.badge-n {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: var(--r-pill); display: inline-grid; place-items: center;
  background: var(--green); color: var(--on-green); font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.island-end { display: flex; gap: 2px; padding-left: 4px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: transparent; color: var(--muted); transition: color .2s, background-color .2s;
}
.icon-btn:hover { color: var(--text); background: var(--fill-2); }
.icon-btn:active, .pill-btn:active, .chip:active, .cta:active, .round-btn:active { transform: scale(.96); transition: transform .1s ease-out; }

main { padding: 104px clamp(16px, 4vw, 56px) 140px; max-width: 1600px; margin: 0 auto; }
.panel { display: none; }
.panel.active { display: block; animation: enter .5s var(--ease) both; }
@keyframes enter { from { opacity: 0; transform: translateY(10px); } }

/* ================= Типографика ================= */
.head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 18px 0 28px; flex-wrap: wrap; }
.kicker { margin: 0 0 6px; color: var(--muted); font-size: 15px; font-weight: 500; }
.display {
  margin: 0; font: 700 clamp(44px, 6.4vw, 88px)/.98 var(--display); letter-spacing: -.045em;
}
.lead { margin: 14px 0 0; color: var(--text-2); font-size: 17px; max-width: 520px; line-height: 1.5; }

/* ================= Кнопки ================= */
.cta {
  position: relative; height: 56px; padding: 0 26px; border: 0; border-radius: var(--r-pill);
  background: var(--inverse); color: var(--on-inverse); font-size: 16px; font-weight: 600; will-change: transform;
}
.cta span { display: inline-flex; align-items: center; gap: 10px; }
.cta kbd { background: color-mix(in srgb, var(--on-inverse) 12%, transparent); color: inherit; opacity: .7; }
.pill-btn {
  height: 44px; padding: 0 18px; border: 0; border-radius: var(--r-pill); display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--fill-2); color: var(--text); font-size: 14px; font-weight: 600; white-space: nowrap;
  transition: background-color .2s, color .2s;
}
.pill-btn:hover { background: var(--fill-3); }
.pill-btn.inverse { background: var(--inverse); color: var(--on-inverse); }
.pill-btn.inverse:hover { opacity: .9; }
.pill-btn.done { background: var(--green-soft); color: var(--green-text); }
.pill-btn.wide { width: 100%; }

/* ================= Плитки-показатели (Stat card) ================= */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.tile { padding: 20px 22px; border-radius: var(--r-card); background: var(--card); display: grid; gap: 4px; min-width: 0; }
.t-lab { font-size: 13px; color: var(--muted); font-weight: 500; }
.t-num { font: 600 clamp(30px, 3.2vw, 44px)/1.08 var(--display); letter-spacing: -.035em; white-space: nowrap; }
.t-sub { font-size: 13px; color: var(--muted); }
.tile.accent .t-num { color: var(--green-text); }

/* Odometer: цифры крутятся на пружинах */
.odo { display: inline-flex; align-items: baseline; }
.odo-col { position: relative; display: inline-block; width: .62em; height: 1.08em; overflow: hidden; vertical-align: bottom; }
.odo-dg { position: absolute; left: 0; right: 0; top: 0; text-align: center; will-change: transform, opacity; }
.odo-sep { display: inline-block; width: .18em; }
.odo-fix { display: inline-block; }
.odo-fix:last-child { margin-left: .14em; }

.notice {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 14px 14px 14px 20px; border-radius: var(--r-tile); background: var(--card); margin-bottom: 22px;
  color: var(--text-2); font-size: 14px;
}
.notice::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--orange); flex: none; }
.notice .pill-btn { margin-left: auto; height: 38px; }

/* ================= Сегменты запросов (Tab pill) ================= */
.seg-scroll { overflow-x: auto; scrollbar-width: none; margin: 0 -4px 12px; padding: 0 4px; }
.seg-scroll::-webkit-scrollbar { display: none; }
.seg { position: relative; display: inline-flex; padding: 4px; border-radius: var(--r-pill); background: var(--card); }
.seg button {
  position: relative; z-index: 1; height: 40px; padding: 0 16px; border: 0; border-radius: var(--r-pill); background: none;
  color: var(--muted); font-size: 14px; font-weight: 500; white-space: nowrap; transition: color .3s var(--ease);
  display: inline-flex; align-items: center; gap: 7px;
}
.seg button small { font-size: 12px; opacity: .7; font-variant-numeric: tabular-nums; }
.seg button:hover { color: var(--text); }
.seg button[aria-selected="true"] { color: var(--text); }
.seg-pill { position: absolute; left: 0; top: 4px; bottom: 4px; border-radius: var(--r-pill); background: var(--fill-3); will-change: transform, width; }

/* ================= Панель фильтров ================= */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 22px; }
.search {
  display: flex; align-items: center; gap: 10px; height: 44px; padding: 0 8px 0 16px; flex: 1 1 180px; max-width: 300px; min-width: 160px;
  border-radius: var(--r-pill); background: var(--card); color: var(--muted); transition: background-color .2s;
}
.search:focus-within { background: var(--surface); color: var(--text); }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--text); }
.search input::-webkit-search-cancel-button { display: none; }
.select { position: relative; }
.select::after { content: ""; position: absolute; right: 16px; top: 50%; width: 7px; height: 7px; border: solid var(--muted); border-width: 0 1.8px 1.8px 0; transform: translateY(-70%) rotate(45deg); pointer-events: none; }
.select select { appearance: none; height: 44px; padding: 0 40px 0 16px; border: 0; border-radius: var(--r-pill); background: var(--card); color: var(--text); font-weight: 500; cursor: pointer; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  height: 44px; padding: 0 14px; border: 0; border-radius: var(--r-pill); background: var(--card); color: var(--muted);
  font-size: 14px; font-weight: 500; display: inline-flex; align-items: center; gap: 8px; transition: background-color .25s var(--ease), color .25s;
}
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .35; transition: all .3s var(--ease); }
.chip:hover { color: var(--text); }
.chip.on { background: var(--fill-3); color: var(--text); }
.chip.on::before { background: var(--green); opacity: 1; transform: scale(1.3); }
.num-field { display: inline-flex; align-items: center; gap: 6px; height: 44px; padding: 0 14px; border-radius: var(--r-pill); background: var(--card); color: var(--muted); font-size: 14px; }
.num-field input { width: 52px; border: 0; outline: 0; background: transparent; color: var(--text); font-weight: 600; text-align: center; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.num-field input::-webkit-inner-spin-button { display: none; }
.found { margin-left: auto; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }

/* ================= Карточки товара ================= */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 14px; }
.card {
  position: relative; display: flex; flex-direction: column; padding: 8px; border-radius: var(--r-card); background: var(--card);
  transition: transform .5s var(--ease), background-color .3s;
}
.card:hover { transform: translateY(-4px); }
.card.focused { background: var(--surface); }
.card.focused::after, .card.selected::after {
  content: ""; position: absolute; inset: -3px; border-radius: 31px; pointer-events: none;
  box-shadow: 0 0 0 2px var(--text);
}
.card.selected::after { box-shadow: 0 0 0 2px var(--green); }
.card.is-hidden { opacity: .45; }
.ph { position: relative; aspect-ratio: 1; border-radius: 21px; overflow: hidden; background: var(--fill-1); cursor: zoom-in; }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .8s var(--ease); }
.card:hover .ph img { transform: scale(1.035); }
.ph-ui { position: absolute; inset: 10px 10px auto; display: flex; justify-content: space-between; pointer-events: none; }
.ph-ui > * { pointer-events: auto; }
.glass-btn {
  position: relative; width: 36px; height: 36px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: var(--glass); color: var(--text); backdrop-filter: blur(16px) saturate(180%); -webkit-backdrop-filter: blur(16px) saturate(180%);
}
.sel { opacity: 0; transition: opacity .25s, background-color .2s; }
.card:hover .sel, .card.selected .sel, .card.focused .sel, .grid.has-selection .sel { opacity: 1; }
.sel svg { opacity: 0; transition: opacity .2s; }
.card.selected .sel { background: var(--green); color: var(--on-green); }
.card.selected .sel svg { opacity: 1; }
.heart svg { overflow: visible; }
.heart path { fill: transparent; stroke: currentColor; stroke-width: 1.8; transition: fill .3s, stroke .3s; }
.heart.on path { fill: var(--heart); stroke: var(--heart); }
.burst-dot { position: absolute; left: 50%; top: 50%; width: 5px; height: 5px; border-radius: 50%; pointer-events: none; }
.hit {
  position: absolute; left: 10px; bottom: 10px; height: 26px; padding: 0 10px; border-radius: var(--r-pill);
  display: inline-flex; align-items: center; gap: 6px; background: var(--glass); color: var(--text);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); font-size: 12px; font-weight: 600;
}
.hit::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--orange); }

.c-body { padding: 14px 10px 8px; display: flex; flex-direction: column; gap: 12px; flex: 1; }
.c-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.price b { display: block; font: 600 26px/1 var(--display); letter-spacing: -.035em; }
.price span { display: block; margin-top: 4px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.gain { text-align: right; }
.gain b { display: block; font: 600 20px/1 var(--display); letter-spacing: -.03em; color: var(--green-text); font-variant-numeric: tabular-nums; }
.gain b.neg { color: var(--red); }
.gain span { display: block; margin-top: 5px; font-size: 12px; color: var(--muted); }
.c-name { margin: 0; font-size: 14px; line-height: 1.4; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.8em; }
.meta { display: flex; flex-wrap: wrap; gap: 6px; }
.tag { height: 26px; padding: 0 10px; border-radius: var(--r-pill); display: inline-flex; align-items: center; font-size: 12px; font-weight: 500; background: var(--fill-1); color: var(--muted); }
.tag.good { background: var(--green-soft); color: var(--green-text); font-weight: 600; }
.c-line { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 0 0; border-top: 0; }
.c-cost { font-size: 12px; color: var(--muted); white-space: nowrap; }
.w-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--muted); }
.c-cost b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }

/* Toggle switch */
.sw-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sw-label { font-size: 13px; color: var(--text-2); font-weight: 500; white-space: nowrap; display: flex; align-items: center; gap: 10px; cursor: pointer; background: none; border: 0; padding: 0; }
.sw { --on: 0; position: relative; width: 40px; height: 24px; flex: none; border-radius: var(--r-pill); background: color-mix(in srgb, var(--green) calc(var(--on) * 100%), var(--fill-3)); }
.sw i { position: absolute; left: 2px; top: 2px; width: 20px; height: 20px; border-radius: var(--r-pill); background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.sw-label[aria-pressed="true"] .sw { --on: 1; }
.sw-label[aria-pressed="true"] .sw i { transform: translateX(16px); }
.weights { display: inline-flex; padding: 3px; border-radius: var(--r-pill); background: var(--fill-1); }
.weights button { height: 28px; min-width: 32px; padding: 0 7px; border: 0; border-radius: var(--r-pill); background: none; font-size: 12px; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; transition: background-color .25s var(--ease), color .2s; }
.weights button:hover { color: var(--text); }
.weights button.on { background: var(--fill-3); color: var(--text); }
.actions { display: flex; gap: 6px; margin-top: auto; padding-top: 2px; }
.actions .add { flex: 1; }
.actions .icon-btn { background: var(--fill-1); width: 44px; height: 44px; }
.actions .icon-btn:hover { background: var(--fill-2); }

/* ================= Групповые действия ================= */
.bulk {
  position: fixed; left: 50%; bottom: 22px; z-index: 45; transform: translateX(-50%);
  display: flex; align-items: center; gap: 6px; padding: 6px 6px 6px 18px; border-radius: var(--r-pill);
  background: var(--glass); backdrop-filter: blur(24px) saturate(180%); -webkit-backdrop-filter: blur(24px) saturate(180%);
  box-shadow: inset 0 1px 0 var(--glass-edge); font-weight: 600; font-size: 14px; white-space: nowrap;
  max-width: calc(100vw - 20px); overflow-x: auto; animation: rise .45s var(--ease);
}
.bulk > span { margin-right: 8px; font-variant-numeric: tabular-nums; }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 24px) scale(.96); } }

/* ================= Подбор (Swipe deck) ================= */
#tab-deck.active { display: grid; justify-items: center; text-align: center; }
.deck-head { margin: 0 0 4px; }
.deck-head .display { font-size: clamp(40px, 4.6vw, 64px); }
.deck-head .lead { margin-top: 10px; font-size: 15px; }
.deck-head .lead { margin-left: auto; margin-right: auto; }
.deck-stage { position: relative; width: min(380px, calc(100vw - 32px)); height: clamp(440px, calc(100vh - 370px), 600px); margin: 22px auto 8px; }
.deck { position: absolute; inset: 0; }
.deck-card {
  position: absolute; inset: 0; padding: 10px; border-radius: 32px; background: var(--surface);
  touch-action: none; user-select: none; cursor: grab; will-change: transform; text-align: left;
  display: flex; flex-direction: column;
}
.deck-card.dragging { cursor: grabbing; }
.deck-card .ph { cursor: inherit; aspect-ratio: auto; flex: 1 1 auto; min-height: 0; border-radius: 24px; }
.deck-card .ph img { pointer-events: none; -webkit-user-drag: none; }
.deck-card .d-body { padding: 18px 12px 8px; display: grid; gap: 12px; }
.deck-card .c-name { min-height: 0; }
.stamp {
  position: absolute; top: 28px; height: 36px; padding: 0 16px; border-radius: var(--r-pill); display: inline-flex; align-items: center;
  font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; opacity: 0; pointer-events: none;
}
.stamp.yes { left: 26px; background: var(--green); color: var(--on-green); transform: rotate(-9deg); }
.stamp.no { right: 26px; background: var(--inverse); color: var(--on-inverse); transform: rotate(9deg); }
.stamp.up { left: 50%; top: 40%; translate: -50% 0; background: var(--heart); color: #fff; }
.deck-done { position: absolute; inset: 0; display: grid; place-content: center; gap: 10px; justify-items: center; border-radius: 32px; background: var(--card); padding: 30px; }
.deck-done b { font: 600 28px var(--display); letter-spacing: -.03em; }
.deck-done span { color: var(--muted); }
.deck-ctrls { display: flex; align-items: center; justify-content: center; gap: 16px; margin-top: 14px; }
.round-btn { width: 68px; height: 68px; border-radius: 50%; border: 0; display: grid; place-items: center; background: var(--card); color: var(--text); transition: background-color .2s; }
.round-btn:hover { background: var(--surface); }
.round-btn.small { width: 52px; height: 52px; color: var(--muted); }
.round-btn.small:hover { color: var(--text); }
.round-btn[data-deck="up"]:hover { color: var(--heart); }
.round-btn.yes { background: var(--green); color: var(--on-green); }
.deck-left { color: var(--muted); font-size: 14px; margin: 14px 0 0; font-variant-numeric: tabular-nums; }

/* ================= Закуп ================= */
.cart-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 14px; align-items: start; }
.cart-list { display: grid; gap: 8px; }
.cart-list:empty { display: none; }
.line { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 8px 16px; align-items: center; padding: 10px 18px 10px 10px; border-radius: var(--r-tile); background: var(--card); }
.line img { width: 72px; height: 72px; border-radius: 14px; object-fit: cover; display: block; cursor: zoom-in; }
.l-name { min-width: 0; }
.l-name a { font-size: 15px; font-weight: 500; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.l-name small { display: block; margin-top: 2px; color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.l-warn { color: var(--orange); font-size: 12px; margin-top: 4px; font-weight: 500; }
.l-sum { text-align: right; }
.l-sum b { font: 600 22px/1.1 var(--display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: var(--green-text); }
.l-sum b.neg { color: var(--red); }
.l-sum span { display: block; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.l-ctrls { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.stepper { display: inline-flex; align-items: center; height: 36px; padding: 2px; border-radius: var(--r-pill); background: var(--fill-1); }
.stepper button { width: 32px; height: 32px; border: 0; border-radius: 50%; background: none; font-size: 18px; color: var(--text-2); display: grid; place-items: center; }
.stepper button:hover { background: var(--fill-2); color: var(--text); }
.stepper .qv { position: relative; min-width: 44px; height: 32px; overflow: hidden; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 32px; cursor: text; }
.stepper input { width: 56px; height: 32px; border: 0; outline: 0; background: transparent; text-align: center; font-weight: 600; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button { display: none; }
.roll { position: relative; display: block; height: 32px; }
.roll b { position: absolute; inset: 0; font-weight: 600; }
.mini { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: var(--r-pill); background: var(--fill-1); font-size: 12px; color: var(--muted); }
.mini input, .mini select { width: 58px; border: 0; outline: 0; background: transparent; color: var(--text); font-weight: 600; font-size: 13px; text-align: right; -moz-appearance: textfield; }
.mini select { width: auto; text-align: left; appearance: none; cursor: pointer; padding-right: 2px; }
.mini input::-webkit-inner-spin-button { display: none; }
.l-auto { font-size: 12px; color: var(--green-text); font-weight: 500; }
.l-ctrls .icon-btn { margin-left: auto; width: 36px; height: 36px; }

.summary { position: sticky; top: 92px; padding: 26px; border-radius: var(--r-card); background: var(--card); display: grid; gap: 6px; }
.hero-num { font: 600 clamp(40px, 4vw, 56px)/1.05 var(--display); letter-spacing: -.045em; color: var(--green-text); white-space: nowrap; }
.hero-num.neg { color: var(--red); }
.delta { justify-self: start; height: 26px; padding: 0 10px; border-radius: var(--r-pill); display: inline-flex; align-items: center; background: var(--green-soft); color: var(--green-text); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.split { display: flex; gap: 3px; height: 8px; margin: 18px 0 6px; }
.split i { display: block; height: 100%; border-radius: 4px; transition: flex-grow .6s var(--ease); min-width: 0; }
.rows { margin: 8px 0 0; display: grid; gap: 10px; font-size: 14px; }
.rows div { display: flex; justify-content: space-between; gap: 12px; }
.rows dt { color: var(--muted); display: flex; align-items: center; gap: 8px; }
.rows dd { margin: 0; font-weight: 500; font-variant-numeric: tabular-nums; text-align: right; }
.rows .dot { width: 8px; height: 8px; border-radius: 50%; }
.rows .sub dt { padding-left: 16px; font-size: 13px; }
.rows .sub dd { color: var(--muted); font-size: 13px; }
.note { margin: 12px 0 0; padding: 12px 14px; border-radius: var(--r-row); background: color-mix(in srgb, var(--orange) 13%, transparent); color: var(--text); font-size: 13px; line-height: 1.45; }
.summary .pill-btn { margin-top: 16px; height: 50px; }

/* ================= Сбор и настройки ================= */
.boxes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 14px; align-items: start; }
.box, .boxes fieldset { margin: 0; padding: 24px; border: 0; border-radius: var(--r-card); background: var(--card); display: grid; gap: 14px; min-width: 0; }
.box h2, .boxes legend { margin: 0; padding: 0; font: 600 22px var(--display); letter-spacing: -.03em; float: left; width: 100%; }
.steps { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; counter-reset: s; }
.steps li { counter-increment: s; position: relative; padding: 3px 0 0 40px; min-height: 28px; color: var(--text-2); font-size: 14px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--fill-2); display: grid; place-items: center; font-weight: 600; font-size: 13px; color: var(--text); }
.steps b { color: var(--text); font-weight: 600; }
.field { display: grid; gap: 8px; font-size: 13px; color: var(--muted); }
.field textarea { width: 100%; border: 0; outline: 0; border-radius: var(--r-row); background: var(--fill-1); padding: 12px 14px; color: var(--text); resize: vertical; }
.box > .pill-btn { justify-self: start; }
.qlist { display: grid; gap: 6px; }
.qrow { display: grid; grid-template-columns: 70px 1fr auto; gap: 12px; align-items: center; padding: 6px 6px 6px 14px; border-radius: var(--r-row); background: var(--fill-1); }
.qrow code { font-family: var(--font); font-size: 14px; color: var(--muted); }
.qrow input { height: 36px; border: 0; outline: 0; border-radius: 10px; background: transparent; padding: 0 8px; color: var(--text); font-weight: 500; min-width: 0; }
.qrow input:focus { background: var(--fill-2); }
.qrow small { color: var(--muted); font-variant-numeric: tabular-nums; padding-right: 8px; }
.imports { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.imports li { padding: 12px 14px; border-radius: var(--r-row); background: var(--fill-1); font-size: 13px; color: var(--muted); }
.imports b { display: block; color: var(--text); font-weight: 600; font-size: 14px; }
.hint { margin: 0; color: var(--muted); font-size: 13px; }

.boxes label.set { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 48px; padding: 0 6px 0 14px; border-radius: var(--r-row); background: var(--fill-1); font-size: 14px; color: var(--text-2); }
.boxes label.set input, .boxes label.set select { width: 110px; height: 36px; border: 0; outline: 0; border-radius: 10px; background: transparent; text-align: right; padding: 0 10px; color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; -moz-appearance: textfield; }
.boxes label.set input:focus, .boxes label.set select:focus { background: var(--fill-2); }
.boxes label.set input::-webkit-inner-spin-button { display: none; }
.boxes label.set.need { box-shadow: inset 0 0 0 1.5px var(--orange); }

/* ================= Лист товара ================= */
.scrim { position: fixed; inset: 0; z-index: 50; background: var(--scrim); opacity: 0; visibility: hidden; pointer-events: none; }
.sheet {
  position: fixed; top: 10px; right: 10px; bottom: 10px; z-index: 51; width: min(540px, calc(100vw - 20px));
  border-radius: 32px; background: var(--card); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none;
  transform: translateX(104%); visibility: hidden; outline: none;
}
.sheet::-webkit-scrollbar { display: none; }
.s-img { position: relative; margin: 10px; aspect-ratio: 1; border-radius: 24px; overflow: hidden; background: var(--fill-1); }
.s-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.s-close { position: absolute; top: 12px; right: 12px; }
.s-body { padding: 10px 24px 28px; display: grid; gap: 20px; }
.s-body h2 { margin: 0; font-size: 18px; font-weight: 500; line-height: 1.4; letter-spacing: -.01em; }
.s-price { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.s-price b { font: 600 44px/1 var(--display); letter-spacing: -.045em; }
.s-price span { color: var(--muted); font-variant-numeric: tabular-nums; }
.s-ways { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.way { padding: 16px; border-radius: var(--r-tile); background: var(--fill-1); display: grid; gap: 8px; position: relative; }
.way.best { background: var(--green-soft); }
.way.best::after { content: "дешевле"; position: absolute; top: 14px; right: 14px; font-size: 11px; font-weight: 700; color: var(--green-text); text-transform: uppercase; letter-spacing: .05em; }
.way h4 { margin: 0; font-size: 13px; color: var(--muted); font-weight: 500; }
.way dl { margin: 0; display: grid; gap: 4px; font-size: 13px; }
.way dl div { display: flex; justify-content: space-between; gap: 8px; }
.way dt { color: var(--muted); }
.way dd { margin: 0; font-variant-numeric: tabular-nums; }
.way .tot { font: 600 24px var(--display); letter-spacing: -.03em; font-variant-numeric: tabular-nums; }
.s-kpi { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.s-kpi > div { padding: 16px; border-radius: var(--r-tile); background: var(--fill-1); display: grid; gap: 4px; }
.s-kpi b { font: 600 26px var(--display); letter-spacing: -.035em; font-variant-numeric: tabular-nums; }
.s-kpi .g { color: var(--green-text); }
.s-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.s-fields label { display: grid; gap: 4px; padding: 10px 14px; border-radius: var(--r-row); background: var(--fill-1); font-size: 12px; color: var(--muted); }
.s-fields .wide { grid-column: 1 / -1; }
.s-fields input, .s-fields textarea { border: 0; outline: 0; background: transparent; color: var(--text); font-size: 15px; font-weight: 500; padding: 0; width: 100%; -moz-appearance: textfield; resize: vertical; }
.s-fields input::-webkit-inner-spin-button { display: none; }
.spark { width: 100%; height: 72px; display: block; overflow: visible; }
.s-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.s-actions .add { flex: 1 1 100%; height: 52px; font-size: 15px; }

/* ================= Справка, уведомления, пустые состояния ================= */
.help { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px; background: var(--scrim); animation: fade .25s var(--ease); }
@keyframes fade { from { opacity: 0; } }
.help-box { width: min(440px, 100%); padding: 28px; border-radius: 32px; background: var(--card); display: grid; gap: 18px; animation: pop-in .45s var(--ease); }
@keyframes pop-in { from { opacity: 0; transform: scale(.94); } }
.help-box h2 { margin: 0; font: 600 28px var(--display); letter-spacing: -.03em; }
.help-box dl { margin: 0; display: grid; gap: 10px; }
.help-box dl div { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 14px; }
.help-box dt { color: var(--text-2); }
.help-box dd { margin: 0; display: flex; gap: 4px; }

.toast {
  position: fixed; left: 50%; bottom: 22px; z-index: 70; display: flex; align-items: center; gap: 12px;
  padding: 8px 8px 8px 20px; min-height: 52px; border-radius: var(--r-pill);
  background: var(--inverse); color: var(--on-inverse); font-size: 14px; font-weight: 500;
  transform: translate(-50%, 140%); opacity: 0; transition: transform .5s var(--ease), opacity .3s; pointer-events: none;
  max-width: calc(100vw - 20px);
}
.toast.show { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.toast:not(:has(button:not([hidden]))) { padding-right: 20px; }
.toast button { height: 36px; padding: 0 14px; border: 0; border-radius: var(--r-pill); background: color-mix(in srgb, var(--on-inverse) 12%, transparent); color: inherit; font-weight: 600; }
body:has(.bulk:not([hidden])) .toast { bottom: 88px; }

.empty { display: grid; justify-items: center; gap: 8px; padding: 80px 16px; text-align: center; }
.empty b { font: 600 32px var(--display); letter-spacing: -.035em; }
.empty span { color: var(--muted); max-width: 380px; }
.empty .pill-btn { margin-top: 10px; }

.fly { position: fixed; z-index: 80; pointer-events: none; border-radius: 18px; object-fit: cover; }

/* ================= Телефон ================= */
@media (max-width: 1100px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .cart-wrap { grid-template-columns: 1fr; } .summary { position: static; } }
@media (max-width: 720px) {
  .island { top: auto; bottom: 12px; left: 10px; right: 10px; transform: none; justify-content: space-between; padding: 5px; }
  .brand, .island-end #help-btn { display: none; }
  .tabs { flex: 1; }
  .tabs button { flex: 1; padding: 0 6px; font-size: 13px; justify-content: center; }
  .tabs button .badge-n { position: absolute; top: 2px; right: 2px; min-width: 16px; height: 16px; font-size: 10px; padding: 0 4px; }
  main { padding: 24px 14px 120px; }
  .head { margin-top: 4px; }
  .head .cta { width: 100%; }
  .tiles { gap: 8px; }
  .tile { padding: 16px; border-radius: 22px; }
  .t-num { font-size: 28px; }
  .search { flex: 1 1 100%; }
  .select { flex: 1; } .select select { width: 100%; }
  .chips { width: 100%; overflow-x: auto; flex-wrap: nowrap; scrollbar-width: none; }
  .found { margin-left: 0; }
  .grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .card { padding: 6px; border-radius: 22px; }
  .ph { border-radius: 17px; }
  .c-body { padding: 10px 6px 4px; gap: 8px; }
  .price b { font-size: 20px; }
  .gain b { font-size: 16px; }
  .c-top { flex-direction: column; gap: 6px; } .gain { text-align: left; }
  .meta .tag:not(.good), .w-row, .c-cost { display: none; }
  .sw-label { font-size: 12px; }
  .actions .icon-btn.open, .actions .icon-btn.hide { display: none; }
  .line { grid-template-columns: 56px minmax(0, 1fr); padding: 10px; }
  .line img { width: 56px; height: 56px; }
  .l-sum { grid-column: 2; text-align: left; }
  .l-ctrls { grid-column: 1 / -1; }
  .bulk, .toast { bottom: 86px; }
  body:has(.bulk:not([hidden])) .toast { bottom: 150px; }
  .deck-stage { height: clamp(420px, calc(100svh - 360px), 560px); }
  .deck-head .lead { display: none; }
  .deck-card { overflow: hidden; }
  .sheet { top: auto; left: 0; right: 0; bottom: 0; width: 100%; max-height: 92vh; border-radius: 28px 28px 0 0; }
  .s-ways, .s-fields { grid-template-columns: 1fr; }
}

/* ================= Доступность ================= */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
@media (prefers-reduced-transparency: reduce) {
  .island, .bulk, .glass-btn, .hit { background: var(--surface); backdrop-filter: none; -webkit-backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  .card, .tile, .box, .line, .summary { box-shadow: inset 0 0 0 1px var(--muted); }
}
::view-transition-old(root), ::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

/* =========================================================
   v4: характер. Агент-шар, бегущее слово, веер товаров, цветные баннеры,
   тарифы с картой-пропуском и кнопкой «удерживайте».
   ========================================================= */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Roll links: текст вкладки прокатывается вверх, снизу въезжает копия (тень текста) */
.rl { display: inline-block; height: 1.3em; overflow: hidden; line-height: 1.3; vertical-align: middle; }
.rl i { display: block; font-style: normal; text-shadow: 0 1.3em 0 currentColor; transition: transform .5s var(--ease); }
@media (hover: hover) { .tabs button:hover .rl i { transform: translateY(-1.3em); } }

/* Агент-шар: три цветных пятна вращаются под размытием (Siri-orb по-своему) */
.orb { position: relative; display: inline-block; width: 28px; height: 28px; border-radius: 50%; overflow: hidden; flex: none;
  background: #0c1a12; isolation: isolate; }
.orb b { position: absolute; width: 70%; height: 70%; border-radius: 50%; filter: blur(5px); mix-blend-mode: screen; animation: orb 6s linear infinite; }
.orb b:nth-child(1) { background: var(--green); left: 0; top: 0; }
.orb b:nth-child(2) { background: var(--blue); right: 0; top: 10%; animation-duration: 7.5s; animation-direction: reverse; }
.orb b:nth-child(3) { background: var(--purple); left: 15%; bottom: 0; animation-duration: 9s; }
@keyframes orb { from { transform: rotate(0) translateX(18%) rotate(0); } to { transform: rotate(360deg) translateX(18%) rotate(-360deg); } }
.orb.mini { width: 18px; height: 18px; }
.orb.mini b { filter: blur(3px); }
[data-theme="light"] .orb { background: #dff5e8; }
[data-theme="light"] .orb b { mix-blend-mode: multiply; }

.plan-chip {
  height: 40px; padding: 0 14px 0 11px; border: 0; border-radius: var(--r-pill); display: inline-flex; align-items: center; gap: 8px;
  background: var(--fill-2); color: var(--text); font-size: 13px; font-weight: 600; margin-right: 2px; transition: background-color .2s;
}
.plan-chip:hover { background: var(--fill-3); }
.plan-chip[data-plan="pro"] { background: linear-gradient(120deg, color-mix(in srgb, var(--green) 30%, transparent), color-mix(in srgb, var(--blue) 30%, transparent)); }
.plan-chip[data-plan="business"] { background: linear-gradient(120deg, color-mix(in srgb, var(--yellow) 30%, transparent), color-mix(in srgb, var(--purple) 34%, transparent)); }

/* ---------- Hero ---------- */
.hero { position: relative; display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, .9fr); gap: 24px; align-items: center;
  margin: 6px 0 28px; padding: clamp(28px, 4vw, 56px); border-radius: 36px; background: var(--card); overflow: hidden; isolation: isolate; }
.hero::before { /* мягкое свечение за веером: единственный «цвет в воздухе» */
  content: ""; position: absolute; right: -10%; top: -30%; width: 60%; aspect-ratio: 1; border-radius: 50%; z-index: -1;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--green) 26%, transparent), transparent 70%),
              radial-gradient(closest-side at 30% 70%, color-mix(in srgb, var(--blue) 22%, transparent), transparent 70%);
  filter: blur(20px); }
.agent { display: inline-flex; align-items: center; gap: 10px; margin: 0 0 18px; padding: 6px 14px 6px 6px; border-radius: var(--r-pill);
  background: var(--fill-1); font-size: 14px; font-weight: 500; color: var(--text-2); font-variant-numeric: tabular-nums; max-width: 100%; }
#agent-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-title { font-size: clamp(44px, 6.2vw, 92px); }
.ww { display: inline-block; white-space: pre; }
.roll-slot { position: relative; display: inline-block; height: 1.02em; vertical-align: bottom; overflow: hidden; color: var(--green-text); cursor: pointer; }
.wr-word { position: absolute; left: 0; top: 0; white-space: nowrap; }
.wr-ch { display: inline-block; will-change: transform, opacity; }
.hero .lead { margin-top: 18px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.pill-btn.big { height: 56px; padding: 0 24px; font-size: 16px; }

.fan { position: relative; height: 380px; display: grid; place-items: center; }
.fan-card { position: absolute; width: 210px; padding: 8px; border-radius: 26px; background: var(--surface); cursor: pointer;
  transform-origin: 50% 120%; will-change: transform; box-shadow: 0 30px 60px -30px rgba(0,0,0,.6); border: 0; text-align: left; color: var(--text); }
.fan-card img { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 19px; background: var(--fill-1); }
.fan-card .fc-b { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; padding: 10px 6px 4px; }
.fan-card b { font: 600 18px var(--display); letter-spacing: -.03em; }
.fan-card span { font-size: 13px; font-weight: 600; color: var(--green-text); font-variant-numeric: tabular-nums; }
.fan-card .fc-n { position: absolute; top: 16px; left: 16px; height: 24px; padding: 0 9px; border-radius: var(--r-pill); display: inline-flex; align-items: center;
  background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); color: var(--text); font-size: 12px; }

/* ---------- Баннеры (карусель с растягивающейся точкой) ---------- */
.banners { position: relative; margin: 0 0 26px; }
.b-track { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; border-radius: 30px; }
.b-track::-webkit-scrollbar { display: none; }
.banner { position: relative; flex: 0 0 min(760px, 72%); min-height: 250px; padding: 30px 32px; border-radius: 30px; scroll-snap-align: start;
  overflow: hidden; isolation: isolate; display: flex; flex-direction: column; justify-content: space-between; gap: 18px; color: #fff; }
.banner h3 { margin: 0; font: 700 clamp(28px, 3vw, 40px)/1.02 var(--display); letter-spacing: -.04em; max-width: 15ch; }
.banner p { margin: 10px 0 0; max-width: 42ch; font-size: 15px; line-height: 1.45; opacity: .86; }
.banner .b-kick { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; opacity: .8; }
.banner .b-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.banner .pill-btn { background: rgba(255,255,255,.2); color: #fff; backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.banner .pill-btn.inverse { background: #fff; color: #000; }
.banner .giant { position: absolute; right: -10px; bottom: -48px; z-index: -1; font: 800 220px/1 var(--display); letter-spacing: -.07em; opacity: .16; white-space: nowrap; pointer-events: none; }
.b-free { background: radial-gradient(120% 140% at 100% 0%, #5af0a0 0%, #18a85c 40%, #0b5d35 100%); }
.b-pro { background: radial-gradient(120% 140% at 100% 100%, #c69bff 0%, #6b4cf6 45%, #22186b 100%); }
.b-cargo { background: radial-gradient(120% 140% at 100% 0%, #ffc85a 0%, #ff8a1f 45%, #8a3b06 100%); }
.b-collect { background: radial-gradient(120% 140% at 0% 100%, #6fdcff 0%, #1d84d8 45%, #0b2f66 100%); }
.b-hit { background: var(--surface); color: var(--text); flex-direction: row; align-items: stretch; padding: 12px 12px 12px 32px; }
.b-hit .b-col { display: flex; flex-direction: column; justify-content: space-between; gap: 14px; padding: 18px 0; min-width: 0; flex: 1; }
.b-hit .pill-btn { background: var(--fill-2); color: var(--text); }
.b-hit .pill-btn.inverse { background: var(--inverse); color: var(--on-inverse); }
.b-hit .b-num { font: 700 44px/1 var(--display); letter-spacing: -.045em; color: var(--green-text); font-variant-numeric: tabular-nums; }
.b-hit .b-num small { display: block; margin-top: 6px; font: 500 13px var(--font); letter-spacing: 0; color: var(--muted); }
.tilt-stage { flex: 0 0 42%; perspective: 900px; display: grid; }
.tilt { position: relative; border-radius: 22px; overflow: hidden; transform-style: preserve-3d; will-change: transform; background: var(--fill-1); }
.tilt img { width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(1.12); }
.glare { position: absolute; inset: 0; pointer-events: none; opacity: var(--g, .25);
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 30%), rgba(255,255,255,.45), transparent 55%); mix-blend-mode: soft-light; }
.chips-row { display: flex; flex-wrap: wrap; gap: 6px; }
.chips-row span { height: 30px; padding: 0 12px; border-radius: var(--r-pill); display: inline-flex; align-items: center; background: rgba(255,255,255,.16); font-size: 13px; font-weight: 600; }
.b-dots { position: relative; display: flex; justify-content: center; gap: 0; margin: 14px auto 0; width: max-content; padding: 4px; border-radius: var(--r-pill); background: var(--card); }
.b-dots button { position: relative; z-index: 1; width: 26px; height: 22px; border: 0; background: none; display: grid; place-items: center; padding: 0; }
.b-dots button::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--muted); opacity: .6; transition: opacity .3s; }
.b-dots button[aria-selected="true"]::before { opacity: 0; }
.b-pill { position: absolute; left: 0; top: 11px; height: 8px; border-radius: 4px; background: var(--text); }
.b-dots .b-pill { top: 11px; bottom: auto; }

/* ---------- Замок: дальше витрины по тарифу ---------- */
.lock-more { position: relative; margin-top: 14px; border-radius: 30px; overflow: hidden; }
.lock-more .grid { filter: blur(14px) saturate(.6); opacity: .55; pointer-events: none; user-select: none; max-height: 420px; overflow: hidden; }
.lock-cta { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; text-align: center; padding: 24px;
  background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--stage) 70%, transparent) 40%); }
.lock-cta b { font: 700 clamp(28px, 3.4vw, 44px)/1.05 var(--display); letter-spacing: -.04em; }
.lock-cta span { color: var(--text-2); max-width: 440px; }
.lock-ico { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--inverse); color: var(--on-inverse); }
.locked-badge { display: inline-flex; align-items: center; gap: 6px; }
.locked-badge::before { content: ""; width: 12px; height: 12px; flex: none;
  background: currentColor; -webkit-mask: var(--lock-svg) center / contain no-repeat; mask: var(--lock-svg) center / contain no-repeat; }
:root { --lock-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 10V8a5 5 0 0 1 10 0v2h1a1 1 0 0 1 1 1v9a1 1 0 0 1-1 1H6a1 1 0 0 1-1-1v-9a1 1 0 0 1 1-1h1Zm2 0h6V8a3 3 0 0 0-6 0v2Z'/%3E%3C/svg%3E"); }
.locked-box { position: relative; padding: 16px; border-radius: var(--r-tile); background: var(--fill-1); display: grid; gap: 8px; justify-items: start; }
.locked-box .spark { filter: blur(6px); opacity: .5; }

/* ---------- Тарифы ---------- */
#tab-plans.active { display: block; }
.plans-head { text-align: center; display: grid; justify-items: center; margin: 10px 0 34px; }
.plans-head .lead { margin-left: auto; margin-right: auto; }
.seg.period { margin-top: 24px; }
.seg.period small { color: var(--green-text); opacity: 1; font-weight: 600; }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; align-items: stretch; max-width: 1180px; margin: 0 auto; }
.plan { position: relative; padding: 28px; border-radius: 32px; background: var(--card); display: flex; flex-direction: column; gap: 18px; overflow: hidden; isolation: isolate; }
.plan.featured { background: var(--inverse); color: var(--on-inverse); --muted: color-mix(in srgb, var(--on-inverse) 55%, transparent); --fill-1: color-mix(in srgb, var(--on-inverse) 7%, transparent); --fill-2: color-mix(in srgb, var(--on-inverse) 11%, transparent); }
.plan.featured::before { content: ""; position: absolute; inset: -40% -40% auto auto; width: 80%; aspect-ratio: 1; border-radius: 50%; z-index: -1;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--green) 45%, transparent), transparent); filter: blur(30px); opacity: .55; }
.plan-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.plan h3 { margin: 0; font: 700 26px var(--display); letter-spacing: -.03em; }
.plan .p-tag { font-size: 13px; color: var(--muted); }
.plan .p-badge { height: 26px; padding: 0 10px; border-radius: var(--r-pill); display: inline-flex; align-items: center; font-size: 12px; font-weight: 700; background: var(--green); color: var(--on-green); }
.p-price { display: flex; align-items: baseline; gap: 6px; font: 700 52px/1 var(--display); letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.p-price small { font: 500 15px var(--font); letter-spacing: 0; color: var(--muted); }
.p-sub { margin-top: -10px; font-size: 13px; color: var(--muted); min-height: 18px; }
.perks { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; font-size: 14px; }
.perks li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; }
.perks svg { width: 22px; height: 22px; padding: 4px; border-radius: 50%; background: var(--fill-2); }
.perks path { fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 22; stroke-dashoffset: 22; }
.panel.active .perks path { animation: draw .5s var(--ease) forwards; animation-delay: calc(var(--i) * 60ms + 250ms); }
@keyframes draw { to { stroke-dashoffset: 0; } }
.perks .soon { color: var(--muted); }
.perks .soon em { font-style: normal; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin-left: 4px; }
.plan .p-foot { margin-top: auto; }

/* Hold to confirm */
.hold-btn { position: relative; width: 100%; height: 56px; border: 0; border-radius: var(--r-pill); overflow: hidden; isolation: isolate;
  background: var(--fill-2); color: var(--text); font-size: 15px; font-weight: 600; touch-action: none; user-select: none; -webkit-user-select: none; }
.plan.featured .hold-btn { background: var(--on-inverse); color: var(--inverse); }
.hold-fill { position: absolute; inset: 0; z-index: -1; transform-origin: left; transform: scaleX(0); background: var(--green); }
.hold-btn .h-lbl, .hold-btn .h-load, .hold-btn .h-ok { position: absolute; inset: 0; display: grid; place-items: center; transition: opacity .25s, transform .35s var(--ease); }
.hold-btn .h-load, .hold-btn .h-ok { opacity: 0; transform: translateY(60%); }
.hold-btn.holding .h-lbl { color: var(--on-green); }
.hold-btn.loading .h-lbl, .hold-btn.success .h-lbl { opacity: 0; transform: translateY(-60%); }
.hold-btn.loading .h-load { opacity: 1; transform: none; }
.hold-btn.success .h-ok { opacity: 1; transform: none; }
.hold-btn.loading, .hold-btn.success { background: var(--green); color: var(--on-green); }
.h-load i { display: inline-block; width: 7px; height: 7px; margin: 0 3px; border-radius: 50%; background: currentColor; animation: dot 1s var(--ease) infinite; }
.h-load i:nth-child(2) { animation-delay: .12s; } .h-load i:nth-child(3) { animation-delay: .24s; }
@keyframes dot { 0%, 100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-6px); opacity: 1; } }
.h-ok path { fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 22; stroke-dashoffset: 22; }
.hold-btn.success .h-ok path { animation: draw .45s var(--ease) .1s forwards; }
.current-btn { width: 100%; height: 56px; border-radius: var(--r-pill); display: grid; place-items: center; background: var(--fill-1); color: var(--muted); font-weight: 600; font-size: 15px; }
.hold-hint { margin: 8px 0 0; text-align: center; font-size: 12px; color: var(--muted); }

/* Карта-пропуск (Parallax ticket) */
.pass-row { display: grid; grid-template-columns: auto minmax(0, 420px); justify-content: center; align-items: center; gap: 40px; margin: 56px auto 10px; max-width: 1180px; }
.pass-copy h2 { margin: 0 0 10px; font: 700 34px var(--display); letter-spacing: -.04em; }
.pass-copy .note { margin-top: 16px; }
.pass-stage { perspective: 1100px; padding: 20px; }
.pass { position: relative; width: min(400px, calc(100vw - 72px)); aspect-ratio: 1.586; border-radius: 26px; transform-style: preserve-3d; cursor: pointer; will-change: transform; }
.pass-face { position: absolute; inset: 0; border-radius: inherit; overflow: hidden; backface-visibility: hidden; -webkit-backface-visibility: hidden; padding: 24px; color: #fff; display: flex; flex-direction: column; justify-content: space-between; }
.pass-face.back { transform: rotateY(180deg); background: #111; gap: 10px; justify-content: flex-start; }
.pass[data-plan="start"] .front { background: radial-gradient(130% 120% at 0% 0%, #4a4a4f, #1b1b1d 55%, #0b0b0c); }
.pass[data-plan="pro"] .front { background: radial-gradient(130% 130% at 100% 0%, #5af0a0, #19a5a0 45%, #0d3a66 100%); }
.pass[data-plan="business"] .front { background: radial-gradient(130% 130% at 100% 0%, #ffd23f, #ff7a59 40%, #6b2fd0 100%); }
.pass .layer { position: relative; }
.pass .pf-top { display: flex; justify-content: space-between; align-items: center; }
.pass .pf-brand { font: 700 15px var(--display); letter-spacing: .02em; display: flex; align-items: center; gap: 8px; }
.pass .pf-plan { font: 800 56px/1 var(--display); letter-spacing: -.05em; }
.pass .pf-meta { display: flex; justify-content: space-between; font-size: 12px; opacity: .8; font-variant-numeric: tabular-nums; }
.pass .pf-chip { width: 44px; height: 32px; border-radius: 8px; background: linear-gradient(135deg, #f6e3a1, #b9974a); opacity: .9; }
.pass .orb { width: 34px; height: 34px; }
.pass .glare { mix-blend-mode: overlay; }
.pass-face.back h4 { margin: 0 0 6px; font-size: 13px; opacity: .7; font-weight: 500; }
.use { display: grid; gap: 5px; font-size: 13px; }
.use div { display: flex; justify-content: space-between; }
.use .bar { height: 6px; border-radius: 3px; background: rgba(255,255,255,.14); overflow: hidden; }
.use .bar i { display: block; height: 100%; border-radius: 3px; background: var(--green); transform-origin: left; }
.use .bar i.full { background: var(--orange); }

/* Окно «это в Про» */
.paywall-box { text-align: center; justify-items: center; }
.paywall-box .orb { width: 64px; height: 64px; }
.paywall-box .orb b { filter: blur(10px); }
.paywall-box h2 { font-size: 30px; }
.paywall-box p { margin: 0; color: var(--text-2); }
.paywall-box .pw-actions { display: grid; gap: 8px; width: 100%; }

.fly-dot { position: fixed; width: 8px; height: 8px; z-index: 90; }

@media (max-width: 1100px) {
  .hero { grid-template-columns: 1fr; }
  .fan { height: 300px; }
  .plans { grid-template-columns: 1fr; max-width: 520px; }
  .pass-row { grid-template-columns: 1fr; justify-items: center; text-align: center; }
}
@media (max-width: 720px) {
  .hero { padding: 26px 20px 10px; border-radius: 28px; margin-top: 0; }
  .hero-title { font-size: 44px; }
  .hero-cta .cta { width: 100%; }
  .hero-cta .pill-btn.big { width: 100%; height: 50px; }
  .fan { height: 260px; }
  .fan-card { width: 150px; border-radius: 20px; padding: 6px; }
  .fan-card img { border-radius: 15px; }
  .fan-card b { font-size: 15px; }
  .banner { flex-basis: 88%; min-height: 230px; padding: 24px; }
  .banner .giant { font-size: 150px; bottom: -30px; }
  .b-hit { flex-direction: column-reverse; padding: 10px; }
  .b-hit .b-col { padding: 6px 12px 12px; }
  .tilt-stage { flex-basis: 160px; }
  .island-end #theme-btn { display: none; }
  .plan-chip { padding: 0 10px 0 9px; height: 36px; }
  .plan-chip span { display: none; }
  .p-price { font-size: 44px; }
  .pass-stage { padding: 10px 0; }
}
@media (prefers-reduced-motion: reduce) {
  .orb b { animation: none; }
  .rl { transition: none; }
}
.b-hit h3 { font-size: clamp(22px, 2vw, 28px); line-height: 1.1; max-width: 24ch; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.p-price { align-items: flex-end; }
.p-price small { margin-bottom: .5em; white-space: nowrap; }
.p-sub { margin-top: 8px; }
.lock-ico svg { display: block; }

/* ---------- вход и аккаунт ---------- */
.help.auth { background: var(--stage); z-index: 80; }
.auth-box { text-align: left; justify-items: stretch; }
.auth-box .orb, .auth-box h2, .auth-box > p { justify-self: center; text-align: center; }
.auth-field { display: grid; gap: 6px; font-size: 13px; color: var(--muted); }
.auth-field[hidden] { display: none; }
.auth-field input { width: 100%; height: 48px; border: 0; outline: 0; border-radius: var(--r-row); background: var(--fill-1); padding: 0 14px; color: var(--text); font: 500 16px var(--font); }
.auth-field input:focus { background: var(--fill-2); box-shadow: inset 0 0 0 1.5px var(--text-2); }
.auth-err { min-height: 1.3em; margin: -6px 0 0; color: var(--orange); font-size: 13px; text-align: center; }
.auth-err:empty { min-height: 0; margin: 0; }
.auth-box .pill-btn[hidden] { display: none; }
.acct-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 48px; padding: 0 14px; border-radius: var(--r-row); background: var(--fill-1); font-size: 14px; color: var(--text-2); }
.acct-row b { color: var(--text); font-weight: 600; overflow-wrap: anywhere; text-align: right; }
.acct > .pill-btn { justify-self: start; }
