:root {
  --bg: #07080e; --panel: #0c1018ee; --line: #1e2a3a;
  --cyan: #5eead4; --gold: #fbbf24; --mute: #94a3b8; --text: #e8eef5;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text);
  font-family: "Source Sans 3", system-ui, sans-serif; overflow: hidden; }
.hidden { display: none !important; }
.boot { height: 100%; display: grid; place-content: center; text-align: center; gap: .4rem;
  background: radial-gradient(ellipse at 50% 30%, #1a1428 0%, #07080e 70%); }
.boot h1, .brand { font-family: Syne, sans-serif; }
.boot h1 { margin: 0; letter-spacing: .06em; font-size: clamp(2rem, 6vw, 3.2rem); }
.kicker { letter-spacing: .22em; text-transform: uppercase; color: var(--cyan); font-size: .72rem; }
.boot-msg { color: var(--mute); }
.app { height: 100%; display: grid; grid-template-rows: auto 1fr auto; }
.top {
  display: flex; align-items: center; gap: .7rem; padding: .4rem .8rem;
  border-bottom: 1px solid var(--line); background: #080a10; flex-wrap: wrap;
}
.brand { color: var(--text); text-decoration: none; font-weight: 800; font-size: .95rem; }
.games-mini { color: var(--gold); text-decoration: none; font-size: .72rem; letter-spacing: .12em;
  text-transform: uppercase; font-weight: 700; }
.phase-pill {
  font-family: "IBM Plex Mono", monospace; font-size: .72rem; letter-spacing: .14em;
  padding: .28rem .7rem; border: 1px solid var(--cyan); color: var(--cyan); border-radius: 999px;
}
.hud-meta { display: flex; flex-wrap: wrap; gap: .55rem; font-size: .82rem; color: var(--mute); }
.hud-meta b { color: var(--gold); }
.grow { flex: 1; }
.paypal-mini {
  color: #fff; background: #0070ba; text-decoration: none; font-size: .72rem;
  padding: .28rem .55rem; border-radius: 7px; font-weight: 700;
}
.stage { display: grid; grid-template-columns: 1fr 280px; min-height: 0; }
.viewport { position: relative; min-width: 0; min-height: 0; background: #05060a; }
#crypt { width: 100%; height: 100%; display: block; image-rendering: pixelated; }
.announce {
  position: absolute; left: 50%; top: 18px; transform: translateX(-50%);
  font: 800 1.05rem Syne, sans-serif; color: var(--gold); text-shadow: 0 2px 0 #000, 0 0 12px #000;
  pointer-events: none; letter-spacing: .04em; text-align: center; max-width: 80%;
}
.pips {
  position: absolute; left: 10px; bottom: 10px; display: flex; gap: .4rem; pointer-events: none;
}
.pip {
  width: 150px; background: #07080ee8; border: 1px solid var(--line); border-radius: 8px; padding: .3rem .4rem;
}
.pip .nm { font: 700 .72rem Syne, sans-serif; }
.pip .bar { height: 6px; background: #1a2030; border-radius: 99px; margin: .2rem 0; }
.pip .bar i { display: block; height: 100%; border-radius: 99px; background: var(--gold); }
.pip .st { font: 500 .62rem "IBM Plex Mono", monospace; color: var(--mute); }
.rail {
  background: #0a0d14; border-left: 1px solid var(--line); overflow: auto;
  padding: .6rem; display: flex; flex-direction: column; gap: .5rem;
}
.panel { background: #0c1018; border: 1px solid var(--line); border-radius: 10px; padding: .65rem; }
.panel h3 {
  margin: 0 0 .35rem; font-family: Syne, sans-serif; font-size: .78rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--cyan);
}
.log { font-size: .78rem; color: #b7c4d4; max-height: 11rem; overflow: auto; line-height: 1.45; }
.dock {
  display: flex; align-items: center; gap: .5rem; padding: .45rem .7rem;
  border-top: 1px solid var(--line); background: #080a10; flex-wrap: wrap;
}
.btn {
  font: 700 .82rem Syne, sans-serif; background: #13202c; color: var(--text);
  border: 1px solid var(--line); border-radius: 8px; padding: .5rem .7rem; cursor: pointer;
}
.btn:hover { border-color: var(--cyan); }
.btn.gold { background: var(--gold); color: #111; border-color: var(--gold); }
.btn.ghost { background: transparent; }
.overlay {
  position: fixed; inset: 0; background: #07080ee8; display: grid; place-items: center;
  padding: 1rem; z-index: 20; overflow: auto;
}
.overlay.hidden { display: none !important; }
.overlay.studio { padding: 0; display: block; background: #05060a; }
.title-screen { min-height: 100vh; display: grid; grid-template-columns: 1.15fr minmax(320px, 460px); }
.title-art { position: relative; min-height: 100vh; background: #05060a; }
.title-art img { width: 100%; height: 100%; object-fit: cover; display: block; }
.title-art-fade {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent 55%, #07080e 100%); pointer-events: none;
}
.title-panel {
  background: linear-gradient(180deg, #0c1018, #07080e);
  border-left: 1px solid var(--line); padding: clamp(1.1rem, 3vw, 2rem);
  overflow: auto; min-height: 100vh; display: flex; flex-direction: column; justify-content: center;
}
.title-panel h1 { font-family: Syne, sans-serif; font-size: clamp(1.7rem, 3.4vw, 2.5rem); margin: .15rem 0 .35rem; }
.cast-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .4rem; margin: .5rem 0 .7rem; }
.cast {
  background: #10141c; border: 1px solid var(--line); border-radius: 10px;
  padding: .3rem; cursor: pointer; color: var(--text); text-align: center; font-family: inherit;
}
.cast img { width: 100%; height: 110px; object-fit: cover; object-position: 50% 18%; border-radius: 7px; display: block; }
.cast b { display: block; font-size: .78rem; margin-top: .25rem; font-family: Syne, sans-serif; }
.cast span { display: block; font-size: .62rem; color: var(--mute); }
.cast.on { border-color: var(--gold); }
.mode-grid { display: grid; gap: .4rem; }
.mode-card {
  text-align: left; width: 100%; background: #10141ccc; border: 1px solid var(--line);
  border-radius: 12px; padding: .65rem .75rem; cursor: pointer; color: var(--text); font-family: inherit;
}
.mode-card:hover { border-color: var(--gold); }
.mode-card b { display: block; font-family: Syne, sans-serif; }
.mode-card span { display: block; color: var(--mute); font-size: .78rem; margin-top: .12rem; }
.sheet {
  width: min(720px, 100%); background: #0c1018; border: 1px solid var(--line);
  border-radius: 16px; padding: 1.2rem 1.25rem;
}
.sheet h2 { font-family: Syne, sans-serif; margin: 0 0 .4rem; }
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin: .8rem 0; }
.name { width: 100%; background: #10141c; color: var(--text); border: 1px solid var(--line);
  border-radius: 8px; padding: .45rem .55rem; font: inherit; }
.radio-inline { display: flex; align-items: center; gap: .35rem; flex-wrap: wrap; }
.radio-inline button {
  background: #13202c; color: var(--text); border: 1px solid var(--line); border-radius: 8px;
  padding: .28rem .55rem; cursor: pointer; font: 650 0.72rem Syne, sans-serif;
}
.radio-title-inline { font-family: "IBM Plex Mono", monospace; font-size: .68rem; color: var(--mute);
  max-width: 12rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.donate-row { display: flex; flex-wrap: wrap; gap: .45rem; margin: .7rem 0 0; }
.donate-row a { text-decoration: none; font: 700 .78rem Syne, sans-serif; padding: .5rem .75rem; border-radius: 8px; }
.donate-paypal { background: #0070ba; color: #fff !important; }
.donate-patreon { background: #f96854; color: #111 !important; }
.lore { font-size: .82rem; color: var(--mute); line-height: 1.5; }
@media (max-width: 900px) {
  .stage { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .rail { max-height: 34vh; border-left: 0; border-top: 1px solid var(--line); }
  .title-screen { grid-template-columns: 1fr; }
  .title-art { min-height: 32vh; }
  .title-panel { min-height: auto; border-left: 0; }
  .modes { grid-template-columns: 1fr; }
}
