/* COLDBLOOD design system. One idea: a cold steel interface that blood gets into.
   Ice (--ice) is the calm state: labels, numbers, focus. Blood (--blood) is action and infection: buttons, prices, alerts.
   --acc is ice by default; blood is scoped to infection and zombie showcases. */

@property --acc { syntax: '<color>'; inherits: true; initial-value: #8fd6f0; }

:root {
  --bg: #06090c; --bg2: #0a0f14; --panel: #0e151b; --panel2: #131c24;
  --ink: #e8f0f4; --mute: #a8b7c1; --dim: #91a4b0;
  --line: rgba(170, 210, 230, .13); --line2: rgba(170, 210, 230, .28);
  --ice: #8fd6f0; --blood: #d5102b; --blood-hi: #ff4058; --amber: #ffb224; --ok: #5fdc93;
  --acc: #8fd6f0;
  --display: Impact, "Arial Narrow", sans-serif;
  --body: "Segoe UI", system-ui, sans-serif;
  --mono: Consolas, "Courier New", monospace;
  --pad: clamp(16px, 4.4vw, 72px); --top-h: 64px; --tab-h: 0px;
  --ease: cubic-bezier(.2, .7, .2, 1); --snap: cubic-bezier(.7, 0, .2, 1);
  color-scheme: dark;
}
#infect, #zombies, .nem { --acc: #ff4058; }

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--bg); scrollbar-color: #24313b var(--bg); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100svh; background: var(--bg); color: var(--ink);
  font: 400 16.5px/1.55 var(--body); -webkit-font-smoothing: antialiased;
  padding-bottom: var(--tab-h); overflow-x: clip; transition: --acc .8s;
}
/* film grain over everything: one small tile, rasterised once */
body::before {
  content: ""; position: fixed; inset: 0; z-index: 90; pointer-events: none; opacity: .025;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}
::selection { background: var(--blood); color: #fff; }
h1, h2, h3, h4 { margin: 0; font-family: var(--display); font-weight: 900; text-transform: uppercase; line-height: .9; letter-spacing: .005em; text-wrap: balance; }
p { margin: 0; max-width: 62ch; }
a { color: inherit; text-underline-offset: 4px; }
img, svg, canvas { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }
code, kbd { font-family: var(--mono); font-size: .88em; }
kbd { display: inline-block; padding: 1px 7px; border: 1px solid var(--line2); border-bottom-width: 2px; color: var(--ink); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--ice); outline-offset: 3px; }
[hidden] { display: none !important; }

