
#taSvWrap{position:fixed;left:0;right:0;bottom:var(--ta-btt-h,0px);z-index:2140;display:flex;flex-direction:column;align-items:center;pointer-events:none;transition:transform .28s cubic-bezier(.22,.61,.36,1)}
#taSvWrap.ta-sv-hide{transform:translateY(130%)}
#taSvCard{pointer-events:auto;width:min(560px,calc(100% - 20px));background:#fff;border:1px solid #e7ecea;border-bottom:none;border-radius:18px 18px 0 0;box-shadow:0 -8px 30px rgba(0,0,0,.14);overflow:hidden}
#taSvHead{position:relative;display:flex;align-items:center;padding:7px 12px 0}
#taSvGrip{width:44px;height:5px;border-radius:99px;background:#dfe4e1;margin:0 auto;cursor:grab;touch-action:none}
#taSvSw{position:absolute;right:10px;top:4px;border:1.5px solid #e6eae8;background:#fff;color:#33413d;border-radius:999px;padding:5px 11px;font-size:12px;font-weight:800;cursor:pointer}
#taSvSw:hover{border-color:#e8451c;color:#e8451c}
#taSvChat{display:block;max-height:32vh;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:8px 12px 2px}
#taSvChat .m{max-width:86%;margin:0 0 8px;padding:8px 11px;border-radius:13px;font-size:13.5px;line-height:1.5;word-break:break-word}
#taSvChat .u{margin-left:auto;background:#e8451c;color:#fff;border-bottom-right-radius:4px}
#taSvChat .a{background:#f7faf9;border:1px solid #eef0ef;color:#22322e;border-bottom-left-radius:4px}
#taSvChat .a.clar{border-color:#f0cabd;color:#8a4a12;background:#fffaf6}
#taSvChat .sys{margin:0 auto 8px;background:transparent;color:#93a09b;font-size:11.5px;text-align:center;max-width:100%}
#taSvLive{display:none;padding:4px 14px 2px;font-size:12.5px;color:#33413d;background:#fff;min-height:16px;line-height:1.45;word-break:break-word}
#taSvLive.on{display:block}
#taSvIn{display:flex;gap:8px;padding:4px 12px calc(10px + env(safe-area-inset-bottom));align-items:center}
.ta-sv-tgl{width:38px;height:38px;flex:0 0 auto;border:1.5px solid #dfe3e1;background:#fff;color:#33413d;border-radius:50%;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;padding:0}
.ta-sv-tgl:hover{border-color:#00aa6c;color:#00aa6c}
.ta-sv-tgl svg{width:20px;height:20px}
#taSvTxt{flex:1;min-width:0;resize:none;border:1.5px solid #dfe3e1;border-radius:12px;padding:9px 11px;font-size:14px;font-family:inherit;max-height:88px}
.ta-sv-send{flex:0 0 auto;border:none;border-radius:12px;background:#1c2b33;color:#fff;font-weight:800;padding:10px 14px;cursor:pointer}
#taSvHold{display:none;flex:1;min-width:0;height:40px;border:1.5px solid #dfe3e1;border-radius:12px;background:#fff;color:#33413d;font-size:14.5px;font-weight:800;cursor:pointer;-webkit-touch-callout:none;align-items:center;justify-content:center}
#taSvHold:active{background:#f4f7f5}
/* WhatsApp-style recording bar */
#taSvBar{display:none;flex:1;min-width:0;align-items:center;gap:9px;height:40px;border:1.5px solid #e8451c;border-radius:12px;background:#fff7f4;padding:0 12px;color:#e8451c;font-size:12.5px;font-weight:800}
#taSvBar.on{display:flex}
#taSvBar.done{border-color:#cde9d8;background:#f4fbf7;color:#0a7a4a}
#taSvBar .wave{display:inline-flex;align-items:flex-end;gap:2px;height:18px;flex:0 0 auto}
#taSvBar .wave i{width:3px;height:6px;background:currentColor;border-radius:2px;animation:taSvBars .9s ease-in-out infinite}
#taSvBar .wave i:nth-child(2){animation-delay:.12s}#taSvBar .wave i:nth-child(3){animation-delay:.24s}#taSvBar .wave i:nth-child(4){animation-delay:.36s}#taSvBar .wave i:nth-child(5){animation-delay:.48s}
#taSvBar.done .wave i{animation:none;height:12px}
@keyframes taSvBars{0%,100%{height:5px}50%{height:17px}}
#taSvBarTxt{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
#taSvStop,#taSvAgain{flex:0 0 auto;border:none;border-radius:999px;font-weight:800;font-size:12px;padding:8px 12px;cursor:pointer;margin-left:auto}
#taSvStop{background:#e8451c;color:#fff}
#taSvAgain{background:#fff;color:#0a7a4a;border:1.5px solid #cde9d8}
#taSvX{flex:0 0 auto;border:none;background:transparent;color:#93a09b;font-size:16px;cursor:pointer;padding:2px 2px}
/* Smart: original interface hidden. Manual: smart hidden, original 100% untouched */
body.ta-sv-smart .tmp-sheet{display:none !important}
body.ta-sv-hidden .tmp-sheet{display:none !important}
#taSvSwF{position:fixed;right:12px;bottom:calc(var(--ta-btt-h,0px) + 10px + env(safe-area-inset-bottom));z-index:2141;display:none;border:1.5px solid #e6eae8;background:#fff;color:#33413d;border-radius:999px;padding:9px 14px;font-size:12.5px;font-weight:800;cursor:pointer;box-shadow:0 3px 12px rgba(0,0,0,.16)}
#taSvSwF:hover{border-color:#e8451c;color:#e8451c}
#taSvSwF.on{display:block}
#taSvChip{position:fixed;right:12px;bottom:calc(var(--ta-btt-h,0px) + 10px + env(safe-area-inset-bottom));z-index:2141;display:none;border:none;border-radius:999px;background:#1c2b33;color:#fff;font-weight:800;font-size:12.5px;padding:10px 14px;cursor:pointer;box-shadow:0 4px 14px rgba(0,0,0,.3)}
#taSvChip.on{display:block}
.ta-sv-act{margin-top:8px;padding-top:8px;border-top:1px dashed #e6ecea}
.ta-sv-act .hint{font-size:11.5px;color:#5b6660;margin:0 0 6px;line-height:1.45}
.ta-sv-ab{display:inline-flex;align-items:center;gap:5px;border:1.5px solid #e8451c;background:#fff;color:#e8451c;border-radius:999px;padding:7px 12px;font-size:12px;font-weight:800;cursor:pointer;margin:0 6px 4px 0}
.ta-sv-ab:hover{background:#e8451c;color:#fff}
.ta-sv-ab:disabled{opacity:.55;cursor:default}
.ta-sv-link{color:#b93210;font-weight:800;font-size:12.5px;text-decoration:none}
/* ---- unified panel: Smart|Manual segmented switch + close + manual view (mobile) ---- */
#taSvTabs{display:none;position:relative;margin:3px auto 0;padding:3px;background:#eef1f0;border-radius:999px;width:max-content}
#taSvInd{position:absolute;top:3px;bottom:3px;left:3px;width:calc(50% - 3px);background:#fff;border-radius:999px;box-shadow:0 1px 5px rgba(0,0,0,.16);transition:transform .22s cubic-bezier(.22,.61,.36,1)}
#taSvTabs.manual #taSvInd{transform:translateX(100%)}
#taSvTabs button{position:relative;z-index:1;flex:1 1 0;min-width:92px;border:none;background:transparent;color:#5b6660;font-size:12.5px;font-weight:800;padding:6px 14px;border-radius:999px;cursor:pointer}
#taSvTabs button.on{color:#1c2b33}
#taSvClose{display:none;position:absolute;right:8px;top:8px;width:30px;height:30px;border:none;background:#f1f3f2;color:#47524e;border-radius:50%;font-size:15px;line-height:1;cursor:pointer;align-items:center;justify-content:center;padding:0}
#taSvClose:hover{background:#e8451c;color:#fff}
#taSvManual{display:none;padding:4px 12px calc(10px + env(safe-area-inset-bottom));max-height:46vh;overflow-y:auto;-webkit-overflow-scrolling:touch}
#taSvCard.manual #taSvChat,#taSvCard.manual #taSvLive,#taSvCard.manual #taSvIn{display:none !important}
#taSvCard.manual #taSvManual{display:block}
@media(max-width:768px){
  #taSvTabs{display:flex}
  #taSvClose{display:flex}
  #taSvSw{display:none}
  /* pull tab = the original white sheet-handle look (grip bar + label, full width, above the tab bar) */
  #taSvChip{left:0;right:0;transform:none;width:auto;bottom:var(--ta-btt-h,0px);border:none;border-top:1px solid #ececec;border-radius:16px 16px 0 0;background:#fff;color:#47524e;box-shadow:0 -4px 18px rgba(0,0,0,.10);padding:9px 14px 11px;font-size:13.5px;font-weight:800;display:none;flex-direction:column;align-items:center;gap:6px;-webkit-tap-highlight-color:transparent;touch-action:none}
  #taSvChip.on{display:flex}
  #taSvChip::before{content:"";width:42px;height:4px;border-radius:3px;background:#cfd6d3;display:block}
}
@media(max-width:640px){#taSvChat{max-height:30vh}}
