/* Gacha Sim Codes — "capsule machine": cream paper, ink, tomato red. Full-width, fluid gutters. */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url(/bricolage.woff2) format("woff2");
  font-weight: 400 800;
  font-display: swap;
}

:root {
  --bg: oklch(96.5% 0.018 85);
  --surface: oklch(98.5% 0.01 85);
  --ink: oklch(23% 0.025 40);
  --muted: oklch(46% 0.025 50);
  --line: oklch(86% 0.025 75);
  --line-strong: var(--ink);
  --accent: oklch(52% 0.19 33);        /* text-safe tomato */
  --capsule: oklch(63% 0.2 33);        /* decorative tomato */
  --hi: oklch(89% 0.15 95);            /* highlighter yellow */
  --hi-ink: oklch(30% 0.06 80);
  --ok: oklch(48% 0.12 155);
  --btn-bg: var(--ink);
  --btn-fg: var(--bg);
  --gutter: clamp(16px, 4.5vw, 72px);
  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --font: ui-sans-serif, -apple-system, "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --ease: cubic-bezier(.22, 1, .36, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: oklch(19% 0.012 50);
    --surface: oklch(22.5% 0.014 50);
    --ink: oklch(94% 0.015 85);
    --muted: oklch(72% 0.02 70);
    --line: oklch(33% 0.015 50);
    --accent: oklch(74% 0.15 40);
    --capsule: oklch(66% 0.19 35);
    --hi: oklch(84% 0.15 95);
    --hi-ink: oklch(25% 0.05 80);
    --ok: oklch(78% 0.14 155);
  }
}

/* ---------- base ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 17px/1.65 var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
code { font-family: var(--mono); }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--hi); color: var(--hi-ink); }

h1, h2, h3, .brand, .copy, .fb button, .crumbs, .facts dt { font-family: var(--display); }
h1 { font-size: clamp(2.3rem, 6.4vw, 5.4rem); line-height: .98; letter-spacing: -.035em; font-weight: 800; margin: 0; text-wrap: balance; }
h1 .month { display: block; margin-top: .35em; font-size: max(.32em, 1rem); font-weight: 500; letter-spacing: -.01em; color: var(--muted); }
h2 { font-size: clamp(1.35rem, 2.2vw, 1.75rem); line-height: 1.15; letter-spacing: -.02em; font-weight: 750; margin: 0 0 14px; }
.mark { background: linear-gradient(transparent 58%, var(--hi) 58% 92%, transparent 92%); color: inherit; padding: 0 .06em; }

/* ---------- frame ---------- */
.site-header, main, .site-footer { padding-left: var(--gutter); padding-right: var(--gutter); }
.site-header { display: flex; align-items: center; justify-content: space-between; gap: 4px 24px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; font-weight: 800; font-size: 1.15rem; letter-spacing: -.02em; color: var(--ink); text-decoration: none; }
.capsule { width: 26px; height: 26px; flex: none; }
.capsule .top { fill: var(--capsule); }
.capsule .bottom { fill: var(--surface); }
.capsule .rim { fill: none; stroke: var(--ink); stroke-width: 1.6; }
.site-nav { display: flex; gap: 0 4px; flex-wrap: wrap; margin-right: -12px; }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 12px; font-size: .92rem; font-weight: 600; color: var(--muted); text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--ink); }
.site-nav a[aria-current] { box-shadow: inset 0 -2px 0 var(--capsule); }

/* ---------- page top ---------- */
.page-top { padding: clamp(28px, 6vw, 80px) 0 clamp(24px, 4vw, 48px); border-bottom: 2px solid var(--ink); }
.crumbs { font-size: .85rem; font-weight: 600; color: var(--muted); margin: 0 0 18px; }
.crumbs a { color: var(--muted); }
.lede { font-size: clamp(1.05rem, 1.4vw, 1.25rem); line-height: 1.55; color: var(--muted); margin: 22px 0 0; max-width: 58ch; }
.lede strong { color: var(--ink); font-weight: 600; }
.checked { display: flex; flex-wrap: wrap; gap: 4px 22px; list-style: none; padding: 0; margin: 22px 0 0; font-size: .92rem; color: var(--muted); }
.checked strong, .checked time { color: var(--ink); font-weight: 650; }

