*{box-sizing:border-box}
html,body{margin:0;height:100%;background:#0f1115;color:#f3f4f6;font-family:-apple-system,"PingFang SC","Noto Sans CJK SC",sans-serif}
body{display:flex;flex-direction:column}
header{display:flex;justify-content:space-between;align-items:center;padding:calc(6px + env(safe-area-inset-top,0px)) 12px 6px;min-height:calc(36px + env(safe-area-inset-top,0px));background:rgba(15,17,21,.96);border-bottom:1px solid rgba(255,255,255,.08);flex-shrink:0;z-index:100;gap:8px}
.brand-bar{display:flex;align-items:center;gap:8px;min-width:0;flex:1;overflow:hidden}
.brand{font-size:13.5px;font-weight:700;letter-spacing:.02em;color:#60a5fa;white-space:nowrap;flex-shrink:0}
.scene-vocab-tags{display:flex;flex-wrap:wrap;gap:6px;max-height:130px;overflow-y:auto;padding:4px 0;-webkit-overflow-scrolling:touch}
.scene-vocab-pill{display:inline-flex;align-items:center;gap:4px;background:#0b0f19;border:1px solid #374151;border-radius:6px;padding:3px 7px;font-size:11.5px;color:#cbd5e1;cursor:pointer;transition:all .15s}
.scene-vocab-pill:hover,.scene-vocab-pill:active{background:#2563eb;color:#fff;border-color:#3b82f6}
.scene-vocab-pill b{color:#60a5fa;font-weight:600}
.scene-vocab-pill:active b{color:#fff}
.scene-phrases-list{display:flex;flex-direction:column;gap:6px;max-height:160px;overflow-y:auto;padding:4px 0;-webkit-overflow-scrolling:touch}
.scene-phrase-card{background:#0b0f19;border:1px solid #374151;border-radius:6px;padding:6px 9px;cursor:pointer;transition:all .15s}
.scene-phrase-card:hover,.scene-phrase-card:active{background:#1e293b;border-color:#3b82f6}
.scene-phrase-zh{font-size:12px;font-weight:600;color:#f3f4f6;line-height:1.3}
.scene-phrase-es{font-size:11.5px;color:#93c5fd;line-height:1.35;margin-top:2px}
.badge{font-size:13px;padding:4px 10px;border-radius:99px;background:#374151}
.badge.demo{background:#b45309}.badge.live{background:#047857}
#status{font-size:11px;color:#94a3b8;background:rgba(255,255,255,.06);border:1px solid rgba(255,255,255,.1);border-radius:99px;padding:2px 8px;max-width:130px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;line-height:1.3}
body.running #status{color:#6ee7b7;border-color:rgba(16,185,129,.35);background:rgba(16,185,129,.12)}
#captions{flex:1;overflow-y:auto;padding:8px 16px;-webkit-overflow-scrolling:touch}
.line{padding:10px 0;border-bottom:1px solid rgba(255,255,255,.07)}
.zh{font-size:clamp(21px,5.6vw,26px);line-height:1.35;font-weight:600}
.zh.pending{color:#6b7280;font-size:18px}
.es{font-size:14.5px;color:#94a3b8;margin-top:3px;line-height:1.35}
.es.pending{color:#6b7280;font-size:13.5px;font-style:italic}
.who{font-size:12px;color:#60a5fa;margin-right:6px}
.tag{font-size:11px;color:#f59e0b;border:1px solid #f59e0b;border-radius:4px;padding:0 4px;margin-left:6px}
.partial{min-height:28px;padding:6px 16px;color:#d1d5db;font-size:17px;font-style:italic}
.meter{width:60px;height:8px;background:#374151;border-radius:4px;overflow:hidden}#level{height:100%;width:0;background:#10b981}
#mic{flex:1;font-size:13px;color:#9ca3af}
button{font-size:18px;padding:12px 18px;border:0;border-radius:12px;background:#2563eb;color:#fff}
button.stop{background:#dc2626}

#forThem{margin:0 12px 8px;padding:12px 14px;border-radius:14px;background:#1e3a8a}
.ft-es{font-size:30px;font-weight:700;line-height:1.3}.ft-zh{font-size:14px;color:#bfdbfe;margin-top:4px}
.line.me .zh{color:#93c5fd}.line.me .es{color:#bfdbfe}
.line.me .es.pending{color:#6b7280}
.line.echo{display:none}
.opt{font-size:13px;color:#9ca3af;white-space:nowrap}
button.ghost{background:#374151;font-size:15px;padding:10px 12px}
#full{position:fixed;inset:0;background:#fff;color:#111;z-index:3000;display:flex;flex-direction:column;justify-content:center;padding:calc(70px + env(safe-area-inset-top, 0px)) 24px calc(24px + env(safe-area-inset-bottom, 0px));text-align:center}
#full[hidden]{display:none !important}
body.in-full header,body:has(#full:not([hidden])) header{display:none !important}
#full.rot #fullEs,#full.rot #fullZh{transform:rotate(180deg)}
#fullEs{font-size:min(14vw,72px);font-weight:800;line-height:1.2;color:#0f172a}#fullZh{font-size:18px;color:#64748b;margin-top:16px}
#full .ghost{background:#f1f5f9;color:#0f172a;border:1px solid #cbd5e1;border-radius:99px;padding:8px 14px;font-size:13.5px;font-weight:600;cursor:pointer}
#full .ghost:active{background:#e2e8f0}
#rot{position:absolute;top:calc(14px + env(safe-area-inset-top, 0px));left:14px;z-index:10}
#closeFull{position:absolute;top:calc(14px + env(safe-area-inset-top, 0px));right:14px;z-index:10}
#fullSpeak{position:absolute;top:calc(14px + env(safe-area-inset-top, 0px));left:50%;transform:translateX(-50%);font-size:14px;font-weight:600;padding:8px 18px;background:#2563eb;color:#fff;border-radius:99px;border:none;cursor:pointer;z-index:10;box-shadow:0 2px 8px rgba(37,99,235,.3)}
#fullSpeak:active{background:#1d4ed8}

#sheet{position:fixed;inset:0;background:rgba(0,0,0,.6);backdrop-filter:blur(2px);z-index:2000;display:flex;align-items:flex-end}
#sheet[hidden]{display:none !important}
.sheet-box{width:100%;max-height:85vh;overflow-y:auto;background:#1f2937;border-top:1px solid #374151;border-radius:18px 18px 0 0;padding:16px 16px calc(24px + env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:14px;box-shadow:0 -8px 30px rgba(0,0,0,.7);-webkit-overflow-scrolling:touch}
.sheet-head{display:flex;justify-content:space-between;align-items:center;position:sticky;top:0;background:#1f2937;padding-bottom:4px;z-index:5}
#voice{max-width:70%;font-size:15px;margin-left:8px}
.hint{font-size:13px;color:#9ca3af;margin:0;line-height:1.5}

/* 对坐模式 */
#duo{display:none}
body.duo #captions,body.duo #forThem,body.duo header,body.duo #status,body.duo #typeForm,body.duo #sugg,body.duo #partial{display:none !important}
body.duo #duo{flex:1;display:flex;flex-direction:column;min-height:0}
.half{flex:1;overflow-y:auto;padding:10px 16px;min-height:0;-webkit-overflow-scrolling:touch}
.half.them{transform:rotate(180deg);background:#f8fafc;color:#111;border-bottom:3px solid #2563eb}
.dl{padding:8px 0;border-bottom:1px solid rgba(127,127,127,.25)}
.dl .big{font-size:26px;font-weight:700;line-height:1.3}.dl .big.pending{color:#6b7280;font-size:18px}
.dl .small{font-size:14px;color:#9ca3af;margin-top:2px}
.half.mine .dl.me .big{color:#93c5fd}.half.them .dl.me .big{color:#1d4ed8}.half.them .dl .small{color:#6b7280}
body.duo .partial{min-height:22px;font-size:15px}
#duoBtn.on{background:#2563eb}
body.duo #mic{display:none}

/* v2: 场合 / 小清单 / 建议 / 打字 / 还没问 / 纪要 */
.hright{display:flex;gap:8px;align-items:center}
button.sm{font-size:13px;padding:6px 10px}
button.link{background:none;color:#60a5fa;padding:0;font-size:13px;text-decoration:underline}
#scenes{display:flex;gap:6px;padding:0 12px 6px;overflow-x:auto}
#scenes button{font-size:14px;padding:6px 12px;border-radius:99px;background:#1f2937;color:#d1d5db;white-space:nowrap}
#scenes button.on{background:#2563eb;color:#fff}
#sceneHint{font-size:13px;color:#fbbf24;padding:0 16px 6px}
#facts{margin:0 12px 6px;background:#111827;border-radius:10px;padding:6px 10px;font-size:13px;color:#cbd5e1}
#facts summary{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#facts ul{margin:6px 0 2px;padding-left:18px}#facts li{margin:2px 0}
.note{margin-top:6px;font-size:13px;color:#1f2937;background:#fde68a;border-radius:6px;padding:3px 8px;display:inline-block}
#sugg{display:flex;flex-direction:column;gap:6px;padding:0 12px}
#sugg:empty{display:none}
#sugg button{text-align:left;background:#1e293b;font-size:15px;padding:8px 12px;border-radius:10px}
#sugg button small{display:block;color:#94a3b8;font-size:12px;margin-top:2px}
#sugg button.q{border:1px dashed #fbbf24}
#typeForm{display:flex;align-items:center;gap:8px;padding:5px 12px;background:rgba(15,17,21,.95);border-top:1px solid rgba(255,255,255,.06);flex-shrink:0}
#typeBox{flex:1;font-size:14px;padding:7px 14px;min-height:36px;border-radius:20px;border:1px solid rgba(255,255,255,.12);background:#1e293b;color:#f3f4f6;outline:none}
#typeBox:focus{border-color:#3b82f6}
#typeSend{width:36px;min-width:36px;height:36px;padding:0;border-radius:50%;display:flex;align-items:center;justify-content:center;background:#2563eb;border:none;cursor:pointer;flex-shrink:0}
#typeSend:active{transform:scale(.92)}
#typeSend .ic{width:16px;height:16px;fill:#fff;stroke:none}
.panel{position:fixed;inset:auto 0 0 0;max-height:85%;overflow-y:auto;background:#1f2937;border-radius:18px 18px 0 0;z-index:1500;padding:16px 16px calc(20px + env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:10px;border-top:1px solid #374151;box-shadow:0 -8px 32px rgba(0,0,0,.8);-webkit-overflow-scrolling:touch}
.panel[hidden]{display:none}
#missingList button{display:block;width:100%;text-align:left;background:#0f172a;margin-bottom:6px;font-size:16px}
#missingList button small{display:block;color:#93c5fd;font-size:13px}
#sumBody{font-size:15px;line-height:1.6}#sumBody h4{margin:10px 0 4px;color:#93c5fd}
#sumBody label{display:block;margin:4px 0}
.row{display:flex;gap:8px}
/* 对坐：镜像双语，自己这边的话小一号；上半屏逐条旋转，可滚动 */
.hwrap{flex:1;position:relative;min-height:0;display:flex}
.hwrap .half{flex:1}
.half.them{transform:none}
.half.them .dl{transform:rotate(180deg)}
.dl.own .big{font-size:20px;font-weight:600}
.half.mine .dl.own .big{color:#93c5fd}.half.them .dl.own .big{color:#1d4ed8}
.half.them .dl:not(.own) .big{color:#111}
.newest{position:absolute;right:12px;bottom:10px;font-size:13px;padding:6px 10px;border-radius:99px;background:#2563eb;z-index:2}
.newest.rot{transform:rotate(180deg);top:10px;left:12px;right:auto;bottom:auto}
.newest[hidden]{display:none}
body.duo #scenes,body.duo #sceneHint,body.duo #facts{display:none}

/* 建议默认隐藏，点输入框才出现 */
body:not(.typing) #sugg{display:none}

/* v4：底栏/图标重做 —— 统一 SVG 图标、固定比例、44px 触控、短标签 */
.sr{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.ic{width:24px;height:24px;flex:0 0 24px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round;display:block}
header{gap:8px}
.brand{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;min-width:0}
@media (max-width:400px){.brand span{display:none}}
.hright{flex-shrink:0}
.badge{white-space:nowrap;font-size:11px;max-width:120px;overflow:hidden;text-overflow:ellipsis}
.chip{display:inline-flex;align-items:center;gap:3px;font-size:12px;font-weight:600;padding:2px 10px;min-height:26px;height:26px;border-radius:99px;background:#1f2937;color:#e2e8f0;white-space:nowrap;border:1px solid #374151;cursor:pointer;transition:all .15s}
.chip:hover{background:#334155;border-color:#475569}
.chip:active{transform:scale(0.96)}
.chip::after{content:'▾';font-size:10px;color:#94a3b8;margin-left:2px}
footer{display:grid;grid-template-columns:1fr 1fr 1.55fr 1fr 1fr;align-items:center;gap:4px;padding:6px 8px calc(8px + env(safe-area-inset-bottom));background:#111827;border-top:1px solid rgba(255,255,255,.08);flex-shrink:0;z-index:100}
footer button{min-width:0;min-height:48px;padding:4px 0;margin:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;-webkit-tap-highlight-color:transparent;position:relative}
footer .tb{background:none;color:#cbd5e1;font-size:11px;line-height:1;border-radius:12px;border:none;cursor:pointer}
footer .tb .ic{width:22px;height:22px}
footer .tb span,footer .mic span{white-space:nowrap}
footer .tb.on{background:#1e3a8a;color:#93c5fd}
footer .tb:active{transform:scale(.95)}
footer .mic{min-height:56px;height:56px;border-radius:16px;background:#2563eb;font-size:13px;font-weight:700;position:relative;box-shadow:0 4px 14px rgba(37,99,235,.4);border:none;cursor:pointer}
footer .mic.stop{background:#dc2626;box-shadow:0 4px 14px rgba(220,38,38,.4)}
footer .mic .meter{position:absolute;left:12px;right:12px;bottom:5px;width:auto;height:3px;background:rgba(255,255,255,.25);border-radius:2px;overflow:hidden;display:block}
footer .mic #level{display:block;height:100%;width:0;background:#a7f3d0}
#duoBtn.on{background:#1e3a8a;color:#93c5fd}
.gear-dot{position:absolute;top:5px;right:14px;width:8px;height:8px;border-radius:50%;background:#3b82f6;box-shadow:0 0 6px #60a5fa}
.gear-dot.guest{background:#f59e0b;box-shadow:0 0 6px #fbbf24}
.gear-dot.in-trial{background:#38bdf8;box-shadow:0 0 6px #60a5fa}
.gear-dot.expired{background:#ef4444;box-shadow:0 0 6px #f87171}
#sheet .sec{font-size:12px;color:#9ca3af;margin-top:4px}
.opt{min-height:44px;display:flex;align-items:center;gap:8px}
.opt input[type=checkbox]{width:22px;height:22px;flex-shrink:0}

/* v5：右上角弹窗体系（场景切换与语言设置） */
.langbtn{display:inline-flex;align-items:center;gap:4px;min-height:26px;height:26px;padding:2px 10px;border-radius:99px;background:#047857;color:#fff;font-size:12px;font-weight:600;white-space:nowrap;border:none;cursor:pointer;transition:all .15s}
.langbtn:hover{background:#059669}
.langbtn:active{transform:scale(0.96)}
.langbtn::after{content:'▾';font-size:10px;color:rgba(255,255,255,.8);margin-left:2px}
.langbtn.demo{background:#b45309}
.langbtn .ic{width:14px;height:14px;flex:0 0 14px}

.top-right-overlay{position:fixed;inset:0;background:rgba(0,0,0,.45);backdrop-filter:blur(2px);-webkit-backdrop-filter:blur(2px);z-index:2100;animation:fadeIn .12s ease-out}
.top-right-overlay[hidden]{display:none !important}

.top-right-popover{position:fixed;top:calc(50px + env(safe-area-inset-top, 0px));right:10px;width:min(310px, calc(100vw - 20px));max-height:calc(100vh - 70px);overflow-y:auto;background:#1e293b;border:1px solid #334155;border-radius:16px;box-shadow:0 16px 36px rgba(0,0,0,.65),0 0 0 1px rgba(255,255,255,.05);z-index:2200;padding:14px;display:flex;flex-direction:column;gap:10px;box-sizing:border-box;animation:popoverIn .15s cubic-bezier(0.16,1,0.3,1);transform-origin:top right;-webkit-overflow-scrolling:touch}
.top-right-popover[hidden]{display:none !important}

@keyframes popoverIn{
  from{opacity:0;transform:scale(0.94) translateY(-6px)}
  to{opacity:1;transform:scale(1) translateY(0)}
}
@keyframes fadeIn{
  from{opacity:0}
  to{opacity:1}
}

.popover-head{display:flex;justify-content:space-between;align-items:center;padding-bottom:6px;border-bottom:1px solid #334155}
.popover-title{font-size:14px;font-weight:700;color:#f8fafc;display:flex;align-items:center;gap:6px}
.popover-close{background:transparent;border:none;color:#94a3b8;font-size:17px;cursor:pointer;padding:2px 8px;border-radius:6px;line-height:1;display:flex;align-items:center;justify-content:center}
.popover-close:active{color:#fff;background:#334155}
.popover-sub{font-size:11.5px;color:#94a3b8;margin:0 0 2px;line-height:1.4}

/* 场景弹出菜单样式 */
#scenePopover #scenes{display:flex;flex-direction:column;gap:6px;padding:0}
#scenePopover #scenes button{display:flex;align-items:center;justify-content:flex-start;width:100%;min-height:42px;padding:8px 12px;border-radius:10px;background:#0f172a;border:1px solid #334155;color:#cbd5e1;font-size:13.5px;font-weight:500;text-align:left;cursor:pointer;transition:all .15s;position:relative}
#scenePopover #scenes button:active{transform:scale(0.98)}
#scenePopover #scenes button[data-s=daily]::before{content:"☕ ";margin-right:6px}
#scenePopover #scenes button[data-s=doctor]::before{content:"🏥 ";margin-right:6px}
#scenePopover #scenes button[data-s=school]::before{content:"🏫 ";margin-right:6px}
#scenePopover #scenes button[data-s=bank]::before{content:"🏦 ";margin-right:6px}
#scenePopover #scenes button[data-s=gov]::before{content:"🏛️ ";margin-right:6px}
#scenePopover #scenes button.on{background:#1d4ed8;border-color:#3b82f6;color:#ffffff;font-weight:700;box-shadow:0 0 12px rgba(59,130,246,0.3)}
#scenePopover #scenes button.on::after{content:'✓';font-weight:800;color:#93c5fd;font-size:15px;margin-left:auto}

/* 语言弹出菜单样式 */
#langSheet.top-right-popover{/* 覆盖原底板样式 */}
#langSheet .lrow{display:flex;justify-content:space-between;align-items:center;gap:8px;font-size:13.5px;color:#e2e8f0;min-height:38px}
#langSheet .lrow select{flex:1;max-width:65%;font-size:13.5px;min-height:38px;border-radius:8px;background:#0f172a;color:#f3f4f6;border:1px solid #334155;padding:4px 8px;outline:none}
#langSheet .lrow select:focus{border-color:#3b82f6}
#langSheet .swap{display:flex;align-items:center;justify-content:center;gap:6px;min-height:36px;padding:6px 12px;border-radius:8px;background:#0f172a;border:1px solid #334155;color:#60a5fa;font-size:13px;font-weight:600;cursor:pointer;align-self:center;margin:2px 0;transition:all .15s}
#langSheet .swap:active{background:#1e293b;transform:scale(0.96)}
#langSheet .swap .ic{width:16px;height:16px}
.popover-done-btn{margin-top:4px;width:100%;min-height:36px;background:#2563eb;color:#fff;font-size:13.5px;font-weight:600;border:none;border-radius:8px;cursor:pointer;transition:background .15s}
.popover-done-btn:active{background:#1d4ed8}
footer .tb span,footer .mic span{max-width:100%;overflow:hidden;text-overflow:ellipsis}
footer button{min-width:0}

/* v7：对坐上半屏改深色，与下半屏镜像一致；中间分隔线+语言小标；空白时提示 */
body.duo{background:#0f1115}
.duo-them-wrap{flex:1;position:relative;overflow:hidden;background:#05070a;min-height:0;display:flex;flex-direction:column}
.duo-b-box{width:100%;height:100%;display:flex;flex-direction:column-reverse;transform:rotate(180deg);position:relative;overflow:hidden}
.duo-b-header{flex:0 0 42px;display:flex;align-items:center;justify-content:space-between;padding:0 12px;background:rgba(15,23,42,.85);backdrop-filter:blur(8px);border-bottom:1px solid rgba(255,255,255,.08);z-index:20}
.duo-b-header .b-brand{font-size:15px;font-weight:700;color:#60a5fa;letter-spacing:-.01em}
.duo-b-header .b-wakelock-pill{font-size:11px;font-weight:600;padding:2px 8px;border-radius:99px;background:rgba(37,99,235,.2);color:#93c5fd;border:1px solid rgba(59,130,246,.3)}
.duo-b-header .b-settings-chip{font-size:12px;font-weight:600;padding:4px 10px;border-radius:99px;background:#1e293b;color:#e2e8f0;border:1px solid #334155;cursor:pointer}
.duo-b-subtitles{flex:1;overflow-y:auto;overflow-x:hidden;padding:12px 14px 44px;display:flex;flex-direction:column;gap:14px;-webkit-overflow-scrolling:touch;scroll-behavior:smooth}
.duo-b-subtitles .b-huge{font-size:32px;line-height:1.24;font-weight:750;letter-spacing:-.01em}
.duo-b-subtitles .b-large{font-size:25px;line-height:1.28;font-weight:650}
.duo-b-subtitles .b-medium{font-size:20px;line-height:1.34;font-weight:600}
.duo-b-subtitles .b-self{font-size:17px;line-height:1.36;font-weight:500}
@media(min-width:600px){
  .duo-b-subtitles .b-huge{font-size:40px}
  .duo-b-subtitles .b-large{font-size:30px}
  .duo-b-subtitles .b-medium{font-size:24px}
  .duo-b-subtitles .b-self{font-size:20px}
}
.duo-b-scroll{position:absolute;right:14px;top:52px;background:#1e3a8a;color:#eff6ff;border:1.5px solid #3b82f6;border-radius:99px;padding:6px 14px;font-size:12.5px;font-weight:700;box-shadow:0 6px 20px rgba(0,0,0,.5);cursor:pointer;z-index:30}
.duo-b-scroll[hidden]{display:none !important}
.duo-b-status{position:absolute;left:14px;top:52px;background:rgba(17,24,39,.9);border:1px solid #374151;border-radius:99px;padding:5px 12px;display:flex;align-items:center;gap:6px;font-size:12px;color:#cbd5e1;box-shadow:0 4px 12px rgba(0,0,0,.4);z-index:30}
.duo-b-status[hidden]{display:none !important}
.duo-b-sheet{position:absolute;inset:0;z-index:40;display:flex;align-items:flex-start}
.duo-b-sheet[hidden]{display:none !important}
.duo-b-sheet .b-sheet-box{width:100%;background:#111827;border-bottom:1px solid #374151;border-top:none;border-radius:0 0 16px 16px;padding:14px 14px 18px;display:flex;flex-direction:column;gap:12px;box-shadow:0 8px 30px rgba(0,0,0,.7)}
.duo-speak-btn{background:rgba(59,130,246,.15);border:1px solid rgba(59,130,246,.35);color:#93c5fd;border-radius:6px;padding:2px 7px;font-size:12px;cursor:pointer;display:inline-flex;align-items:center;gap:3px;transition:all .15s}
.duo-speak-btn:active{background:#2563eb;color:#fff}
.duo-me-wrap{flex:1;display:flex;position:relative;overflow:hidden;min-height:0}
.half.them{background:linear-gradient(180deg,#101a2e 0%,#0f1626 100%);color:#f3f4f6;border-bottom:0}
.half.mine{background:#0f1115}
.half.them .dl,.half.mine .dl{border-bottom:1px solid rgba(148,163,184,.14)}
.half.them .dl:not(.own) .big{color:#fff}
.half.them .dl.own .big,.half.them .dl.me .big{color:#93c5fd}
.half.them .dl .small{color:#94a3b8}
.half.them .dl .big.pending{color:#64748b}
.duoDiv{position:relative;flex:0 0 26px;display:flex;align-items:center;justify-content:space-between;padding:0 12px;background:linear-gradient(180deg,#0f1626,#0f1115);cursor:row-resize;touch-action:none;user-select:none;-webkit-user-select:none;z-index:25}
.duoDiv::before{content:"";position:absolute;top:-8px;bottom:-8px;left:0;right:0;z-index:0}
.duoDiv i{position:absolute;left:12px;right:12px;top:50%;height:1px;background:linear-gradient(90deg,transparent,#3b82f6 20%,#60a5fa 50%,#3b82f6 80%,transparent);opacity:.8;display:flex;align-items:center;justify-content:center;pointer-events:none}
.duoDiv i::after{content:"";display:block;width:38px;height:4px;border-radius:99px;background:rgba(96,165,250,.75);box-shadow:0 0 8px rgba(59,130,246,.5);transition:width .15s,background .15s,box-shadow .15s}
.duoDiv.dragging i::after{width:56px;height:5px;background:#60a5fa;box-shadow:0 0 12px rgba(96,165,250,.9)}
.duoDiv .db{position:relative;z-index:1;font-size:11px;font-weight:700;letter-spacing:.04em;line-height:1;padding:4px 8px;border-radius:99px;background:#1e293b;color:#bfdbfe;border:1px solid #334155;pointer-events:none}
.duoDiv .dbThem{transform:rotate(180deg)}
.half:empty{display:flex;align-items:center;justify-content:center}
.half:empty::before{content:attr(data-empty);font-size:20px;color:#64748b;text-align:center;padding:0 24px;line-height:1.4}
.half.them:empty::before{transform:rotate(180deg);color:#7c8db5}
.newest{background:#1e3a8a;color:#e0e7ff;border:1px solid #3b82f6;box-shadow:0 4px 14px rgba(0,0,0,.35)}
/* v8 说话人标签 */
.spk{cursor:pointer;min-height:18px;display:inline-block;font-size:11px;font-weight:600;color:#c4b5fd;background:rgba(139,92,246,.15);border:1px solid rgba(139,92,246,.35);border-radius:6px;padding:0 6px;margin-right:6px;vertical-align:1px}

/* Escucha 2.0 History styles */
.histbtn{display:inline-flex;align-items:center;gap:4px;background:#1e293b;border:1px solid #334155;color:#e2e8f0;border-radius:99px;padding:4px 10px;font-size:12px;font-weight:600;cursor:pointer}
.histbtn svg{width:14px;height:14px}

/* Escucha 3.0 Fullscreen History & IM Bubble Styles */
.hist-fullview{position:fixed;inset:0;background:#0b0f19;color:#f3f4f6;z-index:1800;display:flex;flex-direction:column;padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom);overflow:hidden}
.hist-fullview[hidden]{display:none !important}
.hist-fheader{flex:0 0 52px;display:flex;align-items:center;justify-content:space-between;padding:0 14px;background:#111827;border-bottom:1px solid #1f2937;gap:8px}
.hist-nav-btn{background:transparent;border:none;color:#60a5fa;font-size:14.5px;font-weight:600;cursor:pointer;padding:6px 4px}
.hist-ftitle{font-size:15.5px;font-weight:700;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;flex:1;text-align:center}
.hist-factions{display:flex;align-items:center;gap:6px}
.hist-filter-pill{background:#1f2937;border:1px solid #374151;color:#9ca3af;border-radius:99px;padding:3px 10px;font-size:12px;cursor:pointer;transition:all .15s}
.hist-filter-pill.on{background:#2563eb;color:#fff;border-color:#3b82f6;font-weight:600}
.hist-view-container{flex:1;display:flex;flex-direction:column;overflow:hidden;position:relative}
.hist-cards-list{flex:1;overflow-y:auto;padding:12px 14px;display:flex;flex-direction:column;gap:10px;-webkit-overflow-scrolling:touch}
.hist-card{background:#111827;border:1px solid #1f2937;border-radius:12px;padding:12px 14px;cursor:pointer;transition:all .15s}
.hist-card:active{border-color:#3b82f6;background:#151e32}
.hist-card-title{font-size:14px;line-height:1.45;color:#f3f4f6;margin-bottom:8px;word-break:break-word}
.hist-scene-prefix{color:#38bdf8;font-weight:700;margin-right:5px;letter-spacing:0.2px}
.hist-summary-desc{color:#e2e8f0;font-weight:500;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.hist-card-meta{display:flex;justify-content:space-between;align-items:center;font-size:11.5px;color:#94a3b8}
.hist-card-head{display:flex;justify-content:space-between;align-items:center;font-size:12px;color:#9ca3af;margin-bottom:6px}
.hist-card-head .tag{background:#1e293b;color:#93c5fd;padding:2px 6px;border-radius:4px;font-weight:600}
.hist-card-prev{font-size:12.5px;color:#cbd5e1;line-height:1.5;margin-top:6px;display:flex;flex-direction:column;gap:3px}
.hist-card-prev .sent-item{overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}
.hist-card-prev .sent-num{color:#60a5fa;font-weight:700;margin-right:4px}
.hist-empty{text-align:center;padding:40px 10px;color:#6b7280;font-size:14px}

/* 历史搜索框 */
.hist-search-bar{padding:8px 14px 6px;background:#111827;border-bottom:1px solid #1f2937}
.hist-search-inner{display:flex;align-items:center;background:#1f2937;border:1px solid #374151;border-radius:10px;padding:0 10px;gap:8px;height:38px}
.hist-search-inner:focus-within{border-color:#3b82f6;box-shadow:0 0 0 1px #3b82f6}
.hist-search-icon{width:16px;height:16px;color:#94a3b8;flex-shrink:0}
.hist-search-inner input{flex:1;background:transparent;border:none;color:#f3f4f6;font-size:13.5px;outline:none;min-width:0}
.hist-search-inner input::placeholder{color:#64748b}
.hist-search-clear{background:transparent;border:none;color:#94a3b8;font-size:16px;cursor:pointer;padding:0 4px;line-height:1}
.hist-search-clear:hover{color:#fff}

/* 顶部信息与 TAB 标签 */
.hist-chat-top-banner{flex:0 0 auto;display:flex;align-items:center;justify-content:space-between;padding:8px 12px;background:#111827;border-bottom:1px solid #1f2937;gap:8px}
.hist-session-info{display:flex;align-items:center;gap:6px;min-width:0}
.hist-meta-text{font-size:12px;color:#94a3b8;white-space:nowrap}
.hist-top-tools{display:flex;align-items:center;gap:6px}
.hist-btn-wx{background:#059669;color:#fff;border:none;border-radius:6px;padding:5px 10px;font-size:12px;font-weight:600;cursor:pointer;white-space:nowrap;transition:background .15s}
.hist-btn-wx:active{background:#047857}

/* TAB 切换栏 */
.hist-detail-tab-bar{display:flex;background:#111827;border-bottom:1px solid #1f2937;padding:0 12px;gap:16px;flex-shrink:0}
.hist-detail-tab{background:transparent;border:none;color:#94a3b8;font-size:13.5px;font-weight:600;padding:10px 4px;cursor:pointer;position:relative;transition:all .15s}
.hist-detail-tab.on{color:#60a5fa}
.hist-detail-tab.on::after{content:'';position:absolute;bottom:0;left:0;right:0;height:2.5px;background:#3b82f6;border-radius:2px 2px 0 0}

/* TAB 容器分栏 */
.hist-panel-chat{flex:1;display:flex;flex-direction:column;min-height:0;overflow:hidden}
.hist-panel-summary{flex:1;display:flex;flex-direction:column;min-height:0;overflow:hidden;background:#0b0f19}
.hist-sum-actions-bar{display:flex;justify-content:space-between;align-items:center;padding:10px 14px;background:#111827;border-bottom:1px solid #1f2937;gap:8px;flex-shrink:0}
.hist-summary-panel-content{flex:1;overflow-y:auto;padding:16px 14px;font-size:14px;line-height:1.65;color:#e2e8f0;white-space:pre-wrap;-webkit-overflow-scrolling:touch}

/* 即时通讯 (IM) 气泡对话流 */
.hist-chat-stream{flex:1;overflow-y:auto;padding:14px 12px;display:flex;flex-direction:column;gap:12px;-webkit-overflow-scrolling:touch}
.hist-time-badge{align-self:center;background:rgba(31,41,55,.8);color:#94a3b8;font-size:11px;padding:2px 8px;border-radius:99px;margin:2px 0}
.hist-msg-row{display:flex;flex-direction:column;max-width:86%;gap:3px}
.hist-msg-row.mine{align-self:flex-end;align-items:flex-end}
.hist-msg-row.mine .hist-msg-head{display:flex;align-items:center;gap:4px;font-size:11px;color:#6ee7b7}
.hist-msg-row.mine .hist-bubble{background:#065f46;border:1px solid #059669;border-radius:14px 14px 2px 14px;padding:9px 12px;color:#f0fdf4;box-shadow:0 2px 6px rgba(0,0,0,.25)}
.hist-msg-row.mine .hist-bubble-main{font-size:14.5px;font-weight:500;line-height:1.4}
.hist-msg-row.mine .hist-bubble-sub{font-size:12px;color:#a7f3d0;margin-top:4px;border-top:1px solid rgba(255,255,255,.15);padding-top:4px;line-height:1.35}

.hist-msg-row.them{align-self:flex-start;align-items:flex-start}
.hist-msg-row.them .hist-msg-head{display:flex;align-items:center;gap:4px;font-size:11px;color:#93c5fd}
.hist-msg-row.them .hist-bubble{background:#1f2937;border:1px solid #374151;border-radius:14px 14px 14px 2px;padding:9px 12px;color:#f3f4f6;box-shadow:0 2px 6px rgba(0,0,0,.25)}
.hist-msg-row.them .hist-bubble-main{font-size:14.5px;font-weight:500;line-height:1.4;color:#fff}
.hist-msg-row.them .hist-bubble-sub{font-size:12.5px;color:#93c5fd;margin-top:4px;border-top:1px solid rgba(255,255,255,.1);padding-top:4px;line-height:1.35}

.hist-bubble-tools{display:flex;align-items:center;gap:6px;margin-top:2px;opacity:.75}
.hist-bubble-tools button{background:transparent;border:none;cursor:pointer;padding:0 3px;font-size:12px;color:inherit;border-radius:4px}
.hist-bubble-tools button:hover{opacity:1}

.hist-chat-bottom-bar{flex:0 0 46px;display:flex;align-items:center;justify-content:flex-end;gap:8px;padding:0 12px;background:#111827;border-top:1px solid #1f2937}
.danger{color:#f87171 !important;border-color:rgba(239,68,68,.3) !important}

/* Escucha 3.0 AB Machine Styles */
.role-badge{background:#1e3a8a;color:#93c5fd;border:1px solid #3b82f6;font-size:11px;font-weight:700;padding:3px 8px;cursor:pointer}
.role-badge:hover{background:#2563eb;color:#fff}

.role-modal{position:fixed;inset:0;background:rgba(0,0,0,.85);z-index:2000;display:flex;align-items:center;justify-content:center;padding:20px;backdrop-filter:blur(6px)}
.role-modal[hidden]{display:none !important}
.role-modal-card{background:#111827;border:1px solid #374151;border-radius:18px;max-width:440px;width:100%;max-height:88vh;overflow-y:auto;-webkit-overflow-scrolling:touch;padding:22px 18px;box-shadow:0 20px 40px rgba(0,0,0,.6);color:#f3f4f6}
.role-title{font-size:20px;font-weight:700;text-align:center;color:#fff}
.role-sub{font-size:13px;color:#9ca3af;text-align:center;margin-top:4px;margin-bottom:20px}
.role-options{display:flex;flex-direction:column;gap:14px}
.role-btn-card{display:flex;align-items:flex-start;gap:14px;background:#1f2937;border:1.5px solid #374151;border-radius:14px;padding:16px;cursor:pointer;text-align:left;transition:all .18s;color:inherit}
.role-btn-card:hover,.role-btn-card:focus-visible{border-color:#3b82f6;background:#1e293b;transform:translateY(-1px)}
.role-icon{font-size:30px;line-height:1;flex-shrink:0;padding-top:2px}
.role-info{display:flex;flex-direction:column;gap:4px}
.role-name{font-size:16px;font-weight:700;color:#60a5fa}
.role-desc{font-size:12.5px;color:#94a3b8;line-height:1.45}

/* B-Machine Fullscreen View */
.b-view{--b-bg:#05070a;--b-text:#ffffff;position:fixed;inset:0;background:var(--b-bg);color:var(--b-text);z-index:1500;display:flex;flex-direction:column;overflow:hidden;padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom);transition:background-color .2s ease,color .2s ease}
.b-view[hidden]{display:none !important}
.b-header{flex:0 0 46px;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 14px;background:rgba(15,23,42,.7);backdrop-filter:blur(10px);border-bottom:1px solid rgba(255,255,255,.08);min-width:0;position:relative}
.b-brand{font-size:12px;font-weight:700;letter-spacing:.02em;color:#93c5fd;white-space:nowrap;flex-shrink:0}
.b-hright{display:flex;align-items:center;gap:6px;flex-shrink:0}
.b-settings-chip{font-size:12px;font-weight:600;padding:3px 10px;border-radius:99px;background:rgba(30,41,59,.85);color:#d1d5db;border:1px solid rgba(255,255,255,.16);cursor:pointer;white-space:nowrap;display:inline-flex;align-items:center;justify-content:center;transition:background .15s}
.b-settings-chip:active{background:#3b82f6;color:#fff}
.b-wakelock-pill{font-size:9.5px;font-weight:700;background:rgba(16,185,129,.15);color:#34d399;border:1px solid rgba(16,185,129,.35);border-radius:99px;padding:2px 6px;white-space:nowrap;letter-spacing:-.01em}

/* B-Sheet Modal */
.b-sheet{position:fixed;inset:0;z-index:2000;display:flex;align-items:flex-end}
.b-sheet[hidden]{display:none !important}
.b-sheet-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.6);backdrop-filter:blur(2px)}
.b-sheet-box{position:relative;width:100%;max-height:85vh;overflow-y:auto;-webkit-overflow-scrolling:touch;background:#111827;border-top:1px solid #374151;border-radius:18px 18px 0 0;padding:18px 18px calc(24px + env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:16px;box-shadow:0 -8px 30px rgba(0,0,0,.6)}
.b-sheet-head{display:flex;justify-content:space-between;align-items:center}
.b-sheet-head b{font-size:16px;color:#f3f4f6}
.b-sheet-section{display:flex;flex-direction:column;gap:8px}
.b-sheet-label{font-size:12px;font-weight:600;color:#94a3b8}
.b-sheet-select{width:100%;font-size:15px;font-weight:600;background:#1e293b;color:#60a5fa;border:1px solid #374151;border-radius:10px;padding:10px 12px;outline:none}
.b-sheet-btn-alt{width:100%;font-size:14px;font-weight:600;background:#1f2937;color:#e2e8f0;border:1px solid #374151;border-radius:10px;padding:12px;cursor:pointer;text-align:center;transition:background .15s}
.b-sheet-btn-alt:active{background:#2563eb;color:#fff}

/* B机背景与文字颜色设置 */
.b-color-presets{display:grid;grid-template-columns:repeat(auto-fit,minmax(80px,1fr));gap:6px;margin-top:2px}
.b-preset-btn{display:flex;align-items:center;justify-content:center;gap:6px;padding:8px 4px;border-radius:10px;font-size:12px;font-weight:600;border:1.5px solid rgba(255,255,255,.15);cursor:pointer;transition:all .15s;-webkit-tap-highlight-color:transparent}
.b-preset-btn:active{transform:scale(0.96)}
.b-preset-btn.active{border-color:#38bdf8 !important;box-shadow:0 0 10px rgba(56,189,248,.4)}
.preset-dot{width:9px;height:9px;border-radius:50%;flex-shrink:0;box-shadow:0 0 4px rgba(0,0,0,.4)}
.b-custom-colors{display:flex;flex-direction:column;gap:8px;background:#1e293b;border:1px solid #334155;border-radius:12px;padding:10px 12px;margin-top:4px}
.b-color-row{display:flex;align-items:center;justify-content:space-between;font-size:13px;color:#e2e8f0;font-weight:500}
.b-color-picker-wrap{display:flex;align-items:center;gap:8px}
.b-color-picker-wrap input[type=color]{width:32px;height:32px;border:none;border-radius:8px;padding:0;background:transparent;cursor:pointer;-webkit-appearance:none}
.b-color-picker-wrap input[type=color]::-webkit-color-swatch-wrapper{padding:0}
.b-color-picker-wrap input[type=color]::-webkit-color-swatch{border:1.5px solid #475569;border-radius:8px}
.b-color-hex{font-family:monospace;font-size:12px;color:#94a3b8;min-width:55px;text-align:right}

.b-subtitles{flex:1;overflow-y:auto;overflow-x:hidden;padding:24px 20px 80px;display:flex;flex-direction:column;gap:24px;-webkit-overflow-scrolling:touch;scroll-behavior:smooth}
.b-empty[hidden],[hidden]{display:none !important}
.b-empty{margin:auto;font-size:20px;color:var(--b-text);opacity:0.5;text-align:center;font-weight:500;letter-spacing:.02em}
.duo-b-subtitles .b-empty{margin:auto;font-size:13px;color:#64748b;text-align:center;font-weight:400;letter-spacing:.02em;line-height:1.6;opacity:.55;padding:16px}
.duo-b-subtitles .b-empty span{font-size:11.5px;color:#475569}

.b-line{transition:opacity .3s,color .3s;word-break:break-word;hyphens:auto;display:flex;flex-direction:column;gap:6px}
.b-tag{display:inline-flex;align-items:center;align-self:flex-start;font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.05em;padding:2px 8px;border-radius:6px;user-select:none;margin-bottom:2px}

/* A-speech (我方中译西): 醒目字体与自适应颜色 */
.b-line.from-a .b-tag-a{background:rgba(56,189,248,.18);color:#38bdf8;border:1px solid rgba(56,189,248,.4)}
.b-line.from-a.latest{color:var(--b-text);opacity:1;text-shadow:0 0 20px rgba(255,255,255,.2)}
.b-line.from-a.b-dim{color:var(--b-text);opacity:0.55}
.b-huge{font-size:46px;line-height:1.22;font-weight:750;letter-spacing:-.01em}
.b-large{font-size:34px;line-height:1.28;font-weight:650}
.b-medium{font-size:26px;line-height:1.35;font-weight:600}

/* B-speech (对方原话复核) */
.b-line.from-b{padding-left:12px;border-left:2.5px solid rgba(100,116,139,.35)}
.b-line.from-b .b-tag-b{background:rgba(100,116,139,.15);color:#94a3b8;border:1px solid rgba(100,116,139,.3)}
.b-line.from-b.latest{color:var(--b-text);opacity:0.8}
.b-line.from-b.b-dim{color:var(--b-text);opacity:0.45}
.b-self{font-size:22px;line-height:1.38;font-weight:500}

@media(min-width:600px){
  .b-huge{font-size:54px}
  .b-large{font-size:40px}
  .b-medium{font-size:30px}
  .b-self{font-size:26px}
}

.b-scroll-btn{position:fixed;right:20px;bottom:30px;background:#1e3a8a;color:#eff6ff;border:1.5px solid #3b82f6;border-radius:99px;padding:10px 18px;font-size:14px;font-weight:700;box-shadow:0 8px 24px rgba(0,0,0,.5);cursor:pointer;z-index:1600;display:inline-flex;align-items:center;gap:6px;animation:bFloat 1.5s ease-in-out infinite}
.b-scroll-btn[hidden]{display:none !important}
@keyframes bFloat{0%,100%{transform:translateY(0)}50%{transform:translateY(-4px)}}

.b-status{position:static;background:rgba(30,58,138,.35);border:1px solid rgba(59,130,246,.45);border-radius:99px;padding:3px 10px;display:inline-flex;align-items:center;gap:6px;font-size:11.5px;font-weight:600;color:#93c5fd;box-shadow:0 0 10px rgba(59,130,246,.2);white-space:nowrap;pointer-events:none;flex-shrink:0;animation:bFadeIn .2s ease-out}
.b-status[hidden]{display:none !important}
.b-status-dot{width:6.5px;height:6.5px;background:#38bdf8;border-radius:50%;animation:bPulse 1.2s infinite ease-in-out;flex-shrink:0}
@keyframes bPulse{0%,100%{opacity:.3;transform:scale(.85)}50%{opacity:1;transform:scale(1.2)}}
@keyframes bFadeIn{from{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}

@media(max-width:380px){
  .b-header{padding:0 8px;gap:4px}
  .b-status{padding:2px 7px;font-size:11px}
  .b-wakelock-pill{display:none}
}

/* A-Machine On-Demand Speaker Button */
.btn-speak-b{background:transparent;border:none;color:#93c5fd;font-size:15px;padding:2px 6px;cursor:pointer;border-radius:4px;vertical-align:middle;opacity:.8;transition:opacity .15s,transform .1s}
.btn-speak-b:hover{opacity:1;transform:scale(1.15)}
.btn-speak-b:active{transform:scale(.95)}
.btn-zoom-mine{background:transparent;border:none;color:#93c5fd;font-size:14px;padding:2px 6px;cursor:pointer;border-radius:4px;vertical-align:middle;opacity:.8;transition:opacity .15s,transform .1s}
.btn-zoom-mine:hover{opacity:1;transform:scale(1.15)}
.btn-zoom-mine:active{transform:scale(.95)}

/* 全局悬浮麦克风自愈与霸道抢回指示胶囊 */
.mic-reclaim-banner{position:fixed;top:calc(12px + env(safe-area-inset-top));left:50%;transform:translateX(-50%);z-index:9999;background:rgba(15,23,42,.95);border:1.5px solid #ef4444;color:#fecaca;padding:7px 16px;border-radius:99px;font-size:12.5px;font-weight:600;display:flex;align-items:center;gap:8px;box-shadow:0 8px 24px rgba(0,0,0,.6);cursor:pointer;pointer-events:auto;transition:all .2s ease;animation:bannerPulse 1.8s infinite ease-in-out;white-space:nowrap}
.mic-reclaim-banner.success{border-color:#10b981;color:#a7f3d0;animation:none}
.mic-reclaim-banner[hidden]{display:none !important}
.mrb-dot{width:8px;height:8px;border-radius:50%;background:#ef4444;flex-shrink:0}
.mic-reclaim-banner.success .mrb-dot{background:#10b981}
@keyframes bannerPulse{0%,100%{transform:translateX(-50%) scale(1);box-shadow:0 8px 24px rgba(0,0,0,.6)}50%{transform:translateX(-50%) scale(1.03);box-shadow:0 8px 30px rgba(239,68,68,.45)}}


/* --- Escucha 4.0 Paywall, Auth & QR Modal Styles --- */
.sheet-account-card {
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 1px solid #334155;
  border-radius: 12px;
  padding: 10px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12.5px;
  color: #e2e8f0;
  margin-top: 4px;
}
.sheet-account-card.guest {
  background: linear-gradient(135deg, #1e293b, #0b1329);
  border-color: #3b82f6;
  color: #93c5fd;
}
.sheet-account-card.admin {
  background: linear-gradient(135deg, #451a03, #1e293b);
  border-color: #eab308;
  color: #fef08a;
}
.sheet-account-card.in-trial {
  background: linear-gradient(135deg, #1e3a8a, #0f172a);
  border-color: #3b82f6;
  color: #bfdbfe;
}
.sheet-account-card.active-pass {
  background: linear-gradient(135deg, #064e3b, #0f172a);
  border-color: #10b981;
  color: #a7f3d0;
}
.sheet-account-card.expired {
  background: linear-gradient(135deg, #450a0a, #0f172a);
  border-color: #ef4444;
  color: #fca5a5;
}
.sheet-account-card .card-actions {
  display: flex;
  gap: 8px;
  margin-top: 4px;
}
.sheet-account-card button {
  background: #2563eb;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}
.sheet-account-card button.logout-btn {
  background: rgba(255, 255, 255, 0.15) !important;
  color: #f1f5f9 !important;
  border: 1px solid rgba(255, 255, 255, 0.25) !important;
}
.sheet-account-card button.logout-btn:hover {
  background: rgba(239, 68, 68, 0.3) !important;
  border-color: #ef4444 !important;
}
.trial-status-banner {
  display: none !important; /* Never display as separate floating row on top */
}
.escucha-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.escucha-modal-card {
  background: #0f172a;
  border: 1px solid #334155;
  border-radius: 16px;
  width: 100%;
  max-width: 520px;
  max-height: 88vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 20px 16px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.8);
  color: #f8fafc;
}
.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}
.modal-header .close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 20px;
  cursor: pointer;
}
.modal-sub {
  color: #94a3b8;
  font-size: 13px;
  margin-top: 0;
  margin-bottom: 20px;
}
.plans-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
@media (max-width: 480px) {
  .plans-grid {
    grid-template-columns: 1fr;
  }
}
.plan-card {
  background: #1e293b;
  border: 1.5px solid #334155;
  border-radius: 12px;
  padding: 14px 10px;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s ease;
  position: relative;
}
.plan-card:hover {
  border-color: #60a5fa;
  transform: translateY(-2px);
}
.plan-card.popular {
  border-color: #3b82f6;
  background: #172554;
}
.plan-badge {
  font-size: 10.5px;
  color: #94a3b8;
  margin-bottom: 4px;
}
.plan-badge.hot {
  color: #60a5fa;
  font-weight: 700;
}
.plan-title {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 8px;
}
.plan-price {
  font-size: 24px;
  font-weight: 800;
  color: #38bdf8;
  margin-bottom: 6px;
}
.plan-price span {
  font-size: 14px;
  font-weight: 500;
}
.plan-desc {
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.3;
  margin-bottom: 12px;
  min-height: 28px;
}
.plan-btn {
  width: 100%;
  background: #334155;
  color: #f8fafc;
  border: none;
  border-radius: 6px;
  padding: 6px 0;
  font-size: 12px;
  font-weight: 600;
}
.plan-btn.primary {
  background: #2563eb;
  color: #fff;
}
.payment-methods-hint {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  font-size: 12px;
  color: #94a3b8;
  padding: 10px 0;
  border-top: 1px solid #1e293b;
  border-bottom: 1px solid #1e293b;
}
.pay-icon {
  background: #1e293b;
  padding: 2px 8px;
  border-radius: 4px;
  color: #e2e8f0;
}
.modal-footer-auth {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  margin-top: 14px;
  color: #94a3b8;
}
.modal-footer-auth a {
  color: #38bdf8;
  text-decoration: none;
}
.auth-section label {
  font-size: 13px;
  color: #cbd5e1;
  display: block;
  margin-bottom: 6px;
}
.input-row {
  display: flex;
  gap: 8px;
}
.input-row input {
  flex: 1;
  background: #1e293b;
  border: 1px solid #475569;
  border-radius: 8px;
  padding: 10px 12px;
  color: #fff;
  font-size: 14px;
}
.input-row button {
  background: #334155;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.input-row button.primary {
  background: #2563eb;
}
.divider {
  text-align: center;
  position: relative;
  margin: 18px 0;
}
.divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 1px;
  background: #334155;
}
.divider span {
  position: relative;
  background: #0f172a;
  padding: 0 10px;
  font-size: 12px;
  color: #64748b;
}
.qr-container {
  background: #fff;
  border-radius: 12px;
  padding: 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 16px auto;
  width: 232px;
  min-height: 232px;
}
.pair-tips {
  font-size: 12.5px;
  color: #94a3b8;
  margin-bottom: 12px;
}
.pair-tips p {
  margin: 4px 0;
}
.pair-manual-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #64748b;
}
.pair-manual-row input {
  flex: 1;
  background: #1e293b;
  border: 1px solid #334155;
  border-radius: 6px;
  color: #94a3b8;
  padding: 4px 8px;
  font-size: 11.5px;
}
.escucha-toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(15, 23, 42, 0.95);
  border: 1px solid #38bdf8;
  color: #eff6ff;
  padding: 8px 18px;
  border-radius: 99px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
  z-index: 100000;
  display: none;
}
.escucha-toast.visible, .escucha-toast.show {
  display: flex !important;
  align-items: center;
  gap: 6px;
}

.b-audio-unlock-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: linear-gradient(135deg, rgba(56, 189, 248, 0.22), rgba(14, 165, 233, 0.32));
  border: 1.5px solid rgba(56, 189, 248, 0.55);
  color: #38bdf8;
  padding: 12px 18px;
  margin: 10px 16px 0;
  border-radius: 14px;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  animation: bPulse 2.2s infinite ease-in-out;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: opacity 0.25s ease, transform 0.2s ease;
  text-align: center;
}
.b-audio-unlock-banner .unlock-main {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 600;
}
.b-audio-unlock-banner .unlock-hint {
  font-size: 11.5px;
  color: #cbd5e1;
  opacity: 0.9;
  font-weight: 400;
}
.b-audio-unlock-banner:active {
  transform: scale(0.97);
  background: rgba(56, 189, 248, 0.35);
}
.b-audio-unlock-banner[hidden] {
  display: none !important;
}
@keyframes bPulse {
  0%, 100% { opacity: 0.9; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.02); }
}

