/* Витрина в стиле Apple: системный шрифт, материалы (стекло), сгруппированные списки, шторки.
   Цвета приходят из админки как переменные --bg, --surface, --accent… (templates/_theme.html),
   там же color-scheme: light или dark — от него зависят light-dark() ниже (light-dark принимает только цвета, не числа). */

:root {
  --bg: #000000; --surface: #1c1c1e; --surface-2: #2c2c2e; --line: #38383a;
  --text: #ffffff; --muted: #8e8e93; --accent: #fa2d48; --accent-2: #ff4f66; --accent-ink: #ffffff;
  color-scheme: dark;

  /* системный шрифт: на Apple-устройствах это SF Pro с оптическими размерами */
  --ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: var(--display);   /* старое имя — им пользуется админка */

  /* заливки элементов управления — как systemFill у iOS: полупрозрачный цвет текста */
  --fill: color-mix(in srgb, var(--text) 9%, transparent);
  --fill-2: color-mix(in srgb, var(--text) 15%, transparent);
  --fill-3: color-mix(in srgb, var(--text) 22%, transparent);
  --tint: color-mix(in srgb, var(--accent) 16%, transparent);
  --tint-2: color-mix(in srgb, var(--accent) 24%, transparent);
  --sel: var(--tint);
  --ok: light-dark(#248a3d, #30d158);
  --warn: light-dark(#b25000, #ff9f0a);

  /* материалы: стекло для панелей поверх контента */
  --glass: color-mix(in srgb, var(--surface) 66%, transparent);
  --glass-thick: color-mix(in srgb, var(--surface) 82%, transparent);
  --glass-blur: blur(24px) saturate(180%);
  --edge: inset 0 1px 0 light-dark(rgba(255,255,255,.7), rgba(255,255,255,.12)), inset 0 0 0 .5px light-dark(rgba(255,255,255,.5), rgba(255,255,255,.09));
  --float: 0 12px 32px -10px light-dark(rgba(0,0,0,.18), rgba(0,0,0,.55)), 0 2px 8px light-dark(rgba(0,0,0,.06), rgba(0,0,0,.25));
  --thumb: light-dark(#ffffff, #636366);

  --r-card: 22px; --r-art: 16px; --r-ctl: 12px; --r-group: 14px; --r-sheet: 32px;
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --tab-h: 62px;
  --gutter: 16px;
}

/* ------------------------------------------------------------ основа */
*, *::before, *::after { box-sizing: border-box; }
html { scrollbar-gutter: stable; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); -webkit-tap-highlight-color: transparent; }
body {
  margin: 0; min-height: 100dvh; color: var(--text); background: var(--bg);
  font: 400 17px/1.47 var(--ui); letter-spacing: -.012em;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  padding-bottom: calc(var(--tab-h) + 28px + env(safe-area-inset-bottom, 0px));
}
a { color: var(--accent); text-decoration: none; }
h1, h2, h3 { margin: 0; font-family: var(--display); }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; }
button, a, [role="button"], .card { touch-action: manipulation; }
button, [role="button"], .tab, .chip, .filter-btn, .tag, .seg-btn, .grabber { -webkit-user-select: none; user-select: none; }
svg { display: block; }
img { -webkit-user-drag: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 var(--gutter); }
.num, .price-btn, .gm-price, .pr-field input { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------ кнопки и поля */
/* Нажатие видно сразу, на касание (а не на отпускание) — :active срабатывает на pointer-down */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 22px;
  border-radius: 999px; border: 0; font: 600 17px/1.2 var(--ui); letter-spacing: -.02em; white-space: nowrap;
  text-decoration: none; transition: transform 160ms var(--ease-out), opacity 160ms var(--ease-out), background-color 200ms ease;
}
.btn:active { transform: scale(.97); opacity: .85; transition-duration: 80ms; }
.btn:disabled { opacity: .45; cursor: default; transform: none; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-ghost { background: var(--fill); color: var(--text); }
.btn-tinted { background: var(--tint); color: var(--accent); }
.btn-sm { min-height: 36px; padding: 0 16px; font-size: 15px; }
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, var(--text)); }
  .btn-ghost:hover { background: var(--fill-2); }
}

.input {
  width: 100%; height: 44px; padding: 0 14px; border-radius: var(--r-ctl); border: 0;
  background: var(--fill); color: var(--text); outline: none; font-size: 17px; caret-color: var(--accent);
  transition: background-color 200ms ease, box-shadow 200ms ease;
}
.input::placeholder { color: var(--muted); opacity: 1; }
.input:focus { box-shadow: 0 0 0 3px var(--tint-2); }
input[type="search"]::-webkit-search-cancel-button { -webkit-appearance: none; }

