:root{--lightningcss-light: ;--lightningcss-dark:initial;color-scheme:dark;--bg:#0b0d10;--panel:#12161c;--panel-2:#181d25;--border:#232a34;--text:#e6e6e6;--muted:#8b95a3;--accent:#58c4dd;--yellow:#ffd166;--green:#83c167;--red:#fc6255;--purple:#b48ead;background:var(--bg);color:var(--text);font-family:Inter,system-ui,-apple-system,Segoe UI,sans-serif}*{box-sizing:border-box}body{background:var(--bg);margin:0;overflow:hidden}button,input{font:inherit;color:inherit}kbd{border:1px solid var(--border);background:var(--panel-2);color:var(--muted);border-bottom-width:2px;border-radius:5px;padding:2px 6px;font:600 11px ui-monospace,monospace}.muted{color:var(--muted)}.small{font-size:12px}.btn{border:1px solid var(--border);background:var(--panel-2);cursor:pointer;border-radius:8px;align-items:center;gap:6px;padding:8px 14px;font-weight:600;display:inline-flex}.btn:disabled{opacity:.4;cursor:default}.btn-primary{background:var(--accent);border-color:var(--accent);color:#06222b}.btn-primary:not(:disabled):hover{filter:brightness(1.1)}.btn-ghost{background:0 0}.btn-ghost:hover{background:var(--panel-2)}.icon-btn{color:var(--muted);cursor:pointer;background:0 0;border:0;border-radius:6px;padding:4px;display:inline-flex}.icon-btn:hover{color:var(--text);background:var(--panel-2)}.brand{letter-spacing:-.02em;font-size:18px;font-weight:800}.brand span{color:var(--accent)}.start-screen{z-index:20;background:radial-gradient(ellipse at 50% 30%, #15202b 0%, var(--bg) 65%);place-items:center;padding:24px;transition:opacity .3s,visibility .3s;display:grid;position:fixed;inset:0}.start-screen.is-hidden{opacity:0;visibility:hidden;pointer-events:none}.start-card{text-align:center;width:min(620px,100%)}.brand-lg{margin-bottom:28px;font-size:22px}.start-card h1{letter-spacing:-.02em;margin:0 0 12px;font-size:clamp(28px,4vw,40px)}.lede{color:var(--muted);max-width:520px;margin:0 auto 28px;line-height:1.5}.start-form{gap:8px;display:flex}.start-form input{border:1px solid var(--border);background:var(--panel);border-radius:10px;outline:none;flex:1;min-width:0;padding:14px 16px;font-size:18px}.start-form input:focus{border-color:var(--accent)}.start-form .btn{border-radius:10px;padding:0 24px;font-size:16px}.chips{flex-wrap:wrap;justify-content:center;align-items:center;gap:8px;margin-top:18px;display:flex}.chips-label{color:var(--muted);font-size:13px}.chip{border:1px solid var(--border);background:var(--panel);cursor:pointer;border-radius:999px;padding:6px 14px}.chip:hover{border-color:var(--accent);color:var(--accent)}.app{grid-template-rows:auto minmax(0,1fr) auto;grid-template-columns:minmax(0,1fr) 320px;height:100dvh;display:grid}.topbar{border-bottom:1px solid var(--border);grid-column:1/-1;align-items:center;gap:12px;padding:8px 16px;display:flex}.topic-title{color:var(--muted);border-left:1px solid var(--border);padding-left:12px}.spacer{flex:1}.badge{text-transform:uppercase;letter-spacing:.06em;color:var(--yellow);border:1px solid #5c4b1e;border-radius:5px;padding:2px 6px;font-size:11px;font-weight:700}.session{color:var(--muted);align-items:center;gap:6px;font:12px ui-monospace,monospace;display:inline-flex}.conn-dot{background:var(--red);border-radius:50%;width:7px;height:7px}.conn-dot.on{background:var(--green)}.main{flex-direction:column;min-width:0;min-height:0;padding:16px 16px 0;display:flex}.side{border-left:1px solid var(--border);flex-direction:column;gap:12px;padding:12px;display:flex;overflow:auto}.stage-wrap{flex:1;justify-content:center;align-items:center;min-height:0;display:flex;container-type:size}.stage{aspect-ratio:16/9;width:min(100cqw,177.778cqh);box-shadow:0 0 0 1px var(--border);background:#0e1116;border-radius:10px;transition:box-shadow .2s;position:relative;overflow:hidden}.stage .player{width:100%;height:100%;transition:opacity .6s;position:absolute;inset:0}.stage.front-lesson .player-answer,.stage.front-answer .player-lesson{opacity:0;pointer-events:none}.scrim{opacity:0;pointer-events:none;background:#000;transition:opacity .3s;position:absolute;inset:0}.stage.state-listening .scrim{opacity:.3}.stage.state-thinking .scrim,.stage.dimmed .scrim{opacity:.6}.stage.state-listening{box-shadow:0 0 0 2px var(--red), 0 0 32px #fc62554d}.hud-listening,.hud-thinking,.hud-loading{pointer-events:none;align-items:center;gap:10px;display:flex;position:absolute}.hud-listening{background:#140808d9;border:1px solid #fc625599;border-radius:999px;padding:8px 16px;font-weight:600;bottom:24px;left:50%;transform:translate(-50%)}.rec-dot{background:var(--red);border-radius:50%;width:10px;height:10px;animation:1s infinite alternate pulse}.bars{align-items:center;gap:3px;height:16px;display:inline-flex}.bars i{background:var(--red);border-radius:2px;width:3px;height:100%;animation:.9s ease-in-out infinite bar}.bars i:nth-child(2){animation-delay:-.2s}.bars i:nth-child(3){animation-delay:-.4s}.bars i:nth-child(4){animation-delay:-.6s}.bars i:nth-child(5){animation-delay:-.8s}.hud-thinking{letter-spacing:.08em;text-transform:uppercase;color:#cfe9f1;flex-direction:column;justify-content:center;font-size:15px;animation:.3s both fade-in;inset:0}.orbit{width:44px;height:44px;animation:1.4s linear infinite spin;position:relative}.orbit i{background:var(--accent);transform-origin:4px 22px;border-radius:50%;width:8px;height:8px;position:absolute;top:0;left:18px}.orbit i:nth-child(2){opacity:.6;transform:rotate(120deg)}.orbit i:nth-child(3){opacity:.3;transform:rotate(240deg)}.hud-loading{text-align:center;flex-direction:column;justify-content:center;gap:6px;inset:0}.spinner{border:3px solid var(--border);border-top-color:var(--accent);border-radius:50%;width:36px;height:36px;margin-bottom:10px;animation:.9s linear infinite spin}.loading-title{font-size:20px;font-weight:700}.loading-sub{color:var(--accent);font-size:16px}.loading-meta{color:var(--muted);font-size:13px}.sound-blocked{text-align:left;border:1px solid var(--yellow);color:var(--yellow);cursor:pointer;background:#12161cf2;border-radius:12px;align-items:center;gap:12px;padding:14px 20px;display:flex;position:absolute;top:50%;left:50%;transform:translate(-50%,-50%)}.sound-blocked span{flex-direction:column;display:flex}.sound-blocked small{color:var(--muted)}.captions{flex-direction:column;flex:none;align-items:center;gap:4px;min-height:112px;padding:10px 0 14px;display:flex}.caption-note{min-height:18px;color:var(--muted);font-size:13px}.caption-row{align-items:baseline;gap:10px;max-width:980px;display:flex}.caption-line{text-align:center;text-wrap:balance;font-size:22px;line-height:1.4}.caption-line.animate{animation:.22s ease-out both caption-in}.caption-line q{font-style:italic}.caption-tag{text-transform:uppercase;letter-spacing:.08em;border-radius:5px;flex:none;padding:3px 7px;font-size:11px;font-weight:700;transform:translateY(-3px)}.tone-listen{color:var(--red);background:#fc62551f}.tone-think{color:var(--accent);background:#58c4dd1f}.tone-answer{color:var(--yellow);background:#ffd1661f}.tone-lesson{color:var(--green);background:#83c1671f}.transcript{font-style:italic}.caret{vertical-align:-.12em;background:var(--red);width:2px;height:1em;margin-left:3px;animation:1s steps(2,end) infinite blink;display:inline-block}.followup{color:var(--muted);flex-direction:column;align-items:center;gap:8px;font-size:18px;display:inline-flex}.countdown{background:var(--yellow);transform-origin:0;border-radius:2px;width:220px;height:3px;animation:linear both drain;display:block}.panel h3{letter-spacing:.1em;text-transform:uppercase;color:var(--muted);margin:0;font-size:11px;font-weight:700}.chapters-panel h3{margin-bottom:8px}.chapters{flex-direction:column;gap:2px;margin:0;padding:0;list-style:none;display:flex}.chapter button{text-align:left;cursor:pointer;background:0 0;border:0;border-radius:8px;align-items:center;gap:10px;width:100%;padding:8px;display:flex}.chapter button:not(:disabled):hover{background:var(--panel-2)}.chapter button:disabled{cursor:default}.ch-num{border:1px solid var(--border);width:22px;height:22px;color:var(--muted);border-radius:50%;flex:none;place-items:center;font-size:12px;font-weight:700;display:grid}.ch-title{flex:1;min-width:0}.chapter.is-current button{background:#58c4dd1a}.chapter.is-current .ch-num{background:var(--accent);border-color:var(--accent);color:#06222b}.chapter.is-current .ch-title{color:var(--accent);font-weight:600}.chapter.is-done .ch-num{color:var(--green);border-color:#3c5a30}.chapter.is-done .ch-title{color:var(--muted)}.chapter.is-pending .ch-title{color:#5b6470}.ch-pending{border:2px solid var(--border);border-top-color:var(--muted);border-radius:50%;flex:none;width:12px;height:12px;animation:1s linear infinite spin}.eq{flex:none;align-items:flex-end;gap:2px;height:12px;display:inline-flex}.eq i{background:var(--accent);width:3px;height:100%;animation:.8s ease-in-out infinite bar}.eq i:nth-child(2){animation-delay:-.3s}.eq i:nth-child(3){animation-delay:-.5s}.eq.paused i{animation-play-state:paused}.skeleton li{align-items:center;gap:10px;padding:8px;display:flex}.bone{background:linear-gradient(90deg, var(--panel-2), #222a35, var(--panel-2));background-size:200% 100%;border-radius:4px;height:10px;animation:1.2s infinite shimmer}.debug-panel{border-top:1px solid var(--border);padding-top:8px;font-size:12px}.debug-toggle{cursor:pointer;width:100%;color:var(--muted);background:0 0;border:0;align-items:center;gap:6px;padding:4px 0;display:flex}.debug-toggle svg{transition:transform .15s}.debug-panel.is-open .debug-toggle svg{transform:rotate(90deg)}.debug-summary{gap:8px;margin-left:auto;font:11px ui-monospace,monospace;display:flex}.debug-body{flex-direction:column;gap:12px;margin-top:8px;display:flex}.debug-title{flex-direction:column;margin-bottom:4px;font-weight:700;display:flex}.debug-sub{color:var(--muted);text-overflow:ellipsis;white-space:nowrap;font-weight:400;overflow:hidden}.debug-table table{border-collapse:collapse;font-variant-numeric:tabular-nums;width:100%}.debug-table td{border-bottom:1px solid #1a1f27;padding:3px 4px}.debug-table tfoot td{border-bottom:0;padding-top:5px;font-weight:700}.debug-table tfoot tr+tr td{color:var(--muted);padding-top:2px;font-weight:400}.stage-name{white-space:nowrap;font-family:ui-monospace,monospace}.stage-name i{color:var(--muted);font-style:normal}.bar-cell{width:40%}.bar{background:var(--accent);border-radius:3px;min-width:1px;height:6px;display:block}.bar-since{background:var(--purple)}.is-missing{color:#5b6470}.num{text-align:right;white-space:nowrap}.later-beats{color:var(--muted);flex-wrap:wrap;align-items:center;gap:4px;display:flex}.pill{background:var(--panel-2);color:var(--text);border-radius:999px;padding:1px 6px;font:11px ui-monospace,monospace}.debug-legend{color:var(--muted);margin:0}.bottombar{border-top:1px solid var(--border);background:var(--panel);grid-column:1/-1;align-items:center;gap:12px;padding:12px 16px;display:flex}.ptt{border:1px solid var(--border);background:var(--panel-2);cursor:pointer;-webkit-user-select:none;user-select:none;touch-action:none;border-radius:999px;flex:none;align-items:center;gap:10px;min-width:210px;padding:10px 14px;font-weight:600;display:inline-flex}.ptt:disabled{opacity:.4;cursor:default}.ptt:not(:disabled):hover{border-color:var(--red)}.ptt-icon{width:28px;height:28px;color:var(--red);background:#fc625526;border-radius:50%;place-items:center;display:grid}.ptt.is-held{background:var(--red);border-color:var(--red);color:#fff}.ptt.is-held .ptt-icon{color:#fff;background:#fff3;animation:1.2s ease-out infinite ring}.ask-form{flex:1;gap:8px;min-width:0;display:flex}.ask-form input{border:1px solid var(--border);background:var(--bg);border-radius:10px;outline:none;flex:1;min-width:0;padding:10px 14px}.ask-form input:focus{border-color:var(--accent)}.state-label{border:1px solid var(--border);text-transform:lowercase;min-width:120px;color:var(--muted);border-radius:999px;flex:none;justify-content:center;align-items:center;gap:8px;padding:6px 12px;font-size:13px;font-weight:600;display:inline-flex}.state-dot{background:currentColor;border-radius:50%;width:8px;height:8px}.state-label.state-playing{color:var(--green)}.state-label.state-listening{color:var(--red)}.state-label.state-listening .state-dot,.state-label.state-thinking .state-dot{animation:.8s infinite alternate pulse}.state-label.state-thinking{color:var(--accent)}.state-label.state-answering{color:var(--yellow)}.state-label.state-returning{color:var(--purple)}.toasts{z-index:40;flex-direction:column;gap:8px;width:min(380px,100vw - 32px);display:flex;position:fixed;top:60px;right:16px}.toast{background:var(--panel-2);border:1px solid #4a2a28;border-radius:10px;align-items:flex-start;gap:10px;padding:10px 10px 10px 14px;font-size:14px;animation:.2s both caption-in;display:flex;box-shadow:0 8px 24px #0006}.toast-dot{background:var(--red);border-radius:50%;flex:none;width:8px;height:8px;margin-top:6px}.toast-msg{word-break:break-word;flex:1}.modal-scrim{z-index:50;background:#0009;place-items:center;padding:16px;display:grid;position:fixed;inset:0}.modal{background:var(--panel);border:1px solid var(--border);border-radius:14px;width:min(440px,100%);padding:24px}.modal h2{margin:0 0 8px;font-size:20px}.modal p{color:var(--muted);margin:0 0 20px}.modal-actions{justify-content:flex-end;gap:8px;display:flex}@keyframes pulse{0%{opacity:.35}to{opacity:1}}@keyframes spin{to{transform:rotate(360deg)}}@keyframes bar{0%,to{transform:scaleY(.3)}50%{transform:scaleY(1)}}@keyframes blink{to{visibility:hidden}}@keyframes drain{0%{transform:scaleX(1)}to{transform:scaleX(0)}}@keyframes ring{0%{box-shadow:0 0 #ffffff80}to{box-shadow:0 0 0 10px #fff0}}@keyframes caption-in{0%{opacity:0;transform:translateY(4px)}to{opacity:1;transform:none}}@keyframes fade-in{0%{opacity:0}}@keyframes shimmer{to{background-position:-200% 0}}@media (prefers-reduced-motion:reduce){*,:before,:after{animation-duration:.01ms!important;animation-iteration-count:1!important}}@media (width<=900px){.app{grid-template-rows:auto auto auto auto;grid-template-columns:1fr;height:auto}body{overflow:auto}.side{border-left:0;border-top:1px solid var(--border)}.stage-wrap{container-type:inline-size}.stage{width:100%}.ptt{min-width:0}.ptt-text,.ptt kbd{display:none}}.icon-btn{border:1px solid var(--border);background:var(--panel-2);width:44px;height:44px;color:inherit;cursor:pointer;border-radius:999px;flex:none;place-items:center;display:inline-grid}.icon-btn:hover:not(:disabled){border-color:var(--accent,#4cc3e0)}.icon-btn:disabled{opacity:.4;cursor:default}.icon-btn[aria-pressed=true]{color:var(--accent,#4cc3e0)}.state-label.state-paused{color:var(--yellow,#f5c542)}.hud-paused{z-index:5;color:#e8ecf1;font:inherit;cursor:pointer;background:#080a0e73;border:0;flex-direction:column;justify-content:center;align-items:center;gap:14px;font-size:15px;display:flex;position:absolute;inset:0}.hud-paused-icon{background:#ffffff1f;border:1px solid #ffffff40;border-radius:999px;place-items:center;width:76px;height:76px;padding-left:4px;display:grid}.record-btn .rec-icon{background:var(--red,#ef6461);border-radius:999px;width:10px;height:10px}.record-btn.is-recording{color:var(--red,#ef6461);border-color:var(--red,#ef6461);font-variant-numeric:tabular-nums}.record-btn.is-recording .rec-icon{border-radius:2px;animation:1.2s ease-in-out infinite rec-pulse}@keyframes rec-pulse{50%{opacity:.35}}
