/* O.K.E.Y site. Materials copied from the game's classique theme + Harman layer:
   one lamp top-left, flat ink, physical paper; hard 0-blur offset = second plate, soft shadow = paper on the desk.
   Fonts are only the game's two families. CJK glyphs fall back to the system, as they do in the game. */
@font-face { font-family: 'Archivo'; src: url('fonts/archivo.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Bricolage Grotesque'; src: url('fonts/bricolage.woff2') format('woff2'); font-weight: 200 800; font-display: swap; }

:root {
  --paper: #ECE4D2; --paper-2: #E4DAC2; --paper-edge: #D7C9AA; --ink: #20190F; --ink-soft: #4A4334;
  --red: #E5443A; --red-deep: #BC2E2A; --blue: #2E5AA8; --blue-deep: #213F77; --yellow: #F2B824; --green: #3C8A66; --green-deep: #2A6249;
  --text-red: #992620; --white: #FFFBF0; --p0: #F7F2E6; --ply2: #C8BCA0; --ply3: #AFA184; --border: #9E9377;
  --sh: 32 25 15; --hi: 255 251 240; --hard: color-mix(in srgb, var(--ink) 38%, transparent); --hard-soft: color-mix(in srgb, var(--ink) 30%, transparent);
  --on-blue: var(--white); --on-yellow: var(--ink); --tex-paper: url('img/paper.jpg'); --tex-card: url('img/card_ivory.jpg');
  --f-display: 'Bricolage Grotesque', system-ui, sans-serif; --f-ui: 'Archivo', system-ui, sans-serif;
  --face-card: linear-gradient(180deg, rgb(var(--hi) / .24), transparent 40%, rgb(var(--sh) / .05));
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --gutter: clamp(18px, 5vw, 88px);
  --max: 1320px;
  color-scheme: light;
}
/* Same per-language fallbacks as the game (r_riso_base.css): neither family has Cyrillic, kana/kanji or Hangul. */
:root:lang(ja) { --f-display: 'Bricolage Grotesque', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', sans-serif; --f-ui: 'Archivo', 'Hiragino Sans', 'Hiragino Kaku Gothic ProN', sans-serif; }
:root:lang(ko) { --f-display: 'Bricolage Grotesque', 'Apple SD Gothic Neo', sans-serif; --f-ui: 'Archivo', 'Apple SD Gothic Neo', sans-serif; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; overflow-x: clip; color: var(--ink); font: 400 17px/1.6 var(--f-ui); background: var(--paper) var(--tex-paper) center / 768px; -webkit-font-smoothing: antialiased; }
body::before, body::after { content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none; }
body::before { background: radial-gradient(120% 95% at 30% 18%, transparent 58%, rgb(0 0 0 / .45) 130%); opacity: .14; }
body::after { background: radial-gradient(var(--ink) .5px, transparent .6px) 0 0 / 3.5px 3.5px, radial-gradient(var(--ink) .4px, transparent .5px) 1.8px 2.5px / 5px 5px; opacity: .05; }
body > * { position: relative; z-index: 1; }
main { overflow-x: clip; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; cursor: pointer; }
p { margin: 0 0 1em; }
h1, h2, h3 { margin: 0; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
.skip { position: fixed; z-index: 30; top: 12px; left: 12px; padding: 12px; background: var(--ink); color: var(--paper); transform: translateY(-180%); }
.skip:focus { transform: none; }

/* ---------- Materials ---------- */
.card-face {
  border: 1px solid var(--border); border-radius: 6px; background-color: var(--p0);
  background-image: linear-gradient(rgb(var(--sh) / .04) 0 0), var(--face-card), var(--tex-card); background-size: auto, auto, 460px auto; background-position: 0 0, 0 0, -203px -151px;
  box-shadow: inset 1px 1px 0 rgb(var(--hi) / .8), 1.5px 3px 3px -1px rgb(var(--sh) / .24), 2px 4px 0 var(--hard);
}
.sheet {
  position: relative; border: 1px solid var(--border); border-radius: 6px; background: var(--paper) var(--tex-paper) 83px 29px / 520px;
  box-shadow: 0 1px 0 rgb(var(--hi) / .7), 1px 2px 3px rgb(var(--sh) / .18), 2px 5px 12px rgb(var(--sh) / .14), 3px 10px 24px rgb(var(--sh) / .1), 2.5px 6px 0 -1px var(--ply3);
}
.well { border-radius: 5px; background: var(--paper-2); box-shadow: inset 1px 2px 4px rgb(var(--sh) / .22), inset 0 1px 0 rgb(var(--sh) / .14), inset -1px -1px 0 rgb(var(--hi) / .4), 0 1px 0 rgb(var(--hi) / .58); }
.key { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 44px; padding: 10px 16px; border-radius: 5px; font: 800 13px/1 var(--f-ui); letter-spacing: .04em; text-transform: uppercase; transition: translate .08s cubic-bezier(.2, 0, 0, 1); }
.key--ink { border: 1px solid transparent; background: var(--ink); color: var(--paper); box-shadow: inset 1px 1px 0 rgb(var(--hi) / .3), 1.5px 3px 3px -1px rgb(var(--sh) / .24), 2px 4px 0 var(--ink); }
.key:active { translate: 1px 2px; box-shadow: inset 1px 1px 0 rgb(var(--hi) / .3); }
.tag { display: inline-block; padding: 6px 10px; border: 0; border-radius: 4px; font: 800 11px/1.3 var(--f-ui); letter-spacing: .1em; text-transform: uppercase; background-color: var(--paper); color: var(--ink);
  background-image: linear-gradient(180deg, rgb(var(--hi) / .22), rgb(var(--hi) / .04) 44%, rgb(var(--sh) / .08));
  box-shadow: inset 0 1px 0 rgb(var(--hi) / .4), inset 0 -1px 0 rgb(var(--sh) / .14), 0 0 0 2px var(--white), 0 1px 0 2px rgb(var(--sh) / .2), .5px 1px 1px 2px rgb(var(--sh) / .18); transition: translate .08s; }
.tag--ink { background-color: var(--ink); color: var(--paper); }
.tag--yellow { background-color: var(--yellow); color: var(--on-yellow); }
.tag--green { background-color: var(--green); color: var(--on-blue); }
.tag--red { background-color: var(--red-deep); color: var(--white); }
.tag[aria-pressed='true'] { translate: 1px 2px; outline: 2px solid var(--ink); outline-offset: 4px; }
.plate-title { font: 900 clamp(34px, 4.6vw, 70px)/1 var(--f-ui); letter-spacing: -.03em; text-transform: uppercase; text-wrap: balance; text-shadow: 2.5px 3px 0 color-mix(in srgb, var(--red) 70%, transparent); margin-bottom: 22px; }
.plate-title--blue { text-shadow: 2.5px 3px 0 color-mix(in srgb, var(--blue) 60%, transparent); }
.plate-title--yellow { text-shadow: 2.5px 3px 0 color-mix(in srgb, var(--yellow) 90%, transparent); }
:lang(ja) .plate-title, :lang(ko) .plate-title { letter-spacing: 0; line-height: 1.2; }
.disc { --size: 86px; position: relative; display: grid; place-items: center; width: var(--size); aspect-ratio: 1; padding: 0; border: 0; background: var(--disc-print) center / 100% 100% no-repeat, var(--face) center / 100% 100% no-repeat; color: #FFF9EE;
  font: 700 calc(var(--size) * .45)/1 var(--f-display); font-variant-numeric: tabular-nums; text-shadow: -.5px -.5px 0 rgb(255 255 255 / .42), .75px .75px 0 var(--ink); }
.disc::before { content: ''; position: absolute; inset: calc(var(--size) * var(--disc-shadow-m) * -1); z-index: -1; background: var(--disc-shadow-img) 0 0 / 100% 100% no-repeat; }
.disc--small { --size: 54px; }
.badge { display: inline-block; width: fit-content; transition: translate .2s var(--ease); }
.badge img { height: 100%; width: auto; }
.badge--big { height: 56px; }
.badge--small { height: 38px; }
.badge:hover { translate: 0 -2px; }
.badge:active { translate: 0 1px; }


/* ---------- Ink themes: the game's own palettes (r_econ.jsx RISO_THEMES). theme.js sets data-theme. ---------- */
:root[data-theme='atolye'] { --red: #E5523A; --red-deep: #BC3A2A; --blue: #2E50A8; --blue-deep: #213877; --green: #3C8A6D; --green-deep: #2A624E; }
:root[data-theme='orman'] { --red: #E53A3B; --red-deep: #BC2A30; --blue: #2E62A8; --blue-deep: #214577; --green: #3C8A61; --green-deep: #2A6245; }
:root[data-theme='fanzin'] { --red: #F04488; --red-deep: #BA2864; --blue: #6845C7; --blue-deep: #4C2F9E; --yellow: #F08A32; --green: #17A58A; --green-deep: #10725F; --text-red: #9A1E52; }
:root[data-theme='wasabi'] { --red: #DF4E45; --red-deep: #AF352F; --blue: #2F63B8; --blue-deep: #23498A; --yellow: #F1B93B; --green: #78A83F; --green-deep: #496F25; --tex-paper: url('img/paperwasabi.jpg'); --tex-card: url('img/card_wasabi.jpg'); }
:root[data-theme='toprak'] { --red: #E55B3A; --red-deep: #B23B26; --blue: #2E4AA8; --blue-deep: #213477; --green: #3C8A70; --green-deep: #2A6250; }
:root[data-theme='nuit'], :root[data-theme='neon'] { color-scheme: dark; --sh: 0 0 0; --hi: 255 244 214; --hard: rgb(0 0 0 / .55); --hard-soft: rgb(0 0 0 / .4); --on-blue: var(--paper); --on-yellow: var(--paper); }
:root[data-theme='nuit'] { --paper: #171C2C; --paper-2: #202840; --paper-edge: #0E1220; --ink: #FFF4D6; --ink-soft: #C3BDD0; --red: #FF6B61; --red-deep: #D94B48; --blue: #76A7FF; --blue-deep: #4E77C7; --yellow: #F4C95D; --green: #68C99A; --green-deep: #3E9470; --text-red: #FF8A80;
  --p0: #222A42; --ply2: #0E1220; --ply3: #080B14; --border: #3A4260; --tex-paper: url('img/papernuit.jpg'); --tex-card: url('img/card_nuit.jpg'); }
:root[data-theme='neon'] { --paper: #101216; --paper-2: #191C22; --paper-edge: #090A0D; --ink: #F4E9D2; --ink-soft: #B9B1A3; --red: #FF5848; --red-deep: #C93930; --blue: #4C83E6; --blue-deep: #315DAA; --yellow: #F3C64E; --green: #4EBB83; --green-deep: #32835A; --text-red: #FF7A6E;
  --p0: #1D2027; --ply2: #090A0D; --ply3: #050608; --border: #353a45; --tex-paper: url('img/paperneon.jpg'); --tex-card: url('img/card_neon.jpg'); }
:root:is([data-theme='nuit'], [data-theme='neon']) body::after { mix-blend-mode: screen; }

/* Theme picker */
.theme { position: relative; }
.theme summary { display: flex; align-items: center; gap: 3px; min-height: 40px; padding: 0 10px; border: 1px solid var(--border); border-radius: 4px; background: var(--p0); list-style: none; cursor: pointer; box-shadow: inset 1px 1px 0 rgb(var(--hi) / .6), 2px 3px 0 var(--hard); }
.theme summary::-webkit-details-marker { display: none; }
.theme summary i, .theme-chips i { width: 9px; height: 9px; border-radius: 50%; box-shadow: 0 0 0 1px rgb(var(--sh) / .25); }
.theme summary i:nth-child(1) { background: var(--red); } .theme summary i:nth-child(2) { background: var(--blue); } .theme summary i:nth-child(3) { background: var(--yellow); } .theme summary i:nth-child(4) { background: var(--green); }
.theme ul { position: absolute; right: 0; top: calc(100% + 10px); z-index: 2; display: grid; min-width: 230px; margin: 0; padding: 6px; list-style: none; border: 1px solid var(--border); border-radius: 6px; background: var(--p0); box-shadow: 2px 5px 12px rgb(var(--sh) / .3), 2.5px 6px 0 -1px var(--ply3); }
.theme-label { padding: 8px 10px 6px; color: var(--ink-soft); font: 800 10px/1 var(--f-ui); letter-spacing: .1em; text-transform: uppercase; }
.theme ul button { display: flex; width: 100%; align-items: center; gap: 12px; padding: 9px 10px; border: 0; border-radius: 4px; background: none; color: var(--ink); text-align: left; font: 600 14px/1.2 var(--f-ui); }
.theme ul button:hover, .theme ul button[aria-pressed='true'] { background: var(--paper-2); }
.theme ul button[aria-pressed='true'] { font-weight: 800; }
.theme-chips { display: flex; gap: 2px; padding: 3px; border-radius: 3px; background: var(--c-paper); }
html.theme-swap, html.theme-swap * { transition: background-color .35s ease, color .35s ease, border-color .35s ease !important; }

/* ---------- Discs: the game's baked faces per theme (baked_discs.js): face + print overlay + shadow bitmap reaching m px past a 90px disc. ---------- */
:root { --face-0: url('img/discs/classique/face-c0.png'); --face-1: url('img/discs/classique/face-c1.png'); --face-2: url('img/discs/classique/face-c2.png'); --face-3: url('img/discs/classique/face-c3.png'); --face-coated: url('img/discs/classique/coated-c1.png'); --face-divided: url('img/discs/classique/divided-c01.png'); --disc-shadow-img: url('img/discs/classique/shadow.png'); --disc-shadow-m: 0.1222; --disc-print: none; }
:root[data-theme='nuit'] { --face-0: url('img/discs/nuit/face-c0.png'); --face-1: url('img/discs/nuit/face-c1.png'); --face-2: url('img/discs/nuit/face-c2.png'); --face-3: url('img/discs/nuit/face-c3.png'); --face-coated: url('img/discs/nuit/coated-c1.png'); --face-divided: url('img/discs/nuit/divided-c01.png'); --disc-shadow-img: url('img/discs/nuit/shadow.png'); --disc-shadow-m: 0.2111; --disc-print: url('img/discs/nuit/print.png'); }
:root[data-theme='atolye'] { --face-0: url('img/discs/atolye/face-c0.png'); --face-1: url('img/discs/atolye/face-c1.png'); --face-2: url('img/discs/atolye/face-c2.png'); --face-3: url('img/discs/atolye/face-c3.png'); --face-coated: url('img/discs/atolye/coated-c1.png'); --face-divided: url('img/discs/atolye/divided-c01.png'); --disc-shadow-img: url('img/discs/atolye/shadow.png'); --disc-shadow-m: 0.0778; --disc-print: url('img/discs/atolye/print.png'); }
:root[data-theme='orman'] { --face-0: url('img/discs/orman/face-c0.png'); --face-1: url('img/discs/orman/face-c1.png'); --face-2: url('img/discs/orman/face-c2.png'); --face-3: url('img/discs/orman/face-c3.png'); --face-coated: url('img/discs/orman/coated-c1.png'); --face-divided: url('img/discs/orman/divided-c01.png'); --disc-shadow-img: url('img/discs/orman/shadow.png'); --disc-shadow-m: 0.0556; --disc-print: url('img/discs/orman/print.png'); }
:root[data-theme='fanzin'] { --face-0: url('img/discs/fanzin/face-c0.png'); --face-1: url('img/discs/fanzin/face-c1.png'); --face-2: url('img/discs/fanzin/face-c2.png'); --face-3: url('img/discs/fanzin/face-c3.png'); --face-coated: url('img/discs/fanzin/coated-c1.png'); --face-divided: url('img/discs/fanzin/divided-c01.png'); --disc-shadow-img: url('img/discs/fanzin/shadow.png'); --disc-shadow-m: 0.0667; --disc-print: url('img/discs/fanzin/print.png'); }
:root[data-theme='wasabi'] { --face-0: url('img/discs/wasabi/face-c0.png'); --face-1: url('img/discs/wasabi/face-c1.png'); --face-2: url('img/discs/wasabi/face-c2.png'); --face-3: url('img/discs/wasabi/face-c3.png'); --face-coated: url('img/discs/wasabi/coated-c1.png'); --face-divided: url('img/discs/wasabi/divided-c01.png'); --disc-shadow-img: url('img/discs/wasabi/shadow.png'); --disc-shadow-m: 0.0444; --disc-print: url('img/discs/wasabi/print.png'); }
:root[data-theme='neon'] { --face-0: url('img/discs/neon/face-c0.png'); --face-1: url('img/discs/neon/face-c1.png'); --face-2: url('img/discs/neon/face-c2.png'); --face-3: url('img/discs/neon/face-c3.png'); --face-coated: url('img/discs/neon/coated-c1.png'); --face-divided: url('img/discs/neon/divided-c01.png'); --disc-shadow-img: url('img/discs/neon/shadow.png'); --disc-shadow-m: 0.0556; --disc-print: url('img/discs/neon/print.png'); }
:root[data-theme='toprak'] { --face-0: url('img/discs/toprak/face-c0.png'); --face-1: url('img/discs/toprak/face-c1.png'); --face-2: url('img/discs/toprak/face-c2.png'); --face-3: url('img/discs/toprak/face-c3.png'); --face-coated: url('img/discs/toprak/coated-c1.png'); --face-divided: url('img/discs/toprak/divided-c01.png'); --disc-shadow-img: url('img/discs/toprak/shadow.png'); --disc-shadow-m: 0.0778; --disc-print: url('img/discs/toprak/print.png'); }
.face-0 { --face: var(--face-0); } .face-1 { --face: var(--face-1); } .face-2 { --face: var(--face-2); } .face-3 { --face: var(--face-3); } .face-coated { --face: var(--face-coated); } .face-divided { --face: var(--face-divided); }

/* ---------- Masthead ---------- */
.masthead { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: clamp(12px, 2vw, 28px); padding: 10px var(--gutter); background: var(--paper) var(--tex-paper) center / 768px; border-bottom: 2px solid var(--ink); box-shadow: 0 1px 0 var(--ply2), 0 4px 10px rgb(var(--sh) / .08); }
.masthead::after { content: ''; position: absolute; left: 0; right: 0; bottom: -4px; height: 3px; background: linear-gradient(90deg, var(--red) 0 25%, var(--blue) 0 50%, var(--yellow) 0 75%, var(--green) 0); transform: scaleX(0); transform-origin: left; }
.masthead-logo img { width: 112px; }
.masthead-nav { display: flex; gap: clamp(12px, 2vw, 26px); margin-left: auto; font: 800 12px/1 var(--f-ui); letter-spacing: .06em; text-transform: uppercase; }
.masthead-nav a { padding: 14px 0; border-bottom: 2px solid transparent; }
.masthead-nav a:hover { border-color: var(--ink); }
.lang { position: relative; }
.lang summary { display: grid; place-items: center; min-width: 44px; min-height: 40px; padding: 0 10px; border: 1px solid color-mix(in srgb, var(--ink) 58%, var(--paper)); border-radius: 4px; background: var(--p0); font: 800 12px/1 var(--f-ui); letter-spacing: .06em; list-style: none; cursor: pointer; box-shadow: inset 1px 1px 0 rgb(var(--hi) / .8), 2px 3px 0 var(--hard); }
.lang summary::-webkit-details-marker { display: none; }
.lang ul { position: absolute; right: 0; top: calc(100% + 10px); z-index: 2; display: grid; min-width: 180px; margin: 0; padding: 6px; list-style: none; border: 1px solid var(--border); border-radius: 6px; background: var(--p0); box-shadow: 2px 5px 12px rgb(var(--sh) / .2), 2.5px 6px 0 -1px var(--ply3); }
.lang a { display: block; padding: 9px 10px; border-radius: 4px; font: 600 14px/1.2 var(--f-ui); }
.lang a:hover, .lang a[aria-current] { background: var(--paper-2); }
.lang a[aria-current] { font-weight: 800; }

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(300px, 420px); gap: clamp(32px, 7vw, 120px); align-items: center; max-width: var(--max); margin: 0 auto; padding: clamp(36px, 6vw, 90px) var(--gutter) clamp(56px, 7vw, 100px); }
.app-id { display: flex; align-items: center; gap: 14px; margin-bottom: clamp(22px, 3vw, 36px); }
.app-id img { width: 64px; border-radius: 22.5%; box-shadow: 0 0 0 1px rgb(var(--sh) / .12), 1px 3px 6px rgb(var(--sh) / .25); }
.app-id strong { display: block; font: 800 16px/1.2 var(--f-display); }
.app-id span { color: var(--ink-soft); font-size: 13px; }
.hero .plate-title { font-size: clamp(42px, 6.2vw, 96px); }
.hero-lede { max-width: 40ch; margin-bottom: 28px; color: var(--ink-soft); font-size: clamp(17px, 1.35vw, 20px); }
.facts { display: flex; flex-wrap: wrap; gap: 10px 18px; margin: 26px 0 0; padding: 0; list-style: none; font: 750 13px/1 var(--f-ui); letter-spacing: .02em; color: var(--ink-soft); }
.facts li + li::before { content: ''; display: inline-block; width: 6px; height: 6px; margin-right: 18px; border-radius: 50%; background: var(--red); vertical-align: middle; }
.device { position: relative; scroll-margin-top: 90px; }
.device::before { content: ''; position: absolute; z-index: -1; inset: 16% -40vw 32% -14%; background: var(--red); opacity: .92; }
.device::after { content: ''; position: absolute; z-index: -1; inset: 68% -40vw 4% -14%; background: radial-gradient(color-mix(in srgb, var(--red) 55%, transparent) 1.4px, transparent 1.8px) 0 0 / 7px 7px; }
.game-sheet { padding: 14px; rotate: 1deg; }
.hud { border: 2.5px solid var(--ink); border-radius: 6px; overflow: hidden; background: var(--paper); box-shadow: 0 2.5px 0 var(--ply2), 0 4.5px 0 var(--ply3), 0 6.5px 0 var(--ink), 0 9px 18px rgb(var(--sh) / .24); }
.hud-main { display: flex; gap: 4px; min-height: 80px; padding: 6px 7px 5px; background: var(--paper); background-image: var(--face-card), var(--tex-card); background-size: auto, 420px auto; background-position: 0 0, 157px -61px; }
.hud-cell { flex: 1; min-width: 0; padding: 2px 4px 5px; border-right: 1.5px solid rgb(var(--sh) / .24); }
.hud-label { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 800 10px/1 var(--f-ui); letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft); }
.hud-value { display: block; margin-top: 6px; font: 800 26px/.9 var(--f-display); font-variant-numeric: tabular-nums; text-shadow: 0 1px 0 rgb(var(--hi) / .7), 0 -1px 0 rgb(var(--sh) / .24); }
.hud-combo { display: block; min-height: 12px; margin-top: 3px; color: var(--red-deep); font: 800 11px/1 var(--f-ui); }
.hud-key { align-self: center; width: 46px; height: 46px; min-height: 0; padding: 0; }
.hud-key img { width: 28px; height: 28px; }
.hud-rail { display: flex; align-items: center; justify-content: space-between; gap: 9px; min-height: 36px; padding: 6px 9px; border-top: 2px solid var(--ink); background: var(--paper) radial-gradient(circle 1.3px at 3.5px 3.5px, color-mix(in srgb, var(--yellow) 48%, transparent) 0 1.1px, transparent 1.3px) 0 0 / 7px 7px; }
.direction-plate { display: inline-grid; place-items: center; height: 26px; padding: 0 8px; background: var(--p0); border: 2px solid var(--ink); border-radius: 3px; font: 900 12px/1 var(--f-ui); letter-spacing: .06em; white-space: nowrap; }
.lives { display: flex; gap: 4px; }
.lives i { width: 26px; height: 26px; background: url('img/can.png') center / contain no-repeat; filter: drop-shadow(0 1px 1px rgb(var(--sh) / .22)); }
.lives i.is-lost { background-image: url('img/can-bos.png'); }
.field { position: relative; height: 360px; margin: 18px 2px 4px; background: linear-gradient(90deg, transparent calc(33.3% - .5px), rgb(var(--sh) / .1) 0 calc(33.3% + .5px), transparent 0 calc(66.6% - .5px), rgb(var(--sh) / .1) 0 calc(66.6% + .5px), transparent 0), linear-gradient(180deg, transparent calc(50% - .5px), rgb(var(--sh) / .1) 0 calc(50% + .5px), transparent 0); }
.board { position: absolute; inset: 0; }
.board .disc { position: absolute; left: var(--x); top: var(--y); transition: opacity .24s var(--ease), scale .24s var(--ease); animation: drift 5s ease-in-out infinite; animation-play-state: paused; }
.board.is-visible .disc { animation-play-state: running; }
.board .disc:nth-child(2) { animation-delay: -2s; } .board .disc:nth-child(3) { animation-delay: -3s; } .board .disc:nth-child(4) { animation-delay: -1s; }
.board .disc:nth-child(1) { --x: 12%; --y: 12%; } .board .disc:nth-child(2) { --x: 58%; --y: 20%; } .board .disc:nth-child(3) { --x: 20%; --y: 56%; } .board .disc:nth-child(4) { --x: 62%; --y: 62%; }
.board .disc:active { scale: .94; }
.board .disc.is-sorted { opacity: 0; scale: .55; pointer-events: none; }
.board.is-wrong { animation: shake .2s ease-in-out; }
.is-paused .disc, .is-paused .ticker-track { animation-play-state: paused !important; }
@keyframes drift { 0%, 100% { translate: 0 -4px; } 50% { translate: 4px 6px; } }
@keyframes shake { 0%, 100% { translate: 0; } 35% { translate: -5px; } 70% { translate: 5px; } }
.demo-status { min-height: 50px; margin: 22px 0 6px; padding: 10px 14px; border-left: 4px solid var(--blue); background: color-mix(in srgb, var(--p0) 75%, transparent); font: 650 15px/1.45 var(--f-ui); }
.demo-hint { margin: 0; color: var(--ink-soft); font-size: 13px; }

/* ---------- Ticker (the page's only marquee) ---------- */
.ticker { overflow: hidden; padding: 15px 0; border-block: 2px solid var(--ink); background: var(--red-deep); color: var(--white); font: 900 clamp(14px, 1.4vw, 19px)/1 var(--f-ui); white-space: nowrap; }
.ticker-track { display: flex; width: max-content; animation: run 48s linear infinite; }
.ticker-track span { padding-right: clamp(32px, 4vw, 64px); }
.ticker-track span::after { content: ''; display: inline-block; width: .45em; height: .45em; margin-left: clamp(32px, 4vw, 64px); border-radius: 50%; background: var(--yellow); vertical-align: .12em; }
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes run { to { translate: -50% 0; } }

/* ---------- Sections ---------- */
.how, .rules, .features, .story, .screens, .cta { max-width: var(--max); margin: 0 auto; padding: clamp(72px, 10vw, 140px) var(--gutter); }
.section-copy p { max-width: 44ch; color: var(--ink-soft); }
.how-intro { max-width: 60ch; margin-bottom: clamp(48px, 6vw, 80px); }
.how-intro p:first-child { font: 700 clamp(22px, 2.2vw, 32px)/1.3 var(--f-display); letter-spacing: -.01em; color: var(--ink); }
.how-intro p { color: var(--ink-soft); font-size: clamp(16px, 1.25vw, 19px); }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(16px, 2.4vw, 32px); margin: 0; padding: 0; list-style: none; }
.step { display: grid; gap: 16px; align-content: start; padding: 22px; }
.step:nth-child(2) { rotate: .6deg; margin-top: 26px; } .step:nth-child(3) { rotate: -.5deg; margin-top: 10px; }
.step p { margin: 0; font: 650 16px/1.45 var(--f-ui); }

.rules, .story { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(40px, 7vw, 110px); align-items: center; }
.mech-tabs { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.mech-sheet { padding: 0 20px 22px; rotate: -.5deg; }
.mech-head { display: flex; justify-content: space-between; gap: 10px; margin: 0 -20px 18px; padding: 14px 20px 12px; border-bottom: 2px solid var(--ink); border-radius: 6px 6px 0 0; background: var(--paper-2); box-shadow: inset 0 1px 0 rgb(var(--hi) / .7), 0 1px 0 var(--ply2); font: 900 11px/1 var(--f-ui); letter-spacing: .12em; text-transform: uppercase; }
.mech-head b { color: var(--blue); }
.mech-demo { position: relative; display: grid; place-items: center; min-height: 120px; padding: 18px 12px; margin-bottom: 20px; border: 2px solid var(--ink); }
.mech-discs { display: flex; gap: 16px; align-items: center; }
.mech-demo[data-kind='isReverse'] .disc { opacity: .6; }
.mech-demo[data-kind='isCrease']::after { content: ''; position: absolute; left: 50%; top: 10px; bottom: 10px; border-left: 2px dashed rgb(var(--sh) / .45); rotate: 14deg; }
.mech-demo[data-kind='isCrease'] .mech-discs { gap: 90px; }
.disc--ghost { opacity: .35; }
.disc--ghost::after { content: ''; position: absolute; inset: -6px; border: 2px dashed rgb(var(--sh) / .4); border-radius: 50%; }
.mech-sheet h3 { margin-bottom: 8px; font: 800 30px/1.05 var(--f-display); letter-spacing: -.02em; }
.mech-sheet > p { min-height: 3em; color: var(--ink-soft); font-size: 15px; }
.mech-rule { padding: 12px 14px; }
.mech-rule p { margin: 0; font: 650 14px/1.4 var(--f-ui); }

.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 2vw, 24px); margin-top: 20px; }
.feature { position: relative; display: flex; flex-direction: column; min-height: 250px; padding: clamp(20px, 2.4vw, 32px); border: 2px solid var(--ink); border-radius: 6px; color: var(--ink); background: var(--p0) var(--tex-card) -203px -151px / 460px auto;
  box-shadow: inset 0 1px 0 rgb(var(--hi) / .55), 3px 5px 0 var(--ply2), 7px 10px 0 color-mix(in srgb, var(--accent) 60%, transparent); --accent: var(--ink); transition: translate .3s var(--ease); }
.feature:hover { translate: 0 -4px; }
.feature--wide { grid-column: span 2; }
.feature--red { --accent: var(--red); } .feature--blue { --accent: var(--blue); } .feature--yellow { --accent: var(--yellow); } .feature--green { --accent: var(--green); }
.feature:nth-child(4n + 1) { background: var(--red-deep); color: var(--white); }
.feature:nth-child(4n + 2) { background: var(--blue); color: var(--on-blue); }
.feature-no { font: 800 13px/1 var(--f-display); opacity: .7; }
.feature h3 { margin: auto 0 10px; padding-top: 34px; font: 900 clamp(20px, 1.8vw, 26px)/1.08 var(--f-ui); letter-spacing: -.01em; }
.feature p { margin: 0; font-size: 15px; line-height: 1.55; opacity: .92; }

.device--story::before { inset: 10% -14% 36% -40vw; background: var(--blue); }
.device--story::after { inset: 66% -14% 4% -40vw; background: radial-gradient(color-mix(in srgb, var(--blue) 50%, transparent) 1.4px, transparent 1.8px) 0 0 / 7px 7px; }
.story .device { order: -1; }
.story-sheet { display: flex; flex-direction: column; height: 600px; overflow: hidden; rotate: -.8deg; }
.story-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; padding: 14px 16px; border-bottom: 2px solid var(--ink); background: var(--paper-2); box-shadow: inset 0 1px 0 rgb(var(--hi) / .7), 0 1px 0 var(--ply2); }
.story-head strong { font: 800 17px/1.1 var(--f-display); }
.story-head span { font: 800 10px/1 var(--f-ui); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-soft); }
.chat { flex: 1; display: flex; flex-direction: column; gap: 12px; margin: 0; padding: 16px 16px 8px; overflow-y: auto; list-style: none; }
.msg { display: flex; align-items: flex-end; gap: 8px; max-width: 88%; animation: msg-in .21s var(--ease) both; }
.msg img { width: 31px; height: 31px; flex: none; border: 2px solid var(--ink); border-radius: 999px; background: var(--paper); }
.msg-author { display: block; margin: 0 0 4px 2px; font: 900 9px/1 var(--f-ui); letter-spacing: .06em; text-transform: uppercase; }
.msg--smoke .msg-author { color: var(--ink); } .msg--rita .msg-author { color: var(--green-deep); } .msg--hamit .msg-author { color: var(--red-deep); } .msg--leyla .msg-author { color: var(--blue-deep); }
.msg--you { align-self: flex-end; text-align: right; }
.msg--you .msg-author { color: var(--text-red); }
.msg-bubble { margin: 0; padding: 9px 11px; border: 1px solid var(--border); border-radius: 4px; background: var(--p0) var(--tex-paper) 83px 29px / 300px; box-shadow: inset 0 1px 0 rgb(var(--hi) / .8), 0 1px 2px rgb(var(--sh) / .12); font: 650 13.5px/1.4 var(--f-ui); text-align: left; }
@keyframes msg-in { from { opacity: 0; transform: translateY(8px) rotate(-.5deg); } }
.choices { display: grid; gap: 8px; padding: 10px 14px 16px; border-top: 2px solid var(--ink); background: var(--paper-2); }
.choice { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 2px solid var(--ink); border-left: 5px solid var(--accent, var(--ink)); border-radius: 4px; background: var(--p0); text-align: left; font: 700 13px/1.3 var(--f-ui); box-shadow: 1.5px 3px 0 var(--hard-soft); animation: msg-in .21s var(--ease) both; }
.choice--rita { --accent: var(--green); } .choice--hamit { --accent: var(--red); } .choice--leyla { --accent: var(--blue); }
.choice:active { translate: 1px 2px; box-shadow: none; }
.choice-key { display: grid; flex: none; place-items: center; width: 27px; height: 27px; border-radius: 50%; background: var(--accent, var(--ink)); color: var(--on-blue); font: 900 12px/1 var(--f-ui); }
.replay { justify-self: start; border: 1px solid color-mix(in srgb, var(--ink) 58%, var(--paper)); background: var(--p0); box-shadow: 2px 4px 0 var(--hard); }
.voices { margin-top: 28px; padding: 20px; rotate: -.5deg; }
.voice-focus { display: flex; align-items: center; gap: 18px; min-height: 120px; }
.voice-focus img { width: 104px; height: 104px; flex: none; border: 2px solid var(--ink); border-radius: 50%; background: var(--paper); box-shadow: 4px 4px 0 color-mix(in srgb, var(--vink, var(--ink)) 78%, transparent); }
.voice-focus[data-voice='rita'] { --vink: var(--green); } .voice-focus[data-voice='hamit'] { --vink: var(--red); } .voice-focus[data-voice='leyla'] { --vink: var(--blue); }
.voice-focus strong { display: block; margin-bottom: 8px; font: 800 clamp(24px, 2.6vw, 34px)/1 var(--f-display); }
.voice-focus q { display: block; color: var(--ink-soft); font: 650 14px/1.45 var(--f-ui); }
.voice-controls { display: flex; gap: 12px; margin-top: 16px; }
.voice-controls button { width: 56px; height: 56px; padding: 0; border: 2px solid var(--ink); border-radius: 50%; background: var(--paper); opacity: .7; box-shadow: 1.5px 3px 0 var(--hard-soft); }
.voice-controls button img { width: 100%; height: 100%; border-radius: 50%; }
.voice-controls button[aria-pressed='true'] { opacity: 1; translate: 1px 2px; box-shadow: 0 0 0 3px var(--yellow); }

.gallery { display: flex; gap: clamp(16px, 2.2vw, 30px); overflow-x: auto; margin-inline: calc(var(--gutter) * -1); padding: 10px var(--gutter) 30px; scroll-snap-type: x mandatory; scroll-padding-inline: var(--gutter); scrollbar-color: var(--ink) var(--paper-2); }
.gallery figure { flex: 0 0 clamp(220px, 23vw, 300px); margin: 0; border-radius: 10px; overflow: hidden; scroll-snap-align: start; box-shadow: 0 0 0 1px rgb(var(--sh) / .2), 1px 2px 3px rgb(var(--sh) / .18), 2px 8px 18px rgb(var(--sh) / .16); }
.gallery figure:nth-child(even) { margin-top: 28px; }
.gallery img { width: 100%; }

.cta { display: grid; justify-items: center; text-align: center; }
.cta-icon { width: 104px; margin-bottom: 26px; border-radius: 22.5%; box-shadow: 0 0 0 1px rgb(var(--sh) / .12), 2px 6px 14px rgb(var(--sh) / .25); }
.cta .plate-title { max-width: 18ch; font-size: clamp(32px, 4.2vw, 60px); }
.disclaimer { max-width: 70ch; margin: 40px 0 0; padding-top: 18px; border-top: 1px solid rgb(var(--sh) / .25); color: var(--ink-soft); font-size: 13px; line-height: 1.6; }

.colophon { display: grid; grid-template-columns: auto 1fr; gap: 18px 32px; align-items: center; padding: 34px var(--gutter); border-top: 2px solid var(--ink); background: var(--paper-2); font-size: 14px; }
.colophon > img { width: 120px; }
.colophon nav { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-self: end; font: 800 12px/1 var(--f-ui); letter-spacing: .06em; text-transform: uppercase; }
.colophon nav a { padding: 12px 0; border-bottom: 2px solid transparent; }
.colophon nav a:hover { border-color: var(--ink); }
.colophon-langs { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; padding: 14px 0 0; list-style: none; border-top: 1px solid rgb(var(--sh) / .2); font-size: 13px; }
.colophon-langs a { display: inline-block; padding: 6px 0; color: var(--ink-soft); }
.colophon-langs a[aria-current] { color: var(--ink); font-weight: 800; }
.colophon p { grid-column: 1 / -1; margin: 0; color: var(--ink-soft); font-size: 12px; }

/* ---------- Scroll-driven: progress ink bar, plates settle ---------- */
@keyframes bar { to { transform: scaleX(1); } }
@keyframes settle { from { text-shadow: 12px 8px 0 color-mix(in srgb, var(--red) 70%, transparent); } }
@keyframes rise { from { opacity: 0; translate: 0 40px; } }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    html { scroll-timeline: --page block; }
    .masthead::after { animation: bar linear both; animation-timeline: --page; }
    main > section:not(.hero) .plate-title:not(.plate-title--blue):not(.plate-title--yellow) { animation: settle linear both; animation-timeline: view(); animation-range: entry 10% cover 40%; }
    :is(.step, .mech-sheet, .feature, .story-sheet, .gallery) { animation: rise linear both; animation-timeline: view(); animation-range: entry 0% entry 50%; }
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 1020px) {
  .masthead-nav { display: none; }
  .theme { margin-left: auto; }
  .hero, .rules, .story { grid-template-columns: 1fr; }
  .hero .device, .story .device { width: min(100%, 430px); margin-inline: auto; }
  .story .device { order: 0; }
  .feature-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .masthead-logo img { width: 92px; }
  .badge--small { display: none; }
  .badge--big { height: 50px; }
  .steps, .feature-grid { grid-template-columns: 1fr; }
  .feature--wide { grid-column: auto; }
  .step:nth-child(n) { rotate: 0deg; margin-top: 0; }
  .game-sheet { rotate: 0deg; padding: 12px; }
  .field { height: 320px; }
  .disc { --size: 72px; }
  .disc--small { --size: 46px; }
  .hud-value { font-size: 22px; }
  .story-sheet { height: 560px; }
  .colophon { grid-template-columns: 1fr; }
  .colophon nav { justify-self: start; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
