/* Exhibition rooms. Keep the ink, paper and hierarchy of the cover throughout play. */
#game {
  --g-ink: var(--ink, #171616);
  --g-paper: var(--paper, #fff8e9);
  --g-blue: var(--blue, #252ede);
  --g-yellow: var(--yellow, #ffdc36);
  --g-pink: var(--pink, #ff55a3);
  --g-cyan: #8ce4ed;
  --g-mono: "IBM Plex Mono", "SFMono-Regular", Consolas, monospace;
  --g-look: "Arial Black", "Hiragino Kaku Gothic ProN", "Yu Gothic", Meiryo, system-ui, sans-serif;
  color: var(--g-ink);
}
#game[hidden], #game [hidden] { display: none !important; }
#game, #game *, #game *::before, #game *::after { box-sizing: border-box; }
#game button { font: inherit; cursor: pointer; touch-action: manipulation; }
#game button:disabled { cursor: default; }
#game :is(button, input, textarea, a):focus-visible {
  outline: 3px solid var(--g-blue);
  outline-offset: 4px;
}
#game .game-shell {
  width: min(100% - 64px, 1100px);
  margin-inline: auto;
  padding: 22px 0 clamp(48px, 6vw, 90px);
}
#game .game-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--g-ink);
}
#game .game-back {
  padding: 9px 4px 9px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--g-ink);
  font-size: 13px;
  font-weight: 700;
  text-underline-offset: 4px;
}
#game .game-step {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .055em;
  font-variant-numeric: tabular-nums;
}
#game .stage-head { max-width: 55rem; margin: clamp(26px, 4vw, 54px) 0 22px; }
#game .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  color: var(--g-blue);
  font-family: var(--g-mono);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: .09em;
}
#game .stage-title {
  color: var(--g-ink);
  margin: 0;
  font-family: var(--g-look);
  font-size: clamp(29px, 4.2vw, 56px);
  font-weight: 950;
  line-height: 1.24;
  letter-spacing: -.052em;
  text-wrap: balance;
  outline: 0;
}
#game .stage-intro {
  max-width: 56em;
  margin: 12px 0 0;
  font-size: clamp(14px, 1.4vw, 17px);
  line-height: 1.7;
}
#game :is(.stage-actions, .result-actions, .share-actions) {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 12px;
}
#game .stage-actions { margin: 25px 0 0; }
#game :is(.action-primary, .action-secondary, .answer-yes, .answer-no,
          .share-actions :is(button, a), .share-code-copy) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .65em;
  min-height: 48px;
  padding: 11px 23px;
  border: 2px solid var(--g-ink);
  border-radius: 0;
  box-shadow: 3px 3px var(--g-ink);
  background: var(--g-paper);
  color: var(--g-ink);
  font-weight: 800;
  line-height: 1.45;
  text-align: center;
  text-decoration: none;
}
#game .action-primary, #game .answer-yes {
  background: var(--g-blue);
  color: white;
}
#game .action-primary { min-width: min(100%, 235px); }
#game .action-primary:disabled {
  color: #655e51;
  background: #e3ddcc;
  box-shadow: none;
  border-color: #827d70;
}
#game :is(.action-primary, .action-secondary, .answer-yes, .answer-no,
          .ink-token, .share-actions :is(button, a), .share-code-copy):active:not(:disabled) {
  transform: translate(2px, 2px);
  box-shadow: 1px 1px var(--g-ink);
}

/* Each print has equal weight; only a visitor's selection gets a colored mount. */
#game .study-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 22px);
  max-width: 900px;
}
#game .study-tile {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 0;
  overflow: hidden;
  min-width: 0;
  color: var(--g-ink);
  background: var(--g-paper);
  border: 2px solid var(--g-ink);
  border-radius: 0;
  text-align: left;
}
#game :is(.study-tile, .quiz-print, .result-card, .result-prediction) img {
  display: block;
  object-fit: contain;
  width: 100%;
  height: auto;
  aspect-ratio: 1;
}
#game .study-tile img {
  border-bottom: 2px solid var(--g-ink);
  background: #eee6d8;
}
#game .tile-caption {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 6px 10px;
}
#game .tile-no {
  font-family: var(--g-mono);
  font-weight: 800;
  line-height: 1.3;
  font-size: 12px;
  letter-spacing: .045em;
  font-variant-numeric: tabular-nums;
}
#game .tile-state {
  font-size: 12px;
  font-weight: 800;
  line-height: 1.4;
  text-align: right;
}
#game .study-tile[aria-pressed="true"] {
  box-shadow: 4px 4px var(--g-ink);
}
#game .study-tile[aria-pressed="true"] .tile-caption { background: var(--g-yellow); }

