/* Continuous conversation: the selected parent and bulb reflect real audio state. */
#voice-room.phone-room{--phone-ink:var(--parent-ink,#34445a);--phone-muted:#6f7881;--phone-button:#eeedf0;--phone-mic:var(--parent-soft,#eaf2ff);--phone-green:var(--parent-accent,#2463be);position:fixed;inset:0;width:100%;max-width:480px;height:100dvh;max-height:100dvh;border:0;border-radius:0;margin:0 auto;padding:0;background:#faf9f5;color:var(--phone-ink);overflow:hidden;font-weight:400;color-scheme:light}
#voice-room.phone-room[open]{display:flex;flex-direction:column}
#voice-room.phone-room [hidden]{display:none!important}
#voice-room.phone-room::backdrop{background:#293c305c;backdrop-filter:blur(5px)}
#voice-room.phone-room button{font-weight:400}
#voice-room.phone-room button:focus-visible,#voice-room.phone-room a:focus-visible,#voice-room.phone-room textarea:focus-visible{outline:3px solid var(--parent-accent,#2463be);outline-offset:3px}
#voice-room.phone-room .voice-sr{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
#voice-room.phone-room .phone-header{padding:calc(14px + env(safe-area-inset-top,0px)) 24px 12px;min-height:78px;flex:none}
#voice-room.phone-room .voice-brand{display:flex;align-items:center;gap:7px;min-width:0;flex:1}
#voice-room.phone-room .voice-brand h1{font-size:18px;font-weight:500;letter-spacing:0;line-height:1.5;margin:0;color:var(--phone-ink);overflow-wrap:anywhere;min-width:0}
#voice-room.phone-room .voice-brand>span{font-size:10px;color:var(--phone-muted);flex:none}
#voice-room.phone-room .voice-caption-toggle{flex:none;width:44px;height:44px;padding:0;border:0;border-radius:50%;display:grid;place-items:center;color:var(--phone-muted);background:none}
#voice-room.phone-room .voice-caption-toggle[aria-pressed=true]{background:var(--phone-button);color:var(--phone-ink)}
#voice-room.phone-room .voice-stage{padding:15px 25px 20px;flex:1;min-height:0;overflow:auto;text-align:center;display:flex;flex-direction:column;align-items:center;justify-content:safe center;scrollbar-width:thin;scrollbar-color:#d1dcc4 transparent}
#voice-room.phone-room .phone-person{width:100%;flex:none;padding-top:16px}
#voice-room.phone-room .voice-character{position:relative;display:grid;place-items:center;width:292px;max-width:100%;height:288px;margin:0 auto;background:none;border-radius:0;overflow:visible;isolation:isolate}
#voice-room.phone-room .voice-character .voice-parent-avatar{position:relative;width:258px;max-width:94%;height:258px;margin:0;flex:none;z-index:1;animation:none;transform:none;transform-origin:50% 82%;transition:transform .4s ease}
#voice-room.phone-room .voice-glow{position:absolute;inset:15px 1px 3px;border-radius:50%;background:radial-gradient(ellipse at 50% 56%,var(--parent-soft,#eaf2ff),transparent 70%);opacity:.78;transition:opacity .35s ease}
#voice-room.phone-room .voice-thought{position:absolute;right:0;top:-8px;width:82px;height:82px;opacity:0;pointer-events:none;z-index:2;animation:none;transition:opacity .2s ease}
#voice-room.phone-room .phone-wave{height:28px;min-height:28px;margin:9px auto 4px;display:flex;justify-content:center;align-items:center;gap:4px;color:var(--phone-green);flex:none}
#voice-room.phone-room .phone-wave i{height:4px;width:4px;border-radius:4px;background:currentColor;transition:height .25s ease,opacity .25s ease}
#voice-room.phone-room .phone-wave i:first-child,#voice-room.phone-room .phone-wave i:last-child{opacity:0}
#voice-room.phone-room[data-voice-state=listening] .voice-character .voice-parent-avatar{animation:parent-listen 3.4s ease-in-out infinite}
#voice-room.phone-room[data-voice-state=listening] .voice-glow{animation:room-breathe 3.4s ease-in-out infinite}
#voice-room.phone-room[data-voice-state=hearing] .voice-character .voice-parent-avatar{animation:parent-listen 2.2s ease-in-out infinite}
#voice-room.phone-room[data-voice-state=hearing] .voice-glow{animation:room-listen 1.1s ease-out infinite}
#voice-room.phone-room[data-voice-state=hearing] .phone-wave i,#voice-room.phone-room[data-voice-state=speaking] .phone-wave i{height:20px;opacity:1;animation:room-wave .65s ease-in-out infinite}
#voice-room.phone-room[data-voice-state=hearing] .phone-wave i:nth-child(2n),#voice-room.phone-room[data-voice-state=speaking] .phone-wave i:nth-child(2n){animation-delay:.21s;height:13px}
#voice-room.phone-room[data-voice-state=hearing] .phone-wave i:nth-child(3),#voice-room.phone-room[data-voice-state=speaking] .phone-wave i:nth-child(3){animation-delay:.12s}
#voice-room.phone-room[data-voice-state=thinking] .voice-character .voice-parent-avatar{transform:rotate(2deg);animation:none}
#voice-room.phone-room[data-voice-state=thinking] .voice-thought{opacity:1;animation:parent-bulb-think 2.6s ease-in-out infinite}
#voice-room.phone-room[data-voice-state=speaking] .voice-character .voice-parent-avatar{animation:room-speak 1.2s ease-in-out infinite}
#voice-room.phone-room[data-voice-state=speaking] .voice-glow{opacity:1;animation:room-breathe 1.2s ease-in-out infinite}
#voice-room.phone-room:is([data-voice-state=idle],[data-voice-state=muted],[data-voice-state=paused],[data-voice-state=stopped],[data-voice-state=error]) .voice-glow{opacity:.3;animation:none}
#voice-room.phone-room .voice-captions{background:none;border:0;border-radius:0;padding:14px 0 0;margin:0;width:100%;max-width:345px;text-align:center;flex:none}
#voice-room.phone-room .voice-user{font-size:12px;line-height:1.8;color:var(--phone-muted);margin:0 0 12px}
#voice-room.phone-room .voice-answer{font-size:17px;font-weight:400;line-height:1.85;letter-spacing:0;color:var(--phone-ink);margin:0}
#voice-room.phone-room .voice-action-card{width:100%;max-width:340px;flex:none;text-align:left;background:var(--parent-soft,#eaf2ff);border:1px solid color-mix(in srgb,var(--parent-accent,#2463be) 18%,white);border-radius:19px;padding:14px 17px;margin:17px auto 0;overflow-wrap:anywhere}
#voice-room.phone-room .voice-action-label{margin:0 0 4px;font-size:11px;color:var(--phone-muted)}
#voice-room.phone-room .voice-action-card h2{font-size:17px;font-weight:500;line-height:1.65;margin:0;color:var(--phone-ink)}
#voice-room.phone-room .voice-action-meta{font-size:14px;line-height:1.7;margin:6px 0 0;color:var(--phone-ink);white-space:pre-line}
#voice-room.phone-room .voice-action-detail{font-size:13px;line-height:1.8;margin:8px 0 0;white-space:pre-line}
#voice-room.phone-room .voice-action-reminder,#voice-room.phone-room .voice-action-receipt{font-size:11px;line-height:1.7;color:var(--phone-muted);margin:7px 0 0}
#voice-room.phone-room .voice-action-buttons{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:12px}
#voice-room.phone-room .voice-action-primary{border:0;border-radius:12px;background:var(--phone-green);color:#fffefa;font-size:13px;min-height:44px;padding:9px 15px}
#voice-room.phone-room .voice-action-secondary{border:0;background:none;color:var(--phone-green);font-size:13px;min-height:44px;padding:9px 7px}
#voice-room.phone-room .voice-action-buttons button:disabled{opacity:.5;cursor:wait}
#voice-room.phone-room .voice-wrap-up{border:0;background:none;color:var(--phone-muted);min-height:44px;padding:8px 12px;font-size:12px;flex:none;margin:8px auto 0}
#voice-room.phone-room .voice-wrap-up:disabled{opacity:.5}
#voice-room.phone-room .voice-farewell{width:100%;max-width:340px;flex:none;padding:13px 0 0}
#voice-room.phone-room .voice-farewell>p{font-size:15px;line-height:1.85;margin:0;white-space:pre-line;overflow-wrap:anywhere}
#voice-room.phone-room .voice-farewell .voice-action-buttons{justify-content:center}
#voice-room.phone-room[data-action-card=true]:not([data-keyboard=true]) .voice-character{width:236px;height:218px}
#voice-room.phone-room[data-action-card=true]:not([data-keyboard=true]) .voice-character .voice-parent-avatar{width:211px;height:211px}
#voice-room.phone-room[data-action-card=true]:not([data-keyboard=true]) .voice-thought{scale:.86;transform-origin:100% 100%}
#voice-room.phone-room .voice-state{font-size:14px;font-weight:400;line-height:1.8;color:var(--phone-muted);margin:9px 0 0;min-height:26px;flex:none}
#voice-room.phone-room .voice-notice{background:#f1eee3;border:1px solid #e2ddcf;color:#736345;font-size:13px;margin:17px 0 0;flex:none;width:100%;max-width:350px}
#voice-room.phone-room #voice-start-panel{max-width:285px;width:100%;margin:20px auto 8px;flex:none}
#voice-room.phone-room .primary{background:var(--phone-mic);color:var(--phone-ink);border-radius:24px;font-size:15px;min-height:46px}
#voice-room.phone-room #voice-sign-in{display:block;margin:15px auto 0;max-width:285px;text-decoration:none;padding:11px}
#voice-room.phone-room .voice-footer{flex:none;padding:8px 25px calc(25px + env(safe-area-inset-bottom,0px));background:#faf9f5;border:0}
#voice-room.phone-room .phone-tools{display:flex;align-items:center;justify-content:center;gap:29px;margin:0;min-height:68px}
#voice-room.phone-room .phone-control{display:grid;place-items:center;border:0;min-width:50px;width:50px;height:50px;min-height:50px;background:var(--phone-button);border-radius:50%;color:var(--phone-ink);padding:0}
#voice-room.phone-room .phone-control>span{display:grid;place-items:center}
#voice-room.phone-room .phone-control:disabled{opacity:.42}
#voice-room.phone-room .phone-microphone{width:64px;height:64px;background:var(--phone-mic);color:var(--phone-green)}
#voice-room.phone-room .phone-microphone svg{height:25px;width:25px}
#voice-room.phone-room .phone-microphone[aria-pressed=true]{background:var(--phone-button);color:#795f53}
#voice-room.phone-room .voice-mute-note{font-size:12px;color:var(--phone-muted);text-align:center;margin:0 0 11px}
#voice-room.phone-room .voice-text-form{margin:0 0 16px;text-align:left}
#voice-room.phone-room .voice-text-form>div{display:flex;align-items:flex-end;gap:6px;padding:8px 8px 8px 14px;background:#fffefb;border:1px solid color-mix(in srgb,var(--parent-accent,#2463be) 18%,white);border-radius:20px}
#voice-room.phone-room .voice-text-form textarea{min-width:0;flex:1;width:0;resize:vertical;max-height:130px;min-height:42px;padding:8px 0;border:0;background:transparent;color:var(--phone-ink);font-size:16px;line-height:1.65}
#voice-room.phone-room .voice-text-form button{width:42px;height:42px;border-radius:50%;background:var(--phone-mic);color:var(--phone-green);flex:none}
#voice-room.phone-room[data-keyboard=true] .voice-character,#voice-room.phone-room[data-input-mode=record] .voice-character{width:180px;height:166px}
#voice-room.phone-room[data-keyboard=true] .voice-character .voice-parent-avatar,#voice-room.phone-room[data-input-mode=record] .voice-character .voice-parent-avatar{width:157px;height:157px}
#voice-room.phone-room[data-keyboard=true] .voice-thought,#voice-room.phone-room[data-input-mode=record] .voice-thought{scale:.72;transform-origin:100% 100%}
#voice-room.phone-room[data-keyboard=true] .phone-person,#voice-room.phone-room[data-input-mode=record] .phone-person{padding-top:0}
#voice-room.phone-room .voice-record-panel{background:var(--parent-soft,#eaf2ff);padding:16px;border-radius:16px;margin:20px 0 0;color:var(--phone-ink);flex:none;width:100%}
#voice-room.phone-room .voice-record-panel .eyebrow{color:var(--phone-muted)}
#voice-room.phone-room .voice-record-panel p{font-size:13px;line-height:1.8}
#voice-room.phone-room .voice-record-panel textarea{color:var(--phone-ink);background:#fffefb}
#voice-room.phone-room .secondary{background:#fffefb;color:var(--phone-ink);border:1px solid color-mix(in srgb,var(--parent-accent,#2463be) 18%,white);min-height:44px;font-size:14px}
.phone-mini{position:sticky;top:0;z-index:30;display:flex;align-items:center;gap:8px;padding:6px 16px;background:var(--parent-soft,#eaf2ff);color:var(--parent-ink,#34445a);border-bottom:1px solid color-mix(in srgb,var(--parent-accent,#2463be) 18%,white);min-height:60px}
.phone-mini[hidden]{display:none}
.phone-mini svg{width:22px;height:22px;stroke:currentColor;fill:none;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round;flex:none}
.phone-mini-main{display:flex;align-items:center;gap:11px;text-align:left;flex:1;min-width:0;min-height:46px;background:none;color:inherit;padding:0}
.phone-mini-main strong{display:block;font-size:13px;font-weight:500}
.phone-mini-main small{display:block;font-size:11px;line-height:1.6}
.phone-mini-end{display:grid;place-items:center;flex:none;width:44px;height:44px;background:#fff;border-radius:50%;color:var(--parent-accent,#2463be)}
.phone-mini button:focus-visible{outline:3px solid var(--parent-accent,#2463be);outline-offset:2px}
@keyframes room-breathe{0%,100%{transform:scale(.96);opacity:.6}50%{transform:scale(1.045);opacity:.95}}
@keyframes room-listen{0%,100%{transform:scale(.98);opacity:.6}50%{transform:scale(1.06);opacity:.95}}
@keyframes room-speak{0%,100%{transform:rotate(-.6deg) translateY(0)}35%{transform:rotate(.8deg) translateY(2px)}68%{transform:rotate(-.5deg) translateY(-1px)}}
@keyframes room-wave{0%,100%{transform:scaleY(.35)}50%{transform:scaleY(1)}}
@media(max-height:680px){#voice-room.phone-room .phone-header{min-height:62px;padding-top:calc(8px + env(safe-area-inset-top,0px));padding-bottom:6px}#voice-room.phone-room .voice-stage{padding-top:5px;padding-bottom:12px}#voice-room.phone-room .voice-character{width:230px;height:226px}#voice-room.phone-room .voice-character .voice-parent-avatar{width:210px;height:210px}#voice-room.phone-room .voice-thought{scale:.83;transform-origin:100% 100%}#voice-room.phone-room .voice-footer{padding-top:4px;padding-bottom:calc(16px + env(safe-area-inset-bottom,0px))}#voice-room.phone-room[data-keyboard=true] .voice-character{width:132px;height:122px}#voice-room.phone-room[data-keyboard=true] .voice-character .voice-parent-avatar{width:120px;height:120px}}
@media(max-width:374px){#voice-room.phone-room .voice-stage{padding-left:19px;padding-right:19px}#voice-room.phone-room .phone-tools{gap:25px}#voice-room.phone-room .voice-footer{padding-left:17px;padding-right:17px}}
@media(prefers-reduced-motion:reduce){#voice-room.phone-room *{animation:none!important;transition:none!important}}

/* The chat indicator uses the same decorative asset only while a reply is pending. */
.parent-thinking-bulb{display:inline-block;width:44px;height:44px;flex:none;background:url("assets/thinking-bulb.webp") center/contain no-repeat;animation:parent-bulb-think 2.6s ease-in-out infinite;transform-origin:50% 85%}
#voice-room.phone-room .voice-thought.parent-thinking-bulb{animation:none}
#voice-room.phone-room[data-voice-state=thinking] .voice-thought.parent-thinking-bulb{animation:parent-bulb-think 2.6s ease-in-out infinite}
#voice-room.phone-room:is([data-voice-state=muted],[data-voice-state=paused],[data-voice-state=stopped],[data-voice-state=error]) .voice-parent-avatar{animation:none;transform:none}
#voice-room.phone-room:is([data-voice-state=connecting],[data-voice-state=requesting]) .voice-glow{opacity:.45;animation:none}
#voice-room.phone-room .voice-notice,#voice-room.phone-room .voice-brand,#voice-room.phone-room .voice-answer{overflow-wrap:anywhere}
.phone-mini-main strong,.phone-mini-main small{overflow-wrap:anywhere}
@keyframes parent-listen{0%,100%{transform:translateY(0) scale(1)}50%{transform:translateY(-2px) scale(1.012)}}
@keyframes parent-bulb-think{0%,100%{transform:translateY(1px) rotate(-3deg);opacity:.72;filter:brightness(.98) drop-shadow(0 1px 2px #e4b14b12)}50%{transform:translateY(-4px) rotate(2deg);opacity:1;filter:brightness(1.06) drop-shadow(0 3px 6px #e4b14b35)}}
@media(prefers-reduced-motion:reduce){.parent-thinking-bulb{animation:none!important;transform:none;filter:none}#voice-room.phone-room .voice-parent-avatar{transform:none!important}#voice-room.phone-room[data-voice-state=thinking] .voice-thought{opacity:1}}
