:root {
  --bg: #0a0b0f;
  --bg2: #11131a;
  --panel: #14161f;
  --panel2: #1b1e2a;
  --line: #262a38;
  --ink: #e7e9f0;
  --muted: #8b90a3;
  --dim: #5a5f72;
  --guard: #e0a33e;     /* amber — authority */
  --guard-d: #6b4f1c;
  --pris: #4ea3c9;      /* cool blue — the held */
  --pris-d: #1f4654;
  --alert: #e2564d;
  --good: #58c08a;
  --accent: #b06be0;
  --shadow: 0 10px 40px rgba(0,0,0,.5);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: radial-gradient(1200px 600px at 70% -10%, #16182400, #0a0b0f) , var(--bg);
  color: var(--ink);
  font: 16px/1.6 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1,h2,h3 { font-family: "Fraunces", Georgia, "Times New Roman", serif; font-weight: 600; line-height: 1.15; letter-spacing: -.01em; }
a { color: var(--pris); text-decoration: none; }
a:hover { text-decoration: underline; }
.mono { font-family: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace; }

/* nav */
nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 22px;
  padding: 14px 28px; backdrop-filter: blur(10px);
  background: rgba(10,11,15,.72); border-bottom: 1px solid var(--line);
}
nav .brand { font-family: "Fraunces", serif; font-weight: 600; font-size: 19px; letter-spacing: -.02em; }
nav .brand b { color: var(--guard); }
nav .spacer { flex: 1; }
nav a { color: var(--muted); font-size: 14px; }
nav a:hover { color: var(--ink); text-decoration: none; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 28px; }

/* hero */
.hero { padding: 90px 0 60px; text-align: center; position: relative; }
.hero h1 { font-size: clamp(40px, 7vw, 78px); margin: 0 0 18px; }
.hero h1 .a { color: var(--guard); } .hero h1 .b { color: var(--pris); }
.hero p.lead { font-size: clamp(17px, 2.2vw, 22px); color: var(--muted); max-width: 720px; margin: 0 auto 30px; }
.cta { display: inline-flex; gap: 14px; flex-wrap: wrap; justify-content: center; }
.btn {
  border: 1px solid var(--line); background: var(--panel2); color: var(--ink);
  padding: 12px 22px; border-radius: 10px; font-size: 15px; cursor: pointer; transition: .15s;
}
.btn:hover { border-color: var(--dim); transform: translateY(-1px); }
.btn.primary { background: linear-gradient(180deg, #c98f2f, #a9741f); border-color: #6b4f1c; color: #1a1305; font-weight: 600; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { border-color: var(--alert); color: var(--alert); background: transparent; }
.btn.small { padding: 7px 12px; font-size: 13px; border-radius: 8px; }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none; }

.kicker { text-transform: uppercase; letter-spacing: .22em; font-size: 12px; color: var(--dim); }

/* section */
section.block { padding: 56px 0; border-top: 1px solid var(--line); }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 26px; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 22px;
}
.card h3 { margin: 0 0 8px; font-size: 19px; }
.card p { color: var(--muted); margin: 0; font-size: 15px; }

/* ===== the lab ===== */
#lab { scroll-margin-top: 70px; }
.lab-shell { background: var(--bg2); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.hud {
  display: flex; align-items: center; gap: 18px; padding: 14px 20px;
  background: linear-gradient(180deg, #161925, #11131a); border-bottom: 1px solid var(--line);
}
.hud .day { font-family: "Fraunces", serif; font-size: 22px; }
.hud .scene { color: var(--guard); text-transform: uppercase; letter-spacing: .12em; font-size: 13px; }
.hud .status { color: var(--muted); font-size: 13px; }
.hud .cost { font-family: ui-monospace, monospace; font-size: 13px; color: var(--good); background: rgba(88,192,138,.1); border: 1px solid rgba(88,192,138,.3); padding: 3px 9px; border-radius: 7px; cursor: default; }
.run-mode { font: 600 10px ui-monospace, monospace; letter-spacing: .14em; padding: 3px 8px; border-radius: 6px; display: none; }
.run-mode.mock { display: inline-block; color: var(--pris); border: 1px solid var(--pris-d); background: rgba(78,163,201,.12); }
.run-mode.live { display: inline-block; color: var(--alert); border: 1px solid var(--alert); background: rgba(226,86,77,.14); }
.live-toggle { color: var(--alert) !important; font-weight: 600; cursor: pointer; }
.login-err { color: var(--alert); font-size: 13px; min-height: 18px; margin-top: 8px; }
.modal.modal-sm { max-width: 380px; }
.modal.modal-sm input[type=password] { width: 100%; background: var(--panel2); border: 1px solid var(--line); color: var(--ink); border-radius: 8px; padding: 9px 11px; font-size: 14px; margin-top: 10px; }
#wardenLink { opacity: .6; }
#wardenLink.is-admin { color: var(--alert); opacity: 1; }
.hud .spacer { flex: 1; }
.dot { width: 9px; height: 9px; border-radius: 50%; background: var(--dim); display: inline-block; margin-right: 6px; }
.dot.live { background: var(--alert); box-shadow: 0 0 0 0 rgba(226,86,77,.6); animation: pulse 1.6s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(226,86,77,0);} 100%{box-shadow:0 0 0 0 rgba(226,86,77,0);} }

.lab-body { display: grid; grid-template-columns: 1fr 330px; min-height: 520px; }
.floor { padding: 18px; border-right: 1px solid var(--line); }
.floor-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.col-head { display: flex; align-items: center; gap: 8px; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--dim); margin: 4px 2px 12px; }
.col-head.g { color: var(--guard); } .col-head.p { color: var(--pris); }

.agent {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 13px 14px; margin-bottom: 12px;
  position: relative; transition: border-color .2s, transform .2s, box-shadow .2s; cursor: pointer;
}
.agent:hover { border-color: var(--dim); }
.agent.guard { border-left: 3px solid var(--guard); }
.agent.prisoner { border-left: 3px solid var(--pris); }
.agent.acting { box-shadow: 0 0 0 1px var(--accent), 0 8px 26px rgba(176,107,224,.18); transform: translateY(-2px); }
.agent.silenced { opacity: .55; }
.agent .top { display: flex; align-items: center; gap: 8px; }
.agent .nm { font-weight: 600; font-size: 15px; }
.agent .sub { color: var(--dim); font-size: 12px; }
.agent .badge { margin-left: auto; font-size: 10px; padding: 2px 7px; border-radius: 20px; border: 1px solid var(--line); color: var(--muted); }
.speech { margin: 8px 0 4px; font-size: 14.5px; min-height: 20px; }
.speech.empty { color: var(--dim); font-style: italic; }
.thought { color: var(--muted); font-style: italic; font-size: 13px; border-left: 2px solid var(--line); padding-left: 9px; margin: 6px 0; }
.thought .lbl { color: var(--dim); font-style: normal; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; display:block; }
.bars { display: flex; gap: 6px; margin-top: 9px; }
.bar { flex: 1; }
.bar .t { font-size: 9px; color: var(--dim); text-transform: uppercase; letter-spacing: .04em; }
.bar .track { height: 5px; background: var(--panel2); border-radius: 4px; overflow: hidden; margin-top: 2px; }
.bar .fill { height: 100%; border-radius: 4px; transition: width .5s ease; }
.fill.stress { background: #d98b3a; } .fill.aggression { background: var(--alert); }
.fill.empathy { background: var(--good); } .fill.authoritarianism { background: var(--guard); }
.fill.identity_erosion { background: var(--accent); }
.conscience { position: absolute; top: 10px; right: 10px; color: var(--good); font-size: 11px; }

/* prison map */
#mapPanel { padding: 14px 18px 4px; border-bottom: 1px solid var(--line); background: #090a0e; }
.prison-map { width: 100%; }
.mapsvg { width: 100%; height: auto; max-height: 380px; display: block; border-radius: 10px; }
.mtoken { transition: transform 1.1s cubic-bezier(.45,.05,.3,1); }
.mtoken text { pointer-events: none; }
.mtoken.active .ring { animation: ringpulse 1.4s infinite; }
@keyframes ringpulse { 0%{opacity:1} 70%{opacity:.2} 100%{opacity:1} }
.mtoken.pacing { animation: pace 2.2s ease-in-out infinite alternate; }
@keyframes pace { from { transform: translateX(-6px); } to { transform: translateX(6px); } }
.map-legend { display: flex; gap: 16px; flex-wrap: wrap; padding: 8px 2px 4px; font-size: 12px; color: var(--muted); }
.map-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 5px; vertical-align: middle; }
.tick.fam b { color: var(--good); } .tick.fam { color: var(--good); }
.tick.sup b { color: var(--accent); } .tick.sup { color: var(--accent); }

/* side panel */
.side { display: flex; flex-direction: column; }
.ticker { flex: 1; overflow-y: auto; padding: 14px 16px; max-height: 520px; }
.ticker h4 { margin: 0 0 10px; font-size: 12px; letter-spacing: .18em; text-transform: uppercase; color: var(--dim); }
.tick { font-size: 13px; margin-bottom: 9px; color: var(--muted); }
.tick b { color: var(--ink); font-weight: 600; }
.tick.guard b { color: var(--guard); } .tick.prisoner b { color: var(--pris); }
.tick.divider { color: var(--dim); border-top: 1px dashed var(--line); padding-top: 9px; text-transform: uppercase; letter-spacing: .1em; font-size: 11px; }
.tick.iv { color: var(--alert); font-weight: 600; }
.tick.maslach { color: var(--accent); }

/* interventions */
.iv-bar { padding: 12px 16px; border-top: 1px solid var(--line); background: var(--panel); }
.iv-bar .lbl { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); margin-bottom: 8px; }
.iv-btns { display: flex; flex-wrap: wrap; gap: 7px; }
.iv-btns .btn { padding: 6px 10px; font-size: 12px; }