/* ---------- game page grid ---------- */
.game-grid { display: grid; grid-template-columns: minmax(0, 1fr); }
.game-grid > * { min-width: 0; }
@media (min-width: 1000px) {
  .game-grid { grid-template-columns: minmax(0, 1fr) minmax(280px, 360px); column-gap: clamp(40px, 5vw, 96px); }
  .game-grid > * { grid-column: 1; }
  .game-grid > .rail { grid-column: 2; grid-row: 1 / span 12; }
  .rail-inner { position: sticky; top: 24px; }
}

/* ---------- codes ---------- */
.codes-section { padding: clamp(24px, 3vw, 40px) 0 8px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap; margin-bottom: 6px; }
.section-head h2 { margin: 0; }
.count { font-size: .9rem; color: var(--muted); }
.codes { list-style: none; margin: 0; padding: 0; container-type: inline-size; }
.code {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px 20px;
  padding: 20px 0; border-bottom: 1px solid var(--line);
}
.code-main { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.code-text { font-size: clamp(1.5rem, 3.2vw, 2.25rem); line-height: 1.1; font-weight: 700; letter-spacing: .02em; color: var(--ink); overflow-wrap: anywhere; user-select: all; }
.code-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: .92rem; }
.reward { color: var(--muted); }
.badge { font-family: var(--display); font-size: .78rem; font-weight: 700; letter-spacing: .01em; }
.badge.new { background: var(--hi); color: var(--hi-ink); padding: 1px 7px; border-radius: 3px; }
.badge.unverified { color: var(--muted); text-decoration: underline dotted; text-underline-offset: 3px; cursor: help; }
.copy {
  min-height: 48px; min-width: 104px; padding: 0 22px; border: 2px solid var(--btn-bg); border-radius: 999px; cursor: pointer;
  background: var(--btn-bg); color: var(--btn-fg); font-weight: 700; font-size: 1rem; letter-spacing: -.01em;
  transition: transform .2s var(--ease), background-color .2s var(--ease), border-color .2s var(--ease);
}
.copy:hover { background: var(--capsule); border-color: var(--capsule); color: oklch(99% 0.01 85); }
.copy:active { transform: scale(.96); }
.copy.done { background: var(--ok); border-color: var(--ok); color: var(--bg); }
.fb { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: .88rem; color: var(--muted); }
.fb-q { margin-right: 6px; }
.fb button { min-height: 44px; padding: 0 14px; background: transparent; border: 1px solid var(--line); border-radius: 999px; cursor: pointer; font-size: .88rem; font-weight: 600; color: var(--muted); transition: border-color .2s var(--ease), color .2s var(--ease); }
.fb button:hover { border-color: var(--ink); color: var(--ink); }
.fb button.on { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.fb .thanks { margin-left: 6px; }
@container (min-width: 620px) {
  .code { grid-template-columns: minmax(0, 1fr) auto auto; }
  .fb { grid-column: auto; grid-row: 1; grid-column-start: 2; }
  .fb-q { display: none; }
}
.code.none { display: block; color: var(--muted); }
.hint { font-size: .88rem; color: var(--muted); margin: 14px 0 0; max-width: 70ch; }

.expired-list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 28px; }
.code.expired { display: inline-flex; align-items: baseline; gap: 8px; padding: 0; border: 0; }
.code.expired .code-text { font-size: 1.05rem; font-weight: 600; color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1.5px; }
.code.expired .reward { font-size: .82rem; }

/* ---------- rail (game page sidebar) ---------- */
.rail { padding: clamp(24px, 3vw, 40px) 0 8px; }
.rail-inner > section + section { margin-top: 32px; }
.rail h2 { font-size: 1.2rem; }
.steps { list-style: none; counter-reset: s; margin: 0; padding: 0; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 30px 1fr; gap: 10px; padding: 10px 0; border-top: 1px solid var(--line); font-size: .95rem; }
.steps li::before { content: counter(s); font: 800 1rem/1.5 var(--display); color: var(--capsule); }
.play { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 8px; font-family: var(--display); font-weight: 700; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; margin: 0; font-size: .92rem; }
.facts dt { color: var(--muted); font-weight: 600; }
.facts dd { margin: 0; }

