/* v9 «Чарівна коробка» — общее для обеих вёрсток. Телефон — v9-m.css, компьютер — v9-d.css.
   Цвета — токены; тёмная тема — ночное небо. Коробка сиреневая (средняя яркость) — читается
   на обоих фонах. Шоколад тёмный — поэтому медальон всегда на светлом кремовом фоне. */

:root {
  --bg: #fff3e6;
  --bg2: #ffe7d3;
  --ink: #2b2140;
  --muted: #645879;
  --card: #ffffff;
  --line: rgba(43, 33, 64, .13);
  --accent: #6c4ee6;
  --accent-ink: #ffffff;
  --pink: #ff6f9a;
  --gold: #f5b83d;
  --sky-a: #fde3f1;
  --sky-b: #e6defc;
  --sky-star: rgba(255, 255, 255, .0);
  --cream: #fbf0e1;
  --shadow: 0 10px 30px rgba(60, 40, 110, .12);
  --round: ui-rounded, "SF Pro Rounded", "Nunito", "Varela Round", "Segoe UI Variable Display", "Segoe UI", system-ui, sans-serif;
  --gut: 16px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #1c1733;
    --bg2: #241d42;
    --ink: #f7f1ff;
    --muted: #c3b8dc;
    --card: #2a2349;
    --line: rgba(255, 255, 255, .13);
    --accent: #b49cff;
    --accent-ink: #1c1733;
    --pink: #ff8fb1;
    --sky-a: #2a2252;
    --sky-b: #171230;
    --sky-star: rgba(255, 255, 255, .75);
    --shadow: 0 10px 30px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #1c1733; --bg2: #241d42; --ink: #f7f1ff; --muted: #c3b8dc; --card: #2a2349;
  --line: rgba(255, 255, 255, .13); --accent: #b49cff; --accent-ink: #1c1733; --pink: #ff8fb1;
  --sky-a: #2a2252; --sky-b: #171230; --sky-star: rgba(255, 255, 255, .75);
  --shadow: 0 10px 30px rgba(0, 0, 0, .35); color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/1.5 var(--round);
  overflow-x: clip;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.12; margin: 0; font-weight: 800; letter-spacing: -.01em; }
p { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

.skip { position: absolute; left: 8px; top: -60px; background: var(--card); padding: 8px 14px; border-radius: 12px; z-index: 50; }
.skip:focus { top: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------------------------ шапка */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px;
  padding: 10px var(--gut);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.brand { display: flex; align-items: baseline; gap: 8px; text-decoration: none; font-weight: 800; font-size: 19px; }
.brand-demo { font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 99px; background: var(--bg2); color: var(--muted); }
.nav { display: flex; gap: 18px; margin-left: auto; }
.nav a { text-decoration: none; font-weight: 700; color: var(--muted); }
.nav a:hover { color: var(--ink); }
.lang {
  margin-left: auto; min-width: 44px; min-height: 40px; display: grid; place-items: center;
  border: 2px solid var(--line); border-radius: 99px; text-decoration: none; font-weight: 800; font-size: 14px; padding: 0 12px;
}
.nav + .lang { margin-left: 0; }

/* ------------------------------------------------------------------ герой */
.eyebrow { font-weight: 800; font-size: 14px; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); }
.kin { font-size: clamp(2.1rem, 10.5vw, 3.2rem); margin: 10px 0 12px; }
.kin .w { display: inline-block; vertical-align: top; clip-path: inset(-.3em -.3em -.3em -.3em); }
.kin .w > span { display: inline-block; }
.kin .w-hide > span { color: var(--pink); }
.lead { color: var(--muted); font-size: 18px; max-width: 34em; }

html.ready .kin .w > span { animation: rise .8s cubic-bezier(.2, .8, .2, 1) both; }
html.ready .kin .w:nth-child(2) > span { animation-delay: .12s; }
html.ready .kin .w:nth-child(3) > span { animation-delay: .24s; }
/* «сховався» ховається в маску й визирає назад — один раз */
html.ready .kin .w-hide > span { animation: rise .8s .12s cubic-bezier(.2, .8, .2, 1) both, peek 1.6s 1.6s ease-in-out 1 both; }
@keyframes rise { from { transform: translateY(135%); } to { transform: none; } }
@keyframes peek {
  0% { transform: none; } 30% { transform: translateY(135%); } 55% { transform: translateY(135%); }
  70% { transform: translateY(-12%); } 85% { transform: translateY(4%); } 100% { transform: none; }
}

/* ------------------------------------------------------------------ сцена */
.play { display: flex; flex-direction: column; gap: 12px; }
.stage {
  position: relative; margin: 0;
  border-radius: 28px;
  background:
    radial-gradient(1.5px 1.5px at 12% 18%, var(--sky-star), transparent 60%),
    radial-gradient(1.5px 1.5px at 78% 12%, var(--sky-star), transparent 60%),
    radial-gradient(2px 2px at 88% 40%, var(--sky-star), transparent 60%),
    radial-gradient(1.5px 1.5px at 22% 52%, var(--sky-star), transparent 60%),
    radial-gradient(2px 2px at 60% 8%, var(--sky-star), transparent 60%),
    linear-gradient(180deg, var(--sky-a), var(--sky-b));
  padding: 10px 10px 4px;
  touch-action: pan-y;
  user-select: none; -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.stage:focus-visible { outline-offset: 4px; }
.box-wrap { position: relative; }
#box { width: 100%; height: auto; overflow: visible; }
.rise { position: absolute; left: 30.5%; width: 39%; top: 0; height: 39%; overflow: hidden; pointer-events: none; }
.rise-medal {
  position: absolute; left: 0; bottom: 0; width: 100%; height: auto; aspect-ratio: 1;
  transform: translateY(108%); opacity: 0;
  transition: transform 1.1s cubic-bezier(.2, .9, .25, 1.15), opacity .3s;
}
.rise.up .rise-medal { transform: translateY(-4%); opacity: 1; }
.rise.gone .rise-medal { opacity: 0; transform: translateY(108%); transition-duration: .5s; }

.pill {
  margin: 4px auto 6px; width: fit-content; max-width: 100%;
  padding: 8px 16px; border-radius: 99px; background: var(--card); color: var(--ink);
  font-weight: 700; font-size: 15px; text-align: center; box-shadow: 0 2px 10px rgba(40, 20, 80, .1);
}

/* SVG коробки */
#box .ground { fill: rgba(40, 20, 80, .14); }
#box .box-front, #box .lid-front, #box .lid-top { stroke: #3d2f55; stroke-width: 2.5; stroke-linejoin: round; }
#box .deco-stars path { fill: #fff; opacity: .6; }
#box .ribbon path, #box .ribbon rect, #box .loop, #box .tail { fill: #ff8fb1; stroke: #3d2f55; stroke-width: 2.2; stroke-linejoin: round; }
#box .knot { fill: #ff6f9a; stroke: #3d2f55; stroke-width: 2.2; }
#box .tag rect { fill: #fff6e4; stroke: #3d2f55; stroke-width: 2; }
#box .tag-t { font: 800 15px var(--round); fill: #3d2f55; }
#box .badge circle { fill: #fff6e4; stroke: #3d2f55; stroke-width: 2.2; }
#box .badge text { font: 900 34px var(--round); fill: #6c4ee6; }
#box .glow { opacity: 0; }
#box .hit { fill: transparent; }
#box .cr-hit { cursor: pointer; outline: none; }
#box .cr-hit:focus-visible .hit { fill: rgba(255, 255, 255, .35); stroke: #fff; stroke-width: 3; }
#box .hole { fill: rgba(255, 255, 255, .2); stroke: #fff; stroke-width: 2; stroke-dasharray: 4 5; transform-box: fill-box; transform-origin: center; }
#box .shade { opacity: .6; }
#box .shade * { fill: #2a1f45 !important; stroke: none !important; }
#box .hole-q { font: 900 22px var(--round); fill: #fff; }
#box .lid, #box .bow > *, #box .ribbon, #v9-all { transform-box: view-box; }
#v9-all { transform-origin: 180px 384px; }
#box .loop, #box .knot, #box .tail { transform-origin: 180px 99px; }
#box .lid { transform-origin: 180px 140px; }
#box .anim { transform-box: fill-box; transform-origin: 50% 100%; }
@media (prefers-reduced-motion: reduce) {
  #box.untied .bow, #box.untied .ribbon { opacity: 0; }
  #box.opened:not(.home) .lid { opacity: 0; }
  #box.opened:not(.home) .glow { opacity: 1; }
  .rise-medal { transition: none; }
}
@media (prefers-reduced-motion: no-preference) {
  #box .hole { animation: pulse 2.2s ease-in-out infinite; }
  #box .slot:not(.empty) .anim { animation: bob 3.2s ease-in-out infinite; }
  #box .slot:nth-child(2n) .anim { animation-delay: -1.1s; }
  #box .slot:nth-child(3n) .anim { animation-delay: -2.2s; }
}
@keyframes pulse { 50% { transform: scale(1.08); opacity: .75; } }
/* подсказка на самой коробке: что делать сейчас (data-next ставит main.js) */
#box .bow { transform-box: view-box; transform-origin: 180px 99px; }
#stage[data-next="untie"] #box .bow { filter: drop-shadow(0 0 4px #fff) drop-shadow(0 0 10px #ffd36e); }
#stage[data-next="open"] #box .lid-front, #stage[data-next="open"] #box .lid-top { stroke: #fff; stroke-width: 4; }
@media (prefers-reduced-motion: no-preference) {
  #stage[data-next="shake"] #v9-all { animation: box-nudge 3s ease-in-out infinite; }
  #stage[data-next="untie"] #box .bow { animation: bow-pulse 1.4s ease-in-out infinite; }
  #stage[data-next="open"] #box .lid { animation: lid-peek 2.2s ease-in-out infinite; }
}
@keyframes box-nudge { 0%, 70%, 100% { transform: none; } 76% { transform: rotate(-2deg); } 82% { transform: rotate(2deg); } 88% { transform: rotate(-1deg); } }
@keyframes bow-pulse { 50% { transform: scale(1.12); } }
@keyframes lid-peek { 0%, 55%, 100% { transform: none; } 72% { transform: translateY(-9px) rotate(-1.5deg); } 86% { transform: translateY(-2px); } }
@keyframes bob { 50% { transform: translateY(-2.5px); } }

/* ------------------------------------------------------------------ шаги и кнопки */
.steps { list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; justify-content: center; }
.steps li {
  display: flex; align-items: center; gap: 6px; padding: 6px 12px 6px 6px; border-radius: 99px;
  background: var(--bg2); color: var(--muted); font-weight: 700; font-size: 14px;
}
.steps li i { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-style: normal; background: var(--card); font-size: 13px; }
.steps li.now { background: var(--accent); color: var(--accent-ink); }
.steps li.now i { color: var(--ink); }
.steps li.done i { background: var(--gold); color: #3d2f55; }
.dots { display: flex; gap: 3px; }
.dots u { width: 7px; height: 7px; border-radius: 50%; background: currentColor; opacity: .3; }
.dots u.on { opacity: 1; }

.acts { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 12px 24px; border-radius: 99px; border: 0;
  font-weight: 800; font-size: 17px; text-decoration: none; cursor: pointer; text-align: center;
  transition: transform .15s;
}
.btn:active { transform: scale(.97); }
.btn-main { background: linear-gradient(180deg, #8a6cff, #6c4ee6); color: #fff; box-shadow: 0 8px 20px rgba(108, 78, 230, .35); }
.btn-ghost { background: transparent; border: 2px solid var(--line); color: var(--ink); }
.btn[disabled] { opacity: .7; cursor: default; }
.btn[hidden] { display: none; }   /* .btn ставит inline-flex — без этого hidden не прячет кнопку */
/* кнопки сцены: подсвечена только наступна дія (.is-next, ставит main.js), остальные приглушены */
.btn-act { background: transparent; border: 2px solid var(--line); color: var(--muted); }
.btn-act.is-next {
  background: linear-gradient(180deg, #8a6cff, #6c4ee6); color: #fff; border-color: transparent;
  box-shadow: 0 8px 20px rgba(108, 78, 230, .35);
}
.btn-act[disabled] { opacity: .42; cursor: not-allowed; }
.btn-act[disabled]:active { transform: none; }
.btn-act.is-live[disabled] { opacity: 1; border-color: var(--accent); color: var(--accent); cursor: default; }
.btn-sub { font-size: 15px; min-height: 44px; padding: 10px 18px; }
@media (prefers-reduced-motion: no-preference) {
  .btn-act.is-next { animation: next-pulse 1.8s ease-out infinite; }
}
@media (prefers-reduced-motion: reduce) {
  .btn-act.is-next { outline: 3px solid var(--gold); outline-offset: 3px; }
}
@keyframes next-pulse {
  0% { box-shadow: 0 8px 20px rgba(108, 78, 230, .35), 0 0 0 0 rgba(108, 78, 230, .55); }
  70%, 100% { box-shadow: 0 8px 20px rgba(108, 78, 230, .35), 0 0 0 14px rgba(108, 78, 230, 0); }
}
.hint { color: var(--muted); font-size: 15px; text-align: center; }
.link-btn { background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; color: var(--accent); font-weight: 700; }

/* ------------------------------------------------------------------ разделы */
.sec { padding: 56px var(--gut) 8px; }
.sec h2 { font-size: clamp(1.8rem, 7vw, 2.6rem); }
.sec-lead { color: var(--muted); margin-top: 10px; max-width: 38em; }
.note { color: var(--muted); font-size: 14px; margin-top: 12px; }
.sec.pre { opacity: 0; transform: translateY(24px); }
.sec.pre.in { opacity: 1; transform: none; transition: opacity .6s, transform .6s cubic-bezier(.2, .8, .2, 1); }

/* друзья */
.car-wrap { position: relative; margin-top: 18px; }
.car { list-style: none; margin: 0; padding: 4px 0 10px; display: flex; gap: 12px; }
.fr-btn {
  width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 16px 12px 18px; border-radius: 24px; border: 0; background: var(--card); box-shadow: var(--shadow);
  cursor: pointer; text-align: center;
}
.fr-art { width: 112px; height: 112px; overflow: visible; }
.fr-name { font-size: 19px; font-weight: 800; }
.fr-act { color: var(--muted); font-size: 15px; }
.car-nav { display: flex; gap: 8px; justify-content: flex-end; margin-top: 6px; }
.car-btn { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--line); background: var(--card); display: grid; place-items: center; cursor: pointer; }
.car-btn svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linecap: round; stroke-linejoin: round; }

/* трюки друзей (коробка и карточки) */
.cr-art, .cr-art .p-tail, .cr-art .p-ears, .cr-art .p-eyes, .cr-art .p-arm, .cr-art .p-head { transform-box: fill-box; }
.cr-art { transform-origin: 50% 100%; }
.cr-play .cr-unicorn { animation: hop .9s cubic-bezier(.3, .7, .3, 1); }
.cr-play .cr-unicorn .p-head { transform-origin: 50% 90%; animation: nod .9s; }
.cr-play .cr-owl { animation: tilt 1s ease-in-out; }
.cr-play .cr-owl .p-eyes { transform-origin: 50% 50%; animation: blink .5s 2; }
.cr-play .cr-owl .p-arm { transform-origin: 80% 10%; animation: flap .5s 2; }
.cr-play .cr-fox .p-tail { transform-origin: 0% 100%; animation: wag 1.1s ease-in-out; }
.cr-play .cr-fox .p-head { transform-origin: 50% 100%; animation: tilt 1.1s ease-in-out; }
.cr-play .cr-dolphin { animation: leap 1.1s cubic-bezier(.3, .6, .4, 1); }
.cr-play .cr-dolphin .p-tail { transform-origin: 100% 30%; animation: flap .3s 3; }
.cr-play .cr-bunny { animation: hop .8s cubic-bezier(.3, .7, .3, 1); }
.cr-play .cr-bunny .p-ears { transform-origin: 50% 100%; animation: wiggle .8s; }
.cr-play .cr-cat { animation: stretch 1.2s ease-in-out; }
.cr-play .cr-cat .p-tail { transform-origin: 0% 100%; animation: wag 1.2s ease-in-out; }
.cr-play .cr-penguin { animation: waddle 1s ease-in-out; }
.cr-play .cr-penguin .p-arm { transform-origin: 80% 10%; animation: flap .25s 4; }
.cr-play .cr-panda .p-arm { transform-origin: 70% 20%; animation: wave 1.1s ease-in-out; }
.cr-play .cr-panda .p-head { transform-origin: 50% 100%; animation: tilt 1.1s ease-in-out; }
@keyframes hop { 30% { transform: translateY(-18%) scale(1.04, .96); } 55% { transform: translateY(0) scale(1.08, .9); } 75% { transform: translateY(-4%); } }
@keyframes nod { 40% { transform: rotate(-10deg); } 70% { transform: rotate(6deg); } }
@keyframes tilt { 30% { transform: rotate(-9deg); } 65% { transform: rotate(8deg); } }
@keyframes blink { 50% { transform: scaleY(.1); } }
@keyframes flap { 50% { transform: rotate(-24deg); } }
@keyframes wag { 20% { transform: rotate(-16deg); } 45% { transform: rotate(14deg); } 70% { transform: rotate(-10deg); } }
@keyframes leap { 40% { transform: translate(6%, -26%) rotate(-14deg); } 70% { transform: translate(-2%, -6%) rotate(8deg); } }
@keyframes wiggle { 20% { transform: rotate(-14deg); } 40% { transform: rotate(12deg); } 60% { transform: rotate(-8deg); } 80% { transform: rotate(5deg); } }
@keyframes stretch { 35% { transform: scale(1.18, .84); } 65% { transform: scale(.94, 1.06); } }
@keyframes waddle { 20% { transform: rotate(-10deg); } 40% { transform: rotate(10deg); } 60% { transform: rotate(-8deg); } 80% { transform: rotate(6deg); } }
@keyframes wave { 15% { transform: rotate(-50deg); } 35% { transform: rotate(-20deg); } 55% { transform: rotate(-50deg); } 75% { transform: rotate(-20deg); } }
@media (prefers-reduced-motion: reduce) {
  .cr-play .cr-art, .cr-play .cr-art * { animation: none !important; }
  .cr-play .cr-art { filter: drop-shadow(0 0 6px #ffd36e); }
}

/* как играть */
.how-list { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 12px; }
.how-card { position: relative; padding: 18px 18px 20px 86px; border-radius: 24px; background: var(--card); box-shadow: var(--shadow); min-height: 96px; }
.how-card svg { position: absolute; left: 16px; top: 18px; width: 54px; height: 54px; fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.how-n { position: absolute; left: 54px; top: 56px; width: 24px; height: 24px; border-radius: 50%; background: var(--gold); color: #3d2f55; display: grid; place-items: center; font-size: 13px; }
.how-card h3 { font-size: 20px; }
.how-card p { color: var(--muted); margin-top: 4px; font-size: 16px; }

/* колекція */
.col-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.col-n { font-size: 18px; padding: 4px 12px; border-radius: 99px; background: var(--bg2); }
.col-grid { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.cell { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.cell > svg, .cell-q {
  width: 100%; aspect-ratio: 1; height: auto; border-radius: 20px; background: var(--card); box-shadow: var(--shadow); padding: 8%;
}
.cell-q { display: grid; place-items: center; font-size: 28px; font-weight: 900; color: var(--muted); background: var(--bg2); box-shadow: none; border: 2px dashed var(--line); }
.cell-name { font-size: 12px; font-weight: 700; text-align: center; line-height: 1.2; overflow-wrap: anywhere; }

/* ім'я */
.field { display: grid; gap: 6px; margin-top: 18px; font-weight: 700; }
.field input {
  font: 700 20px var(--round); color: var(--ink); background: var(--card); border: 2px solid var(--line);
  border-radius: 16px; padding: 12px 16px; min-height: 52px; width: 100%;
}
.field input:focus { outline: 3px solid var(--accent); outline-offset: 1px; }
.sticker { width: 100%; max-width: 360px; height: auto; margin: 20px auto 0; }
.sticker .st-bg { fill: #fff6e4; stroke: #3d2f55; stroke-width: 3; }
.sticker .st-line { fill: none; stroke: #ff8fb1; stroke-width: 2.5; stroke-dasharray: 6 6; }
.sticker .st-star { fill: #f5b83d; stroke: #3d2f55; stroke-width: 1.5; stroke-linejoin: round; }
.sticker .st-t { font: 900 26px var(--round); fill: #3d2f55; }

/* батькам */
.par-grid { display: grid; gap: 12px; margin-top: 18px; }
.par-card { padding: 18px 20px; border-radius: 22px; background: var(--card); border: 1px solid var(--line); }
.par-card h3 { font-size: 19px; }
.par-card ul { margin: 10px 0 0; padding-left: 20px; display: grid; gap: 8px; color: var(--muted); }
.par-card li::marker { color: var(--accent); }
.par-known { border-top: 5px solid #6fc49a; }
.par-surprise { border-top: 5px solid var(--pink); }
.par-care { border-top: 5px solid var(--gold); }
.thumbs { margin-top: 22px; }
.thumbs h3 { font-size: 17px; }
.thumb-row { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.thumb-row img { width: 96px; height: 96px; object-fit: cover; border-radius: 16px; background: #1b1416; }
.attr { color: var(--muted); font-size: 12px; margin-top: 16px; overflow-wrap: anywhere; }

/* призыв */
.cta { text-align: center; }
.cta .sec-lead { margin-inline: auto; }
.cta-btns { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 20px; }

.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 40px var(--gut) 28px; color: var(--muted); font-size: 14px; }

/* ------------------------------------------------------------------ лист раскрытия */
.reveal { border: 0; padding: 0; background: var(--card); color: var(--ink); box-shadow: 0 20px 60px rgba(0, 0, 0, .3); }
.reveal::backdrop { background: rgba(24, 12, 48, .55); }
.rv-in { position: relative; }
.rv-x {
  position: absolute; right: 12px; top: 12px; z-index: 2; width: 44px; height: 44px; border-radius: 50%; border: 0;
  background: rgba(255, 255, 255, .85); color: #3d2f55; display: grid; place-items: center; cursor: pointer;
}
.rv-x svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }
/* шоколад тёмный → фон светлый в любой теме */
.rv-stage {
  position: relative; aspect-ratio: 1; width: 100%;
  background: radial-gradient(circle at 50% 45%, #fffaf2 0%, #fbeedd 55%, #f3dcc2 100%);
}
.rv-2d, .rv-3d { position: absolute; inset: 0; width: 100%; height: 100%; }
.rv-2d { padding: 16%; object-fit: contain; }
.rv-3d { touch-action: none; cursor: grab; }
.rv-3d:active { cursor: grabbing; }
.rv-3d[hidden], .rv-2d[hidden] { display: none; }
.rv-copy { padding: 18px 20px 22px; display: grid; gap: 8px; }
.rv-copy h2 { font-size: 30px; }
.rv-size { font-weight: 700; }
.rv-hint { color: var(--muted); font-size: 14px; }
.rv-btns { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.rv-copy .attr { margin-top: 4px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
  html.ready .kin .w > span { animation: none !important; }
  .sec.pre { opacity: 1; transform: none; }
}

/* заказ коробки (пак): выбор шоколада и числа медальонов, цена из API */
.pk-pick { display: flex; flex-wrap: wrap; gap: 14px 24px; justify-content: center; margin-top: 18px; }
.pk-g { border: 0; padding: 0; margin: 0; min-width: 0; }
.pk-g legend { font-weight: 700; font-size: 14px; color: var(--muted); padding: 0; margin: 0 auto 8px; }
.pk-opts { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.pk-o { position: relative; }
.pk-o input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.pk-o span {
  display: inline-flex; align-items: center; min-height: 44px; padding: 8px 16px; border-radius: 999px;
  border: 2px solid var(--line); background: var(--card); color: var(--ink); font-weight: 700; cursor: pointer;
}
.pk-o input:checked + span { border-color: var(--accent); background: var(--accent); color: var(--accent-ink); }
.pk-o input:focus-visible + span { outline: 3px solid var(--accent); outline-offset: 2px; }
.pk-price { margin-top: 16px; display: flex; flex-wrap: wrap; gap: 4px 10px; justify-content: center; align-items: baseline; }
.pk-price .pk-v { font-size: 22px; font-weight: 800; }
.pk-price .pk-demo { font-size: 13px; color: var(--muted); }
.pk-price[hidden], .pk-g[hidden] { display: none; }
