*{box-sizing:border-box}
:root{color:#163643;background:#f5f8fb;font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;font-synthesis:none;--teal:#195969;--muted:#536c77;--edge:#dfe8eb;--shadow:0 12px 35px #2c53690c}
body{margin:0;min-width:300px;min-height:100vh;background:radial-gradient(ellipse at 9% 8%,#e8f7f7 0,transparent 43%),radial-gradient(ellipse at 96% 92%,#f4ebf5 0,transparent 36%),#f5f8fb}
button,input{font:inherit} button{cursor:pointer} button:disabled{cursor:default} button:focus-visible,input:focus-visible{outline:2px solid #198295;outline-offset:3px} button{transition:background .18s,box-shadow .18s,transform .18s,color .18s} .symbols{position:absolute;pointer-events:none}
.icon{width:20px;height:20px;flex:none;display:block;fill:none;stroke:currentColor;stroke-width:1.65;stroke-linecap:round;stroke-linejoin:round}
.topbar{height:69px;border-bottom:1px solid #dfe9ed;background:#fcfefeae}.top-inner{width:min(1240px,calc(100% - 96px));height:100%;margin:auto;display:flex;align-items:center;justify-content:space-between}.brand,.top-actions{display:flex;align-items:center;gap:12px}.brand-icon{width:39px;height:39px;display:grid;place-items:center;color:#cef9ef;background:#215563;border-radius:13px;box-shadow:0 4px 9px #194c612e}.brand-icon .icon{width:21px;height:21px}.brand strong{display:block;font-size:16px;line-height:1.15;letter-spacing:.08em}.brand span{color:var(--muted);font-size:10px;letter-spacing:.12em}.top-actions{gap:10px}.mode{height:34px;display:flex;align-items:center;gap:7px;padding:0 11px;border-radius:50px;color:#516f78;background:#edf3f5;font-size:12px;letter-spacing:.03em;white-space:nowrap}.mode span{width:7px;height:7px;border-radius:100%;background:#879ca5}.mode[data-ready=true]{background:#e3f5ef;color:#206757}.mode[data-ready=true] span{background:#34a288;box-shadow:0 0 0 3px #34a28822}.mode b{font-weight:600}
.quiet{background:white;border:1px solid var(--edge);color:#406170}.icon-button{display:grid;place-items:center;width:37px;height:37px;border-radius:12px;padding:0;flex-shrink:0}.icon-button .icon{width:18px;height:18px}.quiet:hover{background:#edf7f7;border-color:#c6e2e5}
.main{width:min(1240px,calc(100% - 96px));margin:0 auto}.intro{padding:31px 0 24px;position:relative}.eyebrow{font:700 11px/1.3 ui-monospace,Menlo,monospace;color:#44808b;letter-spacing:.2em;display:flex;align-items:center;gap:8px;margin:0 0 9px}.eyebrow span{width:17px;height:2px;border-radius:2px;background:#70c3c5}.intro h1{font-size:clamp(32px,4vw,53px);line-height:1.2;letter-spacing:-.065em;margin:0;font-weight:800}.intro h1 span{color:#286b79;margin-left:.17em}.intro h1 i{color:#64bdbb;font-style:normal;margin-left:.05em}.subtitle{color:#506b79;font-size:14px;margin:10px 0 0;letter-spacing:.025em}.intro-deco{position:absolute;right:2px;bottom:25px;display:flex;align-items:center;gap:8px;font-size:12px;letter-spacing:.12em;color:#537980}.intro-deco .icon{color:#4b9fa3;width:15px;height:15px}
.workspace{display:grid;grid-template-columns:minmax(0,1.16fr) minmax(0,1fr);gap:17px;height:clamp(505px,calc(100svh - 275px),680px)}.card{background:#fffffff5;border:1px solid #e1eaef;border-radius:24px;box-shadow:var(--shadow);min-width:0;min-height:0}.character-card{display:flex;flex-direction:column;padding:9px}.stage{position:relative;min-height:330px;flex:1;isolation:isolate;overflow:hidden;border-radius:17px;--accent:#559aab;--deep:#2b6c7b;--glow:#f2ffff;--mid:#d3edf4;--end:#adcfdc;background:radial-gradient(ellipse at 51% 44%,var(--glow) 0%,var(--mid) 57%,var(--end) 100%)}.stage[data-variant=d]{--accent:#bb7290;--deep:#8d4565;--glow:#fff6f9;--mid:#f4dce7;--end:#e5bdd4}.stage-grid{position:absolute;inset:46% -50% -94%;transform:perspective(360px) rotateX(49deg);transform-origin:top;background-image:linear-gradient(color-mix(in srgb,var(--accent) 18%,transparent) 1px,transparent 1px),linear-gradient(90deg,color-mix(in srgb,var(--accent) 18%,transparent) 1px,transparent 1px);background-size:36px 36px;mask-image:linear-gradient(transparent,#000 25%,#000 67%,transparent 93%);pointer-events:none}.stage-ring{pointer-events:none;position:absolute;width:min(57%,360px);aspect-ratio:1;border-radius:50%;border:1px solid color-mix(in srgb,var(--accent) 21%,transparent);left:50%;top:47%;transform:translate(-50%,-50%)}.ring-2{width:min(65%,420px);border-style:dashed;opacity:.8}.stage-spark{position:absolute;color:var(--accent);opacity:.72;font-size:18px}.spark-a{left:22%;top:34%}.spark-b{right:23%;top:26%;font-size:25px}.spark-c{right:19%;top:59%;font-size:14px}.canvas-wrap{position:absolute;inset:0;cursor:grab;touch-action:pan-y;display:grid;place-items:center}.canvas-wrap.dragging{cursor:grabbing}.canvas-wrap canvas{width:100%;height:100%;display:block}.stage-label,.activity{position:absolute;top:16px;display:flex;align-items:center;gap:7px;padding:7px 10px;font-size:11px;letter-spacing:.035em;font-weight:700;border:1px solid #ffffff9c;border-radius:9px;background:#ffffffa3;color:var(--deep);backdrop-filter:blur(7px);pointer-events:none;white-space:nowrap}.stage-label{left:16px}.stage-label .icon{width:13px;height:13px}.activity{right:16px}.activity-wave{display:flex;align-items:center;gap:2px;height:12px}.activity-wave i{display:block;height:4px;width:2px;border-radius:2px;background:currentColor}.activity-wave i:nth-child(2){height:8px}.activity-wave i:nth-child(3){height:10px}.activity-wave i:nth-child(4){height:6px}.stage[data-phase=listening] .activity,.stage[data-phase=speaking] .activity{background:#f6ffff;color:#146e71}.stage[data-phase=listening] .activity-wave i,.stage[data-phase=speaking] .activity-wave i{animation:meter .73s ease-in-out infinite alternate}.stage .activity-wave i:nth-child(2){animation-delay:-.18s}.stage .activity-wave i:nth-child(3){animation-delay:-.36s}.stage .activity-wave i:nth-child(4){animation-delay:-.49s}@keyframes meter{from{transform:scaleY(.45)}to{transform:scaleY(1.18)}}
.picker{position:absolute;left:16px;bottom:15px;display:flex;gap:6px;padding:4px;background:#ffffffa1;border:1px solid #ffffffb0;border-radius:11px}.select{width:33px;height:33px;border-radius:8px;border:1px solid transparent;font:800 15px/1 ui-monospace,Menlo,monospace}.select.j{color:#1c6077;background:#d4eff4}.select.d{color:#8b3f64;background:#f9deeb}.select[aria-pressed=true]{outline:1px solid currentColor;outline-offset:-2px;background:#f9ffff}.select.d[aria-pressed=true]{background:#fff6f9}.select:hover{filter:brightness(.98);transform:translateY(-1px)}.orbit-hint{position:absolute;right:16px;bottom:19px;color:var(--deep);font-size:11px;letter-spacing:.03em;pointer-events:none}.render-fail{font-size:13px;max-width:70%;color:var(--deep);background:#fdfdfde5;padding:12px 16px;border-radius:12px;text-align:center}
.voice-tools{padding:12px 9px 4px 11px;min-height:67px;display:flex;align-items:center;justify-content:space-between;gap:10px}.voice-copy{display:grid;gap:3px;min-width:0}.voice-copy strong{font-size:13px}.voice-copy span{font-size:11px;color:var(--muted);line-height:1.45}.voice-buttons{display:flex;align-items:center;gap:8px;flex:none}.volume[aria-pressed=false]{color:#61727b;background:#f2f4f5}.mic{display:flex;align-items:center;justify-content:center;gap:8px;border:0;border-radius:13px;min-height:41px;padding:0 14px;color:white;background:#215b6a;box-shadow:0 4px 11px #2452622e;font-size:13px;font-weight:700;white-space:nowrap}.mic .icon{width:17px;height:17px}.mic:hover{background:#174855}.mic[aria-pressed=true]{background:#a23f68}.mic[aria-pressed=true]:hover{background:#843254}
.record-mode{justify-self:start;padding:2px 0;border:0;background:none;color:#215b6a;font-size:12px;text-decoration:underline}
.chat-card{display:flex;flex-direction:column;overflow:hidden}.chat-head{display:flex;align-items:center;gap:11px;padding:15px 17px;border-bottom:1px solid #edf1f4}.chat-icon{display:grid;place-items:center;width:40px;height:40px;flex:none;border-radius:12px;background:#e7f4f4;color:#367d88}.chat-head h2{font-size:16px;margin:0 0 3px;line-height:1.2}.chat-head span{font-size:11px;color:var(--muted);display:block}.reset{margin-left:auto}.chat-scroll{flex:1;min-height:0;overflow:auto;padding:16px 17px 12px;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#ccdde1 transparent;background:linear-gradient(180deg,#fbfdfe,#fff 30%)}.message{display:flex;align-items:flex-start;gap:8px;margin:0 0 14px}.message:last-child{margin-bottom:0}.avatar{width:28px;height:28px;flex:none;border-radius:9px;background:#deeff3;color:#23657a;display:grid;place-items:center;font:700 13px/1 ui-monospace,Menlo,monospace}.avatar.d{background:#f8e1ed;color:#8a3d61}.message-content{min-width:0;max-width:min(92%,460px)}.message-name{font-size:11px;font-weight:650;color:#516b76;margin:1px 0 5px}.bubble{font-size:13px;line-height:1.7;border:1px solid #e3edf0;border-radius:2px 14px 14px 14px;background:#f4f8fa;padding:9px 12px;overflow-wrap:anywhere}.intro-bubble{background:#eff8f8;border-color:#e3f1f2}.intro-bubble strong{color:#266672}.message.user{justify-content:flex-end}.user .message-name{text-align:right}.user .bubble{background:#e9f5f5;border-color:#dbeff0;border-radius:14px 2px 14px 14px}.reply-block{display:grid;gap:6px}.reply-block p{margin:0;display:grid;grid-template-columns:2.3em 1fr;gap:4px}.reply-block p b{color:#286d79;font-size:12px;line-height:1.85}.reply-meta{display:flex;align-items:center;gap:8px;margin-bottom:3px}.category{display:inline-flex;padding:1px 6px;border-radius:30px;background:#e5f0f3;color:#366d7a;font-size:10px;font-weight:700;line-height:1.65}.category.warm{background:#dff2e8;color:#226451}.category.uncivil{background:#f9e4e8;color:#8f4058}.category.mixed{background:#fbefd6;color:#765d26}.replay{margin:0 0 0 auto;padding:3px;border:0;border-radius:5px;color:#55747f;background:transparent}.replay:hover{background:#dfeef2}.replay .icon{width:13px;height:13px}.waiting{color:#496d78}.waiting .bubble::after{content:'…';animation:pulse 1s ease-in-out infinite alternate}@keyframes pulse{to{opacity:.3}}
.chat-bottom{padding:10px 14px 14px;border-top:1px solid #edf1f4}.chips{display:flex;gap:5px;flex-wrap:wrap;margin-bottom:9px}.chip{display:flex;align-items:center;gap:4px;min-height:26px;background:#f4f8fa;padding:2px 7px;border:1px solid #e4eef0;border-radius:30px;color:#3c6b76;white-space:nowrap;font-size:11px}.chip .icon{width:11px;height:11px}.chip:hover:not(:disabled){background:#e3f4f2;border-color:#c8e9e7}.chip:disabled{opacity:.58}.composer{height:43px;border:1px solid #dce9ec;background:#f8fbfc;border-radius:12px;display:flex;align-items:center;padding:4px;gap:4px}.composer:focus-within{border-color:#76aeb9;box-shadow:0 0 0 2px #70a6bb25}.composer input{color:#163643;border:0;background:none;padding:0 8px;min-width:0;flex:1;font-size:13px;height:100%;outline:none}.composer input::placeholder{color:#617984}.composer input:focus-visible{outline:none}.send{display:grid;place-items:center;border:0;border-radius:9px;width:33px;height:33px;color:white;background:#225c6a;flex:none}.send:hover:not(:disabled){background:#164a58}.send:disabled{color:#61828d;background:#e5f0f3}.send .icon{width:16px;height:16px}
.footer{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 2px 16px;color:#536f7a;font-size:11px;line-height:1.6}.format{display:flex;align-items:center;gap:7px;flex-wrap:wrap}.format>span{color:#486571;margin-right:5px}.format b{font:700 10px/1.4 ui-monospace,Menlo,monospace;display:grid;place-items:center;border-radius:4px;padding:1px 4px;color:#286878;background:#e5f1f3}.format i{font-style:normal;margin:0 2px;color:#62939b}
dialog{max-width:min(450px,calc(100% - 32px));border:1px solid #d0e3e8;border-radius:20px;background:white;color:#1f4050;box-shadow:0 15px 60px #21445445;padding:18px 20px}dialog::backdrop{background:#23465660;backdrop-filter:blur(3px)}.dialog-head{display:flex;justify-content:space-between;align-items:center;gap:12px}.dialog-head h2{font-size:18px;margin:0}dialog p{font-size:14px;line-height:1.65;color:#456474}
@media(max-width:980px){.top-inner,.main{width:calc(100% - 48px)}.workspace{gap:12px;grid-template-columns:minmax(0,1.05fr) minmax(0,1fr)}.voice-tools{padding-left:5px;padding-right:5px}}
@media(max-width:740px){.top-inner,.main{width:calc(100% - 30px)}.topbar{height:57px}.intro{padding:24px 0 17px}.intro-deco{display:none}.subtitle{font-size:13px}.workspace{height:auto;grid-template-columns:1fr;gap:12px}.card{border-radius:19px}.stage{height:min(66vw,380px);min-height:278px;flex:none;border-radius:13px}.character-card{padding:7px}.voice-tools{min-height:62px;padding-top:9px}.chat-card{height:405px}.footer{flex-wrap:wrap}.top-actions{gap:7px}}
@media(max-width:740px){.composer input{font-size:16px}.mic{min-height:44px}}
@media(max-width:395px){.voice-copy strong{font-size:12px}.voice-copy span{font-size:10px}.voice-buttons{gap:5px}.mic{padding:0 8px;font-size:12px}.mode{font-size:11px}.chip{font-size:10px}}
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation:none!important;transition:none!important}}
