/* On a Roll's look: the kitchen-table score pad (David's pick, 2026-11-13;
   docs/on-a-roll.md, "Its look"). A wooden kitchen table, a dice tray lined
   with blue felt in a wooden rim, and a cream score pad, its boxes printed
   and its scores written in pencil. The dice are the site's bevel die (the
   dice kit, house/dice.css) in cream and ink.

   This file is the tokens (the house's, the room kit's and the game's own:
   the oak, the felt, the pad, the die) and the pieces every screen draws:
   the pad, a box, a chip. It's loaded before the room's structure
   (games/room/room.css), the table (table.css) after it. The Django pages
   (games/templates/on-a-roll/page.html) wear just this.

   Faces, all OFL and bundled in fonts/: Young Serif (the display: the
   title, the pad's headings), Figtree (everything else) and Kalam (the
   pencil: the scores written on the pad). */

@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: "Figtree"; font-style: normal; font-weight: 400 800; font-display: swap; src: url("fonts/figtree-400-800-latin.392aed3eb142.woff2") format("woff2"); }
@font-face { font-family: "Kalam"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/kalam-700-latin.68f247e4c7ce.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 12%, transparent);
  --pick-ring: inset 0 0 0 2px currentColor;
  --pick-weight: 700;

  /* the kitchen */
  --oak-hi: #e3c99e; --oak: #d6b585; --oak-lo: #c9a26d; --rim: #a67b45; --rim-lo: #8e6534; --oak-grain: rgba(110, 70, 30, .10);
  --felt: #1f4a8a; --felt-hi: #2a5ba3; --felt-lo: #163866; --felt-ink: #e9eefb;
  --pad: #fdf8ec; --pad-2: #f6efdc; --pad-rule: #c9d7ec; --pad-edge: #e2d6bd; --pad-binding: #d8cdb5;
  /* the pencil, a box's hint (what the dice would score: call 6), a fresh score */
  --pencil: #3b3a3f; --pencil-soft: #5f5e66; --hint: #46689f; --fresh: rgba(255, 236, 160, .6);
  --hand: "Kalam", "Bradley Hand", cursive;
  /* the die (house/dice.css): the mark's bevel in cream and ink (call 4) */
  --die-rim: #ddd4c0; --die-face: #fffcf4; --die-edge: #1b1712; --die-pip: #1b1712; --die-keep: var(--felt-ink);
  /* the stage: a five of a kind's band (announce.js) */
  --stage: #2a2118; --stage-ink: #fdf3df;

  /* the room kit's (docs/guide/design/tokens.md, "Color jobs"), at the kitchen table */
  --room: #e9dfcf;
  --table:
    radial-gradient(ellipse 70% 50% at 50% 0%, rgba(255, 250, 235, .4), transparent 70%),
    repeating-linear-gradient(92deg, var(--oak-grain) 0 2px, transparent 2px 23px, rgba(255, 255, 255, .05) 23px 25px, transparent 25px 61px),
    linear-gradient(var(--oak-hi), var(--oak) 55%, var(--oak-lo));
  --rail: 0 solid transparent;
  --rail-radius: 0;
  --panel: var(--pad);
  --panel-edge: 1px solid var(--pad-edge);
  --panel-radius: 12px;
  --sheet: var(--pad);
  --chip: var(--pad);
  --chip-edge: 1px solid var(--pad-edge);
  --chip-radius: 10px;
  --ink: #2a2118;
  --soft: #4a3a26;
  --turn: #c2410c;
  --good: #2f7a52;
  --bad: #b42318;
  --focus: #2a2118;
  --btn: #2a2118;
  --btn-ink: #fdf8ec;
  --btn-edge: 2px solid #2a2118;
  --btn2: transparent;
  --btn2-ink: #2a2118;
  --btn2-edge: 1.5px solid #2a2118;
  --btn-radius: 10px;
  --btn-weight: 700;
  --confirm: #b42318;
  --confirm-ink: #ffffff;
  --turn-ink: #ffffff;
  --seat-ink: #111;
  --field-edge: 1.5px solid #a8957d;
  --ui-font: "Figtree", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --display: "Young Serif", Georgia, serif;
  --display-weight: 400;
  /* a win's confetti: the mark's three pips and the felt */
  --house-cheer: #2b59c3, #e63b2e, #f5c518, #2f7a52;
  color-scheme: light;
}

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

