:root {
  --ink: #0a0a0a;
  --muted: #6b6b70;
  --muted-2: #5f5f66;
  --faint: #8a8a90;
  --line: #ededef;
  --line-2: #e4e4e7;
  --cell: #e8e8ea;
  --hover: #fafafa;
  --danger: #b42318;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: #ffffff;
  color: var(--ink);
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  font-feature-settings: "tnum" 1, "cv11" 1;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--ink); }
button { font-family: inherit; }
input::placeholder { color: var(--faint); }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.page { min-height: 100vh; display: flex; flex-direction: column; }
.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.site-header .bar { position: relative; height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { display: flex; align-items: center; gap: 7px; color: var(--ink); text-decoration: none; }
.logo span { font: 600 16px/1 Inter, sans-serif; letter-spacing: -0.035em; }
.nav { display: flex; align-items: center; gap: 20px; }
.nlink { display: flex; align-items: center; gap: 6px; font: 500 13px/1 Inter, sans-serif; color: var(--muted); text-decoration: none; }
.nlink:hover { color: var(--ink); }
.cart-btn {
  height: 36px; padding: 0 5px 0 14px; border-radius: 999px; border: 1px solid var(--line-2);
  background: #fff; color: var(--ink); display: flex; align-items: center; gap: 10px; cursor: pointer;
  font: 500 13px/1 Inter, sans-serif;
}
.cart-btn:hover { background: #f4f4f5; }
.badge {
  min-width: 26px; height: 26px; padding: 0 7px; border-radius: 999px; background: var(--ink); color: #fff;
  display: flex; align-items: center; justify-content: center; font: 600 12px/1 Inter, sans-serif;
}
.cart-panel {
  position: absolute; right: 24px; top: 62px; width: min(340px, calc(100vw - 32px)); max-height: 520px; overflow-y: auto;
  padding: 16px; border-radius: 14px; background: #fff; border: 1px solid var(--line-2);
  box-shadow: 0 16px 40px rgba(0,0,0,0.08); display: flex; flex-direction: column; gap: 12px;
  opacity: 0; visibility: hidden; transform: translateY(-8px) scale(.98); transform-origin: top right;
  transition: opacity .2s ease, transform .28s cubic-bezier(.2,.8,.2,1), visibility 0s linear .28s;
}
.cart-panel.open { opacity: 1; visibility: visible; transform: none; transition: opacity .2s ease, transform .28s cubic-bezier(.2,.8,.2,1), visibility 0s; }
.cart-panel .head { display: flex; align-items: center; justify-content: space-between; font: 600 14px/1 Inter, sans-serif; }
.icon-btn { width: 30px; height: 30px; border-radius: 999px; border: 0; background: transparent; color: var(--ink); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.icon-btn:hover { background: #f4f4f5; }
.cart-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f0f0f2; }
.cart-row .meta { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.t-name { font: 500 13px/1.3 Inter, sans-serif; }
.t-sub { font: 400 12px/1.3 Inter, sans-serif; color: var(--muted); }
.total-row { display: flex; justify-content: space-between; align-items: baseline; }
.total-row .lbl { font: 400 13px/1 Inter, sans-serif; color: var(--muted); }
.total-row .val { font: 600 17px/1 Inter, sans-serif; }
.empty { color: var(--muted); font-size: 13px; }

/* ---------- buttons ---------- */
.btn {
  height: 42px; padding: 0 18px; border-radius: 10px; border: 0; background: var(--ink); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; cursor: pointer;
  font: 600 14px/1 Inter, sans-serif; transition: background-color .15s;
}
.btn:hover { background: #2a2a2e; color: #fff; }
.btn.sm { height: 32px; padding: 0 14px; border-radius: 8px; font: 500 13px/1 Inter, sans-serif; }
.btn.lg { height: 50px; border-radius: 12px; font-size: 15px; }
.btn.out { background: #fff; color: var(--ink); border: 1px solid var(--line-2); font-weight: 500; }
.btn.out:hover { background: #f4f4f5; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.stepper { display: flex; align-items: center; flex-shrink: 0; border: 1px solid var(--line-2); border-radius: 8px; background: #fff; }
.stepper button { width: 28px; height: 28px; border: 0; background: transparent; color: var(--ink); cursor: pointer; font: 500 15px/1 Inter, sans-serif; }
.stepper span { min-width: 14px; text-align: center; font: 500 13px/1 Inter, sans-serif; }
.stepper.md button { width: 30px; height: 30px; }

/* ---------- hero ---------- */
.hero-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; padding: 24px 0; cursor: ew-resize; user-select: none; }
.hero-word { margin: 0; flex: 1 1 220px; font: 600 clamp(40px, 5vw, 64px)/1 Inter, sans-serif; letter-spacing: -0.055em; }
.hero-word.l { text-align: right; }
.hero-word.r { text-align: left; }
.stage { position: relative; flex: 0 0 auto; width: min(380px, 84vw); aspect-ratio: 1 / 1; }
.stage .c { position: absolute; width: 14px; height: 14px; border-color: #c4c4c9; border-style: solid; border-width: 0; }
.stage .tl { left: 0; top: 0; border-left-width: 1px; border-top-width: 1px; }
.stage .tr { right: 0; top: 0; border-right-width: 1px; border-top-width: 1px; }
.stage .bl { left: 0; bottom: 0; border-left-width: 1px; border-bottom-width: 1px; }
.stage .br { right: 0; bottom: 0; border-right-width: 1px; border-bottom-width: 1px; }
.stage .plate { position: absolute; left: 50%; bottom: 9%; width: 55%; height: 10.5%; transform: translateX(-50%); border-radius: 50%; border: 1px solid var(--line-2); }
.hero-spr { position: absolute; inset: 0; background: url(../img/rub.webp) no-repeat 0 0; }
.stage .deg { position: absolute; right: 12px; bottom: 10px; font: 500 11px/1 Inter, sans-serif; color: var(--faint); }
.hero-foot { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); align-items: center; gap: 16px; padding: 16px 0 20px; border-top: 1px solid var(--line); }
.hero-foot .desc { font: 400 13px/1.5 Inter, sans-serif; color: var(--muted); max-width: 300px; }
.hero-foot .hint { font: 400 12px/1.5 Inter, sans-serif; color: var(--faint); text-align: center; }
.hero-foot .btn { justify-self: end; height: 38px; font-weight: 500; }

/* ---------- catalog ---------- */
.catalog { padding: 40px 24px 48px; display: flex; flex-direction: column; gap: 14px; }
.catalog .head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.catalog h2 { margin: 0; font: 600 20px/1.2 Inter, sans-serif; letter-spacing: -0.03em; }
.catalog .note { font: 400 12px/1.4 Inter, sans-serif; color: var(--faint); }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); border-top: 1px solid var(--cell); border-left: 1px solid var(--cell); }
.cell { display: flex; flex-direction: column; gap: 10px; padding: 14px 16px 16px; border-right: 1px solid var(--cell); border-bottom: 1px solid var(--cell); transition: background-color .2s; }
.cell:hover { background: var(--hover); }
.cell .top { display: flex; justify-content: space-between; font: 500 11px/1 Inter, sans-serif; color: var(--faint); }
.cell .pic { display: flex; justify-content: center; padding: 4px 0; }
.cell h3 { margin: 0; font: 500 14px/1.35 Inter, sans-serif; }
.cell .plan { font: 400 13px/1.35 Inter, sans-serif; color: var(--muted); }
.cell .buy { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.price { font: 600 15px/1 Inter, sans-serif; }

/* ---------- 3D sprites ---------- */
.spr { width: 128px; height: 128px; background-repeat: no-repeat; background-size: 768px 768px;
  animation: sprX .5s steps(6) infinite, sprY 3s steps(6) infinite; animation-play-state: paused; }
.cell:hover .spr, .spr.auto { animation-play-state: running; }
@keyframes sprX { from { background-position-x: 0; } to { background-position-x: -768px; } }
@keyframes sprY { from { background-position-y: 0; } to { background-position-y: -768px; } }
.thumb { width: 52px; height: 52px; flex-shrink: 0; background-repeat: no-repeat; background-size: 312px 312px; background-position: 0 0; }
.s-note { background-image: url(../img/note.webp); }
.s-headphones { background-image: url(../img/headphones.webp); }
.s-play { background-image: url(../img/play.webp); }
.s-bubble { background-image: url(../img/bubble.webp); }
.s-coins { background-image: url(../img/coins.webp); }
.s-gamepad { background-image: url(../img/gamepad.webp); }
.s-card { background-image: url(../img/card.webp); }
.s-cross { background-image: url(../img/cross.webp); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); margin-top: auto; }
.f-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr)); border-bottom: 1px solid var(--line); }
.f-col { display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 28px 16px; }
.f-col + .f-col { border-left: 1px solid var(--line); }
.f-col:first-child { padding-left: 0; flex-direction: row; align-items: center; justify-content: flex-start; }
.f-col:last-child { padding-right: 0; }
.f-col img { display: block; width: 100%; max-width: 260px; height: auto; }
.f-label { font: 500 11px/1 Inter, sans-serif; color: var(--faint); margin-bottom: 6px; }
.f-strong { font: 600 13px/1.5 Inter, sans-serif; }
.f-text { font: 400 12px/1.5 Inter, sans-serif; color: var(--muted); }
.f-link { font: 500 13px/1.5 Inter, sans-serif; color: var(--ink); text-decoration: none; }
.f-link:hover { color: var(--muted); }
.f-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; padding: 14px 0 24px; font: 400 12px/1.5 Inter, sans-serif; color: var(--faint); }
@media (max-width: 560px) { .f-col + .f-col { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; } }

