/* Phone-first, portrait. On a wide screen the game sits in a phone-width column. */
@font-face { font-family: 'Dela Gothic One'; src: url('fonts/dela-latin.woff2') format('woff2'); font-display: swap; }
@font-face { font-family: 'Zen Kaku Gothic New'; src: url('fonts/zen-latin.woff2') format('woff2'); font-display: swap; }
:root {
  --ink: #0e0f17; --night: #161827; --panel: #1f2236; --raised: #2a2e46; --divider: #3a3f5c;
  --text-color: #f3efe6; --secondary: #c5c3d6; --muted: #9a98b0;
  --accent: #ee3d2f; --accent-text: #ff877b; --gold: #f2c14e; --success: #6fd3c7;
  --bg: var(--night); --bg2: var(--ink); --line: var(--ink); --red: var(--accent); --green: var(--success);
  --blue: var(--secondary); --paper: var(--panel); --paper-ink: var(--text-color);
  --display: 'Dela Gothic One', Impact, sans-serif; --title: var(--display);
  --text: 'Zen Kaku Gothic New', system-ui, sans-serif; --box-h: 116px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
html { color-scheme: dark; scroll-padding-bottom: 24px; }
body {
  background: var(--ink);
  color: var(--text-color);
  font: 500 16px/1.45 var(--text);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { touch-action: manipulation; }
button:focus-visible, summary:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--gold); outline-offset: 4px;
}
:disabled { cursor: not-allowed; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
#app {
  max-width: 480px; min-height: 100vh; min-height: 100svh; margin: 0 auto; position: relative; overflow-x: clip;
  background: radial-gradient(circle at 50% 0%, var(--raised) 0%, var(--bg) 60%) var(--bg);
}
@media (min-width: 520px) {
  body { background: repeating-linear-gradient(135deg, var(--ink) 0 18px, var(--ink) 18px 36px); }
  #app { box-shadow: 0 0 0 2px var(--panel), 0 30px 80px rgb(from var(--ink) r g b / 0.7); }
}
.hidden { display: none !important; }
.center { text-align: center; }

.screen { display: none; padding: 16px 16px calc(24px + env(safe-area-inset-bottom)); animation: fade-in 0.3s ease; }
.screen.active { display: block; }
@keyframes fade-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- buttons ---------- */
.btn {
  min-height: 48px; border: 3px solid var(--line); border-radius: 14px; cursor: pointer;
  background: linear-gradient(180deg, var(--secondary), var(--muted)); color: var(--text-color); font-weight: 800; padding: 10px 18px;
  box-shadow: 0 4px 0 var(--line), inset 0 2px 0 rgb(from var(--text-color) r g b / 0.55);
  transition: transform 0.08s, box-shadow 0.08s, filter 0.15s;
}
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--line), inset 0 2px 0 rgb(from var(--text-color) r g b / 0.55); }
.btn:disabled { filter: grayscale(0.8) brightness(0.7); cursor: not-allowed; transform: none; }
.btn.big { font-family: var(--title); font-weight: 400; font-size: 1.1rem; padding: 12px 20px; width: 100%; }
.btn.small { min-height: 44px; padding: 6px 14px; font-size: 0.95rem; }
.btn.ghost { background: var(--panel); color: var(--text-color); box-shadow: 0 4px 0 var(--line); }
.icon-btn { display: grid; place-items: center; min-width: 44px; min-height: 44px; background: none; border: 0; border-radius: 8px; cursor: pointer; font-size: 1.15rem; padding: 6px; }
.icon-btn[aria-pressed="true"] { color: var(--gold); background: rgb(from var(--text-color) r g b / 0.12); }

/* ---------- title ---------- */
#screen-title { padding: 0; }
.title-wrap {
  position: relative; isolation: isolate; overflow: hidden; min-height: 100vh; min-height: 100svh; padding: max(16px, env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; justify-content: center; text-align: center; gap: 4px;
}
.title-wrap::before {
  content: ''; position: absolute; inset: -40%; z-index: -1; opacity: 0.55;
  background: repeating-conic-gradient(from 0deg at 50% 50%, rgb(from var(--text-color) r g b / 0.16) 0 5deg, transparent 5deg 12deg);
  animation: spin 40s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.parade { display: flex; justify-content: center; margin: 0 -16px 6px; height: 108px; overflow: hidden; }
.parade .face { flex: 0 0 92px; margin: 0 -8px; animation: bob 2.4s ease-in-out infinite; }
.parade .face:nth-child(odd) { animation-delay: -1.2s; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
.logo { margin: 0 0 6px; line-height: 0.92; }
.logo span { display: block; }
.logo .l1 { font-family: var(--title); font-weight: 400; font-size: clamp(2.3rem, 12vw, 3.4rem); color: var(--gold); text-shadow: 3px 3px 0 var(--line), 0 0 24px rgb(from var(--text-color) r g b / 0.4); }
.logo .l2 { font-family: var(--display); font-weight: 400; font-size: 1.6rem; color: var(--muted); }
.logo .l3 {
  font-family: var(--display); font-weight: 400; font-size: clamp(5rem, 30vw, 7.5rem); color: var(--red); letter-spacing: 3px;
  -webkit-text-stroke: 4px var(--line); paint-order: stroke fill; text-shadow: 6px 6px 0 var(--line); transform: rotate(-5deg) skewX(-6deg);
}
.eyebrow { color: var(--gold); font-size: 0.68rem; font-weight: 800; text-transform: uppercase; letter-spacing: 1.6px; margin: 0 0 12px; }
.tagline { color: var(--text-color); font-size: 1rem; margin: 12px auto 22px; max-width: 22em; }
.court-guide { margin: 16px 0 0; text-align: left; background: rgb(from var(--ink) r g b / 0.7); border: 1px solid var(--divider); border-radius: 12px; }
.court-guide summary { cursor: pointer; padding: 12px 14px; color: var(--gold); font-size: 0.88rem; font-weight: 800; }
.court-guide ol { margin: 0; padding: 0 18px 0 36px; }
.court-guide li { margin-bottom: 10px; padding-left: 2px; font-size: 0.86rem; color: var(--muted); }
.court-guide b { color: var(--text-color); }
.court-guide p { border-top: 1px solid var(--divider); margin: 12px 14px 0; padding: 10px 0 12px; color: var(--muted); font-size: 0.76rem; }
.mode { color: var(--muted); font-size: 0.76rem; line-height: 1.55; margin: 14px auto 0; max-width: 34em; }
.mode.demo { color: var(--secondary); }

/* ---------- shared screen bits ---------- */
.screen-head { text-align: center; margin: 4px 0 14px; }
.screen-head h2 { font-family: var(--title); font-weight: 400; font-size: 1.65rem; margin: 0; color: var(--gold); text-shadow: 3px 3px 0 var(--line); }
.screen-head p { margin: 4px 0 0; color: var(--muted); font-size: 0.95rem; }
.panel { background: var(--panel); border: 3px solid var(--line); border-radius: 18px; padding: 14px; margin-bottom: 14px; box-shadow: 0 6px 0 var(--line); }
.hint { margin: 0 0 10px; color: var(--muted); font-size: 0.82rem; text-align: center; }

/* ---------- character creation ---------- */
.look-panel { text-align: center; }
.mugshot {
  width: 190px; aspect-ratio: 1 / 1.05; border: 3px solid var(--line); border-radius: 14px; cursor: pointer; padding: 8px 8px 0; overflow: hidden;
  background: repeating-linear-gradient(180deg, transparent 0 26px, rgb(from var(--text-color) r g b / 0.3) 26px 28px), linear-gradient(180deg, var(--secondary), var(--muted));
}
.mugshot svg { width: 100%; height: 100%; display: block; }
.mug-plate {
  width: 210px; margin: -10px auto 8px; position: relative; background: var(--ink); color: var(--text-color); border: 2px solid var(--line);
  font-family: var(--title); font-size: 0.82rem; letter-spacing: 1px; padding: 5px 8px; border-radius: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.look-rows { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 10px; }
.look-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; min-height: 44px; background: var(--bg2); border: 2px solid var(--line); border-radius: 12px; }
.look-row button { background: none; border: 0; cursor: pointer; height: 100%; color: var(--gold); font-size: 0.95rem; }
.look-row span { font-size: 0.8rem; line-height: 1.15; overflow: hidden; text-overflow: ellipsis; }
.look-row b { display: block; color: var(--muted); font-weight: 700; font-size: 0.68rem; }
.swatch { display: inline-block; width: 16px; height: 16px; border-radius: 50%; vertical-align: -3px; border: 2px solid rgb(from var(--text-color) r g b / 0.7); }
#btn-random-look { width: 100%; }

.form-panel { display: grid; gap: 12px; }
.form-panel h3 { margin: 6px 0 0; font-family: var(--title); font-weight: 400; font-size: 1.25rem; color: var(--gold); }
.form-panel label { min-width: 0; display: grid; gap: 4px; font-weight: 800; font-size: 0.88rem; color: var(--muted); }
.form-panel input, .form-panel select, .form-panel textarea {
  width: 100%; min-height: 46px; background: var(--bg2); border: 2px solid var(--divider); border-radius: 12px; padding: 10px 12px; color: var(--text-color); font-size: 16px; font-weight: 700;
}
.form-panel textarea { resize: vertical; line-height: 1.5; min-height: 160px; }
::placeholder { color: var(--secondary); opacity: 1; }
.form-panel input:focus, .form-panel select:focus, .form-panel textarea:focus { outline: none; border-color: var(--gold); }
.row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.field-hint { color: var(--muted); font-size: 0.78rem; line-height: 1.55; margin: -4px 0 0; }
.form-actions { display: grid; gap: 12px; }
.form-error { color: var(--secondary); margin: 0; min-height: 1.2em; font-weight: 800; }

/* ---------- jury selection ---------- */
.jury-cards { display: grid; gap: 10px; margin-bottom: 14px; }
.jcard {
  position: relative; display: grid; grid-template-columns: 76px 1fr; gap: 12px; align-items: center; min-height: 92px;
  background: linear-gradient(180deg, var(--paper), var(--secondary)); color: var(--paper-ink); border: 3px solid var(--line); border-radius: 16px; padding: 8px 10px; box-shadow: 0 4px 0 var(--line);
}
.jcard .num { position: absolute; top: -10px; left: -6px; z-index: 1; background: var(--gold); border: 2px solid var(--line); border-radius: 999px; padding: 0 8px; font-family: var(--display); font-size: 1rem; }
.jcard .face { width: 76px; height: 76px; border-radius: 12px; overflow: hidden; border: 2px solid var(--line); background: linear-gradient(180deg, var(--secondary), var(--muted)); }
.jcard .face svg { width: 100%; height: 100%; transform: scale(1.45) translateY(14%); }
.jcard h4 { margin: 0; font-size: 1rem; line-height: 1.25; padding-right: 64px; overflow-wrap: anywhere; }
.jcard .meta { font-size: 0.78rem; color: var(--divider); font-weight: 800; }
.jcard .quote { font-size: 0.85rem; font-weight: 700; color: var(--divider); margin-top: 2px; }
.jcard .details { opacity: 0; transition: opacity 0.3s; }
.jcard.revealed .details { opacity: 1; }
.jcard.spinning { animation: wobble 0.25s infinite; }
@keyframes wobble { 0%, 100% { transform: rotate(-0.6deg); } 50% { transform: rotate(0.6deg); } }
.strike-btn {
  position: absolute; top: 8px; right: 8px; min-height: 44px; border: 2px solid var(--line); border-radius: 999px; background: var(--divider); color: var(--text-color);
  font-weight: 800; padding: 4px 12px; cursor: pointer; font-size: 0.8rem; box-shadow: 0 2px 0 var(--line);
}
.sticky-action { position: sticky; bottom: 0; padding: 12px 0 calc(12px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, transparent, var(--bg) 30%); }

/* ---------- courtroom ---------- */
#screen-court { padding: 0; }
.court { display: flex; flex-direction: column; min-height: 100vh; min-height: 100svh; }
.court-top {
  flex: 0 0 auto; min-height: calc(46px + env(safe-area-inset-top)); display: flex; align-items: center; justify-content: space-between; padding: env(safe-area-inset-top) 6px 0 14px;
  background: linear-gradient(180deg, var(--panel), var(--ink)); border-bottom: 3px solid var(--line);
}
.phase { min-width: 0; font-family: var(--title); font-size: 0.76rem; letter-spacing: 1px; color: var(--gold); }
.top-right { flex-shrink: 0; display: flex; align-items: center; gap: 4px; }
.obj-count { font-size: 0.82rem; font-weight: 800; color: var(--secondary); }

.scene { position: relative; flex: 1 1 auto; min-height: max(300px, calc(var(--dialogue-h, var(--box-h)) + 116px)); overflow: hidden; background: var(--ink); cursor: pointer; touch-action: manipulation; user-select: none; }
.scene.shake { animation: shake 0.42s; }
@keyframes shake { 0%, 100% { transform: none; } 15% { transform: translate(-9px, 4px); } 35% { transform: translate(8px, -5px); } 55% { transform: translate(-6px, 3px); } 75% { transform: translate(4px, -2px); } }
.stage { position: absolute; inset: 0; overflow: hidden; }
.stage-bg { position: absolute; inset: 0; transition: filter 0.15s; }
.stage.pan .stage-bg, .stage.pan .desk { animation: pan 0.26s ease-out; }
@keyframes pan { from { transform: translateX(var(--pan, 30%)); opacity: 0.6; } to { transform: none; filter: none; } }

/* backgrounds: warm wood for the defence, the same room hue-shifted for the prosecution */
.role-defense .stage-bg, .role-prosecutor .stage-bg {
  background:
    linear-gradient(180deg, rgb(from var(--ink) r g b / 0.5) 0, transparent 22%, transparent 58%, rgb(from var(--ink) r g b / 0.4) 100%),
    radial-gradient(ellipse 55% 42% at 50% 40%, rgb(from var(--text-color) r g b / 0.5), transparent 72%),
    linear-gradient(90deg, var(--raised) 0 6%, var(--divider) 6% 7%, var(--raised) 7% 13%, var(--panel) 13% 13.6%, transparent 13.6% 86.4%, var(--panel) 86.4% 87%, var(--raised) 87% 93%, var(--divider) 93% 94%, var(--raised) 94%),
    linear-gradient(180deg, transparent 0 14%, var(--panel) 14% 16%, var(--muted) 16% 16.6%, transparent 16.6%),
    repeating-linear-gradient(90deg, var(--muted) 0 15%, var(--divider) 15% 15.5%, var(--secondary) 15.5% 16%),
    var(--muted);
}
.role-prosecutor .stage-bg { filter: hue-rotate(160deg) saturate(0.55) brightness(0.92); }
.role-judge .stage-bg {
  background:
    linear-gradient(180deg, rgb(from var(--ink) r g b / 0.55), transparent 25%, transparent 70%, rgb(from var(--ink) r g b / 0.45)),
    linear-gradient(var(--raised), var(--panel)) 50% 6% / min(58%, 230px) auto no-repeat,
    radial-gradient(ellipse 65% 48% at 50% 22%, rgb(from var(--text-color) r g b / 0.45), transparent 70%),
    repeating-linear-gradient(90deg, var(--raised) 0 11%, var(--panel) 11% 11.6%, var(--raised) 11.6% 12%),
    var(--raised);
}
.role-jury .stage-bg {
  background:
    linear-gradient(180deg, rgb(from var(--ink) r g b / 0.45), transparent 25%, transparent 60%, rgb(from var(--ink) r g b / 0.35)),
    radial-gradient(ellipse 55% 45% at 50% 40%, rgb(from var(--text-color) r g b / 0.35), transparent 72%),
    linear-gradient(180deg, transparent 0 12%, var(--raised) 12% 14%, transparent 14%),
    repeating-linear-gradient(90deg, var(--divider) 0 24%, var(--divider) 24% 25%, var(--divider) 25% 25.6%),
    var(--divider);
}
.role-witness .stage-bg {
  background:
    linear-gradient(180deg, rgb(from var(--ink) r g b / 0.45), transparent 25%, transparent 60%, rgb(from var(--ink) r g b / 0.35)),
    radial-gradient(ellipse 55% 45% at 50% 40%, rgb(from var(--text-color) r g b / 0.45), transparent 72%),
    linear-gradient(90deg, transparent 0 18%, rgb(from var(--ink) r g b / 0.18) 18% 30%, transparent 30% 70%, rgb(from var(--ink) r g b / 0.18) 70% 82%, transparent 82%),
    repeating-linear-gradient(90deg, var(--divider) 0 12%, var(--divider) 12% 12.6%, var(--muted) 12.6% 13%),
    var(--divider);
}
.role-room .stage-bg {
  background:
    linear-gradient(180deg, rgb(from var(--ink) r g b / 0.35), transparent 30%),
    linear-gradient(180deg, transparent 0 10%, var(--text-color) 10% 11%, var(--secondary) 11% 44%, var(--text-color) 44% 45%, transparent 45%) 72% 0 / 34% 100% no-repeat,
    linear-gradient(90deg, transparent 0 49.4%, var(--text-color) 49.4% 50.6%, transparent 50.6%) 72% 10% / 34% 35% no-repeat,
    repeating-linear-gradient(90deg, var(--divider) 0 8%, var(--raised) 8% 16%),
    var(--divider);
}

.speed {
  position: absolute; inset: -40%; z-index: 1; opacity: 0; pointer-events: none;
  background: repeating-conic-gradient(from 0deg at 50% 50%, rgb(from var(--text-color) r g b / 0.9) 0 1.4deg, transparent 1.4deg 8deg);
  -webkit-mask: radial-gradient(circle at 50% 50%, transparent 16%, var(--ink) 48%);
  mask: radial-gradient(circle at 50% 50%, transparent 16%, var(--ink) 48%);
}
.stage.dramatic .speed { opacity: 0.75; animation: speed 0.24s steps(3) infinite; }
@keyframes speed { to { transform: rotate(8deg); } }
.stage.dramatic .stage-bg { filter: brightness(0.5) saturate(1.4) sepia(0.5) hue-rotate(-30deg); }
.stage.dramatic.tone-blue .stage-bg { filter: brightness(0.5) saturate(1.3) sepia(0.4) hue-rotate(180deg); }

.sprite {
  position: absolute; left: 50%; bottom: calc(var(--dialogue-h, var(--box-h)) - 14px); z-index: 2;
  height: calc(100% - var(--dialogue-h, var(--box-h)) + 4px); max-height: 470px; max-width: 100%; aspect-ratio: 200 / 222; transform: translateX(-50%);
  filter: drop-shadow(0 6px 10px rgb(from var(--ink) r g b / 0.45));
}
.sprite svg { width: 100%; height: 100%; display: block; }
.sprite.flip svg { transform: scaleX(-1); }
.sprite.enter { animation: sprite-in 0.24s ease-out; }
@keyframes sprite-in { from { opacity: 0; transform: translateX(-50%) translateY(12px); } to { opacity: 1; transform: translateX(-50%); } }
.sprite.bounce { animation: bounce 0.3s ease; }
@keyframes bounce { 0%, 100% { transform: translateX(-50%) translateY(0); } 40% { transform: translateX(-50%) translateY(-8px); } }
.sprite.jolt { animation: jolt 0.4s cubic-bezier(0.2, 1.8, 0.4, 1); }
@keyframes jolt { 0% { transform: translateX(-50%) scale(1); } 30% { transform: translateX(-50%) translateY(-14px) scale(1.06); } 100% { transform: translateX(-50%) scale(1); } }
.sprite.lunge { animation: lunge 0.35s cubic-bezier(0.2, 1.6, 0.4, 1); }
@keyframes lunge { 0% { transform: translateX(-50%) scale(0.9); } 50% { transform: translateX(-50%) scale(1.1); } 100% { transform: translateX(-50%) scale(1); } }

.portrait .m-talk { opacity: 0; }
.sprite.talking .m-talk { animation: talk-open 0.24s steps(1) infinite; }
.sprite.talking .m-shut { animation: talk-shut 0.24s steps(1) infinite; }
@keyframes talk-open { 0% { opacity: 1; } 50% { opacity: 0; } }
@keyframes talk-shut { 0% { opacity: 0; } 50% { opacity: 1; } }
.portrait .blink { opacity: 0; animation: blink 4.6s infinite; }
.mini .portrait .blink, .jcard .portrait .blink { animation: none; }
@keyframes blink { 0%, 95%, 100% { opacity: 0; } 95.5%, 98.5% { opacity: 1; } }

.desk {
  position: absolute; left: -3%; right: -3%; bottom: 0; z-index: 3; height: calc(var(--dialogue-h, var(--box-h)) + 26px);
  background:
    repeating-linear-gradient(90deg, transparent 0 24%, rgb(from var(--ink) r g b / 0.2) 24% 24.6%, rgb(from var(--text-color) r g b / 0.08) 24.6% 25%),
    linear-gradient(180deg, var(--secondary) 0 6px, var(--divider) 6px 11px, var(--raised) 11px, var(--raised));
  border-top: 3px solid var(--line);
}
.role-prosecutor .desk { filter: hue-rotate(160deg) saturate(0.5); }
.role-judge .desk {
  height: calc(var(--dialogue-h, var(--box-h)) + 40px);
  background: linear-gradient(180deg, var(--divider) 0 7px, var(--panel) 7px 12px, var(--panel) 12px);
}
.role-jury .desk {
  height: calc(var(--dialogue-h, var(--box-h)) + 34px); border-top: 0;
  background:
    linear-gradient(180deg, var(--muted) 0 8px, var(--raised) 8px 11px, transparent 11px),
    repeating-linear-gradient(90deg, transparent 0 16px, var(--divider) 16px 22px, var(--raised) 22px 25px, transparent 25px 40px);
}
.role-witness .desk { left: 24%; right: 24%; border: 3px solid var(--line); border-bottom: 0; border-radius: 16px 16px 0 0; }
.role-room .desk { height: calc(var(--dialogue-h, var(--box-h)) + 18px); background: linear-gradient(180deg, var(--secondary) 0 10px, var(--muted) 10px); }

.flash { position: absolute; inset: 0; z-index: 12; background: var(--text-color); opacity: 0; pointer-events: none; }
.flash.on { animation: flash 0.35s ease-out; }
@keyframes flash { from { opacity: 0.95; } to { opacity: 0; } }

.dialogue {
  position: absolute; left: 8px; right: 8px; bottom: 8px; z-index: 6; max-height: 320px; max-height: min(45svh, 320px); overflow-y: auto; overscroll-behavior: contain; min-height: calc(var(--box-h) - 16px); padding: 16px 16px 12px;
  background: linear-gradient(180deg, rgb(from var(--ink) r g b / 0.93), rgb(from var(--ink) r g b / 0.95));
  border: 2px solid var(--text-color); border-radius: 12px;
  box-shadow: 0 0 0 2px var(--line), inset 0 0 0 2px rgb(from var(--ink) r g b / 0.35), 0 8px 24px rgb(from var(--ink) r g b / 0.5);
}
.nameplate {
  position: relative; display: table; margin: -8px 0 8px; padding: 2px 12px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-family: var(--title); font-size: 0.82rem; letter-spacing: 0.5px; color: var(--text-color);
  background: var(--divider); border: 2px solid var(--text-color); border-radius: 8px; box-shadow: 0 0 0 2px var(--line);
}
.nameplate:empty { display: none; }
.nameplate.judge { background: var(--divider); }
.nameplate.prosecutor { background: var(--divider); }
.nameplate.defense { background: var(--divider); }
.nameplate.jury { background: var(--muted); }
.nameplate.witness { background: var(--divider); }
.dtext { font-size: 1rem; font-weight: 700; line-height: 1.45; min-height: 2.9em; white-space: pre-wrap; overflow-wrap: anywhere; text-shadow: 0 1px 0 var(--ink); }
.dtext em { font-style: normal; color: var(--secondary); text-decoration: underline; text-decoration-color: rgb(from var(--text-color) r g b / 0.35); text-underline-offset: 3px; }
.dtext.loading { color: var(--muted); font-weight: 500; }
.dtext.loading::after { content: ''; animation: dots 1.2s steps(4) infinite; }
@keyframes dots { 0% { content: ''; } 25% { content: '.'; } 50% { content: '..'; } 75% { content: '...'; } }
.dnext { position: absolute; right: 12px; bottom: 4px; color: var(--gold); font-size: 0.85rem; animation: blink-arrow 0.9s infinite; visibility: hidden; }
.dnext.on { visibility: visible; }
@keyframes blink-arrow { 50% { opacity: 0.2; transform: translateY(2px); } }
.dialogue .retry { margin-top: 10px; }

.shout { position: absolute; inset: 0; z-index: 10; display: none; place-items: center; pointer-events: none; }
.shout.on { display: grid; }
.burst { position: relative; width: min(94%, 420px); aspect-ratio: 2.1; display: grid; place-items: center; animation: shout-in 0.3s cubic-bezier(0.2, 1.7, 0.4, 1); }
.burst::before, .burst::after {
  content: ''; position: absolute; inset: 0;
  clip-path: polygon(0% 30%, 13% 25%, 6% 4%, 27% 17%, 34% 0%, 46% 16%, 60% 2%, 65% 18%, 84% 6%, 82% 24%, 100% 22%, 89% 42%, 100% 60%, 85% 64%, 95% 90%, 74% 78%, 68% 100%, 55% 82%, 41% 98%, 35% 80%, 15% 94%, 18% 74%, 0% 76%, 10% 56%);
}
.burst::before { background: var(--line); transform: scale(1.07); }
.burst::after { background: radial-gradient(circle, var(--text-color) 55%, var(--secondary)); }
.burst .word {
  position: relative; z-index: 1; font-family: var(--display); font-size: clamp(2.6rem, 14vw, 4.4rem); letter-spacing: 1px; line-height: 1;
  color: var(--red); -webkit-text-stroke: 3px var(--line); paint-order: stroke fill; text-shadow: 4px 4px 0 var(--line);
  transform: rotate(-6deg) skewX(-8deg); white-space: nowrap;
}
.burst.blue .word { color: var(--blue); }
.burst.gold .word { color: var(--muted); }
@keyframes shout-in { from { transform: scale(2.6) rotate(10deg); opacity: 0; } to { transform: none; opacity: 1; } }
.slam { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 0.35em; padding: 0 12px; font-size: clamp(2.8rem, 15vw, 4.2rem); }
.slam .w { display: inline-flex; gap: 2px; }
.slam span {
  display: inline-block; font-family: var(--title); line-height: 1.05;
  -webkit-text-stroke: 3px var(--line); paint-order: stroke fill; text-shadow: 5px 5px 0 var(--line);
  animation: slam 0.24s cubic-bezier(0.2, 1.7, 0.4, 1) both; animation-delay: calc(var(--i) * 130ms);
}
.slam.guilty span { color: var(--red); }
.slam.notguilty span { color: var(--secondary); }
@keyframes slam { from { transform: translateY(-120%) scale(2.2); opacity: 0; } to { transform: none; opacity: 1; } }
.shout.dim { background: radial-gradient(circle, rgb(from var(--ink) r g b / 0.35), rgb(from var(--ink) r g b / 0.75)); }

.banner {
  position: absolute; left: 0; right: 0; top: 30%; z-index: 7; display: none; text-align: center; padding: 10px 0;
  background: linear-gradient(90deg, transparent, rgb(from var(--ink) r g b / 0.88) 10%, rgb(from var(--ink) r g b / 0.88) 90%, transparent);
  border-top: 2px solid var(--gold); border-bottom: 2px solid var(--gold);
  font-family: var(--title); font-size: clamp(1.15rem, 6.4vw, 1.7rem); color: var(--text-color); text-shadow: 0 0 14px rgb(from var(--text-color) r g b / 0.85);
}
.banner::before, .banner::after { content: '◆'; color: var(--gold); font-size: 0.7em; margin: 0 10px; vertical-align: 0.15em; }
.banner.on { display: block; animation: banner-in 1.8s ease forwards; }
@keyframes banner-in { 0% { transform: translateX(-100%); } 16%, 84% { transform: none; } 100% { transform: translateX(100%); } }

.stamp {
  position: absolute; top: 9%; right: 5%; z-index: 7; display: none; padding: 2px 14px;
  font-family: var(--title); font-size: clamp(1.4rem, 8vw, 2.2rem); letter-spacing: 1px;
  border: 5px double currentColor; border-radius: 10px; transform: rotate(12deg); background: rgb(from var(--text-color) r g b / 0.9);
}
.stamp.on { display: block; animation: stamp-in 0.28s cubic-bezier(0.2, 1.7, 0.4, 1); }
.stamp.guilty { color: var(--divider); }
.stamp.notguilty { color: var(--divider); }
@keyframes stamp-in { from { transform: rotate(12deg) scale(3); opacity: 0; } to { transform: rotate(12deg) scale(1); opacity: 1; } }

/* ---------- lower screen: jury, continue, choices ---------- */
.lower {
  position: relative; z-index: 15; flex: 0 0 auto; display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; gap: 8px; padding: 8px 10px calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(180deg, var(--raised), var(--panel)); border-top: 3px solid var(--line);
}
.charge { font-size: 0.74rem; font-weight: 700; color: var(--muted); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.charge:empty, .lower:has(.choices:not(.hidden)) .charge { display: none; }
.next-btn {
  height: 60px; border: 3px solid var(--line); border-radius: 16px; cursor: pointer; color: var(--text-color); font-size: 1.5rem;
  background: linear-gradient(180deg, var(--muted), var(--divider)); box-shadow: 0 4px 0 var(--line), inset 0 2px 0 rgb(from var(--text-color) r g b / 0.35);
}
.next-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--line), inset 0 2px 0 rgb(from var(--text-color) r g b / 0.35); }
.next-btn.wait { background: var(--raised); color: var(--muted); font-size: 1rem; box-shadow: 0 4px 0 var(--line); }

.jurybar { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.jcell { font: inherit; color: var(--text-color); width: 100%; min-width: 0; appearance: none; position: relative; background: var(--panel); border: 2px solid var(--line); border-radius: 12px; padding: 4px 3px 6px; text-align: center; transition: transform 0.2s, box-shadow 0.2s; cursor: pointer; }
.jcell.speaking { box-shadow: 0 0 0 3px var(--gold); transform: translateY(-3px); }
.jcell .mini { width: 44px; height: 44px; margin: 0 auto; border-radius: 50%; overflow: hidden; border: 2px solid var(--line); background: var(--secondary); }
.jcell .mini svg { width: 100%; height: 100%; transform: scale(1.55) translateY(16%); }
.jcell .jname { font-size: 0.66rem; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.jury-key { display: flex; justify-content: space-between; gap: 6px; color: var(--muted); font-size: 0.58rem; font-weight: 700; line-height: 1.2; margin: -2px 0 2px; }
.jury-key span:first-child { color: var(--secondary); }
.jury-key span:last-child { color: var(--secondary); }
.jury-key span:nth-child(2) { text-align: center; }
.meter { position: relative; height: 7px; border-radius: 4px; margin: 3px 2px 0; background: linear-gradient(90deg, var(--red), var(--muted) 50%, var(--green)); border: 1px solid var(--line); }
.meter i { position: absolute; top: -5px; width: 6px; height: 15px; border-radius: 3px; background: var(--text-color); box-shadow: 0 0 0 2px var(--line); transform: translateX(-50%); transition: left 0.8s cubic-bezier(0.3, 1.4, 0.5, 1); }
.delta { position: absolute; top: 2px; right: 4px; font-weight: 800; font-size: 0.8rem; animation: rise 1.8s ease forwards; pointer-events: none; text-shadow: 0 1px 0 var(--ink); }
.delta.up { color: var(--green); }
.delta.down { color: var(--muted); }
@keyframes rise { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-22px); } }
.thought {
  position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); z-index: 20; width: max-content; max-width: 160px;
  background: var(--text-color); color: var(--ink); font-size: 0.78rem; font-weight: 800; padding: 6px 9px; border-radius: 12px; border: 2px solid var(--line);
  animation: fade-in 0.2s;
}
.jcell:first-child .thought { left: 0; transform: none; }
.jcell:last-child .thought { left: auto; right: 0; transform: none; }

.choices { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; gap: 8px; animation: fade-in 0.2s; }
.choice-head { display: flex; align-items: center; gap: 8px; min-height: 40px; }
.choice-prompt { min-width: 0; overflow-wrap: anywhere; flex: 1; font-weight: 800; font-size: 0.92rem; line-height: 1.25; color: var(--gold); }
.objection-btn {
  flex: 0 0 auto; min-height: 42px; border: 3px solid var(--line); border-radius: 999px; padding: 4px 14px; cursor: pointer;
  font-family: var(--display); font-size: 1.15rem; letter-spacing: 1px; color: var(--text-color); -webkit-text-stroke: 1px var(--line); paint-order: stroke fill;
  background: linear-gradient(180deg, var(--muted), var(--divider)); box-shadow: 0 3px 0 var(--line);
}
.objection-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--line); }
.objection-btn:disabled { filter: grayscale(0.9) brightness(0.7); font-family: var(--text); font-size: 0.8rem; -webkit-text-stroke: 0; }
.choice-list { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; gap: 8px; }
.choice {
  display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; align-items: center; min-height: 56px; padding: 8px 12px; text-align: left; cursor: pointer;
  border: 3px solid var(--line); border-radius: 14px; color: var(--text-color); font-weight: 700; font-size: 0.93rem; line-height: 1.3;
  box-shadow: 0 4px 0 var(--line), inset 0 2px 0 rgb(from var(--text-color) r g b / 0.3); text-shadow: 0 1px 0 rgb(from var(--ink) r g b / 0.45);
  background: linear-gradient(180deg, var(--muted), var(--divider));
}
.choice.defensive { background: linear-gradient(180deg, var(--divider), var(--raised)); }
.choice.chaotic { background: linear-gradient(180deg, var(--muted), var(--divider)); }
.choice:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }
.choice .key { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: rgb(from var(--ink) r g b / 0.28); font-family: var(--display); font-size: 1.1rem; }
.choice > span:last-child { overflow-wrap: anywhere; }
.choice .tone { display: block; font-size: 0.64rem; letter-spacing: 1px; text-transform: uppercase; opacity: 0.85; }
.choice-own { display: flex; gap: 8px; }
.choice-own input {
  flex: 1 1 0%; width: 0; min-width: 0; min-height: 44px; background: var(--bg2); border: 2px solid var(--divider); border-radius: 12px; padding: 8px 12px; color: var(--text-color); font-size: 16px; font-weight: 700;
}
.choice-own input:focus { outline: none; border-color: var(--gold); }
.objection-reasons { display: flex; flex-wrap: wrap; gap: 6px; }
.objection-reasons button {
  min-height: 44px; border: 2px solid var(--secondary); background: rgb(from var(--text-color) r g b / 0.15); color: var(--text-color); border-radius: 999px; padding: 6px 12px; cursor: pointer; font-weight: 800;
}
.link-btn { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; justify-self: start; padding: 4px 0; min-height: 44px; }

