/* Starting look: warm grey page, white screen, ink text, one accent whose hue comes from the coin ticker. Geist for
   text, Geist Mono for small labels and numbers (local files, SIL OFL). Change the palette freely to fit the idea,
   dark or light, loud or calm: keep it finished and fresh. No inline styles in HTML (strict CSP): JS sets styles
   through the CSSOM only. */
@font-face { font-family: "Geist"; src: url("geist.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("geist-mono.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }

:root {
  --hue: 354;
  --bg: #dff0fa; --panel: #eef7fc; --white: #fff;
  --ink: #16335f; --ink2: #3b5379; --muted: #5f7596; --faint: #9db0c9;
  --line: #c3dcee; --line2: #a5c6df;
  --accent: hsl(var(--hue) 92% 52%); --accent-ink: hsl(var(--hue) 85% 38%); --accent-soft: hsl(var(--hue) 90% 52% / .12);
  --ok: #0b8a4c;
  --sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: "Geist Mono", ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace;
  --r: 16px; --rs: 10px; --maxw: 1080px; --gutter: clamp(16px, 3vw, 28px);
}
* { box-sizing: border-box; }
html { background: var(--bg); color: var(--ink); }
body { margin: 0; min-height: 100dvh; background: var(--bg); font: 400 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--line2); }
h1, h2, h3, p { margin: 0; }
button { font: inherit; color: inherit; }
img { max-width: 100%; display: block; }

.top, .hero, .stage, .log, .foot { width: min(var(--maxw), 100% - 2 * var(--gutter)); margin: 0 auto; }
.top { display: flex; align-items: center; gap: 18px; padding: 18px 0; }
.wordmark { font: 700 20px/1 var(--sans); letter-spacing: -0.02em; }
.menu { display: flex; gap: 14px; margin-left: 6px; font: 500 14px/1 var(--sans); color: var(--ink2); }
.chip { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px 4px 5px; border-radius: 999px; background: var(--panel); border: 1px solid var(--line); font: 500 12px/1 var(--mono); color: var(--ink2); }
.mark { width: 18px; height: 18px; border-radius: 50%; object-fit: cover; background: var(--white); }

.hero { padding: clamp(28px, 6vw, 72px) 0 clamp(18px, 3vw, 32px); }
.hero-text { max-width: 640px; }
h1 { font: 700 clamp(34px, 6vw, 60px)/1.02 var(--sans); letter-spacing: -0.03em; }
.lead { margin-top: 16px; font-size: clamp(16px, 1.6vw, 19px); color: var(--ink2); max-width: 520px; }
.actions { margin-top: 24px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; padding: 11px 18px; border-radius: 999px; background: var(--ink); color: #fff; font: 600 15px/1 var(--sans); border: 0; cursor: pointer; }
.btn:hover { text-decoration: none; background: var(--accent-ink); }
.btn.ghost { background: transparent; color: var(--ink); border: 1px solid var(--line2); }
.live { display: inline-flex; align-items: center; gap: 7px; font: 500 12.5px/1 var(--mono); color: var(--muted); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(11, 138, 76, .14); }

.stage { padding: 8px 0 28px; }
.screen { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); box-shadow: 0 30px 60px -30px rgba(18, 19, 23, .35); overflow: hidden; }
.bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--panel); }
.dots { display: inline-flex; gap: 5px; }
.dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--line2); display: inline-block; }
.url { flex: 1; text-align: center; font: 500 12px/1 var(--mono); color: var(--muted); }
#app { min-height: 380px; padding: clamp(18px, 3vw, 36px); }
.soon { display: grid; place-content: center; text-align: center; min-height: 320px; gap: 8px; color: var(--ink2); }
.soon h2 { font: 600 24px/1.1 var(--sans); color: var(--ink); letter-spacing: -0.02em; }
.eyebrow { font: 500 12px/1 var(--mono); color: var(--accent-ink); text-transform: uppercase; letter-spacing: .08em; }

.log { padding: 24px 0 40px; }
.log h2 { font: 600 18px/1.2 var(--sans); margin-bottom: 12px; letter-spacing: -0.01em; }
.log ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.log li { display: flex; gap: 14px; align-items: baseline; padding: 10px 14px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--rs); font-size: 15px; }
.when { font: 500 12px/1 var(--mono); color: var(--muted); white-space: nowrap; }

.foot { padding: 20px 0 48px; color: var(--muted); font-size: 13.5px; display: grid; gap: 10px; }
.ca { display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 6px 10px; border-radius: 8px; background: var(--panel); border: 1px solid var(--line); color: var(--ink2); font: 500 12px/1.4 var(--mono); cursor: pointer; word-break: break-all; text-align: left; }
.ca:hover { border-color: var(--ink2); color: var(--ink); }
.ca code { font: inherit; }

