:root {
  color-scheme: dark;
  --bg: #100f0e;
  --panel: #1b1816;
  --panel2: #25201d;
  --line: #423a34;
  --text: #f1eadf;
  --muted: #a99d90;
  --gold: #c4a56b;
  --burgundy: #6f2028;
  --burgundy2: #8c2b35;
  --green: #62765b;
  --paper: #ddd0ba;
  --ink: #1f1b17;
}
* { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  margin: 0;
  min-height: 100svh;
  color: var(--text);
  background:
    radial-gradient(circle at 50% 0%, rgba(196,165,107,.08), transparent 30%),
    linear-gradient(180deg, #171411 0%, #0e0d0c 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .42; }
.app-shell { width: min(1320px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 54px; }
.boot-card, .entry-card, .panel, .case-panel, .evidence-card, .role-column, .result-card {
  border: 1px solid var(--line);
  background: rgba(27,24,22,.93);
  box-shadow: 0 18px 50px rgba(0,0,0,.22);
}
.eyebrow { margin: 0 0 8px; color: var(--gold); font-size: .72rem; letter-spacing: .2em; font-weight: 800; }
h1, h2, h3 { font-family: Georgia, "Times New Roman", serif; font-weight: 500; }
h1 { margin: 0; font-size: clamp(2.4rem, 7vw, 5.4rem); line-height: .95; }
h2 { margin: 0; font-size: clamp(1.7rem, 4vw, 2.6rem); }
h3 { margin: 0; font-size: 1.3rem; }
p { line-height: 1.55; }
.muted { color: var(--muted); }
.topbar { display: flex; gap: 20px; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.brand-link { color: inherit; text-decoration: none; font-family: Georgia, "Times New Roman", serif; letter-spacing: .08em; }
.room-badge { display: flex; gap: 10px; align-items: center; color: var(--muted); }
.room-code { color: var(--text); font-weight: 800; letter-spacing: .16em; }
.entry-grid { min-height: calc(100svh - 110px); display: grid; place-items: center; }
.entry-wrap { width: min(980px, 100%); }
.entry-head { text-align: center; margin-bottom: 34px; }
.entry-head p { max-width: 660px; margin: 16px auto 0; color: var(--muted); }
.entry-cards { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.entry-card { padding: 28px; }
.field { display: grid; gap: 7px; margin-top: 16px; }
.field label { color: var(--muted); font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
input, select {
  width: 100%; border: 1px solid var(--line); background: #12100f; color: var(--text); padding: 12px 13px; border-radius: 4px; outline: none;
}
input:focus, select:focus { border-color: var(--gold); }
.primary, .secondary, .role-button, .verdict-button, .publish-button {
  border: 1px solid transparent; border-radius: 4px; padding: 11px 16px; font-weight: 800; transition: .15s ease;
}
.primary { background: var(--burgundy2); color: white; }
.primary:hover:not(:disabled) { background: #a43843; transform: translateY(-1px); }
.secondary { color: var(--text); background: transparent; border-color: var(--line); }
.secondary:hover:not(:disabled) { border-color: #776a5e; background: rgba(255,255,255,.03); }
.wide { width: 100%; margin-top: 18px; }
.lobby-head { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 24px; }
.lobby-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.timer-config { width: 180px; }
.role-board { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
.role-column { min-height: 310px; padding: 18px; }
.role-column[data-role="prosecution"] { border-top: 3px solid #8b343d; }
.role-column[data-role="judge"] { border-top: 3px solid var(--gold); }
.role-column[data-role="defense"] { border-top: 3px solid #526f83; }
.role-column[data-role="spectator"] { border-top: 3px solid #666; }
.role-title { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.player-chip { border: 1px solid var(--line); background: #13110f; padding: 10px 11px; margin-top: 8px; border-radius: 3px; }
.player-chip.me { border-color: var(--gold); }
.host-mark { color: var(--gold); font-size: .72rem; font-weight: 800; margin-left: 6px; }
.role-button { width: 100%; margin-top: 16px; background: transparent; border-color: var(--line); color: var(--text); }
.role-button.selected { background: rgba(196,165,107,.12); border-color: var(--gold); }
.ready-line { display: flex; align-items: center; gap: 9px; margin-top: 18px; color: var(--muted); }
.ready-dot { width: 9px; height: 9px; border-radius: 50%; background: #714047; }
.ready-dot.ok { background: #6f8b67; }
.case-layout { display: grid; grid-template-columns: minmax(0,1fr) 300px; gap: 18px; }
.case-panel { padding: 22px; }
.case-header { display: flex; justify-content: space-between; gap: 20px; align-items: start; margin-bottom: 18px; }
.round-mark { color: var(--gold); font-weight: 900; letter-spacing: .12em; }
.timer { font-variant-numeric: tabular-nums; font-size: 2.25rem; font-weight: 800; letter-spacing: .05em; }
.timer.danger { color: #d05a63; }
.section-title { margin: 28px 0 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; font-size: .72rem; font-weight: 900; }
.evidence-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(245px,1fr)); gap: 12px; }
.evidence-card { position: relative; padding: 16px; background: #211d1a; }
.evidence-card.public { border-left: 3px solid var(--gold); }
.evidence-card.prosecution { border-left: 3px solid #8b343d; }
.evidence-card.defense { border-left: 3px solid #526f83; }
.evidence-meta { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 9px; color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .07em; }
.evidence-card p { margin: 9px 0; }
.source { color: var(--gold); font-size: .82rem; font-style: italic; }
.publish-button { margin-top: 9px; background: transparent; border-color: #72575a; color: #d9a7ac; padding: 8px 10px; font-size: .8rem; }
.sidebar { display: grid; align-content: start; gap: 14px; }
.panel { padding: 17px; }
.role-label { display: inline-flex; padding: 5px 8px; background: #12100f; border: 1px solid var(--line); color: var(--gold); font-size: .72rem; font-weight: 900; text-transform: uppercase; letter-spacing: .1em; }
.mini-player { color: var(--muted); font-size: .85rem; margin-top: 6px; }
.phase-card { padding: 24px; margin-bottom: 16px; border: 1px solid var(--line); background: rgba(111,32,40,.08); }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(140px,1fr)); gap: 10px; margin-top: 18px; }
.verdict-button { min-height: 70px; color: var(--text); background: #161310; border-color: var(--line); }
.verdict-button:hover { border-color: var(--gold); background: #201b17; }
.plot-screen { position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; padding: 28px; background: #020202; color: #f2f2f2; }
.plot-inner { width: min(900px,100%); }
.plot-title { color: #999; font-size: .72rem; letter-spacing: .22em; text-transform: uppercase; }
.plot-text { min-height: 10em; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: clamp(1rem,2.2vw,1.35rem); line-height: 1.8; white-space: pre-wrap; }
.cursor::after { content: "▌"; animation: blink .8s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }
.result-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin-top: 20px; }
.result-card { padding: 20px; text-align: center; }
.result-card strong { display: block; font-family: Georgia, "Times New Roman", serif; font-size: 3rem; color: var(--gold); }
.truth-strip { margin-top: 18px; padding: 18px; border: 1px solid var(--gold); background: rgba(196,165,107,.08); }
.toast { position: fixed; left: 50%; bottom: 22px; z-index: 100; transform: translateX(-50%); background: #231d19; color: var(--text); border: 1px solid #81545a; padding: 12px 16px; max-width: min(580px,calc(100% - 28px)); box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.small { font-size: .82rem; }
@media (max-width: 920px) {
  .role-board { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .case-layout { grid-template-columns: 1fr; }
  .sidebar { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 650px) {
  .app-shell { width: min(100% - 18px,1320px); padding-top: 14px; }
  .entry-cards, .role-board, .result-grid { grid-template-columns: 1fr; }
  .lobby-head, .topbar, .case-header { align-items: stretch; flex-direction: column; }
  .lobby-actions { justify-content: stretch; }
  .timer-config { width: 100%; }
  .sidebar { grid-template-columns: 1fr; }
}


/* InChamber V0.2: Richtermoderation + Fallidentitaet */
.case-identity { display:grid; grid-template-columns:minmax(180px,.7fr) minmax(0,1.3fr); gap:10px; margin:0 0 18px; }
.case-identity > div { border:1px solid var(--line); background:#151311; padding:12px 14px; }
.case-identity span { display:block; color:var(--muted); font-size:.68rem; font-weight:900; letter-spacing:.11em; margin-bottom:5px; }
.case-identity strong { display:block; font-family:Georgia,"Times New Roman",serif; font-size:1.05rem; color:var(--text); }
.case-identity.compact { margin:16px 0 0; max-width:760px; }
.floor-strip { display:grid; grid-template-columns:auto auto 1fr; gap:12px; align-items:center; margin:0 0 18px; padding:13px 15px; border:1px solid rgba(196,165,107,.5); background:rgba(196,165,107,.08); }
.floor-strip span { color:var(--muted); font-size:.68rem; font-weight:900; letter-spacing:.12em; }
.floor-strip strong { color:var(--gold); font-family:Georgia,"Times New Roman",serif; font-size:1.35rem; }
.floor-strip small { color:var(--muted); text-align:right; }
.judge-controls { border-color:rgba(196,165,107,.52); }
.floor-buttons { display:grid; grid-template-columns:repeat(3,1fr); gap:7px; margin-top:12px; }
.floor-button { border:1px solid var(--line); background:#151311; color:var(--text); padding:9px 7px; font-size:.78rem; font-weight:800; cursor:pointer; }
.floor-button:hover { border-color:var(--gold); }
.floor-button.active { border-color:var(--gold); background:rgba(196,165,107,.14); color:var(--gold); }
.judge-divider { height:1px; background:var(--line); margin:16px 0; }
.timer-cut-buttons { display:grid; grid-template-columns:1fr 1fr; gap:7px; margin-top:10px; }
@media (max-width:650px) { .case-identity { grid-template-columns:1fr; } .floor-strip { grid-template-columns:1fr; gap:4px; } .floor-strip small { text-align:left; } }