/* ---------- verdict ---------- */
.verdict-card {
  background: linear-gradient(180deg, var(--paper), var(--secondary)); color: var(--paper-ink); border: 3px solid var(--line); border-radius: 18px; padding: 18px 14px;
  box-shadow: 0 6px 0 var(--line);
}
.verdict-card h2 { font-family: var(--title); font-weight: 400; font-size: 1.45rem; margin: 0; text-align: center; }
.verdict-card .charge-name { text-align: center; color: var(--divider); font-weight: 800; font-size: 0.9rem; margin: 4px 0 10px; }
.big-stamp {
  display: block; width: max-content; max-width: 100%; margin: 6px auto 12px; font-family: var(--title); font-size: clamp(1.6rem, 8.6vw, 2.6rem); white-space: nowrap;
  padding: 0 16px; border: 6px double currentColor; border-radius: 12px; transform: rotate(-4deg); background: rgb(from var(--text-color) r g b / 0.5);
}
.big-stamp.guilty { color: var(--divider); }
.big-stamp.notguilty { color: var(--raised); }
.votes { display: grid; gap: 8px; margin: 12px 0 14px; }
.vote { display: grid; grid-template-columns: 46px minmax(0, 1fr); gap: 10px; align-items: center; background: rgb(from var(--ink) r g b / 0.06); border-radius: 12px; padding: 6px 10px; }
.vote .mini { width: 46px; height: 46px; border-radius: 50%; overflow: hidden; border: 2px solid var(--line); background: var(--secondary); }
.vote .mini svg { width: 100%; height: 100%; transform: scale(1.55) translateY(16%); }
.vote .why { font-size: 0.88rem; overflow-wrap: anywhere; }
.vote .why b { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px; }
.vote .v { font-family: var(--title); font-weight: 400; font-size: 0.75rem; white-space: nowrap; }
.vote .v.guilty { color: var(--divider); }
.vote .v.notguilty { color: var(--raised); }
.box { border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; }
.box h3 { margin: 0 0 4px; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1.5px; }
.box p { margin: 0; overflow-wrap: anywhere; }
.box.sentence { background: var(--panel); color: var(--text-color); }
.box.sentence h3 { color: var(--gold); }
.box.real { background: var(--text-color); border-left: 5px solid var(--divider); }
.serious-note { background: var(--text-color); border-left-color: var(--blue); }
.verdict-actions { display: grid; gap: 10px; margin-top: 14px; }
.verdict-actions .btn { width: 100%; }

/* short phones: tighter lower screen so the scene keeps its room */
@media (max-height: 720px) {
  :root { --box-h: 104px; }
  .scene { min-height: max(236px, calc(var(--dialogue-h, var(--box-h)) + 116px)); }
  .lower { gap: 6px; padding-top: 6px; }
  .jcell { padding: 3px 3px 5px; }
  .jcell .mini { width: 34px; height: 34px; }
  .jcell .jname { display: none; }
  .next-btn { height: 52px; }
  .choice-head { min-height: 34px; }
  .choice { min-height: 48px; padding: 6px 10px; font-size: 0.88rem; }
  .choice .tone { font-size: 0.58rem; }
  .jury-key span:nth-child(2) { display: none; }
  .dtext { font-size: 0.95rem; }
}

/* JS mirrors the system preference here and allows the player to change it. */
html[data-motion="reduced"] *, html[data-motion="reduced"] *::before, html[data-motion="reduced"] *::after {
  animation: none !important; transition: none !important; scroll-behavior: auto !important;
}
html[data-motion="reduced"] .flash, html[data-motion="reduced"] .speed { display: none; }
html[data-motion="reduced"] .slam span { opacity: 1; }
html[data-motion="reduced"] .portrait .m-talk, html[data-motion="reduced"] .portrait .blink { opacity: 0; }
html[data-motion="reduced"] .portrait .m-shut { opacity: 1; }
html[data-motion="reduced"] .delta { display: none; }
html[data-motion="reduced"] .banner.on { transform: none; }
@media (prefers-reduced-motion: reduce) {
  html:not([data-motion="full"]) *, html:not([data-motion="full"]) *::before, html:not([data-motion="full"]) *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  html:not([data-motion="full"]) .flash, html:not([data-motion="full"]) .speed, html:not([data-motion="full"]) .delta { display: none; }
  html:not([data-motion="full"]) .portrait .m-talk, html:not([data-motion="full"]) .portrait .blink { opacity: 0; }
  html:not([data-motion="full"]) .portrait .m-shut { opacity: 1; }
}

/* Sensitive cases keep the same clear stage with a calmer presentation. */
.serious .stage.dramatic .speed, .serious .flash { display: none; }
.serious .scene.shake, .serious .sprite.lunge, .serious .sprite.jolt { animation: none; }
.serious .dtext em { color: var(--text-color); text-decoration: none; }

@media (max-width: 359px) {
  .screen { padding-left: 10px; padding-right: 10px; }
  .look-rows { grid-template-columns: 1fr; }
  .phase { font-size: 0.65rem; letter-spacing: 0; }
  .obj-count { font-size: 0.72rem; }
  .objection-btn { padding: 4px 9px; font-size: 1rem; }
  .row { gap: 6px; }
}

/* Ink court: original dossier and graffiti-pop treatment. */