/* tiles and small building blocks the product can use */
.tiles { display: grid; gap: 8px; }
.tile { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); font: 700 20px/1 var(--mono); text-transform: uppercase; }
.tile.hit { background: var(--accent); color: #fff; border-color: transparent; }
.tile.near { background: var(--accent-soft); color: var(--accent-ink); border-color: transparent; }
.tile.miss { background: var(--line); color: var(--muted); border-color: transparent; }

.hero { display: grid; gap: 28px; align-items: center; }
.hero-pic { width: 100%; height: auto; border-radius: var(--r); border: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 8px; }
.brand-logo { width: 28px; height: 28px; border-radius: 8px; object-fit: cover; }
.wordmark b { color: var(--accent-ink); }
.menu a:hover { color: var(--ink); }

.game { display: grid; gap: 16px; justify-items: center; text-align: center; }
.game-head { display: flex; gap: 20px; font: 500 14px/1 var(--mono); color: var(--ink2); }
.score { color: var(--accent-ink); font-weight: 700; }
.field { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; width: min(100%, 520px); }
.candle { background: var(--panel); border: 1px solid var(--line); border-radius: var(--rs); padding: 10px; cursor: pointer; transition: background .15s; }
.candle:hover { background: var(--accent-soft); }
.candle svg { width: 100%; height: auto; display: block; max-height: 110px; transform-origin: 50% 100%; transition: transform .25s ease, opacity .25s; }
.candle.down svg { transform: rotate(82deg) translateY(10px); opacity: .45; }
.hint { color: var(--ink2); font-size: 15px; }

[hidden] { display: none !important; }
.bc { display: grid; gap: 14px; justify-items: center; text-align: center; }
.bc-head { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; font: 500 14px/1 var(--mono); color: var(--ink2); }
.bc-score { color: var(--accent-ink); font-weight: 700; }
.bc-lives { color: var(--accent-ink); letter-spacing: .08em; }
.bc-canvas { display: block; width: min(100%, 400px); height: auto; aspect-ratio: 3 / 4; border-radius: var(--r); border: 1px solid var(--line); touch-action: manipulation; cursor: pointer; user-select: none; -webkit-user-select: none; }
.bc-canvas:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.bc-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.bc-share { display: grid; gap: 12px; justify-items: center; width: min(100%, 640px); padding-top: 6px; }
.bc-card { display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630; border-radius: var(--rs); border: 1px solid var(--line); }

.kit { width: min(var(--maxw), 100% - 2 * var(--gutter)); margin: 0 auto; padding: 24px 0 32px; display: grid; gap: 20px; }
.kit h1 { font-size: clamp(30px, 5vw, 48px); }
.kit-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; display: grid; gap: 14px; }
.kit-card h2 { font: 600 18px/1.2 var(--sans); }
.kit-card img { width: 100%; height: auto; border-radius: var(--rs); border: 1px solid var(--line); }
.kit-card.logo img { max-width: 320px; }
.kit-meta { font: 500 12px/1.4 var(--mono); color: var(--muted); }
.kit-text { white-space: pre-line; color: var(--ink2); }
.kit-grid { display: grid; gap: 20px; }

.fan { width: min(var(--maxw), 100% - 2 * var(--gutter)); margin: 0 auto; padding: 28px 0; }
.fan h2 { font: 700 clamp(24px, 3.5vw, 34px)/1.1 var(--sans); letter-spacing: -0.02em; margin-bottom: 16px; }
.hero .eyebrow { margin-bottom: 14px; }
.hero .actions .btn + .btn { margin-left: 0; }
.ticker { overflow: hidden; background: var(--ink); color: #fff; padding: 12px 0; margin: 12px 0; }
.ticker-row { display: flex; gap: 32px; width: max-content; font: 600 14px/1 var(--mono); text-transform: uppercase; letter-spacing: .08em; animation: tick 30s linear infinite; }
.ticker-row span:nth-child(3n+1) { color: #ff8a96; }
@keyframes tick { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .ticker-row { animation: none; } }
.lore-grid, .link-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
.lore, .link-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; display: grid; gap: 6px; align-content: start; }
.lore h3 { font: 600 18px/1.2 var(--sans); }
.lore p, .link-card span { color: var(--ink2); font-size: 15px; }
.num { width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font: 700 14px/1 var(--mono); }
.link-card b { font: 600 18px/1.2 var(--sans); }
.link-card:hover { border-color: var(--accent); text-decoration: none; }
.counter-box { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(20px, 4vw, 36px); text-align: center; display: grid; justify-items: center; gap: 10px; margin-top: 12px; margin-bottom: 12px; }
.counter-box h2 { margin: 0; }
.big { font: 700 clamp(64px, 14vw, 120px)/1 var(--mono); color: var(--accent-ink); }
.counter-box .actions { justify-content: center; }

.pack-lead { margin-bottom: 20px; }
.meme-grid { display: grid; gap: 14px; grid-template-columns: repeat(2, 1fr); margin-bottom: 24px; }
.meme { margin: 0; background: var(--white); border: 1px solid var(--line); border-radius: var(--r); padding: 10px; display: grid; gap: 10px; align-content: start; }
.meme img { width: 100%; height: auto; aspect-ratio: 1 / 1; border-radius: var(--rs); }
.meme .btn { justify-content: center; padding: 9px 12px; font-size: 14px; }
@media (min-width: 640px) { .meme-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 960px) { .meme-grid { grid-template-columns: repeat(4, 1fr); } }

.sheet { background: var(--white); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.sheet-row { display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding: 12px 18px; border-bottom: 1px solid var(--line); font-size: 15px; }
.sheet-row:last-child { border-bottom: 0; }
.sheet-row .k { font: 500 12px/1.6 var(--mono); color: var(--accent-ink); text-transform: uppercase; letter-spacing: .06em; }
.lore.rule, .lore.joke { border-color: var(--accent); background: var(--accent-soft); }
@media (min-width: 640px) { .sheet-row { grid-template-columns: 180px 1fr; } }
@media (min-width: 860px) { .lore-grid.three { grid-template-columns: repeat(3, 1fr); } .lore-grid.two { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 640px) { .lore-grid, .link-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 860px) {
  .lore-grid { grid-template-columns: repeat(4, 1fr); }
  .link-grid { grid-template-columns: repeat(4, 1fr); }
  .hero { grid-template-columns: 1fr 1fr; }
  .kit-grid { grid-template-columns: 1fr 1.6fr; align-items: start; }
}
@media (max-width: 640px) {
  .field { grid-template-columns: repeat(4, 1fr); gap: 8px; }
  .candle { padding: 6px; }
  .menu { display: none; }
  #app { min-height: 300px; }
  .tile { width: 44px; height: 44px; font-size: 17px; }
}