/* Opaque tactical surfaces and document-flow controls from blueprint revision 3. */
:root { --story-brass:#e7bf78; --story-ink:#f5efdc; --story-panel:#162b2b; }
.decision-context { margin:1rem 0; border:1px solid #657269; border-radius:16px; background:#112628; color:var(--story-ink); padding:1rem; }
.decision-threat { display:grid; grid-template-columns:1fr 1fr; gap:.75rem 1rem; }
.decision-threat>div { display:flex; flex-direction:column; gap:.35rem; min-width:0; }
.decision-threat span { font-size:.75rem; letter-spacing:.12em; color:var(--story-brass); }
.decision-threat strong { font-size:1rem; line-height:1.5; overflow-wrap:anywhere; }
.decision-threat small,.decision-threat p { grid-column:1/-1; margin:0; font-size:.875rem; line-height:1.5; }
.decision-rule { margin:.65rem 0 0; font-size:.9rem; color:#ddd8c5; }
.voluntary-trial-panel { width:min(100%,960px); margin:1rem auto; padding:clamp(1rem,3vw,2rem); background:var(--story-panel); border:1px solid #b39460; border-radius:20px; color:var(--story-ink); }
.voluntary-trial-panel h2 { margin:.5rem 0; font:600 clamp(1.3rem,3vw,2rem)/1.3 Georgia,serif; }
.voluntary-trial-panel p,.voluntary-trial-panel summary { max-width:72ch; font-size:1rem; line-height:1.65; }
.voluntary-trial-panel summary { cursor:pointer; min-height:48px; padding:.5rem 0; }
.voluntary-trial-panel button { min-height:52px; margin-top:1rem; }
.trial-checkpoint { padding:1rem; border-left:3px solid var(--story-brass); background:#0b1d21; }
body[data-voluntary-stopped="true"] #hand-panel,body[data-voluntary-stopped="true"] #commands-panel { display:none; }
.story-company { display:flex; gap:.4rem; flex-wrap:wrap; padding:.75rem 1.5rem; background:#102525; color:#e9d7ac; font-size:.8rem; }
.story-company span { border:1px solid #52695e; border-radius:20px; padding:.3rem .6rem; }
.story-objects { margin:0; padding:1rem 1.5rem; background:#182e2d; color:#efe7d1; font-size:.95rem; line-height:1.6; }
.story-landscape .story-scene-art { width:100%; height:100%; display:block; object-fit:cover; }
.story-portrait .identity-art,.codex-portrait .identity-art { width:100%; height:100%; object-fit:cover; border-radius:12px; }
.identity-art { display:block; max-width:100%; }
.cg-hero-art>.identity-art { width:100%; height:100%; max-height:520px; object-fit:contain; object-position:center; }
.story-illustration:has(.story-scene-art) { aspect-ratio:16/9; min-height:200px; max-height:460px; }
.story-illustration:has(.story-scene-art) .story-letterbox { background:linear-gradient(transparent,#081a20ef); padding:3rem 1.5rem 1rem; }
.story-backlog { margin:.5rem 1.5rem 1rem; border-top:1px solid #577064; padding-top:.5rem; }
.story-backlog summary { cursor:pointer; min-height:48px; padding:.6rem 0; color:#e7bf78; }
.story-backlog p { font-size:1rem; line-height:1.7; padding-bottom:.75rem; }
.ending-scene-art { display:block; width:100%; aspect-ratio:16/9; object-fit:cover; border-radius:16px; margin:1rem 0; }
.ending-choice[aria-pressed="true"] { outline:3px solid #efd199; outline-offset:3px; }
.ending-confirm { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:1rem; padding:1.25rem; margin:1.25rem 0; background:#142a2a; border:1px solid #907b51; border-radius:14px; }
.ending-confirm p { flex:1 1 20rem; margin:0; font-size:1rem; line-height:1.6; }
.ending-confirm button { min-height:56px; }
#voluntary-entry-dialog p { font-size:1rem; line-height:1.65; }
#voluntary-entry-dialog .dialog-actions { flex-wrap:wrap; }
#voluntary-entry-dialog button { min-height:52px; white-space:normal; }
#voluntary-stop-shortcut { min-height:48px; white-space:normal; }
button:focus-visible,summary:focus-visible { outline:3px solid #ffdc94; outline-offset:4px; }
@media(max-width:640px) {
  .action-dock:has(#voluntary-stop-shortcut:not([hidden])) { display:grid; grid-template-columns:auto minmax(0,1fr); position:static; margin:1rem; width:auto; transform:none; }
  .action-dock:has(#voluntary-stop-shortcut:not([hidden])) .dock-context { grid-column:1/-1; }
  #voluntary-stop-shortcut:not([hidden]) { grid-column:1/-1; flex-basis:100%; }
  #dice-tray { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; }
  #dice-tray .die-wrap { min-width:0; }
  #dice-tray .die-button { min-width:68px; min-height:68px; }
  #dice-tray .die-owner,#dice-tray .die-skill,#dice-tray .die-inspect { min-height:48px; white-space:normal; }
  #dice-tray .die-name { font-size:1rem; }
  #command-list { display:flex; flex-direction:column; gap:1rem; }
  #command-list .command-row { min-width:0; }
  #command-list .command-options { grid-template-columns:1fr; }
  #command-list .command-choice { min-height:64px; white-space:normal; }
  #command-list .command-legend { flex-wrap:wrap; }
  #command-list .command-choice strong { font-size:1rem; }
  #command-list .command-choice small { font-size:.875rem; }
  .story-dialogue { gap:.8rem; }
  #story-line { font-size:1rem; line-height:1.8; }
  .story-company,.story-objects { padding-inline:1rem; }
  .story-controls { flex-wrap:wrap; position:static; }
  .story-controls button { min-height:48px; }
  .ending-choices { grid-template-columns:1fr; }
  .ending-choice { min-width:0; }
}
/* Zoomed text must be able to scroll past every actor and the commit control. */
@media(max-width:480px),(max-height:560px) {
  .action-dock,#action-dock,.decision-context { position:static; }
  .action-dock { margin:1rem; width:auto; transform:none; }
  .decision-threat { grid-template-columns:1fr; }
  .game-dialog { max-width:calc(100vw - 16px); max-height:calc(100dvh - 16px); overflow:auto; }
}
@media(prefers-reduced-motion:reduce) {
  .identity-art,.story-scene-art { animation:none!important; transition:none!important; }
}

.ending-choice.restore,.ending-choice.release { background:#142a2a; border-color:#907b51; color:#f5efdc; }
.camp-portraits { flex-wrap:wrap; }
.camp-portraits .identity-art { width:100%; height:100%; object-fit:cover; border-radius:50%; }

.cg-story-art { background:#102525; border-radius:16px; margin-block:1rem; }
.cg-story-art .identity-art { width:100%; height:360px; object-fit:contain; }
