/* v12 «Таємний Санта для команди»: деловой, но праздничный. Хвоя + мёд на тёплой бумаге.
   Две вёрстки: html[data-layout=m] — телефон (основная), [data-layout=d] — компьютер. */

:root {
  --bg: #f4f1ea;
  --bg2: #ebe6db;
  --card: #fffdf8;
  --ink: #1d1b18;
  --ink2: #5b554c;
  --line: #d9d2c4;
  --pine: #1f5143;
  --pine-ink: #fffaf0;
  --honey: #e0a64b;
  --berry: #b3263a;
  --ok: #2f7a4f;
  --bad: #b3263a;
  --box: #1f5143;
  --stage-dark: #1f2326;
  --stage-light: #efe9de;
  --r: 16px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #121514;
    --bg2: #1a1e1c;
    --card: #1c211f;
    --ink: #eeebe4;
    --ink2: #a9a398;
    --line: #2f3632;
    --pine: #4aa386;
    --pine-ink: #0f1a16;
    --honey: #f0b85e;
    --berry: #ef6b7d;
    --ok: #6cc28f;
    --bad: #ef6b7d;
    --box: #2a5e4f;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #121514; --bg2: #1a1e1c; --card: #1c211f; --ink: #eeebe4; --ink2: #a9a398; --line: #2f3632;
  --pine: #4aa386; --pine-ink: #0f1a16; --honey: #f0b85e; --berry: #ef6b7d; --ok: #6cc28f; --bad: #ef6b7d;
  --box: #2a5e4f; color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.rm { scroll-behavior: auto; }
body {
  margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--font);
  overflow-x: hidden;
}
main { overflow-x: clip; }
h1, h2, h3, h4 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h2 { font-size: clamp(1.6rem, 5.5vw, 2.4rem); font-weight: 800; }
p { margin: 0 0 .8em; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--honey); outline-offset: 2px; }
.sr { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--ink); color: var(--bg); padding: 8px 12px; border-radius: 8px; z-index: 50; }
.skip:focus { top: 8px; }
.hint { color: var(--ink2); font-size: .88rem; }
.demo-tag { display: inline-block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  padding: 1px 7px; border-radius: 99px; background: var(--honey); color: #1d1b18; }

/* кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 20px;
  border-radius: 999px; border: 2px solid var(--pine); background: var(--pine); color: var(--pine-ink);
  font-weight: 700; text-decoration: none; cursor: pointer; text-align: center; line-height: 1.2;
  transition: transform .15s ease, background .2s;
  touch-action: manipulation;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: default; transform: none; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-sm { min-height: 40px; padding: 8px 14px; font-size: .92rem; }
.btn-big { min-height: 56px; font-size: 1.05rem; padding: 12px 26px; }
.link { background: none; border: 0; padding: 8px 0; color: var(--pine); font-weight: 700; text-decoration: underline; cursor: pointer; min-height: 44px; }

/* шапка */
.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 10px;
  padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top));
  background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: baseline; gap: 8px; text-decoration: none; margin-right: auto; min-width: 0; }
.brand b { font-weight: 800; font-size: 1.1rem; letter-spacing: -.02em; }
.brand-for { font-size: .8rem; color: var(--ink2); white-space: nowrap; }
.lang { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 40px;
  border: 1px solid var(--line); border-radius: 99px; font-weight: 700; font-size: .85rem; text-decoration: none; }

/* секции */
.sec { padding: 40px 16px; max-width: 1200px; margin: 0 auto; }
.sec-h p { color: var(--ink2); }

/* ------------------------------------------------ герой */
.hero { padding: 20px 16px 8px; max-width: 1200px; margin: 0 auto; display: grid; gap: 18px; }
.kicker { display: flex; align-items: center; gap: 8px; font-size: .82rem; font-weight: 700; text-transform: uppercase;
  letter-spacing: .06em; color: var(--pine); }
