:root {
  --bg: #07060d;
  --pink: #ff4fb8;
  --yellow: #ffd23f;
  --white: #fff6e8;
  --teal: #29e3d8;
  --red: #ff3b3b;
  --ink: #e9e3f5;
  --muted: #8e86a3;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-tap-highlight-color: transparent; user-select: none; overflow: hidden; }

main { height: 100%; display: grid; grid-template-columns: 1fr; grid-template-rows: 1fr auto;
  background: radial-gradient(ellipse at 35% 45%, #1b1030 0%, var(--bg) 65%); }
@media (orientation: landscape) {
  main { grid-template-columns: 1.1fr 1fr; grid-template-rows: 1fr; }
}

.stage { display: flex; align-items: center; justify-content: center; min-height: 0; padding: 2vh 2vw; }
.art { height: 100%; width: 100%; display: flex; align-items: center; justify-content: center; }
.art > svg, .art > img { height: 100%; max-height: 92vh; width: auto; max-width: 100%; overflow: visible; }

/* Neon tubes: bright core + generated wide glow copy behind (no SVG filters,
   which are expensive on tablet GPUs). */
.t { fill: none; stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; }
.t.thin { stroke-width: 3; }
.glow { stroke-width: 14; opacity: .28; fill: none !important; }
.plate { fill: #0d0a18; }
.glow.thin { stroke-width: 10; }
.pink   { stroke: var(--pink); }
.yellow { stroke: var(--yellow); }
.white  { stroke: var(--white); }
.teal   { stroke: var(--teal); }
.red    { stroke: var(--red); }
text.word { font-family: "Pacifico", cursive; font-size: 40px; stroke-width: 2.2; }
text.word.glow { stroke-width: 9; }

/* Flicker hooks toggled by JS */
.off { opacity: .18; }
#glow .off { opacity: .04; }

/* Side panel */
.panel { display: flex; flex-direction: column; justify-content: center; gap: 2.2vh;
  padding: 3vh 5vw 4vh; min-height: 0; }
.status { margin: 0; color: var(--muted); font-size: clamp(15px, 1.8vw, 20px); min-height: 1.4em; }
main[data-state="listening"] .status { color: var(--teal); }
main[data-state="speaking"] .status { color: var(--pink); }

.captions { min-height: 5.5em; max-height: 30vh; overflow: hidden; font-size: clamp(17px, 2.1vw, 24px);
  line-height: 1.4; display: flex; flex-direction: column; justify-content: flex-end; gap: .4em; }
.captions p { margin: 0; }
.captions .ai { color: var(--white); }
.captions .user { color: var(--muted); font-style: italic; }

.controls { display: flex; gap: 14px; }
.btn { border: 0; border-radius: 999px; font: inherit; font-weight: 700; cursor: pointer;
  padding: 22px 34px; font-size: clamp(18px, 2.2vw, 26px); }
.btn.start { flex: 1; color: #1a0b14; background: var(--pink);
  box-shadow: 0 0 0 3px rgba(255,79,184,.25), 0 0 28px rgba(255,79,184,.55); }
.btn.start:active { transform: scale(.98); }
.btn.start[disabled] { opacity: .6; }
.btn.end { color: var(--ink); background: #2a2238; }
.fine { margin: 0; color: var(--muted); font-size: 13px; }
