:root { color-scheme: dark; --green: #153c32; --cream: #f4eee1; --gold: #ccb98b; --ink: #173e32; --secondary: #b6c6b9; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100svh; background: radial-gradient(ellipse at 55% 20%, #284d4140, transparent 60%), #102e29; color: var(--cream); font: 15px/1.6 Arial, 'PingFang SC', sans-serif; -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { font: inherit; cursor: pointer; border: 0; color: inherit; }
button:focus-visible, a:focus-visible, summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
a, a:visited { color: inherit; text-underline-offset: 4px; }
button:disabled { opacity: .55; cursor: default; }
[hidden] { display: none !important; }
.topbar { max-width: 1240px; margin: auto; padding: max(18px, env(safe-area-inset-top)) 28px 12px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 9px; text-decoration: none; font-size: 14px; font-weight: 600; line-height: 1.3; }
.brand img { width: 31px; height: 31px; object-fit: contain; }
.brand small { display: block; color: var(--gold); font-size: 10px; letter-spacing: 1px; margin-top: 4px; }
.topbar nav { display: flex; align-items: center; gap: 5px; }
.topbar nav a, .topbar nav button { font-size: 12px; background: transparent; text-decoration: none; padding: 10px 12px; border-radius: 7px; min-height: 42px; }
#fullscreen { border: 1px solid #ccb98b66; background: #244a3c; }
main { max-width: 1184px; margin: auto; padding: 28px 28px 15px; }
.game-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 22px; }
.game-heading h1 { font-size: 22px; letter-spacing: .5px; font-weight: 500; margin: 0; }
.game-heading > p { color: var(--secondary); font-size: 12px; margin: 0; }
.round-progress { display: flex; align-items: center; justify-content: space-between; gap: 15px; font-size: 12px; color: #c6d2c7; margin-bottom: 14px; max-width: 790px; }
#steps { display: flex; gap: 6px; }
#steps span { height: 4px; width: 38px; background: #c1d1bd2b; border-radius: 4px; }
#steps .done { background: var(--gold); }
.game-layout { display: grid; grid-template-columns: minmax(0, 1fr) 264px; gap: 26px; align-items: start; }
body[data-phase=intro] .game-layout { grid-template-columns: 1fr; }
body[data-phase=intro] .notebook { display: none; }
.surface { padding: 30px; background: var(--cream); border: 1px solid #fff7df; border-radius: 16px; box-shadow: 0 15px 45px #0002; color: var(--ink); }
.surface .kicker { font-size: 11px; color: #65715c; margin: 0 0 10px; }
.surface h2 { font-size: clamp(26px,3vw,34px); line-height: 1.35; letter-spacing: -.6px; margin: 0 0 13px; }
.surface p { margin: 9px 0; }
.lead { font-size: 18px; line-height: 1.9; }
.muted { color: #63735e; font-size: 12px; line-height: 1.8; }
.intro-surface { padding: 52px; }
.intro-layout { display: grid; grid-template-columns: 1.1fr 1fr; gap: 44px; align-items: center; }
.intro-copy h2 { font-size: clamp(32px,3.5vw,46px); line-height: 1.3; font-weight: 500; letter-spacing: -1px; margin: 14px 0 20px; }
.intro-copy .kicker { font-size: 12px; }
.intro-copy .primary { max-width: 320px; }
.source-chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 22px 0; }
.source-chips span { font-size: 11px; padding: 5px 10px; border: 1px solid #85917655; border-radius: 30px; }
.intro-art { height: 360px; position: relative; isolation: isolate; }
.mini-card { position: absolute; width: 180px; height: 270px; background: #fff9ed; border: 1px solid #d1c8b3; border-radius: 12px; box-shadow: 0 10px 22px #173e321a; display: flex; flex-direction: column; align-items: center; justify-content: center; color: var(--ink); top: 42px; left: calc(50% - 90px); }
.mini-card-0 { transform: translateX(-78px) rotate(-14deg); background: #e0e5d4; }
.mini-card-1 { transform: translateX(75px) rotate(14deg); background: #e7e0cb; }
.mini-card-2 { transform: rotate(-3deg); }
.mini-card strong { font: 100px/1 Georgia, serif; font-weight: 400; }
.mini-card small { font-size: 10px; color: #788268; letter-spacing: 3px; margin-top: 17px; }
.mini-corner { position: absolute; top: 14px; left: 14px; color: #768366; font: 24px Georgia, serif; }
.primary { width: 100%; display: block; background: var(--ink); color: #fff7e5; min-height: 48px; padding: 12px 18px; border-radius: 9px; font-weight: 600; margin-top: 23px; }
.primary:hover { background: #265544; }
.secondary { display: block; width: 100%; background: transparent; color: var(--ink); border: 1px solid #788a7166; min-height: 44px; padding: 10px 14px; border-radius: 8px; font-size: 13px; margin-top: 10px; }
.question-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 22px; }
.question-option { text-align: left; min-width: 0; width: 100%; padding: 18px; min-height: 124px; background: #fff9ed; border: 1px solid #a3ad9455; border-radius: 10px; color: var(--ink); transition: border-color .15s, background .15s; }
.question-option strong { display: block; font-size: 15px; font-weight: 600; margin-bottom: 7px; }
.question-option > span { font-size: 12px; color: #687660; line-height: 1.7; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.question-option:hover { background: #e5e9d9; border-color: #7c8d6b; }
.question-caption { font-size: 14px; line-height: 1.8; color: #60705f; padding-bottom: 20px; border-bottom: 1px solid #9fa68f55; }
.answer-quote { margin: 28px 0 34px; font-size: clamp(25px,3vw,35px); line-height: 1.7; letter-spacing: -.5px; white-space: pre-wrap; overflow-wrap: anywhere; font-weight: 500; }
.answer-note { font-size: 10px; color: #6a7864; letter-spacing: .5px; }
.guess-list { display: grid; gap: 11px; margin: 24px 0 8px; }
.guess-option { padding: 17px; border: 1px solid #89967477; border-radius: 10px; background: #fff8eb; color: var(--ink); text-align: left; display: flex; align-items: center; gap: 15px; }
.guess-symbol { width: 40px; height: 40px; flex-shrink: 0; border-radius: 50%; background: #e4e5d2; display: grid; place-items: center; font: 23px Georgia, serif; }
.guess-option strong { font-size: 20px; display: block; font-weight: 600; }
.guess-option small { font-size: 11px; color: #677660; }
.guess-option:hover { background: #e5e8d6; }
.revealed-source { font-size: clamp(32px,4vw,46px); line-height: 1.2; font-weight: 600; letter-spacing: -1.2px; margin: 14px 0 8px !important; }
.model-id { font-size: 14px; overflow-wrap: anywhere; }
.proof { padding: 13px 0; font-size: 11px; color: #677660; border-top: 1px solid #9fa68f66; border-bottom: 1px solid #9fa68f66; margin: 23px 0; white-space: pre-line; }
.comparison { margin-top: 24px; }
.comparison summary { font-size: 12px; cursor: pointer; padding: 12px 0; color: #49604d; }
.compare-question { font-size: 13px; font-weight: 600; margin: 18px 0 8px !important; }
.compare-row { background: #fef7e7; border: 1px solid #9fa68f44; border-radius: 7px; padding: 12px; margin-bottom: 8px; }
.compare-row strong { font-size: 10px; letter-spacing: 1px; color: #66735a; }
.compare-row p { font-size: 13px; line-height: 1.7; margin: 5px 0; white-space: pre-wrap; }
.notebook { position: sticky; top: 20px; }
#history { border: 1px solid #b0c0ac30; border-radius: 12px; padding: 10px 18px 16px; background: #173a3066; color: #d0dccf; }
#history summary { font-size: 12px; cursor: pointer; padding: 10px 0; color: #e0dbbe; }
#history-list article { padding: 15px 0; border-top: 1px solid #b0c0ac25; }
#history-list article:first-child { padding-top: 10px; }
#history-list h3 { font-size: 10px; line-height: 1.7; font-weight: 400; color: #a5b9aa; margin: 0 0 8px; }
#history-list p { font-size: 13px; line-height: 1.8; margin: 0; }
#history-list .notebook-empty { font-size: 12px; line-height: 1.9; color: #9fb29f; padding-top: 8px; }
footer { max-width: 1184px; margin: 0 auto; padding: 18px 28px max(28px, env(safe-area-inset-bottom)); display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; font-size: 10px; color: #aebdac; }
footer a { color: var(--gold); }
dialog { width: min(90vw,420px); border: 1px solid #ccb98b66; border-radius: 14px; padding: 24px; background: #173e32; color: var(--cream); }
dialog::backdrop { background: #0009; }
dialog .primary { background: #eee5d3; color: var(--ink); }
.no-script { padding: 22px; border: 1px solid var(--gold); border-radius: 12px; }
@media (max-width: 999px) {
  main { max-width: 760px; }
  .game-layout { grid-template-columns: 1fr; gap: 20px; }
  .notebook { position: static; }
  .intro-surface { padding: 32px; }
  .intro-layout { gap: 15px; grid-template-columns: 1.2fr .8fr; }
  .intro-art { height: 290px; }
  .mini-card { width: 135px; height: 210px; left: calc(50% - 67px); }
  .mini-card-0 { transform: translateX(-44px) rotate(-12deg); }
  .mini-card-1 { transform: translateX(42px) rotate(13deg); }
  .mini-card strong { font-size: 76px; }
  .intro-copy h2 { font-size: 32px; }
}
@media (max-width: 600px) {
  body { padding-bottom: 84px; }
  .topbar { padding: max(12px, env(safe-area-inset-top)) 18px 8px; }
  .brand { font-size: 12px; gap: 7px; }
  .brand img { width: 27px; height: 27px; }
  .brand small { font-size: 9px; }
  .topbar nav a, .topbar nav button { font-size: 11px; padding: 10px 8px; }
  main { padding: 16px 16px 10px; }
  .game-heading { margin-bottom: 16px; }
  .game-heading h1 { font-size: 19px; }
  .game-heading p { display: none; }
  .round-progress { margin-bottom: 12px; font-size: 11px; }
  #steps span { width: 29px; height: 3px; }
  .surface { padding: 23px 20px; border-radius: 13px; }
  .surface h2 { font-size: 25px; margin-bottom: 10px; }
  .surface .kicker { font-size: 10px; margin-top: 0; }
  .surface .muted { font-size: 11px; }
  .intro-surface { padding: 28px 24px; }
  .intro-layout { display: flex; flex-direction: column-reverse; gap: 10px; }
  .intro-art { width: 100%; height: 164px; }
  .mini-card { width: 100px; height: 145px; top: 8px; left: calc(50% - 50px); border-radius: 8px; }
  .mini-card-0 { transform: translateX(-52px) rotate(-15deg); }
  .mini-card-1 { transform: translateX(50px) rotate(13deg); }
  .mini-card strong { font-size: 53px; }
  .mini-card small { font-size: 7px; margin-top: 7px; letter-spacing: 1px; }
  .mini-corner { font-size: 16px; top: 9px; left: 9px; }
  .intro-copy h2 { font-size: 29px; margin: 8px 0 13px; }
  .lead { font-size: 15px; line-height: 1.8; }
  .source-chips { gap: 5px; margin: 17px 0; }
  .source-chips span { font-size: 10px; padding: 4px 8px; }
  .stage-action { position: fixed; left: 16px; right: 16px; bottom: max(12px, env(safe-area-inset-bottom)); z-index: 5; width: calc(100% - 32px); max-width: none !important; margin: 0; min-height: 50px; box-shadow: 0 0 0 8px #102e29, 0 0 0 12px #102e29ee, 0 -12px 25px #102e2925; border: 1px solid #6f8c70; }
  .question-list { gap: 8px; margin-top: 18px; }
  .question-option { padding: 13px 11px; min-height: 104px; border-radius: 8px; }
  .question-option strong { font-size: 13px; line-height: 1.4; margin-bottom: 7px; }
  .question-option > span { font-size: 11px; line-height: 1.6; }
  .question-caption { font-size: 12px; line-height: 1.8; padding-bottom: 18px; }
  .answer-quote { font-size: clamp(23px,6.5vw,29px); line-height: 1.75; margin: 24px 0 29px; }
  body[data-phase=answer] .surface { min-height: 340px; }
  .guess-option { padding: 14px; gap: 12px; }
  .guess-option strong { font-size: 18px; }
  .guess-symbol { width: 35px; height: 35px; font-size: 21px; }
  .revealed-source { font-size: 34px; }
  .model-id { font-size: 13px; }
  #history { padding: 7px 15px 12px; }
  #history summary { font-size: 11px; }
  #history-list p { font-size: 13px; }
  footer { padding: 17px 20px 22px; font-size: 9px; }
}
@media (max-width: 360px) {
  .topbar { padding-left: 14px; padding-right: 14px; }
  .brand { font-size: 11px; gap: 5px; }
  .brand img { width: 24px; height: 24px; }
  .topbar nav a, .topbar nav button { padding: 9px 6px; font-size: 10px; }
  main { padding: 12px 12px 8px; }
  .surface { padding: 20px 16px; }
  .surface h2 { font-size: 23px; }
  .intro-copy h2 { font-size: 25px; }
  .question-option { padding: 11px 9px; min-height: 106px; }
  .question-option strong { font-size: 12px; }
  .question-option > span { font-size: 10px; }
  .question-list { gap: 7px; }
  .answer-quote { font-size: 23px; }
  .revealed-source { font-size: 30px; }
}
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
/* Sprint 2: decisions first, provenance when wanted. */
#steps .current { background: #ccb98b77; }
.your-choice { color: #6a7864; font-size: 12px; }
.reveal-identity { display: flex; align-items: center; gap: 18px; padding: 22px 0 16px; }
.reveal-identity > div { min-width: 0; }
.source-seal { display: grid; place-items: center; width: 64px; height: 76px; border: 1px solid #9da88b; border-radius: 10px; background: #e3e8d4; color: var(--ink); font: 40px Georgia, serif; flex-shrink: 0; }
.reveal-identity .revealed-source { font-size: clamp(29px,3vw,41px); margin: 0 0 6px !important; }
.reveal-identity .model-id { margin: 0; color: #65735c; }
.result-correct h2 { color: #245d3d; }
.session-score { font-size: 12px; padding: 12px 14px; background: #e5e8d8; border-radius: 7px; color: #405b3e; }
.replay-note { font-size: 11px; color: #6a7864; margin-top: 12px !important; line-height: 1.7; }
.source-details { border-top: 1px solid #9fa68f44; margin-top: 12px; }
.source-details summary { color: #64755b; font-size: 12px; padding: 14px 0; cursor: pointer; }
.source-details .proof { margin: 0; padding: 8px 0 14px; border-top: 0; }
.source-details .muted { font-size: 11px; }
.secondary { text-align: center; text-decoration: none; }
.guess-recap { display: none; }
@media (max-width: 999px) {
  .guess-recap { display: block; margin: 16px 0 8px; border: 1px solid #9fa68f66; border-radius: 8px; padding: 0 14px; }
  .guess-recap summary { font-size: 12px; padding: 12px 0; color: #49604d; cursor: pointer; }
  .recap-clue { padding: 12px 0; border-top: 1px solid #9fa68f44; }
  .recap-clue strong { font-size: 10px; color: #6b775f; }
  .recap-clue p { font-size: 14px; line-height: 1.8; }
}
@media (max-width: 600px) {
  body[data-phase=pick], body[data-phase=guess] { padding-bottom: 20px; }
  body[data-phase=answer] .surface { padding-bottom: 35px; }
  .answer-note { padding-bottom: 8px; }
  .reveal-identity { gap: 13px; padding: 16px 0 13px; }
  .source-seal { width: 45px; height: 57px; font-size: 30px; border-radius: 7px; }
  .reveal-identity .revealed-source { font-size: 28px; }
  .replay-note { font-size: 10px; }
  .result-surface .primary { margin-top: 15px; }
}
@media (max-width: 999px) and (max-height: 550px) and (orientation: landscape) {
  body { padding-bottom: 80px; }
  body[data-phase=pick], body[data-phase=guess] { padding-bottom: 16px; }
  .topbar { padding-top: 10px; padding-bottom: 6px; }
  main { padding-top: 12px; }
  .game-heading { margin-bottom: 12px; }
  .game-heading h1 { font-size: 20px; }
  .game-heading > p { font-size: 11px; }
  .surface { padding: 23px; }
  .surface h2 { font-size: 26px; }
  .stage-action { position: fixed; left: 16px; right: 16px; bottom: max(10px,env(safe-area-inset-bottom)); width: calc(100% - 32px); z-index: 5; margin: 0; min-height: 48px; max-width: none !important; box-shadow: 0 0 0 7px #102e29, 0 -10px 22px #102e2933; border: 1px solid #6f8c70; }
  .question-list { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; margin-top: 14px; }
  .question-option { min-height: 100px; padding: 12px; }
  .question-option strong { font-size: 13px; }
  .question-option > span { font-size: 11px; }
  .answer-quote { font-size: 26px; margin: 20px 0; }
}
/* Keep the reveal identity above the action on short landscape screens. */
@media (max-width: 999px) and (max-height: 550px) and (orientation: landscape) {
  body[data-phase=reveal] .game-heading,
  body[data-phase=reveal] .round-progress { display: none; }
  .result-surface { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr); column-gap: 24px; padding: 20px; }
  .result-surface > * { grid-column: 1 / -1; }
  .result-surface .kicker { grid-column: 1; grid-row: 1; margin-bottom: 5px; }
  .result-surface h2 { grid-column: 1; grid-row: 2; font-size: 25px; margin-bottom: 5px; }
  .result-surface .your-choice { grid-column: 1; grid-row: 3; margin: 0; }
  .result-surface .reveal-identity { grid-column: 2; grid-row: 1 / 4; padding: 0; gap: 12px; align-self: center; }
  .result-surface .source-seal { width: 44px; height: 54px; font-size: 28px; }
  .result-surface .revealed-source { font-size: 27px; }
  .result-surface .model-id { font-size: 12px; }
  .result-surface .session-score { padding: 8px 12px; margin: 14px 0 0; }
  .result-surface .replay-note { margin: 9px 0 0 !important; }
  .result-surface .comparison { margin-top: 8px; }
}
