.voice-trigger{height:44px;width:44px;flex:0 0 44px;display:flex;align-items:center;justify-content:center;border:1px solid var(--warm2);border-radius:12px;background:var(--warm-bg);color:var(--warm);transition:background .15s,box-shadow .15s}
/* 语速面板标题下方的一句引导语 */
.leaf-voice-speed-intro{margin:2px 0 12px;font-size:13px;line-height:1.6;color:var(--ink2)}
/* 产品要求：语音面板移除，麦克风改为“点一下开始 / 再点一下结束”。
   面板节点保留在 DOM 以兼容旧逻辑，但永不显示。 */
.leaf-voice-panel{display:none !important}
/* 输入框上方那条小字：空闲=收费说明，语音中=实时状态 */
.voice-status{font-size:12px;line-height:1.6;color:var(--ink3);padding:2px 4px 6px;text-align:left}
.voice-status.voice-status-live{color:var(--warm);font-weight:600}
.voice-status[hidden]{display:none}
.input-row textarea{min-width:0}
.voice-speed-trigger{height:44px;flex:0 0 auto;padding:0 10px;border:1px solid var(--warm2);border-radius:12px;background:var(--panel);color:var(--warm);font-size:12px;white-space:nowrap}
.voice-speed-trigger:hover,.voice-speed-trigger[aria-expanded="true"]{background:var(--warm-bg)}
.voice-speed-trigger:focus-visible,.leaf-voice-speed-panel button:focus-visible,.leaf-voice-speed-range:focus-visible{outline:2px solid var(--warm);outline-offset:3px}
.leaf-voice-speed-panel{position:fixed;right:24px;bottom:120px;z-index:190;width:280px;max-width:calc(100vw - 24px);padding:18px;background:var(--panel);border:1px solid var(--warm2);border-radius:16px;box-shadow:0 8px 40px #2430281c;color:var(--ink);font-size:13px}
.leaf-voice-speed-panel[hidden]{display:none}
.leaf-voice-speed-head{display:flex;align-items:center;justify-content:space-between;font-size:14px;font-weight:600}
.leaf-voice-speed-close{width:28px;height:28px;border-radius:8px;font-size:22px;line-height:1;color:var(--ink3)}
.leaf-voice-speed-value{display:flex;align-items:baseline;gap:8px;margin:8px 0}
.leaf-voice-speed-number{font-size:28px;font-weight:600;color:var(--warm)}
.leaf-voice-speed-rate{font-size:12px;color:var(--ink3)}
.leaf-voice-speed-range{display:block;width:100%;height:30px;margin:0;accent-color:var(--warm);cursor:pointer}
.leaf-voice-speed-scale{display:flex;justify-content:space-between;color:var(--ink3);font-size:11.5px;line-height:1.8}
.leaf-voice-speed-note{margin:12px 0;font-size:12px;line-height:1.6;color:var(--ink2)}
.leaf-voice-speed-reset{padding:7px 10px;border:1px solid var(--line);border-radius:8px;color:var(--ink2);background:var(--panel);font-size:12px}
.leaf-voice-speed-reset:hover{background:var(--warm-bg)}
.leaf-voice-speed-panel button:disabled,.leaf-voice-speed-range:disabled{opacity:.5;cursor:not-allowed}
.voice-trigger:hover{background:#e2ece4}
.voice-trigger:focus-visible,.leaf-voice-panel button:focus-visible{outline:2px solid var(--warm);outline-offset:3px}
.voice-trigger[aria-pressed="true"]{background:var(--warm);border-color:var(--warm);color:white;box-shadow:0 0 0 3px #4a7c5918}
/* 叶子正在回答/说话时：按钮换成文字“打断叶子说话”，点一下即可打断 */
.voice-trigger.voice-interrupt-on{flex:none;width:auto;padding:0 12px;font-size:12.5px;font-weight:500;line-height:1;white-space:nowrap}
.voice-trigger.voice-interrupt-on .voice-interrupt-text{display:inline-block;transform:translateY(-.5px)}
.leaf-voice-panel{position:fixed;right:24px;bottom:120px;z-index:180;width:340px;max-width:calc(100vw - 24px);max-height:calc(100vh - 144px);max-height:calc(100dvh - 144px);overflow-y:auto;padding:18px;background:var(--panel);border:1px solid var(--warm2);border-radius:18px;box-shadow:0 8px 40px #2430281c;color:var(--ink);font-size:13px}
.leaf-voice-panel[hidden]{display:none}
.leaf-voice-head{display:flex;align-items:center;gap:8px;font-size:14px;font-weight:600}
.leaf-voice-dot{width:8px;height:8px;background:var(--green);border-radius:50%;flex-shrink:0}
.leaf-voice-close{margin-left:auto;width:28px;height:28px;font-size:22px;color:var(--ink3);line-height:1;border-radius:8px}
.leaf-voice-close:hover{background:var(--line2)}
.leaf-voice-stage{display:flex;align-items:center;gap:14px;padding:16px 0 10px}
.leaf-voice-stage>div:last-child{min-width:0;overflow-wrap:anywhere}
.leaf-voice-orb{width:50px;height:50px;border-radius:50%;background:var(--warm-bg);display:flex;align-items:center;justify-content:center;gap:4px;flex-shrink:0;color:var(--warm)}
.leaf-voice-orb i{width:3px;height:12px;background:currentColor;border-radius:3px;transform:scaleY(var(--voice-level,1));transition:transform .1s}
.leaf-voice-orb i:nth-child(2){height:22px}.leaf-voice-orb i:nth-child(3){height:16px}
.leaf-voice-title{font-size:15px;font-weight:600;line-height:1.5}
.leaf-voice-hint{font-size:12px;color:var(--ink3);margin-top:3px;line-height:1.6}
.leaf-voice-caption{font-size:12.5px;line-height:1.7;color:var(--ink2);max-height:72px;overflow-y:auto;overflow-wrap:anywhere;background:var(--warm-bg);border-radius:9px;padding:9px 11px;margin-bottom:12px;white-space:pre-wrap}
.leaf-voice-caption:empty{display:none}
.leaf-voice-price,.leaf-voice-bill{font-size:11.5px;line-height:1.65;white-space:pre-wrap;overflow-wrap:anywhere;color:var(--ink2);padding:9px 0;border-top:1px solid var(--line)}
.leaf-voice-price:empty,.leaf-voice-bill:empty{display:none}
.leaf-voice-consent{display:flex;flex-wrap:wrap;gap:8px;margin:10px 0}
.leaf-voice-consent[hidden]{display:none}
.leaf-voice-recording-choice{width:100%;font-size:12px;line-height:1.7;color:var(--ink2)}.leaf-voice-recording-choice[hidden]{display:none}.leaf-voice-recording-choice input{margin-right:5px;accent-color:var(--warm)}
.leaf-voice-consent button,.leaf-voice-recordings,.leaf-voice-recording-list button{padding:8px 10px;border:1px solid var(--line);border-radius:8px;background:var(--panel);font-size:12px;color:var(--ink2)}
.leaf-voice-consent .leaf-voice-accept{color:white;background:var(--warm);border-color:var(--warm)}
.leaf-voice-recordings{margin:6px 0}.leaf-voice-recording-list{max-height:220px;overflow:auto;font-size:12px;line-height:1.7}
.leaf-voice-recording-list audio{display:block;width:100%;height:36px;margin:8px 0}.leaf-voice-recording-list a{color:var(--warm);margin-left:10px}
.leaf-voice-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:5px}
.leaf-voice-actions button{padding:8px 11px;border:1px solid var(--line);border-radius:9px;font-size:12.5px;line-height:1.4;color:var(--ink2);background:var(--panel)}
.leaf-voice-actions button:hover{background:var(--warm-bg)}
.leaf-voice-actions .leaf-voice-end{margin-left:auto;background:var(--warm);border-color:var(--warm);color:white}
.leaf-voice-actions .leaf-voice-end:hover{background:#3d6849}
.leaf-voice-actions button:disabled{opacity:.45;cursor:not-allowed}
.leaf-voice-panel[data-state="error"] .leaf-voice-dot{background:var(--red)}
.leaf-voice-panel[data-state="paused"] .leaf-voice-dot,.leaf-voice-panel[data-state="checking"] .leaf-voice-dot{background:var(--ink3)}
.leaf-voice-panel[data-state="speaking"] .leaf-voice-orb i{animation:leafVoiceWave .75s ease-in-out infinite alternate}
.leaf-voice-panel[data-state="speaking"] .leaf-voice-orb i:nth-child(2){animation-delay:-.3s}
.leaf-voice-panel[data-state="speaking"] .leaf-voice-orb i:nth-child(3){animation-delay:-.5s}
@keyframes leafVoiceWave{from{transform:scaleY(.55)}to{transform:scaleY(1.15)}}
@media(max-width:720px){.leaf-voice-panel{right:12px;bottom:calc(100px + env(safe-area-inset-bottom));width:calc(100vw - 24px);max-width:360px;max-height:calc(100vh - 124px - env(safe-area-inset-bottom));max-height:calc(100dvh - 124px - env(safe-area-inset-bottom))}.voice-trigger{width:42px;flex-basis:42px}.voice-trigger.voice-interrupt-on{padding:0 10px;font-size:12px}.input-row{gap:7px}}
@media(prefers-reduced-motion:reduce){.leaf-voice-orb i{animation:none!important;transition:none}.voice-trigger{transition:none}}
@media(max-width:720px){.leaf-voice-speed-panel{right:12px;bottom:calc(100px + env(safe-area-inset-bottom));width:280px}.voice-speed-trigger{height:44px;padding:0 7px;font-size:11.5px}}


/* 语音电话入口 + 录音发送模式 + 通话界面 */
.call-entry{display:flex;align-items:center;justify-content:center;gap:6px;width:100%;height:32px;margin:0 0 8px;border:0.5px solid var(--line);background:var(--panel);border-radius:9px;color:#3d6849;font-size:12.5px;cursor:pointer;transition:background .15s,border-color .15s}
.call-entry:hover{background:#EEF4EC;border-color:#b9cdbb}
.call-entry svg{flex:0 0 auto}
.voice-trigger.voice-clip-busy{opacity:.5;cursor:default}
.voice-trigger.voice-send-mode{width:auto;min-width:56px;flex-basis:auto;padding:0 12px;background:#3d6849;border-color:#3d6849;border-radius:9px}
.voice-trigger.voice-send-mode .voice-send-text{color:#fff;font-size:13px;font-weight:500;line-height:1}
.leaf-call-overlay{position:fixed;inset:0;z-index:60;background:#1f2a22;display:flex;flex-direction:column;align-items:center;padding:calc(28px + env(safe-area-inset-top)) 20px calc(28px + env(safe-area-inset-bottom));color:#fff}
.leaf-call-overlay[hidden]{display:none}
.leaf-call-time{font-size:13px;letter-spacing:.4px;color:rgba(255,255,255,.62)}
.leaf-call-avatar{width:104px;height:104px;border-radius:50%;overflow:hidden;margin-top:26px;border:1.5px solid rgba(255,255,255,.2);background:#3a4a3f;flex:0 0 auto}
.leaf-call-avatar img{width:100%;height:100%;object-fit:cover;display:block}
.leaf-call-name{margin-top:14px;font-size:19px;font-weight:500}
.leaf-call-sub{margin-top:5px;font-size:12px;color:rgba(255,255,255,.5)}
.leaf-call-status{margin-top:auto;margin-bottom:auto;font-size:13px;color:rgba(255,255,255,.68);text-align:center;line-height:1.7;padding:0 12px;min-height:20px}
.leaf-call-actions{display:flex;align-items:flex-start;gap:44px;margin-top:auto}
.leaf-call-item{display:flex;flex-direction:column;align-items:center;gap:8px}
.leaf-call-act,.leaf-call-hang{width:62px;height:62px;border-radius:50%;border:none;display:flex;align-items:center;justify-content:center;cursor:pointer;transition:background .15s}
.leaf-call-act{background:rgba(255,255,255,.13);color:rgba(255,255,255,.9)}
.leaf-call-act:hover{background:rgba(255,255,255,.2)}
.leaf-call-act[aria-pressed="true"]{background:#fff;color:#1f2a22}
.leaf-call-hang{background:#e24b4a;color:#fff}
.leaf-call-hang:hover{background:#c93d3c}
.leaf-call-label{font-size:11.5px;color:rgba(255,255,255,.62)}
body.leaf-call-open{overflow:hidden}
@media(max-width:720px){.leaf-call-avatar{width:92px;height:92px;margin-top:18px}.leaf-call-actions{gap:56px}}
.leaf-call-caption{margin-top:20px;width:100%;max-width:520px;padding:0 8px;display:flex;flex-direction:column;gap:10px}
.leaf-call-caption[hidden]{display:none}
.leaf-call-say{font-size:13.5px;line-height:1.75;border-radius:12px;padding:9px 13px;max-height:34vh;overflow:auto;word-break:break-word}
.leaf-call-say:empty{display:none}
.leaf-call-say.user{align-self:flex-end;background:rgba(255,255,255,.1);color:rgba(255,255,255,.72);max-width:86%}
.leaf-call-say.ai{align-self:flex-start;background:rgba(255,255,255,.16);color:#fff;max-width:92%}
.call-entry-note{color:#8a9a8d;font-size:11.5px;margin-left:2px}
.leaf-call-bill{width:100%;max-width:520px;text-align:center;font-size:11.5px;color:rgba(255,255,255,.5);padding:0 8px 10px;line-height:1.6;min-height:16px}
/* 通话界面定高布局：底部按钮永远固定在可视区，字幕区自己滚动 */
.leaf-call-overlay{overflow:hidden}
.leaf-call-avatar{flex:0 0 auto}
.leaf-call-caption{flex:1 1 auto;min-height:0;overflow-y:auto;margin-top:14px;-webkit-overflow-scrolling:touch}
.leaf-call-say{max-height:none;overflow:visible}
.leaf-call-status{flex:0 0 auto;margin:8px 0 0;min-height:18px}
.leaf-call-bill{flex:0 0 auto}
.leaf-call-actions{flex:0 0 auto;margin-top:10px;padding-bottom:env(safe-area-inset-bottom)}
.leaf-call-caption[hidden]+.leaf-call-status{margin-top:auto;margin-bottom:auto}
