:root{--bg: #0f1a24;--panel: rgba(18, 28, 38, .92);--panel-border: rgba(255, 255, 255, .08);--text: #e8eef2;--muted: #9aabb8;--accent: #5fd3b3;--accent-text: #08231b;--stop: #e05a5a;--radius: 14px;font-family:system-ui,-apple-system,Segoe UI,Roboto,sans-serif;color:var(--text)}*{box-sizing:border-box}html,body{margin:0;height:100%;background:var(--bg);overflow:hidden}#stage{position:fixed;top:0;right:0;bottom:0;left:0;width:100vw;height:100vh;display:block}.topbar{position:fixed;top:0;left:0;right:0;display:flex;justify-content:space-between;align-items:center;padding:12px 16px;z-index:5;transition:opacity .6s}.brand{font-size:13px;color:var(--muted);letter-spacing:.04em}body.running .topbar .brand{opacity:0}.panel{position:fixed;left:50%;top:50%;transform:translate(-50%,-50%);width:min(720px,calc(100vw - 32px));max-height:calc(100vh - 80px);overflow:auto;background:var(--panel);border:1px solid var(--panel-border);border-radius:var(--radius);padding:24px;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);z-index:4}.panel.compact{width:min(460px,calc(100vw - 32px))}.panel h1,.panel h2{margin:0 0 8px;font-weight:600}.panel h1{font-size:22px}.panel h2{font-size:19px}.panel ul{padding-left:20px;line-height:1.6}.muted{color:var(--muted)}.small{font-size:12px}.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:16px 20px;margin:20px 0}.field{display:flex;flex-direction:column;gap:6px;font-size:14px}.field output{color:var(--muted);margin-left:4px}fieldset.row{display:flex;flex-wrap:wrap;gap:12px 18px;align-items:center;border:1px solid var(--panel-border);border-radius:10px;padding:12px 14px;margin:0 0 20px;font-size:14px}fieldset.row legend{color:var(--muted);padding:0 6px;font-size:13px}.check,.inline{display:inline-flex;align-items:center;gap:6px}.test{display:inline-flex;gap:8px}input[type=range]{accent-color:var(--accent);width:100%}.inline input[type=range]{width:110px}input[type=checkbox]{accent-color:var(--accent);width:16px;height:16px}select{background:#1b2834;color:var(--text);border:1px solid var(--panel-border);border-radius:8px;padding:7px 8px;font:inherit}.swatches{display:flex;gap:8px;flex-wrap:wrap}.swatch{width:28px;height:28px;border-radius:50%;border:2px solid rgba(255,255,255,.25);cursor:pointer;padding:0}.swatch[aria-checked=true]{outline:2px solid var(--text);outline-offset:2px}button{font:inherit;border-radius:10px;padding:9px 16px;cursor:pointer;border:1px solid transparent}button:disabled{opacity:.45;cursor:not-allowed}button:focus-visible,select:focus-visible,input:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.primary{background:var(--accent);color:var(--accent-text);font-weight:600}.ghost{background:#ffffff0f;color:var(--text);border-color:var(--panel-border)}.ghost:hover{background:#ffffff1f}.link-btn{background:none;color:#ffd27a;border:1px solid rgba(255,210,122,.35);padding:6px 12px;font-size:13px}.stop{background:var(--stop);color:#fff;font-weight:700;letter-spacing:.06em;padding:12px 26px;font-size:16px}.actions{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-top:8px}.runbar{position:fixed;left:50%;bottom:20px;transform:translate(-50%);display:flex;align-items:center;gap:10px;padding:10px 12px;background:var(--panel);border:1px solid var(--panel-border);border-radius:var(--radius);z-index:4;transition:opacity .6s;max-width:calc(100vw - 32px);flex-wrap:wrap;justify-content:center}.runbar[hidden]{display:none}body.idle-mouse .runbar{opacity:.25}body.idle-mouse .runbar:hover{opacity:1}.counter{font-variant-numeric:tabular-nums;min-width:72px;text-align:center}dialog{background:#142230;color:var(--text);border:1px solid var(--panel-border);border-radius:var(--radius);padding:24px;width:min(520px,calc(100vw - 32px))}dialog::backdrop{background:#0009}dialog h2{margin-top:0}.resources{list-style:none;padding:0;margin:16px 0;display:grid;gap:10px}.resources li{background:#ffffff0a;border:1px solid var(--panel-border);border-radius:10px;padding:10px 12px}.resources a{color:#ffd27a;font-weight:600;text-decoration:none}.resources a:hover{text-decoration:underline}.resources .detail{display:block;color:var(--muted);font-size:13px;margin-top:2px}.guided-entry{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px 16px;margin-top:16px;padding:12px 14px;border:1px solid rgba(95,211,179,.35);border-radius:10px;background:#5fd3b30f;font-size:14px}.guided-entry div{display:flex;flex-direction:column;gap:2px;flex:1 1 260px}.guided-entry input{width:150px;background:#1b2834;color:var(--text);border:1px solid var(--panel-border);border-radius:8px;padding:8px 10px;font:inherit}.guided-msg{color:#ffb4a8}.guided-entry .guided-wide{flex:1 1 100%;align-items:flex-start;color:var(--muted)}.guided-entry .guided-wide input{width:auto;margin-top:3px}.guided-entry .guided-voice{flex:1 1 100%;flex-direction:row;flex-wrap:wrap;align-items:center;gap:8px 10px}.guided-entry .guided-voice select{max-width:100%}.guided-entry .guided-voice button{padding:6px 12px;font-size:13px}.voice-note{margin:0 0 8px;color:var(--accent)}.mic{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;min-width:64px;padding:6px 8px;border-radius:10px;border:1px solid var(--panel-border);background:#1b2834;color:var(--muted);font-size:11px;cursor:pointer}.mic svg{fill:currentColor}.mic .mic-slash{display:none}.mic.off .mic-slash,.mic.problem .mic-slash{display:inline}.mic.listening{color:#0f1a24;background:var(--accent);border-color:var(--accent);animation:mic-pulse 1.8s ease-in-out infinite}.mic.waiting{color:var(--accent);border-color:#5fd3b380}.mic.problem{color:#ffb4a8;border-color:#ffb4a880}.mic:disabled{opacity:.4;cursor:default}@keyframes mic-pulse{0%,to{box-shadow:0 0 #5fd3b373}50%{box-shadow:0 0 0 7px #5fd3b300}}@media (prefers-reduced-motion: reduce){.mic.listening{animation:none}}.voice-note.problem{color:#ffb4a8}.panel.chat{display:flex;flex-direction:column;gap:10px;width:min(640px,calc(100vw - 32px));height:min(720px,calc(100vh - 80px));overflow:hidden}.panel.chat>p{margin:0}.chat-head{display:flex;align-items:center;gap:12px}.chat-head h2{margin:0;flex:1}.chat-head button{padding:6px 12px;font-size:13px}.chat-log{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:10px;padding:6px 4px 6px 0}.msg{max-width:88%;padding:10px 13px;border-radius:12px;line-height:1.5;font-size:15px;align-self:flex-start;background:#ffffff0f}.msg-text{white-space:pre-wrap;overflow-wrap:anywhere}.msg-label{display:block;margin-bottom:4px;font-size:11px;letter-spacing:.04em;text-transform:uppercase;color:var(--muted)}.msg.user{align-self:flex-end;background:#5fd3b329}.msg.script{border-left:3px solid #ffd27a;background:#ffd27a12}.msg.note{max-width:100%;align-self:stretch;background:#ffffff08;border:1px solid var(--panel-border)}.msg.error{border:1px solid var(--stop);background:#e05a5a14}.msg.typing{color:var(--muted);letter-spacing:.2em}.msg button{display:block;margin-top:10px;padding:6px 12px;font-size:13px}.msg .resources{margin:0}.set-ready{display:flex;flex-direction:column;gap:10px;padding:12px;border:1px solid rgba(95,211,179,.35);border-radius:10px;background:#5fd3b30f;font-size:14px}.set-ready-row{display:flex;flex-wrap:wrap;align-items:center;gap:10px}.set-ready-row span{flex:1 1 240px}.set-ready .stop{padding:9px 16px;font-size:14px}.text-btn{align-self:flex-start;padding:0;background:none;border:0;color:var(--muted);font-size:13px;text-align:left;text-decoration:underline}.text-btn:hover{color:var(--text)}.howto{display:flex;align-items:center;gap:16px}.howto-face{width:116px;flex:none}.howto ul{margin:0;padding-left:18px;line-height:1.55}.howto-track{stroke:#ffffff24;stroke-width:2;stroke-linecap:round}.howto-dot{fill:var(--accent);animation:howto-sweep 3.3s ease-in-out infinite}.howto-head{fill:#ffffff0d;stroke:var(--muted);stroke-width:2}.howto-eye{fill:#e8eef2}.howto-pupil{fill:#0f1a24;animation:howto-look 3.3s ease-in-out infinite}.howto-mouth{fill:none;stroke:var(--muted);stroke-width:2;stroke-linecap:round}@keyframes howto-sweep{0%,to{transform:translate(-52px)}50%{transform:translate(52px)}}@keyframes howto-look{0%,to{transform:translate(-5px)}50%{transform:translate(5px)}}@media (prefers-reduced-motion: reduce){.howto-dot,.howto-pupil{animation:none}}.run-note{position:fixed;left:50%;bottom:96px;transform:translate(-50%);display:flex;flex-wrap:wrap;align-items:center;justify-content:center;gap:10px;max-width:calc(100vw - 32px);padding:8px 12px;border-radius:10px;background:var(--panel);border:1px solid var(--panel-border);color:var(--muted);font-size:13px;z-index:4}.run-note button{padding:5px 10px;font-size:13px}.rating{display:flex;flex-direction:column;gap:10px;padding:10px;border:1px solid var(--panel-border);border-radius:12px;background:#ffffff08}.rating-picture{position:relative;height:150px;border-radius:8px;overflow:hidden;background:#1b2834}.rating-picture img{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;height:100%;object-fit:cover;transition:opacity .25s}.rating-value{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);min-width:64px;padding:2px 14px;border-radius:999px;background:#0f1a24b8;color:#fff;font-size:34px;font-weight:600;text-align:center;font-variant-numeric:tabular-nums}.rating-value:empty{display:none}.rating-row{display:flex;align-items:center;gap:12px}.rating-row input[type=range]{flex:1;min-width:120px}.rating-end{display:flex;flex-direction:column;align-items:center;font-weight:600;line-height:1.15}.rating-end small{font-size:11px;font-weight:400;color:var(--muted);max-width:76px;text-align:center}.rating-row button{white-space:nowrap}.chat-form{display:flex;gap:8px;align-items:stretch}.chat-form textarea{flex:1;resize:none;background:#1b2834;color:var(--text);border:1px solid var(--panel-border);border-radius:10px;padding:9px 11px;font:inherit;line-height:1.4}.chat-form textarea:focus-visible{outline:2px solid var(--accent);outline-offset:2px}.chat-form textarea:disabled{opacity:.5}dialog.crisis{width:100vw;height:100vh;max-width:none;max-height:none;margin:0;border:0;border-radius:0;padding:max(24px,8vh) max(24px,calc((100vw - 640px)/2));overflow-y:auto}.crisis-text{font-size:18px;line-height:1.55;white-space:pre-wrap}[hidden]{display:none!important}@media (max-width: 600px){.panel{padding:18px}.stop{padding:10px 18px}}