/* круглая кнопка «закрыть» — как xmark.circle.fill */
.x-btn {
  flex: none; width: 30px; height: 30px; border-radius: 50%; border: 0; padding: 0; display: grid; place-items: center;
  background: var(--fill); color: var(--muted); transition: transform 120ms var(--ease-out);
}
.x-btn:active { transform: scale(.9); }
.x-btn svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; }

/* ------------------------------------------------------------ панель навигации */
/* Наверху страницы панель прозрачная; как только контент уходит под неё — появляется стекло
   и мягкая граница (scroll edge), а не жёсткая линия. */
.navbar {
  position: sticky; top: 0; z-index: 40;
  padding-top: env(safe-area-inset-top, 0px);
  transition: background-color 250ms ease, box-shadow 250ms ease;
}
.navbar::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity 250ms ease;
  background: var(--glass-thick); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  box-shadow: 0 .5px 0 color-mix(in srgb, var(--line) 80%, transparent);
}
.navbar.scrolled::before { opacity: 1; }
.navbar-in { display: flex; align-items: center; gap: 12px; height: 56px; max-width: 1280px; margin: 0 auto; padding: 0 var(--gutter); }

.brand {
  display: inline-flex; align-items: center; gap: 10px; min-width: 0; padding: 4px 12px 4px 4px; border-radius: 999px;
  color: var(--text); text-decoration: none; transition: transform 160ms var(--ease-out), background-color 200ms ease;
}
.brand:active { transform: scale(.97); }
.brand-ava { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex: none; background: var(--fill); }
.brand-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.brand-name { display: inline-flex; align-items: center; gap: 4px; min-width: 0; font: 600 15px/1.25 var(--ui); letter-spacing: -.015em; }
.brand-nick { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-check { width: 16px; height: 16px; flex: none; }
.brand-check .bc-seal { fill: var(--accent); }
.brand-check .bc-tick { fill: none; stroke: var(--accent-ink); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.brand-meta { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); font-weight: 500; letter-spacing: 0; white-space: nowrap; }
.brand-meta b { color: var(--text); font-weight: 600; }
.bm-star { width: 12px; height: 12px; fill: #ff9f0a; }
.bm-bubble { display: none; }
.bm-sep { width: 3px; height: 3px; border-radius: 50%; background: var(--muted); margin: 0 3px; }
@media (hover: hover) and (pointer: fine) { .brand:hover { background: var(--fill); } }
.topnav { display: none; }

/* ------------------------------------------------------------ большой заголовок и подсказки */
.hero { max-width: 1280px; margin: 0 auto; padding: 4px var(--gutter) 0; }
.large-title { font: 700 34px/1.2 var(--display); letter-spacing: -.012em; margin: 2px 0 14px; }

/* Подсказка в духе TipKit: скруглённая плашка, значок цветом акцента */
.trust { display: flex; align-items: flex-start; gap: 12px; margin: 0 0 16px; padding: 14px 16px;
  border-radius: 18px; background: var(--surface); }
.trust-ico { width: 30px; height: 30px; flex: none; }
.trust-ico .ti-shield { fill: var(--accent); }
.trust-ico .ti-tick { fill: none; stroke: var(--accent-ink); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.trust p { margin: 0; font-size: 14px; line-height: 1.4; letter-spacing: -.005em; color: var(--muted); }
.trust b { display: block; color: var(--text); font-weight: 600; font-size: 15px; margin-bottom: 2px; }
.pause-note, .demo-note { margin: -4px 0 16px; padding: 12px 16px; border-radius: 16px; font-size: 14px; line-height: 1.4; }
.pause-note { color: var(--text); background: color-mix(in srgb, var(--warn) 16%, var(--surface)); }
.pause-note b { font-weight: 600; color: var(--warn); }
.demo-note { color: var(--muted); background: var(--surface); }

/* ------------------------------------------------------------ поиск и фильтры */
.controls { margin-bottom: 16px; }
.searchrow { display: grid; grid-template-columns: minmax(0, 1fr) 40px 40px; gap: 8px; align-items: center; }
.search { position: relative; display: block; }
.search > svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px;
  fill: none; stroke: var(--muted); stroke-width: 2.3; stroke-linecap: round; pointer-events: none; }
.search .input { height: 40px; padding-left: 36px; padding-right: 36px; border-radius: 12px; font-size: 17px; }
.search-clear { position: absolute; right: 8px; top: 0; bottom: 0; margin: auto 0; width: 20px; height: 20px; border-radius: 50%;
  border: 0; padding: 0; display: grid; place-items: center; background: var(--muted); color: var(--bg); }
.search-clear svg { width: 9px; height: 9px; fill: none; stroke: currentColor; stroke-width: 3.4; stroke-linecap: round; }
.icon-btn { position: relative; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--fill);
  display: grid; place-items: center; padding: 0; color: var(--accent); transition: transform 140ms var(--ease-out), background-color 200ms ease; }
.icon-btn:active { transform: scale(.9); }
.icon-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.icon-btn[aria-pressed="true"] svg { fill: currentColor; }
.badge:empty { display: none; }
.badge { position: absolute; top: -4px; right: -4px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--accent); color: var(--accent-ink); font: 600 11px/18px var(--ui); letter-spacing: 0; font-style: normal; text-align: center;
  box-shadow: 0 0 0 2px var(--bg); }
