:root {
  color-scheme: dark;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: #f2f3fa;
  background: #0c0d17;
  --muted: #a6a9bd;
  --accent: #b6a7ff;
  --green: #78e4b5;
  --line: #2a2c40;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; min-width: 280px; min-height: 100vh; background: radial-gradient(ellipse at 12% 0%, #1a162d, transparent 55%); }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .6; }
button:focus-visible, input:focus-visible { outline: 2px solid #c9bcff; outline-offset: 3px; }
.shell { width: min(1120px, calc(100% - 64px)); margin-inline: auto; }
.topbar { min-height: 109px; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 26px; letter-spacing: -.075em; font-weight: 750; }
.brand-dot { color: var(--accent); margin-left: -8px; }
.brand-mark { width: 34px; height: 34px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; gap: 2px; background: #b6a7ff; }
.brand-mark i { width: 2px; height: 8px; border-radius: 5px; background: #242039; }
.brand-mark i:nth-child(even) { height: 12px; }
.brand-mark i:nth-child(3) { height: 18px; }
.security { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1px solid #284139; border-radius: 999px; color: #a3ebcb; background: #142521; font-size: 12px; font-weight: 600; white-space: nowrap; }

.icon { display: inline-block; flex: none; position: relative; color: inherit; }
.lock { width: 13px; height: 10px; border: 1.5px solid currentColor; border-radius: 3px; margin-top: 4px; }
.lock::before { content: ""; position: absolute; width: 7px; height: 6px; left: 1.5px; top: -6px; border: 1.5px solid currentColor; border-bottom: 0; border-radius: 5px 5px 0 0; }
.mic { width: 7px; height: 11px; border: 1.5px solid currentColor; border-radius: 5px; margin-inline: 4px; margin-bottom: 4px; }
.mic::before { content: ""; position: absolute; inset: 3px -4px -4px; border: 1.5px solid currentColor; border-top: 0; border-radius: 0 0 8px 8px; }
.mic::after { content: ""; position: absolute; width: 1px; height: 3px; top: 11px; left: 1.5px; background: currentColor; }

.layout { display: grid; grid-template-columns: 1.65fr 1fr; gap: 20px; }
.stage, .panel { border: 1px solid var(--line); border-radius: 24px; }
.stage { position: relative; isolation: isolate; min-height: 540px; overflow: hidden; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; padding: 42px; background: radial-gradient(ellipse at 67% 57%, #252047, transparent 63%), #121322; }
.stage::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: linear-gradient(#a6a0dc0c 1px, transparent 1px), linear-gradient(90deg, #a6a0dc0c 1px, transparent 1px); background-size: 32px 32px; mask-image: radial-gradient(ellipse at 68% 59%, #000 10%, transparent 76%); }
.stage-content { z-index: 1; }
.eyebrow { color: #bcb0ff; font-weight: 700; font-size: 10px; letter-spacing: .17em; margin: 0 0 17px; }
h1 { font-size: clamp(36px, 5.55vw, 64px); margin: 0; letter-spacing: -.07em; font-weight: 720; line-height: 1.04; }
h1 span { color: var(--accent); }
.stage-note { color: #b0b1c9; font-size: 15px; line-height: 1.65; margin: 17px 0 0; }
.stage-status { z-index: 1; display: flex; width: fit-content; align-items: center; gap: 9px; min-height: 37px; padding: 8px 12px; border: 1px solid #37374e; border-radius: 10px; background: #1b1b2f; color: #d4d3e3; font-size: 13px; }
.status-dot, .footer-dot { width: 7px; height: 7px; display: inline-block; flex: none; border-radius: 50%; background: var(--accent); }
.stage[data-state="connected"] .status-dot { background: var(--green); box-shadow: 0 0 12px #78e4b575; }
#duration { padding-left: 9px; border-left: 1px solid #4a4862; font-variant-numeric: tabular-nums; }

.visual { position: absolute; left: 55%; top: 65%; width: 362px; aspect-ratio: 1; transform: translate(-50%, -50%); pointer-events: none; }
.orbit, .orb { position: absolute; border-radius: 50%; top: 50%; left: 50%; transform: translate(-50%, -50%); }
.orbit { border: 1px solid #a390fc31; aspect-ratio: 1; }
.orbit-outer { width: 100%; border-color: #a390fc20; }
.orbit-middle { width: 81%; border-style: dashed; }
.orbit-inner { width: 62%; box-shadow: 0 0 44px #a37dff16, inset 0 0 34px #a37dff10; }
.orbit-outer::before, .orbit-middle::after { content: ""; position: absolute; border-radius: 50%; background: #c0aaff; width: 6px; height: 6px; box-shadow: 0 0 14px #b7a2ff; }
.orbit-outer::before { top: 27%; right: 4.8%; }
.orbit-middle::after { bottom: 22%; left: 7%; width: 4px; height: 4px; opacity: .72; }
.orb { width: 45%; aspect-ratio: 1; display: grid; place-items: center; border: 1px solid #a590ff8c; background: radial-gradient(circle at 48% 24%, #59478b, #332752 70%); box-shadow: 0 0 52px #a07cff38, inset 0 0 26px #a07cff30; }
.wave { display: flex; align-items: center; gap: 7px; }
.wave i { width: 4px; height: 15px; border-radius: 14px; background: #e0d8ff; box-shadow: 0 0 13px #dacdff4f; }
.wave i:nth-child(2), .wave i:nth-child(6) { height: 26px; }
.wave i:nth-child(3), .wave i:nth-child(5) { height: 38px; }
.wave i:nth-child(4) { height: 51px; }
.stage[data-state="connected"] .orb { border-color: #b7a7ff; }
.stage[data-state="connected"] .wave i { animation: speak 1.25s ease-in-out infinite alternate; }
.stage[data-state="connected"] .wave i:nth-child(even) { animation-delay: .24s; }
@keyframes speak { from { transform: scaleY(.6); } to { transform: scaleY(1); } }

.panel { padding: 33px; background: #151622; }
.panel-symbol { width: 44px; height: 44px; display: grid; place-items: center; color: #c9baff; background: #28223f; border: 1px solid #3d3359; border-radius: 13px; }
.panel-symbol .icon { scale: 1.18; }
h2 { font-size: 31px; font-weight: 700; line-height: 1.12; letter-spacing: -.045em; margin: 17px 0 22px; }
.segments { display: grid; grid-template-columns: 1fr 1fr; padding: 4px; gap: 4px; border: 1px solid #2c2c40; border-radius: 12px; background: #10111a; }
.segments button { border: 1px solid transparent; border-radius: 8px; color: #a9a9be; background: transparent; min-height: 38px; font-weight: 600; font-size: 14px; }
.segments button:hover { color: #fff; }
.segments button[aria-pressed="true"] { background: #2a263c; border-color: #3b3451; color: #f0ebff; }
form { margin-top: 21px; }
.form-note, .muted { color: var(--muted); font-size: 14px; line-height: 1.55; }
.form-note { margin: 0 0 19px; }
.room-note { margin: 10px 0 16px; }
.panel-foot { display: flex; gap: 6px; align-items: center; border-top: 1px solid var(--line); margin: 23px 0 0; padding-top: 17px; font-size: 12px; }
.button { width: 100%; min-height: 47px; border: 1px solid transparent; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 12px; font-weight: 680; font-size: 14px; }
.primary { color: #19142b; background: #b7a6ff; }
.primary:hover { background: #cbbdff; }
.plus { font-size: 21px; font-weight: 500; line-height: 1; }
.secondary { color: #ece8f8; border-color: #39334d; background: #252238; }
.secondary:hover { background: #322d47; }
.secondary[aria-pressed="true"] { color: #f4c3cb; }
.danger { color: #f4b4bd; border-color: #55333e; background: #2c1e29; margin-top: 9px; }
.danger:hover { background: #422936; }
label { display: block; margin-bottom: 8px; color: #e3e0ee; font-size: 13px; font-weight: 650; }
.field { display: flex; gap: 4px; margin-bottom: 11px; padding: 0 10px; border: 1px solid #35364c; border-radius: 10px; background: #0f101b; }
.field:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.field input { min-width: 0; width: 100%; height: 44px; border: 0; outline: none; color: #e7dfff; background: transparent; font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.field input:focus-visible { outline: none; }
.field input::placeholder { color: #85839e; }
.plain { color: #cdbfff; background: transparent; border: 0; padding: 0 4px; font-size: 12px; }
.plain:hover { text-decoration: underline; }
.volume-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
output { color: #cdbfff; font-size: 13px; font-variant-numeric: tabular-nums; }
input[type="range"] { width: 100%; margin: 5px 0 20px; accent-color: var(--accent); cursor: pointer; }
#sound { margin-bottom: 12px; }
.error { color: #ffd0d7; border: 1px solid #633748; background: #341f2b; border-radius: 10px; padding: 10px 12px; margin: 14px 0 0; font-size: 13px; line-height: 1.5; }
footer { display: flex; justify-content: space-between; gap: 12px; padding: 21px 2px 36px; color: #a09fb4; font-size: 12px; }
footer span:first-child { display: inline-flex; gap: 8px; align-items: center; }
.footer-dot { width: 5px; height: 5px; opacity: .8; }

@media (max-width: 900px) {
  .shell { width: min(100% - 44px, 740px); }
  .stage, .panel { padding: 26px; }
  .stage { min-height: 490px; }
  .visual { width: 290px; left: 53%; }
}

@media (max-width: 670px) {
  .shell { width: min(100% - 28px, 480px); }
  .topbar { min-height: 72px; }
  .layout { grid-template-columns: 1fr; gap: 12px; }
  .stage, .panel { padding: 21px; border-radius: 18px; }
  .stage { min-height: 314px; }
  .visual { width: 220px; top: 69%; left: 66%; }
  .wave { scale: .65; }
  .stage-note { font-size: 13px; }
  .eyebrow { margin-bottom: 11px; }
  h1 { font-size: clamp(34px, 8vw, 48px); }
  h2 { margin: 13px 0 16px; }
  footer { flex-wrap: wrap; padding-top: 15px; }
}

@media (prefers-reduced-motion: reduce) { .stage[data-state="connected"] .wave i { animation: none; } }