body { background: var(--ink); }
.title-wrap { background: radial-gradient(circle at 70% 20%, var(--divider), transparent 55%); }
#btn-quick, #btn-start { width: 100%; margin-top: 10px; }
#daily-label { color: var(--secondary); margin-bottom: 4px; }
#rap-sheet { border: 2px solid var(--muted); background: var(--panel); padding: 12px; font-size: .8rem; margin-top: 12px; text-align: left; }
.defendant-row { display: grid; grid-template-columns: 62px 1fr; gap: 10px; align-items: end; margin: 16px 0; }
.defendant-row .mugshot { width: 62px; height: 70px; grid-row: span 2; margin: 0; }
.defendant-row label { min-width: 0; }
.customize { border-top: 2px solid var(--divider); padding-top: 12px; margin-bottom: 14px; }
summary { cursor: pointer; min-height: 44px; padding: 10px 0; }
.customize .look-panel { margin: 0 0 12px; }
.stage { border: 4px solid var(--ink); }
.stage::after { content: ''; position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(var(--text-color) 1px, transparent 1px); background-size: 5px 5px; opacity: .2; z-index: 2; }
.dialogue { border: 4px solid var(--ink); box-shadow: inset 0 0 0 1px var(--muted), 4px 4px 0 var(--ink); border-radius: 3px; }
.nameplate { transform: skew(-8deg); border: 3px solid var(--ink); border-radius: 1px; max-width: 95%; overflow-wrap: anywhere; box-shadow: 3px 3px 0 var(--ink); }
.banner { top: 24%; left: -2%; width: 104%; padding: 18px 18px; box-sizing: border-box; background: radial-gradient(var(--text-color) 1px, transparent 1px) 0 0 / 5px 5px, var(--raised); color: var(--text-color); border-top: 5px solid var(--secondary); border-bottom: 5px solid var(--ink); box-shadow: 0 8px 0 var(--ink); font-size: clamp(1.6rem, 7.8vw, 3rem); line-height: 1.05; text-align: center; white-space: normal; transform: rotate(-4deg); z-index: 12; }
.banner small { display: block; font: 800 .65rem var(--text); letter-spacing: 3px; color: var(--secondary); margin-bottom: 8px; }
.banner strong { display: block; font-weight: 400; }
.banner::before, .banner::after { content: none; }
.banner.on { animation: chapter-slash 1.9s both; }
@keyframes chapter-slash { 0% { transform: translateX(-110%) rotate(-4deg); } 15%,85% { transform: translateX(0) rotate(-4deg); } 100% { transform: translateX(110%) rotate(-4deg); } }
.cut-in { display: none; position: absolute; top: 22%; left: -2%; width: 104%; min-height: 130px; padding: 10px 18px 10px 110px; box-sizing: border-box; background: radial-gradient(var(--ink) 1px, transparent 1px) 0 0 / 5px 5px, var(--secondary); color: var(--text-color); border-block: 6px solid var(--ink); z-index: 15; transform: rotate(-6deg); align-items: center; }
.cut-in.on { display: flex; animation: cut-slash 1.2s both; }
.cut-in strong { font-family: var(--display); font-size: clamp(1.5rem, 7vw, 2.6rem); line-height: 1; overflow-wrap: anywhere; }
.cut-portrait { position: absolute; left: 0; bottom: 0; width: 115px; height: 135px; overflow: hidden; }
.cut-portrait svg { width: 100%; height: 100%; transform: scale(1.45) translateY(12%); }
@keyframes cut-slash { 0% { transform: translateX(-110%) rotate(-6deg); } 14%,86% { transform: translateX(0) rotate(-6deg); } 100% { transform: translateX(110%) rotate(-6deg); } }
.jury-key { font-size: .75rem; background: var(--ink); border-block: 1px solid var(--muted); padding: 8px 4px; color: var(--text-color); align-items: center; }
.jury-key span:last-child { color: var(--secondary); font-size: .65rem; white-space: nowrap; }
.jcell.side-guilty { background: var(--raised); border-color: var(--muted); }
.jcell.side-ng { background: var(--raised); border-color: var(--secondary); }
.jcell .jname { display: block; font-size: clamp(.52rem, 2.3vw, .72rem); white-space: nowrap; text-overflow: clip; padding-top: 3px; }
.delta { font-size: 1.1rem; font-weight: 800; padding: 4px 8px; background: var(--ink); border: 2px solid currentColor; z-index: 8; }
#vote-counter { padding: 9px; border-left: 4px solid var(--secondary); background: var(--panel); font-size: .85rem; }
.jcard { background: var(--panel); color: var(--text-color); border: 3px solid var(--ink); border-radius: 2px; margin-top: 14px; padding-top: 26px; box-shadow: 4px 4px 0 var(--ink); }
.jcard .num { border-radius: 0; font: 800 .65rem var(--text); letter-spacing: 1px; top: 0; left: 0; right: 0; background: var(--raised); color: var(--text-color); border: 0; padding: 5px 8px; display: flex; justify-content: space-between; }
.seated-stamp { color: var(--secondary); transform: rotate(-6deg); }
.jcard .meta { color: var(--secondary); }.jcard .quote { color: var(--secondary); }.jcard h4 { padding-right: 0; }
.strike-btn { position: static; margin-top: 6px; min-height: 44px; background: var(--raised); color: var(--secondary); border: 1px solid var(--muted); font-size: .75rem; }
.verdict-card { background: var(--panel); color: var(--text-color); border: 4px solid var(--ink); border-radius: 2px; box-shadow: 6px 6px 0 var(--ink); }
.masthead { border-block: 3px solid var(--secondary); font-family: var(--display); font-size: clamp(1.7rem, 7vw, 3rem); text-align: center; letter-spacing: 2px; margin-bottom: 16px; }
.verdict-card h2 { font-family: var(--display); font-size: clamp(1.8rem, 8vw, 3.2rem); line-height: 1.1; overflow-wrap: anywhere; }
.verdict-card .charge-name { color: var(--secondary); margin: 10px 0; }
.rank { font: 7rem/.95 var(--display); color: var(--secondary); text-shadow: 5px 4px var(--muted); transform: rotate(-12deg); text-align: center; margin: 20px; }
.big-stamp { background: transparent; border-radius: 2px; }.big-stamp.guilty,.vote .v.guilty { color: var(--secondary); }.big-stamp.notguilty,.vote .v.notguilty { color: var(--secondary); }
.vote { background: var(--panel); border-radius: 2px; }.box.real,.serious-note { background: var(--panel); color: var(--text-color); }.box.sentence { background: var(--raised); }
.trial-stats { border: 2px dashed var(--muted); padding: 12px; font-size: .85rem; }.trial-stats p { color: var(--secondary); margin: 6px 0 0; }
.serious .banner { transform: none; animation: none; background: var(--raised); border-color: var(--secondary); font-size: 1.4rem; }
.serious .cut-in,.serious .shout,.serious .delta,.serious .thought { display: none !important; }
.serious .stage::after { display: none; }
html[data-motion="reduced"] .cut-in.on { transform: none; }
@media (min-width: 700px) { .banner { font-size: 2.8rem; } }
@media print { body,.verdict-card { background: var(--panel) !important; color: var(--text-color) !important; print-color-adjust: exact; } }
.jcard { padding-top: 42px; }
.jury-key span:last-child { display: block; }
.look-row { grid-template-columns: 44px minmax(0,1fr) 44px; }
.look-row button { min-width: 44px; min-height: 44px; }
.banner strong { font-family: var(--display); font-size: clamp(2rem, 10vw, 3.3rem); text-shadow: 2px 3px var(--ink); }
.serious .banner strong { font: 700 1.3rem var(--text); text-shadow: none; }
.serious .nameplate { transform: none; }
.cut-in.pointing .cut-portrait svg { transform: none; }
.cut-in.pointing strong { font-size: clamp(2.6rem, 12vw, 3.4rem); }
.calm-result { display: block; text-align: center; margin: 16px 0; font-weight: 700; }
.serious .verdict-card h2 { font: 700 1.4rem var(--text); }