.icon-btn[aria-pressed="true"] .badge { background: var(--text); color: var(--bg); }
.icon-btn .dot { position: absolute; top: 6px; right: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--bg); }
@media (hover: hover) and (pointer: fine) { .icon-btn:hover { background: var(--fill-2); } .icon-btn[aria-pressed="true"]:hover { background: var(--accent); } }

/* подсказки поиска — всплывающее меню */
.suggest { position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 30; margin: 0; padding: 6px; list-style: none;
  background: var(--glass-thick); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  border-radius: 16px; box-shadow: var(--edge), var(--float); transform-origin: top center; animation: pop-in 180ms var(--ease-out); }
.suggest li { display: flex; align-items: center; gap: 12px; padding: 7px 10px; border-radius: 10px; cursor: pointer; }
.suggest li[aria-selected="true"] { background: var(--fill); }
@media (hover: hover) and (pointer: fine) { .suggest li:hover { background: var(--fill); } }
.suggest img, .suggest .sg-ph { width: 38px; height: 38px; border-radius: 9px; object-fit: contain; padding: 2px; flex: none; background: var(--fill); }
.sg-txt { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.sg-txt b { font-weight: 500; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-txt span { font-size: 13px; color: var(--muted); letter-spacing: 0; }
.sg-pr { margin-left: auto; font-size: 13px; color: var(--muted); white-space: nowrap; letter-spacing: 0; }

/* фильтры — капсулы-меню в одну строку с прокруткой */
.filterrow { display: flex; gap: 8px; margin: 12px calc(var(--gutter) * -1) 0; padding: 0 var(--gutter);
  overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain; scroll-padding: 0 var(--gutter); }
.filterrow::-webkit-scrollbar { display: none; }
.filter-btn { flex: none; display: inline-flex; align-items: center; gap: 6px; max-width: 220px; height: 34px; padding: 0 12px 0 14px;
  border-radius: 999px; border: 0; background: var(--fill); font: 500 15px/1 var(--ui); letter-spacing: -.01em;
  transition: transform 140ms var(--ease-out), background-color 200ms ease, color 200ms ease; }
.filter-btn:active { transform: scale(.95); }
.filter-btn.on { background: var(--tint); color: var(--accent); }
.fb-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fb-n:empty { display: none; }
.fb-n { flex: none; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--accent-ink);
  font: 600 11px/18px var(--ui); letter-spacing: 0; font-style: normal; text-align: center; }
.fb-chev { flex: none; width: 13px; height: 13px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; opacity: .55; }
.fb-lead { flex: none; width: 20px; height: 20px; margin-left: -6px; border-radius: 6px; object-fit: contain; }
.fb-lead.round { border-radius: 50%; }
@media (hover: hover) and (pointer: fine) { .filter-btn:hover { background: var(--fill-2); } .filter-btn.on:hover { background: var(--tint-2); } }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.chips:empty { display: none; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 6px 0 12px; border-radius: 999px; border: 0;
  background: var(--tint); color: var(--accent); font: 500 14px/1 var(--ui); letter-spacing: -.01em;
  transition: transform 140ms var(--ease-out); }
.chip:active { transform: scale(.95); }
.chip i { width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; background: var(--tint-2); }
.chip i svg { width: 8px; height: 8px; fill: none; stroke: currentColor; stroke-width: 3.4; stroke-linecap: round; }
.chip-reset { padding: 0 12px; background: none; color: var(--accent); }

/* ------------------------------------------------------------ сетка и карточки */
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.card { position: relative; display: flex; flex-direction: column; min-width: 0; padding: 8px; border-radius: var(--r-card);
  background: var(--surface); cursor: pointer;
  transition: transform 200ms var(--ease-out), box-shadow 250ms ease, background-color 250ms ease; }
.card:active { transform: scale(.97); transition-duration: 100ms; }
.art { position: relative; aspect-ratio: 1; border-radius: var(--r-art); overflow: hidden; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 45%, var(--c1, #3a3a3c), var(--c2, #1c1c1e) 82%); isolation: isolate; }
/* узор: значки-маски, залитые цветом узора фона */
.art .pat { position: absolute; inset: 0; opacity: 0; transition: opacity 300ms ease; pointer-events: none; }
.art .pat.on { opacity: 1; }
.art .pat i { position: absolute; transform: translate(-50%, -50%); background: var(--cp, rgba(0,0,0,.45));
  -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  -webkit-mask-position: center; mask-position: center; }
/* модель — по центру, без фона */
.art img.model, .art .lottie { position: absolute; left: 50%; top: 50%; width: 70%; height: 70%; transform: translate(-50%, -50%);
  object-fit: contain; -webkit-touch-callout: none; user-select: none; }
.art img.model { opacity: 0; transition: opacity 300ms ease, transform 400ms var(--ease-out); filter: drop-shadow(0 8px 14px rgba(0,0,0,.28)); }
.art.ready img.model { opacity: 1; }
.art.animated img.model { visibility: hidden; }
/* запасной вариант — готовая картинка Fragment на всю карточку, свой узор не нужен */
.art.full .pat { display: none; }
.art.full img.model { left: 0; top: 0; width: 100%; height: 100%; transform: none; object-fit: cover; filter: none; }
.art .ph { width: 40%; opacity: .8; fill: none; stroke: rgba(255,255,255,.85); stroke-width: 3.2; stroke-linejoin: round; stroke-linecap: round; }
.art .lottie svg { width: 100% !important; height: 100% !important; }
.art .lottie.scene { left: 0; top: 0; width: 100%; height: 100%; transform: none; }

/* «В избранное» — стеклянная кнопка поверх картинки */
.fav-btn { position: absolute; top: 14px; right: 14px; z-index: 2; width: 32px; height: 32px; border-radius: 50%; border: 0; padding: 0;
  display: grid; place-items: center; color: #fff; background: rgba(0,0,0,.28);
  -webkit-backdrop-filter: blur(12px) saturate(160%); backdrop-filter: blur(12px) saturate(160%);
  box-shadow: inset 0 0 0 .5px rgba(255,255,255,.18); transition: background-color 200ms ease; }
.fav-btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; will-change: transform; }
.fav-btn[aria-pressed="true"] { color: #fff; background: color-mix(in srgb, var(--accent) 85%, transparent); }
.fav-btn[aria-pressed="true"] svg { fill: currentColor; }

.card-body { display: flex; flex-direction: column; flex: 1; min-width: 0; padding: 10px 6px 2px; }
.c-title { display: flex; align-items: baseline; gap: 5px; min-width: 0; font: 600 15px/1.3 var(--ui); letter-spacing: -.015em; }
.c-title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-title small { flex: none; color: var(--muted); font-weight: 400; font-size: 13px; letter-spacing: 0; }
.c-attr { display: flex; align-items: center; gap: 6px; min-width: 0; margin-top: 1px; color: var(--muted); font-size: 13px; line-height: 1.35; letter-spacing: -.005em; }
.c-attr span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.c-attr .sw { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--c1); box-shadow: inset 0 0 0 .5px rgba(255,255,255,.3); }
/* цена — сама кнопка покупки, как в App Store */
.price-btn { display: flex; align-items: center; justify-content: center; width: 100%; height: 36px; margin-top: auto; padding: 0 10px;
  border: 0; border-radius: 999px; background: var(--tint); color: var(--accent); font: 600 15px/1 var(--ui); letter-spacing: -.01em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: transform 120ms var(--ease-out), background-color 200ms ease; }
.price-btn:active { transform: scale(.95); }
.price-btn.na { color: var(--muted); background: var(--fill); }
.card-body > :nth-last-child(2) { margin-bottom: 10px; }   /* отступ над кнопкой-ценой; сама кнопка прижата к низу */
.card .price, .price { margin: 8px 0; font: 600 20px/1.1 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.card .btn { margin-top: auto; min-height: 36px; width: 100%; font-size: 15px; }
@media (hover: hover) and (pointer: fine) {
  .card:hover { background: color-mix(in srgb, var(--surface) 92%, var(--text)); box-shadow: var(--float); transform: translateY(-2px); }
  .card:hover .art img.model { transform: translate(-50%, -50%) scale(1.06); }
  .card:hover .art.full img.model { transform: scale(1.04); }
  .card:active { transform: scale(.98); }
  .price-btn:hover { background: var(--tint-2); }
}

.skeleton { border-radius: var(--r-card); aspect-ratio: .72; background: var(--surface); position: relative; overflow: hidden; }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, var(--fill), transparent); animation: shimmer 1.4s ease-in-out infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }

/* пустое состояние — как ContentUnavailableView */
.empty { margin: 24px 0; padding: 40px 20px; text-align: center; color: var(--muted); font-size: 15px; line-height: 1.4; }
.empty b { display: block; color: var(--text); font: 700 22px/1.25 var(--display); letter-spacing: -.02em; margin-bottom: 6px; }
.empty .btn { margin-top: 18px; min-height: 44px; }
/* индикатор загрузки — вращающиеся «спицы», как у iOS */
.more { display: flex; justify-content: center; padding: 26px; }
.more span { display: none; }
.more::before { content: ""; width: 22px; height: 22px; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 12%, var(--muted) 100%);
  -webkit-mask: radial-gradient(circle, transparent 55%, #000 57%); mask: radial-gradient(circle, transparent 55%, #000 57%);
  animation: spin .8s steps(12) infinite; }

/* ------------------------------------------------------------ юзернеймы */
.u-art { background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--accent) 55%, var(--surface-2)), var(--surface-2) 82%); }
.u-plate { max-width: 86%; padding: 8px 14px; border-radius: 12px; color: #fff;
  background: rgba(0,0,0,.28); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); box-shadow: inset 0 0 0 .5px rgba(255,255,255,.2);
  font: 600 15px/1.15 var(--ui); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; letter-spacing: -.01em; }