/* Three ink blocks act as a short, self-paced break between gallery and quiz. */
#game .ink-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(10px, 1.8vw, 22px);
  width: min(100%, 645px);
  margin-top: clamp(22px, 4vw, 46px);
}
#game .ink-token {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  padding: 4px;
  color: var(--g-ink);
  border: 2px solid var(--g-ink);
  border-radius: 0;
  box-shadow: 4px 4px var(--g-ink);
  font-family: var(--g-look);
  font-size: clamp(43px, 8vw, 98px);
  font-weight: 950;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
#game .ink-token[data-tone="pink"] { background: var(--g-pink); }
#game .ink-token[data-tone="cyan"] { background: var(--g-cyan); }
#game .ink-token[data-tone="yellow"] { background: var(--g-yellow); }
#game .ink-token:disabled {
  box-shadow: none;
  color: #615c53;
  background: #e7e2d6;
}
#game .ink-status {
  min-height: 1.6em;
  margin: 21px 0 0;
  font-weight: 750;
  line-height: 1.6;
}

/* An image and two large decisions, with spare room for short phones. */
#game .quiz-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, .68fr);
  gap: clamp(20px, 5vw, 66px);
  align-items: center;
  max-width: 900px;
  margin-top: 16px;
}
#game .quiz-print {
  display: grid;
  place-items: center;
  margin: 0;
  border: 2px solid var(--g-ink);
  box-shadow: 5px 5px var(--g-ink);
  background: #eee6d8;
  min-width: 0;
  aspect-ratio: 1;
  position: relative;
}
#game .quiz-print img { height: 100%; }
#game .quiz-pending {
  font-size: 14px;
  font-weight: 700;
  margin: 12px;
  text-align: center;
}
#game .quiz-panel { min-width: 0; }
#game .quiz-count {
  margin: 0 0 10px;
  font: 800 clamp(18px, 2vw, 26px)/1.1 var(--g-mono);
  letter-spacing: .025em;
  font-variant-numeric: tabular-nums;
}
#game .quiz-progress {
  display: block;
  width: 100%;
  height: 8px;
  appearance: none;
  -webkit-appearance: none;
  border: 1px solid var(--g-ink);
  background: var(--g-paper);
  accent-color: var(--g-ink);
}
#game .quiz-progress::-webkit-progress-bar { background: var(--g-paper); }
#game .quiz-progress::-webkit-progress-value { background: var(--g-ink); }
#game .quiz-progress::-moz-progress-bar { background: var(--g-ink); }
#game .quiz-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 24px;
}
#game .quiz-actions button { min-height: 54px; }
#game .answer-no { background: var(--g-cyan); }
#game .quiz-actions button:disabled { box-shadow: none; opacity: .6; }

