@font-face{font-family:"Source Han Sans";src:url("./fonts/SourceHanSansCN-Regular.otf") format("opentype");font-style:normal;font-weight:400;font-display:swap}
:root{color-scheme:dark;font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Microsoft YaHei",sans-serif;color:#fff;background:#e8ebe7;font-synthesis:none}
*{box-sizing:border-box}body{margin:0;min-height:100svh;display:grid;place-items:center}button{font:inherit;color:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent;touch-action:manipulation}button:focus-visible{outline:3px solid #d6efc5;outline-offset:5px}button:disabled{opacity:.4;cursor:default}[hidden]{display:none!important}
.phone{position:relative;width:100%;height:100svh;min-height:550px;background:#202923;overflow:hidden;isolation:isolate}.videos,.videos video,.top-shade,.bottom-shade{position:absolute;inset:0;width:100%;height:100%}.videos video{object-fit:cover;opacity:0;pointer-events:none;background:transparent}.videos video.active{opacity:1}.top-shade,.bottom-shade{pointer-events:none}.top-shade{background:linear-gradient(180deg,rgba(0,0,0,.5),transparent 35%)}.bottom-shade{background:linear-gradient(0deg,rgba(8,14,12,.9),rgba(8,14,12,.2) 42%,transparent 67%)}
header{position:absolute;top:calc(env(safe-area-inset-top,0px) + 26px);left:27px;right:27px;display:flex;justify-content:space-between;align-items:flex-start}.eyebrow{font-size:9px;letter-spacing:2.6px;color:#e5eee6c4}h1{font-size:25px;font-weight:500;letter-spacing:2px;margin:8px 0 0}h1 span{color:#d7e7b7}.help{border:1px solid #ffffff60;background:#ffffff0a;border-radius:50%;width:30px;height:30px;font-family:Georgia,serif;font-size:17px}.mode{position:absolute;top:calc(env(safe-area-inset-top,0px) + 112px);left:27px;display:flex;gap:7px;align-items:center;font-size:10px;letter-spacing:.8px;color:#ffffffc0}.mode>span{width:5px;height:5px;border-radius:100%;background:#d7e7b7}
.overlay{position:absolute;inset:0;display:flex;align-items:flex-end;padding:32px 30px calc(env(safe-area-inset-bottom,0px) + 62px);background:linear-gradient(0deg,rgba(11,21,16,.96),rgba(11,21,16,.72) 50%,rgba(11,21,16,.16))}.welcome-card{width:100%}.intro-label{font-size:11px;letter-spacing:2px;color:#c7dbbb}.welcome-card h2{font-size:43px;line-height:1.3;letter-spacing:2px;font-weight:400;margin:19px 0}.welcome-card p{font-size:13px;line-height:2;color:#d2d9d3;letter-spacing:.4px;margin-bottom:32px}.primary{display:flex;align-items:center;justify-content:space-between;width:100%;border:0;background:#e1edcc;border-radius:15px;padding:19px 22px;color:#263621;font-size:16px;font-weight:600}.primary span{font-size:22px;font-weight:400}.welcome-card small{display:block;text-align:center;font-size:10px;color:#c0ccc0;letter-spacing:.5px;margin-top:16px}
.conversation{position:absolute;bottom:calc(env(safe-area-inset-bottom,0px) + 17px);left:24px;right:24px;display:flex;flex-direction:column;align-items:center}.dialogue{min-height:93px;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:flex-end}.status{font-size:12px;letter-spacing:2px;color:#e3e9df}.caption{font-size:17px;line-height:1.8;letter-spacing:1px;max-width:310px;margin:10px 0 0;min-height:30px;text-wrap:pretty}.interrupt{border:0;background:transparent;font-size:15px;letter-spacing:2px;padding:13px 25px}.interrupt span{font-size:7px;color:#d7e7b7;vertical-align:2px;margin-left:8px}.controls{display:flex;justify-content:center;align-items:flex-start;gap:39px;margin-top:25px;width:100%}.circle{width:54px;height:54px;border-radius:50%;display:grid;place-items:center;border:1px solid #ffffff25;background:#ffffff13;backdrop-filter:blur(10px);-webkit-backdrop-filter:blur(10px)}.circle svg{width:21px;height:21px;stroke:currentColor;stroke-width:1.5;fill:none;stroke-linecap:round;stroke-linejoin:round}.mic{width:70px;height:70px;color:#293627;background:#e1edcc;border:0}.mic svg{width:24px;height:24px}.mic[aria-pressed=true]{background:#fff;color:#253b2b;box-shadow:0 0 0 7px #e1edcc20}.mic-wrap{width:80px;display:flex;flex-direction:column;align-items:center;gap:14px}.mic-wrap>span{font-size:10px;white-space:nowrap;letter-spacing:1px;color:#d1dbce}.secondary{margin-top:8px}.disclaimer{margin:24px 0 0;font-size:9px;letter-spacing:.8px;color:#d7e1d48a}.demo-controls{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin-top:18px}.demo-controls button{font-size:11px;border:1px solid #ffffff30;border-radius:22px;padding:10px 14px;background:#142019b8;backdrop-filter:blur(10px)}.demo-controls button span{margin-left:6px;color:#d7e7b7}.toast{position:absolute;top:calc(env(safe-area-inset-top,0px) + 155px);left:24px;right:24px;background:#16241ee6;backdrop-filter:blur(12px);padding:15px 18px;border:1px solid #ffffff20;border-radius:12px;font-size:12px;line-height:1.8;text-align:center}
dialog{max-width:min(360px,calc(100% - 32px));border:1px solid #ffffff20;background:#20342b;border-radius:22px;padding:32px 25px;color:#f6f8f1;box-shadow:0 30px 80px #0005}dialog::backdrop{background:#0009;backdrop-filter:blur(8px)}dialog h2{font-size:23px;font-weight:500;margin:18px 0 25px}dialog ol{padding-left:20px;font-size:13px;line-height:2}dialog li{padding-left:4px;margin-bottom:10px}dialog p{font-size:11px;line-height:1.9;color:#bfcebf;margin-top:23px}.dialog-close{position:absolute;right:14px;top:10px;font-size:28px;border:0;background:none;color:#d7e3cd}
.header-actions{display:flex;gap:10px}.mode>span#connection-label{width:auto;height:auto;border-radius:0;background:none}.mode{z-index:2}dialog{max-height:calc(100svh - 40px);overflow:auto}#settings-form label{display:block;font-size:13px;margin-bottom:12px}#api-key{width:100%;border:1px solid #ffffff40;border-radius:10px;padding:14px 12px;background:#13251d;color:#fff;font:inherit;font-size:13px}#api-key:focus{outline:2px solid #d6efc5;outline-offset:3px}#settings-status{min-height:20px;color:#e1edcc;overflow-wrap:anywhere}#check-settings{margin-top:10px}
@media(min-width:600px){body{padding:24px}.phone{width:min(430px,100%);height:min(900px,calc(100svh - 48px));border-radius:30px;box-shadow:0 30px 90px #22322230;border:7px solid #111a15}.conversation{bottom:24px}.overlay{padding-bottom:48px}}
@media(max-height:700px){.welcome-card h2{font-size:35px}.welcome-card p{margin-bottom:22px}.conversation{bottom:calc(env(safe-area-inset-bottom,0px) + 12px)}.dialogue{min-height:65px}.controls{margin-top:15px}.disclaimer{margin-top:17px}.demo-controls{margin-top:10px}.caption{font-size:15px}.overlay{padding-bottom:40px}}

/* Keep the complete 9:16 video frame at every window size. */
body{padding:0}
.phone{width:min(100vw,calc(100svh * 9 / 16),430px);height:auto;min-height:0;aspect-ratio:9/16;border:0;border-radius:0}
.videos video{object-fit:contain}
/* Contain the two transition layers so they cannot cover the interface. */
.videos{z-index:0}
.top-shade,.bottom-shade{z-index:1}
.conversation,.overlay{z-index:2}
.toast{z-index:5}
.videos video{transition:opacity 140ms ease;will-change:opacity}
.videos video.leaving{opacity:1}
@media(prefers-reduced-motion:reduce){.videos video{transition:none}}
header{justify-content:flex-end;top:24px;left:24px;right:24px;z-index:3}
.mode{top:32px;left:24px;max-width:calc(100% - 120px);font-size:9px;letter-spacing:0}
.top-shade{background:linear-gradient(180deg,rgba(0,0,0,.3),transparent 20%)}
.phone[data-state="intro"] header,.phone[data-state="intro"] .mode,.phone[data-state="intro"] .conversation{visibility:hidden}
.dialogue{width:100%;min-height:0}
.caption{font-family:"Source Han Sans",sans-serif;font-weight:400;font-size:17px;line-height:1.7;letter-spacing:0;max-width:100%;width:100%;min-height:0;height:5.1em;max-height:5.1em;overflow:hidden;text-align:center;text-shadow:0 2px 6px #000a}
.caption-track{transition:transform 220ms ease;will-change:transform}
.caption-line{height:1.7em;line-height:1.7;white-space:pre;overflow:hidden;opacity:.55;transition:opacity 180ms ease}
.caption-line.is-current{opacity:1}
.intro-sound{position:absolute;z-index:4;left:50%;bottom:12%;transform:translateX(-50%);white-space:nowrap;backdrop-filter:blur(24px);-webkit-backdrop-filter:blur(24px)}
@media(prefers-reduced-motion:reduce){.caption-track,.caption-line{transition:none}}
.caption::-webkit-scrollbar{display:none}
.controls{gap:clamp(12px,7vw,39px)}
.audio-unlock{border:1px solid #ffffff60;background:#20342be6;border-radius:24px;padding:12px 20px;font-size:14px;margin-bottom:12px}
@media(min-width:600px){body{padding:16px}.phone{width:min(430px,calc((100svh - 32px) * 9 / 16));height:auto;border:0;border-radius:22px}}
@media(max-height:700px){.conversation{left:18px;right:18px}.caption{font-size:15px}.circle{width:44px;height:44px}.mic{width:58px;height:58px}.mic-wrap{gap:9px}.disclaimer{margin-top:12px}}

/* Reference controls: glass microphone, live input bars, red close bubble. */
.phone{container-type:inline-size}
.top-shade{display:none}
.bottom-shade{background:linear-gradient(0deg,rgba(4,9,20,.55),transparent 55%)}
.conversation{left:9%;right:9%;bottom:5%}
.controls{justify-content:space-between;align-items:center;gap:0;margin-top:24px}
.mic-wrap{width:auto;gap:0}
.mic-wrap>span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
.circle,.mic,.mic[aria-pressed=true]{position:relative;width:clamp(48px,16cqw,70px);height:clamp(48px,16cqw,70px);border-radius:50%;color:#fffffff5;border:1px solid #ffffff30;border-top-color:#ffffff5c;background:linear-gradient(145deg,#ffffff2e,#ffffff10);box-shadow:inset 0 1px 0 #ffffff30,0 6px 20px #00000021;backdrop-filter:blur(24px) saturate(160%);-webkit-backdrop-filter:blur(24px) saturate(160%);transition:background 160ms ease,transform 160ms ease}
.circle::after{display:none}
.circle:active{transform:scale(.94);background:#ffffff30}
.mic svg{width:47%;height:47%;stroke-width:1.9;filter:none}
.mic[aria-pressed=false]{opacity:.65}
.close-call svg{width:43%;height:43%;stroke:#ff696c;stroke-width:2.4;filter:none}
.waveform{display:flex;align-items:center;justify-content:center;gap:6px;width:68px;height:58px;border:0;padding:6px;background:none;color:white;opacity:1}
.waveform:disabled{opacity:1;cursor:default}
.wave-bar{display:block;width:10px;height:44px;border-radius:8px;background:#fff;transform-origin:center;transition:transform 70ms linear}
#wave-left{transform:scaleY(.30)}#wave-center{transform:scaleY(.50)}#wave-right{transform:scaleY(.34)}
.waveform[data-enabled=false]{opacity:.4}
.waveform[data-active=true] .wave-bar{background:#fff}
.disclaimer{margin-top:16px;font-size:8px;letter-spacing:.3px}
@media(prefers-reduced-motion:reduce){.wave-bar{transition:none}}

.interactions{position:absolute;top:calc(env(safe-area-inset-top,0px) + 18px);right:18px;z-index:4;display:flex;flex-direction:column;align-items:flex-end;gap:10px}
.action-toggle,.action-menu{border:1px solid #ffffff35;background:linear-gradient(145deg,#ffffff26,#ffffff0c);box-shadow:inset 0 1px 0 #ffffff30,0 6px 20px #0003;backdrop-filter:blur(24px) saturate(160%);-webkit-backdrop-filter:blur(24px) saturate(160%)}
.action-toggle{width:42px;height:42px;border-radius:50%;display:grid;place-items:center;padding:10px}
.action-toggle svg,.action-choice svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.action-toggle svg{transition:transform 160ms ease}.action-toggle[aria-expanded=true] svg{transform:rotate(45deg)}
.action-menu{border-radius:22px;padding:7px;display:flex;flex-direction:column;gap:4px}
.action-choice{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:7px;min-width:62px;min-height:64px;border:0;border-radius:16px;background:transparent;font-size:11px;letter-spacing:.5px}
.action-choice:hover,.action-choice:active{background:#ffffff1c}
.phone[data-state="intro"] .interactions,.phone[data-state="greeting"] .interactions,.phone[data-state="closed"] .interactions{visibility:hidden}
@media(prefers-reduced-motion:reduce){.action-toggle svg{transition:none}}