.u-plate em { font-style: normal; color: var(--accent-2); }
.u-art-lg .u-plate { font-size: 22px; padding: 12px 18px; white-space: normal; word-break: break-all; text-align: center; }
.c-domain { color: var(--muted); font-size: 13px; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* сегментированный контрол: бегунок едет пружиной (site.js) */
.seg { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.seg-label { flex: none; color: var(--muted); font-size: 15px; }
.seg-track { position: relative; flex: 1; display: flex; min-width: 0; padding: 2px; border-radius: 10px; background: var(--fill); isolation: isolate; }
.seg-thumb { position: absolute; top: 2px; bottom: 2px; left: 0; width: 0; border-radius: 8px; z-index: -1;
  background: var(--thumb); box-shadow: 0 3px 8px rgba(0,0,0,.12), 0 3px 1px rgba(0,0,0,.04), inset 0 0 0 .5px rgba(0,0,0,.04); will-change: transform; }
.seg-track:not(.js) .seg-btn[aria-pressed="true"] { background: var(--thumb); }
.seg-btn { position: relative; flex: 1 1 0; min-width: 0; height: 30px; padding: 0; border: 0; border-radius: 8px; background: none;
  color: var(--text); font: 500 14px/1 var(--ui); letter-spacing: -.01em; transition: font-weight 150ms; }
.seg-btn[aria-pressed="true"] { font-weight: 600; }
.type-row { display: flex; gap: 8px; margin: 12px calc(var(--gutter) * -1) 0; padding: 0 var(--gutter); overflow-x: auto; scrollbar-width: none; }
.type-row::-webkit-scrollbar { display: none; }
.tag { flex: none; height: 34px; padding: 0 14px; border-radius: 999px; border: 0; background: var(--fill); font: 500 15px/1 var(--ui);
  letter-spacing: -.01em; color: var(--text); transition: transform 140ms var(--ease-out), background-color 200ms ease, color 200ms ease; }
.tag:active { transform: scale(.95); }
.tag[aria-pressed="true"] { background: var(--tint); color: var(--accent); }

/* ------------------------------------------------------------ шторки (site.js двигает их пружиной и пальцем) */
.sheet, .modal { position: fixed; inset: 0; z-index: 60; }
.sheet-backdrop, .modal-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .4); background: light-dark(rgba(0,0,0,.28), rgba(0,0,0,.48)); opacity: 0; will-change: opacity; }
.sheet-panel, .modal-card {
  position: absolute; left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  max-height: calc(100dvh - 56px - env(safe-area-inset-top, 0px));
  display: flex; flex-direction: column; gap: 14px; padding: 8px 16px 16px; border-radius: var(--r-sheet);
  background: var(--surface); box-shadow: var(--edge), 0 -8px 40px light-dark(rgba(0,0,0,.12), rgba(0,0,0,.45));
  transform: translate3d(0, 110%, 0); will-change: transform; overscroll-behavior: contain;
}
.modal-card { display: block; overflow-y: auto; padding: 8px 18px 18px; }
.sheet-compact { overflow-y: auto; }
.sheet-panel:not(.sheet-compact) { height: calc(100dvh - 56px - env(safe-area-inset-top, 0px) - 8px - env(safe-area-inset-bottom, 0px)); }
.grabber { position: relative; flex: none; width: 36px; height: 5px; margin: 0 auto 2px; border-radius: 3px; background: var(--fill-3); touch-action: none; cursor: grab; }
.grabber::before { content: ""; position: absolute; inset: -10px -40px -14px; }   /* зона хвата больше самой полоски */
[data-drag] { touch-action: none; }
.sheet-head { display: grid; grid-template-columns: 30px minmax(0, 1fr) 30px; align-items: center; gap: 8px; min-height: 36px; }
.sheet-head h2 { grid-column: 2; text-align: center; font: 600 17px/1.3 var(--ui); letter-spacing: -.02em; }
.sheet-head .x-btn { grid-column: 3; }
.search-sm .input { height: 38px; background: var(--fill); }
.sheet-hint { margin: -4px 4px 0; font-size: 13px; line-height: 1.35; color: var(--muted); letter-spacing: 0; }