/* ---------- type ---------- */
.h-xl { font-size: clamp(56px, 9.4vw, 148px); }
.h-lg { font-size: clamp(40px, 4.8vw, 72px); line-height: .96; }
.h-md { font-size: clamp(30px, 3.2vw, 46px); line-height: .95; }
.h-sm { font-size: 26px; line-height: 1; font-weight: 800; }
.lead { font-size: 18px; line-height: 1.55; max-width: 48ch; color: var(--mute); margin-top: 20px; }
.mute { color: var(--mute); }
.acc { color: var(--acc); }
.hot { color: var(--blood-hi); }
.num { font-family: var(--mono); font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
/* small mono label over a heading: <p class="eyebrow"><b>01</b>Раунд</p> */
.eyebrow { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; font: 400 12px/1 var(--mono); letter-spacing: .12em; text-transform: uppercase; color: var(--mute); }
.eyebrow b { color: var(--acc); font-weight: 600; }
.eyebrow::after { content: ""; width: 44px; height: 1px; background: var(--line2); }

/* ---------- layout ---------- */
.section { padding: 96px var(--pad) 0; }
.wrap { max-width: 1360px; margin-inline: auto; }
/* inner pages: <main class="page"> */
.page { max-width: 1320px; margin-inline: auto; padding: calc(var(--top-h) + clamp(32px, 4vw, 64px)) var(--pad) 40px; min-height: calc(100svh - 180px); }
.page.narrow { max-width: 620px; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.row.between { justify-content: space-between; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(20px, 3vw, 44px); }
@media (max-width: 820px) { .grid2 { grid-template-columns: 1fr; } }
.rule { height: 1px; background: var(--line); border: 0; margin: 32px 0; }

/* ---------- header ---------- */
.top {
  position: fixed; inset: 0 0 auto 0; z-index: 60; height: var(--top-h);
  display: flex; align-items: center; gap: clamp(14px, 2.4vw, 36px); padding: 0 var(--pad);
  background: linear-gradient(180deg, rgba(6, 9, 12, .86), rgba(6, 9, 12, 0));
  border-bottom: 1px solid transparent; transition: background-color .3s, border-color .3s;
  view-transition-name: top;
}
.top.stuck { background: rgba(6, 9, 12, .94); border-bottom-color: var(--line); }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; font: 900 27px/1 var(--display); letter-spacing: .05em; flex: none; }
.brand svg { width: 17px; height: 22px; fill: var(--blood); transition: transform .4s var(--ease); }
.brand:hover svg { transform: translateY(2px) scale(1.12); }
.brand b { font-weight: 900; }
.brand b + b { color: var(--blood-hi); }
.testmark { font: 400 10.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--amber); border: 1px solid currentColor; padding: 5px 7px; white-space: nowrap; flex: none; }
.top nav { display: flex; gap: clamp(16px, 2.2vw, 34px); margin-left: auto; }
.top nav a, .tabbar a { position: relative; text-decoration: none; font: 400 12px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--mute); padding: 12px 0; transition: color .2s; white-space: nowrap; }
.top nav a:hover, .top nav a[aria-current] { color: var(--ink); }
.top nav a::before { content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 2px; background: var(--line2); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.top nav a:hover::before { transform: scaleX(1); }
.top nav .mark { position: absolute; left: 0; right: 0; bottom: 4px; height: 2px; background: var(--ice); view-transition-name: navmark; }
.live { display: flex; align-items: center; gap: 8px; font: 400 12px/1 var(--mono); color: var(--mute); text-decoration: none; white-space: nowrap; }
.live:hover { color: var(--ink); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--dim); flex: none; }
.dot.on { background: var(--ok); box-shadow: 0 0 0 0 rgba(95, 220, 147, .6); animation: ping 2.2s infinite; }
@keyframes ping { 70%, 100% { box-shadow: 0 0 0 9px rgba(95, 220, 147, 0); } }
.who { display: flex; align-items: center; gap: 12px; flex: none; }
.who > a:not(.btn) { text-decoration: none; font-weight: 600; max-width: 14ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.who > a:not(.btn):hover { color: var(--ice); }
.bal { font: 600 13px/1 var(--mono); color: var(--ice); border: 1px solid var(--line2); padding: 8px 10px; white-space: nowrap; }

/* phone: pages move to a bottom bar */
.tabbar { display: none; }
@media (max-width: 760px) {
  :root { --top-h: 56px; --tab-h: calc(54px + env(safe-area-inset-bottom)); }
  .top nav, .top .live { display: none; }
  .top .who { margin-left: auto; }
  .who > a:not(.btn) { display: none; }
  .who .btn.ghost { display: none; }
  .brand { font-size: 24px; }
  .tabbar {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; inset: auto 0 0 0; z-index: 60; height: var(--tab-h); padding-bottom: env(safe-area-inset-bottom);
    background: rgba(6, 9, 12, .97); border-top: 1px solid var(--line); view-transition-name: tabbar;
  }
  .tabbar a { display: grid; place-items: center; padding: 0 4px; font-size: 11px; letter-spacing: .06em; }
  .tabbar a[aria-current] { color: var(--ink); }
  .tabbar .mark { position: absolute; left: 22%; right: 22%; top: -1px; height: 2px; background: var(--ice); view-transition-name: navmark; }
}
/* narrow phones: the mark keeps its place but says it shorter (the full words are in the footer) */
@media (max-width: 520px) { .testmark { font-size: 0; padding: 5px 6px; } .testmark::after { content: "тест оплаты"; font-size: 10px; letter-spacing: .06em; } .top { gap: 10px; } }

/* ---------- buttons ---------- */
.btn {
  --cut: 10px;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 50px; padding: 0 24px; border: 0; cursor: pointer; text-decoration: none; white-space: nowrap; user-select: none;
  font: 600 13.5px/1 var(--body); letter-spacing: .09em; text-transform: uppercase; color: #fff;
  background: linear-gradient(100deg, var(--ink) 0 50%, var(--blood) 50.2% 100%) 100% 0 / 220% 100% no-repeat;
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%);
  transition: background-position .38s var(--snap), color .2s .08s, transform .12s;
}
.btn:hover { background-position: 0 0; color: #07090c; }
.btn:active { transform: scale(.97); }
.btn:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--bg), inset 0 0 0 4px var(--ice); }
.btn.small { height: 38px; padding: 0 15px; font-size: 12px; --cut: 8px; }
.btn.big { height: 60px; padding: 0 32px; font-size: 15px; }
.btn.wide { width: 100%; }
/* quiet button: outline only */
.btn.ghost { color: var(--ink); background: linear-gradient(100deg, var(--ink) 0 50%, transparent 50.2% 100%) 100% 0 / 220% 100% no-repeat; clip-path: none; box-shadow: inset 0 0 0 1px var(--line2); }
.btn.ghost:hover { color: #07090c; }
.btn.ghost:focus-visible { box-shadow: inset 0 0 0 2px var(--ice); }
.btn[disabled], .btn.off { background: var(--panel2); color: var(--dim); cursor: not-allowed; transform: none; box-shadow: none; }
.btn.busy { pointer-events: none; color: transparent; }
.btn.busy::after { content: ""; position: absolute; width: 16px; height: 16px; border: 2px solid #fff; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(1turn); } }
/* text link with an arrow that moves */
.more { display: inline-flex; align-items: center; gap: 8px; font: 400 12px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; text-decoration: none; color: var(--ink); padding: 8px 0; border-bottom: 1px solid var(--line2); transition: border-color .2s, color .2s; }
.more::after { content: "→"; transition: transform .25s var(--ease); }
.more:hover { border-color: var(--blood-hi); color: var(--blood-hi); }
.more:hover::after { transform: translateX(5px); }

/* ---------- cards, tags, prices ---------- */
/* panel with a HUD corner bracket */
.card { position: relative; background: var(--panel); border: 1px solid var(--line); padding: clamp(18px, 2.4vw, 30px); transition: border-color .25s, background-color .25s; }
.card::before { content: ""; position: absolute; left: -1px; top: -1px; width: 14px; height: 14px; border: solid var(--acc); border-width: 2px 0 0 2px; transition: width .3s var(--ease), height .3s var(--ease), border-color .8s; }
a.card { display: block; text-decoration: none; }
a.card:hover, .card.hover:hover { border-color: var(--line2); background: var(--panel2); }
a.card:hover::before, .card.hover:hover::before { width: 30px; height: 30px; }
.card.hotcard { border-color: rgba(213, 16, 43, .5); }
.card.hotcard::before { border-color: var(--blood-hi); }
.card > h3 + p, .card > h2 + p { margin-top: 10px; }

.tag { display: inline-block; font: 600 13px/1.4 var(--mono); letter-spacing: .04em; text-transform: uppercase; padding: 5px 7px; border: 1px solid currentColor; color: var(--mute); white-space: nowrap; vertical-align: middle; }
.tag.blood { color: var(--blood-hi); } .tag.ice { color: var(--ice); } .tag.amber { color: var(--amber); } .tag.ok { color: var(--ok); }
.tag.fill { background: var(--blood); border-color: var(--blood); color: #fff; }

/* price: <span class="price">150 ₽<small>в месяц</small></span>; .price.game for in-game dollars */
.price { font: 600 clamp(22px, 2.2vw, 30px)/1 var(--mono); letter-spacing: -.03em; color: var(--ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.price small { display: block; margin-top: 6px; font: 400 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.price.big { font-size: clamp(34px, 4vw, 56px); }
.price.game { color: var(--amber); }

/* shop row: name + text on the left, price and controls on the right */
.item { display: grid; grid-template-columns: 1fr auto; gap: 14px 28px; align-items: center; padding: 22px 0; border-bottom: 1px solid var(--line); }
.item h3 { font-size: clamp(26px, 2.6vw, 36px); }
.item p { color: var(--mute); margin-top: 6px; font-size: 15.5px; }
.item .buy { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: flex-end; }
@media (max-width: 640px) { .item { grid-template-columns: 1fr; } .item .buy { justify-content: flex-start; } }

/* key-value list: <dl class="kv"><dt>Ник</dt><dd>Fox</dd>…</dl> */
.kv { display: grid; grid-template-columns: auto 1fr; gap: 0 24px; margin: 0; }
.kv dt, .kv dd { margin: 0; padding: 12px 0; border-bottom: 1px solid var(--line); }
.kv dt { font: 400 11.5px/1.9 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--mute); }
.kv dd { text-align: right; font-weight: 500; overflow-wrap: anywhere; }

/* ---------- forms ---------- */
.form { display: grid; gap: 18px; }
.field { display: grid; gap: 8px; }
label, .label { font: 400 13px/1.4 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--mute); }
input[type=text], input[type=password], input[type=number], input[type=email], input[type=search], input:not([type]), select, textarea {
  width: 100%; height: 50px; padding: 0 14px; background: #080c10; border: 1px solid var(--line2); border-radius: 0; outline: none;
  font: 500 16px/1.2 var(--body); color: var(--ink); transition: border-color .2s, box-shadow .2s, background-color .2s;
}
textarea { height: auto; min-height: 110px; padding: 12px 14px; resize: vertical; }
select { appearance: none; padding-right: 38px; cursor: pointer; background-image: linear-gradient(45deg, transparent 50%, var(--mute) 50%), linear-gradient(-45deg, transparent 50%, var(--mute) 50%); background-size: 6px 6px; background-position: calc(100% - 19px) 21px, calc(100% - 13px) 21px; background-repeat: no-repeat; }
select.small, input.small { height: 38px; width: auto; font-size: 14.5px; }
select.small { background-position: calc(100% - 19px) 15px, calc(100% - 13px) 15px; }
input::placeholder, textarea::placeholder { color: var(--dim); }
input:hover, select:hover, textarea:hover { border-color: rgba(170, 210, 230, .45); }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--ice); box-shadow: 0 0 0 3px rgba(143, 214, 240, .18); background-color: #0b1117; }
input[aria-invalid=true] { border-color: var(--blood-hi); }
.hint { font-size: 14px; color: var(--mute); }
input[type=range] { width: 100%; height: 28px; accent-color: var(--blood); cursor: pointer; }

/* ---------- messages ---------- */
/* <p class="msg ok|err|warn" role="status"> */
.msg { position: relative; margin: 0; max-width: none; padding: 14px 16px 14px 20px; background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--ice); font-size: 15.5px; animation: msg .35s var(--ease); }
.msg.ok { border-left-color: var(--ok); }
.msg.err { border-left-color: var(--blood-hi); background: #170a0e; }
.msg.warn { border-left-color: var(--amber); }
.msg:empty { display: none; }
@keyframes msg { from { opacity: 0; transform: translateY(-6px); } }
/* pop-up line at the bottom, made by toast() */
.toast { position: fixed; left: 50%; bottom: calc(var(--tab-h) + 22px); z-index: 80; max-width: min(92vw, 520px); padding: 14px 18px; background: var(--ink); color: #07090c; font-weight: 500; border-left: 4px solid var(--ok); transform: translate(-50%, 20px); opacity: 0; transition: transform .35s var(--ease), opacity .25s; pointer-events: none; }
.toast.err { border-left-color: var(--blood); }
.toast.on { transform: translate(-50%, 0); opacity: 1; }

/* ---------- tables ---------- */
.tablewrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.table th, .table td { text-align: left; padding: 14px 18px 14px 0; border-bottom: 1px solid var(--line); vertical-align: baseline; }
.table thead th { font: 400 11.5px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--mute); border-bottom-color: var(--line2); white-space: nowrap; }
.table tbody tr { transition: background-color .15s; }
.table tbody tr:hover { background: rgba(143, 214, 240, .04); }
.table td.r, .table th.r { text-align: right; padding-right: 0; }
.table .num { white-space: nowrap; }

/* ---------- tabs ---------- */
.tabs { display: flex; flex-wrap: wrap; gap: 4px 22px; border-bottom: 1px solid var(--line); }
.tabs button { position: relative; padding: 12px 0; font: 400 12px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--mute); transition: color .2s; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected=true] { color: var(--ink); }
.tabs button[aria-selected=true]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--blood); }