/* mode tabs */
.mode-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.mtab { border: 1px solid var(--line); border-radius: 10px; padding: 9px 14px; cursor: pointer; font-size: 14px; color: var(--muted); background: var(--panel); transition: .15s; }
.mtab:hover { color: var(--ink); }
.mtab.sel { border-color: var(--guard); color: var(--ink); box-shadow: 0 0 0 1px var(--guard-d); }
.mode-desc { color: var(--muted); font-size: 14px; margin: 0 0 16px; min-height: 20px; }

/* builder */
#roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px,1fr)); gap: 12px; }
.rcard { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; gap: 12px; }
.rcard.guard { border-left: 3px solid var(--guard); } .rcard.prisoner { border-left: 3px solid var(--pris); }
.rcard .avwrap { width: 84px; flex: 0 0 84px; }
.rcard .avwrap .avatar-svg { width: 84px; height: 91px; border-radius: 10px; display: block; }
.rcard .fields { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.rcard input[type=text], .rcard textarea, .rcard select, .rcard input[type=number] {
  background: var(--panel2); border: 1px solid var(--line); color: var(--ink); border-radius: 7px; padding: 5px 8px; font-size: 13px; width: 100%;
}
.rcard textarea { resize: vertical; min-height: 38px; font-family: inherit; }
.rcard .mini { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.rcard .mini label { font-size: 11px; color: var(--muted); display: flex; flex-direction: column; gap: 2px; }
.rcard .mini select { padding: 3px 6px; font-size: 12px; width: auto; }
.swatches { display: flex; gap: 3px; flex-wrap: wrap; }
.sw { width: 16px; height: 16px; border-radius: 4px; cursor: pointer; border: 2px solid transparent; }
.sw.sel { border-color: #fff; }
.trait-mini { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; }
.trait-mini label { font-size: 10px; color: var(--dim); }
.trait-mini input[type=range] { width: 100%; }
.rcard .rhead { display: flex; align-items: center; gap: 6px; }
.rcard .rhead .rrole { font-size: 11px; text-transform: uppercase; letter-spacing: .1em; }
.rcard .x { margin-left: auto; cursor: pointer; color: var(--dim); font-size: 16px; }
.rcard .x:hover { color: var(--alert); }

/* avatar on floor card */
.agent .av { float: left; width: 52px; height: 56px; margin: 0 10px 4px 0; }
.agent .av .avatar-svg { width: 52px; height: 56px; border-radius: 8px; display: block; }
.agent .judgment { clear: both; font-size: 12px; color: var(--accent); margin-top: 6px; font-style: italic; }
.tick.judge { color: var(--accent); }
.tick.judge b { color: var(--accent); }

/* setup */
.setup { padding: 22px; display: none; }
.setup.show { display: block; }
.setup .row { display: flex; flex-wrap: wrap; gap: 22px; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: 5px; }
.field label { font-size: 12px; color: var(--muted); }
.field input[type=number], .field input[type=text], .field select {
  background: var(--panel2); border: 1px solid var(--line); color: var(--ink); border-radius: 8px; padding: 8px 10px; font-size: 14px; min-width: 120px;
}
.field input[type=range] { width: 160px; }
.modes { display: flex; gap: 10px; }
.mode-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px; cursor: pointer; flex: 1; background: var(--panel); transition: .15s; }
.mode-card.sel { border-color: var(--guard); box-shadow: 0 0 0 1px var(--guard-d); }
.mode-card h4 { margin: 0 0 4px; font-size: 15px; }
.mode-card p { margin: 0; font-size: 12.5px; color: var(--muted); }
.battle-models { display: none; gap: 8px; flex-wrap: wrap; }
.battle-models.show { display: flex; }
.chip { border: 1px solid var(--line); border-radius: 20px; padding: 5px 12px; font-size: 13px; cursor: pointer; color: var(--muted); }
.chip.on { background: var(--panel2); color: var(--ink); border-color: var(--dim); }

/* maslach banner */
.maslach-banner { display: none; padding: 14px 20px; background: linear-gradient(90deg, rgba(176,107,224,.16), transparent); border-bottom: 1px solid var(--line); border-left: 3px solid var(--accent); }
.maslach-banner.show { display: block; }
.maslach-banner .who { color: var(--accent); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }

/* recap + modal */
.modal-bg { position: fixed; inset: 0; background: rgba(5,6,9,.8); display: none; align-items: center; justify-content: center; z-index: 100; padding: 24px; }
.modal-bg.show { display: flex; }
.modal { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; max-width: 760px; width: 100%; max-height: 86vh; overflow-y: auto; padding: 30px; box-shadow: var(--shadow); }
.modal h2 { margin-top: 0; }
.modal .close { float: right; cursor: pointer; color: var(--muted); font-size: 22px; }
.recap-md { color: var(--ink); }
.recap-md h1,.recap-md h2,.recap-md h3 { color: var(--ink); }
.recap-md p { color: var(--muted); }

/* agent mind / thoughts */
.modal .mh { margin: 20px 0 6px; font-size: 14px; color: var(--muted); letter-spacing: .02em; border-top: 1px solid var(--line); padding-top: 14px; }
.latest { margin: 16px 0 4px; font-style: italic; font-size: 16px; color: var(--ink); border-left: 3px solid var(--accent); padding: 4px 0 4px 12px; }
.latest .lbl { display: block; font-style: normal; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 4px; }
.thoughts { display: flex; flex-direction: column; gap: 6px; }
.thtline { font-size: 13.5px; color: var(--ink); line-height: 1.5; }
.thtline .d { display: inline-block; min-width: 26px; font-family: ui-monospace, monospace; font-size: 11px; color: var(--dim); }
.dim2 { color: var(--dim); font-size: 13px; }

/* agent detail */
.detail-traits { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.spark { width: 100%; height: 60px; background: var(--bg2); border: 1px solid var(--line); border-radius: 8px; }
.detail-row { display: flex; justify-content: space-between; font-size: 13px; padding: 4px 0; border-bottom: 1px solid var(--line); }
.delta.up { color: var(--alert); } .delta.down { color: var(--good); } .delta.flat { color: var(--dim); }

/* gallery */
.runs { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px,1fr)); gap: 14px; margin-top: 20px; }
.run-item { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; cursor: pointer; transition: .15s; }
.run-item:hover { border-color: var(--dim); transform: translateY(-2px); }
.run-item .seed { font-family: "Fraunces", serif; font-size: 18px; }
.run-item .meta { color: var(--dim); font-size: 12px; margin-top: 6px; }
.tag { display:inline-block; font-size: 11px; padding: 2px 8px; border-radius: 20px; border: 1px solid var(--line); color: var(--muted); }
.tag.ended { color: var(--good); border-color: var(--good); }
.tag.halted { color: var(--accent); border-color: var(--accent); }
.tag.running { color: var(--alert); border-color: var(--alert); }

footer { padding: 50px 0; border-top: 1px solid var(--line); color: var(--dim); font-size: 13px; text-align: center; }

@media (max-width: 860px) {
  .lab-body { grid-template-columns: 1fr; }
  .side { border-top: 1px solid var(--line); }
  .grid3 { grid-template-columns: 1fr; }
}

/* ============================================================= */
/* ===============  FULL-SCREEN 3D GAME VIEW  ================== */
/* ============================================================= */
.game { display: none; }
body.playing { overflow: hidden; }
body.playing nav { display: none; }
body.playing .game {
  display: flex; flex-direction: column;
  position: fixed; inset: 0; z-index: 200; background: var(--bg);
}

/* top HUD bar */
.game .hud { flex: 0 0 auto; border-bottom: 1px solid var(--line); }
.game .hud .brand-mini { font-family: "Fraunces", serif; font-weight: 600; font-size: 16px; letter-spacing: -.02em; margin-right: 6px; }
.game .hud .brand-mini b { color: var(--guard); }
.game .hud .day { font-size: 19px; }

/* stats cluster */
.hud-stats { display: flex; align-items: center; gap: 22px; margin-left: 18px; padding-left: 18px; border-left: 1px solid var(--line); }
.hud-stats .stat { display: flex; flex-direction: column; gap: 1px; line-height: 1.1; }
.hud-stats .stat label { font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.hud-stats .stat b { font-family: ui-monospace, monospace; font-size: 15px; color: var(--ink); }
.hud-stats .stat-tension { flex-direction: column; }
.hud-stats .stat-tension .meter { width: 92px; height: 6px; background: var(--panel2); border-radius: 4px; overflow: hidden; margin-top: 3px; }
.hud-stats .stat-tension .meter i { display: block; height: 100%; width: 0%; border-radius: 4px; background: var(--good); transition: width .6s ease, background .6s ease; }
.hud-stats .stat-tension b { font-size: 11px; color: var(--muted); margin-top: 2px; }
@media (max-width: 1100px) { .hud-stats .stat:nth-child(3) { display: none; } }
@media (max-width: 980px) { .hud-stats { display: none; } }

/* day-6 dread pips */
.day-dread { display: inline-flex; gap: 3px; align-items: center; }
.day-dread i { width: 7px; height: 7px; border-radius: 2px; background: var(--line); transition: background .4s; }
.day-dread i.on { background: var(--guard); }
.day-dread i.hot { background: var(--alert); box-shadow: 0 0 6px rgba(226,86,77,.6); }

/* main: 3D stage + right sidebar */
.game-main { flex: 1 1 auto; display: grid; grid-template-columns: 1fr 372px; min-height: 0; position: relative; }
.stage { position: relative; width: 100%; height: 100%; overflow: hidden; background: linear-gradient(180deg, #cfe0f0, #b7c9dc); }
.stage canvas { display: block; width: 100% !important; height: 100% !important; }
.stage-hint { position: absolute; left: 14px; bottom: 12px; z-index: 5; font-size: 11px; color: rgba(255,255,255,.65); text-shadow: 0 1px 3px rgba(0,0,0,.6); pointer-events: none; letter-spacing: .04em; }
/* film vignette over the stage (documentary feel) */
.stage-vignette { position: absolute; inset: 0; z-index: 4; pointer-events: none; box-shadow: inset 0 0 180px 40px rgba(0,0,0,.45); }
/* REC badge — only while Director mode is on */
.rec-badge { position: absolute; top: 14px; left: 16px; z-index: 6; display: none; align-items: center; gap: 7px; font: 600 12px ui-monospace, monospace; letter-spacing: .15em; color: #fff; background: rgba(10,11,15,.5); padding: 5px 11px; border-radius: 20px; }
body.directing .rec-badge { display: flex; }
.rec-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--alert); box-shadow: 0 0 8px var(--alert); animation: pulse 1.6s infinite; }

/* recording button (capturing to video) */
.btn.rec-live { border-color: var(--alert); color: #fff; background: rgba(226,86,77,.22); font-variant-numeric: tabular-nums; }
.btn.rec-live::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--alert); box-shadow: 0 0 7px var(--alert); margin-right: 6px; vertical-align: middle; animation: pulse 1.6s infinite; }

/* right sidebar */
.game-side { background: var(--bg2); border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; overflow: hidden; }
.side-sec { display: flex; flex-direction: column; min-height: 0; }
.side-sec.roster { flex: 1 1 55%; overflow-y: auto; padding: 12px 12px 4px; border-bottom: 1px solid var(--line); }
.side-sec.feed { flex: 1 1 45%; min-height: 120px; }
.side-head { position: sticky; top: 0; z-index: 2; background: var(--bg2); display: flex; align-items: center; gap: 8px; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--dim); padding: 4px 2px 10px; }
.side-head .count { margin-left: auto; font-family: ui-monospace, monospace; color: var(--muted); background: var(--panel); border: 1px solid var(--line); border-radius: 20px; padding: 1px 9px; letter-spacing: 0; }

/* compact agent cards in the sidebar */
.game-side .agent { padding: 11px 12px; margin-bottom: 9px; }
.game-side .agent .av { width: 44px; height: 48px; margin-right: 9px; }
.game-side .agent .av .avatar-svg { width: 44px; height: 48px; }
.game-side .agent .nm { font-size: 14px; }
.game-side .agent .thought { display: none; }   /* keep cards short; full mind is in the modal */
.game-side .agent .speech { font-size: 13px; min-height: 16px; margin: 6px 0 2px; }
.game-side .agent .badge { background: var(--panel2); }

/* event feed */
.game-side .feed .side-head { padding: 10px 14px; border-top: 0; }
.game-side .ticker { flex: 1 1 auto; overflow-y: auto; padding: 0 14px 14px; max-height: none; }
.game-side .ticker h4 { display: none; }

/* interventions pinned at the bottom */
.game-side .iv-bar { flex: 0 0 auto; }
.game-side .iv-btns .btn { padding: 6px 9px; font-size: 11.5px; }

/* hover thought-wisp */
.thought-tip {
  position: fixed; z-index: 300; max-width: 280px; pointer-events: none;
  background: rgba(14,16,23,.95); border: 1px solid var(--line); border-left: 2px solid var(--accent);
  border-radius: 9px; padding: 8px 11px; font-size: 13px; font-style: italic; color: var(--ink);
  box-shadow: var(--shadow); opacity: 0; transform: translateY(4px); transition: opacity .12s, transform .12s;
}
.thought-tip.show { opacity: 1; transform: translateY(0); }
.thought-tip .who { display: block; font-style: normal; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 3px; }

/* maslach banner floats over the stage */
.game .maslach-banner { position: absolute; top: 56px; left: 0; right: 372px; z-index: 30; margin: 14px; border-radius: 12px; background: linear-gradient(90deg, rgba(176,107,224,.22), rgba(20,22,31,.92)); border: 1px solid var(--accent); box-shadow: var(--shadow); }

@media (max-width: 900px) {
  .game-main { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .game-side { flex-direction: row; border-left: 0; border-top: 1px solid var(--line); max-height: 42vh; }
  .side-sec.roster { flex: 1; } .side-sec.feed { flex: 1; }
  .game .maslach-banner { right: 0; }
}
