@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("../fonts/AtkinsonHyperlegible-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("../fonts/AtkinsonHyperlegible-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --navy: #1B2A4A;
  --gold: #D4A537;
  --paper: #F6F1E4;
  --money: #2E6B3F;
  --money-t: #E4F0E6;
  --jobs: #A84E14;
  --jobs-t: #FBEADB;
  --daily: #1D6B70;
  --daily-t: #DDEFEE;
  --calm: #6A3A6D;
  --calm-t: #F0E5F0;
  --ink: #1B2A4A;
  --muted: #3E4A56;
  --line: #8B8373;
  --cell: #fff;
  --cell-on: #F3E3B3;
  --cell-now: #D4A537;
  --wrong: #8C1D12;
  --ok: #215C33;
  --shadow: 0 8px 24px rgba(27, 42, 74, 0.12);
  --focus: #1B2A4A;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font: 17px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: #fff;
  min-height: 100%;
}
body.readable-font {
  font-family: "Atkinson Hyperlegible", Verdana, "Trebuchet MS", Tahoma, sans-serif;
  letter-spacing: 0.03em;
  word-spacing: 0.06em;
  line-height: 1.7;
}
a { color: #123A7A; }
a:visited { color: #4A2F7A; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 18px; }

.skip {
  position: absolute; left: 8px; top: -40px; background: var(--gold); color: var(--navy);
  padding: 8px 12px; z-index: 50; font-weight: 700; border-radius: 0 0 6px 6px;
}
.skip:focus { top: 0; }

header { background: var(--navy); border-bottom: 4px solid var(--gold); }
header .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  padding: 12px 18px;
}
.brand {
  color: var(--gold); font-weight: 800; letter-spacing: .08em; text-decoration: none;
}
nav { display: flex; flex-wrap: wrap; gap: 4px; }
nav a {
  color: #fff; text-decoration: none; padding: 10px 10px; min-height: 44px;
  display: inline-flex; align-items: center;
}
nav a.on { color: var(--gold); }

main { padding: 24px 0 40px; }
h1 { font-size: 2rem; line-height: 1.2; margin: 0 0 8px; }
.lead { font-size: 1.1rem; margin: 0 0 12px; max-width: 60ch; }
.hero {
  background: var(--paper); padding: 24px; border-radius: 10px; margin-bottom: 20px;
  border-top: 6px solid var(--gold);
}
.beta-note, .pic-tag {
  display: inline-block; background: var(--gold); color: var(--navy);
  font-weight: 700; font-size: .8rem; padding: 1px 8px; border-radius: 4px;
}

.bands, .picker-tools { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 20px; align-items: center; }
.band-btn, .btn, .icon-btn, .speak-btn, .clue, .cell, .subject-card, nav a, .letter-pad button {
  touch-action: manipulation;
}
.band-btn, .btn, .icon-btn {
  font: inherit; cursor: pointer; border: 2px solid var(--navy); background: #fff; color: var(--navy);
  border-radius: 8px; min-height: 44px; padding: 8px 14px; font-weight: 700;
  max-width: 100%;
}
a.btn { display: inline-flex; align-items: center; justify-content: center; text-align: center; white-space: normal; }
.band-btn.on, .btn.primary {
  background: var(--navy); color: #fff;
}
.btn.gold { background: var(--gold); color: var(--navy); border-color: #7A5B10; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
a.btn { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.subjects {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px;
}
.subject-card {
  display: flex; flex-direction: column; justify-content: space-between; gap: 10px;
  text-align: left; border: 0; border-top: 8px solid var(--accent, var(--navy));
  background: var(--tint, var(--paper)); border-radius: 10px; padding: 18px 16px;
  min-height: 120px; font: inherit; font-weight: 800; font-size: 1.15rem; color: var(--navy);
  cursor: pointer; box-shadow: var(--shadow);
}
.subject-card:hover, .subject-card:focus-visible { outline: 3px solid var(--navy); outline-offset: 2px; }
.subject-card .meta { font-weight: 600; font-size: .85rem; color: var(--muted); }
.hint { color: var(--muted); margin: 0 0 8px; }
.toggle {
  display: inline-flex; align-items: center; gap: 8px; font-weight: 700;
  min-height: 44px; padding: 0 8px;
}
.toggle input { width: 1.15rem; height: 1.15rem; accent-color: var(--navy); }

#game { display: none; }
#game.show { display: block; }
#picker.hide { display: none; }
.toolbar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin-bottom: 16px; background: var(--paper); padding: 10px 12px; border-radius: 10px;
}
.crumb { font-weight: 800; margin-right: auto; }
.crumb button {
  font: inherit; font-weight: 800; border: 0; background: none; color: var(--navy);
  cursor: pointer; text-decoration: underline; padding: 0; min-height: 44px;
}
.timer {
  font-variant-numeric: tabular-nums; font-weight: 800; min-width: 4.5rem; text-align: center;
}
.panel {
  background: var(--paper); border: 2px solid var(--navy); border-radius: 10px;
  padding: 16px; margin-bottom: 16px;
}
.panel h2 { margin-top: 0; }
.rate-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 8px 0; }
.rate-row input[type="range"] { width: 160px; }

.play-layout {
  display: grid; grid-template-columns: minmax(280px, 1fr) minmax(260px, 340px); gap: 20px;
  align-items: start;
}
/* Let the board column shrink below the grid's intrinsic width so a
   pre-sized crossword cannot stretch the page sideways. */
.play-layout, .play-layout > *, .board-wrap { min-width: 0; }
.board-wrap {
  background: var(--paper); border-radius: 12px; padding: 16px; overflow: hidden;
  box-shadow: var(--shadow); width: 100%; max-width: 100%;
}
.board {
  display: grid;
  grid-template-rows: repeat(var(--rows), var(--cell-size, 42px));
  grid-template-columns: repeat(var(--cols), var(--cell-size, 42px));
  gap: var(--cell-gap, 3px); margin: 0 auto; max-width: 100%;
}
.cell {
  position: relative;
  background: var(--cell);
  border: 2px solid var(--navy);
  border-radius: 4px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: calc(var(--cell-size, 42px) * 0.5);
  text-transform: uppercase; cursor: pointer; user-select: none;
  color: var(--navy);
}
.cell .num {
  position: absolute; top: 0; left: 0;
  font-size: clamp(8px, calc(var(--cell-size, 42px) * 0.52), 13px);
  font-weight: 800;
  line-height: 1;
  color: var(--navy);
  background: var(--paper);
  border-radius: 2px;
  padding: 0 1px;
  z-index: 1;
  pointer-events: none;
  letter-spacing: -0.04em;
  text-align: center;
}
.cell .glyph { padding-top: max(2px, calc(var(--cell-size, 42px) * 0.18)); line-height: 1; }
@media (min-width: 861px) {
  .cell .num { font-size: clamp(11px, calc(var(--cell-size, 42px) * 0.26), 13px); }
}
.cell.on { background: var(--cell-on); }
.cell.now { background: var(--cell-now); box-shadow: inset 0 0 0 2px var(--navy); }
.cell.wrong { color: var(--wrong); background: #F8D4CF; }
.cell.revealed, .cell.given { color: #0F4A52; }
.cell.ok { background: #D9F0E0; }

.clues { display: grid; grid-template-columns: 1fr; gap: 12px; }
.clue-toolbar { display: flex; flex-wrap: wrap; gap: 8px; }
.clue-col {
  background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px 12px 8px;
  max-height: min(70vh, 640px); overflow: auto;
}
.clue-col h2 { margin: 0 0 8px; font-size: 1rem; background: var(--navy); color: #fff; padding: 6px 10px; border-radius: 6px; }
.clue-col ol { list-style: none; margin: 0; padding: 0; }
.clue-col li { margin: 0; }
.clue-row { display: flex; align-items: flex-start; gap: 4px; }
.clue {
  display: block; flex: 1; width: auto; text-align: left; border: 0; background: transparent;
  font: inherit; padding: 10px 8px; border-radius: 6px; cursor: pointer; color: var(--ink);
  min-height: 44px;
}
.clue:hover, .clue:focus-visible { background: var(--paper); }
.clue.on { background: var(--cell-on); font-weight: 700; }
.clue .n { color: var(--navy); font-weight: 800; margin-right: 6px; }
.pic {
  display: inline-flex; align-items: center; justify-content: center;
  width: 1.6em; height: 1.6em; font-size: 1.15em; vertical-align: middle; margin-right: 4px;
}
.pic-svg { width: 1.25em; height: 1.25em; display: inline-block; vertical-align: middle; }
.speak-btn {
  flex: 0 0 auto; min-width: 44px; min-height: 44px; padding: 4px; border-radius: 6px;
  border: 2px solid var(--navy); background: #fff; color: var(--navy); cursor: pointer; font-weight: 700;
}
body.no-speech .speech-ui, body.no-speech .speak-btn { display: none !important; }

.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.status { min-height: 1.4em; margin: 8px 0 0; font-weight: 700; }
.status.bad { color: var(--wrong); }
.status.good { color: var(--ok); }

.word-bank {
  margin-top: 16px; background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 12px;
}
.word-bank h2 { margin: 0 0 6px; font-size: 1rem; }
.word-bank ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.word-bank li {
  border: 2px solid var(--navy); border-radius: 6px; padding: 10px 12px; font-weight: 800; letter-spacing: .04em;
  min-height: 44px; display: inline-flex; align-items: center;
}
.word-bank li.done { text-decoration: line-through; opacity: .65; background: var(--paper); }

#celebrate {
  display: none; position: fixed; inset: 0; background: rgba(27, 42, 74, 0.72);
  z-index: 40; align-items: center; justify-content: center; padding: 20px;
}
#celebrate.show { display: flex; }
.celebrate-card {
  background: #fff; border-radius: 16px; padding: 28px 24px; max-width: 520px; width: 100%;
  text-align: center; border-top: 8px solid var(--gold); box-shadow: var(--shadow);
  max-height: 90vh; overflow: auto;
}
.celebrate-card h2 { margin-top: 0; font-size: 1.8rem; }
.celebrate-card p { font-size: 1.1rem; }
.celebrate-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.freebie {
  margin-top: 18px; padding: 16px; background: var(--paper); border-radius: 10px; text-align: left;
  border-top: 4px solid var(--gold);
}
.freebie h3 { margin: 0 0 6px; }

.modal {
  position: fixed; inset: 0; background: rgba(27, 42, 74, 0.72);
  z-index: 45; display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal[hidden] { display: none !important; }
.modal-card {
  background: #fff; border-radius: 16px; padding: 24px; max-width: 640px; width: 100%;
  max-height: 92vh; overflow: auto; border-top: 8px solid var(--navy);
}
.modal-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.modal-head h2 { margin: 0; }
.modal-card label, .modal-card input, .modal-card textarea { display: block; width: 100%; }
.modal-card input, .modal-card textarea {
  font: inherit; margin: 4px 0 12px; padding: 8px; border: 2px solid var(--navy); border-radius: 6px;
}
.note {
  background: var(--paper); border-left: 4px solid var(--gold); padding: 8px 10px; font-weight: 600;
}
.saved-sets { list-style: none; padding: 0; }
.saved-sets li { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 8px 0; }

footer {
  background: var(--paper); padding: 18px 0; font-size: .95rem; margin-top: 20px;
}
footer .motto { font-weight: 800; font-size: 1.05rem; margin: 0 0 8px; }
footer a { margin-right: 10px; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
/* Keep the letter field focusable on phones (clip + 1px size can block the keyboard). */
#hidden-input {
  position: fixed; left: 0; bottom: 0; width: 100%; height: 16px;
  opacity: 0; border: 0; margin: 0; padding: 0; font-size: 16px;
  pointer-events: none; z-index: 1; background: transparent;
}

[data-subject="science"] { --accent: var(--daily); --tint: var(--daily-t); }
[data-subject="social-studies"] { --accent: var(--jobs); --tint: var(--jobs-t); }
[data-subject="math"] { --accent: var(--money); --tint: var(--money-t); }
[data-subject="ela"] { --accent: var(--calm); --tint: var(--calm-t); }
[data-subject="life-skills"] { --accent: #7A5B10; --tint: #FBF3DC; }
[data-subject="job-skills"] { --accent: var(--navy); --tint: #E8ECF4; }
[data-subject="bible"] { --accent: #3F4C8A; --tint: #E7EAF6; }

/* Focus: 3px navy on light surfaces for AA-sized UI contrast */
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.btn:focus-visible, .icon-btn:focus-visible, .band-btn:focus-visible, .speak-btn:focus-visible {
  outline: 3px solid var(--gold); outline-offset: 2px; box-shadow: 0 0 0 5px var(--navy);
}

body.projector {
  background: #0d1424; color: #fff;
}
body.projector header { display: none; }
body.projector footer { background: #111827; color: #fff; }
body.projector footer a, body.projector a { color: #F5C518; }
body.projector main { padding: 12px 0 20px; }
body.projector .toolbar, body.projector .panel, body.projector .word-bank { background: #111827; color: #fff; }
body.projector .crumb, body.projector .crumb button, body.projector .timer, body.projector .hint { color: #fff; }
body.projector .board-wrap { background: #111827; }
body.projector .board { --cell-size: 58px; --cell-gap: 4px; }
body.projector .cell {
  background: #fff; color: #000; border-width: 3px; border-color: #000;
  font-size: calc(var(--cell-size, 58px) * 0.54);
}
body.projector .cell.on { background: #FFE28A; }
body.projector .cell.now { background: #F5C518; box-shadow: none; outline: 3px solid #fff; outline-offset: 1px; z-index: 1; }
body.projector .cell.wrong { background: #ffb4ac; color: #5A1009; }
body.projector .clue-col { background: #111827; border-color: #9CA3AF; color: #fff; max-height: none; }
body.projector .clue-col h2 { background: #C79216; color: #111; font-size: 1.15rem; }
body.projector .clue { color: #fff; font-size: 1.15rem; padding: 8px 10px; }
body.projector .clue.on { background: #F5C518; color: #111; }
body.projector .btn, body.projector .icon-btn, body.projector .band-btn, body.projector .speak-btn {
  border-width: 3px; font-size: 1.05rem;
}
body.projector a.btn { color: #111; background: #F5C518; border-color: #F5C518; }
body.projector footer a { color: #F5C518; background: none; border: 0; }

body.projector .play-layout { grid-template-columns: minmax(420px, 1.55fr) minmax(260px, 0.8fr); gap: 16px; }
body.projector .status { color: #fff; }
body.projector :focus-visible { outline-color: #F5C518; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  #celebrate, .celebrate-card { transform: none; }
}

@media (max-width: 860px) {
  .play-layout { grid-template-columns: 1fr; }
  .clue-col { max-height: none; }
  .clues { grid-template-columns: 1fr 1fr; }
  .wrap { max-width: 100%; }
}
@media (max-width: 768px) {
  html, body { overflow-x: hidden; }
  .wrap { overflow-x: hidden; max-width: 100%; }
  .board-wrap { padding: 10px; }
  /* Cell size is set in JS from the column count and viewport.
     These values are only a first-paint fallback. */
  .board { --cell-gap: 2px; }
}
@media (max-width: 600px) {
  body { font-size: 16px; }
  h1 { font-size: 1.55rem; }
  header .wrap { flex-direction: column; align-items: flex-start; padding: 10px 14px; }
  .brand { padding: 6px 0; }
  nav { width: 100%; }
  .hero { padding: 18px; }
  .clues { grid-template-columns: 1fr; }
  .board-wrap { padding: 8px; }
  .subjects { grid-template-columns: 1fr 1fr; }
}

.print-only { display: none; }

@media print {
  .skip, header, footer, nav, .no-print, .toolbar, .actions, .panel, .modal,
  #celebrate, #teacher, #picker, #hidden-input, #sr-live, .speech-ui, .word-bank {
    display: none !important;
  }
  a[href]:after { content: none !important; }
  body { background: #fff; color: #000; font-size: 12pt; }
  main, #game, #game.show { display: block !important; padding: 0; }
  .wrap { max-width: none; padding: 0; }
  .print-only { display: block !important; }
  .print-brand { font-weight: 800; letter-spacing: .08em; margin: 0 0 6px; }
  #print-header { margin-bottom: 12px; border-bottom: 2pt solid #000; padding-bottom: 8px; }
  .play-layout { display: block; }
  .clues { display: block; grid-template-columns: 1fr 1fr; }
  .clue-col { border: 0; max-height: none; overflow: visible; padding: 0 0 12px; break-inside: avoid; }
  .clue-col h2 { background: #000; color: #fff; }
  .board-wrap { box-shadow: none; background: #fff; padding: 0; overflow: visible; }
  .board { --cell-size: 26px; --cell-gap: 0px; }
  .cell {
    border: 1.4pt solid #000; border-radius: 0; background: #fff; color: #000;
    box-shadow: none; outline: none;
  }
  .cell.on, .cell.now, .cell.ok, .cell.wrong, .cell.given, .cell.revealed { background: #fff !important; color: #000 !important; box-shadow: none !important; outline: none !important; }
  /* Blank student grid: hide letters */
  #board .glyph { visibility: hidden; }
  .clue, .clue.on { font-weight: 400 !important; background: transparent !important; color: #000 !important; }
  .pic, .speak-btn { display: none !important; }
  .print-key-page { display: none !important; }
  body.print-key .print-key-page { display: block !important; page-break-before: always; break-before: page; margin-top: 24px; }
  body.print-key #key-board .glyph { visibility: visible; color: #000; }
}


/* Phone play (2026-11-15): keep Next puzzle in reach, and offer a letter pad
   so a 16px grid can still be played with a finger. */
.letter-pad { display: none; }
.letter-pad-row { display: flex; justify-content: center; gap: 4px; margin: 0 0 4px; }
.letter-pad button {
  font: inherit; font-weight: 800; cursor: pointer;
  border: 2px solid var(--navy); background: #fff; color: var(--navy);
  border-radius: 8px; min-height: 44px; min-width: 28px; flex: 1 1 0;
  max-width: 42px; padding: 0;
}
.letter-pad button.wide { max-width: 96px; flex: 2 1 0; font-size: .9rem; }
.letter-pad button:active { background: var(--gold); }
.phone-check { display: none; }
.play-dock { display: none; }
.active-clue { display: none; }
@media (max-width: 860px) {
  #play-dock:not([hidden]) {
    display: block;
    position: fixed; left: 0; right: 0; bottom: 0;
    z-index: 20; margin: 0;
    padding: 0 0 calc(8px + env(safe-area-inset-bottom, 0px));
    background: #fff;
    border-top: 2px solid var(--navy);
    box-shadow: 0 -8px 16px rgba(27, 42, 74, 0.08);
  }
  #letter-pad:not([hidden]) {
    display: block;
    position: static; margin: 0;
    padding: 6px 6px 4px;
    background: transparent; border: 0; box-shadow: none;
  }
  #active-clue:not([hidden]) {
    display: flex;
    align-items: stretch;
    padding: 0;
    min-height: 44px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    text-align: left;
  }
  .clue-nav {
    flex: 0 0 44px;
    min-width: 44px;
    min-height: 44px;
    border: 0;
    background: transparent;
    color: var(--navy);
    font-size: 1.7rem;
    font-weight: 800;
    line-height: 1;
    cursor: pointer;
    padding: 0;
  }
  .clue-toggle {
    flex: 1 1 auto;
    min-width: 0;
    min-height: 44px;
    border: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    padding: 6px 4px;
    cursor: pointer;
  }
  .clue-nav:active, .clue-toggle:active { background: #fff; }
  .active-clue-kicker { display: block; font-weight: 800; color: var(--navy); margin: 0 0 2px; }
  .active-clue-text {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-weight: 600;
    line-height: 1.25;
  }
  #game.show { padding-bottom: var(--play-dock-h, 230px); }
  html { scroll-padding-bottom: var(--play-dock-h, 230px); }
  .cell, .actions, .clue, .word-bank { scroll-margin-bottom: var(--play-dock-h, 230px); }
  body.playing-narrow #game.show {
    padding-top: var(--play-toolbar-h, 140px);
  }
  body.playing-narrow #game .toolbar {
    position: fixed; top: 0; left: 0; right: 0; z-index: 12;
    background: var(--paper); box-shadow: 0 8px 16px rgba(27, 42, 74, 0.08);
  }
  body.playing-narrow .cell { scroll-margin-top: var(--play-toolbar-h, 140px); }
  html { scroll-padding-top: var(--play-toolbar-h, 0px); }
  #game .toolbar {
    position: sticky; top: 0; z-index: 12;
    background: var(--paper); box-shadow: 0 8px 16px rgba(27, 42, 74, 0.08);
  }
  #next-top { order: -1; flex: 1 0 100%; }
  .cell { touch-action: manipulation; }
  .board-wrap { overflow-x: hidden; padding: 4px; }
  .board { max-width: 100%; }
  body.playing-narrow main.wrap { padding: 0 8px; }
  body.playing-narrow #status { margin: 4px 0 0; }
  .cell { border-width: 1px; font-size: calc(var(--cell-size, 42px) * 0.42); }
  .cell .num { font-size: clamp(8px, calc(var(--cell-size, 42px) * 0.54), 12px); }
  .phone-check { display: none; }
  body.playing-narrow .phone-check { display: inline-flex; align-items: center; justify-content: center; }
  body.playing-narrow #game .actions { display: none; }
  body.playing-narrow .clues-toggle:not([hidden]) { display: inline-flex; margin: 8px 0 0; }
  body.playing-narrow:not(.show-clues) .clues { display: none; }
}
@media print {
  body.playing-narrow .clues { display: grid !important; }
  body.playing-narrow .clues-toggle { display: none !important; }
}

@media (max-width: 600px) {
  #projector, #fullscreen { display: none; }
}
@media (max-width: 860px) {
  body.playing-narrow header, body.playing-narrow footer { display: none; }
  body.playing-narrow .crumb #crumb-label {
    display: inline-block; max-width: 100%;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    vertical-align: bottom;
  }
  body.playing-narrow #game .toolbar { padding: 8px; gap: 6px; margin-bottom: 10px; }
}


/* Daily streak badge (2026-11-15). Saved in localStorage only. */
.streak-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 6px solid var(--gold);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 0 0 20px;
}
.streak-badge {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  text-align: left;
}
.streak-icon-wrap {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--navy);
  color: var(--gold);
  border-radius: 50%;
}
.streak-icon { width: 24px; height: 24px; display: block; }
.streak-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.streak-copy strong { font-size: 1.15rem; line-height: 1.25; }
.streak-copy span { color: var(--muted); font-weight: 600; font-size: .95rem; }
.streak-nudge { margin: 8px 0 0; color: var(--ink); }
.streak-panel .btn { margin-top: 10px; min-height: 44px; }
.streak-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  max-width: 100%;
}
.streak-actions .btn {
  margin-top: 0;
  min-height: 44px;
  flex: 1 1 auto;
  max-width: 100%;
}
#streak-win {
  justify-content: center;
  margin: 8px 0 4px;
  background: var(--paper);
  border-radius: 10px;
  padding: 10px 14px;
}
#streak-win-nudge { margin: 4px 0 10px; font-size: 1rem; }
@media (max-width: 600px) {
  .streak-panel { padding: 12px 14px; }
  .streak-copy strong { font-size: 1.05rem; }
}
@media print {
  .streak-panel, #streak-win, #streak-win-nudge, #share-streak, #share-streak-win { display: none !important; }
}


/* Game Zone nav highlight (2026-11-15, mobile pill 2026-11-19) */
nav a.nav-play {
  background: var(--gold);
  color: var(--navy);
  border: 2px solid #7A5B10;
  border-radius: 999px;
  font-weight: 800;
  gap: 6px;
  padding: 6px 12px;
}
nav a.nav-play .nav-game-icon,
nav a.nav-play .nav-star {
  width: auto;
  height: auto;
  flex: 0 0 auto;
  display: inline-block;
  font-size: 1.15em;
  line-height: 1;
  color: var(--navy);
}
nav a.nav-play.on {
  background: var(--paper);
  color: var(--navy);
  border-color: var(--gold);
}

/* Sale banner + slim mobile nav (2026-11-19) */
#sale-banner{background:var(--gold);color:var(--navy);text-align:center;font-weight:800;font-size:.95rem;letter-spacing:.02em;border-bottom:3px solid var(--navy)}
#sale-banner a{color:var(--navy);text-decoration:none;display:block;padding:8px 16px;line-height:1.35}
#sale-banner a:hover,#sale-banner a:focus{text-decoration:underline}
@media (max-width:600px){#sale-banner{font-size:.85rem}#sale-banner a{padding:8px 12px}}
.nav-toggle,.nav-sale-cta{display:none}
.nav-toggle{appearance:none;border:2px solid var(--gold);background:transparent;color:var(--gold);font:inherit;font-weight:800;border-radius:999px;padding:8px 14px;min-height:44px;cursor:pointer}
.nav-sale-cta{background:var(--gold);color:var(--navy);text-decoration:none;font-weight:800;border-radius:999px;padding:8px 14px;min-height:44px;align-items:center}
@media (max-width:600px){
  body.sale-on header .wrap{flex-direction:row;flex-wrap:nowrap;align-items:center;justify-content:space-between;gap:6px}
  body.sale-on .brand{flex:1 1 auto;min-width:0;padding:0;font-size:.78rem;letter-spacing:.04em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  body.sale-on .nav-toggle,body.sale-on .nav-sale-cta{display:inline-flex;flex:0 0 auto;padding:6px 10px;min-height:40px;font-size:.85rem}
  body.sale-on nav{display:none;width:100%;margin:0;flex-direction:column;gap:0}
  body.sale-on header.nav-open nav{display:flex}
  body.sale-on header.nav-open .wrap{flex-wrap:wrap}
  body.sale-on nav a{width:100%;padding:10px 4px}
  body.sale-on nav a.nav-play{background:var(--gold);color:var(--navy);border:2px solid #7A5B10;border-radius:999px;font-weight:800;padding:10px 14px;margin:8px 0 10px;width:100%;justify-content:center;gap:8px;box-sizing:border-box}
  body.sale-on nav a.nav-play .nav-game-icon,
  body.sale-on nav a.nav-play .nav-star{display:inline-block}
  body.sale-on nav a.nav-play.on{background:var(--paper);color:var(--navy);border-color:var(--gold)}
}


/* Word search (2026-11-15) */
.modes { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 20px; }
.ws-list { display: none; }
body.mode-wordsearch #ws-list { display: block; margin: 12px 0 0; }
body.mode-wordsearch #ws-list h2 { margin: 0 0 6px; font-size: 1rem; }
#ws-words {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px;
}
#ws-words li {
  margin: 0; font-weight: 800; letter-spacing: 0.02em;
  min-height: 36px; display: flex; align-items: center;
  color: var(--navy);
}
#ws-words li.found {
  text-decoration: line-through;
  color: #5B6578;
  font-weight: 700;
}
body.mode-wordsearch .board.ws-board {
  gap: 0;
  border: 2px solid var(--navy);
  border-radius: 8px;
  background: #fff;
  width: max-content;
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}
body.mode-wordsearch .board.ws-board .cell {
  border: 0;
  border-radius: 0;
  background: #fff;
  font-size: calc(var(--cell-size, 28px) * 0.52);
  font-weight: 800;
  padding: 0;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
body.mode-wordsearch .board.ws-board .cell .glyph { padding-top: 0; }
body.mode-wordsearch .board.ws-board .cell.ws-on { background: #F3D36A; }
body.mode-wordsearch .board.ws-board .cell.ws-found { background: #D9F0E0; color: #0F4A52; }
body.mode-wordsearch .board.ws-board .cell.ws-on.ws-found { background: #C7E6B8; }
body.mode-wordsearch #game .clues,
body.mode-wordsearch #clues-toggle,
body.mode-wordsearch #play-dock,
body.mode-wordsearch #word-bank,
body.mode-wordsearch .phone-check,
body.mode-wordsearch #game .actions { display: none !important; }
@media (min-width: 861px) {
  body.mode-wordsearch #ws-list { margin-top: 0; }
  #ws-words { grid-template-columns: 1fr; }
  body.mode-wordsearch .play-layout { grid-template-columns: minmax(280px, 1fr) minmax(180px, 260px); }
}
@media (max-width: 860px) {
  body.mode-wordsearch.playing-narrow #ws-list {
    max-height: none;
    overflow: visible;
  }
  #ws-words { grid-template-columns: 1fr 1fr 1fr; }
}
@media (max-width: 600px) {
  #ws-words { grid-template-columns: 1fr 1fr 1fr; }
  #ws-words li { min-height: 32px; font-size: 0.95rem; }
}

/* Word Guess */
#guess-start { margin: 0 0 18px; }
#guess[hidden], #guess-start[hidden] { display: none !important; }
.guess-toggle {
  display: flex;
  width: 100%;
  max-width: 320px;
  margin: 0 auto 8px;
  border: 2px solid var(--navy);
  border-radius: 10px;
  overflow: hidden;
}
.guess-toggle button {
  flex: 1 1 0;
  min-height: 44px;
  border: 0;
  background: #fff;
  color: var(--navy);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  padding: 0 8px;
}
.guess-toggle button + button { border-left: 2px solid var(--navy); }
.guess-toggle button.on,
.guess-toggle button[aria-pressed="true"] {
  background: var(--navy);
  color: #fff;
}
.guess-bible-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  margin: 0 auto 8px;
  padding: 0 12px;
  border: 2px solid var(--navy);
  border-radius: 999px;
  background: #fff;
  color: var(--navy);
  font: inherit;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
}
#guess-start .guess-bible-btn { display: inline-flex; margin: 4px 0 0; }
#guess .guess-bible-btn { display: flex; width: fit-content; }
.guess-bible-btn.on,
.guess-bible-btn[aria-pressed="true"] { background: var(--navy); color: #fff; }
.guess-bible-btn[hidden] { display: none !important; }
#guess-start-hint { text-align: left; margin: 8px 0 0; }
.guess-panel { margin: 4px auto 0; max-width: 420px; }
.guess-lead {
  margin: 0 0 4px;
  text-align: center;
  font-size: 0.95rem;
  line-height: 1.3;
  color: var(--navy);
}
.guess-legend {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  list-style: none;
  margin: 0 0 6px;
  padding: 0;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--navy);
  white-space: nowrap;
}
.guess-legend li {
  display: flex;
  align-items: center;
  gap: 4px;
}
.guess-swatch {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  border: 1.5px solid var(--navy);
  flex: 0 0 16px;
}
.guess-swatch.correct { background: var(--ok); border-color: var(--ok); }
.guess-swatch.present { background: var(--gold); }
.guess-swatch.absent { background: #5c6570; border-color: #4a525c; }
.guess-clue {
  text-align: center;
  margin: 0 0 6px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.3;
}
.guess-clue[hidden] { display: none; }
.guess-board {
  display: grid;
  grid-template-rows: repeat(6, 1fr);
  gap: 5px;
  width: min(100%, 300px);
  margin: 4px auto 6px;
}
.guess-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 5px;
}
.guess-tile {
  aspect-ratio: 1;
  border: 2px solid var(--navy);
  border-radius: 6px;
  background: #fff;
  color: var(--navy);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: clamp(1rem, 5.2vw, 1.5rem);
  text-transform: uppercase;
  min-height: 40px;
  line-height: 1;
}
.guess-tile.filled { background: var(--paper); }
.guess-tile.current { box-shadow: inset 0 0 0 2px var(--gold); }
.guess-tile.correct { background: var(--ok); color: #fff; border-color: var(--ok); }
.guess-tile.present { background: var(--gold); color: var(--navy); border-color: var(--navy); }
.guess-tile.absent { background: #5c6570; color: #fff; border-color: #4a525c; }
.guess-board.shake { animation: guess-shake 0.4s ease; }
@keyframes guess-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}
#guess-msg { text-align: center; min-height: 1.2em; margin: 0 0 6px; }
.guess-toast {
  max-width: 420px;
  margin: 0 auto 8px;
  padding: 8px 12px;
  background: var(--paper);
  border: 2px solid var(--navy);
  border-radius: 8px;
  color: var(--navy);
  font-size: 0.9rem;
  font-weight: 700;
  text-align: center;
  line-height: 1.3;
  box-shadow: var(--shadow);
}
.guess-toast[hidden] { display: none !important; }
.guess-keys {
  margin: 0 auto;
  width: min(100%, 420px);
  padding-bottom: 8px;
}
.guess-keys-row {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin: 0 0 4px;
}
.guess-keys button {
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  border: 2px solid var(--navy);
  background: #fff;
  color: var(--navy);
  border-radius: 8px;
  min-height: 44px;
  min-width: 28px;
  flex: 1 1 0;
  max-width: 42px;
  padding: 0;
  text-transform: uppercase;
}
.guess-keys button.wide { max-width: 72px; flex: 2 1 0; font-size: 0.8rem; }
.guess-keys button:active { background: var(--gold); }
.guess-keys button.correct { background: var(--ok); color: #fff; border-color: var(--ok); }
.guess-keys button.present { background: var(--gold); color: var(--navy); border-color: var(--navy); }
.guess-keys button.absent { background: #5c6570; color: #fff; border-color: #4a525c; }
body.mode-wordguess .play-layout,
body.mode-wordguess #play-dock,
body.mode-wordguess .phone-check,
body.mode-wordguess #game .actions,
body.mode-wordguess .clues-toggle,
body.mode-wordguess .clues,
body.mode-wordguess #print-answer,
body.mode-wordguess #word-bank { display: none !important; }
body.mode-wordguess #guess:not([hidden]) { display: block; }
body.mode-wordguess:not(.guess-practice) #next-top { display: none !important; }

body.mode-wordguess.playing-narrow #guess-keys {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 20;
  width: auto;
  margin: 0;
  padding: 6px 6px calc(8px + env(safe-area-inset-bottom, 0px));
  background: #fff;
  border-top: 2px solid var(--navy);
  box-shadow: 0 -8px 16px rgba(27, 42, 74, 0.08);
}
body.mode-wordguess.playing-narrow #guess-toast:not([hidden]) {
  position: fixed;
  left: 8px;
  right: 8px;
  bottom: calc(var(--guess-keys-h, 160px) + 8px);
  z-index: 21;
  margin: 0;
}
body.mode-wordguess.playing-narrow #game.show {
  padding-bottom: calc(var(--guess-keys-h, 160px) + 8px);
}
body.mode-wordguess.playing-narrow .guess-panel { margin-top: 0; }
body.mode-wordguess.playing-narrow .guess-toggle { margin-bottom: 6px; }
body.mode-wordguess.playing-narrow .guess-board { width: min(100%, 270px); gap: 4px; margin: 2px auto 4px; }
body.mode-wordguess.playing-narrow .guess-row { gap: 4px; }
body.mode-wordguess.playing-narrow .guess-tile { min-height: 36px; }
@media (max-width: 860px) {
  body.mode-wordguess .guess-keys button { max-width: 36px; }
  body.mode-wordguess .guess-keys button.wide { max-width: 66px; font-size: 0.75rem; }
  .guess-legend { gap: 6px; font-size: 0.68rem; }
}

/* Sale banner (Thanksgiving and Christmas 2026) */
#sale-banner{background:var(--gold);color:var(--navy);text-align:center;font-weight:800;font-size:.95rem;letter-spacing:.02em;border-bottom:3px solid var(--navy)}
#sale-banner a{color:var(--navy);text-decoration:none;display:block;padding:8px 16px;line-height:1.35}
#sale-banner a:hover,#sale-banner a:focus{text-decoration:underline}
@media (max-width:600px){#sale-banner{font-size:.85rem}#sale-banner a{padding:8px 12px}}

.guess-more{display:block;margin:2px auto 4px;padding:4px 12px;font:inherit;font-size:.9rem;border:1px solid var(--muted,#888);border-radius:999px;background:transparent;color:inherit;cursor:pointer}
.guess-more[hidden]{display:none}
.guess-extra{margin-top:0}

.enter-ready{background:#d4a72c !important;color:#1b2a4a !important;border-color:#1b2a4a !important;animation:enterPulse 1.2s ease-in-out infinite}
@keyframes enterPulse{0%,100%{transform:scale(1)}50%{transform:scale(1.08)}}
.guess-enter-nudge{text-align:center;font-weight:700;margin:0 0 4px;color:#1b2a4a}
.guess-enter-nudge[hidden]{display:none}
@media (prefers-reduced-motion:reduce){.enter-ready{animation:none}}
