/* FITMENT — «Каталог» (вариант E2): чистый чёрный, серебро, тонкий шрифт, сетка с тонкими линиями, мягкие скруглённые кнопки. */
:root {
  --bg: #000;
  --surface: #0c0c0c;
  --surface-2: #141414;
  --line: #1d1d1d;
  --line-2: #2c2c2c;
  --line-hover: #4a4a4a;
  --text: #f2f2f2;
  --muted: #8f8f8f;
  --dim: #5f5f5f;
  --silver-1: #f6f6f6;
  --silver-2: #b4b4b4;
  --danger: #ff6b5e;
  --r: 14px;                 /* скругление кнопок */
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { overflow-x: clip; overscroll-behavior: none; touch-action: pan-y; }
body { margin: 0; color: var(--text); background: var(--bg);
  font: 500 16px/1.45 -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
button { font: inherit; color: inherit; }
input, textarea, select { font-size: 16px; }
.silver { background: linear-gradient(180deg, #ffffff 0%, #b5b5b5 100%); -webkit-background-clip: text; background-clip: text; color: transparent; }

.screen { max-width: 600px; margin: 0 auto; padding: calc(14px + env(safe-area-inset-top)) 20px calc(32px + env(safe-area-inset-bottom)); }
.screen:not([hidden]) { animation: enter .5s var(--ease); }
@keyframes enter { from { opacity: 0; transform: translateY(6px); } }

/* ---------- Бренд ---------- */
.brandbar { display: flex; align-items: center; justify-content: space-between; margin: 0 -20px; padding: 6px 20px 16px; border-bottom: 1px solid var(--line); }
.wordmark { font-size: 13px; font-weight: 700; letter-spacing: .4em; }
.wordmark { display: inline-flex; align-items: center; }
.logo-mark { height: 1.5em; width: auto; margin-right: .6em; }
.wordmark.small { font-size: 10px; color: var(--muted); }
.acct { position: relative; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-2); background: transparent;
  color: #bbb; display: grid; place-items: center; padding: 0; cursor: pointer; transition: border-color .25s, color .25s; }
.acct.small { justify-self: end; }
.acct:hover { border-color: var(--line-hover); color: var(--text); }
.acct svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
.acct.in { border-color: #d6d6d6; color: #fff; }
.acct-dot { position: absolute; right: -1px; bottom: -1px; width: 9px; height: 9px; border-radius: 50%; background: linear-gradient(180deg, var(--silver-1), var(--silver-2));
  box-shadow: 0 0 0 2px var(--bg); opacity: 0; transform: scale(.4); transition: opacity .25s, transform .25s; }
.acct.in .acct-dot { opacity: 1; transform: none; }

/* ---------- Главная: «Колесо» ---------- */
.wheel-hero { text-align: center; padding: 26px 0 8px !important; }
.disc { position: relative; width: min(72vw, 290px); aspect-ratio: 1; margin: 6px auto 0; border-radius: 50%; background: #000; overflow: hidden;
  box-shadow: 0 0 80px -10px rgba(255,255,255,.12); }
.disc img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; animation: spin 40s linear infinite; transition: opacity .6s var(--ease); }
.disc img.fade { opacity: 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.disc-cap { margin: 14px 0 26px; font-size: 12px; color: var(--dim); letter-spacing: .06em; min-height: 1.4em; transition: opacity .6s; }
.wheel-hero .eyebrow { margin-bottom: 14px; }
.wheel-hero h1 { max-width: 12em; margin: 0 auto !important; }
.wheel-hero .sub { margin: 14px auto 24px; max-width: 26em; }
.hero-act { display: grid; gap: 10px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 28px 0 0; border-top: 1px solid var(--line); }
.stats div { padding: 16px 4px; font-size: 11px; color: var(--dim); }
.stats b { display: block; font-size: 22px; font-weight: 700; color: var(--text); margin-bottom: 2px; }
.stats div + div { border-left: 1px solid var(--line); }
#demoSec { scroll-margin-top: 10px; }
@media (prefers-reduced-motion: reduce) { .disc img { animation: none; } }

/* ---------- Главная ---------- */
.hero { padding: 40px 0 30px; }
.eyebrow { margin: 0 0 18px; font-size: 11px; font-weight: 600; letter-spacing: .3em; text-transform: uppercase; color: var(--muted); }
.hero h1 { margin: 0; font-size: clamp(32px, 9vw, 46px); line-height: 1.08; font-weight: 700; letter-spacing: -.02em; }
.sub { margin: 18px 0 28px; color: var(--muted); font-size: 15px; max-width: 30em; }
.fine { font-size: 12px; color: var(--dim); text-align: center; margin: 12px 0 0; line-height: 1.55; }
.fine.left { text-align: left; }
.fine b { color: var(--muted); font-weight: 500; }

.demo { margin: 6px -20px 0; }
.demo-stage { border-radius: 0 !important; border: 0 !important; aspect-ratio: 4 / 3; }
.demo-cap { display: flex; justify-content: space-between; margin: 12px 20px 0; font-size: 10px; font-weight: 600; color: var(--dim); letter-spacing: .2em; text-transform: uppercase; }

.how { display: grid; margin: 34px 0 6px; border-top: 1px solid var(--line-2); }
.how-item { display: grid; grid-template-columns: 34px 1fr; column-gap: 6px; padding: 17px 0; border-bottom: 1px solid var(--line); }
.how-n { grid-row: span 2; font-size: 11px; color: var(--dim); letter-spacing: .1em; padding-top: 3px; }
.how-item b { font-weight: 600; font-size: 16px; }
.how-item p { margin: 4px 0 0; color: var(--dim); font-size: 13px; }

.foot { display: flex; justify-content: space-between; align-items: center; margin-top: 30px; font-size: 10px; color: var(--dim); letter-spacing: .25em; text-transform: uppercase; }

/* ---------- Кнопки (мягкие углы) ---------- */
.cta { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 0; border-radius: var(--r); padding: 15px 22px; cursor: pointer;
  background: linear-gradient(180deg, var(--silver-1), var(--silver-2)); color: #000;
  font-size: 11px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase;
  box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 10px 26px -14px rgba(255,255,255,.35); transition: transform .12s var(--ease), filter .2s, opacity .2s; }
.cta:hover { filter: brightness(1.05); }
.cta:active:not(:disabled) { transform: scale(.985); }
.cta.big { width: 100%; padding: 18px 20px; }
.cta.split { justify-content: space-between; }
.cta .arrow { font-size: 14px; letter-spacing: 0; transition: transform .2s var(--ease); }
.cta:hover .arrow { transform: translateX(3px); }
.cta:disabled { background: var(--surface-2); color: var(--dim); box-shadow: none; cursor: default; }
.ghost { border: 1px solid var(--line-2); background: transparent; color: #cfcfcf; border-radius: var(--r); padding: 15px 18px; font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; cursor: pointer; transition: border-color .2s, background .2s, color .2s; }
.ghost:hover { border-color: var(--line-hover); color: var(--text); }
.ghost.wide { width: 100%; }
.hint { text-align: center; font-size: 12px; color: var(--dim); margin: 12px 0 0; min-height: 1em; }
.note { font-size: 13px; color: var(--danger); margin: 12px 0 0; }
.note.muted { color: var(--dim); margin-top: 20px; font-size: 12px; line-height: 1.55; }

/* ---------- Студия ---------- */
#editor { padding-bottom: calc(108px + env(safe-area-inset-bottom)); }
.studio-top { display: grid; grid-template-columns: 40px 1fr 40px; align-items: center; padding: 2px 0 12px; }
.studio-top .back { justify-self: start; color: #bbb; }
.studio-title { justify-self: center; font-size: 11px; font-weight: 700; letter-spacing: .36em; text-transform: uppercase; }

/* фото во всю ширину; листается вместе со страницей (закреплённое и уменьшающееся дёргалось) */
.studio-photo { position: relative; z-index: 5; margin: 0 -20px; background: var(--bg); padding-top: env(safe-area-inset-top); }
.photo { position: relative; height: min(36vh, 290px); overflow: hidden; background: #050505; display: flex; align-items: center; justify-content: center; }
.photo #preview { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.empty { text-align: center; color: var(--muted); display: grid; gap: 8px; justify-items: center; cursor: pointer; font-size: 13px; }
.empty .plus { width: 44px; height: 44px; border: 1px solid var(--line-2); border-radius: 50%; display: grid; place-items: center; font-size: 22px; font-weight: 200; color: var(--text); }
.pill { position: absolute; right: 12px; bottom: 12px; border: 1px solid rgba(255,255,255,.2); border-radius: 99px; padding: 7px 13px; font-size: 11px; letter-spacing: .04em;
  background: rgba(0,0,0,.55); color: #fff; -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); cursor: pointer; z-index: 2; }
.live-tags { position: absolute; left: 12px; top: 12px; right: 12px; display: flex; flex-wrap: wrap; gap: 6px; z-index: 2; pointer-events: none; }
.live-tags span { font-size: 11px; padding: 5px 10px; border-radius: 99px; background: rgba(0,0,0,.55); color: #fff; border: 1px solid rgba(255,255,255,.22);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); animation: tagIn .3s var(--ease); max-width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@keyframes tagIn { from { opacity: 0; transform: translateY(-4px); } }
.progress { height: 1px; background: var(--line-2); }
.progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--silver-2), var(--silver-1)); transition: width .45s var(--ease); }

.step-head { padding: 24px 0 18px; scroll-margin-top: calc(min(36vh, 290px) + 12px); }
.step-head small { font-size: 11px; font-weight: 600; letter-spacing: .3em; text-transform: uppercase; color: var(--dim); }
.step-head small b { color: var(--muted); font-weight: 500; }
.step-head h2 { margin: 8px 0 0; font-size: 28px; line-height: 1.1; font-weight: 700; letter-spacing: -.01em; }
.step-head p { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.wstep { animation: enter .35s var(--ease); }
.sublabel { font-size: 11px; font-weight: 600; letter-spacing: .26em; text-transform: uppercase; color: var(--dim); margin: 24px 0 10px; }

/* обычные варианты — мягкие «таблетки» */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }   /* в несколько строк — ничего не уходит за край */
.chips::-webkit-scrollbar { display: none; }
.chips.wrap { flex-wrap: wrap; overflow: visible; margin: 0; padding: 0; }
.chip { flex: none; border: 1px solid var(--line-2); background: transparent; color: #d6d6d6; border-radius: 99px; padding: 10px 16px; font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap;
  transition: border-color .2s, background .2s, color .2s, transform .12s; }
.chip:hover { border-color: var(--line-hover); }
.chip:active { transform: scale(.98); }
.chip.on { border-color: #e6e6e6; background: #141414; color: #fff; box-shadow: inset 0 0 0 1px #e6e6e6; }

/* плитки: у каждого варианта своя скруглённая область (цвета, тонировка, посадка, обвес) */
.chips.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; padding: 0; overflow: visible; }
.chips.grid .chip { border: 1px solid var(--line-2); border-radius: 16px; padding: 16px 14px; white-space: normal; text-align: left; color: #bdbdbd; background: var(--surface); }
.chips.grid .chip:hover { border-color: var(--line-hover); }
.chips.grid .chip.on { background: #161616; color: #fff; border-color: #e6e6e6; box-shadow: inset 0 0 0 1px #e6e6e6; }
.swatches.grid { grid-template-columns: repeat(3, 1fr); }
.swatches .chip { display: grid; justify-items: center; gap: 10px; font-size: 12px; text-align: center !important; padding: 16px 8px 14px !important; }
.dot { width: 34px; height: 34px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); flex: none; }
.swatches .chip:not(:has(.dot))::before { content: ""; width: 34px; height: 34px; border-radius: 50%; background: repeating-linear-gradient(45deg, #2a2a2a 0 4px, #161616 4px 8px); box-shadow: inset 0 0 0 1px rgba(255,255,255,.15); }
.swatches .chip.on .dot { outline: 1px solid #e6e6e6; outline-offset: 3px; }

/* модели дисков — карточки с фото */
.wheels-grid { display: grid !important; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0 !important; padding: 0 !important; overflow: visible !important; }
.wheel-card { display: grid !important; gap: 10px; padding: 10px 10px 12px !important; border-radius: 18px !important; text-align: left; white-space: normal !important; background: var(--surface) !important; }
.wheel-card .w-img { aspect-ratio: 1; border-radius: 12px; background: #000; display: grid; place-items: center; overflow: hidden; }
.wheel-card .w-img img { width: 100%; height: 100%; object-fit: contain; }
.wheel-card .w-img svg { width: 58%; height: 58%; fill: none; stroke: #3d3d3d; stroke-width: 1.2; }
.wheel-card b { font-weight: 600; font-size: 14px; }
.wheel-card small { display: block; color: var(--dim); font-size: 11px; margin-top: 2px; }
.wheel-card.on { border-color: #e6e6e6 !important; box-shadow: inset 0 0 0 1px #e6e6e6 !important; background: #161616 !important; }

textarea { width: 100%; border: 1px solid var(--line-2); background: transparent; color: var(--text); border-radius: var(--r); padding: 14px; font: inherit; resize: none; transition: border-color .2s; }
textarea:focus { outline: none; border-color: #bdbdbd; }
textarea::placeholder { color: var(--dim); }

.step-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: grid; grid-template-columns: 1fr 2fr; gap: 10px; max-width: 600px; margin: 0 auto;
  padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); background: #000; border-top: 1px solid var(--line); }
.step-nav.first { grid-template-columns: 1fr; }
.step-nav.first #prevStep { display: none; }
.step-nav.last { grid-template-columns: 1fr; }
.step-nav .cta { width: 100%; justify-content: space-between; }

.sum-list { border-top: 1px solid var(--line-2); margin-bottom: 22px; }
.sum-list:empty { display: none; }
.sum-row { display: flex; justify-content: space-between; gap: 18px; padding: 15px 0; font-size: 14px; border-bottom: 1px solid var(--line); }
.sum-row span { color: var(--dim); flex: none; font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; padding-top: 3px; }
.sum-row b { font-weight: 600; text-align: right; }

/* ---------- Подсказка установки ---------- */
.install { display: flex; align-items: center; gap: 12px; border: 1px solid var(--line-2); border-radius: 16px; padding: 12px; margin-top: 24px; position: relative; }
.install img { width: 42px; height: 42px; border-radius: 10px; flex: none; }
.install div { display: grid; gap: 2px; font-size: 12px; color: var(--muted); padding-right: 18px; }
.install b { color: var(--text); font-size: 14px; font-weight: 500; }
.install .ghost { padding: 8px 12px; border-radius: 99px; font-size: 10px; }
.install .x { position: absolute; top: 6px; right: 8px; border: 0; background: none; color: var(--dim); font-size: 20px; cursor: pointer; padding: 4px; }

/* ---------- Шапки экранов ---------- */
.topbar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; margin: 0 -20px 20px; padding: 2px 20px 14px; border-bottom: 1px solid var(--line); }
.back { justify-self: start; border: 0; background: none; color: var(--muted); font-size: 13px; padding: 6px 0; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.back span { font-size: 24px; line-height: 0; margin-top: -2px; }
.title { font-size: 11px; font-weight: 700; letter-spacing: .36em; text-transform: uppercase; }
.top-action { justify-self: end; border: 0; background: none; color: var(--muted); font-size: 13px; padding: 6px 0; cursor: pointer; display: flex; align-items: center; gap: 6px; }
.top-action svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.top-action:hover { color: var(--danger); }
.group { padding: 4px 0; }
.g-head { display: flex; align-items: baseline; gap: 12px; margin: 0 0 14px; }
.num { font-size: 10px; color: var(--dim); letter-spacing: .2em; }
.g-head h2 { margin: 0; font-size: 20px; font-weight: 600; }

/* ---------- Результат ---------- */
.stage { position: relative; border-radius: 16px; overflow: hidden; background: #000; aspect-ratio: 4 / 3; max-height: 72vh; border: 1px solid var(--line);
  touch-action: none; user-select: none; -webkit-user-select: none; cursor: ew-resize; }
.stage img, .stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
.before-wrap { position: absolute; inset: 0; clip-path: inset(0 50% 0 0); }
.stage img { transition: filter .6s, transform .6s; }
.handle { position: absolute; top: 0; bottom: 0; left: 50%; width: 1px; margin-left: -.5px; background: rgba(255,255,255,.9); pointer-events: none; z-index: 2; }
.knob { position: absolute; top: 50%; left: 50%; width: 42px; height: 42px; transform: translate(-50%, -50%); border-radius: 50%;
  background: rgba(0,0,0,.4); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.85);
  color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; letter-spacing: 3px; box-shadow: 0 8px 22px rgba(0,0,0,.5); }
.tag { position: absolute; top: 12px; font-size: 9px; font-weight: 700; letter-spacing: .3em; text-transform: uppercase; padding: 6px 10px; border-radius: 99px;
  background: rgba(0,0,0,.55); color: #fff; z-index: 2; border: 1px solid rgba(255,255,255,.18); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); transition: opacity .3s; }
.tag.l { left: 12px; } .tag.r { right: 12px; }
#stage:not(.done) .handle, #stage:not(.done) .tag { opacity: 0; }

.loader { position: absolute; inset: 0; z-index: 3; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.55); opacity: 0; pointer-events: none; transition: opacity .4s; }
.stage.loading .loader { opacity: 1; }
.stage.loading img { filter: blur(3px) saturate(.3) brightness(.7); transform: scale(1.02); }
.sweep { position: absolute; inset: 0; background: linear-gradient(100deg, transparent 35%, rgba(255,255,255,.1) 50%, transparent 65%); transform: translateX(-100%); animation: sweep 2.6s ease-in-out infinite; }
@keyframes sweep { to { transform: translateX(100%); } }
.loader-box { position: relative; display: grid; justify-items: center; gap: 14px; color: #fff; width: 66%; max-width: 260px; }
.step { font-size: 10px; letter-spacing: .3em; text-transform: uppercase; text-align: center; }
.bar { width: 100%; height: 1px; background: rgba(255,255,255,.2); overflow: hidden; }
.bar i { display: block; height: 100%; width: 0; background: #fff; transition: width .3s ease-out; }
.spin { width: 24px; height: 24px; border: 1px solid rgba(255,255,255,.18); border-top-color: #fff; border-radius: 50%; animation: s 1s linear infinite; }
@keyframes s { to { transform: rotate(360deg); } }
.drag-hint { text-align: center; font-size: 10px; letter-spacing: .25em; text-transform: uppercase; color: var(--dim); margin: 14px 0 0; transition: opacity .3s; }
.drag-hint.gone { opacity: 0; }
.applied { border-top: 1px solid var(--line-2); margin-top: 20px; }
.applied:empty { display: none; }
.res-actions { display: grid; gap: 10px; margin-top: 22px; }
.res-actions .cta { width: 100%; }
.res-error { margin-top: 18px; text-align: center; }
.res-error p { color: var(--danger); font-size: 14px; margin: 0 0 14px; }
.res-error .cta { width: 100%; }
.stage.brushing { cursor: crosshair; }
.stage.brushing .handle, .stage.brushing .tag { opacity: 0; }
.brush-bar { margin-top: 16px; }
.brush-bar p { font-size: 13px; color: var(--muted); text-align: center; margin: 0 0 14px; }
.brush-btns { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; }
.brush-btns .ghost:disabled { opacity: .4; }

/* ---------- Аккаунт ---------- */
.auth { display: grid; gap: 14px; padding-top: 4px; }
.auth .cta { width: 100%; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; border: 1px solid var(--line-2); border-radius: var(--r); padding: 4px; }
.auth-tabs button { border: 0; background: none; color: var(--muted); padding: 11px; border-radius: 10px; font-size: 10px; font-weight: 600; letter-spacing: .3em; text-transform: uppercase; cursor: pointer; transition: background .2s, color .2s; }
.auth-tabs button.on { background: linear-gradient(180deg, var(--silver-1), var(--silver-2)); color: #000; font-weight: 700; }
.auth-lead { margin: 6px 0 4px; color: var(--muted); font-size: 15px; }
.auth-lead b { color: var(--text); font-weight: 500; }
.field { display: grid; gap: 8px; }
.field > span { font-size: 11px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--dim); }
.field input { width: 100%; border: 1px solid var(--line-2); background: transparent; color: var(--text); border-radius: var(--r); padding: 16px 14px; font: inherit; font-size: 17px; transition: border-color .2s; }
.field input:focus { outline: none; border-color: #bdbdbd; }
.field input::placeholder { color: var(--dim); }
.code-input { text-align: center; letter-spacing: .5em; font-size: 26px !important; font-weight: 600 !important; }
.fine.dev { color: #e6e6e6; }
.link { border: 0; background: none; color: var(--muted); font-size: 13px; padding: 6px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line-2); }
.auth .note { margin: 0; }
.tg-btn { display: flex; align-items: center; justify-content: center; gap: 10px; border: 1px solid var(--line-2); border-radius: var(--r); padding: 16px; color: var(--text); text-decoration: none; font-size: 14px; transition: border-color .2s; }
.tg-btn:hover { border-color: #2aabee; }
.tg-btn svg { width: 20px; height: 20px; fill: #2aabee; }

/* ---------- Профиль ---------- */
.prof-card { display: flex; align-items: center; gap: 16px; padding: 4px 0 24px; margin-bottom: 24px; border-bottom: 1px solid var(--line); }
.avatar { width: 56px; height: 56px; border-radius: 50%; border: 1px solid #d6d6d6; color: #e6e6e6; display: grid; place-items: center; flex: none; }
.avatar svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; }
.prof-phone { font-size: 20px; font-weight: 600; letter-spacing: .01em; }
.prof-meta { font-size: 12px; color: var(--muted); margin-top: 6px; }
.history { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.h-item { border: 1px solid var(--line); background: transparent; border-radius: 14px; padding: 0 0 10px; overflow: hidden; text-align: left; cursor: pointer; display: grid; gap: 4px; color: var(--text); transition: border-color .2s; }
.h-item:hover { border-color: var(--line-hover); }
.h-item img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; display: block; background: #050505; margin-bottom: 4px; }
.h-item span { font-size: 13px; padding: 0 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.h-item small { font-size: 11px; color: var(--dim); padding: 0 10px; }
.logout { margin-top: 28px; }
.viewer { position: fixed; inset: 0; z-index: 20; background: rgba(0,0,0,.96); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  padding: calc(56px + env(safe-area-inset-top)) 20px calc(24px + env(safe-area-inset-bottom)); overflow-y: auto; display: grid; align-content: start; gap: 16px; animation: enter .3s var(--ease); }
.v-x { width: 100%; max-width: 600px; margin: 0 auto; }
.v-x.static { cursor: default; }
.viewer .x-toggle { margin-top: 0; }
.viewer .sum-list { max-width: 600px; width: 100%; margin: 0 auto; }
.viewer-btns { display: grid; grid-template-columns: 2fr 1fr; gap: 10px; max-width: 600px; width: 100%; margin: 0 auto; }
.viewer-btns .cta { width: 100%; }
.viewer .x { position: absolute; top: calc(12px + env(safe-area-inset-top)); right: 16px; border: 1px solid var(--line-2); background: none; color: var(--text); width: 36px; height: 36px; border-radius: 50%; font-size: 20px; cursor: pointer; }

/* ---------- «Превращение»: сток → тюнинг ---------- */
.demo { margin: 34px 0 0 !important; }
.demo-head { margin-bottom: 14px; }
.demo-head .eyebrow { margin: 0 0 8px; }
.demo-head h2 { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
.demo-head h2 span { color: var(--dim); font-weight: 500; }
.xform { position: relative; aspect-ratio: 4 / 3; border-radius: 20px; overflow: hidden; background: #050505; border: 1px solid var(--line);
  touch-action: pan-y; user-select: none; -webkit-user-select: none; cursor: ew-resize; }
.xform img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
.x-top { position: absolute; inset: 0; clip-path: inset(0 100% 0 0); }
.x-edge { position: absolute; top: 0; bottom: 0; left: 0; width: 2px; margin-left: -1px; background: #fff; opacity: 0; pointer-events: none;
  box-shadow: 0 0 18px 4px rgba(255,255,255,.55), 0 0 60px 14px rgba(255,255,255,.18); transition: opacity .25s; }
.x-edge.on { opacity: 1; }
.x-state { position: absolute; left: 12px; top: 12px; font-size: 10px; font-weight: 700; letter-spacing: .3em; text-transform: uppercase; padding: 7px 12px; border-radius: 99px;
  background: rgba(0,0,0,.55); color: #fff; border: 1px solid rgba(255,255,255,.18); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.x-state.tuned { background: linear-gradient(180deg, var(--silver-1), var(--silver-2)); color: #000; border-color: transparent; }
.x-mods { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin: 12px 0 0; min-height: 28px; pointer-events: none; }
.demo-car { margin: 6px 0 0; font-size: 12px; color: var(--dim); }
.x-mods span { font-size: 11px; font-weight: 600; padding: 6px 10px; border-radius: 99px; background: var(--surface); color: #e6e6e6; border: 1px solid var(--line-2);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); opacity: 0; transform: translateY(6px); transition: opacity .4s var(--ease), transform .4s var(--ease); }
.x-mods.show span { opacity: 1; transform: none; }
.x-mods.show span:nth-child(2) { transition-delay: .15s; }
.x-mods.show span:nth-child(3) { transition-delay: .3s; }
.x-mods.show span:nth-child(4) { transition-delay: .45s; }
.x-toggle { display: grid; grid-template-columns: 1fr 1fr; margin: 12px auto 0; max-width: 260px; border: 1px solid var(--line-2); border-radius: 99px; padding: 4px; }
.x-toggle button { border: 0; background: none; color: var(--muted); padding: 9px; border-radius: 99px; font-size: 11px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; cursor: pointer; transition: background .25s, color .25s; }
.x-toggle button.on { background: linear-gradient(180deg, var(--silver-1), var(--silver-2)); color: #000; }

/* ---------- Студия: чистое фото + «сборка» под ним ---------- */
.studio-photo { padding-bottom: 2px; }
.photo { transition: box-shadow .4s; }
.photo.flash { box-shadow: inset 0 0 0 2px rgba(255,255,255,.75); }
.cam { position: absolute; right: 10px; bottom: 10px; width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255,255,255,.22);
  background: rgba(0,0,0,.5); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); color: #fff; display: grid; place-items: center; cursor: pointer; z-index: 2; padding: 0; }
.cam svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }
.build { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 10px 20px 10px; margin: 0 -20px; border-bottom: 1px solid var(--line); min-height: 46px; align-items: center; }
.build::-webkit-scrollbar { display: none; }
.build-empty { font-size: 12px; color: var(--dim); white-space: nowrap; padding-left: 20px; margin-left: -20px; }
.build .b-chip { flex: none; display: inline-flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 600; padding: 6px 11px 6px 7px; border-radius: 99px;
  border: 1px solid var(--line-2); background: var(--surface); color: #e6e6e6; white-space: nowrap; animation: chipIn .38s var(--ease); }
.build .b-chip i { font-style: normal; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font-size: 9px; font-weight: 700; color: #000;
  background: linear-gradient(180deg, var(--silver-1), var(--silver-2)); }
.build .b-chip img { width: 20px; height: 20px; border-radius: 50%; object-fit: cover; background: #000; }
@keyframes chipIn { from { opacity: 0; transform: translateY(6px) scale(.92); } }
.step-head { scroll-margin-top: calc(min(22vh, 180px) + 70px) !important; }

/* ---------- Примеры ---------- */
.ex-head { margin: 8px 0 22px; }
.ex-head .eyebrow { margin: 0 0 8px; }
.ex-head h2 { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -.01em; }
.ex-head h2 span { color: var(--dim); font-weight: 500; }
.ex-head .fine { margin: 8px 0 0; }
.ex { margin: 0 0 40px; }
.ex-car { margin: 0 0 10px; font-size: 15px; font-weight: 700; }
.ex-cta { margin: 4px 0 36px; width: 100%; }

/* ---------- Главная: витрина дисков ---------- */
/* сверху и снизу запас под свечение; обрезаем только по бокам (соседние диски), а не сверху/снизу */
.showcase { --d: min(56vw, 230px); --pad: 44px; position: relative; height: calc(var(--d) + var(--pad) * 2); margin: 0 -20px; overflow-x: clip; overflow-y: visible; }
.sc-w { position: absolute; top: var(--pad); left: 50%; width: var(--d); height: var(--d); margin-left: calc(var(--d) / -2); cursor: pointer;
  transition: transform .9s var(--ease), opacity .9s, filter .9s; }
.sc-w img { width: 100%; height: 100%; object-fit: contain; border-radius: 50%; animation: spin 40s linear infinite; }
/* свечение по контуру главного диска */
.sc-glow { position: absolute; top: var(--pad); transition: opacity .35s; left: 50%; width: var(--d); height: var(--d); margin-left: calc(var(--d) / -2); border-radius: 50%; z-index: 20; pointer-events: none;
  border: 1.5px solid rgba(255,255,255,.55); box-shadow: 0 0 22px 3px rgba(255,255,255,.28), inset 0 0 16px rgba(255,255,255,.18); animation: glow 3s ease-in-out infinite; }
@keyframes glow { 50% { box-shadow: 0 0 34px 6px rgba(255,255,255,.4), inset 0 0 22px rgba(255,255,255,.24); border-color: rgba(255,255,255,.8); } }
.sc-dots { display: flex; gap: 5px; justify-content: center; margin: 0 0 24px; }
.sc-dots i { width: 5px; height: 5px; border-radius: 3px; background: #3a3a3a; transition: background .4s, width .4s; }
.sc-dots i.on { background: #ddd; width: 16px; }
.tune-list { margin: 28px 0 0; border-top: 1px solid var(--line); text-align: left; }
.tune-list div { display: flex; justify-content: space-between; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 14px; font-weight: 600; }
.tune-list span { color: var(--dim); font-size: 12px; font-weight: 400; text-align: right; }
@media (prefers-reduced-motion: reduce) { .sc-w img, .sc-glow { animation: none; } }

/* Итог: строки нажимаются */
button.sum-row { width: 100%; background: none; border: 0; border-bottom: 1px solid var(--line); color: inherit; font: inherit; cursor: pointer; align-items: center; text-align: left; }
.sum-row.edit b { flex: 1; }
.sum-row.edit i { font-style: normal; color: var(--dim); font-size: 20px; line-height: 1; margin-left: 4px; }
#leftToday:empty { display: none; }

/* Результат: две главные кнопки, остальное — понятным списком */
.res-main { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.cta.alt { background: #161616; color: #fff; border: 1px solid #e6e6e6; }
#resSaved { margin: 4px 0 0; }
.res-more { border-top: 1px solid var(--line); margin-top: 8px; }
.res-more button { display: grid; grid-template-columns: 1fr auto; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--line);
  color: inherit; font: inherit; padding: 14px 0; cursor: pointer; }
.res-more b { font-size: 14px; font-weight: 600; }
.res-more span { grid-column: 1; font-size: 12px; color: var(--dim); margin-top: 3px; }
.res-more i { grid-row: 1 / 3; grid-column: 2; align-self: center; font-style: normal; font-size: 22px; color: var(--dim); }
.wait-note { margin-top: 12px; font-size: 11px; color: rgba(255,255,255,.65); letter-spacing: .02em; }
/* Кнопка профиля с подписью */
.acct.labeled { width: auto; height: 36px; border-radius: 99px; padding: 0 14px 0 10px; display: flex; gap: 6px; font-size: 12px; font-weight: 600; }
.acct-label { line-height: 1; }
.wheel-hero .disc-cap { color: #c4c4c4; font-size: 11px; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; margin: 12px 0 22px; }

.sc-glow.off { opacity: 0; animation-play-state: paused; }   /* пока диски едут — свечения нет */
.wheel-hero .disc-cap { margin: -22px 0 12px; }

.auth-switch { display: block; width: 100%; margin: 16px 0 0; background: none; border: 0; color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; }
.auth-switch b { color: #fff; font-weight: 600; }
#historyStart { width: 100%; margin-top: 16px; }

/* Данные продавца и документы — внизу главной */
.legal { margin: 14px 0 calc(10px + env(safe-area-inset-bottom)); font-size: 11px; line-height: 1.6; color: var(--dim); }
.legal p { margin: 2px 0; }
.legal a, .fine a { color: var(--muted); }

/* ---------- Баланс и пополнение ---------- */
.balance-card { margin: 18px 0 8px; padding: 20px; border-radius: 20px; border: 1px solid var(--line-2); background: linear-gradient(160deg, #141414, #070707); }
.bal-top { display: flex; justify-content: space-between; align-items: center; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--dim); font-weight: 600; }
.bal-price { letter-spacing: .04em; text-transform: none; font-weight: 500; }
.bal-sum { margin: 10px 0 2px; font-size: 40px; font-weight: 800; letter-spacing: -.02em; background: linear-gradient(180deg, var(--silver-1), var(--silver-2)); -webkit-background-clip: text; color: transparent; }
.bal-hint { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.balance-card .cta { width: 100%; }
.bal-free { margin: 12px 0 0; font-size: 12px; color: var(--muted); text-align: center; }
.tp-now { margin: 6px 0 22px; font-size: 14px; color: var(--muted); }
.tp-now b { color: var(--text); font-weight: 700; }
.tp-label { display: block; font-size: 11px; font-weight: 600; letter-spacing: .2em; text-transform: uppercase; color: var(--dim); margin-bottom: 8px; }
.tp-field { display: flex; align-items: center; border: 1px solid var(--line-2); border-radius: 16px; padding: 0 18px; background: #0b0b0b; }
.tp-field:focus-within { border-color: #bdbdbd; }
.tp-field input { flex: 1; min-width: 0; background: none; border: 0; outline: none; color: var(--text); font: inherit; font-size: 34px; font-weight: 800; padding: 14px 0; }
.tp-field input::placeholder { color: #333; }
.tp-field span { font-size: 26px; font-weight: 700; color: var(--muted); }
.tp-quick { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 12px 0 0; }
.tp-quick button { border: 1px solid var(--line-2); background: none; color: #ddd; border-radius: 12px; padding: 11px 0; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.tp-quick button.on { background: linear-gradient(180deg, var(--silver-1), var(--silver-2)); color: #000; border-color: transparent; }
.tp-hint { margin: 12px 0 18px; font-size: 13px; color: var(--muted); }
.tp-hint.err { color: #ff8a80; }
#tpPay { width: 100%; }
.tp-msg { margin: 14px 0 0; padding: 12px 14px; border-radius: 12px; border: 1px solid #5a2a2a; color: #ffb4ab; font-size: 13px; }
.tp-msg.soon { border-color: var(--line-2); color: var(--muted); }
.tp-info { margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 12px; color: var(--dim); line-height: 1.55; }
.tp-info p { margin: 0 0 8px; }
.tp-info a { color: var(--muted); }
#priceNote:empty { display: none; }

/* Короткое сообщение внизу экрана */
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 50; transform: translate(-50%, 20px); opacity: 0;
  max-width: calc(100% - 40px); padding: 12px 18px; border-radius: 14px; background: #f2f2f2; color: #000; font-size: 14px; font-weight: 600;
  box-shadow: 0 10px 30px rgba(0,0,0,.5); transition: opacity .3s, transform .3s; text-align: center; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
#resTopup { width: 100%; }


/* Владелец в режиме «как клиент» — кнопка обратно в админку */
.back-admin { position: fixed; left: 12px; bottom: calc(86px + env(safe-area-inset-bottom)); z-index: 30; padding: 9px 14px; border-radius: 99px;
  background: #f2f2f2; color: #000; font-size: 13px; font-weight: 700; text-decoration: none; box-shadow: 0 8px 24px rgba(0,0,0,.5); }