.kicker .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--berry); box-shadow: 0 0 0 4px color-mix(in srgb, var(--berry) 20%, transparent); }
.kin { font-size: clamp(2.1rem, 10vw, 4.6rem); font-weight: 850; line-height: 1.02; letter-spacing: -.035em; margin: .3em 0 .35em; }
.kin .w { display: inline-block; clip-path: inset(-0.2em -0.25em -0.22em -0.25em); vertical-align: top; }
.kin .wi { display: inline-block; animation: wup .8s cubic-bezier(.2, .8, .2, 1) both; animation-delay: calc(var(--i) * 110ms + 80ms); }
.kin .w:nth-child(2) .wi, .kin .w:nth-child(4) .wi { color: var(--pine); }
@keyframes wup { from { transform: translateY(115%); } to { transform: none; } }
.rot { font-weight: 700; margin-bottom: .9em; min-height: 1.5em; }
.rot-l { color: var(--ink2); font-weight: 600; }
.rot-w { display: inline-block; clip-path: inset(-0.2em -0.3em -0.25em -0.2em); }
.rot-in { display: inline-block; color: var(--berry); }
.rot-in.in { animation: rotin .5s cubic-bezier(.2, .8, .2, 1); }
@keyframes rotin { from { transform: translateY(100%); opacity: 0; } to { transform: none; opacity: 1; } }
.lead { font-size: 1.05rem; color: var(--ink2); max-width: 38em; }
.hero-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }

