/* Good Question's look: the library card catalog (David's pick, 2026-11-09;
   docs/good-question.md, "Its look"). A cabinet of oak drawers on library
   green, each square a drawer front with a brass label holder for its
   value; a clue comes out as a cream catalog card, typed, with a punched
   hole at its foot. Brass is the accent; the turn color, lamp gold, only
   ever rings or outlines (your seat, the picked drawer, the answer box)
   and fills the primary button: no seat or turn color ever fills a drawer
   or a card (David, 2026-11-09). This file is the tokens (the house's, the
   room kit's and the game's own) and the shared pieces (a drawer, a card,
   a stamp); it's loaded before the room's structure (games/room/room.css),
   the table (table.css) after it. The Django pages
   (games/templates/good-question/page.html) wear just this.

   Faces, all OFL and bundled in fonts/: Young Serif (headings: "Double
   Down!", "You win!"), Courier Prime (a typewriter: the category labels
   and the cards) and Figtree (everything else you read or press). */

@font-face { font-family: "Young Serif"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/young-serif-400-latin.2e465c2f5f89.woff2") format("woff2"); }
@font-face { font-family: "Courier Prime"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/courier-prime-400-latin.ddb0efd5d81c.woff2") format("woff2"); }
@font-face { font-family: "Courier Prime"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/courier-prime-700-latin.4faaae3e616a.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-style: normal; font-weight: 400 800; font-display: swap; src: url("fonts/figtree-400-800-latin.392aed3eb142.woff2") format("woff2"); }

:root {
  /* the house's (docs/guide/design/tokens.md) */
  --t-display: clamp(32px, 7vw, 44px); --t-heading: 20px; --t-body: 16px; --t-label: 16px; --t-note: 14px;
  --s1: 4px; --s2: 8px; --s3: 16px; --s4: 24px; --s5: 40px;
  --pick-tint: color-mix(in srgb, currentColor 16%, transparent);
  --pick-ring: inset 0 0 0 2px currentColor;
  --pick-weight: 800;

  /* the catalog: library green, oak, brass, the card */
  --green: #173a32; --green-hi: #22503f; --green-lo: #0e2620;
  --oak: #a46c3a; --oak-hi: #c08752; --oak-lo: #6e4423; --oak-deep: #3b2412;
  --brass: #d6b25e; --brass-hi: #f3dc98; --brass-lo: #94722c;
  --card: #f7f0dc; --card-red: #c4554a;
  --type: #23211c;          /* typewriter ink on a card */
  --type-soft: #5e5a50;
  --good-on-card: #1f7a46; --bad-on-card: #b03a2e;
  --stamp-ink: #fffdf7;

  /* the room kit's (docs/guide/design/tokens.md, "Color jobs"), in the library */
  --room: #173a32;
  /* (a banker's lamp's warm pool over the board, the green room round it) */
  --table: radial-gradient(ellipse 55% 45% at 50% 8%, rgba(255, 214, 120, .2), transparent 70%), radial-gradient(ellipse 120% 90% at 50% 40%, #22503f, #173a32 55%, #0e2620);
  --rail: 0 solid transparent;
  --rail-radius: 0;
  --panel: #0f2923;          /* solid, so the board never shows through words */
  --panel-edge: 1.5px solid rgba(243, 239, 228, .16);
  --panel-radius: 12px;
  --sheet: #12332c;          /* sheets on the green, as every dark room has them */
  --chip: #0f2923;
  --chip-edge: 1.5px solid rgba(243, 239, 228, .16);
  --chip-radius: 12px;
  --ink: #f3efe4;
  --soft: #c2cfc6;           /* 6.9:1 on the green */
  --turn: #ffd84d;           /* lamp gold: yours, your turn, picked */
  --turn-ink: #2a2005;
  --good: #8fdc9a;
  --bad: #ff9c8f;
  --focus: #ffd84d;
  --btn: #ffd84d;
  --btn-ink: #2a2005;
  --btn-edge: 2px solid #ffd84d;
  --btn2: transparent;
  --btn2-ink: #f3efe4;
  --btn2-edge: 2px solid #f3efe4;
  --btn-radius: 10px;
  --btn-weight: 700;
  --confirm: #b03a2e;
  --confirm-ink: #fffdf7;
  --seat-ink: #14201b;
  --field-edge: 2px solid #c2cfc6;
  --ui-font: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --display: "Young Serif", Georgia, serif;
  --display-weight: 400;
  --typed: "Courier Prime", "Courier New", ui-monospace, monospace;
  /* a win's confetti: brass, the card, the lamp */
  --house-cheer: #d6b25e, #f7f0dc, #ffd84d, #c4554a;

  color-scheme: dark;
}

body { background: var(--room); color: var(--ink); }

/* ── a drawer: one square of the board ───────────────────────────────── */
.gqdrawer {
  all: unset; box-sizing: border-box; position: relative; display: grid; place-items: center; align-content: center; gap: 8px;
  border-radius: 4px; min-width: 0; min-height: 0; cursor: default;
  background: repeating-linear-gradient(91deg, rgba(0, 0, 0, .05) 0 2px, transparent 2px 7px, rgba(255, 255, 255, .03) 7px 9px), linear-gradient(180deg, var(--oak-hi), var(--oak) 55%, var(--oak-lo));
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .35), inset 0 2px 0 rgba(255, 255, 255, .2), inset 0 -3px 0 rgba(0, 0, 0, .18), 0 2px 0 rgba(0, 0, 0, .35);
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
button.gqdrawer:not([disabled]) { cursor: pointer; }
/* a drawer's label: a brass frame holding a little typed card, as a real
   catalog's does. (Courier Prime's figures sit low in their line: the
   card's padding leans up by a share of the size, so a value is in the
   middle at any size.) */
.gqdrawer .gqplate {
  min-width: 62%; padding: 3px; border-radius: 3px; box-sizing: border-box;
  background: linear-gradient(180deg, var(--brass-hi), var(--brass) 45%, var(--brass-lo));
  box-shadow: inset 0 0 0 1px rgba(80, 55, 10, .6), 0 1px 0 rgba(0, 0, 0, .35);
}
.gqdrawer .gqplate b {
  display: block; background: var(--card); border-radius: 1px; padding: calc(3px - .08em) 8px calc(3px + .08em); text-align: center;
  font: 700 var(--plate, 20px)/1.1 var(--typed); color: var(--type); font-variant-numeric: tabular-nums; white-space: nowrap; box-shadow: inset 0 1px 2px rgba(0, 0, 0, .25);
}
/* and a brass cup pull under it */
.gqdrawer .gqknob { width: 34%; height: var(--knob, 9px); border-radius: 0 0 14px 14px; background: linear-gradient(180deg, var(--brass-lo), var(--brass) 40%, var(--brass-hi)); box-shadow: 0 2px 2px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(0, 0, 0, .25); }
/* picked: the drawer slides out, lit in the lamp's gold, before its card rises */
.gqdrawer.out { outline: 3px solid var(--turn); outline-offset: 2px; z-index: 2; transform: translateY(-6px) scale(1.05); box-shadow: 0 16px 22px -8px rgba(0, 0, 0, .7), inset 0 0 0 1px rgba(0, 0, 0, .35); }
@media (prefers-reduced-motion: no-preference) {
  .gqdrawer.out { animation: gqout 600ms cubic-bezier(.2, 1.3, .4, 1) both; }
  @keyframes gqout { from { transform: none; } to { transform: translateY(-6px) scale(1.05); } }
}
/* played: an empty slot in the cabinet */
.gqdrawer.gone { background: linear-gradient(180deg, #160d06, #2a1a0c); box-shadow: inset 0 6px 12px rgba(0, 0, 0, .7), inset 0 0 0 1px rgba(0, 0, 0, .6); }
.gqdrawer.gone > * { display: none; }
/* yours to pick: a lamp-gold ring on the one you're on (never a fill) */
button.gqdrawer:focus-visible, button.gqdrawer.at { outline: 3px solid var(--turn); outline-offset: 2px; }
@media (hover: hover) { button.gqdrawer:not([disabled]):hover { outline: 3px solid var(--turn); outline-offset: 2px; } }
/* the win: each drawer turns over to a brass back with the winner's mark */
.gqdrawer.win { background: linear-gradient(180deg, var(--brass-hi), var(--brass) 50%, var(--brass-lo)); box-shadow: inset 0 0 0 1px rgba(80, 55, 10, .55), inset 0 2px 0 rgba(255, 255, 255, .35), 0 2px 0 rgba(0, 0, 0, .35); }
.gqdrawer.win > :not(.gqwinmark) { display: none; }
.gqdrawer .gqwinmark { display: grid; filter: drop-shadow(0 1px 0 rgba(80, 55, 10, .6)); }
@media (prefers-reduced-motion: no-preference) {
  .gqdrawer.win { animation: gqflip 520ms ease-out both; animation-delay: var(--wave, 0ms); }
  @keyframes gqflip { from { transform: rotateX(90deg); } to { transform: none; } }
}

/* ── a category: a catalog guide card standing at the head of a column ── */
.gqcat {
  position: relative; background: var(--card); color: var(--type); border-radius: 3px; display: grid; place-items: center; text-align: center;
  font: 700 13px/1.15 var(--typed); text-transform: uppercase; letter-spacing: .02em; padding: 8px 6px 6px; text-wrap: balance;
  box-shadow: 0 2px 0 rgba(0, 0, 0, .25); border-top: 3px solid var(--card-red); min-width: 0; overflow-wrap: anywhere;
}
/* (not yet read out, at a round's start: a blank card) */
.gqcat.blank::after { content: ""; position: absolute; inset: 40% 18% auto; height: 2px; background: rgba(35, 33, 28, .12); box-shadow: 0 8px 0 rgba(35, 33, 28, .12); }
@media (prefers-reduced-motion: no-preference) {
  /* (a category landing on its guide card: a small settle as its title shows) */
  .gqcat.land { animation: gqcatland 360ms cubic-bezier(.2, 1.4, .4, 1) both; }
  @keyframes gqcatland { from { transform: scale(1.12); box-shadow: 0 0 0 3px var(--brass-hi), 0 2px 0 rgba(0, 0, 0, .25); } to { transform: none; } }
}

/* ── the cabinet's crown, with the round on a brass nameplate, and its plinth ── */
.gqcrown { height: 30px; flex: none; display: grid; place-items: center; border-radius: 8px 8px 0 0; background: linear-gradient(180deg, #d79a63, var(--oak) 40%, var(--oak-lo)); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .35), 0 3px 0 rgba(0, 0, 0, .25); }
.gqnameplate { padding: 3px 14px 6px; border-radius: 3px; background: linear-gradient(180deg, var(--brass-hi), var(--brass) 50%, var(--brass-lo)); color: var(--type); font: 700 12px/1 var(--typed); letter-spacing: .14em; text-transform: uppercase; box-shadow: inset 0 0 0 1px rgba(80, 55, 10, .6), 0 1px 0 rgba(0, 0, 0, .3); white-space: nowrap; }
.gqplinth { height: 12px; flex: none; border-radius: 0 0 8px 8px; background: linear-gradient(180deg, var(--oak-lo), #2a190b); }

/* ── a catalog card: a clue on the stage. Plain cream, no ruled lines
   (David, 2026-11-09), the red rule under its header ─────────────────── */
.gqcard {
  position: relative; box-sizing: border-box; width: 100%; max-width: 640px; color: var(--type);
  border-radius: 6px; padding: 18px 24px 40px; border-top: 4px solid var(--card-red);
  /* (paper with a little tooth, and the next card in the stack behind it) */
  background: radial-gradient(circle at 20% 30%, rgba(120, 90, 30, .05), transparent 40%), radial-gradient(circle at 80% 70%, rgba(120, 90, 30, .06), transparent 45%), var(--card);
  box-shadow: inset 0 1px 0 #fffaf0, 0 24px 48px -18px rgba(0, 0, 0, .7), 4px 4px 0 -1px #efe5c8, 4px 4px 0 0 rgba(0, 0, 0, .12);
}
.gqcard::after { content: ""; position: absolute; left: 50%; bottom: 12px; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: var(--green); box-shadow: inset 0 2px 3px rgba(0, 0, 0, .5); }
.gqcard .gqhead { display: flex; justify-content: space-between; gap: 12px; font: 700 15px/1.2 var(--typed); text-transform: uppercase; letter-spacing: .03em; padding-bottom: 12px; border-bottom: 2px solid var(--card-red); }
.gqcard .gqhead span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.gqcard .gqclue { font: 700 28px/1.2 var(--typed); margin: 18px 0 8px; text-wrap: pretty; overflow-wrap: break-word; }
.gqcard .gqans { font: 400 18px/1.4 var(--typed); margin: 4px 0 0; overflow-wrap: break-word; }
.gqcard .gqans b { font-weight: 700; }
.gqcard.stamped { padding-bottom: 76px; }
.gqcard.stamped::after { left: 34%; }

/* the stamp: a solid block of ink, green for right and red for wrong, with
   cream letters, ringed and marked in the answerer's seat color, in the
   card's foot (which grows to hold it), so it never covers a word (David,
   2026-11-09: the first, see-through one wasn't legible) */
.gqstamp {
  position: absolute; right: 18px; bottom: 14px; transform: rotate(-5deg); display: flex; align-items: center; gap: 10px;
  padding: 7px 14px 7px 9px; border-radius: 6px; color: var(--stamp-ink);
  /* (solid ink with a little bite, the way a rubber stamp prints) */
  background: radial-gradient(circle at 30% 40%, rgba(255, 255, 255, .08) 0 1px, transparent 2px) 0 0 / 5px 5px, var(--good-on-card);
  box-shadow: 0 0 0 3px var(--card), 0 0 0 6px var(--seat, var(--good-on-card)), 0 6px 12px -4px rgba(0, 0, 0, .35);
  font: 700 26px/1 var(--typed); letter-spacing: .06em; text-transform: uppercase;
}
.gqstamp.bad { background: radial-gradient(circle at 30% 40%, rgba(255, 255, 255, .08) 0 1px, transparent 2px) 0 0 / 5px 5px, var(--bad-on-card); }
.gqstamp > span { display: grid; gap: 4px; text-align: left; }
.gqstamp small { display: block; font-size: 13px; letter-spacing: .1em; }
@media (prefers-reduced-motion: no-preference) {
  .gqstamp { animation: gqstamp 260ms cubic-bezier(.2, 1.6, .4, 1) both; }
  @keyframes gqstamp { from { transform: rotate(-5deg) scale(1.6); opacity: 0; } to { transform: rotate(-5deg) scale(1); opacity: 1; } }
}

/* the brass card that holds "Double Down!" */
.gqdd { background: linear-gradient(180deg, var(--brass-hi), var(--brass) 50%, var(--brass-lo)); color: var(--type); border-radius: 8px; padding: 16px 22px 14px; text-align: center; box-shadow: 0 18px 36px -14px rgba(0, 0, 0, .7), inset 0 0 0 2px rgba(80, 55, 10, .5); }
.gqdd b { display: block; font: 400 36px/1.05 var(--display); }
.gqdd span { font: 700 14px/1.3 var(--typed); text-transform: uppercase; letter-spacing: .04em; }