/* ── the score pad: cream paper, its binding along the top ───────────── */
.opad { position: relative; box-sizing: border-box; background: linear-gradient(var(--pad), var(--pad-2)); border-radius: 6px 6px 10px 10px; color: var(--ink);
  box-shadow: 0 1px 0 #fff inset, 0 2px 0 #e9dfc9, 0 4px 0 #f3ead6, 0 6px 0 #e4d8be, 0 16px 26px -14px rgba(60, 40, 15, .65); }
.opad::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 10px; border-radius: 6px 6px 0 0; pointer-events: none;
  background: repeating-linear-gradient(90deg, #b8ab92 0 3px, transparent 3px 14px), var(--pad-binding); opacity: .9; }
.opad .ohead { padding: 16px 12px 4px; display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.opad .ohead h2 { margin: 0; font: 400 var(--t-heading, 20px)/1.1 var(--display); }
.opad .ohead span { font: 600 13px/1 var(--ui-font); color: var(--soft); white-space: nowrap; }
.opad h3 { margin: 0; padding: 4px 0 2px; font: 700 11px/1.2 var(--ui-font); letter-spacing: .12em; text-transform: uppercase; color: var(--soft); }

/* a box: its name printed, what it takes under it, its score in pencil */
.obox { all: unset; box-sizing: border-box; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px; min-height: var(--row, 37px);
  padding: 0 6px 0 8px; border-bottom: 1px solid var(--pad-rule); position: relative; border-radius: 0; }
button.obox { cursor: pointer; }
button.obox:focus-visible { outline: 3px solid var(--focus); outline-offset: -3px; border-radius: 6px; }
.obox .on { font: 600 15px/1.15 var(--ui-font); min-width: 0; }
.obox .on small { display: block; font: 500 12px/1.2 var(--ui-font); color: var(--soft); }
.ov { min-width: 38px; text-align: right; font: 700 22px/1 var(--hand); color: var(--pencil); font-variant-numeric: tabular-nums; }
.ov.zero { color: var(--pencil-soft); }
.ohint { min-width: 38px; text-align: right; font: 600 16px/1 var(--ui-font); color: var(--hint); font-variant-numeric: tabular-nums; }
.ohint.z { color: color-mix(in srgb, var(--hint) 55%, var(--pad)); }
.obox.crossed .on { text-decoration: line-through; text-decoration-thickness: 1.5px; text-decoration-color: var(--pencil-soft); color: var(--soft); }
.obox.shut .on, .obox.shut .on small { color: var(--soft); }
.obox.shut .on { font-weight: 500; }
/* the box you're trying (choosing isn't doing: ringed in ink, the number pencilled in) */
.obox.preview { background: var(--pick-tint); box-shadow: inset 0 0 0 2px var(--ink); border-radius: 6px; }
.obox.preview .ohint { font: 700 22px/1 var(--hand); color: var(--pencil); }
.obox.fresh, .osub.fresh { background: var(--fresh); border-radius: 6px; }
.osub { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px; min-height: calc(var(--row, 37px) - 3px); padding: 0 6px 0 8px; border-bottom: 1px solid var(--pad-rule); position: relative; }
.osub .on { font: 700 14px/1.15 var(--ui-font); min-width: 0; }
.osub .on small { display: block; font: 500 12px/1.2 var(--ui-font); color: var(--soft); }
.osub .togo { font: 600 14px/1 var(--ui-font); color: var(--pencil-soft); white-space: nowrap; }
.osub.total { border-bottom: 2px solid var(--ink); }
.osub.glow { box-shadow: 0 0 0 2px #f5c518, 0 0 16px 4px rgba(245, 197, 24, .45); border-radius: 6px; background: rgba(255, 240, 180, .6); }
.ostamp { font: 400 20px/1 var(--display); color: var(--turn); border: 2.5px solid var(--turn); border-radius: 8px; padding: 4px 8px; transform: rotate(-8deg);
  background: rgba(253, 248, 236, .85); box-shadow: 0 0 0 3px rgba(194, 65, 12, .14); white-space: nowrap; justify-self: end; }
.ogrand { display: flex; justify-content: space-between; align-items: baseline; margin: 0 10px; padding: 8px 8px 8px; border-top: 2px solid var(--ink); }
.ogrand b { font: 400 19px/1 var(--display); }
.ogrand .ov { font-size: 30px; }

/* a player's chip: their mark, name, total, and what they're doing */
.ochip { all: unset; box-sizing: border-box; min-width: 0; display: grid; gap: 1px; padding: 6px 6px 6px 7px; border-radius: var(--chip-radius); background: var(--chip); border: var(--chip-edge); cursor: pointer; text-align: left; }
.ochip:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.ochip .onm { display: flex; align-items: center; gap: 4px; font: 700 13px/1.2 var(--ui-font); white-space: nowrap; min-width: 0; }
.ochip .onm span { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.ochip .osc { font: 700 21px/1.05 var(--hand); color: var(--pencil); font-variant-numeric: tabular-nums; }
.ochip .obit { font: 600 12px/1.2 var(--ui-font); color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ochip .obit b { color: var(--turn); }
.ochip.turn { box-shadow: inset 0 0 0 2.5px var(--turn); border-color: var(--turn); }
.ochip.you { background: #fff; }
.odot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--c, #888); }
