:root {
  color-scheme: dark;
  --bg: #0b0d17;
  --ink: #f7f2e9;
  --muted: #bcb4c7;
  --line: rgba(255,255,255,.14);
  --glass: rgba(18, 20, 36, .62);
  --amber: #ffbf61;
  --rose: #ff6d91;
  --blue: #7ca7ff;
  --cyan: #73f4e0;
  --green: #71f59d;
  --purple: #b782ff;
  --shadow: 0 24px 90px rgba(0,0,0,.38);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at 14% 10%, rgba(124,167,255,.22), transparent 26rem),
    radial-gradient(circle at 88% 14%, rgba(255,109,145,.22), transparent 28rem),
    radial-gradient(circle at 50% 90%, rgba(255,191,97,.16), transparent 30rem),
    linear-gradient(145deg, #080913 0%, #121427 52%, #090a12 100%);
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.85), transparent 76%);
}
.app-shell {
  width: min(1220px, calc(100vw - 28px));
  margin: 24px auto 60px;
  display: grid;
  gap: 18px;
}
.glass {
  background: linear-gradient(140deg, rgba(255,255,255,.10), rgba(255,255,255,.045));
  border: 1px solid var(--line);
  border-radius: 30px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}
.hero-panel {
  display: grid;
  grid-template-columns: 1fr 360px;
  gap: 24px;
  padding: 30px;
  align-items: end;
}
.eyebrow {
  margin: 0;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: .15em;
  font-size: 12px;
  font-weight: 850;
}
h1, h2 { margin: 0; letter-spacing: -.055em; }
h1 {
  font-size: clamp(52px, 9vw, 112px);
  line-height: .86;
  margin: 8px 0 18px;
  text-shadow: 0 0 36px rgba(255,191,97,.16);
}
h2 { font-size: 24px; }
.subcopy {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
  line-height: 1.55;
}
.provider-card {
  padding: 18px;
  border-radius: 24px;
  background: rgba(0,0,0,.20);
  border: 1px solid var(--line);
}
.provider-card p { margin: 10px 0 0; color: var(--muted); line-height: 1.45; }
.provider-status { display: flex; align-items: center; gap: 9px; font-weight: 850; }
.dot { width: 10px; height: 10px; border-radius: 99px; display: inline-block; background: var(--muted); }
.dot.live { background: var(--green); box-shadow: 0 0 18px var(--green); }
.stage-card {
  position: relative;
  height: min(68vh, 680px);
  min-height: 520px;
  overflow: hidden;
  background: radial-gradient(circle at 50% 72%, rgba(255,191,97,.13), transparent 38%), linear-gradient(#15172b, #080913);
}
#stage { width: 100%; height: 100%; display: block; cursor: pointer; }
.stage-overlay { position: absolute; z-index: 3; }
.top-left { top: 18px; left: 18px; display: flex; gap: 10px; flex-wrap: wrap; }
.big-button, .ghost-button, .icon-button, .player-button {
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 999px;
  font: inherit;
  font-weight: 850;
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}
.big-button {
  padding: 13px 18px;
  border: none;
  background: linear-gradient(135deg, var(--amber), var(--rose));
  color: #160d12;
  box-shadow: 0 16px 40px rgba(255,109,145,.20);
}
.ghost-button { padding: 12px 16px; background: rgba(255,255,255,.08); }
.big-button:hover, .ghost-button:hover, .icon-button:hover, .player-button:hover { transform: translateY(-2px); border-color: rgba(255,255,255,.36); }
.prompt-strip {
  left: 18px;
  right: 18px;
  bottom: 18px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  pointer-events: none;
}
.prompt-chip {
  padding: 8px 11px;
  border-radius: 999px;
  background: rgba(255,255,255,.11);
  border: 1px solid rgba(255,255,255,.14);
  color: #fff5e4;
  font-size: 12px;
  font-weight: 800;
  box-shadow: 0 0 24px rgba(255,191,97,.08);
}
.meter-stack {
  right: 18px;
  top: 18px;
  display: grid;
  gap: 8px;
  width: 132px;
}
.meter-stack > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  border-radius: 16px;
  background: rgba(0,0,0,.24);
  border: 1px solid var(--line);
}
.meter-stack span { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .1em; font-weight: 850; }
.meter-stack strong { font-size: 18px; }
.controls-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.control-panel { padding: 22px; }
.research-panel { grid-column: span 2; }
.panel-title {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: start;
  margin-bottom: 16px;
}
.hint { color: var(--muted); font-size: 12px; font-weight: 750; }
.player-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.player-button {
  position: relative;
  min-height: 96px;
  padding: 14px;
  text-align: left;
  background: rgba(255,255,255,.07);
  overflow: hidden;
}
.player-button.active { background: linear-gradient(135deg, rgba(255,191,97,.22), rgba(124,167,255,.14)); border-color: rgba(255,191,97,.46); }
.player-button .emoji { font-size: 28px; display: block; margin-bottom: 8px; }
.player-button strong { display: block; font-size: 17px; }
.player-button small { color: var(--muted); }
.player-button .level {
  position: absolute;
  left: 0; bottom: 0;
  height: 4px;
  width: var(--level);
  background: linear-gradient(90deg, var(--cyan), var(--amber));
}
.mood-controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.icon-button {
  min-height: 84px;
  background: rgba(255,255,255,.07);
  display: grid;
  place-items: center;
  text-align: center;
  padding: 12px;
}
.icon-button.active { background: linear-gradient(135deg, rgba(183,130,255,.24), rgba(115,244,224,.13)); border-color: rgba(115,244,224,.44); }
.icon-button span { font-size: 26px; display: block; }
.icon-button strong { display: block; margin-top: 4px; font-size: 13px; }
.research-panel ul { margin: 0; padding-left: 20px; color: var(--muted); line-height: 1.65; }
.research-panel li + li { margin-top: 8px; }
.research-panel strong { color: var(--ink); }
@media (max-width: 900px) {
  .hero-panel, .controls-grid { grid-template-columns: 1fr; }
  .research-panel { grid-column: span 1; }
  .stage-card { min-height: 560px; }
}
@media (max-width: 620px) {
  .app-shell { width: min(100vw - 16px, 1220px); margin-top: 8px; }
  .hero-panel, .control-panel { padding: 18px; border-radius: 24px; }
  .provider-card { padding: 14px; }
  .stage-card { height: 72vh; min-height: 560px; border-radius: 24px; }
  .player-controls, .mood-controls { grid-template-columns: 1fr; }
  .meter-stack { top: auto; bottom: 86px; right: 12px; width: 120px; }
  .prompt-strip { bottom: 12px; }
}