/* ---------- prose ---------- */
.prose { padding: clamp(28px, 4vw, 48px) 0 0; }
.prose p, .prose ol, .prose ul { max-width: 68ch; }
.prose p { margin: 0 0 14px; }
.prose ol, .prose ul { padding-left: 22px; }
.prose li { margin-bottom: 8px; }
.prose li::marker { color: var(--capsule); font-weight: 700; }
.faq details { border-top: 1px solid var(--line); max-width: 78ch; }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; padding: 12px 0; font-family: var(--display); font-weight: 650; font-size: 1.05rem; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; flex: none; width: 10px; height: 10px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: translateY(-3px) rotate(45deg); transition: transform .25s var(--ease); }
.faq details[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.faq details p { margin: 0 0 16px; color: var(--muted); }
.related { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0 24px; }
.prose .related li { margin: 0; }
.related a { display: inline-flex; align-items: center; min-height: 44px; font-family: var(--display); font-weight: 650; }

/* editorial split: heading left, body right */
@media (min-width: 900px) {
  .split { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(0, 2.2fr); column-gap: clamp(32px, 5vw, 96px); padding-top: clamp(40px, 5vw, 72px); }
  .split > h2 { position: sticky; top: 24px; align-self: start; }
}

/* ---------- home: games as full-width rows ---------- */
.games { list-style: none; margin: 0; padding: 0; }
.game-row {
  position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px 32px; align-items: center;
  padding: 24px 0; border-bottom: 1px solid var(--line); transition: background-color .25s var(--ease);
}
.game-row h2 { font-size: clamp(1.4rem, 2.6vw, 2.1rem); margin: 0; }
.game-row h2 a { color: var(--ink); text-decoration: none; }
.game-row h2 a::after { content: ""; position: absolute; inset: 0; } /* whole row clickable */
.game-row h2 a:focus-visible { outline: none; }
.game-row:has(a:focus-visible) { outline: 3px solid var(--accent); outline-offset: 4px; }
.game-row .meta { margin: 4px 0 0; font-size: .9rem; color: var(--muted); }
.game-row .meta strong { color: var(--ink); }
.game-row .sample { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: 0; }
.game-row .sample code { font-size: 1.1rem; font-weight: 700; }
.game-row .go { display: none; }
.game-row:hover { background: var(--surface); }
.game-row:hover .go { transform: translateX(4px); }
@media (min-width: 760px) {
  .game-row { grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 40px; padding: 30px 0; }
  .game-row .go { display: block; font: 800 1.6rem/1 var(--display); color: var(--capsule); transition: transform .25s var(--ease); }
}

/* ---------- footer ---------- */
.site-footer { margin-top: clamp(56px, 8vw, 120px); padding-top: 32px; padding-bottom: 48px; border-top: 2px solid var(--ink); font-size: .88rem; color: var(--muted); display: grid; gap: 12px 48px; }
@media (min-width: 900px) { .site-footer { grid-template-columns: 2fr 1fr; } }
.site-footer p { margin: 0; }
.site-footer a { color: var(--muted); }
.disclaimer { max-width: 80ch; }

/* ---------- consent ---------- */
.consent { position: fixed; left: 0; right: 0; bottom: 0; z-index: 10; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; padding: 12px var(--gutter); background: var(--ink); color: var(--bg); font-size: .9rem; }
.consent a { color: inherit; }
.consent span { flex: 1 1 260px; }
.consent button { min-height: 44px; padding: 0 18px; border-radius: 999px; border: 1px solid currentColor; background: transparent; color: inherit; cursor: pointer; font-family: var(--display); font-weight: 700; }
.consent button.primary { background: var(--bg); color: var(--ink); border-color: var(--bg); }

/* ---------- small screens ---------- */
@media (max-width: 560px) {
  body { font-size: 16px; }
  .site-nav { width: calc(100% + 24px); margin-left: -12px; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .site-nav a { white-space: nowrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::after { transition: none !important; }
}
@media (prefers-color-scheme: dark) { .mark { background: none; color: var(--hi); } }

/* ---------- code timeline + update log ---------- */
.when { font-size: .82rem; color: var(--muted); }
.code.expired .when { margin-left: 2px; }
.updates { list-style: none; margin: 0; padding: 0; }
.updates li { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 4px 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.updates time { font-family: var(--display); font-weight: 700; font-size: .9rem; color: var(--capsule); padding-top: 2px; }
.updates strong { font-family: var(--display); font-weight: 700; }
.updates p { margin: 4px 0 0; font-size: .92rem; color: var(--muted); max-width: 68ch; white-space: pre-line; }
@media (max-width: 560px) { .updates li { grid-template-columns: 1fr; } }