/* сцена */
.stage {
  position: relative; margin: 0; border-radius: 22px; overflow: hidden; min-height: 340px; height: 52vh; max-height: 560px;
  background: radial-gradient(120% 90% at 50% 35%, #2c3236, var(--stage-dark)); transition: background .5s;
  touch-action: none;
}
.stage[data-tone="light"] { background: radial-gradient(120% 90% at 50% 35%, #fbf8f2, var(--stage-light)); }
.st-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; }
.st-canvas:active { cursor: grabbing; }
.st-flat { position: absolute; inset: 12% 18% 22%; width: 64%; height: 66%; display: none; }
.stage.nogl .st-flat, .stage:not(.gl) .st-flat { display: block; }
.st-pill {
  position: absolute; left: 12px; top: 12px; margin: 0; padding: 6px 12px; border-radius: 99px; font-size: .85rem; font-weight: 700;
  background: rgba(255, 255, 255, .14); color: #fff; backdrop-filter: blur(8px); max-width: calc(100% - 24px);
}
.stage[data-tone="light"] .st-pill { background: rgba(0, 0, 0, .07); color: #1d1b18; }
.st-hint { position: absolute; right: 12px; bottom: 52px; margin: 0; font-size: .78rem; color: rgba(255, 255, 255, .7); }
.stage[data-tone="light"] .st-hint { color: rgba(0, 0, 0, .55); }
.st-note { position: absolute; left: 12px; right: 12px; bottom: 10px; font-size: .74rem; line-height: 1.35; color: rgba(255, 255, 255, .7); }
.stage[data-tone="light"] .st-note { color: rgba(0, 0, 0, .58); }
.st-tone { opacity: .85; }
.shadow { fill: rgba(0, 0, 0, .18); }

/* ------------------------------------------------ знак */
.mark-grid { display: grid; gap: 18px; grid-template-columns: 1fr; align-items: start; }
.mark-prev { width: 168px; height: 168px; border-radius: 50%; padding: 10px; justify-self: center;
  background: var(--stage-dark); transition: background .4s; }
.mark-prev[data-tone="light"] { background: var(--stage-light); }
.mark-c { width: 100%; height: 100%; display: block; }
.fld { display: grid; gap: 6px; font-weight: 700; font-size: .92rem; }
.fld input { min-height: 48px; padding: 10px 14px; border-radius: 12px; border: 2px solid var(--line); background: var(--card); font-weight: 600; font-size: 1rem; }
.fld input:focus { border-color: var(--pine); outline: none; }
.seg { border: 0; padding: 0; margin: 12px 0; display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.seg legend { font-weight: 700; font-size: .92rem; margin-bottom: 8px; padding: 0; }
.seg-o { position: relative; display: inline-flex; }
.seg-o input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg-o span { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 14px; border-radius: 99px; border: 2px solid var(--line);
  font-weight: 600; font-size: .9rem; background: var(--card); }
.seg-o input:checked + span { border-color: var(--pine); background: var(--pine); color: var(--pine-ink); }
.seg-o input:focus-visible + span { outline: 3px solid var(--honey); outline-offset: 2px; }
.file-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.file-btn { position: relative; overflow: hidden; }
.file-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.file-btn:focus-within { outline: 3px solid var(--honey); outline-offset: 2px; }
.mark-msg { margin-top: 8px; }
.pal { border: 0; padding: 0; margin: 22px 0 0; min-width: 0; }
.pal legend { font-weight: 800; font-size: 1.1rem; padding: 0; margin-bottom: 4px; }
.pal-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 14px 6px 6px; border-radius: 99px;
  border: 2px solid var(--line); background: var(--card); cursor: pointer; font-weight: 600; font-size: .9rem; touch-action: manipulation; }
.chip i { width: 30px; height: 30px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 30%, transparent); }
.chip[aria-pressed="true"] { border-color: var(--pine); background: color-mix(in srgb, var(--pine) 12%, var(--card)); }
.chip[aria-pressed="true"] i::after { content: "✓"; display: grid; place-items: center; height: 100%; color: var(--ink); font-weight: 900; font-style: normal; }
.chip[aria-pressed="true"] i { color: var(--ink); }
.chip[aria-pressed="true"] i::after { color: inherit; }

/* ------------------------------------------------ офис */
.office { background: var(--bg2); max-width: none; }
.office > * { max-width: 1200px; margin-left: auto; margin-right: auto; }
.office-ctl { display: grid; gap: 12px; margin: 16px auto; background: var(--card); padding: 16px; border-radius: var(--r); border: 1px solid var(--line); }
.rng { display: grid; gap: 6px; }
.rng-l { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; flex-wrap: wrap; }
.rng output { color: var(--pine); font-variant-numeric: tabular-nums; }
.rng input { width: 100%; accent-color: var(--pine); min-height: 36px; touch-action: pan-y; }
.rare-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.step { display: inline-flex; align-items: center; border: 2px solid var(--line); border-radius: 99px; overflow: hidden; }
.step button { width: 44px; height: 40px; border: 0; background: transparent; font-size: 1.3rem; cursor: pointer; }
.step button:disabled { opacity: .35; cursor: default; }
.step output { min-width: 28px; text-align: center; font-weight: 800; font-variant-numeric: tabular-nums; }
.odds { margin: 0; font-weight: 700; color: var(--berry); font-variant-numeric: tabular-nums; }
.rare-what { margin: 0; }
.office-act { display: flex; flex-wrap: wrap; gap: 10px; }
.status { min-height: 1.5em; margin: 12px auto; font-weight: 700; }
.office-body { display: grid; gap: 16px; }

.desks { display: grid; grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); gap: 8px; position: relative; }
.desks[data-hidden]:not([data-hidden=""])::after {
  content: attr(data-hidden); display: grid; place-items: center; border-radius: 14px; border: 2px dashed var(--line);
  font-weight: 800; color: var(--ink2); min-height: 100px;
}
.desk {
  position: relative; display: grid; grid-template-rows: auto 1fr; gap: 4px; padding: 6px 4px 8px; min-height: 108px;
  background: var(--card); border: 2px solid transparent; border-radius: 14px; cursor: pointer; touch-action: manipulation;
  box-shadow: 0 1px 0 var(--line); text-align: center;
}
.desk.open[data-tone="dark"] { background: #2a2f33; color: #f4f1ea; }
.desk.open[data-tone="light"] { background: #efe9de; color: #1d1b18; }
.desk.sel { border-color: var(--pine); }
.desk.swap-src { border-color: var(--honey); border-style: dashed; }
.who { display: flex; align-items: center; justify-content: center; gap: 4px; min-width: 0; }
.ava { flex: none; width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; font-size: .7rem; font-style: normal; font-weight: 800;
  background: color-mix(in srgb, var(--pine) 18%, var(--card)); color: var(--pine); }
.nm { font-size: .74rem; font-weight: 700; line-height: 1.15; overflow-wrap: anywhere; min-width: 0; }
.box, .cand { position: relative; width: 68%; max-width: 72px; aspect-ratio: 1; margin: 0 auto; align-self: center; }
.cand { position: absolute; left: 0; right: 0; bottom: 4px; margin: 0 auto; width: 88%; max-width: 92px; height: auto; opacity: 0; transform: scale(.3) translateY(20%); }
.bx { position: absolute; inset: 22% 0 0; border-radius: 6px; background: var(--box); display: grid; place-items: center;
  box-shadow: inset 0 -6px 0 rgba(0, 0, 0, .15); transition: transform .35s ease, opacity .35s ease; }
.bx::before { content: ""; position: absolute; inset: 0 44%; background: var(--honey); opacity: .9; }
.bx-mark { position: relative; width: 52%; height: auto; }
.lid { position: absolute; left: -6%; right: -6%; top: 10%; height: 20%; border-radius: 5px; background: color-mix(in srgb, var(--box) 85%, #000);
  z-index: 2; transition: transform .45s cubic-bezier(.3, 1.4, .5, 1), opacity .45s; }
.lid::before { content: ""; position: absolute; inset: 0 44%; background: var(--honey); }
.lid::after { content: ""; position: absolute; left: 50%; top: -9px; width: 18px; height: 10px; margin-left: -9px; border: 3px solid var(--honey); border-bottom: 0; border-radius: 9px 9px 0 0; }
.desk:not(.open):hover .lid { transform: translateY(-3px) rotate(-3deg); }
.desk.open .lid { transform: translate(30%, -120%) rotate(28deg); opacity: 0; }
.desk.open .bx { transform: scale(.6) translateY(30%); opacity: 0; }
.desk.open .cand { opacity: 1; transform: none; transition: transform .55s cubic-bezier(.3, 1.6, .5, 1) .12s, opacity .2s .12s; }
.rare-tag { position: absolute; top: -8px; right: -4px; padding: 1px 6px; border-radius: 99px; font-size: .64rem; font-weight: 800;
  background: var(--berry); color: #fff; transform: scale(0); transition: transform .3s cubic-bezier(.3, 1.6, .5, 1) .3s; }
.desk.is-rare { border-color: var(--berry); box-shadow: 0 0 0 4px color-mix(in srgb, var(--berry) 20%, transparent); }
.desk.is-rare .rare-tag { transform: none; }
.desk.swapped { animation: swp .5s ease; }
@keyframes swp { 40% { transform: scale(.9) rotate(-4deg); } }
.conf { position: absolute; left: 50%; top: 55%; width: 7px; height: 7px; border-radius: 2px; background: var(--c); pointer-events: none;
  animation: conf 1s cubic-bezier(.2, .8, .3, 1) forwards; }
@keyframes conf { to { transform: translate(var(--x), var(--y)) rotate(200deg); opacity: 0; } }
.more { display: block; }
.more[hidden], .pool-off[hidden], .tally-wait[hidden] { display: none; }

.tally { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; align-self: start; }
.tally h3 { font-size: 1.1rem; }
.tally h4 { font-size: .95rem; margin-top: 14px; }
.tally ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.tally-shapes li { display: grid; grid-template-columns: 22px 1fr auto; grid-template-rows: auto 6px; column-gap: 8px; row-gap: 3px; align-items: center; }
.t-ic { width: 22px; height: 22px; grid-row: span 2; fill: var(--pine); }
.t-rare .t-ic { fill: var(--berry); }
.t-n { font-size: .9rem; font-weight: 600; }
.tally b { font-variant-numeric: tabular-nums; }
.t-bar { grid-column: 2 / 4; height: 6px; border-radius: 3px; background: var(--bg2); overflow: hidden; }
.t-bar i { display: block; height: 100%; background: var(--pine); border-radius: 3px; transition: width .3s ease; }
.t-rare .t-bar i { background: var(--berry); }
.tally-colors li { display: grid; grid-template-columns: 18px 1fr auto; gap: 8px; align-items: center; font-size: .9rem; }
.tally-colors i { width: 18px; height: 18px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 30%, transparent); }
.pool-note { margin-top: 14px; }

/* ------------------------------------------------ страхи: карусель */
.car { position: relative; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 16px; }
.car-track { width: 100%; order: 0; }
.car-prev { order: 1; }
.car-dots { order: 2; }
.car-next { order: 3; }
.car-track { display: flex; gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 2px 12px; scrollbar-width: none;
  touch-action: pan-x pan-y; overscroll-behavior-x: contain; }
.car-track::-webkit-scrollbar { display: none; }
.fcard { flex: 0 0 86%; scroll-snap-align: start; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; }
.fcard h3 { font-size: 1.25rem; color: var(--pine); }
.proto { margin: 10px 0 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 10px; }
.proto li { counter-increment: s; display: grid; grid-template-columns: 28px 1fr; gap: 10px; font-size: .94rem; }
.proto li::before { content: counter(s); display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%;
  background: var(--pine); color: var(--pine-ink); font-weight: 800; font-size: .85rem; }
.check { margin-top: 14px; padding: 12px; border-radius: 12px; background: var(--bg2); }
.check-h { font-weight: 800; font-size: .88rem; margin-bottom: 6px; }
.check-b p { margin: 0; font-size: .92rem; }
.c-ok { color: var(--ok); font-weight: 700; }
.c-ok::before { content: "✓ "; }
.c-bad { color: var(--bad); font-weight: 700; }
.c-wait { color: var(--ink2); }
.c-adv { margin: 6px 0 0; padding-left: 18px; font-size: .88rem; color: var(--ink2); }
.car-edge { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--card); display: grid; place-items: center; cursor: pointer; box-shadow: 0 4px 12px rgba(0, 0, 0, .12); }
.car-edge svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.car-dots { display: flex; justify-content: center; gap: 8px; }
.car-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); transition: width .2s, background .2s; }
.car-dots i.on { width: 22px; border-radius: 4px; background: var(--pine); }

/* ------------------------------------------------ сводка */
.dash { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; }
.dash > div { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; min-width: 0; }
.dash dt { font-size: .8rem; color: var(--ink2); font-weight: 600; }
.dash dd { margin: 2px 0 0; font-weight: 700; }
.kpi dd { font-size: 2rem; font-weight: 850; letter-spacing: -.03em; font-variant-numeric: tabular-nums; color: var(--pine); line-height: 1.1; }
.dash .row { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.dash .row .seg { margin: 0; }
.row-price { border-color: var(--honey) !important; background: color-mix(in srgb, var(--honey) 14%, var(--card)) !important; }

/* ------------------------------------------------ отличие */
.award { display: grid; gap: 20px; align-items: center; }
.award-box { display: grid; justify-items: center; gap: 10px; }
.award-btn { position: relative; width: 220px; height: 240px; border: 0; background: none; cursor: pointer; padding: 0; touch-action: manipulation; }
.ab-lid { position: absolute; left: 12px; right: 12px; top: 36px; height: 34px; border-radius: 8px; background: #1f2326; z-index: 2;
  transition: transform .5s cubic-bezier(.3, 1.4, .5, 1), opacity .5s; }
.ab-lid::before { content: ""; position: absolute; inset: 0 46%; background: var(--honey); }
.ab-body { position: absolute; left: 22px; right: 22px; top: 66px; height: 130px; border-radius: 8px; background: #2c3236;
  display: grid; place-items: center; transition: transform .45s, opacity .45s; }
.ab-body::before { content: ""; position: absolute; inset: 0 46%; background: var(--honey); opacity: .85; }
.ab-mark { position: relative; width: 70px; height: 70px; background: #fffaf0; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat; }
.ab-5 { position: absolute; right: 12px; bottom: 6px; font-size: 2.2rem; font-weight: 900; color: var(--honey); }
.ab-cand { position: absolute; left: 30px; top: 40px; width: 160px; height: 160px; opacity: 0; transform: scale(.4); pointer-events: none; }
.ab-l { position: absolute; left: 0; right: 0; bottom: 0; font-weight: 800; color: var(--pine); text-decoration: underline; }
.award-btn.open .ab-lid { transform: translate(40%, -60px) rotate(30deg); opacity: 0; }
.award-btn.open .ab-body { transform: scale(.6) translateY(40%); opacity: 0; }
.award-btn.open .ab-cand { opacity: 1; transform: none; transition: transform .6s cubic-bezier(.3, 1.6, .5, 1) .15s, opacity .2s .15s; }
.award-got { min-height: 1.5em; font-weight: 700; text-align: center; }

/* ------------------------------------------------ заявка */
.order { text-align: center; background: var(--pine); color: var(--pine-ink); border-radius: 24px; margin: 24px 16px; max-width: 1168px; }
.order h2 { color: inherit; }
.order .hint { color: inherit; opacity: .8; }
.order-btns { display: flex; flex-direction: column; gap: 10px; align-items: stretch; margin: 18px auto; max-width: 420px; }
.order .btn { background: var(--pine-ink); color: var(--pine); border-color: var(--pine-ink); }
.order .btn-ghost { background: transparent; color: var(--pine-ink); border-color: color-mix(in srgb, var(--pine-ink) 50%, transparent); }

/* ------------------------------------------------ лист и тост */
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: 112px 1fr; gap: 14px; align-items: center;
  padding: 14px 16px; padding-bottom: max(16px, env(safe-area-inset-bottom)); background: var(--card); border-top: 1px solid var(--line);
  border-radius: 20px 20px 0 0; box-shadow: 0 -10px 30px rgba(0, 0, 0, .18); transform: translateY(110%); transition: transform .26s ease;
  touch-action: pan-x;
}
.sheet[hidden] { display: none; }
.sheet.on { transform: none; }
.sh-grip { position: absolute; top: 6px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 2px; background: var(--line); }
.sh-svg { width: 112px; height: 112px; border-radius: 16px; background: var(--stage-dark); }
.sheet[data-tone="light"] .sh-svg { background: var(--stage-light); }
.sh-h { font-size: 1.1rem; margin: 0 0 2px; padding-right: 36px; }
.sh-d { color: var(--ink2); margin-bottom: 10px; }
.sh-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.sh-x { position: absolute; right: 10px; top: 10px; width: 40px; height: 40px; border: 0; border-radius: 50%; background: var(--bg2); cursor: pointer; display: grid; place-items: center; }
.sh-x svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.toast {
  position: fixed; left: 50%; bottom: 20px; z-index: 60; margin: 0; max-width: calc(100% - 32px); padding: 10px 16px; border-radius: 12px;
  background: var(--ink); color: var(--bg); font-weight: 700; font-size: .92rem; text-align: center; pointer-events: none;
  transform: translate(-50%, 150%); opacity: 0; transition: transform .3s, opacity .3s;
}
.toast.on { transform: translate(-50%, 0); opacity: 1; }
.sheet.on ~ .toast.on { bottom: 170px; }

.foot { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; padding: 24px 16px 40px; color: var(--ink2); font-size: .88rem; }
.foot a { min-height: 44px; display: inline-flex; align-items: center; }
.made { display: inline-flex; align-items: center; }

/* ================================================ компьютер */
[data-layout="d"] .top { padding: 12px 32px; }
[data-layout="d"] .hero { grid-template-columns: 1.05fr 1fr; align-items: center; padding: 36px 32px 20px; gap: 40px; min-height: min(78vh, 720px); }
[data-layout="d"] .stage { height: 64vh; min-height: 460px; }
[data-layout="d"] .sec { padding: 64px 32px; }
[data-layout="d"] .mark-grid { grid-template-columns: 200px 1fr; gap: 32px; }
[data-layout="d"] .mark-prev { width: 200px; height: 200px; }
[data-layout="d"] .office-ctl { grid-template-columns: 1.4fr 1fr; align-items: center; column-gap: 32px; }
[data-layout="d"] .office-ctl .odds, [data-layout="d"] .office-ctl .rare-what { grid-column: 1 / -1; }
[data-layout="d"] .office-body { grid-template-columns: 1fr 300px; }
[data-layout="d"] .tally { position: sticky; top: 76px; }
[data-layout="d"] .desks { grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; }
[data-layout="d"] .desk { min-height: 132px; }
[data-layout="d"] .nm { font-size: .82rem; }
[data-layout="d"] .car-track { display: grid; grid-template-columns: 1.4fr 1fr 1fr; overflow: visible; align-items: start; }
[data-layout="d"] .fcard { flex: none; }
[data-layout="d"] .car-edge, [data-layout="d"] .car-dots { display: none; }
[data-layout="d"] .dash { grid-template-columns: repeat(4, 1fr); }
[data-layout="d"] .award { grid-template-columns: 1.2fr 1fr; }
[data-layout="d"] .order { padding: 64px 32px; margin: 40px auto; }
[data-layout="d"] .order-btns { flex-direction: row; justify-content: center; max-width: none; }
[data-layout="d"] .sheet { left: 50%; right: auto; width: 480px; margin-left: -240px; bottom: 20px; border-radius: 20px; border: 1px solid var(--line); }
[data-layout="d"] .sheet:not(.on) { transform: translateY(140%); }

/* ================================================ телефон */
[data-layout="m"] .hero-btns .btn { flex: 1 1 auto; }
[data-layout="m"] .office-act .btn { flex: 1 1 100%; }
[data-layout="m"] .ava { display: none; }
[data-layout="m"] .nm { font-size: .78rem; overflow-wrap: normal; word-break: keep-all; }
[data-layout="m"] .stage { margin: 0 -4px; height: 46vh; min-height: 300px; }
/* на телефоне изделие — сразу под заголовком, текст и кнопки — после */
[data-layout="m"] .hero { gap: 0; }
[data-layout="m"] .hero-copy { display: contents; }
[data-layout="m"] .hero .kicker { order: 1; }
[data-layout="m"] .hero .kin { order: 2; font-size: clamp(2rem, 9.6vw, 2.9rem); }
[data-layout="m"] .hero .rot { order: 3; }
[data-layout="m"] .hero .stage { order: 4; }
[data-layout="m"] .hero .lead { order: 5; margin-top: 16px; }
[data-layout="m"] .hero .hero-btns { order: 6; }

/* ================================================ без движения */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; transition-delay: 0ms !important; }
  .conf { display: none; }
}

