/* KaDing! site — shared styles.
   Look follows the game: ink slabs, KaDing yellow, player cyan, slanted blocks, hard drop shadows.
   Page structure, motion curve, scroll reveals and ship checklist follow elayadesign/ai-design-skills
   "landing-page-design" (MIT); slab borders and hard edges borrow from manavarya09/ai-design-skills
   "brutalism" (MIT). Fonts: Barlow + Barlow Condensed (SIL OFL), self-hosted so no third party sees visitors. */

@font-face { font-family: "Barlow"; font-weight: 500; font-style: normal; font-display: swap; src: url(/assets/fonts/barlow-500.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 700; font-style: normal; font-display: swap; src: url(/assets/fonts/barlow-700.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-style: italic; font-display: swap; src: url(/assets/fonts/barlowcond-700i.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 800; font-style: italic; font-display: swap; src: url(/assets/fonts/barlowcond-800i.woff2) format("woff2"); }

:root {
  --bg: #10111F;
  --bg-2: #161830;
  --slate: #23263D;
  --slate-2: #2E3250;
  --ink: #0A0B14;
  --paper: #F2F3F8;
  --muted: #A3A7C7;
  --gold: #FFC21A;
  --yellow: #FFE14D;
  --cyan: #3FD8F0;
  --heart: #E8364F;
  --arena: #FF3355;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --display: "Barlow Condensed", "Arial Narrow", system-ui, sans-serif;
  --body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--paper);
  font-family: var(--body);
  font-weight: 500;
  font-size: 1rem;
  line-height: 1.5;
  overflow-x: hidden;
}
/* halftone like the title / main menu (HalftoneDrift): rows every 24 px, alternate rows shifted 12 px, dots shrink from
   4.2 px at the top to 0.5 px and fade out, drifting slowly down. Drawn by site.js into this canvas; static under Reduce Motion. */
.halftone { position: fixed; inset: 0 0 auto 0; height: 100vh; z-index: -1; pointer-events: none; width: 100%; }
body::before { content: none; }
img, video { display: block; max-width: 100%; height: auto; }
a { color: var(--cyan); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
h1, h2, h3 { text-wrap: balance; margin: 0; }
p { text-wrap: pretty; margin: 0; }

.skip {
  position: absolute; left: 16px; top: -64px; z-index: 50;
  background: var(--yellow); color: var(--ink); padding: 8px 12px; font-weight: 700; text-decoration: none;
}
.skip:focus { top: 16px; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }
@media (max-width: 480px) { .wrap { padding: 0 16px; } }

/* ───────── type */
.display {
  font-family: var(--display);
  font-style: italic;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.005em;
  line-height: 0.92;
}
.h1 { font-size: clamp(3rem, 8vw, 5.25rem); }
.h2 { font-size: clamp(2.25rem, 6vw, 3.75rem); }
.h3 { font-size: 1.875rem; line-height: 1; }
.kicker {
  font-family: var(--display); font-style: italic; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.875rem; color: var(--cyan);
}
.lead { font-size: 1.25rem; line-height: 1.6; color: var(--muted); max-width: 34rem; }
.lead strong, .muted strong { color: var(--paper); font-weight: 700; }
.muted { color: var(--muted); }
.gold { color: var(--gold); }
.yellow { color: var(--yellow); }

/* ───────── nav: the game's SlantTabBar (binder / lessons tabs): icon over label on dark slanted chips with a hard black
   shadow; the chosen tab rides a sliding accent plate (stretch + ghost), tilts −6° and pops; a press sinks into the shadow. */
.nav {
  position: fixed; top: 10px; left: 50%; z-index: 40; transform: translateX(-50%);
  width: min(1072px, calc(100% - 20px));
  display: flex; align-items: center; gap: 12px;
  padding: 8px 10px 10px 12px;
  background: rgba(16, 17, 31, 0.82);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border: 2px solid #2A2440;
}
.nav .brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--paper); margin-right: auto; }
.nav .brand img { width: 34px; height: 34px; border-radius: 8px; }
.nav .brand span { font-family: var(--display); font-style: italic; font-weight: 800; font-size: 1.5rem; letter-spacing: 0.01em; }
.tabs { position: relative; display: flex; gap: 10px; padding: 2px 4px 4px; }
.tabs .plate, .tabs .ghost { position: absolute; left: 0; top: 2px; width: 76px; height: 50px; pointer-events: none; transform-origin: 50% 50%; }
.tabs .plate::before, .tabs .plate::after, .tabs .ghost::after { content: ""; position: absolute; inset: -2px; clip-path: polygon(12% 0, 100% 0, 88% 100%, 0 100%); }
.tabs .plate::before { background: #000; transform: translate(-3px, 4px); }
.tabs .plate::after { background: var(--plate, var(--yellow)); transition: background 0.16s; }
.tabs .ghost::after { background: var(--plate, var(--yellow)); opacity: 0.45; }
.tab { position: relative; width: 76px; height: 50px; border: 0; padding: 0; background: none; cursor: pointer; text-decoration: none; color: #fff; display: block; transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1); }
.tab .sh, .tab .face { position: absolute; inset: 0; }
.tab .sh { background: #000; clip-path: polygon(12% 0, 100% 0, 88% 100%, 0 100%); transform: translate(-3px, 4px); }
.tab .face { display: grid; place-items: center; grid-template-rows: 1fr auto; padding: 5px 0 5px; transition: transform 0.18s cubic-bezier(0.34, 1.8, 0.64, 1); }
.tab .face::before { content: ""; position: absolute; inset: 0; z-index: -1; background: #2A2440; clip-path: polygon(12% 0, 100% 0, 88% 100%, 0 100%); }
.tab .face { isolation: isolate; }
.tab .ico { font-size: 18px; color: var(--accent); }
.tab .lb { font-family: var(--display); font-style: italic; font-weight: 800; font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; line-height: 1; }
.tab.on { transform: rotate(-6deg) scale(1.08); }
.tab.on .sh, .tab.on .face::before { opacity: 0; }
.tab.on .lb, .tab.on .ico { color: var(--ink); }
.tab:active .face, .tab.down .face { transform: translate(-2px, 3px) scale(0.92); transition-duration: 0.06s; transition-timing-function: ease-out; }
.tab:focus-visible { outline: 3px solid var(--yellow); outline-offset: 4px; }
@media (max-width: 760px) { .tabs { display: none; } }

/* ───────── buttons: the game's ExactButton (UI/Buttons, Docs/Buttons/buttons_demo.html)
   skew −12°, dark face #24245A, hard shadow (−5, 6) #08081C; press = face sinks (−3, 4) and shrinks to 0.94 in 0.06 s,
   release springs back (0.14 s, overshoot); click = confirm flash, 4 frames × 45 ms (scan line → white → deep cyan → light cyan).
   .btn.gold = the PLAY key in its exact state (yellow face, ink label; flash white → ink → pale yellow). */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 28px; border: 0; background: none; cursor: pointer; text-decoration: none; isolation: isolate;
  font-family: var(--display); font-style: italic; font-weight: 800; text-transform: uppercase;
  font-size: 1.375rem; letter-spacing: 0.04em; line-height: 1; color: #fff;
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.btn::before { content: ""; position: absolute; inset: 0; z-index: -2; background: #08081C; transform: translate(-5px, 6px) skewX(-12deg); }
.btn > .bf { position: absolute; inset: 0; z-index: -1; background: var(--bf, #24245A); transform: skewX(-12deg); transition: transform 0.14s cubic-bezier(0.34, 1.8, 0.64, 1); }
.btn > .bf .fx { position: absolute; opacity: 0; }
.btn > span:not(.bf) { position: relative; display: inline-flex; align-items: center; gap: 8px; transition: transform 0.14s cubic-bezier(0.34, 1.8, 0.64, 1); }
.btn.down > .bf, .btn.down > span:not(.bf) { transform: translate(-3px, 4px) scale(0.94) skewX(-12deg); transition: transform 0.06s ease-out; }
.btn.down > span:not(.bf) { transform: translate(-3px, 4px) scale(0.94); }
.btn.gold { color: var(--ink-btn, #0A0A0A); --bf: #FFE14D; }
.btn.cyan { color: #00D1FF; }
.btn.small { min-height: 40px; padding: 0 18px; font-size: 1.0625rem; }
.btn.small::before { transform: translate(-4px, 5px) skewX(-12deg); }
.btn:focus-visible { outline: 3px solid var(--yellow); outline-offset: 6px; }
.btn[aria-disabled="true"] { color: #6B7480; cursor: default; }
/* the 4 confirm frames */
.btn .fx.scan { left: -8px; right: -8px; top: 50%; height: 5px; margin-top: -2.5px; background: #fff; }
.btn .fx.w { inset: 0; background: #fff; }
.btn .fx.db { left: 6px; right: 6px; top: -4px; bottom: -4px; background: #00ACFF; }
.btn .fx.lb { left: 14px; right: 14px; top: -2px; bottom: -2px; background: #00DCFF; }
.btn.gold .fx.db { inset: 0; background: #0A0A0A; }
.btn.gold .fx.lb { left: -6px; right: -6px; top: -4px; bottom: -4px; background: #FFF3A0; }
.btn.flash .fx.scan { animation: fxf 0.18s steps(1) 0s; }
.btn.flash .fx.w { animation: fxf 0.18s steps(1) 0.045s; }
.btn.flash .fx.db { animation: fxf 0.18s steps(1) 0.09s; }
.btn.flash .fx.lb { animation: fxf 0.18s steps(1) 0.135s; }
.btn.gold.flash .fx.scan { animation: none; }
.btn.gold.flash .fx.w { animation-delay: 0s; } .btn.gold.flash .fx.db { animation-delay: 0.05s; } .btn.gold.flash .fx.lb { animation-delay: 0.1s; }
@keyframes fxf { 0% { opacity: 1; } 25% { opacity: 0; } 100% { opacity: 0; } }

/* main-menu block (title screen): ink slanted text; the selected item sits on a deep blue block + a black block
   offset (−9, 8), skew −14°, hard-cutting to a new offset / tilt / scale on every beat (MainMenu.Jit). */
.menu { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.mi { position: relative; display: inline-block; padding: 8px 26px 6px; isolation: isolate; text-decoration: none; cursor: pointer; border: 0; background: none;
  font-family: var(--display); font-style: italic; font-weight: 800; text-transform: uppercase; line-height: 1; color: #0A0A0C; letter-spacing: 0.02em; }
.mi.l { font-size: clamp(2.25rem, 7vw, 3rem); } .mi.m { font-size: clamp(1.625rem, 5vw, 2.125rem); } .mi.s { font-size: clamp(1.25rem, 4vw, 1.625rem); }
.mi .k, .mi .u { position: absolute; inset: 0; z-index: -1; opacity: 0; transform: skewX(-14deg); }
.mi .k { background: #000; }
.mi .u { background: #1730C8; }
.mi.sel { color: #fff; }
.mi.sel .k { opacity: 1; transform: translate(calc(-9px + var(--jbx, 0px)), calc(8px + var(--jby, 0px))) rotate(var(--jbr, -3deg)) scale(var(--jbs, 1)) skewX(-14deg); }
.mi.sel .u { opacity: 1; transform: translate(var(--jx, 0px), var(--jy, 0px)) rotate(var(--jr, -3deg)) scale(var(--js, 1)) skewX(-14deg); }
.mi:focus-visible { outline: 3px solid #1730C8; outline-offset: 6px; }

.store {
  display: inline-flex; align-items: center; gap: 12px;
  padding: 10px 18px 10px 14px;
  background: var(--ink); color: var(--paper);
  border: 2px solid var(--slate-2);
}
.store svg { width: 28px; height: 28px; flex: none; }
.store small { display: block; font-size: 0.75rem; color: var(--muted); font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.store b { display: block; font-size: 1.125rem; line-height: 1.2; }

.chip {
  font-weight: 700; font-size: 0.875rem; padding: 4px 12px;
  background: var(--slate); color: var(--paper); border: 2px solid var(--slate-2);
}

/* ───────── slab: the game's black block with a cyan edge */
.slab {
  position: relative; background: var(--ink);
  border: 2px solid #2B2E4A;
  box-shadow: 10px 10px 0 var(--cyan);
}
.slab.gold { box-shadow: 10px 10px 0 var(--gold); }
.slab.red { box-shadow: 10px 10px 0 var(--arena); }

/* ───────── hero = the title screen: KaDing yellow, darker-yellow halftone drifting down, hologram tapes, logo, menu */
.hero { position: relative; overflow: hidden; background: #FFE14D; color: #0A0A0C; padding: 112px 0 72px; isolation: isolate; }
.hero .halftone-local { position: absolute; inset: 0 0 auto 0; width: 100%; height: 75%; z-index: -1; pointer-events: none; }
.hero::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 64px; background: var(--bg); clip-path: polygon(0 100%, 100% 30%, 100% 100%); z-index: 0; }
.hero-grid { position: relative; z-index: 1; display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; }
.hero .logo { width: min(380px, 86vw); margin: 0 0 4px -14px; position: relative; z-index: 2; }
.hero h1 { color: #0A0A0C; margin: 8px 0 12px; }
.hero h1 .line2 { color: #1730C8; }
.hero .lead { color: #3B3420; margin-bottom: 26px; font-size: 1.1875rem; max-width: 30rem; }
.hero .lead strong { color: #0A0A0C; }
.hero .meta { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 8px; }
.hero .meta span { font-family: var(--display); font-style: italic; font-weight: 800; font-size: 0.9375rem; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 3px 12px 1px; background: #0A0A0C; color: #FFE14D; transform: skewX(-12deg); }
@media (max-width: 860px) {
  .hero { padding-top: 92px; }
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
}
/* hologram tapes (HoloTapes): amber projection bands at −10.5°, pale glowing text with a cyan / pink split, scanlines */
.holo { position: absolute; left: -20%; width: 140%; z-index: 0; overflow: hidden; transform: rotate(-10.5deg); pointer-events: none;
  background: rgba(214, 160, 0, 0.30); border-top: 1px solid rgba(255, 250, 215, 0.7); border-bottom: 1px solid rgba(255, 250, 215, 0.7); }
.holo::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(rgba(255, 255, 255, 0.10) 0 1px, transparent 1px 3px); }
.holo .t { display: inline-block; white-space: nowrap; font-family: var(--display); font-style: italic; font-weight: 800; color: rgba(255, 250, 215, 0.95);
  text-shadow: 1.5px 0 0 rgba(0, 209, 255, 0.85), -1.5px 0 0 rgba(255, 51, 136, 0.75); letter-spacing: 0.08em; animation: holo 20s linear infinite; }
.holo.wide { height: 120px; top: 19%; } .holo.wide .t { font-size: 60px; line-height: 120px; }
.holo.narrow { height: 44px; top: 9%; } .holo.narrow .t { font-size: 22px; line-height: 44px; animation-duration: 14s; animation-direction: reverse; }
.holo.glitch { animation: hologlitch 0.24s steps(1); }
@keyframes holo { to { transform: translateX(-50%); } }
@keyframes hologlitch { 0% { opacity: 0.4; transform: rotate(-10.5deg) translateX(14px); } 33% { transform: rotate(-12.5deg) translateX(-8px); } 66% { opacity: 1; transform: rotate(-10.5deg); } }

/* phone frame around the gameplay clip */
.phone {
  justify-self: center;
  width: min(300px, 76vw); aspect-ratio: 1180 / 2554;
  padding: 9px; background: #05060C;
  border: 2px solid #000; border-radius: 42px;
  box-shadow: -10px 12px 0 #000, -10px 12px 0 3px #1730C8;
  transform: rotate(3deg);
  position: relative; z-index: 1;
}
.phone video, .phone img { width: 100%; height: 100% !important; object-fit: cover; border-radius: 33px; background: #0B0C16; }
.phone-wrap { position: relative; justify-self: center; }

/* ───────── sections */
section { padding: 96px 0; }
@media (max-width: 720px) { section { padding: 64px 0; } }
.section-head { margin-bottom: 48px; max-width: 40rem; }
.section-head .kicker { display: block; margin-bottom: 12px; }
.section-head .h2 { margin-bottom: 16px; }

/* ───────── playable hand = a slice of the battle HUD (colours from the game: board #16163A, formula plate, SUM #B48CFF,
   BOOST #FF9F2E, enemy HP pink, cards from SuitPalette) */
.play { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 48px; align-items: start; }
@media (max-width: 900px) { .play { grid-template-columns: 1fr; } }
.board { position: relative; isolation: isolate; overflow: hidden; padding: 18px 16px 18px; background: #16163A; border: 2px solid #000; box-shadow: -10px 12px 0 #000; }
.board::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(#22224E 1.6px, transparent 1.9px); background-size: 16px 16px; }
.enemy { display: grid; grid-template-columns: 1fr; justify-items: center; gap: 6px; margin-bottom: 8px; }
.hp { width: min(300px, 92%); display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px;
  font-family: var(--display); font-style: italic; font-weight: 800; text-transform: uppercase; color: #fff; }
.hp .nm { font-size: 0.9375rem; letter-spacing: 0.04em; }
.hp .bar { position: relative; height: 10px; background: #2A2A55; transform: skewX(-20deg); overflow: hidden; }
.hp .bar i { position: absolute; inset: 0 auto 0 0; width: 100%; background: #FF3DA5; transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1); }
.hp .bar b { position: absolute; inset: 0 auto 0 0; width: 100%; background: #fff; transition: width 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.25s; z-index: -1; }
.hp .bar { isolation: isolate; }
.hp .num { font-size: 0.875rem; } .hp .num small { font-size: 0.6875rem; color: var(--muted); margin-right: 3px; }
.mon { position: relative; width: 128px; height: 128px; display: grid; place-items: center; margin: 4px 0 6px; }
.mon .gem { position: absolute; inset: 6px; clip-path: polygon(50% 0, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
  background: conic-gradient(from 30deg, #EAF2FF, #B9C8E6, #F7FAFF, #A9B8D8, #E3ECFF, #B4C2E2, #EAF2FF); }
.mon .gem::after { content: ""; position: absolute; inset: 0; background:
  linear-gradient(30deg, transparent 49%, rgba(40, 50, 90, 0.35) 50%, transparent 51%),
  linear-gradient(-30deg, transparent 49%, rgba(40, 50, 90, 0.35) 50%, transparent 51%),
  linear-gradient(90deg, transparent 49.4%, rgba(40, 50, 90, 0.35) 50%, transparent 50.6%); }
.mon .tgt { position: relative; font-family: var(--display); font-style: italic; font-weight: 800; font-size: 3.5rem; line-height: 1; color: #fff;
  -webkit-text-stroke: 3px #FF3DA5; paint-order: stroke fill; text-shadow: 0 2px 0 rgba(0, 0, 0, 0.25); }
.mon.hit { animation: monhit 0.42s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes monhit { 0% { transform: translateX(0); } 15% { transform: translateX(-10px) rotate(-4deg); } 35% { transform: translateX(8px) rotate(3deg); } 60% { transform: translateX(-4px); } 100% { transform: none; } }
.mon.ko .gem { animation: shatter 0.6s ease-in forwards; }
.mon.ko .tgt { animation: shatter 0.6s ease-in forwards; }
@keyframes shatter { 0% { opacity: 1; transform: scale(1); filter: brightness(1); } 30% { filter: brightness(2.4); transform: scale(1.12); } 100% { opacity: 0; transform: scale(0.4) rotate(25deg); } }
.orb { position: absolute; left: 50%; top: 50%; width: 92px; height: 92px; margin: -46px 0 0 -46px; border-radius: 50%; display: grid; place-items: center; z-index: 3; pointer-events: none;
  background: #2F3C8A; border: 4px solid #FFE14D; box-shadow: 0 0 0 6px rgba(255, 225, 77, 0.25);
  font-family: var(--display); font-style: italic; font-weight: 800; font-size: 2rem; color: #fff; opacity: 0; transform: scale(0.3); }
.orb.go { animation: orb 1.1s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
@keyframes orb { 0% { opacity: 1; transform: scale(0.3); } 18% { transform: scale(1.15); } 30% { transform: scale(1); } 75% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(0.9) translateY(-20px); } }
.kotag { position: absolute; left: 50%; top: 52%; z-index: 4; pointer-events: none; opacity: 0;
  font-family: var(--display); font-style: italic; font-weight: 800; font-size: 4rem; line-height: 1; color: #CFF4FF;
  -webkit-text-stroke: 3px #0A3A6A; paint-order: stroke fill; transform: translate(-50%, -50%) rotate(-8deg); }
.kotag.go { animation: ko 1.4s cubic-bezier(0.3, 1.7, 0.5, 1) forwards; }
@keyframes ko { 0% { opacity: 0; transform: translate(-50%, -50%) rotate(-8deg) scale(2.2); } 12% { opacity: 1; transform: translate(-50%, -50%) rotate(-8deg) scale(1); } 80% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -50%) rotate(-8deg) scale(1); } }

/* formula slot: dark violet slanted plate, mini cards with red + / ink − between, "= result" on the right (yellow when exact) */
.fslot { position: relative; height: 72px; margin: 6px 4px 8px; isolation: isolate; display: grid; grid-template-columns: 1fr auto; align-items: center; padding: 0 22px 0 26px; }
.fslot::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(100deg, #3A3488 0%, #2B2766 55%, #232058 100%); clip-path: polygon(4% 0, 100% 0, 96% 100%, 0 100%); }
.fslot::after { content: ""; position: absolute; top: 0; bottom: 0; right: 22%; width: 2px; background: rgba(255, 255, 255, 0.12); z-index: -1; transform: skewX(-12deg); }
.fslot .cards { display: flex; align-items: center; gap: 6px; min-height: 56px; }
.fslot .mc { width: 36px; height: 50px; background: #F7F7F2; clip-path: polygon(0 0, 82% 0, 100% 14%, 100% 100%, 18% 100%, 0 86%); position: relative;
  font-family: var(--display); font-style: italic; font-weight: 800; color: #FF3355; animation: mcin 0.22s cubic-bezier(0.3, 1.6, 0.5, 1); }
.fslot .mc.s { color: #0A0A0A; }
.fslot .mc b { position: absolute; left: 4px; top: 2px; font-size: 15px; line-height: 1; }
.fslot .mc i { position: absolute; right: 4px; bottom: 3px; font-style: normal; font-size: 18px; line-height: 1; }
.fslot .op { font-family: var(--display); font-style: italic; font-weight: 800; font-size: 1.75rem; line-height: 1; }
.fslot .op.p { color: #FF3355; } .fslot .op.m { color: #fff; }
.fslot .res { font-family: var(--display); font-style: italic; font-weight: 800; font-size: 2.25rem; color: #fff; white-space: nowrap; }
.fslot .res.close { color: #00D1FF; } .fslot .res.exact { color: #FFE14D; }
.fslot .q { color: rgba(255, 255, 255, 0.55); }
.fslot.bump { animation: bump 0.08s ease-out; }
@keyframes bump { 50% { transform: translateY(-8px); } }
@keyframes mcin { 0% { transform: translateY(30px) scale(0.6); opacity: 0; } 100% { transform: none; opacity: 1; } }
.terms { display: flex; align-items: center; gap: 8px; margin: 0 6px 14px; font-family: var(--display); font-style: italic; font-weight: 800; text-transform: uppercase; }
.term { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 3px 8px; background: #23205A; transform: skewX(-12deg); font-size: 1.0625rem; }
.term > * { transform: skewX(12deg); }
.term .ti { width: 18px; height: 18px; background: currentColor; -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; }
.term.sum { color: #B48CFF; } .term.boost { color: #FF9F2E; }
.term b { color: #fff; font-weight: 800; }
.term.pop { animation: termpop 0.3s cubic-bezier(0.3, 1.7, 0.5, 1); }
@keyframes termpop { 0% { transform: skewX(-12deg) scale(1.35); } 100% { transform: skewX(-12deg); } }
.terms .x { color: #fff; opacity: 0.7; }
.terms .pat { margin-left: auto; font-size: 0.875rem; letter-spacing: 0.06em; padding: 3px 10px 2px; background: #FFE14D; color: #0A0A0A; transform: skewX(-12deg); opacity: 0; transition: opacity 0.2s; }
.terms .pat.on { opacity: 1; animation: termpop 0.3s cubic-bezier(0.3, 1.7, 0.5, 1); }

.hand { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin: 0 4px 22px; padding-top: 14px; }
.keys { display: grid; grid-template-columns: 0.42fr 1fr; gap: 18px; margin: 0 8px 4px 12px; }
.keys .btn { width: 100%; }
/* PLAY states (PlayButtonController): unavailable grey label · far white · close cyan + bottom bar · exact yellow + breath + sweep */
.btn.pk .bar { position: absolute; left: 0; right: 0; bottom: 0; height: 6px; background: #00D1FF; opacity: 0; }
.btn.pk .sweep { position: absolute; top: 0; bottom: 0; left: 0; width: 16px; background: #fff; opacity: 0; }
.btn.pk[data-state="na"] { color: #6B7480; }
.btn.pk[data-state="close"] { color: #00D1FF; }
.btn.pk[data-state="close"] .bar { opacity: 1; }
.btn.pk[data-state="exact"] { color: #0A0A0A; --bf: #FFE14D; }
.btn.pk[data-state="exact"] .sweep { animation: sweep 1.25s linear infinite; }
.btn.pk[data-state="exact"].breath > .bf, .btn.pk[data-state="exact"].breath > span:not(.bf) { animation: breath 0.47s ease-out; }
.btn.pk .bf { overflow: hidden; }
@keyframes sweep { 0% { opacity: 1; transform: translateX(-30px) skewX(-30deg); } 70% { opacity: 1; transform: translateX(420px) skewX(-30deg); } 70.1%, 100% { opacity: 0; } }
@keyframes breath { 0% { scale: 1.05; } 100% { scale: 1; } }
.board .why-line { margin: 14px 6px 0; min-height: 44px; font-weight: 700; color: var(--muted); }
.board .why-line b { color: #fff; }

/* game cards (colours from SuitPalette: face F7F7F2, hearts FF3355, spades 0A0A0A, selected cyan 00D1FF) */
.card {
  position: relative; aspect-ratio: 5 / 7; border: 0; padding: 0; cursor: pointer;
  background: #F7F7F2; color: #FF3355; border-radius: 10%;
  container-type: inline-size;   /* the big suit sizes off the card itself (cqw): on phones a 36px minimum ran off a 45px card */
  box-shadow: -3px 5px 0 #08081C;
  font-family: var(--display); font-style: italic; font-weight: 800;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.card.spade { color: #0A0A0A; }
.card .n { position: absolute; left: 9%; top: 3%; font-size: clamp(1.25rem, 4.6vw, 2rem); line-height: 1; letter-spacing: -0.02em; }
.card .ss { position: absolute; left: 11%; top: 34%; font-size: clamp(0.75rem, 2.4vw, 1rem); line-height: 1; font-style: normal; }
.card .big { position: absolute; right: 6%; bottom: 5%; width: 58%; aspect-ratio: 1; display: grid; place-items: center; }
.card .big .g { font-size: clamp(2.25rem, 7vw, 3.5rem); font-size: 58cqw; line-height: 1; font-style: normal; grid-area: 1 / 1; }
.card .big .op { grid-area: 1 / 1; color: #fff; font-family: var(--body); font-style: normal; font-weight: 700; font-size: clamp(1rem, 3vw, 1.5rem); font-size: 24cqw; line-height: 1; margin-top: -8%; }
.card:hover { transform: translateY(-4px); }
.card:active { transform: translateY(1px); }
.card.on { transform: translateY(-14px); box-shadow: -3px 5px 0 #00D1FF; }
.card .order {
  position: absolute; top: -10px; right: -6px; width: 24px; height: 24px; border-radius: 50%;
  background: #00D1FF; color: var(--ink); font: 700 0.875rem/24px var(--body); text-align: center; font-style: normal;
}
.card.dim { opacity: 0.35; cursor: not-allowed; transform: none; }
.card.shake { animation: shake 0.3s var(--ease); }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* KaDing clash: target number falls, result rises, they collide and the game's logo halves slam together */
.clash { position: fixed; inset: 0; z-index: 60; pointer-events: none; display: none; place-items: center; background: rgba(5, 6, 12, 0.72); }
.clash.go { display: grid; animation: clash-bg 1.9s linear forwards; }
.clash > * { grid-area: 1 / 1; }
.clash-num {
  font-family: var(--display); font-style: italic; font-weight: 800; font-size: clamp(5rem, 18vw, 10rem); line-height: 1;
  color: var(--paper); text-shadow: -5px 6px 0 #000; opacity: 0;
}
.clash.go .clash-num.top { animation: fall 0.36s cubic-bezier(0.55, 0, 1, 0.45) forwards; }
.clash.go .clash-num.bottom { color: var(--yellow); animation: rise 0.36s cubic-bezier(0.55, 0, 1, 0.45) forwards; }
.clash-logo { position: relative; width: min(520px, 86vw); aspect-ratio: 3040 / 2560; }
.clash-logo .half { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; }
.clash.go .half.top { animation: slam-top 1.5s var(--ease) 0.34s forwards; }
.clash.go .half.bottom { animation: slam-bottom 1.5s var(--ease) 0.34s forwards; }
.clash.go .clash-logo { animation: quake 0.4s linear 0.36s; }
@keyframes clash-bg { 0% { opacity: 0; } 8% { opacity: 1; } 85% { opacity: 1; } 100% { opacity: 0; } }
@keyframes fall { 0% { opacity: 1; transform: translateY(-60vh); } 100% { opacity: 1; transform: translateY(0); } }
@keyframes rise { 0% { opacity: 1; transform: translateY(60vh); } 100% { opacity: 1; transform: translateY(0); } }
@keyframes slam-top { 0% { opacity: 1; transform: translateY(-14%) scale(1.15); } 12% { transform: translateY(1%) scale(1); } 20%, 80% { opacity: 1; transform: none; } 100% { opacity: 0; transform: none; } }
@keyframes slam-bottom { 0% { opacity: 1; transform: translateY(14%) scale(1.15); } 12% { transform: translateY(-1%) scale(1); } 20%, 80% { opacity: 1; transform: none; } 100% { opacity: 0; transform: none; } }
@keyframes quake { 20% { transform: translate(-8px, 5px); } 40% { transform: translate(7px, -4px); } 60% { transform: translate(-4px, 3px); } 80% { transform: translate(2px, -1px); } }
.clash.go .clash-num { animation-fill-mode: forwards; }
.clash.hit .clash-num { opacity: 0 !important; }

/* icons (Font Awesome Free 7.3.1 Solid, CC BY 4.0) as masks, so they take the text colour */
.ico { display: inline-block; width: 1em; height: 1em; vertical-align: -0.125em; background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat; mask: var(--icon) center / contain no-repeat; }
.btn.sound[aria-pressed="false"] { opacity: 0.6; }

/* ───────── tagline reveal */
.tagline { padding: 120px 0; }
.tagline p {
  font-family: var(--display); font-style: italic; font-weight: 800; text-transform: uppercase;
  font-size: clamp(2.5rem, 7.5vw, 5.5rem); line-height: 0.95; max-width: 16ch;
}
.tagline .w { color: rgba(242, 243, 248, 0.22); transition: color 0.6s var(--ease); }
.tagline .w.lit { color: var(--paper); }
.tagline .w.lit.y { color: var(--yellow); }

/* ───────── modes: slanted blocks + the game's ransom sticker titles */
.modes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; padding: 0 12px; }
@media (max-width: 960px) { .modes { grid-template-columns: minmax(0, 1fr); gap: 48px; padding: 0 22px 0 14px; } }
.mode { position: relative; isolation: isolate; padding: 40px 28px 28px; display: flex; flex-direction: column; gap: 12px; --accent: var(--cyan); }
.mode.adventure { --accent: var(--gold); }
.mode.arena { --accent: var(--arena); }
.mode::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--ink); border: 2px solid #2B2E4A;
  transform: skewX(-6deg); box-shadow: 10px 10px 0 var(--accent);
}
.mode .sub { font-family: var(--display); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: 1.875rem; line-height: 1; }
.mode .tag {
  align-self: flex-start; font-family: var(--display); font-style: italic; font-weight: 800; font-size: 0.875rem;
  letter-spacing: 0.12em; text-transform: uppercase; padding: 2px 10px; background: var(--slate-2); color: var(--paper); transform: skewX(-8deg);
}
.mode ul { margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.mode li { list-style: none; padding-left: 20px; position: relative; color: var(--muted); }
.mode li::before { content: ""; position: absolute; left: 0; top: 9px; width: 10px; height: 6px; background: var(--accent); transform: skewX(-20deg); }

/* ransom word (AdvBuild.Ransom): letters on alternating blocks, rhythm of tilts / drops / sizes, hard shadow */
.ransom { display: flex; align-items: center; margin: 0 0 4px; min-height: 64px; --u: 40px; font-size: 0; }
.ransom .rl {
  flex: none;
  display: inline-grid; place-items: center; width: calc(var(--u) * var(--f)); height: calc(var(--u) * var(--f) * 1.36);
  margin-right: calc(var(--u) * 0.11);
  font-family: var(--display); font-style: italic; font-weight: 800; text-transform: uppercase;
  font-size: calc(var(--u) * var(--f) * 1.36 * 0.78); line-height: 1;
  background: var(--ink); color: var(--accent); box-shadow: -3px 4px 0 #000; outline: 1.5px solid rgba(255, 255, 255, 0.08);
  transform: translateY(calc(var(--dy) * 1px)) rotate(calc(var(--rot) * 1deg));
}
.ransom .rl.s1 { background: var(--accent); color: var(--ink); }
.ransom .rl.s2 { background: var(--ink); color: #fff; }
.mode.arena .ransom .rl.s1 { color: #fff; }

/* ───────── why: tiles with an icon badge, a big index number and a slanted accent edge */
.why { position: relative; overflow: hidden; }
.why-band {
  position: absolute; left: -10%; right: -10%; top: 38%; height: 260px; z-index: -1;
  background: repeating-linear-gradient(-45deg, rgba(255, 225, 77, 0.05) 0 14px, transparent 14px 28px);
  border-top: 2px solid rgba(255, 225, 77, 0.25); border-bottom: 2px solid rgba(255, 225, 77, 0.25);
  transform: rotate(-5deg);
}
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px 20px; }
@media (max-width: 860px) { .facts { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .facts { grid-template-columns: 1fr; } }
.fact { position: relative; isolation: isolate; padding: 28px 24px 24px 28px; min-height: 180px; --accent: var(--cyan); }
.fact::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--bg-2); border: 2px solid var(--slate-2); border-left: 0;
  box-shadow: inset 6px 0 0 var(--accent), 6px 6px 0 #05060C;
  transform: skewX(-6deg);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.fact:hover::before { transform: skewX(-6deg) translate(-3px, -3px); box-shadow: inset 6px 0 0 var(--accent), 9px 9px 0 var(--accent); }
.fact .badge {
  display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 16px;
  background: var(--accent); color: var(--ink); font-size: 26px; transform: skewX(-8deg) rotate(-4deg);
  box-shadow: -3px 4px 0 #000;
}
.fact .badge .ico { transform: skewX(8deg) rotate(4deg); }
.fact .no {
  position: absolute; right: 18px; top: 10px; z-index: -1;
  font-family: var(--display); font-style: italic; font-weight: 800; font-size: 4.5rem; line-height: 1;
  color: transparent; -webkit-text-stroke: 2px rgba(255, 255, 255, 0.08);
}
.fact b { display: block; font-family: var(--display); font-style: italic; font-weight: 800; font-size: 1.875rem; line-height: 1; text-transform: uppercase; margin-bottom: 8px; color: var(--paper); }
.fact p { color: var(--muted); }

/* ───────── FAQ */
.faq { max-width: 48rem; display: grid; gap: 12px; }
.faq details { background: var(--bg-2); border: 2px solid var(--slate-2); }
.faq summary {
  cursor: pointer; list-style: none; padding: 16px 48px 16px 20px; position: relative;
  font-weight: 700; font-size: 1.125rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
  font-family: var(--display); font-weight: 800; font-size: 1.875rem; color: var(--cyan);
  transition: transform 0.3s var(--ease);
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { padding: 0 20px 20px; color: var(--muted); }

/* ───────── final CTA + footer */
.final { text-align: center; padding: 96px 0 120px; }
.final .h2 { margin: 0 auto 16px; max-width: 14ch; }
.final .lead { margin: 0 auto 32px; }
.final .store { margin: 0 auto; }
footer { border-top: 2px solid var(--slate); padding: 32px 0 48px; color: var(--muted); font-size: 0.875rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; }
footer nav { display: flex; gap: 24px; flex-wrap: wrap; }
footer a { color: var(--muted); font-weight: 700; text-decoration: none; }
footer a:hover { color: var(--paper); }

/* ───────── scroll reveal */
.reveal { opacity: 0; transform: translateY(32px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

/* ───────── simple pages (privacy, challenge, 404) */
.page { padding: 120px 0 64px; }
.page .wrap { max-width: 44rem; }
.prose h1 { margin-bottom: 8px; }
.prose h2 { font-family: var(--display); font-style: italic; font-weight: 800; text-transform: uppercase; font-size: 1.875rem; line-height: 1; margin: 48px 0 12px; }
.prose p, .prose ul { color: var(--muted); font-size: 1.0625rem; line-height: 1.65; margin: 0 0 16px; }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 6px; }
.prose .date { color: var(--muted); margin-bottom: 32px; }
.prose .short { padding: 24px; margin: 0 0 40px; }
.prose .short p { color: var(--paper); font-size: 1.25rem; font-weight: 700; line-height: 1.45; margin: 0; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .tagline .w { color: var(--paper); transition: none; }
  .tagline .w.y { color: var(--yellow); }
  .btn > .bf, .btn > span, .card, .tab, .tab .face, .faq summary::after { transition: none !important; }
  .btn .fx, .btn.pk .sweep, .holo .t, .orb, .kotag, .mon * { animation: none !important; }
  .ransom .rl { transform: none !important; }
  .phone { transform: none; }
  .clash { display: none !important; }
}
.found[hidden] { display: none; }

/* KaDings found in the playable hand */
.found { margin-top: 28px; display: grid; gap: 8px; max-width: 26rem; }
.found ul { padding: 0; margin: 0; display: grid; gap: 8px; }
.found li { list-style: none; display: flex; justify-content: space-between; gap: 16px; padding: 8px 14px; background: #16163A; border-left: 4px solid #FFE14D;
  font-family: var(--display); font-style: italic; font-weight: 800; font-size: 1.25rem; letter-spacing: 0.02em; transform: skewX(-8deg); }
.found li > * { transform: skewX(8deg); }
.found .dmg { color: #FFE14D; }
.found[hidden] { display: none; }
