@font-face {
  font-family: "Barlow Condensed";
  src: url("/assets/barlow-condensed-700.woff2") format("woff2");
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "DM Sans";
  src: url("/assets/dm-sans.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --bg: #121213;
  --surface: #1a1a1d;
  --surface-2: #222327;
  --line: #2d2f36;
  --line-strong: #454852;
  --ink: #f4f4f5;
  --text: #d4d4d8;
  --muted: #9397a3;
  --dim: #636773;
  --green: #22c55e;
  --green-solid: #16a34a;
  --green-hover: #15803d;
  --green-bg: #132a1d;
  --green-line: #1e6b3b;
  --red: #ef4444;
  --red-solid: #dc2626;
  --red-hover: #b91c1c;
  --red-bg: #2c1618;
  --red-line: #7f2326;
  --skip-bg: #25262b;
  --skip-line: #43464f;
  --yellow: #eab308;
  --heading: "Barlow Condensed", "Arial Narrow", "DM Sans", sans-serif;
  --body: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html {
  min-width: 280px;
  -webkit-font-smoothing: antialiased;
}
body {
  min-height: 100vh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 400 15px/1.55 var(--body);
}
main { flex: 1; }
[hidden] { display: none !important; }
img { max-width: 100%; display: block; }
a { color: #e4e4e7; text-underline-offset: 3px; }
a:hover { color: #ffffff; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
h1, h2, h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--heading);
  line-height: 1.08;
}
p, figure { margin: 0; }
ul, ol, dl { margin: 0; }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
::selection { background: var(--green); color: #052e16; }

.wrap { width: min(100% - 32px, 740px); margin-inline: auto; }
.wrap-wide { width: min(100% - 32px, 920px); margin-inline: auto; }
.measure { max-width: 700px; }
.icon { width: 16px; height: 16px; flex: 0 0 auto; vertical-align: -0.18em; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link {
  position: absolute;
  z-index: 50;
  inset: 8px auto auto 8px;
  transform: translateY(-200%);
  background: #ffffff;
  color: #111111;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 4px;
  text-decoration: none;
}
.skip-link:focus { transform: none; }

/* Header with crisp film-clapper accent strip */
.top {
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}
.top::before {
  content: "";
  display: block;
  height: 5px;
  background: repeating-linear-gradient(
    -55deg,
    #26272c 0 14px,
    #d4d4d8 14px 28px
  );
  opacity: 0.32;
}
.top-inner {
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #ffffff;
  text-decoration: none;
  font: 700 26px/1 var(--heading);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-style: italic;
}
.brand:hover { color: #ffffff; opacity: 0.9; }
.brand img { border-radius: 3px; flex: 0 0 auto; }
.top-controls {
  display: flex;
  align-items: center;
  gap: 6px;
}
.top nav {
  display: flex;
  align-items: center;
  gap: 2px;
  white-space: nowrap;
}
.top nav a {
  display: inline-flex;
  align-items: center;
  height: 54px;
  padding: 0 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}
.top nav a:hover { color: var(--ink); }
.top nav a[aria-current] {
  color: #ffffff;
  border-bottom-color: var(--green);
}
.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 32px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}
.icon-btn:hover {
  color: #ffffff;
  border-color: var(--line-strong);
  background: var(--surface-2);
}

/* Main Centered Game Stage (Framed / Flickle style) */
.game-shell {
  padding-top: 16px;
}
.screening {
  display: flex;
  flex-direction: column;
}
.stage-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 4px 4px 0 0;
}
.stage-bar h1 {
  font: 700 19px/1 var(--heading);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ffffff;
}
.stage-meta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.stage-date {
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #d4d4d8;
}
.stage-timer {
  color: var(--muted);
  padding-left: 10px;
  border-left: 1px solid var(--line);
}
.stage-timer strong { color: var(--ink); font-weight: 700; }

/* Pure Black Matted 16:9 Cinema Frame — Zero Overlay Clutter */
.screen {
  position: relative;
  background: #000000;
  border-inline: 1px solid var(--line);
  overflow: hidden;
  cursor: zoom-in;
}
.still {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #000000;
}

/* Flush 6-Slot Attempt Strip */
.attempts {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 4px;
  padding: 6px;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 0 0 4px 4px;
}
.attempts li {
  display: grid;
  place-items: center;
  height: 32px;
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  border-radius: 3px;
  background: #141416;
  color: var(--dim);
  border: 1px dashed #353841;
  transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease;
}
.attempts li[data-active="true"] {
  background: var(--green-solid);
  border: 1px solid var(--green);
  color: #ffffff;
}
.attempts li[data-outcome="miss"] {
  background: var(--red-bg);
  border: 1px solid var(--red-line);
  color: var(--red);
}
.attempts li[data-outcome="skip"] {
  background: var(--skip-bg);
  border: 1px solid var(--skip-line);
  color: #a1a1aa;
}
.attempts li[data-outcome="hit"] {
  background: var(--green-solid);
  border: 1px solid var(--green);
  color: #ffffff;
}
.attempts li.is-fresh-miss { animation: slotShake 300ms ease; }
.attempts li.is-fresh-hit { animation: slotPop 320ms ease; }

/* Guess Form: High-Contrast Crisp Input + Flat Action Buttons */
.play-controls {
  margin-top: 12px;
}
.guess-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 6px;
}
.suggest-wrap {
  position: relative;
  min-width: 0;
}
.search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #6b7280;
  pointer-events: none;
}
#film-guess {
  width: 100%;
  height: 44px;
  border: 1px solid #d4d4d8;
  border-radius: 4px;
  background: #ffffff;
  color: #111111;
  padding: 0 34px 0 36px;
  font-size: 15px;
  font-weight: 500;
}
#film-guess:focus {
  outline: 2px solid var(--green);
  outline-offset: 0;
  border-color: var(--green);
}
#film-guess:disabled {
  background: #27272a;
  border-color: var(--line);
  color: var(--muted);
}
#film-guess::placeholder { color: #6b7280; opacity: 1; }
.clear-input {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: #52525b;
  font-size: 18px;
  line-height: 1;
  padding: 0;
}
.clear-input:hover { background: #e4e4e7; color: #111111; }

#suggestions {
  position: absolute;
  z-index: 25;
  inset: 48px 0 auto;
  padding: 4px;
  list-style: none;
  background: #ffffff;
  color: #111111;
  border: 1px solid #d4d4d8;
  border-radius: 4px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
  max-height: 260px;
  overflow-y: auto;
}
#suggestions li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 38px;
  padding: 7px 10px;
  border-radius: 3px;
  cursor: pointer;
  font-size: 14.5px;
  font-weight: 500;
  color: #18181b;
}
#suggestions li mark {
  background: #dcfce7;
  color: #14532d;
  font-weight: 700;
  padding: 0 1px;
  border-radius: 2px;
}
#suggestions li:hover,
#suggestions li[aria-selected="true"] {
  background: #f4f4f5;
  color: #000000;
}
#suggestions li[data-tried="true"] { opacity: 0.55; }
.tried-tag {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #52525b;
  background: #e4e4e7;
  padding: 2px 6px;
  border-radius: 3px;
}

