/* Shared look for the daily (index.html) and the Hard Pack (hard.html). */
/* Layout: daily-puzzle feel in its own skin: left-aligned title bar, soft card for the case, rounded answer tiles
   (green yes, amber kinda, slate no, pale slate irrelevant), circle emoji share grid. */
:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --raised: #eef1f5;
  --ink: #171a21;
  --muted: #697282;
  --line: #d9dee6;
  --accent: #171a21;
  --accent-ink: #ffffff;
  --yes: #2f9e6e;
  --partly: #e2a336;
  --no: #5d6675;
  --irr: #cdd4de;
  --irr-ink: #171a21;
  --tile-ink: #ffffff;
  --err: #c8423a;
  --font-display: "Figtree", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Figtree", "Avenir Next", "Helvetica Neue", Arial, sans-serif;
  --font-mono: var(--font-body);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --text-outline: 0 0 1px rgba(0, 0, 0, 0.7), 0 1px 1px rgba(0, 0, 0, 0.45);
  --bg: #12141a; --surface: #1a1d25; --raised: #20242d; --ink: #e6e9ef; --muted: #8e97a6; --line: #2e333e;
    --accent: #e6e9ef; --accent-ink: #12141a; --yes: #2c8a61; --partly: #c98d27; --no: #444c59;
    --irr: #5a6271; --irr-ink: #ffffff; --err: #ef6b60; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --text-outline: 0 0 1px rgba(0, 0, 0, 0.7), 0 1px 1px rgba(0, 0, 0, 0.45);
  --bg: #12141a; --surface: #1a1d25; --raised: #20242d; --ink: #e6e9ef; --muted: #8e97a6; --line: #2e333e;
  --accent: #e6e9ef; --accent-ink: #12141a; --yes: #2c8a61; --partly: #c98d27; --no: #444c59;
  --irr: #5a6271; --irr-ink: #ffffff; --err: #ef6b60; color-scheme: dark;
}
* { box-sizing: border-box; }
body { background: var(--bg); color: var(--ink); font-family: var(--font-body); font-size: 15px; line-height: 1.5; }
.app {
  max-width: 560px; margin: 0 auto; min-height: 100%;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  padding-block: 0;
  display: flex; flex-direction: column; gap: 18px;
}
header {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-block: 16px 12px;
  border-bottom: 1px solid var(--line);
}
.wordmark { font-family: var(--font-display); font-weight: 900; font-size: 1.8rem; letter-spacing: -0.02em; margin: 0; line-height: 1.1; }
.wordmark span { color: inherit; }
.dateline { font-size: 0.78rem; font-weight: 600; color: var(--muted); }
.siteurl { font-size: 0.78rem; font-weight: 700; color: var(--muted); letter-spacing: 0.01em; margin-top: 1px; }
.endsite { text-align: center; font-size: 0.85rem; font-weight: 700; color: var(--muted); margin-top: 4px; }

.pin {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50; pointer-events: none;
  transform: translateY(-110%); transition: transform 0.22s ease; padding-top: env(safe-area-inset-top, 0px);
}
.pin.show { transform: none; pointer-events: auto; }
.pin-inner {
  width: min(528px, calc(100% - 32px)); box-sizing: border-box; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-top: 0;
  border-radius: 0 0 11px 11px; padding: 10px 14px 11px; box-shadow: 0 6px 18px rgba(0,0,0,0.12); cursor: pointer;
}
.pin-story { margin: 0; font-size: 0.86rem; line-height: 1.4; font-weight: 500; }
.pin-ask { margin: 3px 0 0; font-size: 0.86rem; font-weight: 800; color: var(--yes); }
@media (prefers-reduced-motion: reduce) { .pin { transition: none; } }
.case { background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.eyebrow { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.scenario { font-weight: 500; font-size: 1.22rem; line-height: 1.45; margin: 0; text-wrap: pretty; }
.meters { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 14px; align-items: center; padding-top: 10px; border-top: 1px solid var(--line); }
.meter { display: flex; flex-direction: row; align-items: center; gap: 7px; min-width: 0; }
.meter b { font-weight: 700; font-size: 0.82rem; font-variant-numeric: tabular-nums; }
.meter small { font-size: 0.66rem; font-weight: 700; color: var(--muted); letter-spacing: 0.1em; text-transform: uppercase; }
.ticks { display: none; }
.ticks i { height: 10px; border-radius: 2px; border: 1px solid var(--line); }
.ticks i.yes, .ticks i.no, .ticks i.irrelevant, .ticks i.partly { border: 0; }
.ticks i.yes { background: var(--yes); } .ticks i.no { background: var(--no); }
.ticks i.irrelevant { background: var(--irr); } .ticks i.partly { background: var(--partly); }
.pips { display: flex; gap: 4px; }
.pips i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--line); }
.pips i.on { background: var(--yes); border-color: var(--yes); }
#guesses i.on { background: var(--ink); border-color: var(--ink); }