/* The revealed cards read like a small double-page exhibition catalogue. */
#game .result-lead {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(210px, .7fr);
  gap: clamp(22px, 3.5vw, 42px);
  align-items: stretch;
  margin: 0 0 20px;
}
#game .result-prediction {
  border: 2px solid var(--g-ink);
  box-shadow: 4px 4px var(--g-ink);
  min-width: 0;
  background: var(--g-yellow);
  margin: 0;
  overflow: hidden;
}
#game .prediction-copy { padding: clamp(14px, 2vw, 23px); }
#game .prediction-copy h2, #game .prediction-copy h3 {
  font: 900 clamp(18px, 2.4vw, 28px)/1.35 var(--g-look);
  letter-spacing: -.035em;
  margin: .3em 0;
}
#game .prediction-copy p { font-size: 14px; line-height: 1.65; margin: .4em 0; }
#game .prediction-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 2px solid var(--g-ink);
  background: var(--g-ink);
  gap: 2px;
}
#game .prediction-work {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin: 0;
  background: var(--g-paper);
}
#game .prediction-work img { height: auto; border-bottom: 2px solid var(--g-ink); }
#game .prediction-work figcaption {
  display: grid;
  gap: 6px;
  align-content: start;
  padding: clamp(9px, 1.5vw, 16px);
  font-size: 13px;
  line-height: 1.55;
}
#game .prediction-origin {
  width: fit-content;
  max-width: 100%;
  padding: 2px 5px;
  background: var(--g-ink);
  color: white;
  font-size: 12px;
  font-weight: 800;
}
#game .prediction-title {
  font: 900 clamp(15px, 2vw, 23px)/1.4 var(--g-look);
  letter-spacing: -.025em;
}
#game .prediction-choice { color: var(--g-ink); font-size: 13px; }
#game .result-counts {
  display: grid;
  align-self: start;
  border-top: 2px solid var(--g-ink);
  border-bottom: 2px solid var(--g-ink);
  margin: 0;
}
#game .result-counts > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 8px;
  padding: 8px 0;
}
#game .result-counts > div + div { border-top: 1px solid var(--g-ink); }
#game .result-counts dt { font-size: 13px; line-height: 1.55; font-weight: 750; }
#game .result-counts dd {
  margin: 0;
  font: 800 clamp(17px, 2vw, 23px)/1.25 var(--g-mono);
  text-align: right;
}
#game .prediction-copy .prediction-verdict { font-weight: 700; }
#game .about { margin: 0 0 24px; }
#game .intent-summary {
  padding: clamp(16px, 2.2vw, 28px);
  border: 2px solid var(--g-ink);
  box-shadow: 4px 4px var(--g-ink);
  background: var(--g-paper, #fff9ed);
}
#game .intent-summary h2 { margin: 0; font: 850 clamp(20px, 2.1vw, 26px)/1.4 var(--g-look); }
#game .intent-summary h3 { margin: 1.4em 0 .5em; font-size: 16px; }
#game .intent-summary p { margin: .8em 0 0; line-height: 1.75; }
#game .intent-ending { font-weight: 750; }
#game .result-group { margin-top: clamp(32px, 5vw, 62px); }
#game .result-group > h2, #game .share-heading {
  font: 900 clamp(21px, 3vw, 31px)/1.35 var(--g-look);
  letter-spacing: -.04em;
  margin: 0 0 14px;
}
#game .result-group > h2 { padding-bottom: 10px; border-bottom: 2px solid var(--g-ink); }
#game .result-group > p { font-size: 14px; line-height: 1.6; }
#game .result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 23px);
}
#game .result-card { min-width: 0; margin: 0; border: 2px solid var(--g-ink); background: var(--g-paper); }
#game .result-card img { border-bottom: 2px solid var(--g-ink); }
#game .result-card figcaption { padding: 11px 12px 15px; }
#game .result-verdict { display: inline-block; font-size: 12px; font-weight: 800; }
#game .result-card h3 { font-family: var(--g-look); font-size: clamp(16px, 1.85vw, 24px); line-height: 1.3; margin: 6px 0 8px; }
#game .result-intent { margin: 0; color: var(--g-blue); font-size: 12px; font-weight: 800; line-height: 1.5; }
#game .result-note { margin: 6px 0 0; font-size: 13px; line-height: 1.65; }

#game .share-area { margin-top: clamp(35px, 5vw, 66px); }
#game .share-ticket {
  padding: clamp(18px, 4vw, 36px);
  border: 2px solid var(--g-ink);
  box-shadow: 4px 4px var(--g-ink);
  background: var(--g-cyan);
}
#game .share-heading { margin-bottom: 7px; }
#game .share-lead { max-width: 48em; margin: 4px 0 18px; font-size: 14px; line-height: 1.7; }
#game .share-code-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 18px; }
#game .share-code {
  display: inline-block;
  background: var(--g-paper);
  border: 1px dashed var(--g-ink);
  font-family: var(--g-mono);
  font-weight: 800;
  font-size: 18px;
  padding: 7px 10px;
  overflow-wrap: anywhere;
}
#game .share-code-label { font-size: 13px; font-weight: 800; }
#game .share-code-copy { min-height: 42px; padding: 6px 11px; font-size: 13px; }
#game .share-actions :is(button, a) { min-height: 46px; padding: 10px 15px; font-size: 14px; }
#game .share-actions .share-x { background: var(--g-ink); color: white; }
#game .share-actions .share-png { background: var(--g-yellow); }
#game .share-status { min-height: 1.5em; margin: 9px 0 0; font-size: 13px; line-height: 1.5; }
#game .share-download { display: inline-block; color: var(--g-ink); font-weight: 750; text-underline-offset: 3px; }
#game .share-fallback { width: 100%; min-height: 65px; background: var(--g-paper); padding: 8px; color: var(--g-ink); border: 1px solid var(--g-ink); font: inherit; }
#game .result-actions { margin-top: 26px; }

