:root {
  --navy: #00053D; --navy2: #0B1F59; --surface: #06104F; --border: #1B3480;
  --text: #F5F7FC; --muted: #A4B0DA; --coral: #ED3237; --orange: #FF5A00; --gold: #FCB82E; --ok: #3DDC97;
  --grad: linear-gradient(90deg, #ED3237 0%, #FCB82E 100%);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--navy); color: var(--text); font: 15px/1.5 Inter, "Segoe UI", system-ui, sans-serif; display: flex; flex-direction: column; }
a { color: var(--gold); }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.top { display: flex; align-items: center; justify-content: space-between; padding: 10px 18px; border-bottom: 1px solid var(--border); background: #000430; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { width: 30px; height: 30px; }
.brand b { font: 800 20px Sora, Inter, sans-serif; }
.brand span { color: var(--muted); font-size: 13px; }
.who { color: var(--muted); font-size: 13px; }
.panel { width: min(440px, calc(100% - 32px)); margin: 48px auto; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 26px; }
.panel h1 { margin: 0 0 4px; font: 700 24px Sora, Inter, sans-serif; }
label { display: block; margin: 14px 0 0; font-weight: 600; font-size: 14px; }
input, select { width: 100%; margin-top: 6px; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border); background: var(--navy); color: var(--text); font: inherit; }
input:focus, select:focus { outline: 2px solid var(--gold); outline-offset: 1px; }
button { font: 600 14px Inter, "Segoe UI", sans-serif; color: var(--text); background: var(--navy2); border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; cursor: pointer; }
button:hover { border-color: var(--gold); }
button.primary { background: var(--grad); border: 0; color: #fff; padding: 10px 18px; }
.panel button.primary { margin-top: 18px; width: 100%; font-size: 15px; }
button.danger { background: var(--coral); border: 0; }
.msg { min-height: 1.5em; margin: 10px 0 0; color: var(--gold); }
#session { flex: 1; display: flex; flex-direction: column; min-height: 0; position: relative; }
.bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--border); background: #000430; }
.bar select { width: auto; margin: 0; padding: 7px 8px; }
.peer { font-weight: 700; margin-right: 8px; }
.stats { margin-left: auto; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.stage { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; background: #000215; position: relative; overflow: hidden; }
canvas { max-width: 100%; max-height: 100%; outline: none; cursor: default; image-rendering: auto; }
canvas:focus { box-shadow: 0 0 0 2px var(--gold); }
.waiting { position: absolute; color: var(--muted); }
.chat { position: absolute; right: 12px; bottom: 12px; width: 320px; max-height: 60%; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; box-shadow: 0 10px 30px #0008; }
.chatlog { flex: 1; overflow: auto; padding: 10px; font-size: 14px; }
.chatlog p { margin: 0 0 8px; }
.chatlog .me { color: var(--gold); }
#chatForm { display: flex; gap: 6px; padding: 8px; border-top: 1px solid var(--border); }
#chatForm input { margin: 0; }
.badge { background: var(--coral); border-radius: 8px; padding: 0 5px; font-size: 11px; }