.log { display: flex; flex-direction: column-reverse; gap: 6px; } /* newest question on top, right under the input */
.log > .row.latest { border-color: var(--muted); }
.intro { color: var(--muted); font-size: 0.95rem; margin: 0; max-width: 56ch; }
.row { display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 12px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); }
.row .q { flex: 1; min-width: 0; overflow-wrap: anywhere; font-weight: 500; }
.row .n { font-size: 0.74rem; font-weight: 700; color: var(--muted); min-width: 1.6em; font-variant-numeric: tabular-nums; }
.row .note { display: block; font-size: 0.84rem; font-weight: 400; color: var(--muted); margin-top: 2px; }
.row.invalid { border-style: dashed; background: transparent; }
.chip {
  flex: none; min-width: 96px; text-align: center; font-weight: 800; font-size: 0.74rem; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 8px 8px; border-radius: 6px; color: var(--tile-ink); background: var(--irr); line-height: 1.2;
}
.chip.irrelevant { color: var(--irr-ink); }
.chip.yes { background: var(--yes); } .chip.no { background: var(--no); } .chip.partly { background: var(--partly); }
.chip.invalid, .chip.pending { background: transparent; color: var(--muted); border: 2px solid var(--line); padding: 6px 8px; }
.chip.pending { animation: pulse 1.2s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.35; } }
.row.guess { border: 2px solid var(--ink); }
.lockin { align-self: flex-end; margin: -2px 0 2px; border: 2px solid var(--yes); background: transparent; color: var(--yes); border-radius: 999px; padding: 7px 14px; font: inherit; font-size: 0.88rem; cursor: pointer; }
.lockin b { font-weight: 800; }
.lockin span { color: var(--muted); font-size: 0.8rem; font-weight: 600; }
.lockin:hover { background: var(--yes); color: #fff; }
.lockin:hover span { color: #fff; }
.lockin:disabled { opacity: 0.5; cursor: default; }
.row.guess .label { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); display: block; }
.chip.solved { background: var(--yes); } .chip.close { background: var(--partly); } .chip.wrong { background: var(--no); }

.composer {
  background: var(--bg); padding-block: 2px 4px;
  display: flex; flex-direction: column; gap: 8px;
}
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--raised); border-radius: 9px; }
.modes button {
  font: 700 0.92rem var(--font-body); padding: 10px 8px; border-radius: 7px; border: 0;
  background: transparent; color: var(--muted); cursor: pointer; white-space: nowrap;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
}
.mode-ico { width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 900; background: var(--line); color: var(--ink); }
.modes button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,0.12); }
#mode-guess .mode-ico { background: var(--yes); color: #fff; }
#mode-guess[aria-pressed="true"] { color: var(--yes); }
#mode-guess.nudge { animation: nudge 1.6s ease-in-out 3; color: var(--yes); }
@keyframes nudge { 0%, 100% { box-shadow: 0 0 0 0 rgba(47,158,110,0); } 50% { box-shadow: 0 0 0 4px rgba(47,158,110,0.35); } }
.modes button:disabled { opacity: 0.4; cursor: not-allowed; }
.statusrow { display: flex; align-items: flex-start; gap: 12px; }
.statusrow .status { flex: 1; min-width: 0; }
.ghost { flex: none; font: 600 0.82rem var(--font-body); padding: 2px 0; border: 0; background: transparent; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.status.hint { color: var(--yes); font-weight: 600; }
.inputrow { display: flex; gap: 8px; }
#q {
  flex: 1; min-width: 0; font: 500 1rem var(--font-body); padding: 13px 14px; border-radius: 8px;
  border: 2px solid var(--line); background: var(--bg); color: var(--ink);
}
#q::placeholder { color: var(--muted); }
#q:focus-visible { outline: none; border-color: var(--ink); }
#send {
  font: 700 0.95rem var(--font-body); padding: 0 20px; border-radius: 8px; border: 0;
  background: var(--accent); color: var(--accent-ink); cursor: pointer;
}
#send:disabled, #q:disabled { opacity: 0.4; cursor: not-allowed; }
button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.status { font-size: 0.84rem; color: var(--muted); min-height: 1.2em; margin: 0; }
.status.err { color: var(--err); }