/* ---------- checkout ---------- */
.co { flex-grow: 1; padding: 28px 24px 64px; display: flex; flex-direction: column; gap: 20px; }
.crumbs { font: 400 12px/1 Inter, sans-serif; color: var(--faint); }
.co h1 { margin: 6px 0 0; font: 600 28px/1.15 Inter, sans-serif; letter-spacing: -0.035em; }
.co-cols { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 40px; }
.co-main { flex: 1 1 460px; min-width: 0; display: flex; flex-direction: column; }
.step { display: flex; flex-direction: column; gap: 14px; padding: 20px 0 24px; border-top: 1px solid var(--line); }
.step-h { display: flex; align-items: baseline; gap: 10px; }
.step-h .n { font: 500 12px/1 Inter, sans-serif; color: var(--faint); }
.step-h h2 { margin: 0; font: 600 15px/1.2 Inter, sans-serif; }
.field { display: flex; flex-direction: column; gap: 6px; max-width: 420px; }
.field label { font: 500 12px/1 Inter, sans-serif; color: var(--muted); }
.field input { height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line-2); background: #fff; color: var(--ink); font: 400 15px/1 Inter, sans-serif; }
.field input[aria-invalid="true"] { border-color: var(--danger); }
.field .help { font: 400 12px/1.4 Inter, sans-serif; color: var(--faint); }
.field .err { font: 400 12px/1.4 Inter, sans-serif; color: var(--danger); display: none; }
.field .err.show { display: block; }
.opts { display: flex; flex-direction: column; gap: 8px; border: 0; margin: 0; padding: 0; }
.opt { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--line-2); cursor: pointer; transition: border-color .15s; }
.opt:hover { border-color: #a1a1a8; }
.opt:has(input:checked) { border-color: var(--ink); }
.opt input { width: 18px; height: 18px; margin: 0; accent-color: var(--ink); flex-shrink: 0; }
.opt .txt { display: flex; flex-direction: column; gap: 3px; }
.opt .t1 { font: 500 14px/1.3 Inter, sans-serif; }
.opt .t2 { font: 400 12px/1.4 Inter, sans-serif; color: var(--muted); }
.pay { display: flex; flex-direction: column; gap: 12px; padding-top: 20px; border-top: 1px solid var(--line); }
.fine { font: 400 12px/1.5 Inter, sans-serif; color: var(--faint); }
.summary { flex: 0 1 360px; min-width: 280px; border: 1px solid #ececee; border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 4px; }
.summary .sh { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 8px; }
.summary h2 { margin: 0; font: 600 15px/1.2 Inter, sans-serif; }
.s-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid #f0f0f2; }
.s-row .meta { flex-grow: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.s-row .stepper { margin-top: 4px; align-self: flex-start; }
.s-row .stepper button { width: 26px; height: 26px; font-size: 14px; }
.s-row .line { font: 600 13px/1 Inter, sans-serif; align-self: flex-start; padding-top: 2px; }
.s-meta { display: flex; justify-content: space-between; padding-top: 12px; font: 400 13px/1.4 Inter, sans-serif; color: var(--muted); }
.s-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: 6px; }
.s-total span:first-child { font: 500 14px/1 Inter, sans-serif; }
.s-total span:last-child { font: 600 22px/1 Inter, sans-serif; letter-spacing: -0.03em; }

/* ---------- failed ---------- */
.fail { flex-grow: 1; width: 100%; max-width: 560px; margin: 0 auto; padding: 56px 24px 72px; display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.fail .spr { margin-left: -12px; }
.fail .kicker { font: 500 12px/1 Inter, sans-serif; color: var(--danger); }
.fail h1 { margin: 10px 0; font: 600 32px/1.1 Inter, sans-serif; letter-spacing: -0.04em; }
.fail p { margin: 0; font: 400 15px/1.55 Inter, sans-serif; color: var(--muted-2); }
.facts { margin: 0; width: 100%; border-top: 1px solid var(--line); }
.facts div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.facts dt { font: 400 13px/1.4 Inter, sans-serif; color: var(--muted); }
.facts dd { margin: 0; font: 500 13px/1.4 Inter, sans-serif; text-align: right; }
.todo { display: flex; flex-direction: column; gap: 8px; }
.todo b { font: 600 13px/1.4 Inter, sans-serif; }
.todo ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 4px; font: 400 13px/1.5 Inter, sans-serif; color: var(--muted-2); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
.actions .btn { height: 44px; padding: 0 20px; }

/* ---------- motion ---------- */
@view-transition { navigation: auto; }
.site-header { view-transition-name: site-header; }
.site-footer { view-transition-name: site-footer; }
::view-transition-old(root) { animation: vtOut .2s ease both; }
::view-transition-new(root) { animation: vtIn .42s cubic-bezier(.2,.8,.2,1) both; }
@keyframes vtOut { to { opacity: 0; transform: translateY(-8px); filter: blur(2px); } }
@keyframes vtIn { from { opacity: 0; transform: translateY(14px); filter: blur(2px); } }
@supports not (view-transition-name: none) {
  .page > main { animation: vtIn .45s cubic-bezier(.2,.8,.2,1) both; }
}
.btn, .cart-btn, .stepper button { transition: background-color .15s, transform .12s; }
.btn:active, .cart-btn:active, .stepper button:active { transform: scale(.96); }

.hero-word.l { animation: inL .9s cubic-bezier(.2,.8,.2,1) .05s both; }
.hero-word.r { animation: inR .9s cubic-bezier(.2,.8,.2,1) .05s both; }
.stage { animation: inStage 1.1s cubic-bezier(.2,.8,.2,1) both; }
.stage .c { animation: inFade .6s ease .5s both; }
.hero-foot { animation: inUp .7s cubic-bezier(.2,.8,.2,1) .35s both; }
@keyframes inL { from { opacity: 0; transform: translateX(-40px); } }
@keyframes inR { from { opacity: 0; transform: translateX(40px); } }
@keyframes inStage { from { opacity: 0; transform: scale(.88) translateY(16px); } }
@keyframes inFade { from { opacity: 0; } }
@keyframes inUp { from { opacity: 0; transform: translateY(14px); } }

.stagger > * { animation: inUp .6s cubic-bezier(.2,.8,.2,1) both; }
.stagger > *:nth-child(2) { animation-delay: .06s; }
.stagger > *:nth-child(3) { animation-delay: .12s; }
.stagger > *:nth-child(4) { animation-delay: .18s; }
.stagger > *:nth-child(5) { animation-delay: .24s; }
.stagger > *:nth-child(n+6) { animation-delay: .3s; }

.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.stagger > .reveal { animation: none; }

.badge.bump { animation: bump .45s cubic-bezier(.3,1.6,.5,1); }
@keyframes bump { 0% { transform: scale(1); } 40% { transform: scale(1.35); } 100% { transform: scale(1); } }
.fly { position: fixed; z-index: 100; width: 128px; height: 128px; pointer-events: none; background-repeat: no-repeat; background-size: 768px 768px; background-position: 0 0; }
.s-row { animation: inUp .4s cubic-bezier(.2,.8,.2,1) both; }

.spin { display: none; width: 14px; height: 14px; border-radius: 50%; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; animation: rot .7s linear infinite; }
.btn.loading .spin { display: inline-block; }
@keyframes rot { to { transform: rotate(360deg); } }
.fail .s-cross { animation: sprX .5s steps(6) infinite, sprY 3s steps(6) infinite, shake .6s cubic-bezier(.36,.07,.19,.97) .2s both; }
@keyframes shake { 10%, 90% { transform: translateX(-2px); } 20%, 80% { transform: translateX(4px); } 30%, 50%, 70% { transform: translateX(-6px); } 40%, 60% { transform: translateX(6px); } }

/* ---------- legal ---------- */
.legal { flex-grow: 1; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 48px; padding-top: 32px; padding-bottom: 72px; }
.legal-side { flex: 0 0 240px; position: sticky; top: 80px; display: flex; flex-direction: column; gap: 24px; }
.legal-nav { display: flex; flex-direction: column; border-left: 1px solid var(--line); }
.legal-nav a { padding: 8px 0 8px 14px; margin-left: -1px; border-left: 1px solid transparent; font: 500 13px/1.3 Inter, sans-serif; color: var(--muted); text-decoration: none; transition: color .15s, border-color .15s; }
.legal-nav a:hover { color: var(--ink); }
.legal-nav a.on { color: var(--ink); border-left-color: var(--ink); }
.legal-toc span { font: 500 11px/1 Inter, sans-serif; color: var(--faint); }
.legal-toc ol { margin: 10px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; counter-reset: t; }
.legal-toc li { counter-increment: t; }
.legal-toc a { font: 400 12px/1.4 Inter, sans-serif; color: var(--muted); text-decoration: none; }
.legal-toc a::before { content: counter(t) ". "; color: var(--faint); }
.legal-toc a:hover { color: var(--ink); }
.doc { flex: 1 1 520px; min-width: 0; max-width: 720px; display: flex; flex-direction: column; }
.doc h1 { margin: 8px 0 6px; font: 600 32px/1.1 Inter, sans-serif; letter-spacing: -0.04em; }
.doc-date { font: 400 12px/1.4 Inter, sans-serif; color: var(--faint); }
.doc .doc-lead { margin: 20px 0 8px; font: 400 16px/1.6 Inter, sans-serif; color: var(--muted-2); }
.doc section { padding: 24px 0 4px; border-top: 1px solid var(--line); margin-top: 20px; scroll-margin-top: 72px; }
.doc h2 { margin: 0 0 12px; display: flex; gap: 12px; align-items: baseline; font: 600 17px/1.3 Inter, sans-serif; letter-spacing: -0.02em; }
.doc h2 span { font: 500 12px/1 Inter, sans-serif; color: var(--faint); min-width: 16px; }
.doc p, .doc li { font: 400 14px/1.7 Inter, sans-serif; color: #2b2b30; }
.doc p { margin: 0 0 12px; }
.doc ul { margin: 0 0 12px; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; }
.doc a { color: var(--ink); text-underline-offset: 2px; }
mark.ph { background: #fff4c2; color: #6b4e00; padding: 0 3px; border-radius: 3px; }
@media (max-width: 820px) { .legal-side { position: static; flex-basis: 100%; } .legal-toc { display: none; } .legal-nav { flex-direction: row; flex-wrap: wrap; border-left: 0; gap: 4px 14px; } .legal-nav a { padding: 6px 0; border-left: 0; border-bottom: 1px solid transparent; } .legal-nav a.on { border-bottom-color: var(--ink); } }

@media (max-width: 700px) {
  .hero-word, .hero-word.l, .hero-word.r { flex-basis: 100%; text-align: center; }
  .hero-foot .hint { display: none; }
  .hero-foot .btn { justify-self: start; }
}
@media (max-width: 560px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cell { padding: 12px; }
  .cell .spr { transform: scale(.85); }
  .cell .buy { flex-wrap: wrap; }
  .catalog .note { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .spr, .fail .s-cross { animation: none; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; transition-duration: .001ms !important; }
  .reveal { opacity: 1; transform: none; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
}
.cell.reveal { transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1), background-color .2s; }