/* HQ polish 2026-11-02: grouped flip splash, rap sheet grid, verdict stat chips. */
.cut-faces { position: absolute; left: 0; bottom: 0; display: flex; }
.cut-faces.n2 .cut-portrait, .cut-faces.n3 .cut-portrait { position: relative; width: 78px; margin-right: -26px; }
.cut-in:not(.pointing) { padding-left: 128px; }
.cut-in.group { padding-left: 156px; }
.cut-in strong small { display: block; margin-top: 4px; font-size: 0.62em; letter-spacing: 1px; color: var(--divider); }
#rap-sheet { margin: 4px 0 14px; padding: 10px 12px 12px; text-align: left; background: var(--ink); border: 3px solid var(--ink); box-shadow: 4px 4px 0 var(--secondary); transform: rotate(-1deg); }
#rap-sheet h3 { margin: 0 0 6px; font-family: var(--display); font-weight: 400; font-size: 1.15rem; letter-spacing: 1px; color: var(--secondary); }
.rap-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.rap-grid div { display: grid; text-align: center; background: var(--panel); border-radius: 6px; padding: 6px 2px; }
.rap-grid b { font-family: var(--title); font-weight: 400; font-size: 1.15rem; color: var(--text-color); }
.rap-grid span { font-size: 0.66rem; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
#rap-sheet p { margin: 8px 0 0; font-size: 0.8rem; font-weight: 800; color: var(--secondary); }
.stat-chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat-chips span { display: grid; text-align: center; background: var(--panel); border-radius: 8px; padding: 8px 4px; font-size: 0.72rem; font-weight: 800; text-transform: uppercase; color: var(--muted); }
.stat-chips b { font-family: var(--title); font-weight: 400; font-size: 1.35rem; color: var(--text-color); }
.trial-stats .badges { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.trial-stats .badges span { background: var(--secondary); color: var(--text-color); font-weight: 800; font-size: 0.78rem; padding: 3px 10px; border-radius: 999px; transform: rotate(-2deg); }

/* Midnight Court: one ink system across every surface. */
body { background: var(--ink); color: var(--text-color); }
#app { background: var(--night); max-width: 480px; }
.title-wrap { background: var(--night); gap: 6px; padding-inline: 24px; }
.title-wrap::before { inset: 0; background: radial-gradient(var(--divider) .7px, transparent 1px) 0 0 / 5px 5px; opacity: .35; animation: none; clip-path: polygon(0 0,100% 0,100% 38%,0 65%); }
.parade { height: 128px; border-bottom: 4px solid var(--ink); transform: rotate(-3deg); margin: 0 -26px 16px; background: var(--panel); }
.parade .face { flex-basis: 104px; animation: none; border-right: 3px solid var(--ink); margin: 0 -6px; }
.logo { line-height: 1; }
.logo .l1 { font-size: clamp(1.7rem,8.5vw,2.65rem); color: var(--text-color); text-shadow: 3px 4px var(--ink); }
.logo .l2 { font: italic 700 1.2rem var(--text); color: var(--secondary); margin: 8px 0; }
.logo .l3 { font-size: clamp(4.5rem,24vw,6.8rem); color: var(--accent); letter-spacing: -4px; text-shadow: 5px 6px var(--ink); -webkit-text-stroke: 2px var(--ink); transform: rotate(-4deg); }
.eyebrow, #daily-label { color: var(--secondary); letter-spacing: 1.3px; }
.tagline { color: var(--secondary); margin: 12px auto; }
.btn, .next-btn { background: var(--accent); color: var(--ink); border: 2px solid var(--ink); border-radius: 3px; box-shadow: 3px 4px var(--ink); text-shadow: none; }
.btn.big { font: 700 1.05rem var(--text); min-height: 52px; }
.btn.ghost { background: transparent; color: var(--secondary); border: 1px solid var(--divider); box-shadow: none; }
.btn:active, .next-btn:active { box-shadow: 1px 1px var(--ink); }
button:focus-visible, summary:focus-visible, [tabindex]:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--text-color); outline-offset: 3px; }
.icon-btn[aria-pressed="true"] { color: var(--text-color); background: var(--raised); }
.court-guide, #rap-sheet, .customize { border-color: var(--divider); background: var(--panel); border-radius: 3px; }
.court-guide summary, .court-guide b, .form-panel h3, .screen-head h2, #rap-sheet h3 { color: var(--text-color); }
.mode.demo, #rap-sheet p, .form-error { color: var(--secondary); }
#rap-sheet { box-shadow: 4px 4px var(--ink); transform: none; }
.panel, .look-row, .mugshot { border-radius: 3px; }
.look-row button { color: var(--secondary); }
.form-panel input, .form-panel select, .form-panel textarea, .choice-own input { border: 1px solid var(--divider); border-radius: 3px; color: var(--text-color); }
::placeholder { color: var(--muted); }
.form-panel input:focus, .form-panel select:focus, .form-panel textarea:focus, .choice-own input:focus { border-color: var(--secondary); }
.jcard { background: var(--panel); border-color: var(--ink); }
.jcard .num { background: var(--raised); color: var(--secondary); }
.jcard .face, .mugshot, .jcell .mini, .vote .mini { background: var(--raised); border-radius: 2px; }
.jcard .quote { color: var(--text-color); }
.jcard .meta { color: var(--secondary); }
.seated-stamp { color: var(--success); }
.strike-btn { color: var(--secondary); background: var(--raised); border-color: var(--divider); border-radius: 2px; }
.court-top, .lower { background: var(--night); }
.phase, .obj-count { color: var(--secondary); }
.stage { inset: 2px 3px 0; border: 4px solid var(--ink); transform: skewY(-1deg); }
.stage .stage-bg { filter: none; background: linear-gradient(115deg, transparent 60%, var(--ink) 60% 62%, transparent 62%), repeating-linear-gradient(90deg, var(--panel) 0 23%, var(--raised) 23% 24%, var(--night) 24% 25%); }
.stage.role-judge .stage-bg { background: radial-gradient(ellipse at 50% 24%, var(--raised),var(--night) 70%); }
.stage.role-judge .stage-bg::before { content: '⚖'; position: absolute; top: 6%; width: 100%; text-align: center; color: var(--gold); font-size: 4rem; opacity: .55; }
.stage::after { background: radial-gradient(var(--ink) .8px, transparent 1px) 0 0 / 4px 4px; opacity: .24; }
.stage .desk { background: linear-gradient(var(--raised) 0 6px, var(--ink) 6px 11px, var(--panel) 11px); filter: none; border-radius: 0; }
.stage.dramatic .stage-bg, .stage.dramatic.tone-blue .stage-bg { filter: brightness(.65); }
.speed { background: repeating-linear-gradient(168deg, transparent 0 12px, var(--secondary) 13px 14px, transparent 15px 32px); }
.stage.dramatic .speed { opacity: .4; animation: ink-speed .2s steps(2) infinite; }
@keyframes ink-speed { to { transform: translateX(16px); } }
.sprite { aspect-ratio: 200 / 250; filter: drop-shadow(5px 3px 0 var(--ink)); }
.dialogue { background: var(--panel); border: 3px solid var(--ink); box-shadow: inset 0 0 0 1px var(--divider), 3px 4px var(--ink); border-radius: 2px; }
.nameplate, .nameplate.prosecutor, .nameplate.defense, .nameplate.jury, .nameplate.witness { background: var(--raised); color: var(--text-color); font: 700 .88rem var(--text); border: 2px solid var(--ink); box-shadow: 2px 2px var(--ink); }
.nameplate.judge { color: var(--gold); background: var(--raised); }
.dtext { font-weight: 500; color: var(--text-color); text-shadow: none; }
.dtext em { color: var(--accent-text); text-decoration-color: var(--accent); }
.dnext { color: var(--secondary); }
.banner { background: var(--panel); border-top: 4px solid var(--text-color); border-bottom: 5px solid var(--ink); color: var(--text-color); text-shadow: none; width: 100%; left: 0; padding: 16px 8px; }
.banner small { color: var(--secondary); letter-spacing: 2px; }
.banner strong { font: 400 clamp(1.35rem,6.2vw,1.85rem)/1.2 var(--display); white-space: nowrap; text-shadow: 3px 3px var(--ink); overflow-wrap: normal; }
.burst::after { background: var(--text-color); }
.burst::before { background: var(--ink); transform: scale(1.06); }
.burst .word, .burst.blue .word, .burst.gold .word { color: var(--ink); -webkit-text-stroke: 0; text-shadow: none; font-size: clamp(1.3rem,6.4vw,2rem); letter-spacing: -1px; transform: rotate(-5deg); }
.burst.objection .word { color: var(--accent); }
.slam.notguilty span { color: var(--success); }
.cut-in { background: var(--text-color); color: var(--ink); }
.cut-in strong { font-size: clamp(1rem,4.8vw,1.5rem); overflow-wrap: normal; }
.cut-in.pointing strong { color: var(--accent); font-size: clamp(1rem,5vw,1.6rem); }
.cut-in strong small { color: var(--ink); }
.jcell, .jcell.side-guilty, .jcell.side-ng { background: var(--panel); border-color: var(--divider); border-radius: 2px; color: var(--secondary); }
.jcell.side-guilty .meter { border-color: var(--accent); }
.jcell.side-ng .meter { border-color: var(--success); }
.jcell.speaking { box-shadow: 0 0 0 2px var(--secondary); }
.jury-key { background: transparent; border-color: var(--divider); color: var(--secondary); }
.jury-key span:first-child { color: var(--accent-text); }
.jury-key span:last-child { color: var(--secondary); }
.delta { background: var(--ink); }
.delta.down { color: var(--accent-text); }
#vote-counter { border-color: var(--divider); background: var(--panel); }
.next-btn { min-height: 48px; height: 52px; }
.next-btn.wait { background: var(--raised); color: var(--secondary); }
.choice-prompt { color: var(--text-color); }
.choice, .choice.defensive, .choice.chaotic { background: var(--panel); color: var(--text-color); border: 1px solid var(--divider); border-left: 3px solid var(--secondary); border-radius: 2px; box-shadow: 2px 3px var(--ink); text-shadow: none; font-weight: 500; }
.choice:hover { background: var(--raised); }
.choice .key { background: var(--ink); color: var(--secondary); border-radius: 2px; font: 700 .9rem var(--text); }
.choice .tone { color: var(--secondary); opacity: 1; }
.choice .tone::before { content: '◇ '; color: var(--secondary); }
.choice.defensive .tone::before { content: '▱ '; }
.choice.chaotic .tone::before { content: 'ϟ '; }
.objection-btn { background: var(--accent); color: var(--ink); border-radius: 2px; min-height: 44px; padding: 6px 9px; -webkit-text-stroke: 0; text-shadow: none; font-size: .72rem; letter-spacing: 0; }
.objection-reasons button { border-color: var(--divider); background: var(--raised); color: var(--text-color); border-radius: 2px; }
.stamp { background: var(--ink); color: var(--gold); border-radius: 2px; }
.stamp.guilty { color: var(--accent); }.stamp.notguilty { color: var(--success); }
.verdict-card { background: radial-gradient(var(--divider) .6px, transparent 1px) 0 0 / 5px 5px, var(--night); color: var(--text-color); }
.masthead { font-size: 1.2rem; letter-spacing: 1px; border-color: var(--divider); padding: 8px 0; }
.verdict-card h2 { font-size: clamp(1.4rem,6.5vw,2rem); line-height: 1.2; }
.verdict-card .charge-name { color: var(--secondary); }
.rank { color: var(--gold); text-shadow: 5px 5px var(--ink); font-size: 5rem; margin: 16px; }
.big-stamp { font-size: clamp(1.15rem,6.5vw,2rem); padding: 4px 10px; }
.big-stamp.guilty { color: var(--accent); }.vote .v.guilty { color: var(--accent-text); }
.big-stamp.notguilty, .vote .v.notguilty { color: var(--success); }
.vote, .box.sentence, .box.real, .serious-note, .rap-grid div, .stat-chips span { background: var(--panel); color: var(--text-color); border-radius: 2px; }
.box.real { border-left: 3px solid var(--success); }.box.sentence h3 { color: var(--secondary); }
.trial-stats { border: 1px solid var(--divider); }.trial-stats p { color: var(--secondary); }
.trial-stats .badges span { background: var(--raised); color: var(--secondary); border-radius: 2px; transform: none; }
.serious .dtext em { color: var(--secondary); }.serious .banner { background: var(--panel); border-color: var(--divider); }
.serious *, .serious *::before, .serious *::after { animation: none !important; }
.serious .stage, .serious .parade { transform: none; }
.serious .stage-bg::before { display: none; }
@media (max-width: 359px) { .title-wrap { padding-inline: 16px; }.objection-btn { font-size: .65rem; padding-inline: 6px; } }
@media print { body, #app, .verdict-card { background: var(--night) !important; color: var(--text-color) !important; print-color-adjust: exact; } }
/* Keep an actual bust visible above the dialogue even while replies are open. */
.scene { min-height: max(320px, calc(var(--dialogue-h, var(--box-h)) + 190px)); }
.sprite { bottom: calc(var(--dialogue-h, var(--box-h)) + 8px); min-height: 0; }
@media (max-height: 720px) { .scene { min-height: max(280px, calc(var(--dialogue-h, var(--box-h)) + 164px)); }.sprite { min-height: 0; } }
.btn:not(.ghost) { min-height: 48px; }

/* Generated visual-novel cast: fixed canvases prevent expression layout shifts. */
.portrait-art { display: block; width: 100%; height: auto; object-fit: contain; }
.sprite .portrait-art { width: 100%; height: 100%; object-position: center bottom; transform-origin: center bottom; animation: portrait-settle 180ms ease-out, portrait-breathe 4.8s 180ms ease-in-out infinite; }
.sprite.flip .portrait-art { scale: -1 1; }
@keyframes portrait-breathe { 0%,100% { translate: 0 0; } 50% { translate: 0 -2px; } }
@keyframes portrait-settle { from { transform: scale(1.012,.985); } to { transform: scale(1); } }
.jcard .face .portrait-art, .jcell .mini .portrait-art, .vote .mini .portrait-art { width: 100%; height: 100%; object-fit: cover; object-position: center 27%; transform: scale(1.65); transform-origin: 50% 30%; }
.cut-portrait .portrait-art { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.cut-in.pointing .cut-portrait .portrait-art { object-fit: contain; object-position: center bottom; }
html[data-motion="reduced"] .portrait-art { animation: none; }
@media (prefers-reduced-motion: reduce) { .portrait-art { animation: none; } }
/* Keep the ink screen behind the artwork; reserve readable stage art on short phones. */
.stage:has(.portrait-art)::after { z-index: 1; }
.scene:has(.portrait) { min-height: max(320px, calc(var(--dialogue-h, var(--box-h)) + 200px)); }
.sprite:has(> .portrait-art) { height: calc(100% - var(--dialogue-h, var(--box-h)) - 16px); }

/* === lane: creator + menu === */
/* The "‹ Menu" button follows the phone's notch area down; every screen under it
   starts below it by the same token, so the two can never meet at any width. */
:root { --menu-top: max(6px, env(safe-area-inset-top)); --menu-clear: calc(var(--menu-top) + 52px); }
.home-menu { position: fixed; top: var(--menu-top); left: max(6px, calc((100vw - 480px)/2 + 6px)); z-index: 90; min-height: 44px; min-width: 44px; padding: 0 12px; background: transparent; color: var(--secondary); border: 1px solid var(--divider); border-radius: 3px; font: 600 0.95rem var(--text); cursor: pointer; }
.home-menu.in-court { position: static; border: 0; padding: 0; margin-right: 4px; font-size: 1.25rem; display: grid; place-items: center; }
.home-menu:active { background: var(--raised); }
.court-top { gap: 4px; }
.home-menu[hidden] { display: none; }
.screen:not(#screen-title):not(#screen-court):not(#screen-profile) { padding-top: var(--menu-clear); }
#creator-preview { display: grid; justify-items: center; }
#creator-preview .mugshot { width: 150px; height: 170px; }
#case-defendant { display: flex; align-items: center; gap: 12px; }
#case-defendant .mini { width: 54px; height: 64px; overflow: hidden; }
#case-defendant svg { width: 100%; height: 100%; }
#case-defendant b { overflow-wrap: anywhere; }
#leave-sheet { background: var(--raised); color: var(--text-color); border: 2px solid var(--ink); border-radius: 3px; box-shadow: 4px 4px var(--ink); padding: 24px; max-width: min(360px,90vw); }
#leave-sheet::backdrop { background: color-mix(in srgb, var(--ink) 80%, transparent); }
#leave-sheet button { min-height: 44px; margin: 5px; }
#btn-profile { margin-top: 12px; }

/* Drawn defendant creator: generous targets and a clean cast-style preview. */
.look-thumb { padding: 0; min-width: 48px; min-height: 78px; overflow: hidden; border: 2px solid var(--divider); background: var(--raised); color: var(--secondary); cursor: pointer; border-radius: 3px; }
.look-thumb .portrait { width: 100%; height: 74px; object-fit: cover; object-position: center 24%; }
.look-thumb span { display: block; padding: 4px 2px; font: 600 10px var(--text); line-height: 1.2; }
.look-thumb[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); background: var(--panel); color: var(--text-color); }
#creator-preview { margin: 16px 0; }
#creator-preview .mugshot { width: 200px; height: 250px; padding: 0; background: transparent; border: 0; box-shadow: none; }
#creator-preview .mugshot .portrait { width: 100%; height: 100%; }
#creator-preview .mug-plate { width: auto; max-width: 100%; margin: 0; border: 0; border-radius: 0; color: var(--secondary); font: 600 14px var(--text); background: transparent; }
#case-defendant .mini .portrait { width: 100%; height: 100%; object-fit: contain; }
/* Each face group occupies its own column, so text cannot intersect it. */
.cut-in.on { display: grid; grid-template-columns: minmax(0, 118px) minmax(0, 1fr); gap: 8px; padding: 8px 18px 8px 8px; }
.cut-in .cut-faces { position: relative; left: auto; bottom: auto; width: 118px; height: 120px; overflow: hidden; align-self: end; }
.cut-in .cut-faces .cut-portrait { position: relative; left: auto; bottom: auto; width: 100%; height: 120px; flex-shrink: 0; }
.cut-in .cut-faces.n2 .cut-portrait { width: 72px; margin-right: -26px; }
.cut-in .cut-faces.n3 .cut-portrait { width: 62px; margin-right: -34px; }
.cut-in strong { min-width: 0; position: relative; font-size: clamp(.95rem, 4.6vw, 1.4rem); line-height: 1.2; }
.look-thumb .look-face { height: 74px; padding: 0; overflow: hidden; }
.look-thumb .look-face .portrait { height: 100%; transform: scale(1.55); transform-origin: center 30%; }
#case-defendant .mini { flex-shrink: 0; }
#case-defendant .mini .portrait { object-fit: cover; object-position: center 27%; transform: scale(1.65); transform-origin: 50% 30%; }

/* Creator controls stay in document order, with Randomize beneath the portrait. */
#creator-preview { margin: 0 0 16px; gap: 8px; }
#creator-preview .mugshot { width: 120px; height: 150px; }
.thought { overflow-wrap: anywhere; pointer-events: none; }

/* Mangaka editor: calm frame, one dramatic panel per beat. See docs/design/benchmark.md. */
:root {
  --type-xs: .75rem; --type-label: .8125rem; --type-sm: .875rem; --type-body: 1rem;
  --type-lead: 1.125rem; --type-subtitle: 1.375rem; --type-title: 1.75rem; --type-splash: 2.75rem;
  --space: 4px; --target: 44px; --primary-target: 48px; --balloon-height: 132px;
}
body { font-size: var(--type-body); font-variant-numeric: tabular-nums; }
.btn, .btn.big, .btn.small, .objection-btn, .strike-btn { font: 700 var(--type-sm)/1.4 var(--text); min-height: var(--target); border-radius: 4px; box-shadow: none; }
.btn:not(.ghost), .btn.big { min-height: var(--primary-target); }
.btn.ghost, .objection-btn, .strike-btn { border: 1px solid var(--divider); background: transparent; color: var(--secondary); }
button:disabled, .btn:disabled, .objection-btn:disabled { opacity: .38; filter: none; transform: none; }
button:focus:not(:focus-visible), input:focus:not(:focus-visible), textarea:focus:not(:focus-visible) { outline: none; }
button:focus-visible, summary:focus-visible, [tabindex]:focus-visible, input:focus-visible, textarea:focus-visible { outline: 2px solid var(--text-color); outline-offset: 3px; }
.btn:active, .choice:active { transform: none; box-shadow: none; filter: none; }
.btn.ghost:active, .objection-btn:active, .strike-btn:active { background: var(--raised); }
.ui-icon { width: 20px; height: 20px; flex: 0 0 20px; display: inline-block; vertical-align: middle; }
.home-menu { display: flex; align-items: center; justify-content: center; gap: 4px; }
.screen-head h2 { font: 400 var(--type-title)/1.25 var(--display); text-shadow: none; }
.screen-head { margin-bottom: 20px; }
.title-wrap { gap: 8px; }
#btn-start, #btn-profile { margin-top: 0; border-color: transparent; font-size: var(--type-body); }
.court-guide summary { display: flex; justify-content: space-between; align-items: center; list-style: none; font-size: var(--type-sm); padding: 12px 16px; }
.court-guide summary::-webkit-details-marker { display: none; }
.court-guide[open] summary svg { transform: rotate(180deg); }
.court-guide li, .court-guide p, .mode, .field-hint { font-size: var(--type-xs); }
.form-panel label, .jcard .meta { font-size: var(--type-sm); }
.form-panel textarea { resize: none; }
#case-defendant { padding: 12px 16px; margin-bottom: 16px; }
#case-defendant > div:nth-child(2) { flex: 1; min-width: 0; }
#case-defendant small, #case-defendant b { display: block; }
#case-defendant small { font-size: var(--type-xs); color: var(--muted); }
#case-defendant .mini { width: 44px; height: 48px; border-radius: 4px; }
#jury-hint { font: 600 var(--type-label) var(--text); text-align: left; margin: 16px 0 -8px; }
.jcard { min-height: 96px; padding: 12px; grid-template-columns: 56px minmax(0, 1fr); }
.jcard .face { width: 56px; height: 64px; }
.jcard:has(.strike-btn) .details { padding-right: 64px; }
.jcard:has(.strike-btn) h4, .jcard:has(.strike-btn) .meta { padding-right: 0; }
.strike-btn { position: absolute; top: 50%; right: 8px; transform: translateY(-50%); margin: 0; min-width: 44px; padding: 4px 8px; }
.court-top { display: grid; grid-template-columns: 44px minmax(0,1fr) auto; min-height: 52px; padding-inline: 4px; gap: 0; }
.court-top .home-menu { margin: 0; }
.phase { text-align: center; font: 600 var(--type-label)/1.2 var(--text); letter-spacing: 0; }
.top-right { gap: 0; }
.icon-btn, .icon-btn[aria-pressed="true"] { color: var(--secondary); background: transparent; border-radius: 4px; }
.icon-btn[aria-pressed="true"]::after { content: ''; position: absolute; bottom: 4px; width: 3px; height: 3px; background: currentColor; border-radius: 50%; }
.icon-btn { position: relative; }
.obj-count { display: flex; align-items: center; gap: 4px; padding: 0 4px; }
.objection-pip { width: 5px; height: 5px; border: 1px solid var(--muted); border-radius: 50%; }
.objection-pip.available { background: var(--secondary); }
.stage { transform: none; }
.stage.role-judge .stage-bg::before { content: none; }
.scene, .scene:has(.portrait) { min-height: calc(var(--balloon-height) + 188px); }
.stage .desk, .stage.role-judge .desk, .stage.role-jury .desk { height: calc(var(--dialogue-h, var(--balloon-height)) + 2px); }
.sprite, .sprite:has(> .portrait-art) { bottom: calc(var(--dialogue-h, var(--balloon-height)) - 8px); height: calc(100% - var(--dialogue-h, var(--balloon-height)) + 12px); max-height: 470px; }
.dialogue { height: var(--balloon-height); min-height: var(--balloon-height); max-height: var(--balloon-height); overflow-y: auto; padding: 12px 16px; border: 1px solid var(--divider); border-radius: 8px 8px 4px 4px; box-shadow: none; }
.nameplate, .nameplate.judge { transform: none; color: var(--secondary); border: 0; background: var(--raised); box-shadow: none; font: 700 var(--type-sm)/1.4 var(--text); padding: 4px 8px; margin: 0 0 8px; border-radius: 2px; }
.dtext { font: 500 var(--type-body)/1.5 var(--text); }
.dtext em { text-decoration-thickness: 1px; text-decoration-color: color-mix(in srgb,var(--accent) 55%, transparent); color: var(--text-color); }
.dtext.loading::after { content: none; }
.dnext { animation: none; width: 6px; height: 6px; border-right: 1px solid var(--secondary); border-bottom: 1px solid var(--secondary); transform: rotate(45deg); bottom: 12px; }
.banner, .serious .banner { top: 4px; left: 8px; right: 8px; width: auto; padding: 8px 12px; border: 1px solid var(--divider); border-left: 3px solid var(--secondary); background: var(--panel); transform: none; text-align: left; box-shadow: none; }
.banner small { display: none; }
.banner strong, .serious .banner strong { font: 600 var(--type-sm)/1.4 var(--text); white-space: normal; text-shadow: none; }
.banner.on { animation: fade-in 160ms ease-out; }
.charge { display: none; }
.jcell { padding: 4px 2px 24px; }
.jcell .jname { font: 600 var(--type-xs)/1.3 var(--text); padding-top: 4px; }
.jcell.speaking { transform: none; }
.meter { background: linear-gradient(90deg,var(--accent-text),var(--muted) 50%,var(--success)); }
.meter i { transition: left 320ms ease; }
.delta { top: auto; bottom: 2px; right: 0; left: 0; margin: auto; width: max-content; padding: 0 4px; border: 0; border-radius: 8px; font: 700 var(--type-xs)/18px var(--text); animation: delta-fade 1.8s ease forwards; }
.delta.up { color: var(--text-color); }
@keyframes delta-fade { 0%,65% { opacity: 1; } 100% { opacity: 0; } }
.jury-key { display: flex; gap: 8px; justify-content: space-between; align-items: center; font-size: var(--type-xs); padding: 4px 0; margin: 0; border: 0; }
.jury-key span:first-child, .jury-key span:last-child { color: var(--secondary); font-size: inherit; white-space: nowrap; }
.jury-key .split-meter { display: flex; flex: 1; gap: 3px; }
.split-meter i { height: 4px; flex: 1; background: var(--muted); border-radius: 1px; }
.split-meter .ng { background: var(--success); }
.split-meter .g { background: var(--accent-text); }
.next-btn { display: grid; place-items: center; box-shadow: none; }
.choice-head { min-height: 44px; }
.choice-prompt { font-size: var(--type-sm); }
.choice, .choice.defensive, .choice.chaotic { min-height: 64px; padding: 12px; font-size: var(--type-body); border: 1px solid var(--divider); border-radius: 4px; box-shadow: none; }
.choice .key { width: 28px; height: 28px; border: 1px solid var(--divider); border-radius: 50%; background: transparent; font: 600 var(--type-sm) var(--text); }
.choice .tone { font-size: var(--type-xs); text-transform: capitalize; letter-spacing: 0; color: var(--muted); margin-bottom: 4px; }
.choice .tone::before, .choice.defensive .tone::before, .choice.chaotic .tone::before { content: none; }
.choice:active { background: var(--raised); border-color: var(--text-color); }
.choices.objection-sheet { position: fixed; z-index: 100; bottom: 0; left: max(0px, calc((100vw - 480px)/2)); width: min(100%,480px); max-height: calc(100svh - 24px); overflow: auto; overscroll-behavior: contain; padding: 0 16px calc(16px + env(safe-area-inset-bottom)); background: var(--panel); border: 1px solid var(--divider); border-radius: 12px 12px 0 0; box-shadow: 0 0 0 100vmax rgb(14 15 23 / .8); gap: 12px; }
.objection-sheet .choice-head { position: sticky; top: 0; z-index: 1; background: var(--panel); padding-top: 12px; min-height: 60px; }
#cancel-objection { display: flex; align-items: center; gap: 4px; padding-inline: 8px; }
.objection-reasons { display: grid; gap: 0; }
.objection-reasons button { min-height: 48px; padding: 12px 4px; text-align: left; border: 0; border-bottom: 1px solid var(--divider); background: transparent; border-radius: 0; font: 500 var(--type-sm)/1.4 var(--text); }
.objection-reasons button small { display: block; margin-top: 2px; font: 500 var(--type-xs)/1.4 var(--text); color: var(--secondary); }
.objection-sheet .choice-own { position: sticky; bottom: 0; padding-top: 4px; background: var(--panel); }
.verdict-card { background: var(--night); border: 0; box-shadow: none; padding: 16px 0; }
.verdict-defendant { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center; color: var(--secondary); font-size: var(--type-sm); margin: 0 0 24px; }

.big-stamp { font-size: clamp(1.5rem,7.5vw,2.75rem); padding: 8px; border: 3px double currentColor; margin: 0 auto 8px; }
.big-stamp.notguilty, .vote .v.notguilty { color: var(--text-color); }
.verdict-score { display: flex; align-items: center; justify-content: center; gap: 12px; font: 700 var(--type-title)/1.2 var(--text); margin: 16px 0; }
.rank { text-align: center; font: 600 var(--type-sm)/1.4 var(--text); color: var(--muted); text-shadow: none; transform: none; margin: 0; border: 1px solid var(--divider); border-radius: 4px; padding: 4px 8px; }
.rank small { font: inherit; color: inherit; }
.vote { padding: 12px 16px; border: 1px solid var(--divider); border-radius: 4px; }
.vote .v { font: 700 var(--type-xs) var(--text); }
.box.sentence, .box.real { background: var(--panel); border: 1px solid var(--divider); border-radius: 4px; padding: 16px; }
.box h3 { font-size: var(--type-xs); color: var(--secondary); letter-spacing: .5px; }
.trial-stats.stat-chips { border: 0; padding: 8px 0; gap: 8px; }
.trial-stats.stat-chips span { background: transparent; border: 0; padding: 8px 0; font: 600 var(--type-xs)/1.4 var(--text); text-transform: none; }
.trial-stats.stat-chips b { font: 700 var(--type-title)/1.2 var(--text); font-variant-numeric: tabular-nums; }
.verdict-actions { gap: 8px; margin-top: 16px; }
/* Round 8: the actions under the full ruling are the game's quiet outline buttons (.btn.ghost),
   not bare words: Copy text and Your own case side by side, a third action (Next case or the
   appeal) across the full width above them. Never red: the poster keeps the primary. */
.verdict-actions:has(> .text-action) { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.verdict-actions > .text-action:nth-last-child(3) { grid-column: 1 / -1; }
.verdict-actions .text-action { border-color: var(--divider); color: var(--text-color); }
.verdict-actions .text-action:hover { background: var(--raised); }
.objection-label { font: 700 var(--type-xs)/1 var(--text); color: var(--muted); }
.stat-chips b, .rap-grid b, .mug-plate, #rap-sheet h3 { font-family: var(--text); }
.look-thumb span { font-size: var(--type-xs); }
.sprite.bounce, .sprite.jolt, .sprite.lunge { animation: sprite-in 180ms ease-out; }
.sprite .portrait-art { animation: portrait-settle 180ms ease-out; }
.burst, .stamp.on, .slam span { animation-timing-function: ease-out; }
@media (max-height: 720px) {
  :root { --balloon-height: 132px; }
  .scene, .scene:has(.portrait) { min-height: calc(var(--balloon-height) + 208px); }
  .jcell .mini { width: 34px; height: 34px; }
  .jcell .jname { display: none; }
}
@media (max-width: 359px) { .phase { font-size: var(--type-xs); }.jury-key { gap: 4px; font-size: .6875rem; } }

/* The balloon tail points into the stage without moving its content. */
.scene::after { content: ''; position: absolute; z-index: 6; left: 32px; bottom: 139px; width: 12px; height: 12px; background: var(--panel); border-left: 1px solid var(--divider); border-top: 1px solid var(--divider); transform: rotate(45deg); pointer-events: none; }

html[data-input="pointer"] :focus-visible { outline: none !important; }
.objection-sheet::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: auto; }

/* Painted scene art (public/ASSETS.md). Each image loads only when its role, event or verdict is shown.
   The procedural backgrounds above stay underneath as the load-failure fallback; overlays keep sprites and type on top. */
.stage { --scene-art: none; }
.stage.role-judge { --scene-art: url(art/scene/stage-judge.webp); }
.stage.role-defense { --scene-art: url(art/scene/stage-defense.webp); }
.stage.role-prosecutor { --scene-art: url(art/scene/stage-prosecutor.webp); }
.stage.role-jury { --scene-art: url(art/scene/stage-jury.webp); }
.stage.role-witness { --scene-art: url(art/scene/stage-witness.webp); }
.stage.role-room { --scene-art: url(art/scene/stage-room.webp); }
.stage-bg::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse 90% 70% at 50% 36%, transparent 35%, rgb(from var(--ink) r g b / 0.6) 100%),
    linear-gradient(180deg, rgb(from var(--ink) r g b / 0.4), rgb(from var(--ink) r g b / 0.22) 30%, rgb(from var(--ink) r g b / 0.5)),
    var(--scene-art) 50% 28% / cover no-repeat;
}
.title-wrap {
  background:
    linear-gradient(180deg, rgb(from var(--night) r g b / 0.42), rgb(from var(--night) r g b / 0.7) 40%, rgb(from var(--night) r g b / 0.92) 70%),
    url(art/scene/title.webp) 50% 20% / cover no-repeat,
    var(--night);
}
.banner.has-art { top: 8px; padding: 0; overflow: hidden; border: 1px solid var(--divider); background: var(--ink); }
.banner-art { display: block; width: 100%; aspect-ratio: 16 / 9; max-height: min(210px, 34svh); object-fit: cover; }
.banner.has-art strong { padding: 8px 12px; border-top: 3px solid var(--secondary); }
.serious .banner-art { display: none; }
.shout.has-art { display: flex; flex-direction: column; justify-content: center; padding: 8px; box-sizing: border-box; background: rgb(from var(--ink) r g b / 0.8); }
.shout-art { display: block; width: 100%; max-height: min(210px, 34svh); aspect-ratio: 16 / 9; object-fit: cover; border: 1px solid var(--divider); }
.shout.has-art .burst { flex: 0 0 auto; width: 100%; aspect-ratio: auto; min-height: 52px; padding: 10px 0; background: var(--ink); animation: none; }
.shout.has-art .burst::before, .shout.has-art .burst::after { content: none; }
.shout.has-art .burst .word { color: var(--text-color); font-size: clamp(2rem, 10vw, 3.2rem); transform: none; }
#screen-verdict { position: relative; isolation: isolate; }
#screen-verdict[data-splash]::before {
  content: ''; position: absolute; z-index: -1; inset: 0 0 auto; height: min(460px, 70svh); pointer-events: none;
  background:
    radial-gradient(ellipse 70% 30% at 50% 34%, rgb(from var(--night) r g b / 0.5), transparent),
    linear-gradient(180deg, rgb(from var(--night) r g b / 0.55), rgb(from var(--night) r g b / 0.78) 55%, var(--night)),
    var(--splash-art) 50% 30% / cover no-repeat;
}
#screen-verdict[data-splash="guilty"] { --splash-art: url(art/scene/verdict-guilty.webp); }
#screen-verdict[data-splash="notguilty"] { --splash-art: url(art/scene/verdict-notguilty.webp); }
#screen-verdict[data-splash] .verdict-card { background: transparent; }

/* Nano Banana scene illustrations keep live text and controls in HTML. */
#screen-create .screen-head {
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  min-height: clamp(104px, 17svh, 144px);
  padding: 16px;
  border: 1px solid var(--divider);
  border-radius: 4px;
  background:
    linear-gradient(90deg, transparent 20%, rgb(14 15 23 / .75) 50%, rgb(14 15 23 / .9)),
    url(art/scene/case-file.webp) center / cover no-repeat,
    var(--night);
}
#screen-jury {
  min-height: 100svh;
  background:
    linear-gradient(180deg, rgb(22 24 39 / .55), rgb(22 24 39 / .8) 45%, var(--night)),
    url(art/scene/jury-selection.webp) center top / 100% auto no-repeat,
    var(--night);
}
#screen-jury .screen-head {
  padding: 20px 8px 12px;
  background: rgb(22 24 39 / .65);
  border-radius: 4px;
}
#app:not(.serious) .scene:has(.dtext.loading) .stage-bg {
  filter: none;
  animation: none;
}
#app:not(.serious) .scene:has(.dtext.loading) .stage-bg::before { display: none; }
#app:not(.serious) .scene:has(.dtext.loading) .stage::after { opacity: 0; }
#app:not(.serious) .scene:has(.dtext.loading) .stage-bg::after {
  background:
    linear-gradient(0deg, rgb(14 15 23 / .65), transparent 55%),
    url(art/scene/bailiff-loading.webp) 22% top / cover no-repeat;
}
#app:not(.serious) .scene:has(.dtext.loading) .sprite,
#app:not(.serious) .scene:has(.dtext.loading) .desk,
#app:not(.serious) .scene:has(.dtext.loading) .speed { visibility: hidden; }