/* сгруппированные списки (inset grouped): строки на общей подложке, разделители с отступом */
.group-label { margin: 6px 16px -8px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .02em; }
.group { background: var(--surface-2); border-radius: var(--r-group); overflow: hidden; }
.opt-list { list-style: none; margin: 0; padding: 0; flex: 1; min-height: 120px; overflow-y: auto; overscroll-behavior: contain;
  display: flex; flex-direction: column; background: var(--surface-2); border-radius: var(--r-group); }
.opt-list > li { position: relative; }
.opt-list > li:not(:last-child)::after { content: ""; position: absolute; left: 66px; right: 0; bottom: 0; height: .5px; background: var(--line); pointer-events: none; }
.opt { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 14px; cursor: pointer; transition: background-color 150ms ease; }
.opt:active { background: var(--fill); }
.opt-lead { flex: none; width: 40px; height: 40px; border-radius: 10px; object-fit: cover; background: var(--fill); display: grid; place-items: center;
  color: var(--muted); font-weight: 600; }
img.opt-lead { object-fit: contain; padding: 3px; }
.opt-lead.round { width: 30px; height: 30px; margin: 0 5px; border-radius: 50%; box-shadow: inset 0 0 0 .5px rgba(255,255,255,.2); }
.opt-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.opt-txt b { font-weight: 400; font-size: 17px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opt-txt span { font-size: 13px; color: var(--muted); letter-spacing: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.opt-meta { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: 13px; letter-spacing: 0; }
.opt-meta .rar { color: var(--muted); }
.opt-meta .pr { color: var(--text); }
/* выбор — круг с галочкой справа, как в режиме выбора iOS */
.opt input { appearance: none; -webkit-appearance: none; flex: none; width: 24px; height: 24px; margin: 0; border-radius: 50%;
  border: 1.5px solid var(--fill-3); background: none; display: grid; place-items: center; transition: background-color 150ms ease, border-color 150ms ease; }
.opt input:checked { background: var(--accent); border-color: var(--accent); }
.opt input:checked::after { content: ""; width: 6px; height: 11px; border: solid var(--accent-ink); border-width: 0 2.4px 2.4px 0; transform: translateY(-1px) rotate(45deg); }
.opt-empty { padding: 28px 12px; text-align: center; color: var(--muted); font-size: 15px; }
.sheet-foot { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; }

/* сортировка: строка с галочкой у выбранной, без кружков */
.radio-list { display: flex; flex-direction: column; }
.radio { position: relative; display: flex; align-items: center; justify-content: space-between; min-height: 48px; padding: 0 16px;
  border: 0; background: none; text-align: left; font-size: 17px; font-weight: 400; transition: background-color 150ms ease; }
.radio:active { background: var(--fill); }
.radio:not(:last-child)::before { content: ""; position: absolute; left: 16px; right: 0; bottom: 0; height: .5px; background: var(--line); }
.radio::after { content: ""; flex: none; width: 7px; height: 13px; margin-right: 4px; border: solid var(--accent); border-width: 0 2.5px 2.5px 0;
  transform: translateY(-2px) rotate(45deg); opacity: 0; }
.radio[aria-checked="true"]::after { opacity: 1; }
.price-range { display: flex; flex-direction: column; gap: 14px; }
.pr-row { display: flex; align-items: center; gap: 8px; }
.pr-field { flex: 1 1 0; min-width: 0; display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 14px; border-radius: var(--r-group);
  background: var(--surface-2); transition: box-shadow 200ms ease; }
.pr-field:focus-within { box-shadow: 0 0 0 3px var(--tint-2); }
.pr-field span { color: var(--muted); font-size: 15px; }
.pr-field input { flex: 1; min-width: 0; width: 100%; border: 0; background: none; outline: none; font-size: 17px; font-weight: 500; caret-color: var(--accent); }
.pr-field input::placeholder { color: var(--muted); font-weight: 400; }
.pr-dash { flex: none; width: 8px; height: 1.5px; background: var(--muted); border-radius: 2px; }
.pr-btns { display: grid; grid-template-columns: 1fr 1.6fr; gap: 10px; }

/* ------------------------------------------------------------ карточка подарка */
.modal-x { position: absolute; top: 14px; right: 14px; z-index: 3; }
.gm-stage { position: relative; width: min(100%, 300px); margin: 14px auto 20px; }
.gm-art { border-radius: 26px; box-shadow: 0 28px 60px -28px var(--c1, rgba(0,0,0,.6)); }
.gm-fav { top: 12px; right: 12px; width: 36px; height: 36px; }
.gm-title { text-align: center; font: 700 28px/1.15 var(--display); letter-spacing: -.02em; overflow-wrap: anywhere; }
.gm-title small { font: 400 17px var(--ui); color: var(--muted); margin-left: 6px; letter-spacing: 0; }
.um-domain { margin: 4px 0 0; text-align: center; color: var(--muted); font-size: 15px; }
.traits { margin: 18px 0 0; }
.traits div { position: relative; display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 14px; }
.traits div:not(:last-child)::after { content: ""; position: absolute; left: 14px; right: 0; bottom: 0; height: .5px; background: var(--line); }
.traits dt { flex: none; width: 72px; color: var(--muted); font-size: 15px; }
.traits dd { flex: 1; min-width: 0; margin: 0; display: flex; align-items: center; gap: 8px; font-size: 17px; }
.traits dd span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.traits .sw { flex: none; width: 12px; height: 12px; border-radius: 50%; box-shadow: inset 0 0 0 .5px rgba(255,255,255,.3); }
.traits .rar { flex: none; margin-left: auto; padding: 3px 8px; border-radius: 999px; font: 600 12px/1.2 var(--ui); letter-spacing: 0; font-style: normal;
  color: var(--accent); background: var(--tint); }
.gm-price-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 18px; }
.gm-price { margin: 0; font: 700 34px/1 var(--display); letter-spacing: -.025em; white-space: nowrap; }
.gm-status { display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 5px 10px; border-radius: 999px; font-size: 13px; font-weight: 600;
  letter-spacing: 0; color: var(--muted); background: var(--fill); text-align: right; }
.gm-status:empty { display: none; }
.gm-status.ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 15%, transparent); }
.gm-status.ok::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.gm-status.bad { color: var(--accent); background: var(--tint); }
.fee-note { margin: 8px 0 18px; font-size: 13px; color: var(--muted); letter-spacing: 0; }
.lot-box { margin: -4px 0 16px; padding: 14px 16px; border-radius: var(--r-group); background: var(--surface-2); }
.lot-box.ok { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ok) 45%, transparent); }
.lot-box.bad { box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 55%, transparent); }
.lot-steps { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 8px; font-size: 15px; color: var(--muted); }
.lot-steps li { display: flex; align-items: center; gap: 10px; }
.lot-steps li::before { content: ""; flex: none; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--fill-3); box-sizing: border-box; }
.lot-steps li.now { color: var(--text); }
.lot-steps li.now::before { border-color: var(--accent); border-top-color: transparent; animation: spin .8s linear infinite; }
.lot-steps li.done { color: var(--text); }
.lot-steps li.done::before { border: 0; background: var(--ok) no-repeat center / 11px 11px
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2 6.5l2.5 2.5L10 3.5' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.lot-msg { margin: 0; font-size: 14px; line-height: 1.45; color: var(--muted); letter-spacing: -.005em; }
.lot-box.bad .lot-msg { color: var(--text); }
@keyframes spin { to { transform: rotate(360deg); } }
.modal-actions { display: grid; gap: 10px; }
.modal-actions .btn { width: 100%; }

/* ------------------------------------------------------------ таб-бар: парящая стеклянная капсула */
.tabbar { position: fixed; left: 50%; bottom: calc(10px + env(safe-area-inset-bottom, 0px)); z-index: 40;
  width: min(calc(100% - 32px), 420px); transform: translateX(-50%);
  display: flex; gap: 2px; padding: 4px; border-radius: 999px;
  background: var(--glass); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  box-shadow: var(--edge), var(--float); }
.tab { position: relative; flex: 1 1 0; min-width: 0; height: 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  border-radius: 999px; color: var(--text); text-decoration: none; font: 500 10px/1.2 var(--ui); letter-spacing: .01em;
  transition: transform 160ms var(--ease-out), color 200ms ease; }
.tab:active { transform: scale(.94); }
.tab svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tab[aria-current="page"] { color: var(--accent); font-weight: 600; }
.tab[aria-current="page"]::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: 999px; background: var(--fill); }