/* ---------- copy box: an address or a code, large, with a button ---------- */
.copybox { display: flex; align-items: stretch; background: #080c10; border: 1px solid var(--line2); min-width: 0; }
.copybox code { flex: 1; min-width: 0; align-self: center; padding: 10px 14px; font: 600 clamp(14px, 1.5vw, 19px)/1.25 var(--mono); color: var(--ink); overflow-wrap: anywhere; }
.copybox code i { font-style: normal; color: var(--mute); margin-right: .6em; white-space: nowrap; }
.copybox .btn { height: auto; min-height: 50px; clip-path: none; flex: none; }

/* loading placeholder */
.skeleton { display: block; min-height: 1.2em; background: linear-gradient(90deg, var(--panel) 30%, var(--panel2) 50%, var(--panel) 70%) 0 0 / 300% 100%; animation: sk 1.4s linear infinite; color: transparent; }
@keyframes sk { to { background-position: -300% 0; } }

/* ---------- footer ---------- */
.foot { margin-top: 64px; padding: 30px var(--pad) 36px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 10px 32px; justify-content: space-between; font-size: 13.5px; color: var(--mute); }
.foot a { color: var(--ink); }

/* ---------- scroll reveals (only when JS runs: html.js is set in <head>) ---------- */
.js [data-reveal] { opacity: 0; transform: translateY(12px); transition: opacity .35s var(--ease), transform .35s var(--ease); transition-delay: min(calc(var(--i, 0) * 40ms), 160ms); }
.js [data-reveal="left"] { transform: translateX(-12px); }
.js [data-reveal].in { opacity: 1; transform: none; }

/* ---------- shop, profile, checkout ---------- */
/* - 3 мес. + : <div class="stepper"><button>-</button><output>3 мес.</output><button>+</button></div> */
.stepper { display: inline-flex; align-items: stretch; height: 50px; background: #080c10; border: 1px solid var(--line2); }
.stepper button { width: 46px; font: 600 19px/1 var(--mono); color: var(--mute); transition: color .15s, background-color .15s; }
.stepper button:hover { color: var(--ink); background: var(--panel2); }
.stepper button:focus-visible { outline: none; box-shadow: inset 0 0 0 2px var(--ice); }
.stepper button:disabled { opacity: .28; cursor: default; background: none; }
.stepper output { min-width: 88px; display: grid; place-items: center; font: 600 14px/1 var(--mono); border-inline: 1px solid var(--line); font-variant-numeric: tabular-nums; }
/* full-width line under an .item: message or the "не хватает" offer */
.item .slot { grid-column: 1 / -1; }
.item .slot:empty { display: none; }
.item .price { min-width: 5.2ch; text-align: right; }
.offer { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; justify-content: space-between; }
.offer b { color: var(--amber); font-family: var(--mono); white-space: nowrap; }
@media (max-width: 640px) { .item .price { text-align: left; } .item .buy .btn, .offer .btn { flex: 1 1 100%; } }
/* quick amounts */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { height: 44px; padding: 0 14px; font: 600 13px/1 var(--mono); color: var(--mute); border: 1px solid var(--line2); transition: color .15s, border-color .15s, background-color .15s; }
.chips button:hover, .chips button[aria-pressed=true] { color: var(--ink); border-color: var(--ice); background: rgba(143, 214, 240, .07); }
.chips button:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(143, 214, 240, .18); }
/* numbered steps: <ol class="howto"><li>...</li></ol> */
.howto { list-style: none; margin: 0; padding: 0; counter-reset: s; display: grid; gap: 18px; }
.howto li { counter-increment: s; display: grid; grid-template-columns: 34px 1fr; gap: 6px 12px; }
.howto li::before { content: "0" counter(s); font: 600 12px/1.9 var(--mono); color: var(--acc); }
.howto li > * { grid-column: 2; min-width: 0; }
.howto p { color: var(--mute); }
.howto p b { color: var(--ink); font-weight: 600; }
/* orders: <div class="order"><div><b>VIP</b><small>...</small></div><span class="num">150 ₽</span><span class="tag">...</span></div> */
.order { display: grid; grid-template-columns: 1fr auto minmax(190px, auto); gap: 6px 28px; align-items: center; padding: 16px 0; border-bottom: 1px solid var(--line); }
.order b { font-weight: 600; overflow-wrap: anywhere; }
.order small { display: block; margin-top: 3px; font-size: 13.5px; color: var(--mute); }
.order .num { font-family: var(--mono); font-size: 14px; white-space: nowrap; }
.order .tag { justify-self: end; }
@media (max-width: 600px) { .order { grid-template-columns: 1fr auto; } .order .tag { grid-column: 1 / -1; justify-self: start; } }
/* sign-in window over the page: <dialog class="dialog"> */
.dialog { width: min(92vw, 460px); max-height: 92svh; padding: clamp(22px, 4vw, 34px); background: var(--panel); color: var(--ink); border: 1px solid var(--line2); border-top: 3px solid var(--blood); }
.dialog::backdrop { background: rgba(3, 5, 7, .8); backdrop-filter: blur(5px); }
.dialog h2 { padding-right: 16px; }
.dialog .eyebrow { margin-bottom: 20px; padding-right: 24px; }
.dialog[open] { animation: dlg .4s var(--ease); }
.dialog .x { position: absolute; top: 6px; right: 6px; width: 44px; height: 44px; font-size: 24px; line-height: 1; color: var(--mute); }
.dialog .x:hover { color: var(--ink); }
@keyframes dlg { from { opacity: 0; transform: translateY(18px); clip-path: inset(0 0 100% 0); } to { clip-path: inset(0); } }
.page h1 { overflow-wrap: anywhere; }

/* ---------- page-to-page transitions ----------
   Cross-document View Transitions: a short opacity crossfade.
   The header and the nav underline are shared elements: they stay and slide. Browsers without it use the .curtain from app.js. */
/* the same opt-in is also the first thing in every page head: arriving only with this file, it was sometimes too late on phones and the transition was dropped */
@view-transition { navigation: auto; }
@media (prefers-reduced-motion: reduce) { @view-transition { navigation: none; } }
@media (prefers-reduced-motion: no-preference) {
  ::view-transition-group(root) { animation-duration: .22s; }
  ::view-transition-old(root) { mix-blend-mode: normal; animation: vt-out .22s ease both; }
  ::view-transition-new(root) { mix-blend-mode: normal; animation: vt-in .22s ease both; }
  ::view-transition-group(navmark) { animation-duration: .45s; animation-timing-function: var(--snap); }
  ::view-transition-group(top), ::view-transition-group(tabbar) { animation-duration: .01s; }
  ::view-transition-old(top), ::view-transition-old(tabbar) { animation: none; opacity: 0; }
  ::view-transition-new(top), ::view-transition-new(tabbar) { animation: none; opacity: 1; }
}
@keyframes vt-out { to { opacity: 0; } }
@keyframes vt-in { from { opacity: 0; transform: translateY(8px); } }
.curtain { position: fixed; inset: 0; z-index: 100; background: var(--bg); opacity: 0; transition: opacity .22s ease; pointer-events: none; }
.curtain.on { opacity: 1; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .01ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}

/* Shared compact commerce rhythm and readable controls. */
.grid2 > *, .item > *, .row > * { min-width: 0; }
.hint, .item p { font-size: 16px; line-height: 1.6; }
.eyebrow { letter-spacing: .04em; line-height: 1.4; }
.testmark { color: var(--mute); border-color: var(--line2); letter-spacing: .04em; }
.dot.on { animation: none; }
.order { padding-block: 20px; }
.order .tag { white-space: normal; }
@media (max-width: 760px) {
  .section { padding-top: 56px; }
  .foot { margin-top: 48px; }
  .btn.small { min-height: 44px; }
  .page { padding-top: calc(var(--top-h) + 32px); }
}
@media (max-width: 380px) {
  :root { --top-h: 88px; }
  .top { display: grid; grid-template-columns: 1fr auto; grid-template-rows: 56px 24px; gap: 0 8px; background: var(--bg); }
  .top .brand { grid-column: 1; grid-row: 1; }
  .top .who { grid-column: 2; grid-row: 1; }
  .top .testmark { grid-column: 1 / -1; grid-row: 2; justify-self: start; border: 0; padding: 0; }
}

/* ---------- Public pages and expanded navigation ---------- */
:root { --tab-h: 0px; }
.top { gap: 16px; }
.top .public-nav { gap: 16px; }
.top .public-nav a, .nav-toggle { letter-spacing: 0; font: 400 13px/1.3 var(--mono); text-transform: none; }
.nav-more { position: relative; }
.nav-toggle { padding: 12px 0; color: var(--mute); min-height: 44px; }
.nav-extra { position: absolute; top: 100%; right: 0; width: 240px; padding: 16px; background: var(--panel); border: 1px solid var(--line2); }
.top .nav-extra a { display: block; white-space: normal; }
.mobile-menu, .top .mobile-pages { display: none; }
.footer-test { color: var(--amber); }
.foot > *, .public-page > *, .public-page .row > * { min-width: 0; overflow-wrap: anywhere; }
.public-page { overflow-wrap: anywhere; }
.public-head { margin-bottom: 32px; padding-bottom: 24px; border-bottom: 1px solid var(--line2); }
.public-section { margin-top: 48px; scroll-margin-top: calc(var(--top-h) + 24px); }
.public-list { display: grid; gap: 16px; }
.public-page .chips { margin-bottom: 24px; }
.public-page .chips a { padding: 10px 14px; border: 1px solid var(--line2); text-decoration: none; }
.public-page .card { min-width: 0; }
.rank-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 16px; align-items: center; }
.rank-row .record { text-align: right; }
.rank-first { border-color: var(--ice); background: var(--panel2); }
.rank-first .rank-place { color: var(--ice); }
.record { font: 900 clamp(28px, 5vw, 46px)/1 var(--display); }
.public-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 16px; }
.public-stats .record { display: block; margin-top: 12px; }
.xp-bar { display: block; width: 100%; height: 16px; accent-color: var(--ice); }
.public-page details > summary { cursor: pointer; padding: 8px 0; }
.public-page details[open] > summary { margin-bottom: 16px; }
.news-text { white-space: pre-wrap; }
.public-table-wrap { overflow-x: auto; max-width: 100%; }
.public-table { width: 100%; border-collapse: collapse; text-align: left; }
.public-table th, .public-table td { padding: 16px; border-bottom: 1px solid var(--line); }
.public-table th { color: var(--mute); font-weight: 400; }
.online-chart { width: 100%; height: auto; }
.online-chart text { fill: var(--mute); font: 12px var(--mono); }
.chart-area { fill: var(--ice); opacity: .12; }
.chart-line { fill: none; stroke: var(--ice); stroke-width: 2; }
.chart-grid { stroke: var(--line2); stroke-width: 1; }
.expired { opacity: .65; }
.public-rules { list-style: decimal; padding-left: 24px; }
.public-rules li + li { margin-top: 16px; }
.public-page .tag { white-space: normal; }
.public-page .copybox { flex-wrap: wrap; }
.public-page .copybox code { overflow-wrap: anywhere; white-space: normal; }
.public-page .field textarea, .dialog .field textarea { width: 100%; resize: vertical; min-height: 140px; background: var(--bg2); border: 1px solid var(--line2); padding: 12px; }
.dialog > .stack { margin-top: 24px; }
.latest-news { margin-top: 32px; }
@media (max-width: 1350px) {
  .top .live { display: none; }
}
@media (max-width: 1150px) {
  .top .public-nav { display: none; }
  .mobile-menu { display: inline-flex; }
  .top .who { margin-left: auto; }
  .top .mobile-pages { display: grid; gap: 0; position: absolute; top: 100%; left: 0; right: 0; margin: 0; padding: 16px var(--pad); max-height: calc(100svh - var(--top-h)); overflow-y: auto; background: var(--panel); border-bottom: 1px solid var(--line2); }
  .top .mobile-pages a { display: block; padding: 14px 0; white-space: normal; }
}
@media (max-width: 760px) {
  .public-section { margin-top: 32px; }
  .rank-row { grid-template-columns: 28px minmax(0, 1fr); gap: 12px; }
  .rank-row .record { grid-column: 2; text-align: left; }
  .public-table thead { display: none; }
  .public-table, .public-table tbody, .public-table tr, .public-table td { display: block; }
  .public-table tr { background: var(--panel); border: 1px solid var(--line); margin-bottom: 16px; padding: 12px; }
  .public-table td { padding: 4px; border: 0; overflow-wrap: anywhere; }
  .public-table td::before { content: attr(data-label) ': '; color: var(--mute); }
}
@media (max-width: 420px) {
  :root { --top-h: 96px; }
  .top { display: flex; flex-wrap: wrap; align-content: center; gap: 8px 12px; background: var(--bg); }
  .top .brand { font-size: 23px; }
  .top .testmark { order: 5; width: 100%; border: 0; padding: 0; }
  .top .who { margin-left: auto; }
  .mobile-menu { padding-inline: 10px; }
}