/* Loud-type look after koffiracha.com (via tabnav.com's best website examples):
   white page, huge tight uppercase grotesk, a neon-lime swoosh, the product
   (our share cards) tilted over the headline, ticker strips and black rules.
   Plain CSS, no framework, no web fonts. */
:root {
  --lime: #e6fe52;
  --ink: #000;
  --paper: #fff;
  --paper-2: #f8f8f8;
  --muted: #555;
  --rule: #000;
  --ok: #1a7f37;
  --bad: #d1242f;
  --shadow: #000;          /* hard offset shadows */
  --card-shadow: rgba(0,0,0,.9);
  --drop-bg: #000; --drop-fg: #fff; --drop-sub: #bbb; --drop-arrow: var(--lime);
  --foot-bg: #000; --foot-fg: #fff; --foot-sub: #aaa;
  --track: rgba(0,0,0,.18);
  --swoosh: var(--lime); --shadow-on-lime: #000;
  --display: "Helvetica Neue", "Arial Nova", Helvetica, Arial, "Inter", system-ui, sans-serif;
  font-family: var(--display);
  color-scheme: light;
  -webkit-font-smoothing: antialiased;
}
:root[data-theme="dark"] {
  --ink: #f2f2ee; --paper: #0c0c0c; --paper-2: #181818; --muted: #a3a3a3; --rule: #f2f2ee;
  --ok: #4ade80; --bad: #f87171;
  --shadow: var(--lime); --card-shadow: var(--lime);
  --drop-bg: var(--lime); --drop-fg: #000; --drop-sub: #333; --drop-arrow: #000;
  --foot-bg: #000; --foot-fg: #f2f2ee; --foot-sub: #8a8a8a;
  --track: rgba(255,255,255,.2);
  --swoosh: rgba(230,254,82,.22); --shadow-on-lime: #f2f2ee;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #f2f2ee; --paper: #0c0c0c; --paper-2: #181818; --muted: #a3a3a3; --rule: #f2f2ee;
    --ok: #4ade80; --bad: #f87171;
    --shadow: var(--lime); --card-shadow: var(--lime);
    --drop-bg: var(--lime); --drop-fg: #000; --drop-sub: #333; --drop-arrow: #000;
    --foot-bg: #000; --foot-fg: #f2f2ee; --foot-sub: #8a8a8a;
    --track: rgba(255,255,255,.2);
  --swoosh: rgba(230,254,82,.22); --shadow-on-lime: #f2f2ee;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
html { overflow-x: clip; }
html, body { margin: 0; min-height: 100%; }
body { background: var(--paper); color: var(--ink); display: flex; flex-direction: column; min-height: 100vh; font-size: 16px; line-height: 1.45; }
a { color: var(--ink); }
[hidden] { display: none !important; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88em; background: var(--paper-2); border: 1px solid var(--ink); padding: 0 5px; border-radius: 4px; }
.i { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.bleed { margin-inline: calc(50% - 50vw); }

/* Top bar */
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 14px 20px; border-bottom: 1.5px solid var(--rule); background: var(--paper); position: sticky; top: 0; z-index: 10; }
.brand { font-weight: 700; font-size: 18px; letter-spacing: -.03em; text-transform: uppercase; text-decoration: none; }
.topbar nav { display: flex; gap: 20px; }
.topbar nav a { font-size: 14px; font-weight: 500; text-transform: uppercase; letter-spacing: .02em; text-decoration: none; }
.topbar nav a:hover { text-decoration: underline; text-underline-offset: 4px; }

main { flex: 1; width: 100%; max-width: 640px; margin: 0 auto; padding: 0 20px 24px; }
.screen.center { text-align: center; padding-top: 18vh; }

/* Ticker strips */
.ticker { overflow: hidden; border-bottom: 1.5px solid var(--rule); background: var(--paper); white-space: nowrap; }
.ticker.lime { background: var(--lime); border-top: 1.5px solid var(--rule); }
.ticker-track { display: inline-flex; animation: tick 40s linear infinite; }
.ticker-track.slow { animation-duration: 60s; }
.ticker span { padding: 9px 0; font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.ticker.lime span { font-size: clamp(18px, 4vw, 26px); padding: 12px 0; letter-spacing: -.03em; }
@keyframes tick { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-track { animation: none; } }

/* Hero: headline, tilted live cards, pitch and upload. Stacked on phones, two columns on desktop. */
.hero {
  position: relative; overflow: hidden; padding: 30px 20px 36px;
  display: grid; grid-template-areas: "h1" "cards" "lead" "cta";
}
.swoosh { position: absolute; left: -10%; top: 4%; width: 120%; height: 70%; z-index: 0; }
.swoosh path { fill: none; stroke: var(--swoosh); stroke-width: 120; stroke-linecap: round; }
h1 {
  grid-area: h1; position: relative; z-index: 1; margin: 0; display: flex; flex-direction: column;
  font-size: clamp(44px, 16.5vw, 132px); line-height: .84; font-weight: 700; letter-spacing: -.055em; text-transform: uppercase;
}
.hero-cards { grid-area: cards; position: relative; z-index: 2; display: flex; justify-content: center; margin-top: -12px; height: clamp(230px, 64vw, 420px); }
.hero-cards canvas {
  width: clamp(120px, 34vw, 250px); height: auto; aspect-ratio: 9 / 16; border-radius: 14px;
  border: 1.5px solid var(--ink); box-shadow: 10px 14px 0 var(--card-shadow); background: var(--lime);
}
#hero-a { transform: rotate(-9deg) translate(14%, 4%); }
#hero-b { transform: rotate(7deg) translate(-12%, 10%); }
.hero .lead { grid-area: lead; position: relative; z-index: 1; }
.hero .cta { grid-area: cta; position: relative; z-index: 1; }
@media (min-width: 900px) {
  .hero.bleed { margin-inline: calc(50% - min(50vw, 590px)); }
  .hero {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); column-gap: 24px;
    grid-template-areas: "h1 cards" "lead cards" "cta cards"; align-content: start; padding: 56px 20px 64px;
  }
  h1 { font-size: min(128px, 10.4vw); }
  .hero-cards { margin: 0; height: auto; align-self: center; }
  .swoosh { top: 10%; height: 80%; }
}

h2 { font-size: clamp(32px, 8vw, 48px); line-height: .92; font-weight: 700; letter-spacing: -.05em; text-transform: uppercase; margin: 10px 0 12px; }
.title { margin-top: 18px; }
.lead { font-size: clamp(19px, 4.6vw, 23px); line-height: 1.3; letter-spacing: -.02em; margin: 26px 0 22px; max-width: 34ch; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.tag { display: inline-block; margin-top: 26px; padding: 4px 12px; border: 1.5px solid var(--ink); border-radius: 999px; background: var(--lime); font-size: 13px; font-weight: 600; text-transform: uppercase; }

/* Buttons */
.btn {
  appearance: none; cursor: pointer; font: inherit; font-weight: 600; font-size: 15px; text-transform: uppercase; letter-spacing: .01em;
  height: 52px; padding: 0 24px; border-radius: 999px; border: 1.5px solid var(--ink);
  color: var(--ink); background: var(--lime); text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; transition: transform .1s, box-shadow .1s;
}
.btn:hover { box-shadow: 4px 4px 0 var(--shadow); transform: translate(-2px, -2px); }
.btn:active { box-shadow: none; transform: none; }
.btn.ghost { background: var(--paper); }
.btn.link { background: none; border: 0; height: auto; padding: 8px 0; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; box-shadow: none; transform: none; }
.btn:disabled { opacity: .35; cursor: default; box-shadow: none; transform: none; }
.icon-btn { width: 52px; padding: 0; }
.wide { width: 100%; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 14px 0 22px; }

/* Upload */
.cta { display: grid; gap: 10px; margin-bottom: 34px; }
.drop {
  position: relative; display: flex; flex-direction: column; gap: 2px; cursor: pointer;
  padding: 22px 24px; border-radius: 22px; border: 1.5px solid var(--ink); background: var(--drop-bg); color: var(--drop-fg);
  transition: transform .1s, box-shadow .1s;
}
.drop strong { font-size: clamp(22px, 5.6vw, 28px); line-height: 1; font-weight: 700; letter-spacing: -.04em; text-transform: uppercase; }
.drop strong::after { content: " →"; color: var(--drop-arrow); }
.drop span { color: var(--drop-sub); font-size: 14px; }
.drop:hover, .drop.over { box-shadow: 6px 6px 0 var(--lime), 6px 6px 0 1.5px var(--shadow); transform: translate(-3px, -3px); }
.drop:focus-within { outline: 3px solid var(--lime); outline-offset: 3px; }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.visits { margin: 4px 0 0; font-size: 13px; font-weight: 600; text-transform: uppercase; }

/* Facts */
.facts { list-style: none; padding: 0; margin: 34px 0; border-top: 1.5px solid var(--rule); }
.facts li { display: grid; grid-template-columns: 64px 1fr; gap: 6px; padding: 18px 0; border-bottom: 1.5px solid var(--rule); }
.facts .num { font-size: 34px; font-weight: 700; letter-spacing: -.05em; line-height: 1; }
.facts strong { display: block; font-size: 22px; line-height: 1.05; letter-spacing: -.035em; text-transform: uppercase; }
.facts p { margin: 6px 0 0; color: var(--muted); }

/* How-to accordion */
.howto { margin-bottom: 28px; }
.howto details { border-bottom: 1.5px solid var(--rule); padding: 16px 0; }
.howto details:first-of-type { border-top: 1.5px solid var(--rule); }
.howto summary { font-size: 20px; font-weight: 700; letter-spacing: -.03em; text-transform: uppercase; cursor: pointer; list-style: none; display: flex; justify-content: space-between; }
.howto summary::after { content: "+"; }
.howto details[open] summary::after { content: "−"; }
.howto summary::-webkit-details-marker { display: none; }
.howto ol { margin: 12px 0 2px; padding-left: 22px; color: var(--muted); }

/* Loading */
.spinner { width: 44px; height: 44px; margin: 0 auto 18px; border-radius: 50%; border: 4px solid var(--paper-2); border-top-color: var(--ink); border-right-color: var(--lime); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#load-stage { font-size: 22px; font-weight: 700; text-transform: uppercase; letter-spacing: -.03em; }
.bar { height: 10px; border: 1.5px solid var(--ink); border-radius: 999px; overflow: hidden; max-width: 260px; margin: 14px auto; }
#load-bar { height: 100%; width: 0; background: var(--lime); transition: width .2s; }

pre { white-space: pre-wrap; word-break: break-all; background: var(--paper-2); border: 1.5px solid var(--ink); padding: 12px; border-radius: 12px; font-size: 12px; }
.note { padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--ink); background: var(--lime); }

/* Mode picker */
.modes { display: grid; gap: 12px; margin: 22px 0 16px; }
.mode {
  appearance: none; font: inherit; color: var(--ink); text-align: left; cursor: pointer;
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 14px; row-gap: 2px; align-items: center;
  padding: 20px; border-radius: 22px; border: 1.5px solid var(--ink); background: var(--paper);
  transition: transform .1s, box-shadow .1s;
}
.mode:first-child { background: var(--lime); }
.mode:hover { box-shadow: 5px 5px 0 var(--shadow); transform: translate(-2px, -2px); }
.ti { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid var(--ink); background: var(--paper); }
.mode .ti { grid-row: span 2; }
.mode strong { font-size: 24px; line-height: 1; font-weight: 700; letter-spacing: -.04em; text-transform: uppercase; }
.mode span:last-child { font-size: 15px; }

/* Wrapped viewer */
.wrapped { display: flex; flex-direction: column; align-items: center; gap: 16px; padding-top: 20px; }
.viewer { position: relative; width: min(100%, calc((100vh - 290px) * 9 / 16)); min-width: 240px; }
.viewer canvas { display: block; width: 100%; height: auto; aspect-ratio: 9 / 16; border-radius: 18px; border: 1.5px solid var(--ink); box-shadow: 8px 8px 0 var(--shadow); touch-action: pan-y; cursor: pointer; user-select: none; }
.progress { position: absolute; top: 10px; left: 12px; right: 12px; display: flex; gap: 4px; z-index: 2; pointer-events: none; }
.progress span { flex: 1; height: 4px; border-radius: 2px; background: rgba(0,0,0,.18); }
.progress span.on { background: var(--ink); }
.nav { position: absolute; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; border: 1.5px solid var(--ink); background: var(--lime); color: var(--ink); cursor: pointer; }
.nav:disabled { opacity: 0; pointer-events: none; }
.prev { left: -64px; } .next { right: -64px; }
@media (max-width: 720px) { .nav { display: none; } }
.actions { display: flex; gap: 8px; width: 100%; max-width: 420px; }
.actions .btn { white-space: nowrap; padding: 0 16px; font-size: 14px; }
.actions .btn:first-child { flex: 1; }
.actions .icon-btn { padding: 0; }
.controls { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; justify-content: center; }
select { font: inherit; font-size: 15px; height: 38px; padding: 0 12px; border-radius: 999px; background: var(--paper); color: var(--ink); border: 1.5px solid var(--ink); margin-left: 6px; }
.check { display: inline-flex; align-items: center; gap: 8px; }
.check input { width: 18px; height: 18px; accent-color: var(--ink); }
.advanced { font-size: 14px; text-align: center; }
.advanced summary { cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* Game */
.back { padding-left: 0; text-decoration: none; margin-top: 16px; }
.player-form { display: flex; gap: 8px; margin: 18px 0 10px; }
.player-form input { flex: 1; font: inherit; height: 52px; padding: 0 20px; border-radius: 999px; border: 1.5px solid var(--ink); background: var(--paper); color: var(--ink); }
.player-form input:focus { outline: 3px solid var(--lime); outline-offset: 0; }
.chips { list-style: none; padding: 0; margin: 0 0 6px; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { display: inline-flex; align-items: center; gap: 4px; padding: 5px 8px 5px 14px; border-radius: 999px; border: 1.5px solid var(--ink); background: var(--lime); font-size: 15px; font-weight: 600; }
.chip-x { background: none; border: 0; cursor: pointer; font-size: 12px; padding: 0 2px; color: var(--ink); }
.panel { border: 1.5px solid var(--ink); border-radius: 20px; background: var(--paper-2); }
.setup-grid { display: grid; gap: 14px; padding: 18px; margin: 16px 0 8px; }
.setup-grid label:not(.check) { display: flex; justify-content: space-between; align-items: center; font-weight: 600; text-transform: uppercase; font-size: 14px; }
.review { padding-left: 22px; margin: 16px 0; }
.review li { margin-bottom: 10px; }
.review li span { display: inline-block; width: calc(100% - 90px); vertical-align: middle; }
.small-btn { height: 32px; padding: 0 14px; font-size: 12px; margin-left: 8px; vertical-align: middle; }

.game { display: flex; flex-direction: column; gap: 14px; padding-top: 20px; }
.game-top { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; font-weight: 600; text-transform: uppercase; font-variant-numeric: tabular-nums; }
.turn { margin: 0; font-size: clamp(34px, 9vw, 52px); line-height: .9; font-weight: 700; letter-spacing: -.05em; text-transform: uppercase; text-align: center; }
.question { min-height: 200px; display: flex; flex-direction: column; justify-content: center; }
.q-label { margin: 0 0 12px; text-align: center; font-weight: 600; text-transform: uppercase; font-size: 14px; }
.bubble {
  margin: 0; padding: 22px 24px; border-radius: 26px 26px 26px 6px; background: var(--lime); color: var(--ink); border: 1.5px solid var(--ink);
  font-size: clamp(22px, 5.6vw, 30px); line-height: 1.2; font-weight: 600; letter-spacing: -.025em;
  box-shadow: 8px 8px 0 var(--shadow-on-lime); overflow-wrap: anywhere;
}
.big-emoji { font-size: 120px; text-align: center; line-height: 1.1; }
.options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.opt {
  appearance: none; font: inherit; font-weight: 700; font-size: 18px; letter-spacing: -.02em; text-transform: uppercase; color: var(--ink); cursor: pointer; min-height: 60px;
  padding: 12px 10px; border-radius: 999px; border: 1.5px solid var(--ink); background: var(--paper); overflow-wrap: anywhere; transition: transform .1s, box-shadow .1s;
}
.opt:hover:not(:disabled) { box-shadow: 4px 4px 0 var(--shadow); transform: translate(-2px, -2px); }
.opt:disabled { cursor: default; opacity: .4; }
.opt.right { opacity: 1; background: var(--lime); }
.opt.right::after { content: " ✓"; }
.opt.wrong { opacity: 1; background: var(--ink); color: var(--paper); text-decoration: line-through; }
.reveal { margin: 0; min-height: 1.5em; text-align: center; font-weight: 600; }
.board { list-style: none; padding: 0; margin: 0; width: 100%; max-width: 420px; border-top: 1.5px solid var(--rule); }
.board li { display: flex; justify-content: space-between; padding: 12px 4px; border-bottom: 1.5px solid var(--rule); font-size: 20px; font-weight: 700; letter-spacing: -.03em; text-transform: uppercase; font-variant-numeric: tabular-nums; }
.board li:first-child { background: var(--lime); padding-inline: 12px; }

/* Footer */
.foot { text-align: center; padding: 20px 20px 28px; background: var(--foot-bg); color: var(--foot-fg); border-top: 1.5px solid var(--rule); }
.foot a { color: var(--foot-fg); }
.foot .muted { color: var(--foot-sub); }
.net { display: inline-flex; align-items: center; gap: 8px; margin: 0 0 10px; padding: 7px 16px; border-radius: 999px; background: var(--lime); color: var(--ink); font-size: 13px; font-weight: 600; }
.net::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #000; }
.net.bad { background: var(--bad); color: var(--paper); }

/* Privacy page */
.prose { padding-top: 26px; }
.prose h1 { font-size: clamp(44px, 12vw, 84px); display: block; margin-bottom: 18px; }
.prose h2 { font-size: 26px; margin-top: 38px; }
.prose li { margin-bottom: 6px; }
.prose p, .prose li { color: var(--ink); opacity: .9; }

/* Lime surfaces keep black text and outlines in both themes. */
.btn:not(.ghost):not(.link), .tag, .note, .net, .mode:first-child, .chips li, .chip-x, .bubble, .nav,
.opt.right, .board li:first-child, .ticker.lime, .ticker.lime span { color: #000; border-color: #000; }
.mode:first-child .ti { background: #fff; border-color: #000; color: #000; }
.progress span { background: rgba(0,0,0,.18); }
.progress span.on { background: #000; }

/* Theme toggle in the top bar */
.theme-toggle { appearance: none; background: none; border: 1.5px solid var(--ink); color: var(--ink); border-radius: 999px; height: 30px; padding: 0 12px; font: inherit; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .02em; cursor: pointer; }
.theme-toggle:hover { background: var(--lime); color: #000; border-color: #000; }
.topbar nav { align-items: center; }
.btn:not(.ghost):not(.link):hover, .mode:first-child:hover { box-shadow: 4px 4px 0 var(--shadow-on-lime); }
.drop:hover, .drop.over { box-shadow: 6px 6px 0 var(--shadow-on-lime); }
.brand { white-space: nowrap; }
@media (max-width: 420px) {
  .topbar { padding: 12px 16px; }
  .topbar nav { gap: 12px; }
  .topbar nav a { font-size: 13px; }
  .brand { font-size: 16px; }
}
