:root { --bg1: #2b3145; --bg2: #0f121b; --text: #E9ECF5; --muted: #9AA3BD; --line: #323a52; --surface: #171c2a; --accent: #fff;
  font-family: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif; }
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { height: 100dvh; display: flex; flex-direction: column; color: var(--text); font-size: 16px; line-height: 1.5;
  background: radial-gradient(120% 90% at 50% 28%, var(--bg1), var(--bg2)); }
button, input, select { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.corner { position: fixed; top: max(12px, env(safe-area-inset-top)); z-index: 5; }
.back { left: 14px; color: var(--muted); text-decoration: none; padding: 8px 12px; border-radius: 10px; }
.back:hover { color: var(--text); background: rgba(255,255,255,.07); }
.voice { right: 14px; }
.voice summary { list-style: none; cursor: pointer; color: var(--muted); padding: 8px 12px; border-radius: 10px; text-align: right; }
.voice summary::-webkit-details-marker { display: none; }
.voice summary:hover, .voice[open] summary { color: var(--text); background: rgba(255,255,255,.07); }
.voice-box { margin-top: 6px; width: min(300px, 88vw); background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.voice-box label { display: flex; flex-direction: column; gap: 4px; font-size: 14px; color: var(--muted); }
.voice-box label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--text); }
.voice-box select { background: #0f121b; border: 1px solid var(--line); border-radius: 8px; padding: 7px 8px; color: var(--text); }
.voice-box small { color: var(--muted); font-size: 13px; }

.stage { flex: 1; min-height: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 56px 16px 8px; }
.orb-btn { background: none; border: 0; padding: 0; cursor: pointer; width: min(80vw, 58dvh, 520px); aspect-ratio: 1; }
#orb { width: 100%; height: 100%; overflow: visible; }
.state { margin: 0; color: var(--muted); font-size: 14px; letter-spacing: .06em; text-transform: uppercase; }
.caption { margin: 0; max-width: min(660px, 92vw); text-align: center; min-height: 3.2em; max-height: 24dvh; overflow-y: auto; font-size: 18px; }

.bar { display: flex; align-items: center; gap: 8px; width: min(720px, 100% - 32px); margin: 0 auto; margin-bottom: max(16px, env(safe-area-inset-bottom));
  background: rgba(23,28,42,.9); border: 1px solid var(--line); border-radius: 26px; padding: 7px 7px 7px 8px; }
.bar:focus-within { border-color: #fff; }
.bar input { flex: 1; min-width: 0; background: none; border: 0; outline: none; padding: 8px 6px; }
.tool, .send { flex: none; width: 38px; height: 38px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer; }
.tool { background: none; color: var(--muted); }
.tool:hover { color: var(--text); background: rgba(255,255,255,.08); }
.tool[aria-pressed="true"] { background: #fff; color: #10131C; }
.send { background: #fff; color: #10131C; }
.send:disabled { opacity: .45; cursor: default; }

[hidden] { display: none !important; }
.voice-box { max-height: 80dvh; overflow-y: auto; }
.voice-box input:not([type=checkbox]):not([type=range]) { background: #0f121b; border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; color: var(--text); }
#elBox, #browserBox { display: flex; flex-direction: column; gap: 12px; }
#elBox[hidden], #browserBox[hidden] { display: none !important; }
.mini { align-self: flex-start; background: #fff; color: #10131C; border: 0; border-radius: 10px; padding: 7px 14px; font-weight: 600; cursor: pointer; }
.note { margin: 0; min-height: 1.4em; max-width: min(560px, 90vw); text-align: center; color: #ffb4bd; font-size: 14px; }
