:root {
  --bg: #f7f1e8;
  --card: #fffaf2;
  --ink: #2b2118;
  --muted: #6b5b4b;
  --primary: #c2562f;
  --accent: #e0a03a;
  --primary-ink: #a3421f;
  --line: #e6dccd;
  --font-head: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --radius: 12px;
  --shadow-1: 0 1px 2px rgba(0,0,0,.06);
  --shadow-2: 0 8px 24px rgba(0,0,0,.08);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; }
a { color: var(--primary-ink); text-underline-offset: 3px; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -9999px; top: 8px; background: var(--card); padding: 8px 12px; }
.skip:focus { left: 16px; z-index: 10; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 720px; }

/* header / footer */
.masthead { border-bottom: 1px solid var(--line); background: var(--bg); }
.masthead-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); text-decoration: none; font-family: var(--font-head); font-weight: 700; font-size: 18px; }
.brand .gf-site-icon { border-radius: 8px; }
.nav { display: flex; gap: 16px; flex-wrap: wrap; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14px; padding: 8px 0; }
.nav a:hover { color: var(--primary-ink); text-decoration: underline; }
.colophon { border-top: 1px solid var(--line); margin-top: 64px; padding: 24px 0 48px; color: var(--muted); font-size: 14px; }
.colophon-row { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; }
.colophon p { margin: 0; }
.colophon nav { display: flex; gap: 16px; flex-wrap: wrap; }
.colophon a { color: var(--muted); }

/* headings & prose */
h1, h2, h3 { font-family: var(--font-head); font-weight: 700; line-height: 1.2; color: var(--ink); }
h1 { font-size: 36px; margin: 0 0 16px; }
h2 { font-size: 28px; margin: 48px 0 16px; }
h3 { font-size: 22px; margin: 32px 0 12px; }
.prose p, .prose li { max-width: 70ch; }
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { padding-left: 24px; margin: 0 0 16px; }
.prose li { margin-bottom: 8px; }
.prose blockquote { margin: 24px 0; padding: 12px 16px; border-left: 4px solid var(--accent); background: var(--card); border-radius: 0 var(--radius) var(--radius) 0; }
.prose table { border-collapse: collapse; width: 100%; font-size: 14px; }
.prose .table-wrap, .prose table { display: block; overflow-x: auto; }
.prose th, .prose td { border-bottom: 1px solid va

r(--line); padding: 8px 12px; text-align: left; }
.prose code { background: var(--card); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; font-size: 14px; }
.page { padding-top: 32px; }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 16px; }
.crumbs a { color: var(--muted); }
.cta { margin: 48px 0 0; }
.after-game { padding-top: 16px; }
.notfound { text-align: left; padding-top: 64px; }

/* buttons */
.btn, .board button.primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 24px; border: 0; border-radius: var(--radius);
  background: var(--primary); color: #fff; font: 600 16px/1 var(--font-body);
  text-decoration: none; cursor: pointer; box-shadow: var(--shadow-1);
}
.btn:hover, .board button.primary:hover { background: var(--primary-ink); color: #fff; }
.board button.ghost {
  min-height: 44px; padding: 0 16px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); color: var(--ink); font: 600 14px/1 var(--font-body); cursor: pointer;
}
.board button.ghost:hover { border-color: var(--muted); }
.board button[disabled] { opacity: .5; cursor: default; }

