:root {
    /* === 石墨冷青蓝主题（Linear/Vercel 同系） === */
    --main: #5b8def;            /* 冷青蓝主色 */
    --main-hi: #7aa4f7;         /* 悬停亮 */
    --bg: #07090d;              /* 深蓝黑底 */
    --card: #0f1218;            /* 卡片底 */
    --nest: #171a22;            /* 嵌套输入框底 */
    --border: #1e2230;          /* 细边框 */
    --text: #e5e8ef;            /* 主文字 */
    --muted: #6b7688;           /* 辅助文字 */
    --ok: #4ade80;              /* 成功绿 */
    --warn: #fbbf24;            /* 警告黄 */
    --err: #f87171;             /* 错误红 */
  }
  * { box-sizing: border-box; }
  html, body { overflow-x: hidden; max-width: 100vw; }
  body {
    margin: 0; background: var(--bg); color: var(--text);
    font-family: "Microsoft YaHei", system-ui, sans-serif;
  }
  html.dark { color-scheme: dark; }
  .app { max-width: 1500px; margin: 0 auto; padding: 16px; overflow-x: hidden; }
  .topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 20px; background: linear-gradient(135deg,#1e293b,#172554);
    border: 1px solid var(--border); border-radius: 12px; margin-bottom: 16px;
  }
  .topbar h1 { font-size: 20px; margin: 0; color: #fff; letter-spacing: 1px; }
  .topbar .sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
  .topbar .userinfo { display: flex; gap: 12px; align-items: center; font-size: 13px; color: var(--muted); }
  .grid { display: grid; grid-template-columns: 320px 1fr 340px; gap: 16px; }
  @media (max-width: 1100px) { .grid { grid-template-columns: 1fr; } }
  .card {
    background: var(--card); border: 1px solid var(--border);
    border-radius: 12px; padding: 16px; margin-bottom: 16px;
  }
  .card h3 { margin: 0 0 12px; font-size: 15px; color: #fff; display: flex; align-items: center; gap: 8px; }
  .card h3::before { content: ""; width: 4px; height: 16px; background: var(--main); border-radius: 2px; }
  .row { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
  .muted { color: var(--muted); font-size: 12px; }
  .live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #ef4444; margin-right: 6px; }
  .live-dot.on { background: #22c55e; box-shadow: 0 0 8px #22c55e; animation: pulse 1.2s infinite; }
  @keyframes pulse { 50% { opacity: .4; } }
  /* 分类标签 */
  .cat-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
  .cat-tab {
    border: 1px solid var(--border); background: transparent; color: var(--text);
    padding: 6px 12px; border-radius: 8px; cursor: pointer; font-size: 13px; position: relative;
  }
  .cat-tab.active { border-color: var(--main); background: rgba(37,99,235,.15); color: #fff; }
  .cat-tab .cnt { color: var(--muted); font-size: 11px; margin-left: 4px; }
  .event-list { max-height: 480px; overflow-y: auto; }
  .event-item {
    display: flex; gap: 10px; padding: 8px 10px; border-bottom: 1px solid rgba(51,65,85,.4);
    font-size: 13px; align-items: flex-start;
  }
  .event-tag { flex-shrink: 0; font-size: 11px; padding: 2px 8px; border-radius: 6px; color: #fff; margin-top: 2px; }
  .et-Chat{background:#4caf50}.et-Gift{background:#ff9800}.et-Like{background:#2196f3}
  .et-EnterRoom{background:#9c27b0}.et-Follow{background:#00bcd4}
  .event-name { color: #fff; font-weight: 600; margin-right: 4px; }
  .event-text { color: var(--muted); word-break: break-all; }
  /* 播报 */
  .speak-status { display: flex; align-items: center; gap: 10px; padding: 12px; background: #0b1220; border-radius: 10px; }
  .speak-badge { padding: 2px 10px; border-radius: 6px; font-size: 12px; background: var(--main); color: #fff; }
  .speak-badge.assist { background: #8b5cf6; }
  .speak-text { font-size: 14px; color: var(--text); flex: 1; min-width: 0; }
  .queue-item { display: flex; align-items: center; gap: 8px; padding: 6px 8px; font-size: 12px; color: var(--muted); border-bottom: 1px solid rgba(51,65,85,.3); }
  .queue-item .qb { width: 6px; height: 6px; border-radius: 50%; }
  .qb-main{background:var(--main)} .qb-assist{background:#8b5cf6}
  /* 配置 */
  .tpl-item { margin-bottom: 10px; }
  .tpl-item label { font-size: 12px; color: var(--muted); display: block; margin-bottom: 4px; }
  .voice-check { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; margin-bottom: 8px; font-size: 13px; }
  .voice-check .lbl { display: flex; align-items: center; gap: 6px; }
  /* ===== 音色分工新布局 ===== */
  .role-row {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 16px; background: rgba(255,255,255,0.02);
    border: 1px solid var(--border); border-radius: 10px;
    transition: all .15s;
  }
  .role-row:hover { border-color: var(--main); background: rgba(37,99,235,.06); }
  .role-left { display: flex; align-items: center; gap: 12px; }
  .role-emoji { font-size: 20px; }
  .role-name { font-size: 14px; font-weight: 500; color: #e2e8f0; }
  .role-right { display: flex; align-items: center; gap: 8px; }
  .role-indicator {
    font-size: 12px; padding: 3px 10px; border-radius: 20px;
    font-weight: 500;
  }
  .role-indicator.main { background: rgba(37,99,235,.2); color: #60a5fa; border: 1px solid rgba(37,99,235,.4); }
  .role-indicator.assist { background: rgba(16,185,129,.2); color: #34d399; border: 1px solid rgba(16,185,129,.4); }
  /* ========== 登录/注册页（Glassmorphism 玻璃拟态 · CodePen 风） ========== */
  .login-wrap {
    position: fixed; inset: 0; display: flex;
    align-items: center; justify-content: center;
    overflow: hidden; z-index: 100;
    /* CodePen DivineBlow 原始渐变背景 */
    background: linear-gradient(-45deg, #ee7752, #e73c7e, #23a6d5, #23d5ab);
    background-size: 400% 400%;
    animation: gradient 12s ease infinite;
  }
  @keyframes gradient {
    0%   { background-position: 0% 50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
  }

  /* 动态背景层 */
  .bg-layer { position: absolute; inset: 0; z-index: 0; }

  /* 保留但调亮 blob（叠在 CodePen 渐变之上，增加层次） */
  .bg-blob {
    position: absolute; border-radius: 50%; filter: blur(90px); opacity: 0.35;
    animation: blobFloat 12s ease-in-out infinite;
  }
  .blob-1 {
    width: 520px; height: 520px; background: radial-gradient(circle, rgba(238,119,82,0.8), transparent 70%);
    top: -10%; left: -5%; animation-duration: 14s;
  }
  .blob-2 {
    width: 420px; height: 420px; background: radial-gradient(circle, rgba(231,60,126,0.7), transparent 70%);
    bottom: -8%; right: -5%; animation-delay: 3s; animation-duration: 16s;
  }
  .blob-3 {
    width: 320px; height: 320px; background: radial-gradient(circle, rgba(35,166,213,0.6), transparent 70%);
    top: 45%; left: 55%; animation-delay: 6s; animation-duration: 18s; opacity: 0.3;
  }
  @keyframes blobFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(40px, -30px) scale(1.08); }
    66% { transform: translate(-30px, 20px) scale(0.95); }
  }

  /* 🎯 CodePen 风浮动装饰方块 (原 DivineBlow .square) */
  .cp-box { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
  .cp-square {
    position: absolute;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    box-shadow: 0 25px 45px rgba(0, 0, 0, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 15px;
    animation: square 10s linear infinite;
    animation-delay: calc(-1s * var(--i));
  }
  @keyframes square {
    0%, 100% { transform: translateY(-20px) rotate(0deg); opacity: 0.7; }
    50%      { transform: translateY(20px) rotate(5deg); opacity: 1; }
  }
  /* 6 个方块位置 —— 围绕 glass-card 散开 */
  .cp-square:nth-child(1) { width: 90px;  height: 90px;  top: 8%;   left: 8%;  }
  .cp-square:nth-child(2) { width: 140px; height: 140px; top: 20%;  right: 10%; z-index: 2; }
  .cp-square:nth-child(3) { width: 60px;  height: 60px;  top: 55%;  left: 5%;  z-index: 2; }
  .cp-square:nth-child(4) { width: 50px;  height: 50px;  bottom: 15%; right: 8%; }
  .cp-square:nth-child(5) { width: 70px;  height: 70px;  bottom: 25%; left: 15%; }
  .cp-square:nth-child(6) { width: 110px; height: 110px; top: 70%;  right: 15%; z-index: 2; }

  /* 玻璃拟态卡片（更透明 · CodePen 风 + ::after 内描边） */
  .glass-card {
    position: relative; z-index: 2;
    width: 440px; max-width: calc(100vw - 32px);
    padding: 44px 40px 32px;
    background: rgba(255, 255, 255, 0.085);
    backdrop-filter: blur(22px) saturate(1.5);
    -webkit-backdrop-filter: blur(22px) saturate(1.5);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 20px;
    box-shadow:
      0 25px 45px rgba(0, 0, 0, 0.25),
      0 0 0 1px rgba(255, 255, 255, 0.06) inset;
    animation: cardAppear 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  }
  /* CodePen 特色 —— 内层细细的玻璃描边 */
  .glass-card::after {
    content: "";
    position: absolute;
    inset: 6px;
    border-radius: 14px;
    pointer-events: none;
    border: 1px solid rgba(255, 255, 255, 0.08);
  }
  @keyframes cardAppear {
    from { opacity: 0; transform: translateY(24px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
  }

  /* 品牌头部（CodePen 风白色系） */
  .glass-header { text-align: center; margin-bottom: 28px; }
  .glass-logo {
    width: 64px; height: 64px; margin: 0 auto 16px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    font-size: 28px;
    background: linear-gradient(135deg, rgba(255,255,255,0.35), rgba(255,255,255,0.12));
    backdrop-filter: blur(10px);
    box-shadow:
      0 8px 32px rgba(0, 0, 0, 0.25),
      inset 0 1px 0 rgba(255,255,255,0.4);
    border: 1px solid rgba(255,255,255,0.3);
    animation: logoPulse 4s ease-in-out infinite;
  }
  @keyframes logoPulse {
    0%, 100% { box-shadow: 0 8px 32px rgba(0,0,0,0.25), inset 0 1px 0 rgba(255,255,255,0.4); }
    50% { box-shadow: 0 8px 48px rgba(255,255,255,0.2), inset 0 1px 0 rgba(255,255,255,0.5); }
  }
  .glass-title {
    font-size: 24px; font-weight: 700; margin: 0 0 6px;
    color: #ffffff;
    letter-spacing: 1px;
    text-shadow: 0 2px 12px rgba(0,0,0,0.2);
  }
  .glass-slogan {
    font-size: 12px; color: rgba(255, 255, 255, 0.75); margin: 0;
    letter-spacing: 1.5px;
  }

  /* 切换器 */
  .glass-switch {
    position: relative; display: flex;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.18);
    border-radius: 14px; padding: 4px;
    margin-bottom: 28px;
    backdrop-filter: blur(5px);
  }
  .switch-btn {
    flex: 1; padding: 10px 0; border: none; background: transparent;
    color: rgba(255,255,255,0.7); font-size: 14px; font-weight: 500; letter-spacing: 2px;
    cursor: pointer; border-radius: 10px; position: relative; z-index: 1;
    transition: color .25s;
  }
  .switch-btn.active { color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,0.2); }
  .switch-indicator {
    position: absolute; top: 4px; left: 4px;
    width: calc(50% - 4px); height: calc(100% - 8px);
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px; z-index: 0;
    transition: transform .35s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
  }
  .switch-indicator.reg { transform: translateX(100%); }

  /* 表单 */
  .glass-form { display: flex; flex-direction: column; gap: 18px; }
  .field { display: flex; flex-direction: column; gap: 6px; }
  .field label {
    font-size: 12px; font-weight: 500; color: rgba(255, 255, 255, 0.85);
    padding-left: 2px; letter-spacing: 0.5px;
  }
  .field-optional { color: rgba(255,255,255,0.5); font-weight: 400; }
  .field-required { color: #ff9fb3; font-weight: 500; }
  .field-input { position: relative; }
  .f-icon {
    position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
    font-size: 15px; z-index: 2; pointer-events: none; opacity: 0.9;
  }

  /* 输入框（CodePen 风半透明白 —— 必须压过 Element Plus dark 模式） */
  html.dark .glass-input .el-input__wrapper,
  .glass-input .el-input__wrapper {
    background: rgba(255,255,255,0.12) !important;
    background-color: rgba(255,255,255,0.12) !important;
    background-image: none !important;
    border: 1px solid rgba(255,255,255,0.2) !important;
    border-radius: 14px !important;
    padding-left: 42px !important;
    height: 46px !important;
    box-shadow: none !important;
    outline: none !important;
    backdrop-filter: blur(4px);
    transition: all .25s !important;
  }
  html.dark .glass-input .el-input__wrapper:hover,
  .glass-input .el-input__wrapper:hover {
    border-color: rgba(255,255,255,0.35) !important;
    background: rgba(255,255,255,0.16) !important;
    background-color: rgba(255,255,255,0.16) !important;
  }
  html.dark .glass-input .el-input__wrapper.is-focus,
  .glass-input .el-input__wrapper.is-focus {
    border-color: rgba(255,255,255,0.5) !important;
    background: rgba(255,255,255,0.22) !important;
    background-color: rgba(255,255,255,0.22) !important;
    box-shadow: 0 0 0 3px rgba(255,255,255,0.15) !important;
  }
  html.dark .glass-input .el-input__inner,
  .glass-input .el-input__inner {
    color: #ffffff !important; font-size: 14px !important;
    background: transparent !important;
  }
  html.dark .glass-input .el-input__inner::placeholder,
  .glass-input .el-input__inner::placeholder { color: rgba(255,255,255,0.55) !important; }
  html.dark .glass-input .el-input__password,
  .glass-input .el-input__password { color: rgba(255,255,255,0.7) !important; }

  /* Turnstile */
  .turnstile-box { margin: 2px 0 -4px; display: flex; justify-content: center; }

  /* 提交按钮 */
  .glass-submit {
    width: 100%; height: 50px; margin-top: 8px;
    border: none; border-radius: 14px;
    font-size: 15px; font-weight: 600; letter-spacing: 4px;
    color: #fff; cursor: pointer;
    background: linear-gradient(135deg, #3b82f6, #6366f1, #8b5cf6);
    box-shadow:
      0 8px 28px rgba(59,130,246,0.4),
      inset 0 1px 0 rgba(255,255,255,0.2);
    transition: all .25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative; overflow: hidden;
  }
  .glass-submit::before {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent 50%);
    opacity: 0; transition: opacity .25s;
  }
  .glass-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow:
      0 14px 40px rgba(59,130,246,0.55),
      inset 0 1px 0 rgba(255,255,255,0.25);
  }
  .glass-submit:hover:not(:disabled)::before { opacity: 1; }
  .glass-submit:active:not(:disabled) { transform: translateY(0); }
  .glass-submit:disabled { opacity: 0.7; cursor: not-allowed; }

  /* 🆕 邮箱验证码 — 输入框+按钮 横向一排 */
  .email-code-row {
    display: flex; gap: 10px; align-items: center;
    position: relative;
  }
  .email-code-row .f-icon { z-index: 3; }
  .email-code-row .glass-input,
  .email-code-row .glass-input .el-input { flex: 1 1 auto; min-width: 0 !important; width: auto !important; }
  .email-code-row .glass-input .el-input__wrapper { width: 100%; }
  .email-code-btn {
    flex-shrink: 0 !important;
    display: inline-flex !important;
    align-items: center;
    height: 46px;
    padding: 0 18px;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 14px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(12px);
    color: #fff; font-size: 13px; font-weight: 600;
    cursor: pointer; white-space: nowrap;
    transition: all 0.2s;
    z-index: 2;
    box-sizing: border-box;
  }
  .email-code-btn:hover:not(:disabled) {
    background: rgba(255,255,255,0.28);
    border-color: rgba(255,255,255,0.5);
  }
  .email-code-btn:disabled { opacity: 0.55; cursor: not-allowed; }

  /* 底部 */
  .glass-footer {
    margin-top: 28px; padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.15);
    text-align: center; font-size: 11px;
    color: rgba(255, 255, 255, 0.65);
    letter-spacing: 0.5px;
  }

  /* 响应式 */
  @media (max-width: 520px) {
    .glass-card { padding: 36px 24px 28px; border-radius: 18px; }
    .glass-title { font-size: 20px; }
    .glass-logo { width: 52px; height: 52px; font-size: 22px; }
    .cp-square:nth-child(2), .cp-square:nth-child(6) { display: none; }
  }
  .section-label { font-size: 12px; color: var(--muted); margin: 14px 0 8px; text-transform: uppercase; letter-spacing: 1px; }
  ::-webkit-scrollbar { width: 8px; } ::-webkit-scrollbar-thumb { background: #334155; border-radius: 4px; }

  /* ===== 商业化音色卡片 ===== */
  .voice-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 10px; margin-top: 10px;
  }
  .voice-card {
    background: #0b1220; border: 1px solid var(--border); border-radius: 10px;
    padding: 10px 12px; transition: all .15s; position: relative;
  }
  .voice-card:hover { border-color: var(--main); transform: translateY(-1px); box-shadow: 0 2px 8px rgba(37,99,235,.15); }
  .voice-card.selected { border-color: var(--main); background: rgba(37,99,235,.1); }
  .voice-card.is-cloned { border-color: #ff6b6b; }
  .voice-card-inner { display: flex; flex-direction: column; gap: 6px; }
  .voice-card .el-button { pointer-events: auto !important; position: relative; z-index: 3; }
  .voice-card .el-button.el-button--link { color: #38bdf8 !important; }
  /* 原生 button — 避免 Element Plus 事件拦截 */
  .voice-card .vb {
    background: transparent; border: 1px solid #2563eb; color: #60a5fa;
    padding: 2px 10px; border-radius: 6px; font-size: 12px; cursor: pointer;
    width: auto; height: auto; min-height: 20px; line-height: 1.4;
    pointer-events: auto !important; position: relative; z-index: 10;
    display: inline-flex; align-items: center; gap: 4px;
  }
  .voice-card .vb:hover { background: rgba(37,99,235,.2); border-color: #60a5fa; color: #fff; }
  .voice-card .vb-warn { border-color: #f59e0b; color: #fbbf24; }
  .voice-card .vb-warn:hover { background: rgba(245,158,11,.2); color: #fff; }
  .voice-card .vb-play:hover { box-shadow: 0 0 8px rgba(37,99,235,.4); }
  .voice-avatar {
    width: 32px; height: 32px; border-radius: 50%; display: inline-flex;
    align-items: center; justify-content: center; color: #fff; font-size: 14px;
    margin-bottom: 4px;
  }
  .voice-label { font-size: 13px; font-weight: 600; color: #fff; }
  .voice-desc { font-size: 11px; color: var(--muted); line-height: 1.4; }
  .voice-check { position: absolute; top: 8px; right: 10px; font-size: 12px; z-index: 2; }
  h4 { margin: 4px 0; font-size: 13px; color: #cbd5e1; }

  /* ===== 桌面端三栏布局（>1100px）===== */
  .desktop-shell {
    display: flex; flex-direction: column;
    min-height: 100vh; max-height: 100vh; overflow: hidden;
  }

  /* 🆕 顶栏 TopBar */
  .topbar {
    height: 56px; flex-shrink: 0;
    display: flex; align-items: center; gap: 16px; padding: 0 20px;
    background: rgba(10,13,19,.85);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid #1e293b;
    z-index: 100;
  }
  .topbar-logo { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 600; color: #fff; }
  .topbar-logo-dot { width: 8px; height: 8px; border-radius: 50%; background: #5b8def; box-shadow: 0 0 8px #5b8def; }
  .topbar-brand { color: #e2e8f0; font-size: 14px; }
  .topbar-spacer { flex: 1; }
  .topbar-pill {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 5px 12px; border-radius: 20px;
    background: rgba(30,41,59,.6); border: 1px solid #1e293b;
    font-size: 12px; color: #94a3b8;
  }
  .topbar-pill.online .dot { background: #22c55e; box-shadow: 0 0 6px #22c55e; animation: none; }
  .topbar-pill.live { color: #fca5a5; border-color: rgba(239,68,68,.4); background: rgba(239,68,68,.1); }
  .topbar-pill.live .dot { background: #ef4444; box-shadow: 0 0 6px #ef4444; animation: live-pulse 1.2s infinite; }
  .topbar-pill.points { color: #fbbf24; }
  .topbar-pill.points .dot { background: #fbbf24; }
  .topbar-pill .dot { width: 7px; height: 7px; border-radius: 50%; }
  .topbar-user {
    display: flex; align-items: center; gap: 8px;
    padding: 4px 12px 4px 4px; border-radius: 20px;
    background: rgba(30,41,59,.5); border: 1px solid #1e293b; cursor: pointer;
  }
  .topbar-avatar {
    width: 28px; height: 28px; border-radius: 50%;
    background: linear-gradient(135deg, #5b8def, #818cf8);
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff; font-size: 12px; font-weight: 600;
  }
  .topbar-username { font-size: 12px; color: #cbd5e1; max-width: 100px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

  /* 主体：三栏 */
  .desktop-body {
    flex: 1; display: flex; gap: 12px; padding: 12px;
    min-height: 0; overflow: hidden;
  }

  /* 🆕 底栏 StatusBar */
  .statusbar {
    height: 28px; flex-shrink: 0;
    display: flex; align-items: center; gap: 18px; padding: 0 20px;
    background: rgba(10,13,19,.85);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid #1e293b;
    font-size: 11px; color: #64748b;
  }
  .statusbar .stat { display: inline-flex; align-items: center; gap: 6px; }
  .statusbar .dot { width: 6px; height: 6px; border-radius: 50%; }
  .statusbar .dot.ok { background: #22c55e; box-shadow: 0 0 4px #22c55e; }
  .statusbar .dot.warn { background: #fbbf24; }
  .statusbar .dot.err { background: #ef4444; }
  .statusbar .stat strong { color: #94a3b8; font-weight: 500; }
  .statusbar-spacer { flex: 1; }

  /* 左侧栏（加宽 + 加用户区）*/
  .side-nav-v2 {
    width: 200px; flex: none;
    background: #0f172a;
    border: 1px solid #1e293b; border-radius: 12px;
    padding: 14px 10px;
    display: flex; flex-direction: column; gap: 4px;
    overflow-y: auto;
  }
  .nav-brand {
    display: flex; align-items: center; gap: 10px;
    padding: 4px 12px 14px; border-bottom: 1px solid #1e293b; margin-bottom: 8px;
  }
  .nav-brand-ico {
    width: 32px; height: 32px; border-radius: 8px;
    background: linear-gradient(135deg, #5b8def, #818cf8);
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 16px;
  }
  .nav-brand-text .brand-name { font-size: 13px; font-weight: 600; color: #e2e8f0; }
  .nav-brand-text .brand-sub { font-size: 10px; color: #64748b; }
  .nav-user-row {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 10px; margin-top: 6px;
    border-radius: 8px; background: rgba(30,41,59,.4);
  }
  .nav-user-row .u-avatar {
    width: 28px; height: 28px; border-radius: 50%;
    background: linear-gradient(135deg, #5b8def, #818cf8);
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff; font-size: 11px; font-weight: 600; flex-shrink: 0;
  }
  .nav-user-row .u-info { flex: 1; min-width: 0; }
  .nav-user-row .u-name { font-size: 12px; color: #cbd5e1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .nav-user-row .u-points { font-size: 10px; color: #fbbf24; }

  .nav-item-v2 {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; margin-bottom: 2px; border-radius: 8px;
    color: #94a3b8; cursor: pointer; font-size: 13px;
    transition: all .15s;
  }
  .nav-item-v2:hover { color: #fff; background: rgba(91,141,239,.08); }
  .nav-item-v2.active {
    color: #fff; background: linear-gradient(90deg, rgba(91,141,239,.22), rgba(91,141,239,.04));
    box-shadow: inset 3px 0 0 #5b8def;
  }
  .nav-item-v2 .nav-ico { font-size: 15px; width: 20px; text-align: center; }
  .nav-item-v2 .badge { margin-left: auto; font-size: 10px; padding: 1px 6px; border-radius: 10px; background: #26334d; color: #94a3b8; }
  .nav-item-v2 .badge.live { background: #ef4444; color: #fff; animation: pulse 1.5s infinite; }
  .nav-item-v2 .nav-live-dot {
    margin-left: auto; width: 8px; height: 8px; border-radius: 50%;
    background: #ef4444; box-shadow: 0 0 0 2px #0f172a;
    animation: live-pulse 1.2s ease-in-out infinite;
  }

  /* 右侧信息栏 */
  .right-rail {
    width: 260px; flex: none;
    display: flex; flex-direction: column; gap: 12px;
    overflow-y: auto;
  }
  .rail-card {
    background: #111827;
    border: 1px solid #1e293b; border-radius: 12px;
    padding: 14px;
  }
  .rail-card-title { font-size: 12px; color: #64748b; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 10px; display: flex; align-items: center; gap: 6px; }
  .rail-card-title .rc-dot { width: 6px; height: 6px; border-radius: 50%; }
  .rail-live-anchor {
    display: flex; align-items: center; gap: 10px; padding: 8px 0;
    border-bottom: 1px dashed #1e293b;
  }
  .rail-live-anchor:last-child { border-bottom: none; padding-bottom: 0; }
  .rail-live-anchor:first-of-type { padding-top: 0; }
  .rail-live-ico {
    width: 28px; height: 28px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 14px; flex-shrink: 0;
  }
  .rail-live-ico.speaking { background: rgba(91,141,239,.15); }
  .rail-live-ico.waiting { background: rgba(100,116,139,.15); opacity: .6; }
  .rail-live-ico.off { background: rgba(100,116,139,.1); opacity: .4; }
  .rail-live-text { flex: 1; min-width: 0; }
  .rail-live-name { font-size: 12px; color: #cbd5e1; }
  .rail-live-status { font-size: 11px; color: #64748b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 150px; display: inline-block; }
  .rail-live-status.speaking { color: #60a5fa; }
  .rail-live-status.waiting { color: #64748b; font-style: italic; }
  .rail-live-stat { display: flex; justify-content: space-between; font-size: 11px; color: #64748b; padding: 4px 0; }
  .rail-live-stat strong { color: #cbd5e1; font-weight: 500; }
  .rail-quick-btn {
    display: block; width: 100%; padding: 8px; margin-bottom: 6px;
    border-radius: 8px; border: none; cursor: pointer;
    font-size: 12px; font-weight: 500;
  }
  .rail-quick-btn:last-child { margin-bottom: 0; }
  .rail-quick-btn.primary { background: #5b8def; color: #fff; }
  .rail-quick-btn.primary:hover { background: #4a7ce8; }
  .rail-quick-btn.danger { background: #ef4444; color: #fff; }
  .rail-quick-btn.ghost { background: transparent; border: 1px solid #334155; color: #94a3b8; }
  .rail-quick-btn.ghost:hover { border-color: #5b8def; color: #60a5fa; }

  /* 主内容卡片容器 */
  .main-area { flex: 1; min-width: 0; overflow-y: auto; }
  .main-card {
    background: #111827;
    border: 1px solid #1e293b; border-radius: 12px;
    padding: 20px; height: 100%; overflow-y: auto;
  }
  .page-section { animation: fadeIn .2s ease; }
  @keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }

  /* 响应式：<1400px 隐藏右栏 */
  @media (max-width: 1400px) {
    .right-rail { display: none; }
  }
  /* 响应式：<1100px 侧栏横铺 */
  @media (max-width: 1100px) {
    .desktop-body { flex-direction: column; }
    .side-nav-v2 { width: 100%; flex-direction: row; overflow-x: auto; }
    .nav-brand, .nav-user-row { display: none; }
  }

  /* 🆕 开播控制栏：桌面横排 */
  .live-control-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
  .live-control-bar .live-btn { flex-shrink: 0; }
  .live-room-input { width: 360px; flex-shrink: 0; }

  /* ================= 手机端适配（≤768px，App WebView / 手机浏览器） ================= */
  /* 🆕 手机端全屏自适应：覆盖所有桌面端 padding/max-width */
  @media (max-width: 768px) {
    .app { max-width: 100% !important; padding: 0 !important; margin: 0 !important; }
    body { padding: 0 !important; margin: 0 !important; }
    html { padding: 0 !important; }
  }

  @media (max-width: 768px) {
    /* 🆕 开播控制栏：竖排！按钮满宽 */
    .live-control-bar { flex-direction: column; gap: 10px; align-items: stretch; }
    .live-control-bar .live-btn { width: 100%; margin: 0 !important; }
    .live-room-input { width: 100%; }
    /* Element Plus 所有弹窗 + 全局确认框：不超过屏幕宽 */
    .el-dialog { width: 92vw !important; max-width: 92vw !important; }
    .el-message-box { width: 92vw !important; max-width: 92vw !important; }
    /* 弹窗表单 label 改竖排 */
    .el-dialog .el-form-item__label { float: none; display: block; text-align: left; width: auto !important; }
    .el-dialog .el-form-item__content { margin-left: 0 !important; }
    /* 话术库左右分栏 → 上下堆叠 */
    .script-panel { flex-direction: column; min-height: 0; }
    .script-panel .col-left { flex: none; }
    /* 音色卡片 2 列 + 卡片内容紧凑化 */
    .voice-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .voice-card { padding: 8px; }
    .voice-card-inner { gap: 4px; }
    .voice-avatar { width: 28px; height: 28px; font-size: 12px; }
    .voice-label { font-size: 12px; }
    .voice-desc { font-size: 10px; }
    /* 手机端隐藏 voice_id 长串（无信息价值，占高度） */
    .voice-id { display: none; }
    /* 操作按钮：变小、变紧凑 */
    .voice-btns { gap: 2px !important; }
    .voice-btns .el-button {
      padding: 2px 6px !important; font-size: 11px !important;
      height: auto !important; min-height: 22px !important; margin-left: 0 !important;
    }
    /* 三滑杆：手机上改成竖排（2列卡片时横向太挤） */
    .voice-sliders { grid-template-columns: 1fr !important; gap: 2px !important; }
    /* 滑杆本体收窄 */
    .voice-sliders .el-slider__runway { height: 4px; }
    .voice-sliders .el-slider__button { width: 12px; height: 12px; }
    .voice-sliders .el-slider__button-wrapper { top: -14px; }
    /* 顶部栏：桌面端内部 topbar 隐藏（手机用外层 topbar-v2）*/
    .desktop-shell > header.topbar { display: none !important; }
    /* 外层 topbar-v2：手机改成两行布局（不堆叠！）*/
    .topbar-v2 {
      flex-direction: row !important;      /* 第一行：品牌 + 用户 */
      flex-wrap: wrap;
      gap: 6px 10px;
      padding: 10px 12px !important;
    }
    .topbar-v2 .tb-left { order: 1; flex: 0 0 auto; min-width: 0; }
    .topbar-v2 .tb-left h1 { font-size: 15px !important; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
    .topbar-v2 .tb-mode { display: none; }  /* 模式标签手机隐藏，省空间 */
    .topbar-v2 .tb-right { order: 2; flex: 1 1 auto; justify-content: flex-end; gap: 6px; min-width: 0; }
    .topbar-v2 .tb-center { order: 3; flex: 0 0 100%; text-align: left; font-size: 12px; padding-top: 4px; border-top: 1px solid rgba(255,255,255,.06); margin-top: 4px; }
    /* uif-chip 缩小：隐藏 label，只留图标+值 */
    .topbar-v2 .uif-chip { padding: 3px 8px !important; gap: 4px; flex-shrink: 0; }
    .topbar-v2 .uif-chip .uif-label { display: none; }
    .topbar-v2 .uif-chip .uif-value { font-size: 11px !important; }
    /* ✅ 点数卡也显示（和时长/在线一样缩小样式，不用 display:none 隐藏） */
    .topbar-v2 .uif-user-btn { padding: 3px 8px; gap: 4px; }
    .topbar-v2 .uif-name { max-width: 60px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }
    /* desktop-shell：手机去掉 max-height 限制，让内容自然滚动 */
    .desktop-shell { max-height: none !important; min-height: auto !important; overflow: visible !important; }
    .desktop-shell .desktop-body { min-height: auto; overflow: visible !important; }
    /* 页面收窄 */
    .app { padding: 10px; }
    /* 轮播/轮播图自适应 */
    .el-carousel__container { height: 38vw !important; }
    /* ✅ 2026-10-12 修复：手机端也用底部 Tab Bar（不再只靠 body.in-app） */
    .side-nav-v2 { display: none !important; }       /* 隐藏桌面侧边栏 */
    .side-nav { display: none !important; }          /* 隐藏旧版侧边栏 */
    /* 🔴 phone-tab-bar 不写 !important — 交给 Vue :style 控制显示（authed=true 才显示）*/
    .phone-tab-bar { }  /* 空规则，显示由 Vue :style="{display: authed ? 'flex' : 'none'}" 决定 */
    .root-layout { padding-bottom: 72px; }           /* 给底部栏让位 */
  }

  /* ================= 超小屏（≤480px） ================= */
  @media (max-width: 480px) {
    .voice-grid { grid-template-columns: 1fr; }
    .el-dialog { width: 96vw !important; max-width: 96vw !important; }
    /* 单列时卡片内容恢复稍宽松 */
    .voice-card { padding: 10px 12px; }
    .voice-sliders { grid-template-columns: 1fr 1fr 1fr !important; gap: 6px !important; }
  }

  /* ==========================================================
     🔴🔴🔴 768px 以下：配置向导/桌面壳全面 mobile 化
     ========================================================== */
  @media (max-width: 768px) {
    /* desktop-body：手机去掉 padding/gap，宽度 100% */
    .desktop-body { padding: 8px !important; gap: 8px !important; flex-direction: column !important; width: 100%; min-width: 0; }
    /* main-area：宽度锁死 100%，去掉独立滚动（让外层滚）*/
    .main-area { width: 100%; min-width: 0 !important; overflow-y: visible !important; }
    /* main-card：手机去掉 height:100%，去掉独立滚动 */
    .main-card { height: auto !important; overflow-y: visible !important; padding: 12px !important; width: 100%; min-width: 0; }
    /* card：手机去掉 margin-bottom 太大 */
    .card { padding: 12px !important; margin-bottom: 12px !important; width: 100%; min-width: 0; }

    /* wizard-steps：手机步骤卡改 2×2 grid 或 flex-wrap */
    .wizard-steps {
      flex-wrap: wrap !important; padding: 8px !important; gap: 8px !important;
    }
    .wizard-step {
      flex: 0 0 calc(50% - 4px) !important; font-size: 12px !important;
      padding: 6px 8px !important; gap: 4px !important; min-width: 0;
    }
    .wizard-step span { font-size: 12px !important; }

    /* speaker-role-grid：3 列 → 1 列 */
    .speaker-role-grid {
      grid-template-columns: 1fr !important; gap: 10px !important;
    }
    .speaker-select { width: 100% !important; }

    /* 手机上强制所有 inline fixed width select 改成 100% */
    select[style*="width"],
    [style*="width:200px"], [style*="width:220px"], [style*="width:240px"],
    [style*="width: 200px"], [style*="width: 220px"], [style*="width: 240px"] {
      width: 100% !important; max-width: 100% !important; min-width: 0 !important;
    }

    /* 防止 input/select 超宽 */
    .el-input, .el-select, .el-input-number { max-width: 100% !important; width: 100% !important; }

    /* desktop-shell：禁止 min-width */
    .desktop-shell { width: 100% !important; max-width: 100vw !important; min-width: 0 !important; }

    /* 隐藏桌面端 statusbar（底部有 phone-tab-bar 了）*/
    .statusbar { display: none !important; }
  }

  /* 内联 style 固定宽度/grid 兜底：手机上强制不超屏 */
  @media (max-width: 768px) {
    /* 🔴 所有内联 grid 强制改成单列！（比 width 更重要！） */
    [style*="grid-template-columns:1fr 1fr"],
    [style*="grid-template-columns:1fr 1fr 1fr"],
    [style*="grid-template-columns:auto auto 1fr"],
    [style*="grid-template-columns:160px 1fr auto auto auto"],
    [style*="grid-template-columns:1fr auto"] {
      grid-template-columns: 1fr !important;
    }
    /* 固定宽度全部强制收窄 */
    [style*="width:320px"], [style*="width:220px"], [style*="width:200px"],
    [style*="width:130px"], [style*="width:120px"], [style*="width:110px"],
    [style*="width:90px"], [style*="width:80px"], [style*="width:56px"],
    [style*="max-width:500px"], [style*="max-width:400px"],
    [style*="min-width:200px"] {
      max-width: 100% !important;
      width: 100% !important;
    }
    /* 🔴🔴🔴 关键：禁止整页横向滚动！ */
    body, html, #app, .root-layout, .main-area {
      overflow-x: hidden !important;
      max-width: 100vw !important;
    }
    /* 🔴 页面最外层容器 */
    .app { max-width: 100vw !important; overflow-x: hidden !important; }
  }
  /* 📌 话术库左右分栏 */
  .script-panel { display: flex; gap: 14px; min-height: 300px; }
  .script-panel .col-left { flex: 0 0 40%; display: flex; flex-direction: column; min-width: 0; }
  .script-panel .col-right { flex: 1; display: flex; flex-direction: column; min-width: 0; }
  .script-search { margin-bottom: 8px; }
  /* 拖拽排序的分段卡片 */
  .seg-list { display: flex; flex-direction: column; gap: 6px; }
  .seg-item {
    display: flex; align-items: flex-start; gap: 8px;
    padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px;
    font-size: 12px; background: rgba(245,158,11,0.03);
    cursor: grab; transition: all .15s; user-select: none;
  }
  .seg-item:hover { border-color: var(--main); background: rgba(37,99,235,.06); }
  .seg-item.dragging { opacity: 0.4; cursor: grabbing; transform: scale(0.98); }
  .seg-item.drag-over { border-color: #22c55e; background: rgba(34,197,94,.1); }
  .seg-handle { color: var(--muted); cursor: grab; padding: 2px 4px; font-size: 14px; }
  .seg-handle:active { cursor: grabbing; }
  .seg-idx { color: #f59e0b; font-weight: 700; flex-shrink: 0; min-width: 32px; }
  .seg-text { flex: 1; min-width: 0; color: var(--text); line-height: 1.55; word-break: break-word; }
  .seg-len { color: var(--muted); font-size: 11px; flex-shrink: 0; align-self: center; }

  /* ========== v2 顶部栏 ========== */
  .topbar-v2 {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 24px; background: linear-gradient(135deg,#1e293b,#172554);
    border: 1px solid var(--border); border-radius: 12px; margin-bottom: 16px;
  }
  .topbar-v2 h1 { font-size: 18px; margin: 0; color: #fff; letter-spacing: 1px; }
  .tb-left { display: flex; align-items: center; gap: 12px; }
  .tb-mode {
    font-size: 12px; padding: 3px 10px; border-radius: 12px;
    background: rgba(37,99,235,.2); color: #60a5fa; border: 1px solid rgba(59,130,246,.35);
  }
  .tb-center { flex: 1; text-align: center; }
  .tb-status { font-size: 13px; font-weight: 500; }
  .tb-status.live { color: #22c55e; }
  .tb-status.idle { color: var(--muted); }
  .tb-right { display: flex; gap: 16px; align-items: center; font-size: 13px; }

  /* ========== 用户信息卡片组 ========== */
  .user-info-group { display: flex; gap: 10px; align-items: center; }
  .uif-chip {
    display: flex; align-items: center; gap: 8px;
    padding: 6px 12px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 10px;
    transition: all .2s;
  }
  .uif-chip:hover { background: rgba(255,255,255,.1); border-color: rgba(255,255,255,.15); }
  .uif-icon { font-size: 16px; line-height: 1; }
  .uif-text { display: flex; flex-direction: column; line-height: 1.2; }
  .uif-label { font-size: 10px; color: #64748b; letter-spacing: .5px; }
  .uif-value { font-size: 13px; color: #e2e8f0; font-weight: 600; }
  /* 时长卡：剩余<24h 警告色 */
  .uif-time.uif-warn { background: rgba(239,68,68,.12); border-color: rgba(239,68,68,.35); }
  .uif-time.uif-warn .uif-value { color: #f87171; }
  .uif-time.uif-danger { background: rgba(239,68,68,.2); border-color: rgba(239,68,68,.5); animation: uifPulse 1.5s infinite; }
  .uif-time.uif-danger .uif-value { color: #f87171; }
  @keyframes uifPulse { 0%,100% { opacity: 1; } 50% { opacity: .6; } }
  /* 点数卡：渐变点缀 */
  .uif-points { background: linear-gradient(135deg, rgba(59,130,246,.12), rgba(139,92,246,.12)); border-color: rgba(99,102,241,.3); }
  .uif-points .uif-value { color: #c4b5fd; }
  /* 在线状态卡（从 desktop 顶栏移上来的） */
  .uif-online { background: rgba(34,197,94,.12); border-color: rgba(34,197,94,.35); }
  .uif-online .uif-label { color: #4ade80; font-weight: 600; }
  .uif-online .dot { width: 6px; height: 6px; background: #4ade80; border-radius: 50%; display: inline-block; animation: uifPulse 1.5s infinite; }
  .uif-online.live { background: rgba(239,68,68,.12); border-color: rgba(239,68,68,.4); }
  .uif-online.live .uif-label { color: #f87171; }
  .uif-online.live .dot { background: #f87171; }

  /* ========== 用户下拉按钮 ========== */
  .uif-user-btn {
    display: flex; align-items: center; gap: 8px;
    padding: 5px 12px 5px 5px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 24px;
    cursor: pointer;
    transition: all .2s;
  }
  .uif-user-btn:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.2); }
  .uif-avatar {
    width: 28px; height: 28px;
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 13px; font-weight: 700; color: #fff;
    flex: none;
  }
  .uif-name { font-size: 13px; color: #e2e8f0; font-weight: 500; }
  .uif-caret { font-size: 10px; color: #64748b; margin-left: 2px; }

  /* ========== v2 侧边栏 ========== */
  .side-nav-v2 {
    width: 180px; flex: none;
    background: linear-gradient(180deg, #111c33, #0f172a);
    border: 1px solid var(--border); border-radius: 12px;
    padding: 14px 10px; position: sticky; top: 16px; height: fit-content;
    display: flex; flex-direction: column; gap: 4px;
  }
  .nav-item-v2 {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 14px; margin-bottom: 2px; border-radius: 9px;
    color: var(--muted); cursor: pointer; font-size: 13px;
    border: 1px solid transparent; transition: all .15s;
  }
  .nav-item-v2:hover { color: #fff; background: rgba(37,99,235,.08); }
  .nav-item-v2.active {
    color: #fff; background: linear-gradient(90deg, rgba(37,99,235,.25), rgba(37,99,235,.06));
    border-color: rgba(59,130,246,.35); box-shadow: inset 3px 0 0 var(--main);
  }
  .nav-item-v2 .nav-ico { font-size: 16px; }
  .nav-item-v2 .badge { margin-left: auto; font-size: 11px; padding: 1px 7px; border-radius: 10px; background: #26334d; color: #94a3b8; }
  .nav-item-v2 .badge.live { background: #ef4444; color: #fff; animation: pulse 1.5s infinite; }

  /* ========== 配置向导步骤条 ========== */
  .wizard-steps {
    display: flex; gap: 12px; margin-bottom: 16px;
    padding: 12px 16px; background: var(--card);
    border: 1px solid var(--border); border-radius: 10px;
  }
  .wizard-step {
    flex: 1; display: flex; align-items: center; gap: 8px;
    font-size: 13px; color: var(--muted); position: relative;
  }
  .wizard-step span:first-child {
    width: 26px; height: 26px; border-radius: 50%;
    background: #334155; color: #94a3b8;
    display: inline-flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: 12px; flex-shrink: 0;
  }
  .wizard-step.active { color: var(--text); }
  .wizard-step.active span:first-child {
    background: var(--main); color: #fff;
    box-shadow: 0 0 10px rgba(37,99,235,.4);
  }

  /* ========== 音色选择下拉 ========== */
  .speaker-select {
    width: 100%; padding: 8px 12px; font-size: 13px;
    background: #0f172a; color: var(--text);
    border: 1px solid var(--border); border-radius: 8px;
    outline: none; transition: border-color .15s;
  }
  .speaker-select:focus { border-color: var(--main); }
  .speaker-select option { background: #1e293b; }

  /* ========== 互动规则行 ========== */
  .rule-row {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; color: var(--text); cursor: pointer;
  }

  /* ========== 分段预览 ========== */
  .seg-preview {
    margin-top: 12px; padding: 10px 14px;
    background: #0b1220; border: 1px solid var(--border); border-radius: 8px;
    max-height: 200px; overflow-y: auto;
  }
  .seg-item {
    display: flex; align-items: flex-start; gap: 8px;
    padding: 4px 0; font-size: 13px; line-height: 1.5;
  }
  .seg-num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 22px; height: 22px; border-radius: 50%;
    background: rgba(37,99,235,.2); color: #60a5fa;
    font-size: 11px; font-weight: 600; flex-shrink: 0;
  }
  .seg-more { color: var(--muted); font-size: 12px; padding: 6px 0; text-align: center; border-top: 1px solid rgba(51,65,85,.4); }

  /* ========== precheck 检测结果 ========== */
  .check-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px;
    margin-top: 8px;
  }
  .check-item {
    display: flex; align-items: center; gap: 8px;
    padding: 8px 12px; background: #0b1220;
    border: 1px solid var(--border); border-radius: 8px;
    font-size: 12px;
  }
  .check-item strong { color: var(--text); font-weight: 500; min-width: 70px; }
  .check-item .muted { flex: 1; }

  /* ========== 监控页 ========== */
  .monitor-card { border-left: 3px solid var(--main); }
  .monitor-card:nth-of-type(2) { border-left-color: #8b5cf6; }
  .monitor-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
  .monitor-text {
    font-size: 15px; color: #fff; line-height: 1.6;
    padding: 14px 16px; background: #0b1220;
    border-radius: 8px; min-height: 60px;
    border: 1px solid var(--border);
  }
  .monitor-queue { margin-top: 8px; font-size: 12px; color: var(--muted); }

  /* ========== 事件流 ========== */
  .event-stream { max-height: 400px; overflow-y: auto; }
  .event-stream .event-item {
    border-bottom: 1px solid rgba(51,65,85,.3);
    padding: 8px 4px;
  }
  .event-type {
    display: inline-block; font-size: 11px; padding: 2px 8px;
    border-radius: 6px; color: #fff; margin-right: 8px;
    background: #26334d;
  }

/* 🔐 旋转图验证码弹窗（复刻 agent-web 同款） */
.rc-mask{position:fixed;inset:0;background:rgba(10,22,16,.62);backdrop-filter:blur(2px);display:none;align-items:center;justify-content:center;padding:20px;z-index:9999}
.rc-mask.show{display:flex}
.rc-verify-pop{width:420px;max-width:100%;background:#1e293b;border-radius:16px;box-shadow:0 24px 60px rgba(0,0,0,.5);overflow:hidden;animation:rcPop .18s ease-out}
@keyframes rcPop{from{transform:translateY(8px);opacity:0}to{transform:none;opacity:1}}
.rc-pop-head{display:flex;align-items:center;justify-content:space-between;padding:16px 20px;border-bottom:1px solid #334155}
.rc-pop-head .t{font-size:15px;font-weight:700;color:#e2e8f0}
.rc-pop-head .x{width:30px;height:30px;border:0;border-radius:8px;cursor:pointer;background:transparent;color:#94a3b8;font-size:18px;line-height:1;transition:background .15s}
.rc-pop-head .x:hover{background:#334155}
.rc-pop-body{padding:20px 20px 22px}
.rc-stage{display:flex;flex-direction:column;align-items:center;gap:10px}
.rc-ref{position:relative;flex:none}
.rc-ref img{width:270px;height:270px;display:block;border-radius:10px;object-fit:cover;background:#0f172a}
.rc-ref .loading-mask{position:absolute;inset:0;z-index:5;display:none;align-items:center;justify-content:center;background:rgba(15,23,42,.92);border-radius:10px;font-size:13px;color:#94a3b8}
.rc-ref .loading-mask.show{display:flex}
.rc-hole{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);border-radius:50%;overflow:hidden}
.rc-thumb{position:relative;width:100%;height:100%;will-change:transform}
.rc-thumb img{position:absolute;top:50%;left:50%;width:270px;height:270px;margin:-135px 0 0 -135px;object-fit:cover}
.rc-stage-tip{margin-top:4px;font-size:12px;color:#94a3b8}
.rc-control{margin-top:26px}
.rc-slider{width:100%;appearance:none;-webkit-appearance:none;height:6px;border-radius:3px;background:linear-gradient(90deg,#3b82f6 var(--fill,50%),#334155 var(--fill,50%));outline:none;cursor:pointer}
.rc-slider::-webkit-slider-thumb{-webkit-appearance:none;width:22px;height:22px;border-radius:50%;background:#fff;border:3px solid #3b82f6;box-shadow:0 2px 6px rgba(0,0,0,.3);cursor:grab}
.rc-slider::-moz-range-thumb{width:16px;height:16px;border-radius:50%;background:#fff;border:3px solid #3b82f6;box-shadow:0 2px 6px rgba(0,0,0,.3);cursor:grab}
.rc-actions{display:flex;justify-content:center;margin-top:18px;gap:10px}
.rc-btn{padding:10px 24px;border-radius:10px;font-size:14px;font-weight:600;cursor:pointer;border:1px solid #334155;background:#1e293b;color:#e2e8f0;transition:border-color .15s,background .15s}
.rc-btn:hover{border-color:#475569;background:#334155}
.rc-btn:disabled{opacity:.5;cursor:not-allowed}
@media (max-width:640px){
  .rc-ref img{width:240px;height:240px}
  .rc-thumb img{width:240px;height:240px;margin:-120px 0 0 -120px}
}

  /* ============================================
     🔴 Element Plus 冷青蓝主题全局覆盖（追加在文件末尾）
     ============================================ */
  /* 主色按钮覆盖 */
  .el-button--primary {
    --el-button-bg-color: #5b8def !important;
    --el-button-border-color: #5b8def !important;
    --el-button-hover-bg-color: #7aa4f7 !important;
    --el-button-hover-border-color: #7aa4f7 !important;
    --el-button-active-bg-color: #4a7cd8 !important;
  }
  .el-button--primary.is-plain {
    --el-button-bg-color: transparent !important;
    --el-button-border-color: #5b8def !important;
    --el-button-text-color: #5b8def !important;
  }
  .el-button--success { --el-button-bg-color: #4ade80 !important; --el-button-border-color: #4ade80 !important; }
  .el-button--danger  { --el-button-bg-color: #f87171 !important; --el-button-border-color: #f87171 !important; }
  .el-button--warning { --el-button-bg-color: #fbbf24 !important; --el-button-border-color: #fbbf24 !important; }

  /* Tag / Badge */
  .el-tag.el-tag--primary {
    --el-tag-bg-color: rgba(91,141,239,.18) !important;
    --el-tag-border-color: rgba(91,141,239,.4) !important;
    --el-tag-text-color: #5b8def !important;
  }

  /* Radio Button 选中态 */
  .el-radio-button__inner.is-active {
    background: #5b8def !important;
    border-color: #5b8def !important;
    color: #fff !important;
  }

  /* Slider */
  .el-slider__runway.is-active { background: #5b8def !important; }
  .el-slider__button { border-color: #5b8def !important; }

  /* Switch */
  .el-switch.is-checked .el-switch__core {
    background-color: #5b8def !important;
    border-color: #5b8def !important;
  }

  /* Dialog */
  .el-dialog {
    background: var(--card) !important;
    border-radius: 14px !important;
    overflow: hidden;
  }
  .el-dialog__header {
    background: var(--card) !important;
    border-bottom: 1px solid var(--border);
    padding-bottom: 12px !important;
  }

  /* Input 框 */
  .el-input__wrapper {
    background: var(--nest) !important;
    box-shadow: 0 0 0 1px var(--border) inset !important;
    border-radius: 8px !important;
  }
  .el-input__wrapper.is-focus {
    box-shadow: 0 0 0 1px #5b8def inset, 0 0 0 3px rgba(91,141,239,.15) !important;
  }

  /* Select */
  .el-select .el-input__wrapper { background: var(--nest) !important; }

  /* Tabs */
  .el-tabs__item.is-active { color: #5b8def !important; }
  .el-tabs__active-bar { background: #5b8def !important; }
  .el-tabs__nav-wrap::after { background: var(--border) !important; }

  /* Table（桌面端） */
  .el-table {
    --el-table-bg-color: transparent !important;
    --el-table-tr-bg-color: transparent !important;
    --el-table-header-bg-color: var(--nest) !important;
    --el-table-border-color: var(--border) !important;
    border-radius: 10px !important;
    overflow: hidden;
  }
  .el-table th.el-table__cell {
    background: var(--nest) !important;
    color: var(--muted) !important;
    font-weight: 500;
    font-size: 12px;
  }
  .el-table td.el-table__cell {
    border-bottom: 1px solid rgba(30,34,48,.4) !important;
  }

  /* Message Box */
  .el-message-box {
    background: var(--card) !important;
    border-radius: 14px !important;
  }

  /* ============ 侧边栏冷青蓝主题 ============ */
  .side-nav-v2, .side-nav {
    background: #0a0d13 !important;
    border: 1px solid var(--border) !important;
  }
  .nav-item-v2.active, .nav-item.active {
    background: linear-gradient(90deg, rgba(91,141,239,.22), rgba(91,141,239,.04)) !important;
    border-color: rgba(91,141,239,.35) !important;
    box-shadow: inset 3px 0 0 #5b8def !important;
    color: #fff !important;
  }
  .nav-item-v2:hover, .nav-item:hover {
    background: rgba(91,141,239,.06) !important;
    color: var(--text) !important;
  }

  /* ============ 卡片圆角和间距统一 ============ */
  .card, .monitor-card, .check-item, .role-row, .voice-card {
    border-radius: 14px !important;
  }
  .app { padding: 18px !important; max-width: 1560px !important; }
  .card, .monitor-card { padding: 18px !important; }

  /* ============ 布局响应式 grid 类 ============ */
  .speaker-role-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
  }
  .form-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }
  .check-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
  }
  .event-switches {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
  }
  .event-cooldowns {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 10px;
  }
  /* 手机端：窗口 ≤ 768px 时自动切换 */
  @media (max-width: 768px) {
    .speaker-role-grid { grid-template-columns: 1fr; gap: 8px; }
    .form-grid-2 { grid-template-columns: 1fr; gap: 8px; }
    .check-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .event-switches, .event-cooldowns { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  }

  /* ============ 手机端底部 Tab Bar（App 专属） ============ */
  .phone-tab-bar {
    display: none;
    position: fixed;
    bottom: 0; left: 0; right: 0;
    height: 58px;
    background: #05070c;
    border-top: 1px solid var(--border);
    padding-bottom: env(safe-area-inset-bottom);
    z-index: 999;
  }
  .phone-tab-bar .phone-tab {
    flex: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    color: var(--muted); text-decoration: none;
    padding: 6px 0; font-size: 10px;
    position: relative; cursor: pointer;
    transition: color .15s; border: none; background: none;
  }
  .phone-tab-bar .phone-tab .phone-tab-ico { font-size: 20px; line-height: 1; margin-bottom: 2px; }
  .phone-tab-bar .phone-tab.active { color: #5b8def; }
  .phone-tab-bar .phone-tab.active .phone-tab-indicator {
    position: absolute; top: 4px; left: 50%; transform: translateX(-50%);
    width: 22px; height: 3px; border-radius: 2px; background: #5b8def;
  }
  /* LIVE 小红点（开播时监控 Tab 显示） */
  .phone-tab-live-dot {
    position: absolute; top: 6px; right: calc(50% - 22px);
    width: 8px; height: 8px; border-radius: 50%;
    background: #f56c6c; box-shadow: 0 0 0 2px #05070c;
    animation: live-pulse 1.2s ease-in-out infinite;
  }
  @keyframes live-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: .6; transform: scale(1.25); }
  }
  /* App 里才显示底部 Tab Bar（通过 body.in-app 控制） */
  body.in-app .phone-tab-bar { display: flex; }
  body.in-app .root-layout { padding-bottom: 72px; }
  body.in-app .side-nav-v2, body.in-app .side-nav { display: none; }

  /* ============ 链接/次级按钮主色统一 ============ */
  a, .text-link { color: #5b8def !important; }
  a:hover { color: #7aa4f7 !important; }

  /* ==========================================================
     🔴🔴🔴 手机端全屏自适应 — 放在文件最末尾！覆盖所有之前规则！
     ========================================================== */
  @media (max-width: 768px) {
    .app { max-width: 100vw !important; padding: 0 !important; margin: 0 !important; }
    body { padding: 0 !important; margin: 0 !important; }
    html { padding: 0 !important; margin: 0 !important; }
  }

/* ===== 手机端 Element Plus 组件缩小（覆盖默认 size=default 的过大尺寸）===== */
@media (max-width: 768px) {
  /* 🎯 input 输入框：高度从 36px → 32px */
  .el-input .el-input__wrapper {
    min-height: 32px !important;
    padding: 2px 8px !important;
  }
  .el-input .el-input__inner {
    font-size: 13px !important;
    height: 28px !important;
    line-height: 28px !important;
  }
  .el-input .el-input__prefix,
  .el-input .el-input__suffix {
    font-size: 13px !important;
  }

  /* 🎯 input-number 数字输入框（就是截图里那个秒数输入框）：高度 + 按钮缩小 */
  .el-input-number {
    --el-input-number-height: 32px !important;
    width: 120px !important;
  }
  .el-input-number .el-input__wrapper {
    min-height: 32px !important;
  }
  .el-input-number__decrease,
  .el-input-number__increase {
    width: 28px !important;
    font-size: 13px !important;
  }
  .el-input-number .el-input__inner {
    height: 28px !important;
    line-height: 28px !important;
    font-size: 13px !important;
  }

  /* 🎯 select 下拉框：同 input */
  .el-select .el-input__wrapper {
    min-height: 32px !important;
    padding: 2px 8px !important;
  }
  .el-select .el-input__inner {
    font-size: 13px !important;
    height: 28px !important;
    line-height: 28px !important;
  }

  /* 🎯 button 按钮：高度从 32px → 28px，字体从 14px → 12px */
  .el-button {
    padding: 6px 12px !important;
    font-size: 12px !important;
    height: auto !important;
    line-height: 1.3 !important;
    border-radius: 6px !important;
  }
  .el-button .el-icon { font-size: 14px !important; }

  /* 🎯 radio-button 模式按钮（带货/团购/闲聊切换那种）：更小更紧凑 */
  .el-radio-button__inner {
    padding: 5px 10px !important;
    font-size: 12px !important;
    line-height: 1.3 !important;
    border-radius: 6px !important;
  }

  /* 🎯 switch 开关：尺寸不变但间距调小 */
  .el-switch { --el-switch-on-color: #5b8def; }

  /* 🎯 slider 滑块（音量渐变那种）：高度不变但 label 字号小 */
  .el-slider__button { width: 14px !important; height: 14px !important; }
  .el-slider__runway { height: 4px !important; }

  /* 🎯 dialog 弹窗（克隆音色那个）：宽度 100% + 内边距缩小 */
  .el-dialog {
    width: 94vw !important;
    margin: 4vh auto !important;
  }
  .el-dialog__body {
    padding: 12px 16px !important;
  }
  .el-dialog__header {
    padding: 12px 16px 8px !important;
  }
  .el-dialog__footer {
    padding: 8px 16px 12px !important;
  }

  /* 🎯 form-label 字号缩小 */
  .el-form-item__label {
    font-size: 12px !important;
    padding-bottom: 2px !important;
  }

  /* 🎯 message 提示字号 */
  .el-message { font-size: 12px !important; padding: 8px 12px !important; }

  /* ============== 🔴 场控定时短句 + AI话术泛化 — L513/L531 grid 手机改成竖排 ============== */
  /* 通用：所有带 class="flex-break-cells" 的 grid 容器 — 手机强制单列 */
  .flex-break-cells {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }
  /* .rule-row label（开关 + 文字）— 手机上 flex 横排，不换行 */
  .rule-row,
  label.rule-row {
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
    white-space: nowrap !important;
  }
  /* 场控定时短句里的 input-number 行（间隔 30~90 秒那个 flex）*/
  .assist-interval-row {
    width: 100% !important;
    flex-wrap: nowrap !important;
    display: flex !important;
    align-items: center !important;
    gap: 6px !important;
  }
  .assist-interval-row > .el-input-number {
    width: 70px !important;
    flex-shrink: 0 !important;
  }

  /* ============== 🔴 关键词问答 — L589 5列grid手机改成2行 ============== */
  /* 桌面: [keyword 160px] [answer] [switch] [input-num] [🗑] 一行 */
  /* 手机: 第一行 [keyword] [answer]，第二行 [switch] [priority数字框] [🗑] */
  .keyword-qa-row {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 6px !important;
    margin-bottom: 12px !important;
  }
  /* 开关 + 数字框 + 删除 放一行，横向紧凑 */
  .keyword-qa-row > .el-switch,
  .keyword-qa-row > .el-input-number,
  .keyword-qa-row > .el-button.el-button--text {
    display: inline-flex !important;
    vertical-align: middle !important;
    margin: 2px 8px 0 0 !important;
  }

  /* ============== 🔴 AI 话术泛化 + 定时开关播 里的 time-picker 缩小 ============== */
  .el-time-picker { width: 110px !important; }

  /* ============== 🔴 克隆音色弹窗 — 角色/音源按钮横排整齐 ============== */
  /* 克隆弹窗里的 radio 按钮组 */
  .el-dialog .el-radio-group {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
    align-items: center !important;
  }

  /* ============== 🔴 音色管理工具栏 — 3 按钮一排 + 其余内容下一行 ============== */
  /* 桌面: buttons + info + spacer + filters 一行
     手机: [3 buttons 一排] [info + filters 一排] — 清晰两排 */
  .voice-toolbar {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
    align-items: center !important;
    margin-bottom: 10px !important;
  }
  .voice-toolbar > .el-button {
    flex: 1 1 0 !important; /* 三个按钮均分宽度 */
    min-width: 0 !important;
    max-width: none !important;
    padding: 6px 6px !important;
    font-size: 11px !important;
    line-height: 1.3 !important;
    white-space: nowrap !important;
  }
  .voice-toolbar > .el-button .el-icon { font-size: 13px !important; }
  /* info span + 中间 spacer + filter radio-group — 强制放第二行 */
  .voice-toolbar > .muted,
  .voice-toolbar > div[style*="flex:1"],
  .voice-toolbar > .el-radio-group {
    flex-basis: 100% !important;
    width: 100% !important;
    margin-top: 4px !important;
  }
  .voice-toolbar > .muted { font-size: 11px !important; text-align: left !important; }
  .voice-toolbar > div[style*="flex:1"] { display: none !important; } /* 中间空 spacer 手机隐藏 */
  .voice-toolbar > .el-radio-group { display: flex !important; justify-content: flex-end !important; }

  /* ============== 🔴 关键词问答 — 每一行清晰 2 排 ============== */
  /* 桌面: grid 160px 1fr auto auto auto — 全部一行
     手机: 排1 keyword + switch + num + 🗑
          排2 answer textarea（满宽）*/
  .keyword-qa-row {
    display: grid !important;
    grid-template-columns: 1fr auto auto auto !important; /* 4 列: keyword flex-1 + 3 个紧凑 */
    grid-template-rows: auto auto !important; /* 2 排 */
    gap: 4px 6px !important;
    margin-bottom: 10px !important;
    align-items: center !important;
  }
  /* DOM 顺序: [0]keyword [1]answer [2]switch [3]input-num [4]🗑 */
  /* keyword input (el-input, 不是 textarea) → 排1 列1 */
  .keyword-qa-row > .el-input:nth-child(1) {
    grid-column: 1; grid-row: 1;
  }
  /* answer textarea (Element Plus 渲染成 .el-textarea) → 排2 跨满 */
  .keyword-qa-row > .el-textarea {
    grid-column: 1 / -1 !important;
    grid-row: 2 !important;
    margin-top: 2px !important;
  }
  /* switch → 排1 列2 */
  .keyword-qa-row > .el-switch {
    grid-column: 2; grid-row: 1;
    justify-self: center !important;
  }
  /* priority input-number → 排1 列3 */
  .keyword-qa-row > .el-input-number {
    grid-column: 3; grid-row: 1;
    width: 48px !important;
  }
  /* 🗑 delete → 排1 列4 */
  .keyword-qa-row > .el-button {
    grid-column: 4; grid-row: 1;
    padding: 0 6px !important;
    font-size: 14px !important;
  }

  /* ============== 🔴 三路角色开关 — 手机改成竖排 ============== */
  .three-switches-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }
  .three-switches-grid > label.rule-row {
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    white-space: nowrap !important;
    font-size: 13px !important;
    padding: 4px 0 !important;
  }
}