/* Booking Desk: the same painted creator mounts in the game and previews. */
#screen-profile.active { display: flex; flex-direction: column; height: 100svh; min-height: 0; padding: calc(var(--menu-top) + 46px) 12px 0; animation: creator-fade 140ms ease-out; }
#screen-profile .screen-head { flex: 0 0 auto; margin: 0 0 8px; }
#screen-profile .screen-head h2 { margin: 0; font-size: var(--type-subtitle); }
.booking-creator { min-height: 0; min-width: 0; flex: 1; color: var(--text-color); }
.booking-creator[hidden] { display: none; }
.booking-creator #profile-form { display: flex; flex-direction: column; height: 100%; min-height: 0; margin: 0; gap: 0; }
.booking-creator button { min-width: 44px; min-height: 44px; cursor: pointer; border-radius: 4px; touch-action: manipulation; }
.booking-creator button:active { transform: none; }
.booking-creator button[aria-pressed="true"], .booking-creator button[aria-selected="true"] { border-color: var(--secondary); background-color: var(--raised); color: var(--text-color); }
.booking-creator #creator-preview { flex: 1 1 350px; min-height: 200px; max-height: 400px; margin: 0; display: flex; flex-direction: column; gap: 0; overflow: hidden; border: 1px solid var(--divider); border-radius: 8px 8px 0 0; background: linear-gradient(0deg, rgb(14 15 23 / .8), transparent 40%), url('art/scene/creator.webp') center/cover; }
.booking-caption { display: flex; justify-content: space-between; gap: 8px; padding: 8px 12px 0; font-size: var(--type-xs); letter-spacing: .04em; color: var(--secondary); }
.booking-caption span:last-child { text-align: right; letter-spacing: 0; }
.booking-portrait-row { display: flex; flex: 1; min-height: 0; justify-content: center; align-items: center; gap: 0; }
.booking-creator #creator-preview .mugshot { display: block; flex: 1; min-width: 0; min-height: 0; max-width: 256px; height: 100%; width: auto; margin: 0; padding: 0; border: 0; background: transparent; box-shadow: none; touch-action: pan-y; }
.booking-creator #mugshot .portrait { width: 100%; height: 100%; display: block; object-fit: contain; animation: creator-fade 130ms ease-out; }
.booking-creator .face-arrow { display: grid; place-items: center; flex: 0 0 44px; padding: 0; margin: 0 2px; border: 1px solid var(--divider); background: rgb(22 24 39 / .85); color: var(--text-color); }
.booking-creator #creator-preview .mug-plate { align-self: center; width: auto; max-width: calc(100% - 24px); white-space: nowrap; text-overflow: ellipsis; overflow: hidden; margin: 0; padding: 4px 16px; border: 1px solid var(--divider); border-radius: 3px; background: var(--night); color: var(--text-color); font: 700 var(--type-body)/1.4 var(--text); letter-spacing: .02em; }
.booking-tip { margin: 4px 0 8px; font-size: var(--type-xs); color: var(--secondary); text-align: center; }
/* Three steps (Look · Colours · Name): the step row, then a drawer of fixed height so the portrait never jumps. */
.creator-steps { flex: 0 0 auto; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0; padding: 0; list-style: none; border: 1px solid var(--divider); border-top: 0; background: var(--night); }
.creator-steps li { min-width: 0; }
.creator-steps button { width: 100%; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 4px; border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; color: var(--muted); font: 700 var(--type-sm)/1.2 var(--text); }
.creator-steps button b { display: grid; place-items: center; width: 20px; height: 20px; border: 1px solid currentColor; border-radius: 50%; font: 700 .6875rem/1 var(--text); }
.creator-steps button.done { color: var(--secondary); }
.creator-steps button[aria-current="step"] { color: var(--text-color); background: var(--raised); border-bottom-color: var(--text-color); }
.creator-steps button[aria-current="step"] b { background: var(--text-color); color: var(--ink); border-color: var(--text-color); }
.creator-drawer { flex: 0 0 auto; height: var(--drawer-h, 296px); margin-top: 8px; padding: 8px; overflow-y: auto; border: 1px solid var(--divider); border-radius: 4px; background: var(--panel); scrollbar-color: var(--muted) var(--panel); overscroll-behavior: contain; }
.creator-step[hidden] { display: none; }
.creator-label { display: block; margin: 0 0 6px; font: 700 var(--type-sm)/1.4 var(--text); color: var(--secondary); }
.creator-label b { font-weight: 700; color: var(--text-color); }
.creator-bands { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 8px; }
.creator-bands button { min-width: 0; padding: 4px; border: 1px solid var(--divider); background: transparent; color: var(--secondary); font: 700 var(--type-sm)/1.2 var(--text); }
/* Eight big cards: each one a different hairstyle and face, named by the hairstyle. */
.look-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.booking-creator .look-thumb { display: grid; grid-template-rows: auto auto; min-width: 0; padding: 0; overflow: hidden; border: 1px solid var(--divider); background: var(--raised); color: var(--secondary); border-radius: 4px; }
.booking-creator .look-thumb .look-face { display: block; height: var(--card-face, 84px); overflow: hidden; background: linear-gradient(0deg, var(--night), var(--raised)); }
.booking-creator .look-thumb .look-face .portrait { width: 100%; height: 100%; object-fit: cover; object-position: center 12%; transform: scale(1.18); transform-origin: center 20%; }
.booking-creator .look-thumb > span:last-child { display: block; padding: 4px 2px; font: 700 var(--type-xs)/1.25 var(--text); text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.booking-creator .look-thumb[aria-pressed="true"] { border-color: var(--text-color); box-shadow: inset 0 0 0 1px var(--text-color); background: var(--raised); color: var(--text-color); }
/* Colours: round swatches, the chosen colour's name beside the heading. */
.creator-swatches { display: flex; flex-wrap: wrap; gap: 6px; }
.booking-creator .creator-swatch { position: relative; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid transparent; border-radius: 50%; background: transparent; }
.creator-swatch i { width: 30px; height: 30px; border: 1px solid rgb(243 239 230 / .45); border-radius: 50%; }
.booking-creator .creator-swatch[aria-pressed="true"] { border: 2px solid var(--text-color); background: transparent; }
.creator-swatch:disabled { opacity: .35; cursor: not-allowed; }
.creator-swatch span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.creator-swatches + .field-hint { margin: 4px 0 10px; }
.creator-swatches + .field-hint:empty { display: none; }
.creator-swatches + .field-hint:empty + .creator-label { margin-top: 10px; }
.booking-creator .field-hint { margin: 6px 0 0; }
.booking-creator input { width: 100%; min-width: 0; min-height: 48px; padding: 10px 12px; font-size: 1rem; color: var(--text-color); background: var(--night); border: 1px solid var(--divider); border-radius: 4px; }
.booking-creator input:focus { outline: none; border-color: var(--secondary); }
/* The arrows step through the looks of the chosen age, on the Look step only. */
#profile-form:not([data-current-step="look"]) .face-arrow { visibility: hidden; }
.creator-notice { flex: 0 0 auto; font-size: var(--type-xs); color: var(--secondary); margin: 4px 0 0; }
.creator-notice:empty { display: none; }
.creator-actions { flex: 0 0 auto; display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 8px; padding: 8px 0 max(8px, env(safe-area-inset-bottom)); background: var(--night); }
.creator-actions .btn { padding: 8px; min-height: 48px; }
.creator-actions #btn-save-profile, .creator-actions #btn-creator-next { background: var(--accent); color: var(--text-color); border: 1px solid var(--accent); }
.creator-actions .btn[hidden] { display: none; }
#creator-discard { max-width: min(360px, calc(100vw - 32px)); padding: 20px; border: 1px solid var(--divider); border-radius: 8px; background: var(--panel); color: var(--text-color); }
#creator-discard::backdrop { background: rgb(14 15 23 / .85); }
#creator-discard h2 { margin: 0; font-size: var(--type-lead); }
#creator-discard > div { display: flex; gap: 8px; }
#profile-save-notice:empty { display: none; }
#profile-save-notice:not(:empty) { position: fixed; z-index: 95; bottom: 8px; left: max(8px, calc((100vw - 464px)/2)); max-width: min(464px, calc(100% - 16px)); margin: 0; padding: 12px; border: 1px solid var(--divider); border-radius: 4px; background: var(--panel); color: var(--text-color); font-size: var(--type-sm); }
@keyframes creator-fade { from { opacity: .5; } to { opacity: 1; } }
@media (max-height: 720px) {
  #screen-profile.active { padding-top: calc(var(--menu-top) + 44px); }
  #screen-profile .screen-head { margin-bottom: 4px; }
  #screen-profile .screen-head h2 { font-size: var(--type-lead); }
  .booking-creator #creator-preview { flex-basis: 250px; min-height: 160px; }
  .booking-caption { padding-top: 4px; }
  .booking-tip { margin: 2px 0 4px; font-size: .6875rem; }
  .booking-creator #creator-preview .mug-plate { padding-block: 2px; font-size: var(--type-sm); }
  /* Short phones: the name placard sits on the portrait, like a booking photo, to give the face more room. */
  .booking-creator #creator-preview { position: relative; }
  .booking-creator #creator-preview .mug-plate { position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); }
  .booking-creator { --drawer-h: 244px; --card-face: 56px; }
  .creator-drawer { margin-top: 4px; padding: 6px; }
  .creator-bands { margin-bottom: 6px; }
  .creator-swatches { gap: 2px 4px; }
  .creator-label { margin-bottom: 2px; }
  .creator-swatches + .field-hint:empty + .creator-label { margin-top: 4px; }
  .creator-actions { padding-top: 4px; gap: 4px; }
}
@media (max-width: 359px) { .booking-creator .face-arrow { margin: 0; } .booking-caption { font-size: .6875rem; } }

/* Court clerk error: the box grows to fit the message and every action, so no button is clipped at phone sizes. */
.scene .dialogue.error-state { height: auto; max-height: none; overflow: visible; }
/* The clerk speaks off stage: no speech tail pointing at the defendant. */
.scene:has(.dialogue.error-state)::after { display: none; }
.error-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.error-actions .btn { flex: 1 1 auto; margin-top: 0; min-height: var(--target, 44px); }
.local-verdict { margin: 12px 0; padding: 10px 12px; border: 1px solid var(--divider); border-radius: 4px; color: var(--secondary); font: 500 var(--type-sm, 0.9rem)/1.5 var(--text, inherit); }

/* ---------- Fair fight: an honest, readable jury on one phone screen ---------- */
/* The courtroom is exactly one screen tall: the top bar never scrolls away. While
   answering, the stage gives up height first, then the answer list scrolls inside
   itself so the own-words box always stays at the bottom. */
.court { height: 100vh; height: 100svh; min-height: 0; }
.lower { display: flex; flex-direction: column; flex: 0 1 auto; min-height: 0; gap: 6px; padding-top: 6px; }
.lower > * { flex: 0 0 auto; }
.lower > .choices:not(.hidden):not(.objection-sheet) { display: flex; flex-direction: column; flex: 0 1 auto; min-height: 0; gap: 6px; }
.choices:not(.objection-sheet) .choice-list { flex: 0 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; gap: 6px; }
.choices:not(.objection-sheet) .choice-head { min-height: 44px; }
.choices:not(.objection-sheet) .choice { min-height: 56px; padding: 8px 12px; }
.choices:not(.objection-sheet) .choice .tone { margin-bottom: 2px; }
.court:has(.choices:not(.hidden)) .scene, .court:has(.choices:not(.hidden)) .scene:has(.portrait) { min-height: calc(var(--balloon-height) + 64px); }
/* A strip under each meter holds the change chip, so it never covers a face. */
.jcell { padding: 4px 2px 30px; overflow: visible; }

/* Signed change chips: bold, 16px, teal towards NOT GUILTY, coral towards GUILTY, on ink. */
.jcell .delta, html[data-motion="reduced"] .jcell .delta {
  display: block; position: absolute; top: auto; left: 50%; right: auto; bottom: 3px; margin: 0; z-index: 9; width: max-content;
  transform: translateX(-50%); padding: 1px 7px; border: 2px solid currentColor; border-radius: 4px;
  background: var(--ink); font: 800 1rem/1.25 var(--text); font-variant-numeric: tabular-nums; text-shadow: none; pointer-events: none;
  animation: chip-pop 220ms ease-out both;
}
.jcell .delta.up { color: var(--success); }
.jcell .delta.down { color: var(--accent-text); }
@keyframes chip-pop { from { transform: translateX(-50%) scale(1.6); opacity: 0; } to { transform: translateX(-50%) scale(1); opacity: 1; } }
html[data-motion="reduced"] .jcell .delta { animation: none; }
@media (prefers-reduced-motion: reduce) { html:not([data-motion="full"]) .jcell .delta { display: block; animation: none; } }

/* The jury is out (deliberation banner to the last vote): each marker stays, dimmed, where it
   stood before the closing statement; a juror's vote lights their cell and slides the marker to
   its final place; empty segments are outlines that fill one vote at a time. */
.jurybar.sealed .jcell { cursor: default; }
.jurybar.sealed .jcell:not(.voted) .meter { opacity: .45; }
.jurybar.sealed .jcell:not(.voted) .mini { filter: saturate(.4) brightness(.8); }
.jurybar.sealed .jcell.voted .meter i { transition: left 600ms ease-out; }
html[data-motion="reduced"] .jurybar.sealed .jcell.voted .meter i { transition: none; }
.jury-key .split-meter.sealed-meter { display: flex; flex: 1; gap: 3px; }
.split-meter.sealed-meter i { height: 6px; }
.split-meter.sealed-meter i:not(.ng):not(.g) { background: transparent; box-shadow: inset 0 0 0 1px var(--muted); }
/* The closing choice names the stake: a quiet restatement of the tally, never a hint. */
.choice-prompt .stake-line { display: block; margin-top: 2px; font: 500 var(--type-xs)/1.35 var(--text); color: var(--secondary); }
/* After a sustained objection the withdrawn question stays above the new one, crossed out in
   --muted; the line draws across in about 300 ms (reduced motion: already drawn). */
.choice-prompt .struck-question { display: block; margin-bottom: 2px; font: 600 var(--type-xs)/1.35 var(--text); color: var(--muted); }
.choice-prompt .struck-question s { text-decoration: none; background: linear-gradient(currentColor, currentColor) no-repeat 0 55% / 100% 1.5px; animation: strike-draw 300ms ease-out both; }
@keyframes strike-draw { from { background-size: 0 1.5px; } }
html[data-motion="reduced"] .choice-prompt .struck-question s { animation: none; }

/* Thought bubbles: tap to dismiss. The biggest mover's thought is larger, with a tail. */
.thought { pointer-events: auto; cursor: pointer; font: 700 var(--type-sm)/1.3 var(--text); max-width: 190px; padding: 8px 10px; border-radius: 10px; background: var(--text-color); color: var(--ink); border: 2px solid var(--ink); }
.thought.featured { font-size: var(--type-body); max-width: 220px; box-shadow: 3px 4px var(--ink); }
.thought.featured::after { content: ''; position: absolute; top: 100%; left: 50%; width: 10px; height: 10px; margin: -5px 0 0 -5px; background: var(--text-color); border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg); }
.jcell:first-child .thought.featured::after { left: 24px; }
.jcell:last-child .thought.featured::after { left: auto; right: 19px; }
/* showThought() nudges a bubble back inside the phone column; the tail stays over its juror.
   The bubble only fades in: animating transform would drop its centring for a moment. */
.thought { translate: var(--nudge, 0px) 0; animation-name: thought-in; }
@keyframes thought-in { from { opacity: 0; } }
.thought.featured::after { translate: var(--tail, 0px) 0; }
html[data-motion="reduced"] .thought { animation: none; }
/* makeRoom() slides the dialogue box and its tail up while a bubble is on screen, so a bubble never covers the words. */
.dialogue, .scene::after { translate: 0 calc(-1 * var(--lift, 0px)); transition: translate 160ms ease-out; }
html[data-motion="reduced"] .dialogue, html[data-motion="reduced"] .scene::after { transition: none; }

/* Ruling stamp line: "Sustained · jury +6" / "Overruled · jury −6". */
.stamp.ruling { top: 12px; left: 50%; right: auto; transform: translateX(-50%) rotate(-3deg); white-space: nowrap; padding: 4px 14px;
  font: 800 var(--type-lead)/1.3 var(--text); letter-spacing: .5px; border: 3px double currentColor; background: var(--ink); animation: ruling-in 240ms ease-out; }
.stamp.ruling.sustained { color: var(--success); }
.stamp.ruling.overruled { color: var(--accent-text); }
@keyframes ruling-in { from { transform: translateX(-50%) rotate(-3deg) scale(1.8); opacity: 0; } to { transform: translateX(-50%) rotate(-3deg) scale(1); opacity: 1; } }
html[data-motion="reduced"] .stamp.ruling { animation: none; }
.objection-stakes { margin: 0 0 4px; font: 700 var(--type-sm)/1.4 var(--text); color: var(--text-color); }
/* A written case: one fixed line, the same for every question (never a hint). */
.objection-note { margin: 0 0 2px; font: 500 var(--type-sm)/1.4 var(--text); color: var(--secondary); }

/* Verdict numbers: readable labels and a small line of context under each. */
.trial-stats.stat-chips span { color: var(--secondary); }
.trial-stats.stat-chips small { display: block; font: 500 var(--type-xs)/1.3 var(--text); color: var(--secondary); }

@media (max-height: 720px) {
  .court:has(.choices:not(.hidden)) .scene, .court:has(.choices:not(.hidden)) .scene:has(.portrait) { min-height: calc(var(--balloon-height) + 40px); }
  /* Serious cases keep their quiet, balloon-only answering layout on short screens. */
  .serious .court:has(.choices:not(.hidden)) .sprite { visibility: hidden; }
}
@media (max-height: 699px) {
  /* Below the Fold's usable height, preserve the compact answering layout. At 700px
     and above the existing bust sizing has room to draw the speaker over the box. */
  .court:has(.choices:not(.hidden)) .sprite { visibility: hidden; }
}
/* Serious mode stays calm: no score tally. */
.serious #tally { display: none; }

/* "Only you know this one": the question needs a fact only the player has. */
.only-you { margin: 0; padding: 2px 0 2px 10px; border-left: 3px solid var(--accent); font: 700 var(--type-sm)/1.35 var(--text); color: var(--text-color); }
.choice-own.ask input { border-color: var(--accent); }
.choice-own.ask input::placeholder { color: var(--secondary); }
.serious .only-you { display: none; }

/* ---------- First minute and last minute (2026-11-11) ---------- */
/* One shared outlined secondary button: clearly a button, never competing with the red primary. */
.btn.outline { background: transparent; color: var(--text-color); border: 2px solid var(--secondary); box-shadow: none; }
.btn.outline:active { background: var(--raised); }