/* уведомление — капсула сверху, въезжает пружиной */
.toast { position: fixed; left: 0; right: 0; top: calc(10px + env(safe-area-inset-top, 0px)); z-index: 90;
  width: fit-content; max-width: min(calc(100% - 32px), 460px); margin: 0 auto; padding: 12px 20px; border-radius: 24px; transform: translate3d(0, -150%, 0);
  background: var(--glass-thick); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur);
  box-shadow: var(--edge), var(--float); font-size: 15px; font-weight: 500; line-height: 1.3; letter-spacing: -.01em; text-align: center; will-change: transform; }

/* ------------------------------------------------------------ «Как купить» */
.help-intro { padding: 0 0 4px; }
.help-intro p { max-width: 60ch; margin: 0; color: var(--muted); font-size: 17px; }
.help-tabs { display: inline-flex; gap: 2px; margin-top: 16px; padding: 2px; border-radius: 10px; background: var(--fill); max-width: 100%; overflow-x: auto; }
.help-tabs a { flex: none; padding: 7px 14px; border-radius: 8px; color: var(--text); font-weight: 500; font-size: 14px; }
.help-tabs a:active { background: var(--thumb); }
.help-h { font: 700 22px/1.25 var(--display); letter-spacing: -.02em; margin: 32px 4px 10px; scroll-margin-top: 72px; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; counter-reset: step; background: var(--surface); border-radius: 18px; overflow: hidden; }
.steps li { counter-increment: step; position: relative; padding: 14px 16px 14px 62px; }
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 62px; right: 0; bottom: 0; height: .5px; background: var(--line); }
.steps li::before { content: counter(step); position: absolute; left: 16px; top: 14px; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); font: 600 15px/1 var(--ui); }
.steps h3 { font: 600 17px/1.3 var(--ui); letter-spacing: -.02em; margin-bottom: 2px; }
.steps p { margin: 0; color: var(--muted); font-size: 15px; line-height: 1.4; max-width: 62ch; letter-spacing: -.005em; }
.faq { background: var(--surface); border-radius: 18px; overflow: hidden; }
.faq details { position: relative; padding: 0 16px; }
.faq details:not(:last-child)::after { content: ""; position: absolute; left: 16px; right: 0; bottom: 0; height: .5px; background: var(--line); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 50px; font-size: 17px; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 8px; height: 8px; border: solid var(--muted); border-width: 0 2px 2px 0;
  transform: rotate(-45deg); transition: transform 250ms var(--ease-out); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 14px; color: var(--muted); font-size: 15px; line-height: 1.45; max-width: 62ch; }