/* the game */
.play { padding: 24px 0 8px; }
.kicker { margin: 0 0 4px; font-size: 14px; font-weight: 600; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; }
.play-title { font-size: 28px; margin-bottom: 16px; }
.board {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-2); padding: 24px; min-height: 360px;
}
.ra-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.ra-meta { font-size: 14px; color: var(--muted); margin: 0; }
.ra-progress { display: flex; gap: 4px; }
.ra-progress span { width: 24px; height: 8px; border-radius: 4px; background: var(--line); }
.ra-progress span.done { background: var(--accent); }
.ra-progress span.now { background: var(--primary); }
.ra-cat { margin: 24px 0 4px; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--primary-ink); }
.ra-prompt { font-family: var(--font-head); font-weight: 700; font-size: 28px; line-height: 1.2; margin: 0 0 8px; }
.ra-hint { margin: 0 0 16px; color: var(--muted); font-size: 14px; }
.ra-timer { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; margin: 0 0 16px; }
.ra-timer i { display: block; height: 100%; width: 100%; background: var(--accent); transform-origin: left; }
.ra-form { display: flex; gap: 8px; }
.ra-form input {
  flex: 1; min-width: 0; min-height: 48px; padding: 0 16px; font: 400 18px/1 var(--font-body); color: var(--ink);
  background: #fff; border: 2px solid var(--line); border-radius: var(--radius);
}
.ra-form input:focus { border-color: var(--primary); outline: none; }
.ra-msg { min-he

ight: 24px; margin: 8px 0 0; font-size: 14px; color: var(--muted); }
.ra-msg.bad { color: var(--primary-ink); }
.ra-start p { margin: 0 0 16px; }
.ra-start ul { margin: 0 0 24px; padding-left: 24px; }
.ra-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 24px; }

/* the memorable bit: rarity stamps */
.stamp {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  min-width: 96px; padding: 8px 12px; border-radius: var(--radius); border: 2px solid var(--muted);
  color: var(--muted); font-weight: 600; font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  transform: rotate(-3deg); background: var(--card);
}
.stamp b { font-family: var(--font-head); font-size: 22px; letter-spacing: 0; text-transform: none; }
.stamp.uncommon { border-color: var(--accent); color: var(--ink); background: #fbecd0; }
.stamp.rare { border-color: var(--primary); color: var(--primary-ink); }
.stamp.ultra { border-color: var(--accent); background: var(--primary); color: #fff; box-shadow: 0 0 0 3px var(--accent); }
.stamp.miss { border-style: dashed; }
.stamp.pop { animation: stamp .35s ease-out; }
@keyframes stamp { from { transform: scale(1.6) rotate(-12deg); opacity: 0; } to { transform: rotate(-3deg); opacity: 1; } }
.ra-reveal { display: flex; gap: 16px; align-items: center; margin: 16px 0 0; }
.ra-reveal p { margin: 0; }
.ra-common { font-size: 14px; color: var(--muted); margin: 12px 0 0; }

.ra-result h2 { margin: 0 0 8px; font-size: 28px; }
.ra-score { font-family: var(--font-head); font-weight: 700; font-size: 48px; line-height: 1.2; margin: 0; }
.ra-stamps { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 12px; margin: 24px 0; }
.ra-stamps .stamp { transform: rotate(0); }
.ra-list { list-style: none; padding: 0; margin: 16px 0 0; }
.ra-list li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.ra-list li.me { font-weight: 600; }
.ra-name { display: flex; gap: 8px; margin-top: 12px; }
.ra-name input { flex: 1; min-width: 0; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius); font: 400 16px var(--font-body); }
.ra-small { font-size: 14px; color: var(--muted); }

/* faq */
.faq details { border-bottom: 1px solid var(--line); padding: 12px 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin: 8px 0 0; }

/* ads (render nothing until switched on) */
.ad-slot { margin: 48px auto; min-height: 250px; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.ad-label { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }

@media (max-width: 640px) {
  .wrap { padding: 0 16px; }
  h1 { font-size: 28px; }
  h2 { font-size: 22px; }
  .play-title { font-size: 22px; }
  .ra-pro

mpt { font-size: 22px; }
  .board { padding: 16px; }
  .ra-form { flex-direction: column; }
  .btn, .board button.primary { width: 100%; }
  .masthead-row { flex-direction: column; align-items: flex-start; gap: 4px; padding: 12px 0; }
}
@media (prefers-reduced-motion: reduce) {
  .stamp.pop { animation: none; }
  .ra-timer i { transition: none !important; }
}