/* Flat High-Contrast Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 44px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}
.btn-green {
  background: var(--green-solid);
  color: #ffffff;
}
.btn-green:hover:not(:disabled) {
  background: var(--green-hover);
  color: #ffffff;
}
.btn-green:disabled {
  background: #27372c;
  color: #6f8a77;
}
.btn-red {
  background: var(--red-solid);
  color: #ffffff;
}
.btn-red:hover:not(:disabled) {
  background: var(--red-hover);
  color: #ffffff;
}
.btn-red:disabled {
  background: #3a2325;
  color: #8a6466;
}
.btn-outline {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--ink);
}
.btn-outline:hover:not(:disabled) {
  background: var(--surface-2);
  border-color: #71717a;
  color: #ffffff;
}
.btn-sm {
  height: 34px;
  padding: 0 12px;
  font-size: 14px;
}

.control-subrow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 8px;
  font-size: 14px;
  color: var(--muted);
}
.remaining {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.hint-inline-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
}
.hint-inline-link:hover { color: #ffffff; text-decoration: underline; }

.game-status {
  font-size: 14px;
  font-weight: 600;
  color: #d4d4d8;
}
.game-status:not(:empty) {
  margin-top: 8px;
  padding: 8px 12px;
  border-radius: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.game-status[data-tone="ok"]:not(:empty) {
  background: var(--green-bg);
  border-color: var(--green-line);
  color: #86efac;
}
.game-status[data-tone="warn"]:not(:empty) {
  background: var(--red-bg);
  border-color: var(--red-line);
  color: #fca5a5;
}

/* Unified 6-Row Flickle Guess & Clue Ledger */
.ledger {
  margin-top: 12px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 6px;
}
.ledger-row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 12px;
  background: #161618;
  border: 1px solid #26282e;
  border-radius: 4px;
  font-size: 14px;
}
.ledger-row[data-state="active"] {
  background: #1c1d21;
  border-color: #6b7280;
}
.ledger-row[data-state="miss"] {
  background: var(--surface);
  border-color: var(--line);
}
.ledger-row[data-state="skip"] {
  background: var(--surface);
  border-color: var(--line);
}
.ledger-row[data-state="hit"] {
  background: var(--green-bg);
  border-color: var(--green-line);
}
.ledger-badge {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 3px;
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  background: #222328;
  color: var(--dim);
}
.ledger-row[data-state="active"] .ledger-badge {
  background: var(--green-solid);
  color: #ffffff;
}
.ledger-row[data-state="miss"] .ledger-badge {
  background: var(--red-bg);
  color: var(--red);
  border: 1px solid var(--red-line);
}
.ledger-row[data-state="skip"] .ledger-badge {
  background: var(--skip-bg);
  color: #a1a1aa;
  border: 1px solid var(--skip-line);
}
.ledger-row[data-state="hit"] .ledger-badge {
  background: var(--green-solid);
  color: #ffffff;
}
.ledger-main {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 10px;
}
.ledger-guess {
  font-weight: 600;
  color: var(--muted);
}
.ledger-row[data-state="unused"] .ledger-guess,
.ledger-row[data-state="active"] .ledger-guess {
  color: var(--dim);
  font-weight: 500;
}
.ledger-row[data-state="active"] .ledger-guess { color: #a1a1aa; }
.ledger-row[data-state="hit"] .ledger-guess { color: #86efac; font-weight: 700; }
.ledger-clue {
  color: #ffffff;
  font-weight: 600;
}
.ledger-clue-label {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  white-space: nowrap;
}
.ledger-row[data-state="miss"] .ledger-clue-label,
.ledger-row[data-state="skip"] .ledger-clue-label {
  color: #9ca3af;
}
.ledger-row[data-state="hit"] .ledger-clue-label {
  color: #4ade80;
}

/* Post-Game Result Box */
.game-result {
  margin-top: 12px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid var(--line-strong);
  border-radius: 4px;
}
.game-result[data-outcome="won"] { border-top-color: var(--green); }
.game-result[data-outcome="lost"] { border-top-color: var(--red); }
.result-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 14px;
}
.result-kicker {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}
.game-result[data-outcome="won"] .result-kicker { color: var(--green); }
.game-result[data-outcome="lost"] .result-kicker { color: var(--red); }
.game-result h2 {
  font-size: 28px;
  margin-top: 2px;
}
.result-film {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  margin-top: 2px;
}
.result-countdown {
  font-size: 14px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.result-countdown strong { color: #ffffff; margin-left: 4px; }
.result-strip {
  display: flex;
  gap: 5px;
  margin-top: 12px;
}
.result-dot {
  width: 24px;
  height: 10px;
  border-radius: 2px;
  background: #27272a;
}
.result-dot[data-mark="hit"] { background: var(--green); }
.result-dot[data-mark="miss"] { background: var(--red); }
.result-dot[data-mark="skip"] { background: #6b7280; }
.result-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.result-share-fallback {
  width: 100%;
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 4px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: #ffffff;
  font: 14px/1.45 ui-monospace, SFMono-Regular, Menlo, monospace;
  resize: none;
}
.new-puzzle {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 4px;
  background: var(--green-bg);
  border: 1px solid var(--green-line);
  font-size: 14px;
  font-weight: 700;
}
.new-puzzle a { color: #86efac; text-decoration: none; }
.new-puzzle a:hover { text-decoration: underline; }
noscript p {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  font-size: 14px;
}

/* Below-the-Fold EMD Sections (Restrained, Flat, Clean) */
.home-section {
  margin-top: 34px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.section-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.section-top h2, .archive-months h2 {
  font-size: 26px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.section-top a {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: none;
}
.section-top a:hover { color: #ffffff; text-decoration: underline; }

.archive-list {
  list-style: none;
  padding: 0;
  border-top: 1px solid var(--line);
}
.archive-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 50px;
  padding: 8px 4px;
  border-bottom: 1px solid var(--line);
}
.archive-date-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}
.archive-row time {
  font-weight: 600;
  font-size: 14.5px;
  color: var(--ink);
}
.play-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 3px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.play-badge[data-state="won"] {
  background: var(--green-bg);
  color: #4ade80;
  border: 1px solid var(--green-line);
}
.play-badge[data-state="lost"] {
  background: var(--red-bg);
  color: #f87171;
  border: 1px solid var(--red-line);
}
.play-badge[data-state="playing"] {
  background: #27241a;
  color: #facc15;
  border: 1px solid #574c24;
}
.archive-row-links {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}
.archive-row a {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  color: var(--muted);
}
.archive-row a:last-child { color: #e4e4e7; }
.archive-row a:hover { color: var(--green); text-decoration: underline; }

.home-rules {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
}
.home-rules p {
  max-width: 540px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 14px;
}
.home-rules h2 {
  font-size: 24px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* Subpages (Archive, Hints, Answer, Rules, Blog) */
.page-wrap { padding-block: 26px 16px; }
.breadcrumbs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 14px;
}
.breadcrumbs a { color: var(--muted); text-decoration: none; }
.breadcrumbs a:hover { color: #ffffff; text-decoration: underline; }
.page-intro { margin-bottom: 22px; }
.page-intro h1 {
  font-size: clamp(34px, 5vw, 54px);
  letter-spacing: 0.01em;
}
.page-intro p {
  margin-top: 8px;
  color: var(--muted);
  max-width: 60ch;
  font-size: 15.5px;
}
.page-intro .page-date { font-size: 14px; color: var(--dim); }

.archive-months section + section { margin-top: 28px; }
.archive-months h2 { margin-bottom: 8px; }

.story { max-width: 860px; }
.answer-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  align-items: start;
  gap: 20px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
}
.answer-card h2 {
  font-size: clamp(30px, 4vw, 46px);
  margin-bottom: 12px;
}
.answer-card h2 span { color: var(--green); white-space: nowrap; }
.answer-card dl { padding: 0; }
.answer-card dl > div {
  display: grid;
  grid-template-columns: minmax(80px, 0.36fr) 1fr;
  gap: 10px;
  padding-block: 7px;
  border-top: 1px solid var(--line);
  font-size: 14.5px;
}
dt { color: var(--muted); }
dd { margin: 0; color: var(--ink); font-weight: 500; }
.answer-frame img {
  background: #000000;
  border: 1px solid var(--line);
  border-radius: 3px;
  width: 100%;
  height: auto;
  cursor: zoom-in;
}
.answer-frame figcaption {
  margin-top: 7px;
  font-size: 14px;
  color: var(--muted);
}

.prose { max-width: 68ch; }
.answer-card + .prose { margin-top: 28px; }
.prose section + section, .clue-key { margin-top: 24px; }
.prose h2, .clue-key h2 { font-size: 28px; margin-bottom: 8px; }
.prose p { color: var(--text); font-size: 15.5px; line-height: 1.7; }
.prose p + p { margin-top: 12px; }

.clue-key {
  max-width: 720px;
  padding: 16px 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
}
.clue-key dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.clue-key dl > div {
  padding: 10px 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 3px;
}
.clue-key dt {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 3px;
}
.clue-key dd { font-size: 14.5px; color: #ffffff; }
.sources { margin-top: 16px; font-size: 14px; color: var(--dim); }

.rules-list {
  list-style: none;
  padding: 0;
  margin: 14px 0;
  display: grid;
  gap: 6px;
  counter-reset: step;
}
.rules-list li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
}
.rules-list li::before {
  content: counter(step);
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 3px;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  color: var(--green);
  font-weight: 700;
  font-size: 14px;
}
.rules-list strong { color: #ffffff; }

.hints-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
  padding: 8px 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
  font-size: 14px;
  color: var(--muted);
}
.hints-toolbar strong { color: #ffffff; font-variant-numeric: tabular-nums; }
.hint-stack {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 6px;
}
.hint-stack details {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
}
.hint-stack details[open] {
  border-color: var(--line-strong);
}
.hint-stack summary {
  display: flex;
  align-items: center;
  gap: 10px;
  list-style: none;
  min-height: 48px;
  padding: 8px 14px;
  cursor: pointer;
  font-weight: 700;
  color: var(--ink);
}
.hint-stack summary::-webkit-details-marker { display: none; }
.hint-stack summary .icon { margin-left: auto; color: var(--muted); }
.hint-stack details[open] summary .icon { transform: rotate(180deg); color: var(--green); }
.hint-number {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 3px;
  background: var(--bg);
  border: 1px solid var(--line);
  color: var(--green);
  font-size: 14px;
  font-weight: 700;
}
.hint-stack p {
  padding: 0 14px 14px 48px;
  color: var(--text);
  font-size: 15px;
}

.related {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
}
.note-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.note-card {
  display: flex;
  flex-direction: column;
  align-items: start;
  gap: 10px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 4px;
}
.note-card:hover { border-color: var(--line-strong); }
.note-card h2 { font-size: 28px; }
.note-card h2 a { color: #ffffff; text-decoration: none; }
.note-card h2 a:hover { color: var(--green); }
.note-card p { color: var(--muted); font-size: 14.5px; }
.note-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: auto;
  font-size: 14px;
  font-weight: 700;
  color: var(--green);
  text-decoration: none;
}
.note-link:hover { text-decoration: underline; }

/* Minimal Footer */
.foot {
  border-top: 1px solid var(--line);
  margin-top: 44px;
}
.foot-inner {
  padding-block: 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 20px;
}
.foot p {
  color: var(--dim);
  font-size: 14px;
}
.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
}
.foot nav a {
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}
.foot nav a:hover { color: #ffffff; text-decoration: underline; }

/* Modals */
dialog.flickle-dialog {
  width: min(calc(100% - 24px), 420px);
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.7);
}
dialog.flickle-dialog::backdrop {
  background: rgba(0, 0, 0, 0.75);
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.dialog-head h2 {
  font-size: 22px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}
.dialog-close {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
}
.dialog-close:hover { color: #ffffff; border-color: var(--line-strong); }
.dialog-body { padding: 16px; }
.stats-kpis {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 18px;
}
.stat-tile {
  padding: 10px 4px;
  border-radius: 4px;
  border: 1px solid var(--line);
  background: var(--bg);
  text-align: center;
}
.stat-tile strong {
  display: block;
  font: 700 24px/1.1 var(--heading);
  color: #ffffff;
  font-variant-numeric: tabular-nums;
}
.stat-tile span {
  display: block;
  margin-top: 3px;
  font-size: 14px;
  color: var(--muted);
}
.dist-title {
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 8px;
}
.dist-list {
  display: grid;
  gap: 5px;
  padding: 0;
  list-style: none;
}
.dist-row {
  display: grid;
  grid-template-columns: 16px 1fr;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.dist-track {
  background: var(--bg);
  border-radius: 3px;
  overflow: hidden;
  min-height: 22px;
  display: flex;
}
.dist-bar {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 24px;
  padding: 0 7px;
  background: #3f3f46;
  color: #ffffff;
}
.dist-bar[data-peak="true"] {
  background: var(--green-solid);
}
.stats-empty {
  margin-top: 12px;
  font-size: 14px;
  color: var(--muted);
  text-align: center;
}

/* Lightbox */
dialog.lightbox-dialog {
  width: min(calc(100% - 24px), 1060px);
  max-height: calc(100vh - 24px);
  padding: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: #0a0a0b;
}
dialog.lightbox-dialog::backdrop { background: rgba(0, 0, 0, 0.88); }
.lightbox-inner { display: grid; gap: 8px; }
.lightbox-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.lightbox-caption { font-size: 14px; color: var(--muted); }
.lightbox-img {
  width: 100%;
  max-height: calc(100vh - 100px);
  object-fit: contain;
  background: #000000;
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 20px;
  z-index: 60;
  transform: translate(-50%, 10px);
  opacity: 0;
  pointer-events: none;
  padding: 9px 16px;
  border-radius: 4px;
  background: #ffffff;
  color: #111111;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.5);
  transition: opacity 160ms ease, transform 160ms ease;
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@keyframes slotShake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  50% { transform: translateX(4px); }
  75% { transform: translateX(-2px); }
}
@keyframes slotPop {
  0% { transform: scale(0.9); }
  60% { transform: scale(1.06); }
  100% { transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 640px) {
  .answer-card, .note-grid, .clue-key dl { grid-template-columns: 1fr; }
  .icon-btn-label { display: none; }
  .icon-btn { width: 32px; padding: 0; }
  .stage-timer { display: none; }
}

@media (max-width: 520px) {
  .wrap, .wrap-wide { width: calc(100% - 20px); }
  .top-inner { height: 48px; gap: 6px; }
  .brand { font-size: 21px; gap: 6px; }
  .brand img { width: 22px; height: 22px; }
  .top nav a { height: 48px; padding: 0 7px; font-size: 14px; }
  .icon-btn { width: 30px; height: 30px; }
  .game-shell { padding-top: 10px; }
  .stage-bar { padding: 7px 10px; }
  .stage-bar h1 { font-size: 16px; }
  .guess-row { grid-template-columns: 1fr 1fr; }
  .suggest-wrap { grid-column: 1 / -1; }
  .ledger-row {
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 4px 8px;
  }
  .ledger-clue-label { grid-column: 2; }
  .stats-kpis { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 360px) {
  .brand { font-size: 19px; }
  .top nav a { padding: 0 5px; font-size: 14px; }
}