@media (hover: hover) {
  #game .game-back:hover { text-decoration: underline; }
  #game .study-tile:hover { box-shadow: 3px 3px var(--g-ink); }
  #game :is(.action-primary, .action-secondary, .answer-yes, .answer-no,
            .ink-token, .share-actions :is(button, a), .share-code-copy):hover:not(:disabled) {
    box-shadow: 5px 5px var(--g-ink);
  }
}
@media (max-width: 730px) {
  #game .game-shell { width: min(100% - 36px, 630px); padding-top: 13px; }
  #game .stage-head { margin: 22px 0 18px; }
  #game .study-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; }
  #game .tile-caption { min-height: 35px; padding: 5px 7px; }
  #game .quiz-layout { display: flex; flex-direction: column; align-items: stretch; gap: 18px; max-width: 500px; }
  #game .quiz-print { width: min(100%, 480px, 47svh); align-self: center; }
  #game .quiz-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: 14px; gap: 9px; }
  #game .quiz-actions button { min-height: 48px; padding: 9px 6px; }
  #game .quiz-layout .quiz-progress { height: 6px; }
  #game .result-lead { grid-template-columns: 1fr; gap: 17px; }
  #game .result-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  #game .result-counts > div { padding: 6px 0; }
  #game .result-card figcaption { padding: 8px 8px 11px; }
  #game .result-note { font-size: 12px; }
}
@media (max-width: 370px) {
  #game .game-shell { width: calc(100% - 24px); }
  #game .stage-title { font-size: 27px; }
  #game .stage-intro { font-size: 13px; }
  #game .tile-caption { flex-wrap: wrap; min-height: 36px; }
  #game :is(.tile-no, .tile-state) { font-size: 11px; }
  #game .share-actions { display: grid; grid-template-columns: 1fr; }
  #game .prediction-copy { padding: 12px; }
  #game .prediction-work figcaption { padding: 8px 6px; gap: 4px; }
  #game .prediction-origin, #game .prediction-choice { font-size: 12px; }
  #game .ink-token { font-size: 40px; }
}
@media (forced-colors: active) {
  #game .study-tile[aria-pressed="true"] { outline: 3px solid Highlight; outline-offset: 1px; }
  #game .ink-token:disabled { color: GrayText; }
}

/* Keep the full set within one glance during the five-second viewing window. */
#game .timed-study .stage-head { margin: clamp(15px, 2.5vh, 30px) 0 10px; }
#game .timed-study .eyebrow { margin-bottom: 5px; }
#game .study-clock {
  display: inline-block;
  margin: 0 0 12px;
  padding: 4px 12px;
  color: var(--g-paper);
  background: var(--g-ink);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
#game .timed-study .study-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: min(100%, max(300px, calc(150svh - 435px)), 840px);
  max-width: 100%;
  gap: clamp(6px, 1.2vw, 14px);
}
#game .timed-study .tile-caption { min-height: 27px; padding: 3px 7px; }
#game .timed-study .tile-state { font-size: 15px; }
#game .study-print-back {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border-bottom: 2px solid var(--g-ink);
  background: repeating-linear-gradient(45deg, var(--g-cyan) 0 8px, var(--g-paper) 8px 11px);
}

#game .result-award {
  padding: clamp(16px, 3vw, 32px);
  margin: 0 0 20px;
  border: 2px solid var(--g-ink);
  box-shadow: 4px 4px var(--g-ink);
  background: var(--g-yellow);
}
#game .result-award h2 { font: 900 clamp(30px, 6vw, 62px)/1.15 var(--g-look); margin: .2em 0; }
#game .award-line { line-height: 1.65; margin: .5em 0 0; }

#game .share-x { display:inline-flex; align-items:center; justify-content:center; text-decoration:none; }