.end { background: var(--surface); border: 1px solid var(--line); border-radius: 11px; padding: 20px 18px; display: flex; flex-direction: column; gap: 12px; align-items: center; text-align: center; }
.end h2 { font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; line-height: 1.1; margin: 0; text-wrap: balance; }
.end p { margin: 0; max-width: 52ch; }
.facts { margin: 0; padding: 0; list-style: none; color: var(--muted); font-size: 0.9rem; display: flex; flex-direction: column; gap: 2px; }
.share { font-family: var(--font-body); font-size: 1rem; white-space: pre-wrap; margin: 0; line-height: 1.35; letter-spacing: 0.04em; }
.sharecard { align-self: stretch; background: var(--raised); border-radius: 11px; padding: 16px 14px 14px; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.sharecard .copy { align-self: stretch; font-size: 1.05rem; padding: 15px 20px; }
.sharenote { font-size: 0.8rem; color: var(--muted); }
.report { margin: 4px 0 14px; font-size: 0.88rem; color: var(--muted); }
.reportrow:disabled { cursor: default; opacity: 1; }
.report summary { cursor: pointer; text-decoration: underline; }
.report .small { margin: 8px 0; }
.reportlist { display: grid; gap: 6px; margin-bottom: 10px; }
.reportrow { display: flex; justify-content: space-between; align-items: center; gap: 10px; text-align: left; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; cursor: pointer; }
.reportrow .chip { min-width: 70px; padding: 5px 6px; font-size: 0.66rem; }
.reportrow.on { outline: 2px solid var(--no, #d9534f); }
.standing { margin: -4px 0 14px; color: var(--muted); font-size: 0.95rem; }
.curve { margin: 2px auto 0; width: 100%; max-width: 420px; }
.curve svg { display: block; width: 100%; height: auto; overflow: visible; }
.cv-area { fill: var(--yes); opacity: 0.18; }
.cv-line { fill: none; stroke: var(--yes); stroke-width: 2; stroke-linejoin: round; }
.cv-axis { stroke: var(--line); stroke-width: 1; }
.cv-tick { fill: var(--muted); font: 600 8px var(--font-body); text-anchor: middle; }
.cv-you { stroke: var(--ink); stroke-width: 1.5; }
.cv-dot { fill: var(--ink); }
.cv-youtxt { fill: var(--ink); font: 800 8px var(--font-body); letter-spacing: 0.12em; text-anchor: middle; }
.cv-label { fill: var(--muted); font: 600 8.5px var(--font-body); text-anchor: middle; }
.standing.better { color: var(--ink); font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.82rem; margin: -3px 0 10px; }
.storyhead { margin-top: 12px; }
.partycard { display: flex; align-items: center; gap: 14px; margin: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 11px; background: var(--surface); color: var(--ink); text-decoration: none; text-align: left; }
.partycard:hover { border-color: var(--muted); }
.linklike { border: 0; background: none; padding: 0; color: var(--yes); font: inherit; font-weight: 800; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }
.morelink { justify-self: start; align-self: flex-start; margin: -4px 0 0; padding: 4px 2px; border: 0; background: none; color: var(--muted); font: 700 0.95rem var(--font-body); cursor: pointer; }
.morelink u { color: var(--ink); text-underline-offset: 3px; }
.morelink:hover u { color: var(--yes); }
.nextpuzzle { width: 100%; padding: 14px 16px; border: 0; border-radius: 11px; background: var(--yes); color: #fff; font: 800 1rem var(--font-body); cursor: pointer; }
.nextpuzzle:hover { filter: brightness(1.08); }
.partycard .pc-text { display: grid; gap: 2px; flex: 1; font-size: 0.9rem; }
.partycard .pc-text span { color: var(--muted); }
.filelist .hardlink { flex-basis: 100%; display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 8px; border: 1.5px solid var(--partly); background: color-mix(in srgb, var(--partly) 10%, var(--bg)); color: var(--ink); font: 700 0.9rem var(--font-body); text-decoration: none; }
.filelist .dot.hard { background: var(--partly); }
.packcard .pc-text span { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
/* The Hard Pack card uses the same gold as the Hard Pack link in the past-puzzles list */
.packcard { border: 1.5px solid var(--partly); background: color-mix(in srgb, var(--partly) 10%, var(--surface)); }
.partycard.packcard .pc-go { background: var(--partly); color: #1a1406; text-shadow: none; }
.partycard .pc-go { flex: none; background: var(--yes); color: #fff; font-weight: 700; font-size: 0.88rem; padding: 8px 14px; border-radius: 999px; }
.copy {
  font: 700 1rem var(--font-body); padding: 13px 28px; border-radius: 9px; border: 0;
  background: var(--yes); color: #ffffff; cursor: pointer;
}

.files { display: flex; flex-direction: column; gap: 8px; padding-bottom: 12px; }
.filelist { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 6px; }
.filelist button {
  font: 600 0.9rem var(--font-body); padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--bg); color: var(--ink); cursor: pointer; display: flex; gap: 9px; align-items: center; text-align: left; min-width: 0;
}
.filelist button:hover { border-color: var(--muted); }
.filelist .fl-num { flex: none; color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; min-width: 2.2em; }
.filelist .fl-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.filelist .fl-day { flex: none; font-size: 0.75rem; font-weight: 800; color: var(--yes); }
.filelist-head { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; margin: 10px 0 2px; font-size: 0.82rem; font-weight: 700; color: var(--muted); }
.filelist-head:first-child { margin-top: 2px; }
.sortbar { display: inline-flex; align-self: flex-start; gap: 4px; padding: 4px; border-radius: 9px; background: var(--raised); margin-top: 6px; }
.sortbar button { font: 700 0.86rem var(--font-body); padding: 7px 14px; border-radius: 7px; border: 0; background: none; color: var(--muted); cursor: pointer; }
.sortbar button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
/* Difficulty stars: gold filled, the rest faint */
.stars { display: inline-flex; gap: 1px; flex: none; line-height: 1; }
.stars svg { width: 13px; height: 13px; display: block; }
.stars .on { fill: var(--muted); }
.stars .off { fill: var(--line); }
.casehead { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.casehead .stars svg { width: 16px; height: 16px; }
.filelist button[aria-current="true"] { border-color: var(--ink); }
.filelist .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.filelist .dot.won { background: var(--yes); } .filelist .dot.lost { background: var(--no); } .filelist .dot.playing { background: var(--partly); }
.banner { background: var(--raised); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-size: 0.9rem; }
@media (max-width: 420px) { .scenario { font-size: 1.12rem; } .chip { min-width: 84px; } .meter small { letter-spacing: 0.05em; } .meters .meter:first-child { display: none; } .meters { justify-content: flex-start; gap: 6px 18px; } }
/* header buttons */
header { align-items: center; }
.hright { display: flex; align-items: center; gap: 8px; }
.dateline { white-space: nowrap; }
@media (max-width: 430px) { .dateline { display: none; } }
.iconbtn {
  width: 34px; height: 34px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  font: 800 1rem var(--font-body); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0;
}
/* starter questions */
.starters { display: flex; flex-wrap: nowrap; gap: 6px; align-items: center; overflow: hidden; }
.starters-label { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin-right: 2px; }
.starter {
  font: 600 0.84rem var(--font-body); padding: 7px 11px; border-radius: 999px; border: 1px dashed var(--muted);
  background: transparent; color: var(--ink); cursor: pointer;
}
/* dialogs */
dialog { border: 1px solid var(--line); padding: 0; border-radius: 14px; background: var(--surface); color: var(--ink); width: min(440px, calc(100vw - 32px)); box-shadow: 0 20px 60px rgba(0,0,0,0.25); }
dialog::backdrop { background: rgba(10, 12, 16, 0.45); }
.dlg { padding: 22px 20px 20px; display: flex; flex-direction: column; gap: 14px; }
.dlg h2 { margin: 0; font-weight: 800; font-size: 1.4rem; letter-spacing: -0.01em; }
.dlg-lead { margin: 0; font-size: 1rem; }
.dlg-note { margin: 0; font-size: 0.86rem; color: var(--muted); }
.howto { margin: 0; padding-left: 1.2em; display: flex; flex-direction: column; gap: 10px; font-size: 0.95rem; }
.mini { display: inline-block; font-weight: 800; font-size: 0.66rem; letter-spacing: 0.06em; text-transform: uppercase; padding: 3px 6px; border-radius: 4px; color: var(--tile-ink); background: var(--irr); vertical-align: 1px; }
.mini.yes { background: var(--yes); } .mini.no { background: var(--no); } .mini.partly { background: var(--partly); } .mini.irrelevant { color: var(--irr-ink); }
.statgrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.stat { border: 1px solid var(--line); background: var(--raised); border-radius: 9px; padding: 12px 14px; }
.stat.hot { border-color: var(--yes); background: color-mix(in srgb, var(--yes) 12%, var(--surface)); }
.stat.hot b { color: var(--yes); }
.stat b { display: block; font-weight: 800; font-size: 1.75rem; font-variant-numeric: tabular-nums; line-height: 1.15; }
.stat span { font-size: 0.82rem; color: var(--muted); font-weight: 600; }
.stats-note { margin: 0; font-size: 0.95rem; color: var(--muted); }
.stats-note b { color: var(--ink); }
.dlg-foot { padding-top: 12px; border-top: 1px solid var(--line); }
.plainbtn { align-self: stretch; font: 700 1rem var(--font-body); padding: 13px; border-radius: 9px; border: 1px solid var(--line); background: var(--raised); color: var(--ink); cursor: pointer; }
.plainbtn:hover { border-color: var(--muted); }
.dlg .copy { align-self: stretch; }
.subform { display: flex; flex-direction: column; gap: 12px; }
.subform label { display: flex; flex-direction: column; gap: 5px; font-size: 0.78rem; font-weight: 700; color: var(--muted); letter-spacing: 0.02em; }
.subform label span.opt { font-weight: 500; }
.subform textarea, .subform input { font: 500 0.95rem var(--font-body); color: var(--ink); background: var(--bg); border: 2px solid var(--line); border-radius: 9px; padding: 10px 12px; resize: vertical; width: 100%; box-sizing: border-box; }
.subform textarea:focus, .subform input:focus { outline: none; border-color: var(--ink); }
.subform .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.subrow { display: flex; gap: 8px; }
.subrow > * { flex: 1; }
.sublink { align-self: flex-start; background: none; border: 0; padding: 6px 0; margin-top: -14px; cursor: pointer; font: 700 0.8rem var(--font-body); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.sublink:hover { color: var(--ink); }
.endsub { background: none; border: 0; padding: 4px; cursor: pointer; font: 600 0.88rem var(--font-body); color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.endcontact { margin: 0; font-size: 0.8rem; color: var(--muted); text-align: center; }
.endcontact a { color: inherit; font-weight: 600; }
.meters .meter:first-child small { display: none; }
/* end screen extras */
.endstats { display: flex; gap: 18px; justify-content: center; font-weight: 700; font-size: 0.95rem; flex-wrap: wrap; }
.endstats span { color: var(--muted); font-weight: 600; }
.countdown { font-size: 0.92rem; color: var(--muted); }
.countdown b { color: var(--ink); font-variant-numeric: tabular-nums; }
.secondary { font: 600 0.9rem var(--font-body); padding: 10px 16px; border-radius: 9px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; }

.files summary { cursor: pointer; list-style: none; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 6px 0; display: inline-flex; align-items: center; gap: 6px; }
.files summary::-webkit-details-marker { display: none; }
.files.archive summary { display: flex; align-items: center; gap: 12px; width: 100%; box-sizing: border-box; padding: 16px; border: 1.5px solid var(--yes); border-radius: 11px; background: color-mix(in srgb, var(--yes) 10%, var(--surface)); color: var(--ink); text-transform: none; letter-spacing: 0; font-size: 1rem; font-weight: 800; }
.files.archive summary:hover { background: color-mix(in srgb, var(--yes) 18%, var(--surface)); }
.files.archive summary svg { flex: none; color: var(--yes); }
.files.archive summary::after { margin-left: auto; font-size: 1rem; color: var(--muted); }
.files summary::after { content: "▸"; font-size: 0.8rem; transition: transform 0.15s; }
.files[open] summary::after { transform: rotate(90deg); }
.files[open] .filelist { margin-top: 6px; }
.about .abouttext h3 { font-size: 0.95rem; margin: 14px 0 4px; }
.about .aboutlinks { margin-top: 16px !important; }
.about .aboutlinks a { color: var(--ink); }
.about .abouttext p { margin: 0; color: var(--muted); font-size: 0.92rem; line-height: 1.5; }
.ticks.empty { display: none; }
.confirm { border: 1px solid var(--line); background: var(--surface); border-radius: 9px; padding: 12px; display: flex; flex-direction: column; gap: 10px; }
.confirm p { margin: 0; font-weight: 600; font-size: 0.92rem; }
.confirm-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.confirm-btns button { width: 100%; }
.danger { font: 700 0.9rem var(--font-body); padding: 10px 12px; border-radius: 9px; border: 0; background: var(--ink); color: var(--bg); cursor: pointer; }
.ask { margin: -2px 0 0; font-weight: 800; font-size: 1.25rem; line-height: 1.3; color: var(--yes); }
.credit { align-self: flex-start; margin: 2px 0 0; padding: 4px 10px; border-radius: 999px; border: 1px solid var(--line); color: var(--muted); font-size: .78rem; font-weight: 600; }
.credit[hidden] { display: none; }
.links { flex: none; display: flex; gap: 14px; flex-wrap: wrap; justify-content: flex-end; }
#askfriend { color: var(--yes); }
.row.hintrow { background: transparent; border: 1px dashed var(--partly); }
.row.hintrow .label { font-size: 0.68rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--partly); display: block; }
@media (prefers-reduced-motion: reduce) { .chip.pending, #mode-guess.nudge { animation: none; } }

/* Big screens (laptops, TVs): roomier layout with larger text and the newest answer shown big. Phones keep the layout above. */
@media (min-width: 900px) {
  .app { max-width: 860px; gap: 20px; }
  .pin-inner { width: min(828px, calc(100% - 32px)); padding: 14px 20px 15px; }
  .pin-story { font-size: 1.05rem; } .pin-ask { font-size: 1.05rem; }
  .wordmark { font-size: 2.1rem; }
  .case { padding: 26px 30px; gap: 14px; border-radius: 14px; }
  .scenario { font-size: 1.6rem; line-height: 1.42; }
  .ask { font-size: 1.55rem; }
  .eyebrow { font-size: 0.8rem; }
  .log { gap: 8px; }
  .row { padding: 10px 10px 10px 16px; border-radius: 11px; }
  .row .q { font-size: 1.08rem; }
  .chip { min-width: 108px; font-size: 0.8rem; padding: 10px; }
  .log > .row.latest { padding: 18px 16px 18px 22px; border-width: 2px; border-color: var(--ink); }
  .log > .row.latest .q { font-size: 1.45rem; font-weight: 600; }
  .log > .row.latest .chip { min-width: 150px; font-size: 1.15rem; padding: 14px 16px; border-radius: 9px; }
  .log > .row.latest .n { font-size: 0.9rem; }
  #q { font-size: 1.12rem; padding: 15px 16px; }
  #send { font-size: 1.05rem; padding-inline: 24px; }
  .modes button { font-size: 1rem; }
  .meter small { font-size: 0.74rem; } .meter b { font-size: 0.95rem; } .pips i { width: 14px; height: 14px; }
}

/* Hard Pack entry, always on the daily page right under the archive */
/* The Hard Pack card uses the same gold as the Hard Pack pages. */
.packlink { --hp-gold: #9c7414; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .packlink { --hp-gold: #d9b14a; } }
:root[data-theme="dark"] .packlink { --hp-gold: #d9b14a; }
.packlink { display: flex; align-items: center; gap: 10px; margin-top: -24px; padding: 14px 16px; border: 1.5px solid var(--hp-gold); border-radius: 11px; background: color-mix(in srgb, var(--hp-gold) 9%, var(--surface)); color: var(--ink); text-decoration: none; }
.packlink:hover { background: color-mix(in srgb, var(--hp-gold) 16%, var(--surface)); }
.packlink svg { flex: none; color: var(--hp-gold); }
.packlink .pl-text { display: grid; gap: 1px; flex: 1; min-width: 0; }
.packlink .pl-text b { font-size: 1rem; font-weight: 800; }
.packlink .pl-text span { font-size: 0.86rem; color: var(--muted); font-weight: 600; }
.packlink::after { content: "▸"; color: var(--muted); font-size: 1rem; }

/* Bottom of the daily page: past puzzles, Hard Pack, then two small buttons, all 12px apart */
.morebox { display: flex; flex-direction: column; gap: 12px; }
.morebox .files { padding-bottom: 0; }
.morebox .packlink { margin-top: 0; padding: 16px; gap: 12px; }
.files.archive summary .pl-text { display: grid; gap: 1px; flex: 1; min-width: 0; }
.files.archive summary .pl-text b { font-size: 1rem; font-weight: 800; }
.files.archive summary .pl-text span { font-size: 0.86rem; color: var(--muted); font-weight: 600; }
/* Submit and About are quiet text links under the two cards, so the big boxes stay the only big boxes */
.morebtns { display: flex; justify-content: center; gap: 28px; padding-top: 4px; }
.outlinebtn { font: 600 0.92rem var(--font-body); padding: 8px 2px; border: 0; background: none; color: var(--muted); cursor: pointer; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 4px; }
.outlinebtn:hover { color: var(--ink); text-decoration-color: currentColor; }
.files.about > summary { display: none; }
.files.about[open] { margin-top: -6px; }

/* "What next" inside the end screen: the Hard Pack card and past puzzles, right under the share card */
.endnext { align-self: stretch; display: flex; flex-direction: column; gap: 10px; text-align: left; }
.endnext .morelink { margin: 0; align-self: stretch; text-align: center; padding: 13px; border: 1px solid var(--line); border-radius: 9px; background: transparent; }
.endnext .morelink:hover { border-color: var(--muted); }

/* Sponsored puzzles: a labeled chip on the card, and a quiet box after the story */
.sponsorchip { margin-top: 6px; }
.sponsorbox { margin: 18px 0 4px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 11px; text-align: left; }
.sponsorlabel { font-size: .72rem; font-weight: 700; letter-spacing: .06em; color: var(--muted); margin-bottom: 6px; }
.sponsorname { margin: 0; font-weight: 700; }
.sponsorline { margin: 4px 0 0; color: var(--muted); }
.sponsorlink { display: inline-block; margin-top: 12px; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); color: var(--ink); font-weight: 700; text-decoration: none; }
.sponsorlink:hover { border-color: var(--muted); }
.sponsorlink:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Dark mode only: a faint black outline around light text so it stays crisp (the variable is empty in light mode). */
body { text-shadow: var(--text-outline, none); }

/* Recording mode (playbackstory.app/record): only the logo and the game, for filming videos. */
.rec .hright, .rec .meters, .rec #packcard, .rec #nextpuzzle, .rec #starters, .rec #askfriend, .rec .morebox, .rec #about { display: none !important; }
.rec header { justify-content: center; }
.rec .brandbox { display: flex; flex-direction: column; align-items: center; text-align: center; margin: 0 auto; }

/* Record mode puzzle picker (tap the case line) */
.recpick { display: flex; gap: 8px; margin: 10px 0 4px; }
.recpick input { flex: 1; min-width: 0; font: inherit; padding: 8px 10px; border-radius: 9px; border: 1px solid var(--line); background: var(--raised); color: inherit; }
.recpick input::-webkit-outer-spin-button, .recpick input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.recpick input { -moz-appearance: textfield; appearance: textfield; }
.recpick button { font: inherit; font-weight: 700; padding: 8px 14px; border-radius: 9px; border: 1px solid var(--line); background: var(--raised); color: inherit; cursor: pointer; }

/* Thinner Play past puzzles card (Nov 30): one line, no subtitle */
.files.archive summary { padding: 11px 16px; }
.files.archive summary .pl-text span:empty { display: none; }
/* With the question counter gone, Tries to solve is the only meter: keep it and its label showing */
.meters .meter:only-child { display: flex !important; }
.meters .meter:only-child small { display: inline !important; }
.rec .meters .meter:only-child { display: none !important; }
/* The short line under a Kinda answer (Nov 30) */
.row .kindanote { font-size: 0.8rem; }