/* Title: The Docket (primary), Your own case (outlined, with today's live trials), then the defendant chip and the jury pool. */
.title-actions { display: grid; gap: 10px; width: 100%; margin-top: 4px; }
.title-actions #btn-docket, .title-actions #btn-start, .title-actions #btn-profile { margin: 0; width: 100%; }
/* Your own case leads in red with its count beneath; outlined (with its reason) when it cannot start. */
.title-actions #btn-start { display: grid; justify-items: center; align-content: center; gap: 0; font: 700 var(--type-body)/1.3 var(--text); padding: 6px 16px; }
.title-actions #btn-start:not(.outline) { border: 2px solid var(--accent); }
.title-actions #btn-start:not(.outline) small { color: var(--ink); font-weight: 600; }
.title-actions #btn-start.outline { border: 2px solid var(--secondary); color: var(--text-color); }
.title-actions #btn-start small { font: 500 var(--type-xs)/1.35 var(--text); color: var(--secondary); }
.title-actions #btn-start small:empty { display: none; }
.title-actions #btn-start.spent { border-color: var(--divider); }
.title-actions #btn-start.spent small { color: var(--muted); }
.title-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, auto); gap: 10px; }
.who-chip, .pool-chip { display: flex; align-items: center; gap: 10px; min-height: 56px; padding: 4px 12px 4px 4px; text-align: left; color: var(--text-color); background: rgb(from var(--panel) r g b / .88); border: 1px solid var(--divider); border-radius: 4px; cursor: pointer; }
.who-chip:active, .pool-chip:active { background: var(--raised); }
.who-face { flex: 0 0 44px; width: 44px; height: 48px; overflow: hidden; border-radius: 3px; background: var(--raised); }
.who-face .portrait { width: 100%; height: 100%; object-fit: cover; object-position: center 27%; transform: scale(1.65); transform-origin: 50% 30%; }
.who-face svg { width: 100%; height: 100%; }
.who-text { display: grid; min-width: 0; }
.who-text small, .pool-chip small { font: 600 var(--type-xs)/1.3 var(--text); color: var(--muted); }
.who-text b { font: 700 var(--type-sm)/1.3 var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pool-chip { flex-direction: column; justify-content: center; align-items: flex-start; gap: 0; padding: 4px 14px; font: 700 var(--type-sm)/1.3 var(--text); }
.mode:empty { display: none; }

/* First-run name step: one face, one name, one button. */
.name-step { display: grid; gap: 10px; }
.name-face { display: grid; grid-template-columns: 44px minmax(0, 1fr) 44px; align-items: center; gap: 8px; height: clamp(200px, 38svh, 340px); background: linear-gradient(0deg, rgb(14 15 23 / .85), transparent 45%), url('art/scene/creator.webp') center / cover, var(--panel); border: 1px solid var(--divider); border-radius: 4px; padding: 0 6px; }
.name-portrait { height: 100%; min-width: 0; min-height: 0; overflow: hidden; display: flex; justify-content: center; align-items: flex-end; touch-action: pan-y; }
.name-portrait .portrait { height: 100%; max-height: 100%; min-height: 0; width: auto; max-width: 100%; object-fit: contain; }
.name-face { overflow: hidden; grid-template-rows: 100%; }
.name-portrait svg { height: 100%; }
.name-face .face-arrow { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; color: var(--text-color); background: rgb(22 24 39 / .85); border: 1px solid var(--divider); border-radius: 4px; cursor: pointer; }
.name-label { font: 700 var(--type-sm)/1.4 var(--text); color: var(--secondary); margin-top: 4px; }
#name-input { width: 100%; min-height: 48px; padding: 10px 12px; font-size: 1rem; background: var(--ink); color: var(--text-color); border: 1px solid var(--divider); border-radius: 4px; }
#name-input:focus { outline: none; border-color: var(--secondary); }
.starter-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.starter-chips button { min-height: 44px; min-width: 44px; padding: 6px 14px; font: 600 var(--type-sm)/1.2 var(--text); color: var(--secondary); background: transparent; border: 1px solid var(--divider); border-radius: 999px; cursor: pointer; }
.starter-chips button:active { background: var(--raised); }
.name-step .form-error:empty { display: none; }

/* Case form: starters above the box, a plain line about where the story goes under it. */
.form-panel > label[for="story-input"] { font-weight: 800; font-size: var(--type-sm); color: var(--muted); margin-bottom: -6px; }
.starter-chips { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.starter-chips button { padding: 6px 4px; }
.form-panel textarea { min-height: 140px; }
.privacy-line { margin: -4px 0 0; color: var(--secondary); font: 500 var(--type-xs)/1.5 var(--text); }
.privacy-line .link-btn { min-height: 44px; min-width: 44px; padding: 0 4px; margin: -12px 0; color: var(--text-color); font: 700 var(--type-xs)/1.5 var(--text); vertical-align: baseline; }

/* Sheets (privacy, replace): same quiet surface as the leave sheet. */
dialog.sheet { width: min(420px, calc(100vw - 32px)); max-height: calc(100svh - 48px); overflow: auto; padding: 20px; color: var(--text-color); background: var(--panel); border: 1px solid var(--divider); border-radius: 8px; }
dialog.sheet::backdrop { background: rgb(14 15 23 / .85); }
dialog.sheet h2 { margin: 0 0 8px; font: 700 var(--type-lead)/1.3 var(--text); }
dialog.sheet h3 { margin: 14px 0 2px; font: 700 var(--type-sm)/1.4 var(--text); color: var(--secondary); }
dialog.sheet p { margin: 0; font: 500 var(--type-sm)/1.55 var(--text); color: var(--text-color); }
dialog.sheet > .btn { width: 100%; margin-top: 18px; }
.sheet-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }

/* Case card: the quick-trial accusation, read before any jury is drawn. */
#screen-casecard { display: none; flex-direction: column; min-height: 100svh; }
#screen-casecard.active { display: flex; }
.case-card { flex: 1 1 auto; display: flex; flex-direction: column; justify-content: flex-end; min-height: 0; margin: 0 0 16px; padding: 20px 18px; border: 1px solid var(--divider); border-radius: 4px; background: linear-gradient(180deg, rgb(14 15 23 / .1), rgb(14 15 23 / .78) 38%, rgb(14 15 23 / .96) 62%), url(art/scene/case-file.webp) center top / 100% auto no-repeat, var(--panel); }
.case-kicker { margin: 0 0 8px; font: 700 var(--type-xs)/1.4 var(--text); letter-spacing: .08em; text-transform: uppercase; color: var(--secondary); }
.case-card h2 { margin: 0 0 12px; font: 400 var(--type-title)/1.2 var(--display); color: var(--text-color); overflow-wrap: anywhere; }
.case-story { margin: 0 0 12px; font: 500 var(--type-body)/1.6 var(--text); color: var(--text-color); }
.case-question { margin: 0 0 14px; font: 700 var(--type-body)/1.5 var(--text); color: var(--secondary); }
.case-role { display: inline-block; margin: 0; padding: 4px 10px; font: 700 var(--type-sm)/1.4 var(--text); color: var(--text-color); border: 1px solid var(--secondary); border-radius: 3px; }
.case-actions { flex: 0 0 auto; display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 8px; padding-bottom: env(safe-area-inset-bottom); }
#screen-casecard { padding-bottom: calc(16px + env(safe-area-inset-bottom)); }
#screen-casecard .case-actions .btn { width: 100%; }
@media (max-width: 359px) {
  /* A long case file scrolls on the Fold cover: Menu leaves with the page, so the
     accusation never passes underneath it. Other screens keep their navigation. */
  #app:has(#screen-casecard.active) > .home-menu { position: absolute; left: 6px; }
}

/* Juror cards: short name, job, what moves them, and the player's record. */
.jcard .details { min-width: 0; }
.jcard h4 { font-size: var(--type-body); }
.jcard .meta { font-size: var(--type-xs); }
.jcard .tell { margin: 4px 0 0; font: 600 var(--type-sm)/1.35 var(--text); color: var(--text-color); }
.jcard .record { margin: 2px 0 0; font: 600 var(--type-xs)/1.35 var(--text); color: var(--gold); }
.jury-cards { gap: 8px; }
.jcard { min-height: 92px; padding: 10px 12px; margin-top: 0; }

/* Jury pool: met jurors in colour, the rest as silhouettes. */
.pool-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.pool-card { display: grid; grid-template-rows: auto 1fr; overflow: hidden; background: var(--panel); border: 1px solid var(--divider); border-radius: 4px; }
.pool-card .face { height: 112px; overflow: hidden; background: var(--raised); }
.pool-card .face .portrait { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; }
.pool-card .face svg { width: 100%; height: 100%; }
.pool-card.unmet .face .portrait, .pool-card.unmet .face svg { filter: brightness(0); opacity: .55; }
.pool-card .details { padding: 8px 10px 10px; min-width: 0; }
.pool-card h3 { margin: 0; font: 700 var(--type-sm)/1.3 var(--text); overflow-wrap: anywhere; }
.pool-card.unmet h3 { color: var(--muted); font-weight: 600; }
.pool-card .meta { margin: 0; font: 500 var(--type-xs)/1.35 var(--text); color: var(--secondary); }
.pool-card .tell { margin: 6px 0 0; font: 600 var(--type-xs)/1.4 var(--text); color: var(--text-color); }
.pool-card .record { margin: 4px 0 0; font: 600 var(--type-xs)/1.35 var(--text); color: var(--gold); }
.pool-card .record:empty { display: none; }

/* Verdict poster: one screen, one big moment. The figure gives up height so the poster,
   its buttons and the share line fit 390×844 without scrolling; long text wraps, never clips. */
#screen-verdict .verdict-card { padding-top: 0; }
.poster-screen { display: flex; flex-direction: column; min-height: calc(100svh - var(--menu-clear) - 24px - env(safe-area-inset-bottom)); }
.poster { flex: 1 1 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; min-height: 0; padding: 14px 14px 12px; text-align: center; background: rgb(from var(--night) r g b / .72); border: 1px solid var(--divider); border-radius: 4px; }
.poster-title { margin: 0; font: 600 var(--type-sm)/1.3 var(--text); color: var(--secondary); max-width: 100%; }
.poster-title b, .poster .verdict-defendant { display: block; margin: 2px 0 0; white-space: normal; overflow: visible; text-overflow: clip; overflow-wrap: anywhere; font: 400 clamp(1.35rem, 6.4vw, 1.75rem)/1.2 var(--display); color: var(--text-color); }
.poster-charge, .poster-sentence { margin: 0; max-width: 100%; overflow-wrap: anywhere; }
.poster-charge small, .poster-sentence small { display: block; font: 700 var(--type-xs)/1.3 var(--text); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.poster-charge span { font: 700 var(--type-lead)/1.3 var(--text); color: var(--text-color); }
.poster-sentence span { font: 500 var(--type-sm)/1.45 var(--text); color: var(--text-color); }
/* The figure's height is set by fitPoster() (game.js) from the space the other parts
   leave; the portrait sits inside it absolutely, so it can never push into, or paint
   over, the vote and sentence below (WebKit does not resolve a percentage height in a
   flexed box the way Chromium does). */
.poster-figure { position: relative; flex: 0 0 auto; height: var(--figure-h, clamp(120px, 30svh, 300px)); width: 100%; }
.poster-portrait { position: absolute; top: 0; bottom: 0; left: 50%; transform: translateX(-50%); height: 100%; aspect-ratio: 4 / 5; max-width: 100%; overflow: hidden; background: var(--panel); border: 2px solid var(--ink); border-radius: 2px; }
.poster-portrait .portrait { width: 100%; height: 100%; object-fit: cover; object-position: center 15%; }
.poster-portrait svg { width: 100%; height: 100%; }
/* The stamp scales with the portrait (as on the shared picture), so a short phone's
   small portrait is never buried under it; it stays inside the frame when tilted. */
.poster .big-stamp { position: absolute; left: 50%; bottom: clamp(18px, calc(var(--figure-h, 300px) * .08), 30px); transform: translateX(-50%) rotate(-7deg); margin: 0; white-space: nowrap; z-index: 1; background: rgb(from var(--ink) r g b / .88); border: 4px double currentColor; padding: 4px 12px; font: 400 clamp(1.1rem, min(8vw, calc(var(--figure-h, 300px) * .15)), 2.1rem)/1.15 var(--display); }
.poster .big-stamp.guilty { color: var(--accent); }
.poster .big-stamp.notguilty { color: var(--success); }
.poster .verdict-score { margin: 0; gap: 12px; font: 400 var(--type-title)/1.1 var(--display); }
.poster .rank { color: var(--gold); border-color: var(--gold); font: 700 var(--type-sm)/1.3 var(--text); padding: 4px 10px; }
.poster-quote { display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 2px 10px; align-items: start; width: 100%; margin: 0; padding: 8px 10px; text-align: left; background: var(--panel); border-left: 3px solid var(--secondary); border-radius: 2px; }
.poster-quote .mini { grid-row: span 2; width: 44px; height: 44px; overflow: hidden; border-radius: 2px; background: var(--raised); }
.poster-quote .mini .portrait { width: 100%; height: 100%; object-fit: cover; object-position: center 27%; transform: scale(1.65); transform-origin: 50% 30%; }
.poster-quote blockquote { margin: 0; font: 700 var(--type-sm)/1.4 var(--text); color: var(--text-color); overflow-wrap: anywhere; }
.poster-quote figcaption { font: 500 var(--type-xs)/1.3 var(--text); color: var(--secondary); }
.poster-actions { flex: 0 0 auto; display: grid; gap: 8px; padding-top: 10px; }
.poster-buttons { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 8px; }
.poster-buttons .btn { width: 100%; }
.appeal-nudge { margin: 0; text-align: center; font: 700 var(--type-body)/1.3 var(--text); color: var(--text-color); }
.share-status { margin: 0; min-height: 1.2em; text-align: center; font: 500 var(--type-xs)/1.4 var(--text); color: var(--secondary); }
.share-status:empty { display: none; }
.ruling-divider { display: flex; align-items: center; gap: 12px; margin: 24px 0 12px; font: 700 var(--type-xs)/1.4 var(--text); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.ruling-divider::before, .ruling-divider::after { content: ''; flex: 1; height: 1px; background: var(--divider); }
.ruling-question { color: var(--secondary); font-size: var(--type-sm); }

/* Serious summary: calm outlined buttons, no red primary. */
.verdict-actions.calm { grid-template-columns: 1fr; }
.verdict-actions.calm .btn.outline { border-color: var(--divider); color: var(--text-color); }
.verdict-actions.calm #btn-back-start { border-color: var(--secondary); }

@media (max-height: 720px) {
  .poster { gap: 6px; padding: 10px 12px; }
  .name-face { height: clamp(170px, 32svh, 260px); }
}
html[data-motion="reduced"] .poster *, html[data-motion="reduced"] .case-card * { animation: none !important; transition: none !important; }
#profile-save-notice { pointer-events: none; }

/* Public court: report an AI line, and the 16+ tick. Quiet, no new colours. */
.report-btn { min-height: 44px; min-width: 44px; padding: 0 8px; background: none; border: 0; color: var(--muted); font: 700 var(--type-xs)/1 var(--text); text-decoration: underline; cursor: pointer; }
.report-link { display: block; margin: 16px auto 4px; color: var(--muted); font: 500 var(--type-xs)/1.5 var(--text); }
.report-group { border: 0; padding: 0; margin: 12px 0 0; display: grid; gap: 6px; }
.report-group legend { padding: 0; margin-bottom: 4px; font: 700 var(--type-sm)/1.4 var(--text); color: var(--secondary); }
.report-choice { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 8px; align-items: start; min-height: 44px; padding: 8px 10px; background: var(--raised); border: 1px solid var(--divider); border-radius: 6px; cursor: pointer; font: 500 var(--type-sm)/1.4 var(--text); }
.report-choice span { overflow-wrap: anywhere; }
.report-choice input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); }
.report-choice:has(input:checked) { border-color: var(--text-color); }
.report-preview { margin: 4px 0 6px; padding: 10px 12px; border-left: 3px solid var(--secondary); background: var(--ink); font: 700 var(--type-sm)/1.45 var(--text); overflow-wrap: anywhere; }
dialog.sheet p.report-note, .report-status { color: var(--secondary); font: 500 var(--type-xs)/1.5 var(--text); }
.report-status { margin: 10px 0 0; min-height: 1.2em; }
.report-status:empty { display: none; }
#report-send[hidden] { display: none; }
.sheet-actions:has(#report-send[hidden]) { grid-template-columns: 1fr; }
dialog.sheet p.sheet-link { margin-top: 14px; }
dialog.sheet .sheet-link a { color: var(--text-color); font-weight: 700; }
.age-tick { display: flex; align-items: center; gap: 10px; min-height: 44px; font: 700 var(--type-sm)/1.4 var(--text); cursor: pointer; }
.age-tick[hidden] { display: none; }
/* Drawn by hand: the native box rendered as a solid dark square on the iPhone that read as ticked.
   Unticked is an empty box with a cream edge; ticked is the red accent with an ink tick. Still a real
   checkbox, so keyboard and screen readers keep its checked state. */
.age-tick input { appearance: none; -webkit-appearance: none; flex: none; width: 26px; height: 26px; margin: 0; background: transparent; border: 2px solid var(--text-color); border-radius: 3px; cursor: pointer; }
.age-tick input:checked { border-color: var(--accent); background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5' fill='none' stroke='%230e0f17' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 20px no-repeat; }
.age-tick input:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
@media (forced-colors: active) { .age-tick input { appearance: auto; -webkit-appearance: auto; } }
.age-sheet-tick { margin-top: 12px; }
/* ---------- The Docket (2026-11-11): written cases in number order ---------- */
.docket-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.docket-item { width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "no main" "daily daily"; align-items: start; gap: 4px 12px; min-height: 72px; padding: 12px; text-align: left; color: var(--text-color); background: var(--panel); border: 1px solid var(--divider); border-radius: 4px; cursor: pointer; }
.docket-item:active { background: var(--raised); }
.docket-no { grid-area: no; font: 700 var(--type-xs)/1.6 var(--text); letter-spacing: .06em; color: var(--secondary); white-space: nowrap; }
.docket-main { grid-area: main; display: grid; gap: 4px; min-width: 0; }
.docket-main b { font: 700 var(--type-body)/1.3 var(--text); overflow-wrap: anywhere; }
.docket-meta, .case-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font: 500 var(--type-xs)/1.4 var(--text); color: var(--secondary); }
.case-meta { margin: -4px 0 12px; }
.docket-daily { grid-area: daily; justify-self: start; padding: 2px 8px; font: 700 var(--type-xs)/1.4 var(--text); color: var(--accent-text); border: 1px solid var(--accent); border-radius: 3px; }
/* After Hours (2026-11-13): every Docket verdict opens one more case (docket-progress.js).
   A locked case is a quiet row, not a button: lock, number, title and its own count. */
.docket-unlock-note { margin: 6px 0 0; font: 500 var(--type-sm)/1.5 var(--text); color: var(--secondary); }
.docket-locked { display: grid; grid-template-columns: auto auto minmax(0, 1fr); grid-template-areas: "lock no main"; align-items: center; gap: 2px 10px; min-height: 48px; padding: 8px 12px; color: var(--secondary); background: transparent; border: 1px solid var(--divider); border-radius: 4px; }
.docket-lock { grid-area: lock; display: inline-flex; color: var(--secondary); }
.docket-lock .ui-icon { width: 16px; height: 16px; }
.docket-locked .docket-main { gap: 0; }
.docket-locked .docket-main b { font: 700 var(--type-sm)/1.3 var(--text); color: var(--secondary); }
.gavels { display: inline-flex; gap: 2px; }
.gavels i { display: inline-flex; color: var(--divider); }
.gavels i.on { color: var(--text-color); }
.gavels .ui-icon { width: 16px; height: 16px; }
.docket-note { margin: 12px 0 0; font: 500 var(--type-sm)/1.5 var(--text); color: var(--secondary); }
.docket-note:empty { display: none; }
.case-endings { margin-top: 14px; }
.endings-count { margin: 0 0 6px; font: 700 var(--type-xs)/1.4 var(--text); letter-spacing: .06em; text-transform: uppercase; color: var(--secondary); }
.endings { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.endings li { padding: 2px 8px; font: 500 var(--type-xs)/1.5 var(--text); color: var(--muted); border: 1px dashed var(--divider); border-radius: 3px; }
.endings li.found { color: var(--text-color); border: 1px solid var(--secondary); }
.endings li.found::before { content: '✓ '; }
.endings li.secret { min-width: 28px; text-align: center; }
.jcard.alternate { margin-top: 8px; border-style: dashed; }
.jcard.alternate[hidden] { display: none; }
.jcard.alternate .details { opacity: 1; }
.jcard.alternate small { font: 700 var(--type-xs)/1.3 var(--text); letter-spacing: .06em; text-transform: uppercase; color: var(--secondary); }
.poster-case { margin: 0; max-width: 100%; overflow-wrap: anywhere; font: 700 var(--type-xs)/1.4 var(--text); letter-spacing: .04em; color: var(--gold); }
.ending-box { background: var(--panel); border: 1px solid var(--divider); border-radius: 4px; padding: 16px; margin-top: 16px; }
.ending-box .ending-name { margin: 0 0 10px; font: 400 var(--type-subtitle)/1.25 var(--display); color: var(--text-color); }
.choice-own[hidden] { display: none; }
dialog.sheet p + p { margin-top: 8px; }

/* Ask before sending (Apple 5.1.2(i)): one calm sheet before the first live trial. */
dialog.sheet.consent p b { font-weight: 700; color: var(--text-color); }
dialog.sheet p.consent-quiet { color: var(--secondary); }
dialog.sheet p.sheet-link { margin-top: 12px; }
dialog.sheet .sheet-link .link-btn { min-height: 44px; padding: 0; font: 700 var(--type-sm)/1.4 var(--text); color: var(--text-color); text-decoration: underline; }
dialog.sheet.consent .sheet-actions { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }


/* Clarity at phone widths: player testimony has no hidden inner scroll. */
#app:not(.serious) .dialogue.player-answer { height: auto; max-height: none; overflow: visible; }
.cut-in:not(.pointing) { left: 8px; right: 8px; width: auto; transform: none; padding: 8px; grid-template-columns: minmax(0, 94px) minmax(0, 1fr); }
.cut-in:not(.pointing) .cut-faces { width: 94px; }
.cut-in:not(.pointing) strong { font-size: clamp(.95rem, 4vw, 1.2rem); overflow-wrap: anywhere; }
.jcell.pending .meter { background: var(--divider); }
.meter i { width: 10px; height: 19px; top: -7px; border-radius: 2px; box-shadow: 0 0 0 2px var(--ink); }
/* Compact seats leave room for the alternate and Begin trial on short phones.
   The roster can still scroll for enlarged type or a returning player's record. */
#screen-jury.active { display: flex; flex-direction: column; height: 100svh; min-height: 0; overflow: hidden; padding-bottom: env(safe-area-inset-bottom); }
#screen-jury .screen-head { flex: 0 0 auto; }
.jury-roster { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 4px 4px 12px; scroll-padding: 8px; }
#screen-jury .sticky-action { position: static; flex: 0 0 auto; background: var(--night); }
#screen-jury .sticky-action .alternate { margin: 0 4px 12px; }
#screen-jury .screen-head { padding: 4px 0 8px; margin: 0 0 4px; }
#screen-jury .screen-head h2 { font-size: var(--type-subtitle); }
#screen-jury #jury-hint { margin: 4px 0 0; font-size: var(--type-xs); }
#screen-jury .jury-cards { gap: 4px; margin-bottom: 0; }
#screen-jury .jcard { grid-template-columns: 40px minmax(0, 1fr); gap: 8px; min-height: 64px; padding: 4px 6px; }
#screen-jury .jcard .face { width: 40px; height: 48px; }
#screen-jury .jcard .details { padding-right: 0; }
#screen-jury .jcard h4 { font-size: var(--type-sm); line-height: 1.2; }
#screen-jury .jcard .meta { line-height: 1.2; }
#screen-jury .jcard:has(.strike-btn) .details { padding-right: 54px; }
#screen-jury .jcard .tell { margin-top: 2px; font-size: var(--type-xs); line-height: 1.25; }
#screen-jury .alternate .details { display: grid; grid-template-columns: max-content minmax(0, 1fr); column-gap: 6px; }
#screen-jury .alternate small { align-self: center; }
#screen-jury .alternate .meta, #screen-jury .alternate .tell { grid-column: 1 / -1; }
#screen-jury .strike-btn { top: 4px; right: 4px; transform: none; padding-inline: 6px; }
#screen-jury .jury-roster { padding-bottom: 4px; }
#screen-jury .sticky-action { padding-top: 4px; padding-bottom: 8px; }
#screen-jury .sticky-action .alternate { margin-bottom: 4px; }
@media (max-height: 700px) {
  #screen-jury .screen-head { padding: 0; margin: 0; }
  #screen-jury .screen-head h2 { font-size: var(--type-lead); }
}
.obj-count { max-width: 90px; text-align: center; font-size: var(--type-xs); line-height: 1.2; }
@media (max-width: 360px) {
  .court-top { grid-template-columns: 44px minmax(0, 1fr) auto; }
  .obj-count { max-width: 76px; padding-inline: 2px; }
}

#app:not(.serious) .scene:has(.player-answer) { min-height: calc(var(--dialogue-h, var(--balloon-height)) + 188px); }

.cut-in.on:not(.pointing) { animation: flip-fade 1.2s both; }
@keyframes flip-fade { 0%,100% { opacity: 0; } 14%,86% { opacity: 1; } }
#app:not(.serious) .scene:has(.player-answer)::after { bottom: calc(var(--dialogue-h, var(--balloon-height)) + 7px); }

/* Serious case (brief 21): nothing on screen keeps score, and the court summary is calm. */
.serious .jcell .meter, .serious #obj-count { visibility: hidden; }
.serious .jcell, .serious .jcell.side-guilty, .serious .jcell.side-ng { border-color: var(--divider); }
/* The answer list scrolls on small phones; its buttons must still fit every line. */
.serious .choice-list { grid-auto-rows: min-content; }
/* On the long summary, Menu scrolls away instead of covering safety guidance. */
.serious:has(#screen-verdict.active) > .home-menu { position: absolute; }
.stop-here { flex: none; min-height: var(--target); padding: 6px 12px; white-space: nowrap; color: var(--text-color); border: 1px solid var(--secondary); background: transparent; }
.summary-judge, .next-steps, .support-block { background: var(--panel); color: var(--text-color); border: 1px solid var(--divider); border-radius: 4px; padding: 16px; }
.summary-judge { border-left: 3px solid var(--secondary); }
.next-steps ul { margin: 4px 0 0; padding-left: 20px; }
.next-steps li { margin: 4px 0; overflow-wrap: anywhere; }
.support-block p + p { margin-top: 8px; }
.support-block a { color: var(--text-color); text-decoration: underline; text-underline-offset: 3px; display: inline-flex; align-items: center; min-height: var(--target); }

/* ---------- The jury strip tells the truth (2026-11-13) ---------- */
/* The lean marker overhangs a thicker track by only 2 px (4 px with its ink ring), and the
   track sits clear of the name above (the face on short phones) and the change chip below,
   so the marker never covers a name at any width. */
.jcell .meter { height: 10px; margin: 7px 2px 0; }
.jcell .meter i { top: -3px; height: 14px; }
.jcell { padding-bottom: 30px; }
.jcell .delta, html[data-motion="reduced"] .jcell .delta { bottom: 2px; padding: 0 6px; line-height: 1.2; }

/* A written case's first verdict screen invites another go: the ending count, then one restart button. */
.ending-hook { margin: 0; text-align: center; font: 700 var(--type-sm)/1.4 var(--text); font-variant-numeric: tabular-nums; color: var(--text-color); white-space: nowrap; }
.poster-buttons .another, .poster-buttons .wide { grid-column: 1 / -1; white-space: nowrap; }
/* The quote below the buttons shows only when fitPoster() moved it out of a full poster. */
.poster-quote.quote-below { display: none; margin-top: 16px; }
.poster-screen.tight .poster .poster-quote { display: none; }
.poster-screen.tight + .poster-quote.quote-below { display: grid; }

/* Serious scenes: the judge's safety words are never cut off inside the fixed balloon. The box
   grows to its text (up to almost half the screen; only longer text than any real safety line
   scrolls inside it) and the scene grows with it; the strip, which shows only names now,
   gives up its meter and chip room to make space. */
#app.serious .dialogue { height: auto; max-height: min(45svh, 320px); overflow-y: auto; }
/* While the calm answers show, the line was already read in full: the answers keep the room. */
#app.serious .court:has(.choices:not(.hidden)) .dialogue { max-height: min(30svh, 240px); }
#app.serious .scene, #app.serious .scene:has(.portrait) { min-height: calc(var(--dialogue-h, var(--balloon-height)) + 96px); }
#app.serious .court:has(.choices:not(.hidden)) .scene { min-height: calc(var(--dialogue-h, var(--balloon-height)) + 8px); }
#app.serious .scene::after { bottom: calc(var(--dialogue-h, var(--balloon-height)) + 7px); }
#app.serious .jcell { padding-bottom: 6px; }
#app.serious .jcell .meter { display: none; }

/* ---------- Hill climb round 1: the question screen breathes (2026-11-16) ---------- */
/* The question's answers arrive: the Continue bar is gone but keeps its room until then
   (setNext 'hold'), so the jury strip moves once, with the answers. */
.next-btn.holding { visibility: hidden; }
/* makeRoom() lifts the speech box clear of a thought bubble; the portrait rises and shrinks
   with it, so the speaker stays whole down to the collar instead of being cut to a head. */
.sprite, .sprite:has(> .portrait-art) {
  bottom: calc(var(--dialogue-h, var(--balloon-height)) - 8px + var(--lift, 0px));
  height: calc(100% - var(--dialogue-h, var(--balloon-height)) + 12px - var(--lift, 0px));
  transition: bottom 160ms ease-out, height 160ms ease-out;
}
html[data-motion="reduced"] .sprite { transition: none; }
/* The biggest mover's thought reads on one line where it can, so it needs less room. */
.thought.featured { max-width: min(300px, calc(100vw - 24px)); }
/* Answer cards: the tone sits tight above the answer; the answer keeps its full size.
   A serious case keeps its calm answers exactly as they were. */
#app:not(.serious) .choices:not(.objection-sheet) .choice { padding: 6px 12px; min-height: 52px; }
#app:not(.serious) .choices:not(.objection-sheet) .choice .tone { margin-bottom: 0; line-height: 1.25; }
/* The flip banner sits low on the stage, over the speaker's chest and clear of the face,
   and wipes in and out: no see-through ghost over anyone. Same 1.2 s as before. */
.cut-in.on:not(.pointing) { top: auto; bottom: calc(var(--dialogue-h, var(--balloon-height)) + 4px); min-height: 0; padding-block: 6px; animation: flip-wipe 1.6s both; }
.cut-in:not(.pointing) .cut-faces, .cut-in:not(.pointing) .cut-faces .cut-portrait { height: 96px; }
@media (max-height: 720px) {
  .cut-in.on:not(.pointing) { grid-template-columns: minmax(0, 64px) minmax(0, 1fr); padding-block: 4px; }
  .cut-in:not(.pointing) .cut-faces { width: 64px; }
  .cut-in:not(.pointing) .cut-faces, .cut-in:not(.pointing) .cut-faces .cut-portrait { height: 68px; }
}
@keyframes flip-wipe {
  0% { clip-path: inset(0 100% 0 0); }
  9%, 91% { clip-path: inset(0 0 0 0); }
  100% { clip-path: inset(0 0 0 100%); }
}
/* On the verdict, Menu scrolls away with the page instead of covering a juror's card
   (the serious summary keeps its own rule above, untouched). #app is the box it sits in. */
#app:not(.serious):has(#screen-verdict.active) > .home-menu { position: absolute; left: 6px; }

/* ---------- Hill climb round 2: the cast is big again and the rulings land (2026-11-16) ---------- */
/* One steady stage between lines: whenever the Continue bar is hidden and no answers are up
   (a cut-in, a ruling, the quiet beat between written lines), it keeps its room, so the
   stage's bottom edge and the jury strip stay put until the one glide to the answers. */
/* (Round 4: outside a serious case the bar now gives that room to the stage instead; see below.) */

/* The speaker is a bust cropped by the speech box at the collar or bow tie (the painted art
   ends in a clear strip, so a bust standing above the box showed floor beneath it).
   --box-top: the box's top edge above the stage floor, with makeRoom()'s lift. Every
   painted canvas (512x640) has its collar or bow tie about 70% down, its figure ending
   between 90% and 97% down, and empty sky in its top 7%. So the box covers the canvas
   from 70% down (a short stage: the question screen) to 80% down (a tall stage, where the
   head would otherwise float low under empty sky); never less, so no floor shows. The
   picture's box stays inside the stage (never under the top bar or past the sides). */
#app:not(.serious) .sprite:has(> .portrait-art) {
  --box-top: calc(var(--dialogue-h, var(--balloon-height)) - 8px + var(--lift, 0px));
  --sprite-h: min(calc((100% - var(--box-top)) / 0.7), calc(100% - var(--box-top) + var(--dialogue-h, var(--balloon-height)) - 24px), 540px, calc(min(100vw, 480px) * 1.25));
  height: var(--sprite-h); max-height: none;
  bottom: max(min(calc(var(--box-top) - 0.2 * var(--sprite-h)), max(calc(var(--box-top) - 0.3 * var(--sprite-h)), calc(100% - var(--sprite-h)))),
    calc(var(--box-top) - var(--dialogue-h, var(--balloon-height)) + 24px));
}
/* (The last term keeps the bust's foot above the box's bottom edge, behind the box; the
   height's second term keeps a short box from lifting the picture past the stage top.) */
/* The floor strip behind the box starts at the box's top edge, so nothing of the stage
   shows between the bust and the words; it covers the gutters beside the box too. */
#app:not(.serious) .stage .desk { height: calc(var(--dialogue-h, var(--balloon-height)) - 8px + var(--lift, 0px)); transition: height 160ms ease-out; }
html[data-motion="reduced"] #app .stage .desk { transition: none; }
/* While the answers are up, the speech box hugs its lines: no empty strip under the
   question, and the room goes to the speaker. Its tail follows the box's top edge. */
#app:not(.serious) .court:has(.choices:not(.hidden):not(.objection-sheet)) .dialogue:not(.player-answer):not(.error-state) { height: auto; min-height: 0; }
#app:not(.serious) .court:has(.choices:not(.hidden):not(.objection-sheet)) .dialogue:not(.player-answer) .dtext { min-height: 0; }
#app:not(.serious) .court:has(.choices:not(.hidden):not(.objection-sheet)) .scene:not(:has(.player-answer))::after { bottom: calc(var(--dialogue-h, var(--balloon-height)) - 9px); }

/* SUSTAINED! / OVERRULED!: a solid word across the stage, teal for the defence's win, red
   against it, with a heavy ink edge; it sits low, over the judge's robe, below the eyes,
   and slams in solid (same 0.3 s entrance, same 950 ms on screen). */
.shout { container-type: inline-size; }
#app:not(.serious) .shout.on:not(.has-art):has(> .burst.ruling) { place-items: end center; padding-bottom: calc(var(--dialogue-h, var(--balloon-height)) + 6px); box-sizing: border-box; }
.burst.ruling { width: 100%; aspect-ratio: auto; animation: ruling-slam .3s ease-out both; }
.burst.ruling::before, .burst.ruling::after { content: none; }
.burst.ruling .word, .burst.ruling.gold .word, .burst.ruling.blue .word, .burst.ruling.red .word {
  font: 400 11.2cqi/1.1 var(--display); letter-spacing: -.02em; color: var(--success);
  -webkit-text-stroke: 1.6cqi var(--ink); paint-order: stroke fill; text-shadow: .8cqi 1cqi 0 var(--ink);
  transform: rotate(-4deg); white-space: nowrap;
}
.burst.ruling.overruled .word { color: var(--accent); }
.shout.has-art .burst.ruling { background: var(--ink); animation: none; }
.shout.has-art .burst.ruling .word { font-size: 10.4cqi; transform: none; }
@keyframes ruling-slam { from { transform: scale(2.2); } 70% { transform: scale(.97); } to { transform: none; } }

/* GUILTY / NOT GUILTY fills the stage: the same letter-by-letter slam, as wide as the
   stage allows (NOT on its own line above GUILTY), low over the judge's robe like a ruling. */
#app:not(.serious) .shout.on:has(> .slam) { place-items: end center; padding-bottom: calc(var(--dialogue-h, var(--balloon-height)) + 6px); box-sizing: border-box; }
.slam { width: 100%; box-sizing: border-box; padding: 0 2cqi; gap: 0 4cqi; font-size: 17.6cqi; }
.slam .w { gap: .4cqi; }
.slam span { -webkit-text-stroke: 1.4cqi var(--line); text-shadow: 1cqi 1.2cqi 0 var(--line); line-height: 1; }
.slam.notguilty .w:first-child { flex-basis: 100%; justify-content: center; font-size: .7em; }
html[data-motion="reduced"] .scene.shake { animation: none; }

/* ---------- Hill climb round 3: the big moments get the whole stage (2026-11-16) ---------- */
/* Begin trial cuts straight to the court: no fade from black, and a speaker who enters is
   never invisible (the old entrance started at opacity 0). */
#screen-court.active { animation: none; }
@keyframes sprite-in { from { opacity: .6; transform: translateX(-50%) translateY(12px); } to { opacity: 1; transform: translateX(-50%); } }

/* Full-stage beats: the opening (COURT IN SESSION and the charge) and a ruling. The speech
   box steps aside without giving up its room (the jury strip never moves), the floor strip
   and the tail go with it, the camera cuts instead of panning, and the judge is drawn down
   to the jury strip: her painted canvas's 93% line sits on the stage's bottom edge, so robe
   and medallion show and her figure's lower edge stays out of sight. */
#app:not(.serious) .scene:is(.ruling-beat, .opening-beat) .dialogue { visibility: hidden; }
#app:not(.serious) .scene:is(.ruling-beat, .opening-beat)::after { visibility: hidden; }
#app:not(.serious) .scene:is(.ruling-beat, .opening-beat) .stage .desk { visibility: hidden; }
#app:not(.serious) .scene:is(.ruling-beat, .opening-beat) .stage.pan .stage-bg { animation: none; }
/* The camera cuts into and out of a beat: the sprite's 160 ms resize (round 1) waits. */
#app .scene:is(.ruling-beat, .opening-beat, .beat-cut) .sprite { transition: none; }
#app:not(.serious) .scene:is(.ruling-beat, .opening-beat) .sprite:has(> .portrait-art) {
  --sprite-h: min(calc(100% / .93), 820px);
  height: var(--sprite-h); max-height: none; max-width: none; bottom: calc(-.07 * var(--sprite-h));
}

/* The ruling word sits across the judge's chest, inside the stage at every width, over a
   white manga burst that stays within the word's own band (never over her face). The burst
   is drawn only with full motion; reduced motion keeps the plain solid word. */
#app:not(.serious) .scene.ruling-beat .shout.on:not(.has-art):has(> .burst.ruling) { padding-bottom: 9%; }
#app:not(.serious) .burst.ruling.sustained .word, #app:not(.serious) .burst.ruling.overruled .word { font-size: 10.2cqi; }
#app:not(.serious) .scene.ruling-beat .shout:not(.has-art) .burst.ruling::before,
#app:not(.serious) .scene.ruling-beat .shout:not(.has-art) .burst.ruling::after {
  content: ''; position: absolute; inset: -16% 1% -20%; transform: rotate(-4deg);
  clip-path: polygon(0% 34%, 7% 22%, 5% 2%, 16% 18%, 24% 0%, 31% 16%, 42% 3%, 48% 17%, 58% 1%, 64% 16%, 75% 4%, 80% 19%, 93% 6%, 92% 26%, 100% 38%, 95% 54%, 100% 72%, 90% 76%, 94% 98%, 79% 84%, 70% 100%, 61% 85%, 50% 99%, 42% 84%, 30% 97%, 24% 82%, 9% 95%, 10% 76%, 0% 68%, 5% 52%);
}
#app:not(.serious) .scene.ruling-beat .shout:not(.has-art) .burst.ruling::before { background: var(--ink); scale: 1.025 1.1; }
#app:not(.serious) .scene.ruling-beat .shout:not(.has-art) .burst.ruling::after { background: radial-gradient(ellipse 60% 70% at 50% 50%, var(--text-color) 55%, var(--secondary)); scale: 1 .96; }
html[data-motion="reduced"] #app .burst.ruling::before, html[data-motion="reduced"] #app .burst.ruling::after { content: none !important; }

/* While the word is up, the stake it sets lands in the band under the tally (the Continue
   bar's own room, so nothing moves): "Sustained · jury +4" in teal, "Overruled · jury −4" in red. */
#app:not(.serious) .lower:not(:has(> .choices:not(.hidden))) > .next-btn[data-note] {
  visibility: visible !important; display: grid !important; opacity: 1; background: none; border-color: transparent; box-shadow: none;
  font-size: 0; color: transparent; pointer-events: none;
}
#app:not(.serious) .next-btn[data-note] > * { display: none; }
#app:not(.serious) .next-btn[data-note]::after {
  content: attr(data-note); font: 400 var(--type-lead)/1.2 var(--display); letter-spacing: .01em; color: var(--success);
  text-shadow: 2px 2px 0 var(--ink); animation: fade-in 160ms ease-out;
}
#app:not(.serious) .next-btn[data-note][data-side="overruled"]::after { color: var(--accent-text); }

