/* Play pages. Builds on ../style.css (.aoc text look). Same palette as the homepage. */
.aoc.play { max-width: 80ch; }
.aoc.play .hidden { display: none; }
.aoc.play h3 { color: var(--bright); font-size: 1.05rem; font-weight: normal; margin: 20px 0 8px; }
.aoc.play ul { margin: 0 0 12px; padding-left: 22px; }
.aoc.play button.link {
  background: none; border: 0; padding: 0; margin: 0 12px 0 0; cursor: pointer;
  color: var(--link); font: inherit;
}
.aoc.play button.link:hover, .aoc.play button.link:focus-visible { color: var(--accent); }
.aoc.play button.link:disabled { color: var(--dim); cursor: default; }
.aoc.play input[type="text"] {
  background: var(--bg); color: var(--bright); border: 1px solid var(--line); padding: 6px 8px;
  font: inherit; width: 18ch; max-width: 100%; box-sizing: border-box;
}
.aoc.play #token-value { width: 100%; color: var(--accent); }
.aoc.play #status, .aoc.play #token-msg { min-height: 1.4em; color: var(--text); }
.aoc.play #result.good { color: var(--gold); text-shadow: 0 0 5px var(--gold); }
.aoc.play #result.bad { color: var(--red); text-shadow: 0 0 5px var(--red); }
.aoc.play .hint-text { color: var(--text); border-left: 2px solid var(--line); padding-left: 10px; }
.aoc.play pre { white-space: pre-wrap; word-break: break-word; }

/* ---- Puzzle pages: one column. Context, then shell and answer, then tips ---- */
.playpage .hidden { display: none !important; }
.playpage #load-note { margin: 0; }
.playpage #load-note:empty { display: none; }
.playpage button.link {
  background: none; border: 0; padding: 0; margin: 0 12px 0 0; cursor: pointer;
  color: var(--link); font: inherit;
}
.playpage button.link:hover, .playpage button.link:focus-visible { color: var(--accent); }
.playpage button.link:disabled { color: var(--dim); cursor: default; }
.playpage .stage-title { color: var(--bright); font-size: 1.6rem; font-weight: bold; margin: 8px 0 0; text-shadow: 0 0 5px var(--dim); overflow-wrap: anywhere; }
.playpage .stack { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.playpage .aoc { margin-top: 0; }
.playpage .aoc h2 { margin: 30px 0 10px; }
.playpage #docs > h2:first-child { margin-top: 0; }
.playpage .container { margin-top: 0; max-width: 960px; }
.playpage .aoc.play { max-width: none; }
.playpage #docs > p, .playpage #help p, .playpage #help ul { max-width: 80ch; }
.playpage .answer-bar { padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.playpage summary { color: var(--accent); font-size: 1.15rem; font-weight: bold; letter-spacing: 1px; text-transform: uppercase; cursor: pointer; margin: 26px 0 10px; }
.playpage summary::before { content: "["; }
.playpage summary::after { content: "]"; }
.playpage details > p:first-of-type { margin-top: 0; }
.playpage .term { display: flex; flex-direction: column; min-width: 0; }
.playpage .t-front { border: 1px solid var(--line); background: var(--bg); padding: 12px; min-height: 140px; display: flex; flex-direction: column; justify-content: center; }
.playpage .t-front p { margin: 0 0 12px; }
.playpage #shell { height: 60vh; min-height: 260px; max-height: 520px; margin: 0; border: 1px solid var(--line); padding: 4px; background: var(--bg); }
.playpage #shell .xterm-viewport { background-color: var(--bg) !important; }
.playpage #t-keys { font-size: 0.85rem; margin: 6px 0 0; }
.playpage .t-bar { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 2px 12px; align-items: baseline; }
.playpage .t-bar .quiet { color: var(--dim); overflow-wrap: anywhere; }
.playpage #status { margin: 6px 0 0; min-height: 1.4em; color: var(--text); }
.playpage .answer-bar p { margin: 0 0 6px; }
.playpage #next a { margin-right: 12px; }
.playpage .aoc #answer { width: 20ch; }

/* Story blocks keep their layout here: the rule above would wrap them */
.aoc.play pre.scene, .aoc.play pre.art { white-space: pre; word-break: normal; }

/* Account page. Its grids are in style.css */
.aoc pre.badge { color: var(--accent); background: none; border: 0; padding: 0; white-space: pre; overflow-x: auto;
  font: min(3.85vw, 16px)/1.25 'Courier New', monospace; text-shadow: 0 0 5px var(--link); }