@keyframes pop-in { from { opacity: 0; transform: scale(.96); } }

/* ------------------------------------------------------------ планшет и компьютер */
@media (min-width: 720px) {
  :root { --gutter: 24px; }
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .steps li:nth-last-child(2)::after { display: none; }
}
@media (min-width: 960px) {
  :root { --gutter: 32px; }
  body { padding-bottom: 48px; }
  .tabbar { display: none; }
  .navbar-in { height: 64px; }
  .topnav { display: flex; gap: 2px; margin-left: auto; padding: 3px; border-radius: 999px; background: var(--fill); }
  .topnav a { padding: 8px 16px; border-radius: 999px; color: var(--text); font-size: 14px; font-weight: 500; transition: background-color 200ms ease; }
  .topnav a[aria-current="page"] { background: var(--thumb); box-shadow: 0 2px 6px rgba(0,0,0,.12); }
  .topnav a:not([aria-current]):hover { background: var(--fill); }
  .large-title { font-size: 48px; letter-spacing: -.02em; margin: 12px 0 18px; }
  .trust { max-width: 760px; }
  .controls { display: grid; grid-template-columns: minmax(0, 420px) minmax(0, 1fr); gap: 12px 16px; align-items: center; }
  .filterrow { margin: 0; padding: 0; overflow: visible; flex-wrap: wrap; }
  .chips, .type-row { grid-column: 1 / -1; }
  .type-row { margin: 0; padding: 0; }
  .seg { margin-top: 0; }
  .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
  /* шторки на компьютере — окно по центру, появляется «материализуясь» (масштаб + прозрачность) */
  .sheet-panel, .modal-card { left: 0; right: 0; top: 0; bottom: 0; margin: auto; width: 440px; height: fit-content;
    max-height: min(720px, calc(100dvh - 64px)); border-radius: 28px; transform: none; opacity: 0; }
  .modal-card { width: 460px; }
  .sheet-panel:not(.sheet-compact) { height: min(640px, calc(100dvh - 64px)); }
  .grabber { display: none; }
  [data-drag] { touch-action: auto; }
  .steps { grid-template-columns: repeat(4, 1fr); }
  .steps li { padding-top: 62px; padding-left: 16px; }
  .steps li::before { top: 18px; }
  .steps li::after { display: none; }
  .steps li:not(:last-child) { box-shadow: inset -.5px 0 0 var(--line); }
}
@media (min-width: 1240px) { .grid { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

/* ------------------------------------------------------------ доступность */
@media (prefers-reduced-transparency: reduce) {
  .navbar::before, .tabbar, .toast, .suggest { background: var(--surface); -webkit-backdrop-filter: none; backdrop-filter: none; }
  .fav-btn, .u-plate { background: rgba(0,0,0,.6); -webkit-backdrop-filter: none; backdrop-filter: none; }
}
@media (prefers-contrast: more) {
  :root { --fill: color-mix(in srgb, var(--text) 18%, transparent); --line: color-mix(in srgb, var(--text) 40%, transparent); }
  .card, .trust, .group, .opt-list, .steps, .faq { box-shadow: inset 0 0 0 1px var(--line); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  .lot-steps li.now::before { border-top-color: var(--accent); }
}