/* The court opens on the judge: COURT IN SESSION, then the charge in the display type on an
   ink slab across her robe, below her face. The one place the charge shows in court. */
#app .banner.charge-beat {
  top: auto; bottom: 7%; left: -3%; right: -3%; width: auto; padding: 10px calc(3% + 18px) 14px;
  border: 0; border-block: 4px solid var(--ink); box-shadow: 0 6px 0 var(--ink);
  background: radial-gradient(rgb(from var(--text-color) r g b / .06) 1px, transparent 1px) 0 0 / 5px 5px, var(--panel);
  text-align: center; transform: rotate(-3deg); animation: charge-slab .22s ease-out both;
}
#app .banner.charge-beat small { display: block; margin: 0 0 4px; font: 700 var(--type-xs)/1.3 var(--text); letter-spacing: 2px; color: var(--gold); }
#app .banner.charge-beat strong {
  display: block; font: 400 clamp(1.3rem, 5.9vw, 1.85rem)/1.18 var(--display); color: var(--text-color);
  text-shadow: 2px 3px 0 var(--ink); white-space: normal; text-wrap: balance; overflow-wrap: normal;
}
#app .banner.charge-beat.charged strong { animation: charge-land .28s cubic-bezier(.2, 1.5, .4, 1) both; }
@keyframes charge-slab { from { transform: translateX(-105%) rotate(-3deg); } to { transform: rotate(-3deg); } }
@keyframes charge-land { from { transform: scale(1.7); opacity: .4; } to { transform: none; opacity: 1; } }
html[data-motion="reduced"] #app .banner.charge-beat, html[data-motion="reduced"] #app .banner.charge-beat strong { animation: none; }

/* The verdict: the wash goes with the flash (game.js), the speed lines stop, and the word
   holds still in its side's solid colour with the rulings' ink edge, wholly inside the
   stage. --settle keeps the word "landing" until the shake has played. */
#app:not(.serious) .slam { font-size: 16.2cqi; padding: 0 5cqi; animation: slam-settle var(--settle, 0ms) linear both; }
#app:not(.serious) .slam span { -webkit-text-stroke: 1.6cqi var(--ink); text-shadow: .8cqi 1cqi 0 var(--ink); animation-delay: calc(var(--i) * 110ms); }
#app:not(.serious) .slam.guilty span { color: var(--accent); }
#app:not(.serious) .slam.notguilty span { color: var(--success); }
@keyframes slam-settle { from, to { outline-color: transparent; } }