/* пак: палитры набора, цена из API (мелко — «Демонстраційні ціни»), шанс таємної с «демо» */
.pal-sets { margin: 6px 0 10px; }
.pal-sets[hidden] { display: none; }
.pal-sets legend { font-size: .85rem; color: var(--ink2); }
.pk-opts { display: flex; flex-wrap: wrap; gap: 8px; }
.pk-o { position: relative; display: inline-flex; }
.pk-o input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pk-o span { display: inline-flex; align-items: center; min-height: 40px; padding: 6px 14px; border-radius: 99px; border: 2px solid var(--line);
  font-weight: 600; font-size: .9rem; background: var(--card); }
.pk-o input:checked + span { border-color: var(--pine); background: var(--pine); color: var(--pine-ink); }
.pk-o input:focus-visible + span { outline: 3px solid var(--honey); outline-offset: 2px; }
.pk-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 10px; margin: 0; }
.pk-price[hidden] { display: none; }
.pk-price .pk-v { font-weight: 800; font-variant-numeric: tabular-nums; }
.pk-price .pk-demo, .demo-mark { font-size: .75rem; font-weight: 500; color: var(--ink2); }
.pk-q .pk-v { font-size: 1.05rem; color: var(--pine); }
.order-price { justify-content: center; margin-top: 14px; }
.order-price .pk-v { font-size: 1.4rem; }
.order .pk-demo { color: inherit; opacity: .75; }
.sum-price.pk-price { justify-content: flex-end; }
.pk-odds[hidden] { display: none; }
[data-layout="d"] .office-ctl .pk-q, [data-layout="d"] .office-ctl .pk-odds { grid-column: 1 / -1; }
.mark-eng { display: flex; align-items: center; gap: 12px; margin-top: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.mark-eng[hidden] { display: none; }
.mark-eng .hint { color: #5b554c; margin: 0; }
.mark-svg { width: 72px; height: 72px; flex: none; object-fit: contain; }