/* ---------- Hill climb round 4: one question, a bigger cast, fewer Continue taps (2026-11-16) ---------- */
/* One question on screen: while the prosecutor's line in the speech box asks it, the plain
   restatement above the answers is for screen readers only (game.js: .quiet-prompt), and its
   row goes to the stage. Where the box carries no question (struck and rephrased, the closing
   stake line, a judge's line, "State your objection") it still shows, a row only as tall as
   its words. A serious case keeps its heading row exactly as it was. */
#app:not(.serious) .choices.quiet-prompt:not(.objection-sheet) .choice-head {
  position: absolute; width: 1px; height: 1px; min-height: 0; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
#app:not(.serious) .choices:not(.objection-sheet) .choice-head { min-height: 0; }

/* Object has one home: the speaker's name row, at the speech box's right edge, while the
   answers are up (never in a serious case, never on the closing, as before). */
.dialogue > #btn-objection { position: absolute; z-index: 2; top: 6px; right: 8px; margin: 0; }
.court:not(:has(.choices:not(.hidden):not(.objection-sheet))) .dialogue > #btn-objection { display: none; }
#app:not(.serious) .court:has(.choices:not(.hidden):not(.objection-sheet)) .dialogue:has(> #btn-objection:not(.hidden)) .nameplate { max-width: calc(100% - 104px); }
/* While the answers are up the box hugs its lines a little closer at the bottom too. */
#app:not(.serious) .court:has(.choices:not(.hidden):not(.objection-sheet)) .dialogue:not(.player-answer):not(.error-state) { padding-bottom: 6px; }

/* Lines that move on by themselves (the opening, the reactions, a ruling's lines, the
   ending) show no Continue bar, and outside a serious case the bar's room goes to the stage
   whenever the bar is not needed: no empty band. The stage and jury strip hold still from
   the answer until the one glide to the next answers. A ruling keeps the band from the
   objection tap to the next answer for its stakes line (game.js rulingBand). */
#app:not(.serious) .lower > .next-btn:is(.hidden, .holding, .auto, .wait):not([data-note]) { display: none !important; }
#app:not(.serious) .next-btn[data-note][data-side="pending"]::after { font: 600 var(--type-sm)/1.3 var(--text); color: var(--secondary); text-shadow: none; letter-spacing: 0; }

/* A ruling's word stays inside the stage at its peak: the word slams from 1.16x (was the
   whole burst from 2.2x) and the burst behind it opens top to bottom only. Same 0.3 s. */
#app:not(.serious) .burst.ruling { animation: ruling-band .3s ease-out both; }
#app:not(.serious) .shout:not(.has-art) .burst.ruling .word { animation: ruling-word .3s ease-out both; }
#app:not(.serious) .shout.has-art .burst.ruling { animation: none; }
@keyframes ruling-band { from { transform: scaleY(.25); } to { transform: none; } }
@keyframes ruling-word { from { scale: 1.16; } 70% { scale: .97; } to { scale: 1; } }

/* GUILTY / NOT GUILTY is a full-stage beat like the rulings: no speech box, the judge drawn
   down to the jury strip, the word across her chest, the jury strip in view below. */
#app:not(.serious) .scene.verdict-beat .dialogue,
#app:not(.serious) .scene.verdict-beat::after,
#app:not(.serious) .scene.verdict-beat .stage .desk { visibility: hidden; }
#app:not(.serious) .scene.verdict-beat .stage.pan .stage-bg { animation: none; }
#app .scene.verdict-beat .sprite { transition: none; }
#app:not(.serious) .scene.verdict-beat .sprite:has(> .portrait-art) {
  --sprite-h: min(calc(100% / .93), 820px);
  height: var(--sprite-h); max-height: none; max-width: none; bottom: calc(-.07 * var(--sprite-h));
}
#app:not(.serious) .scene.verdict-beat .shout.on:has(> .slam) { padding-bottom: 7%; }

/* ---------- Hill climb round 5: long enough to read, no typing, rulings keep their punch (2026-11-16) ---------- */
/* SUSTAINED! / OVERRULED! as big as the stage allows: about 94% of its width (round 4: 83%),
   drawn 1.25x taller and with a heavier ink edge, still across the judge's chest and wholly
   inside the stage; the white burst behind it grows with the word's height. Reduced motion
   keeps the plain solid word (no burst), now at the same size. A ruling with its painted
   cut-in above it keeps round 4's word, below the picture. */
#app:not(.serious) .shout:not(.has-art) .burst.ruling:is(.sustained, .overruled) .word {
  font-size: 11.6cqi; -webkit-text-stroke-width: 1.8cqi; transform: rotate(-4deg) scaleY(1.25);
}
#app:not(.serious) .scene.ruling-beat .shout:not(.has-art) .burst.ruling::before,
#app:not(.serious) .scene.ruling-beat .shout:not(.has-art) .burst.ruling::after { inset: -30% 1% -34%; }

/* ---------- Hill climb round 6: never rushed, never slow; the ruling fits (2026-11-16) ---------- */
/* SUSTAINED! / OVERRULED! land wholly inside the stage with a margin both sides: the ink
   (fill, edge and shadow) spans about 93% of the stage (round 5: 95-98%, OVERRULED!'s "!"
   touched the frame). Same height and weight as round 5: the letters are a touch smaller
   and drawn taller to match, the same ink edge; nudged left by half the shadow so the
   margins match. */
#app:not(.serious) .shout:not(.has-art) .burst.ruling:is(.sustained, .overruled) .word {
  font-size: 11.1cqi; transform: translateX(-.5cqi) rotate(-4deg) scaleY(1.3);
}

/* ---------- Hill climb round 7: the case file's art at full strength (2026-11-16) ---------- */
/* The Plumber's desk art (960x536) sat under a dark wash from its top edge (about 79% of its
   own brightness). Now the words always start below the art (the card's top padding is the
   art's height at the card's width), so the art needs no wash: it shows at full brightness,
   with only its foot fading into the panel. A long case file on a small phone grows the card
   and scrolls, as before; the words never sit on the art. */
#screen-casecard { container-type: inline-size; }
.case-card {
  --art-h: calc((100cqw - 2px) * 536 / 960);
  padding-top: max(20px, calc(var(--art-h) + 14px));
  background: linear-gradient(180deg, transparent calc(var(--art-h) * .86), rgb(14 15 23 / .96) var(--art-h)), url(art/scene/case-file.webp) center top / 100% auto no-repeat, var(--panel);
}

/* ---------- Hill climb round 9: the deciding vote is a moment; the Docket says what it is (2026-11-17) ---------- */
/* THE DECIDING VOTE: a cut-in in the flip banner's language (light band, ink edges, the
   juror's face) laid over the speech box, which hides underneath, so no empty box sits under
   the silent decider. It wipes in and out in about 105 ms each over its 1.5 s (game.js
   DECIDING_CUT), so it stands whole for about 1.3 s. Reduced motion keeps the plain banner. */
.dialogue.awaiting-vote { visibility: hidden; }
.cut-in.deciding.on:not(.pointing) {
  top: auto; bottom: 0; min-height: var(--dialogue-h, var(--balloon-height)); padding-block: 6px;
  grid-template-columns: minmax(0, 112px) minmax(0, 1fr); align-items: center;
  animation: decide-wipe 1.5s both;
}
.cut-in.deciding:not(.pointing) .cut-faces { width: 112px; }
.cut-in.deciding:not(.pointing) .cut-faces, .cut-in.deciding:not(.pointing) .cut-faces .cut-portrait { height: 112px; }
.cut-in.deciding:not(.pointing) strong { font-size: clamp(1.3rem, 6.2vw, 1.9rem); line-height: 1.05; overflow-wrap: normal; }
.cut-in.deciding:not(.pointing) strong small { font: 700 var(--type-sm)/1.3 var(--text); letter-spacing: 1px; margin-top: 6px; }
@keyframes decide-wipe {
  0% { clip-path: inset(0 100% 0 0); }
  7%, 93% { clip-path: inset(0 0 0 0); }
  100% { clip-path: inset(0 0 0 100%); }
}
/* The Docket on the title says what it is under its name, like Your own case's line. */
.title-actions #btn-docket { display: grid; justify-items: center; align-content: center; gap: 0; padding: 6px 16px; }
.title-actions #btn-docket small { font: 500 var(--type-xs)/1.35 var(--text); color: var(--secondary); }
.title-actions #btn-docket:not(.outline) small { color: var(--ink); font-weight: 600; }
/* The case list scrolls under a solid strip that carries Menu, so Menu never sits over a case. */
#app:not(.serious):has(#screen-docket.active)::before {
  content: ''; position: fixed; top: 0; z-index: 89; left: max(0px, calc((100vw - 480px) / 2)); width: min(100vw, 480px);
  height: calc(var(--menu-top) + 50px); background: var(--night); border-bottom: 1px solid var(--divider);
}
#app:not(.serious) .scene:has(.dialogue.awaiting-vote)::after { visibility: hidden; }

/* ---------- Hill climb round 10: a shorter jury-out; the deciding vote shows the tie (2026-11-17) ---------- */
/* THE DECIDING VOTE: the tie (2–2, NOT GUILTY's count teal, GUILTY's coral) on an ink chip where
   the small face was (the big portrait above is already the decider), the decider's name large
   in the display type, and the other four juror cards dimmed while the cut-in shows (game.js
   decidingMoment). Reduced motion keeps the plain banner and no dimming. */
.cut-in.deciding.on:not(.pointing) { grid-template-columns: auto minmax(0, 1fr); gap: 14px; padding: 8px 16px; }
.cut-in.deciding .cut-tie {
  align-self: center; white-space: nowrap; padding: 10px 14px 12px; border-radius: 4px;
  background: var(--ink); color: var(--text-color); font: 400 clamp(2.2rem, 11vw, 3rem)/1 var(--display);
}
.cut-in.deciding .cut-tie .ng { color: var(--success); font-weight: inherit; }
.cut-in.deciding .cut-tie .g { color: var(--accent-text); font-weight: inherit; }
.cut-in.deciding:not(.pointing) strong { font-size: clamp(1.05rem, 5vw, 1.45rem); }
.cut-in.deciding:not(.pointing) strong small { margin-top: 8px; font: 400 var(--type-sm)/1.15 var(--text); letter-spacing: .5px; color: var(--ink); }
.cut-in.deciding:not(.pointing) strong small b { display: block; font: 400 clamp(1.5rem, 7.4vw, 2.1rem)/1.05 var(--display); letter-spacing: 0; }
.jurybar.deciding .jcell:not(.speaking) { opacity: .32; transition: opacity 120ms ease-out; }

/* ---------- Hill climb round 11: votes in their own voice; one speaker lit; scenes land whole (2026-11-17) ---------- */
/* Exactly one juror card is marked as speaking, the one talking: the mark moves at once
   (it faded over 0.2 s, so a 1 s poll answer opened with the last speaker still outlined). */
.jcell { transition: transform 0.2s; }
/* THE DECIDING VOTE: the title runs across the whole band on one line; under it the tie chip
   and "Grandma M decides" as one phrase, name and verb in the same large display type (the
   verb was a small orphan under the name). */
.cut-in.deciding.on:not(.pointing) { grid-template-columns: minmax(0, 1fr); }
.cut-in.deciding:not(.pointing) strong { white-space: nowrap; }
.cut-in.deciding .cut-row { display: flex; align-items: center; gap: 14px; margin-top: 8px; white-space: normal; }
.cut-in.deciding .cut-row .cut-tie { flex: none; }
.cut-in.deciding:not(.pointing) strong small { flex: 1; min-width: 0; margin: 0; font: 400 clamp(1.5rem, 7.4vw, 2.1rem)/1.05 var(--display); letter-spacing: 0; color: var(--ink); }
.cut-in.deciding:not(.pointing) strong small b { display: inline; font: inherit; white-space: nowrap; }
/* The Docket: Case of the day sits on the card's meta row (no row of its own). */
.docket-item { grid-template-areas: "no main"; }
.docket-meta .docket-daily { padding: 0 6px; }
/* A speaker change lands whole: the camera pan slides the room only a little, under a slight
   zoom, so no empty band shows beside it, and it starts fully lit (it slid in from ±35% at 60%
   opacity, leaving part of the stage unpainted for a few frames). game.js warmStageArt
   decodes the six rooms before the trial. Reduced motion has no pan, as before. */
@keyframes pan { from { transform: translateX(calc(var(--pan, 30%) * .18)) scale(1.14); } to { transform: none; filter: none; } }

/* ---------- Hill climb round 12: the first screens read as a game, not menus (2026-11-17) ---------- */
/* The Docket: under each open title, its charge (the joke), set heavier than the metadata,
   at most two lines; the difficulty word sits beside the gavels so the icons explain
   themselves. Every locked case says when it opens: the next one plainly, the rest quieter. */
.docket-main { gap: 2px; }
.docket-charge { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; margin-bottom: 4px; font: 500 var(--type-sm)/1.35 var(--text); color: var(--text-color); opacity: .9; overflow-wrap: anywhere; }
.docket-level { display: inline-flex; align-items: center; gap: 6px; color: var(--secondary); }
.docket-locked .docket-main { gap: 1px; }
.docket-locked.later .docket-main b { font-weight: 600; }
.docket-locked.later .docket-meta { font-size: .6875rem; color: var(--muted); }
/* Title: the cast strip starts at the top edge and grows into the space the rest of the
   title leaves (up to 270 px), the faces filling it; every title state keeps its content and
   the strip shrinks back to its old 128 px before anything else moves. */
.title-wrap { justify-content: flex-start; }
.parade { flex: 1 0 128px; height: auto; min-height: 128px; max-height: 270px; margin-top: calc(-1 * max(16px, env(safe-area-inset-top)) - 14px); container-type: size; }
.parade .face { flex: 0 0 max(104px, 42cqh); height: 100%; overflow: hidden; }
.parade .face .portrait-art { width: 100%; height: 100%; object-fit: cover; object-position: center 8%; }
.parade .face svg { width: 100%; height: 100%; }
.logo { margin-top: auto; }
.title-wrap::after { content: ''; flex: 0 0 0; margin-top: auto; }
/* Case card: "You play the defendant" is a tag on the card, not an empty-looking field. */
.case-role { display: inline-flex; align-self: flex-start; align-items: center; padding: 3px 8px; font: 700 var(--type-xs)/1.4 var(--text); letter-spacing: .06em; text-transform: uppercase; color: var(--text-color); background: var(--raised); border: 0; border-left: 3px solid var(--accent); border-radius: 2px; }
/* ---------- Hill climb round 13: the checkpoint round's polish (2026-11-17) ---------- */
/* Title: five whole panels across the screen's width, each an equal share, so the fifth face
   is never cut at the edge. The portraits' busts end at different heights (89-99 % of the
   picture), so every panel stops above the shortest (89.5 %): no notch under any panel. The
   band still runs above the top edge so its tilt leaves no gap, but the faces start below it
   with a little room under the status bar (--lift: the part above the edge plus 10 px). */
.parade { --lift: calc(max(16px, env(safe-area-inset-top)) + 24px); margin-inline: calc(50% - 50vw - 14px); padding-inline: 14px; }
.parade .face { flex: 1 1 0; min-width: 0; margin: 0; position: relative; border-right: 3px solid var(--ink); }
.parade .face:last-child { border-right: 0; }
.parade .face .portrait-art { position: absolute; left: 0; top: var(--lift); width: 100%; height: calc((100cqh - var(--lift)) / .895); object-fit: cover; object-position: center top; }
.parade .face svg { position: absolute; left: 0; top: var(--lift); height: calc(100cqh - var(--lift)); }
/* The Docket: the next locked case keeps its sentence; the later ones show only a quiet count
   at the row's end. */
.docket-locked.later { grid-template-columns: auto auto minmax(0, 1fr) auto; grid-template-areas: "lock no main more"; min-height: 40px; padding-block: 6px; }
.docket-more { grid-area: more; font: 600 var(--type-xs)/1.3 var(--text); color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
/* Jury selection (round 12, round 13): the faces grow with the room the screen has, and the
   alternate's face is the jurors' size. The screen is a size container; the six rows share
   what the header, Begin trial and the gaps leave (152 px of the screen's content box; --row
   is a sixth of the rest). A face only grows once a row has room to spare (2 x row - 140 px),
   never past the row less its padding, border and a pixel to spare (row - 19 px), at most 116 px tall; the
   bigger type and padding come with a tall screen (840 px); small phones keep round 11's
   40 x 48 and every seat still fits. Large text or a returning player's record still scrolls
   the roster. Without an alternate (your own case, or after a strike) five rows share it. */
#screen-jury.active { container-type: size; }
#screen-jury .jury-cards .jcard, #screen-jury .jcard.alternate { --row: calc((100cqh - 152px) / 6); --face-h: clamp(48px, min(var(--row) * 2 - 140px, var(--row) - 19px), 116px); }
#screen-jury.active:not([data-alternate]) .jury-cards .jcard { --row: calc((100cqh - 148px) / 5); }
#screen-jury .jury-cards .jcard, #screen-jury .jcard.alternate { grid-template-columns: calc(var(--face-h) * 96 / 116) minmax(0, 1fr); gap: clamp(8px, calc(var(--face-h) / 9), 12px); align-items: center; }
#screen-jury .jury-cards .jcard .face, #screen-jury .jcard.alternate .face { width: calc(var(--face-h) * 96 / 116); height: var(--face-h); }
@container (min-height: 840px) {
  #screen-jury .jury-cards .jcard, #screen-jury .jcard.alternate { padding: 6px 8px; }
  #screen-jury .jury-cards .jcard h4 { font-size: var(--type-body); }
  #screen-jury .jury-cards .jcard .tell { font-size: var(--type-sm); }
}
/* ---------- Hill climb round 14: the title's faces fill their panels (2026-11-17) ---------- */
/* Title: five panels of exactly equal width, all inside the screen. The ink dividers no longer
   take width from four of them (round 13: the fifth was 3 px narrower): each panel draws half of
   a shared 3 px line on its inner sides. The band still bleeds past both edges, but the panels
   start and end inside it by what the -3deg tilt adds at their corners (2.6 % of the strip's
   height, plus a pixel), so no rotated panel reaches past the screen; the band's colour is the
   panels' own, so nothing shows there but the strip.
   The faces are bigger and higher: every portrait puts its eyes at the same height (260 of
   640), so each picture is 1.32 x the panel's visible height, placed so the tallest hair of the
   cast (Doris's, 45 of 640) starts 2 px under the top edge: every head shows whole from hair to
   chin, the eye line runs level, a usual head starts ~20 px under the edge, and the shortest bust
   (89.5 % of its picture) still runs to the strip's bottom. The tilt lifts the right-hand panels
   by tan 3deg of a panel's width each, so the fourth and fifth pictures move back down by that
   much (--k, --untilt): from the middle panel rightwards the heads hang at one height on screen;
   the first two sit up to 9 px lower, following the tilt (moving
   them up would open a notch under a short bust). In every title state. --lift is where the
   faces' room starts: the band's 14 px above the top edge, the safe area (a notch or status
   bar drawn over the page), plus 6 px. (Round 13's --lift counted 30 px above the edge, so
   its faces started 26 px down.)
   The picture is always sized by the strip's height (its own 4:5 box, centred, the sides cropped
   by the panel; the portraits are transparent, so a panel wider than its picture shows only the
   band). Until round 14 it was 'cover': on a wide screen (a Fold opened, ~690 CSS px) a 140 px
   panel scaled the picture by its width and pushed every chin below the strip. The band spans
   the game's column (#app, at most 480 px), not the whole screen, so on a wide screen the outer
   panels are no longer cut by the column's edges. */
.parade { --lift: calc(env(safe-area-inset-top, 0px) + 20px); margin-inline: calc(50% - min(50vw, 240px) - 14px); }
.parade .face { border-right: 0; }
.parade .face:first-child { margin-left: calc(2.62cqh + 1px); }
.parade .face:last-child { margin-right: calc(2.62cqh + 1px); }
.parade .face:not(:first-child)::before, .parade .face:not(:last-child)::after { content: ''; position: absolute; z-index: 1; inset-block: 0; width: 1.5px; background: var(--ink); }
.parade .face::before { left: 0; }
.parade .face::after { right: 0; }
.parade .face:nth-child(4) { --k: 1; } .parade .face:nth-child(5) { --k: 2; }
.parade .face .portrait-art { --view: calc(100cqh - var(--lift)); --untilt: calc(var(--k, 0) * (100cqw - 5.24cqh - 2px) / 5 * .0524); --pic: calc(var(--view) * 1.32); height: var(--pic); width: calc(var(--pic) * .8); max-width: none; left: calc(50% - var(--pic) * .4); top: calc(var(--lift) - 4px - var(--pic) * .0703 + var(--untilt)); object-fit: contain; }
/* The Docket: a later locked case's count takes the lock's colour, so "3 more" reads as the
   lock's own label (verdicts still to go), still small and at the row's end. */
.docket-more { color: var(--secondary); }
/* The Docket says what a case is in play terms, once, under its header: one quiet line. */
.screen-head .docket-how { margin-top: 6px; font: 600 var(--type-xs)/1.35 var(--text); letter-spacing: .02em; color: var(--secondary); }
#screen-docket .screen-head p { text-wrap: balance; }
