/* ============================================================
   AI直伴 · 视觉系统 v2（双主题 / 手机端适配 / 全动效）
   主题由 <html data-theme="light|dark"> 控制
   ============================================================ */

/* ---------- 1. 设计令牌 ---------- */
:root,
html[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f6fa;
  --bg-2: #eef3f8;
  --mesh-1: #d9f2ee;
  --mesh-2: #e6ecff;
  --surface: #ffffff;
  --surface-2: #f7fafc;
  --surface-3: #eff4f8;
  --glass: rgba(255, 255, 255, .74);
  --glass-strong: rgba(255, 255, 255, .92);

  --ink: #0d2130;
  --ink-2: #234254;
  --muted: #5f7a8b;
  --muted-2: #8ca1ae;

  /* 品牌 */
  --brand-1: #0c2b3f;
  --brand-2: #0d5a58;
  --brand-3: #0aa596;
  --teal: #0b9e8f;
  --teal-d: #078375;
  --teal-dd: #05665c;
  --teal-l: #e6f7f4;
  --teal-ll: #f2fbf9;
  --teal-glow: rgba(11, 158, 143, .22);

  --rose: #e8546a;
  --rose-l: #fff0f2;
  --amber: #e79a2c;
  --amber-l: #fff6e8;
  --blue: #3f6fe8;
  --blue-l: #edf2ff;
  --violet: #7c5ce0;
  --violet-l: #f3efff;

  --line: #e2eaf0;
  --line-2: #edf2f6;
  --line-strong: #cfdde7;

  --radius: 20px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --radius-xs: 9px;

  --shadow-xs: 0 1px 2px rgba(13, 33, 48, .05);
  --shadow: 0 1px 2px rgba(13, 33, 48, .04), 0 10px 28px -12px rgba(13, 33, 48, .16);
  --shadow-lg: 0 2px 6px rgba(13, 33, 48, .05), 0 24px 60px -20px rgba(13, 33, 48, .28);
  --shadow-brand: 0 14px 36px -14px rgba(11, 158, 143, .45);

  --side: 244px;
  --top: 66px;
  --tabbar: 68px;

  --ease: cubic-bezier(.22, .68, .35, 1);
  --ease-spring: cubic-bezier(.18, 1.16, .36, 1);
  --t-fast: .16s;
  --t: .26s;

  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Segoe UI", sans-serif;
  --mono: "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #06111a;
  --bg-2: #040c12;
  --mesh-1: #0d3f41;
  --mesh-2: #17233f;
  --surface: #0f202e;
  --surface-2: #142838;
  --surface-3: #1a3346;
  --glass: rgba(14, 30, 43, .72);
  --glass-strong: rgba(11, 24, 35, .94);

  --ink: #e9f5f9;
  --ink-2: #b9d2dd;
  --muted: #8aa6b6;
  --muted-2: #6d8695;

  --brand-1: #04101a;
  --brand-2: #073c3f;
  --brand-3: #2ee6d6;
  --teal: #23c9bb;
  --teal-d: #16a89c;
  --teal-dd: #7ff0e4;
  --teal-l: rgba(35, 201, 187, .14);
  --teal-ll: rgba(35, 201, 187, .07);
  --teal-glow: rgba(46, 230, 214, .3);

  --rose: #ff7d90;
  --rose-l: rgba(255, 125, 144, .13);
  --amber: #ffbf5e;
  --amber-l: rgba(255, 191, 94, .13);
  --blue: #82a6ff;
  --blue-l: rgba(130, 166, 255, .13);
  --violet: #b49cff;
  --violet-l: rgba(180, 156, 255, .13);

  --line: rgba(255, 255, 255, .08);
  --line-2: rgba(255, 255, 255, .05);
  --line-strong: rgba(255, 255, 255, .16);

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 18px 40px -18px rgba(0, 0, 0, .7);
  --shadow-lg: 0 2px 10px rgba(0, 0, 0, .4), 0 40px 80px -28px rgba(0, 0, 0, .85);
  --shadow-brand: 0 16px 40px -16px rgba(46, 230, 214, .4);
}

/* ---------- 2. 基础 ---------- */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; min-height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.62 var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  transition: background-color var(--t) var(--ease), color var(--t) var(--ease);
  overflow-x: hidden;
}
body::before {
  content: "";
  position: fixed;
  inset: -10% -10% auto -10%;
  height: 62vh;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(46% 52% at 12% 0%, var(--mesh-1) 0, transparent 62%),
    radial-gradient(50% 60% at 92% 6%, var(--mesh-2) 0, transparent 64%);
  opacity: .9;
  transition: opacity var(--t) var(--ease);
}
html[data-theme="dark"] body::before { opacity: .55; }
a { color: var(--teal); text-decoration: none; }
button, input, textarea, select { font-family: inherit; color: inherit; }
img { max-width: 100%; }
::selection { background: var(--teal-glow); }
[hidden] { display: none !important; }

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
  border-radius: 6px;
}
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-strong); border-radius: 999px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- 3. 启动页 ---------- */
.boot {
  position: fixed; inset: 0; z-index: 90;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(80% 60% at 50% 0%, #123c47 0, transparent 60%), linear-gradient(160deg, #03101a, #0a2431 60%, #073c3f);
  transition: opacity .5s var(--ease), visibility .5s;
}
.boot-glow {
  position: absolute; width: 46vmax; height: 46vmax; border-radius: 50%;
  background: conic-gradient(from 0deg, #2ee6d655, #0b9e8f11, #8b7bff33, #2ee6d655);
  filter: blur(60px); opacity: .7; animation: spin 18s linear infinite;
}
.boot-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; color: #cfe6ee; text-align: center; }
.boot-logo { position: relative; width: 92px; height: 92px; display: grid; place-items: center; }
.boot-logo img { border-radius: 24px; box-shadow: 0 18px 50px #00000055; animation: floaty 3.4s ease-in-out infinite; }
.boot-ring { position: absolute; inset: -12px; border-radius: 50%; border: 2px solid #2ee6d655; animation: ringPulse 2.2s var(--ease) infinite; }
.boot-card b { font-size: 25px; letter-spacing: 2px; background: linear-gradient(92deg, #fff, #2ee6d6 60%, #9be9ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.boot-sub { font-size: 12px; letter-spacing: 3px; color: #8fb6c4; text-transform: uppercase; }
.boot-bar { width: 180px; height: 3px; border-radius: 4px; background: #ffffff1f; overflow: hidden; margin-top: 8px; }
.boot-bar i { display: block; height: 100%; width: 38%; border-radius: 4px; background: linear-gradient(90deg, #2ee6d6, #9be9ff); animation: bootbar 1.15s ease-in-out infinite; }

/* ---------- 4. 登录 ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.04fr .96fr; position: relative; z-index: 1; }
.login-left {
  position: relative; padding: 56px clamp(28px, 5vw, 72px); color: #e9f7fa;
  display: flex; flex-direction: column; justify-content: center; gap: 10px; overflow: hidden;
  background:
    radial-gradient(60% 70% at 8% 4%, #1a5a63 0, transparent 62%),
    radial-gradient(52% 64% at 100% 100%, #0b9e8f33 0, transparent 66%),
    linear-gradient(158deg, #071c29, #0a2f3d 58%, #073f40);
}
.login-left::after {
  content: ""; position: absolute; right: -10%; bottom: -30%; width: 52vh; height: 52vh; border-radius: 50%;
  background: radial-gradient(circle, #2ee6d633 0, transparent 68%); filter: blur(10px);
}
.login-left .lh-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 34px; font-weight: 600; letter-spacing: 1px; color: #dff4f7; }
.login-left .lh-brand img { width: 34px; height: 34px; border-radius: 10px; }
.login-left h1 { font-size: clamp(30px, 3.4vw, 46px); line-height: 1.22; margin: 0 0 16px; letter-spacing: -1px; font-weight: 700; }
.login-left h1 em { font-style: normal; background: linear-gradient(96deg, #2ee6d6, #9be9ff 55%, #c9b8ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login-left > p { color: #a8c8d4; max-width: 480px; margin: 0 0 30px; font-size: 15px; line-height: 1.8; }
.login-points { display: flex; gap: 10px; flex-wrap: wrap; }
.login-points span {
  border: 1px solid #ffffff26; background: #ffffff0f; color: #d3ecf2; border-radius: 999px;
  padding: 7px 15px; font-size: 13px; backdrop-filter: blur(8px);
  transition: transform var(--t-fast) var(--ease), background var(--t-fast), border-color var(--t-fast);
}
.login-points span:hover { transform: translateY(-2px); background: #ffffff1c; border-color: #ffffff3d; }
.login-metrics { display: flex; gap: 28px; margin-top: 40px; }
.login-metrics div b { display: block; font-size: 26px; font-weight: 700; letter-spacing: .5px; color: #eafcff; }
.login-metrics div span { font-size: 12px; color: #88adba; }

.login-right { background: var(--surface); padding: 40px clamp(24px, 4vw, 64px); display: flex; align-items: center; justify-content: center; position: relative; }
.login-right::before {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(70% 50% at 100% 0%, var(--teal-ll) 0, transparent 70%);
  pointer-events: none;
}
.login-card { position: relative; width: 100%; max-width: 392px; }
.login-card h2 { font-size: 26px; margin: 0 0 8px; letter-spacing: -.5px; }
.login-card .sub { color: var(--muted); font-size: 13px; margin-bottom: 26px; line-height: 1.7; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12.5px; color: var(--ink-2); margin-bottom: 7px; font-weight: 500; letter-spacing: .2px; }
.field input, .field textarea, .field select {
  width: 100%; border: 1px solid var(--line); border-radius: var(--radius-xs); padding: 0 14px;
  font: inherit; font-size: 14.5px; background: var(--surface-2); color: var(--ink);
  outline: none; transition: border-color var(--t-fast), box-shadow var(--t-fast), background var(--t-fast);
}
.field input, .field select { height: 48px; }
.field textarea { padding: 11px 14px; min-height: 96px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: var(--teal); background: var(--surface);
  box-shadow: 0 0 0 4px var(--teal-l);
}
.field input::placeholder, .field textarea::placeholder { color: var(--muted-2); }
.code-row { display: flex; gap: 9px; }
.code-row input { flex: 1; letter-spacing: 2px; }
.login-actions { display: flex; gap: 10px; margin-top: 22px; }
.login-actions .btn { flex: 1; }
.wechat { display: flex; align-items: center; gap: 14px; margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--line-2); }
.qr {
  width: 76px; height: 76px; border-radius: 12px; flex: none;
  background:
    repeating-linear-gradient(0deg, var(--ink) 0 5px, transparent 5px 10px),
    repeating-linear-gradient(90deg, var(--ink) 0 5px, transparent 5px 10px),
    var(--surface-3);
  background-blend-mode: multiply; opacity: .85;
}
html[data-theme="dark"] .qr { background-blend-mode: screen; opacity: .55; }
.wechat b { font-size: 14px; }
.legal { margin-top: 18px; font-size: 12px; color: var(--muted); }
.legal a { margin-right: 8px; color: var(--teal); }
.legal a:hover { text-decoration: underline; }

/* ---------- 5. 按钮 / 标签 / 控件 ---------- */
.btn {
  position: relative; overflow: hidden;
  height: 42px; padding: 0 18px; border-radius: var(--radius-xs);
  border: 1px solid transparent; background: var(--surface); color: var(--ink-2);
  font-size: 14px; font-weight: 500; cursor: pointer; user-select: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; white-space: nowrap;
  transition: transform var(--t-fast) var(--ease), background var(--t-fast), border-color var(--t-fast), color var(--t-fast), box-shadow var(--t-fast), filter var(--t-fast);
  -webkit-tap-highlight-color: transparent;
}
.btn:hover:not([disabled]) { transform: translateY(-1px); }
.btn:active:not([disabled]) { transform: scale(.97); }
.btn.primary {
  background: linear-gradient(135deg, var(--teal), #12b7a6 55%, #0d8f9b);
  color: #fff; border-color: transparent; box-shadow: var(--shadow-brand);
}
html[data-theme="dark"] .btn.primary {
  background: linear-gradient(135deg, #23c9bb, #2ee6d6 60%, #0f8f92);
  color: #04262a; font-weight: 600;
}
.btn.primary:hover:not([disabled]) { filter: brightness(1.04); box-shadow: 0 18px 42px -14px var(--teal-glow); }
.btn.ghost { background: var(--surface-2); border-color: var(--line); color: var(--ink-2); }
.btn.ghost:hover:not([disabled]) { border-color: var(--teal); color: var(--teal); background: var(--teal-ll); }
.btn.danger { background: var(--rose-l); color: var(--rose); border-color: transparent; }
.btn.danger:hover:not([disabled]) { filter: brightness(.97); }
.btn.dim { opacity: .78; }
.btn.sm { height: 34px; padding: 0 13px; font-size: 13px; border-radius: 10px; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; transform: none !important; box-shadow: none; }
.btn .ripple {
  position: absolute; border-radius: 50%; transform: scale(0); pointer-events: none;
  background: currentColor; opacity: .22; animation: ripple .55s var(--ease) forwards;
}
.icon-btn {
  width: 34px; height: 34px; border-radius: 10px; border: 1px solid transparent;
  background: var(--surface-3); color: var(--muted); cursor: pointer; font-size: 18px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background var(--t-fast), color var(--t-fast), transform var(--t-fast) var(--ease);
}
.icon-btn:hover { background: var(--teal-l); color: var(--teal); }
.icon-btn:active { transform: scale(.92); }

.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; border-radius: 999px;
  background: var(--surface-2); border: 1px solid var(--line); font-size: 13px; color: var(--ink-2); cursor: pointer;
  transition: all var(--t-fast) var(--ease);
}
.chip:hover { border-color: var(--teal); color: var(--teal); transform: translateY(-1px); }
.chip.on { background: var(--teal-l); border-color: var(--teal); color: var(--teal-dd); font-weight: 500; }
.chip:active { transform: scale(.96); }

.tag {
  display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 3px 9px;
  border-radius: 7px; background: var(--teal-l); color: var(--teal-dd); font-weight: 500; letter-spacing: .2px;
}
.tag.gray { background: var(--surface-3); color: var(--muted); }
.tag.rose { background: var(--rose-l); color: var(--rose); }
.tag.blue { background: var(--blue-l); color: var(--blue); }
.tag.amber { background: var(--amber-l); color: var(--amber); }
.tag.violet { background: var(--violet-l); color: var(--violet); }

.status-pill {
  font-size: 12px; padding: 5px 11px; border-radius: 999px;
  background: var(--surface-3); color: var(--ink-2);
  display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line);
  white-space: nowrap;
}
.status-pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); display: inline-block; animation: pulseDot 2s var(--ease) infinite; }
.status-pill.warn i { background: var(--amber); }
.status-pill.off i { background: var(--muted-2); animation: none; }

/* 骨架屏 */
.skeleton {
  border-radius: 10px;
  background: linear-gradient(100deg, var(--surface-3) 20%, var(--line-2) 40%, var(--surface-3) 60%);
  background-size: 220% 100%;
  animation: shimmer 1.4s linear infinite;
}
.sk-line { height: 14px; margin-bottom: 10px; }
.sk-line.w60 { width: 60%; }

/* ---------- 6. 外壳（桌面） ---------- */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: 100vh; position: relative; z-index: 1; }
.side {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 4px;
  padding: 18px 12px 14px;
  background: linear-gradient(178deg, var(--brand-1), var(--brand-2) 120%);
  color: #cfe0e8;
  box-shadow: inset -1px 0 0 rgba(255, 255, 255, .06), 8px 0 40px -30px rgba(0, 0, 0, .8);
  overflow: hidden;
}
html[data-theme="dark"] .card { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .045), var(--shadow); }
html[data-theme="dark"] .side { background: linear-gradient(178deg, #04101b, #062630 120%); }
html[data-theme="dark"] .quick { background: var(--surface-2); }
html[data-theme="dark"] .stat { background: var(--surface-2); }
.side::before {
  content: ""; position: absolute; width: 220px; height: 220px; border-radius: 50%;
  left: -70px; top: -60px; background: radial-gradient(circle, #2ee6d640 0, transparent 70%); filter: blur(6px);
  pointer-events: none;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 22px; position: relative; }
.brand img { width: 34px; height: 34px; border-radius: 10px; box-shadow: 0 8px 20px #00000040; }
.brand b { font-size: 22px; letter-spacing: 1px; background: linear-gradient(92deg, #fff, #2ee6d6 70%); -webkit-background-clip: text; background-clip: text; color: transparent; }

.nav-item {
  position: relative; display: flex; align-items: center; gap: 11px; height: 44px; padding: 0 13px;
  border-radius: 12px; color: #b3c9d5; cursor: pointer; font-size: 14px;
  transition: background var(--t-fast) var(--ease), color var(--t-fast), transform var(--t-fast) var(--ease);
}
.ico-svg { width: 18px; height: 18px; display: block; flex: none; }
.nav-item > .ni { width: 20px; height: 20px; display: grid; place-items: center; opacity: .74; color: inherit; }
.nav-item:hover > .ni { opacity: 1; }
.nav-item.active > .ni { opacity: 1; color: #2ee6d6; }
.nav-item .ni svg { width: 19px; height: 19px; }
.nav-item > span:nth-child(2) { min-width: 0; }

.nav-item:hover { background: #ffffff12; color: #fff; transform: translateX(2px); }
.nav-item.active {
  background: linear-gradient(92deg, #1bb4a038, #ffffff0a);
  color: #fff;
  box-shadow: inset 0 0 0 1px #2ee6d63d;
}
.nav-item.active > span:first-child { opacity: 1; color: #2ee6d6; }
.nav-item .dot { width: 5px; height: 5px; border-radius: 50%; background: #2ee6d6; opacity: 0; margin-left: auto; transition: opacity var(--t-fast); box-shadow: 0 0 10px #2ee6d6; }
.nav-item.active .dot { opacity: 1; }
.nav-item .hot { margin-left: auto; font-size: 10.5px; padding: 2px 7px; border-radius: 6px; background: #ef65763d; color: #ffd0d6; letter-spacing: .3px; }
.side-foot { margin-top: auto; font-size: 11.5px; color: #6f8c9c; padding: 12px; line-height: 1.7; border-top: 1px solid #ffffff14; }
.side-foot a { color: #9fc4d2; }
.side-foot a:hover { color: #2ee6d6; }
.side-footer-row { display: flex; align-items: center; gap: 8px; margin-top: 8px; }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  height: var(--top); display: flex; align-items: center; gap: 14px; padding: 0 26px;
  color: var(--ink);
  background: var(--glass);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid var(--line);
}
.topbar h1 { font-size: 17.5px; margin: 0; font-weight: 650; letter-spacing: -.2px; }
.topbar .sub { font-size: 12.5px; color: var(--muted); margin-left: 2px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 9px; }
.acc-switch {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px 0 6px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px;
  cursor: pointer; color: var(--ink); font-size: 13px; font-weight: 500;
  transition: all var(--t-fast) var(--ease);
}
.acc-switch:hover { border-color: var(--teal); color: var(--teal); box-shadow: var(--shadow-xs); }
.acc-switch .mini-avatar {
  width: 24px; height: 24px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 12px; font-weight: 600; background: linear-gradient(140deg, #0b9e8f, #0d5a58); flex: none;
}
.acc-switch .caret { font-size: 10px; opacity: .6; }

.theme-toggle {
  position: relative; width: 62px; height: 34px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--surface-2); cursor: pointer; padding: 0; overflow: hidden; flex: none;
  transition: background var(--t), border-color var(--t);
}
.theme-toggle .knob {
  position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(140deg, #ffd77a, #ffb75e);
  box-shadow: 0 3px 10px #0000002e;
  transition: transform .34s var(--ease-spring), background var(--t);
  display: grid; place-items: center; font-size: 13px;
}
html[data-theme="dark"] .theme-toggle .knob { transform: translateX(28px); background: linear-gradient(140deg, #2ee6d6, #0aa596); }
.theme-toggle .ico { font-size: 11px; opacity: .55; position: absolute; top: 50%; transform: translateY(-50%); }
.theme-toggle .ico.l { left: 9px; }
.theme-toggle .ico.d { right: 9px; }
html[data-theme="dark"] .theme-toggle .ico.l { opacity: .25; }
html[data-theme="light"] .theme-toggle .ico.d { opacity: .25; }

.content { padding: 24px 26px 100px; min-width: 0; }
.content > * { max-width: 1320px; margin-left: auto; margin-right: auto; }
.grid { display: grid; gap: 16px; }
.card {
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line);
  padding: 22px; position: relative;
  transition: box-shadow var(--t) var(--ease), transform var(--t) var(--ease), border-color var(--t);
  animation: fadeUp .5s var(--ease) both;
}
.card:hover { box-shadow: var(--shadow-lg); }
.card.tight { padding: 17px; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-head h3 { margin: 0; font-size: 16px; font-weight: 650; letter-spacing: -.2px; }
.card-head .tag { margin-left: auto; }

.muted { color: var(--muted); }
.small { font-size: 12px; }
.hint { color: var(--muted); font-size: 13px; line-height: 1.7; }
.divider { height: 1px; background: var(--line-2); margin: 15px 0; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.spacer { margin-left: auto; }
.progress { height: 8px; border-radius: 6px; background: var(--surface-3); overflow: hidden; margin: 9px 0; }
.progress i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--teal), #2ee6d6); transition: width .6s var(--ease); }

/* ---------- 7. 手机端外壳 ---------- */
.appbar { display: none; }
.tabbar { display: none; }
.more-sheet { display: none; }

/* ---------- 8. 首页 ---------- */
.home-hero { display: grid; grid-template-columns: minmax(0, 1.36fr) minmax(0, 1fr); gap: 16px; }
.hero-card {
  position: relative; overflow: hidden; padding: 26px; border-radius: 24px; color: #eaf8fb;
  background:
    radial-gradient(70% 90% at 96% 0%, #2ee6d62e 0, transparent 60%),
    radial-gradient(60% 80% at 0% 100%, #8b7bff1f 0, transparent 60%),
    linear-gradient(150deg, #082334, #0b3c46 60%, #085a55);
  box-shadow: 0 22px 60px -26px #07242faa;
  animation: fadeUp .55s var(--ease) both;
}
html[data-theme="dark"] .hero-card { background: radial-gradient(70% 90% at 96% 0%, #2ee6d62e 0, transparent 60%), linear-gradient(150deg, #04141f, #07303a 60%, #064a47); }
.hero-card::before {
  content: ""; position: absolute; right: -80px; top: -90px; width: 260px; height: 260px; border-radius: 50%;
  background: conic-gradient(from 210deg, #2ee6d644, #8b7bff22, #2ee6d644); filter: blur(22px); opacity: .8;
  animation: spin 22s linear infinite;
}
.hero-card .who { display: flex; align-items: center; gap: 13px; margin-bottom: 20px; position: relative; }
.hero-card .avatar {
  width: 52px; height: 52px; border-radius: 16px; flex: none;
  background: linear-gradient(140deg, #0b9e8f, #0d4e55); display: grid; place-items: center;
  font-size: 20px; font-weight: 600; color: #fff; box-shadow: 0 10px 26px #00000038;
  border: 1px solid #ffffff2b;
}
.hero-card h2 { margin: 0; font-size: 22px; letter-spacing: -.4px; }
.hero-card .meta { color: #9dc0cd; font-size: 12.5px; margin-top: 2px; }
.hero-nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px; margin: 20px 0; }
.hero-nums div {
  background: #ffffff12; border: 1px solid #ffffff1f; border-radius: 14px; padding: 12px 14px;
  backdrop-filter: blur(6px);
  transition: background var(--t-fast), transform var(--t-fast) var(--ease);
}
.hero-nums div:hover { background: #ffffff1c; transform: translateY(-2px); }
.hero-nums b { display: block; font-size: 23px; font-weight: 700; letter-spacing: .4px; line-height: 1.25; }
.hero-nums span { font-size: 11.5px; color: #9dc0cd; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; position: relative; }
.hero-actions .btn.primary { background: linear-gradient(135deg, #2ee6d6, #38f0d6 55%, #16c7d4); color: #052e2c; font-weight: 650; box-shadow: 0 14px 34px -12px #2ee6d666; }
.hero-actions .btn.ghost { background: #ffffff14; border-color: #ffffff2e; color: #e2f5f8; }
.hero-actions .btn.ghost:hover { background: #ffffff22; border-color: #ffffff5a; color: #fff; }

.stat-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.stat {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 15px 17px; box-shadow: var(--shadow-xs);
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t);
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.stat b { display: block; font-size: 25px; line-height: 1.2; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.stat span { font-size: 12px; color: var(--muted); }
.quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.quick {
  position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-md); padding: 17px; box-shadow: var(--shadow-xs); cursor: pointer;
  transition: transform var(--t-fast) var(--ease), border-color var(--t-fast), box-shadow var(--t), background var(--t-fast);
}
.quick::after {
  content: ""; position: absolute; inset: auto -20% -60% auto; width: 120px; height: 120px; border-radius: 50%;
  background: radial-gradient(circle, var(--teal-glow) 0, transparent 70%); opacity: 0; transition: opacity var(--t);
}
.quick:hover { transform: translateY(-3px); border-color: var(--teal); box-shadow: var(--shadow); }
.quick:hover::after { opacity: 1; }
.quick:active { transform: scale(.985); }
.quick h4 { margin: 0 0 5px; font-size: 15px; display: flex; align-items: center; gap: 6px; }
.quick p { margin: 0; color: var(--muted); font-size: 12.5px; line-height: 1.65; }
.quick .q-tag { font-size: 10.5px; padding: 1px 7px; border-radius: 6px; background: var(--teal-l); color: var(--teal-dd); margin-left: 4px; font-weight: 500; }

/* ---------- 9. 主播画像 ---------- */
.persona-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 312px; gap: 16px; align-items: start; }
.persona-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.one-line {
  position: relative; overflow: hidden;
  background: linear-gradient(120deg, var(--teal-ll), var(--surface));
  border: 1px solid var(--line); border-radius: var(--radius-md); padding: 19px 22px;
}
.one-line::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: linear-gradient(180deg, var(--teal), #2ee6d6); }
.one-line .lab { font-size: 11.5px; color: var(--teal-dd); letter-spacing: 2px; font-weight: 600; }
.one-line p { margin: 7px 0 0; font-size: 21px; line-height: 1.45; font-weight: 650; letter-spacing: -.3px; }

.sec {
  border-radius: var(--radius-md); border: 1px solid var(--line); background: var(--surface);
  box-shadow: var(--shadow-xs); overflow: hidden; transition: box-shadow var(--t);
}
.sec:hover { box-shadow: var(--shadow); }
.sec-head { display: flex; align-items: center; gap: 10px; padding: 15px 19px; cursor: pointer; background: transparent; transition: background var(--t-fast); }
.sec-head:hover { background: var(--surface-2); }
.sec-head h4 { margin: 0; font-size: 14.5px; font-weight: 600; }
.sec-head .count { font-size: 11.5px; color: var(--muted); padding: 2px 8px; border-radius: 6px; background: var(--surface-3); }
.sec-head .arrow { margin-left: auto; color: var(--muted); transition: transform .3s var(--ease); font-size: 15px; }
.sec.open .sec-head .arrow { transform: rotate(90deg); color: var(--teal); }
.sec-head::after { content: ""; position: absolute; }
.sec-body { padding: 4px 19px 17px; }
.sec:not(.open) .sec-body { display: none; }
.sec.open .sec-body { animation: fadeUp .35s var(--ease) both; }

.item { padding: 13px 0; border-bottom: 1px dashed var(--line-2); }
.item:last-child { border-bottom: 0; }
.item .k { font-size: 11.5px; color: var(--muted); margin-bottom: 4px; display: flex; align-items: center; gap: 8px; }
.item .v { font-size: 14.5px; color: var(--ink); line-height: 1.7; }
.item .srcs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 7px; }
.src {
  font-size: 11px; padding: 2px 8px; border-radius: 6px; border: 1px solid var(--line);
  color: var(--muted); cursor: pointer; background: var(--surface-2);
  transition: all var(--t-fast) var(--ease);
}
.src:hover { border-color: var(--teal); color: var(--teal); transform: translateY(-1px); }
.src.ai { background: var(--blue-l); color: var(--blue); border-color: transparent; }
.src.data { background: var(--teal-l); color: var(--teal-dd); border-color: transparent; }
.src.me { background: var(--amber-l); color: var(--amber); border-color: transparent; }
.item .edit {
  margin-left: auto; font-size: 11.5px; color: var(--muted); cursor: pointer; padding: 2px 9px;
  border-radius: 6px; border: 1px solid var(--line); background: var(--surface-2);
  transition: all var(--t-fast);
}
.item .edit:hover { color: var(--teal); border-color: var(--teal); }
.item .v-edit {
  width: 100%; border: 1px solid var(--teal); border-radius: 10px; padding: 9px 12px; font: inherit;
  font-size: 14px; min-height: 40px; display: none; outline: none; background: var(--surface-2); resize: vertical;
  box-shadow: 0 0 0 4px var(--teal-l);
}
.item.editing .v { display: none; }
.item.editing .v-edit { display: block; }
.item.editing .edit { color: var(--teal); border-color: var(--teal); }

.save-bar {
  position: sticky; bottom: 18px; z-index: 10;
  display: flex; gap: 10px; align-items: center;
  background: var(--glass-strong); backdrop-filter: blur(18px);
  border: 1px solid var(--teal); border-radius: var(--radius-md); padding: 13px 17px;
  box-shadow: 0 18px 44px -18px #0b9e8f66;
  animation: slideUp .3s var(--ease) both;
}
.side-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.mini-list { font-size: 13px; }
.mini-list .li { display: flex; gap: 8px; align-items: center; padding: 8px 0; border-bottom: 1px dashed var(--line-2); }
.mini-list .li:last-child { border: 0; }
.mini-list .li .t { color: var(--muted); font-size: 11.5px; margin-left: auto; white-space: nowrap; }

/* ---------- 10. 播前准备 ---------- */
.prelive-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 384px; gap: 16px; align-items: stretch; height: calc(100vh - 132px); min-height: 540px; }
.chat-box { display: flex; flex-direction: column; height: 100%; min-height: 0; padding: 0; overflow: hidden; }
.chat-box .card-head { padding: 18px 22px; margin: 0; border-bottom: 1px solid var(--line-2); }
.chat-log { flex: 1; overflow: auto; padding: 16px 20px; scroll-behavior: smooth; display: flex; flex-direction: column; }
.chat-fill { flex: 1 1 auto; min-height: 4px; }
.msg {
  max-width: 84%; margin-bottom: 12px; padding: 11px 15px; border-radius: 16px; font-size: 14px; line-height: 1.65;
  animation: fadeUp .32s var(--ease) both;
}
.msg.ai { background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); border-bottom-left-radius: 6px; }
.msg.me {
  margin-left: auto; background: linear-gradient(135deg, var(--teal), #12b7a6);
  color: #fff; border-bottom-right-radius: 6px; box-shadow: 0 10px 26px -12px var(--teal-glow);
}
.chat-input { display: flex; gap: 9px; align-items: flex-end; padding: 13px 18px 0; border-top: 1px solid var(--line-2); }
.chat-input textarea {
  flex: 1; min-height: 46px; max-height: 130px; border: 1px solid var(--line); border-radius: 13px;
  padding: 12px 15px; font: inherit; font-size: 14px; resize: none; outline: none;
  background: var(--surface-2); transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.chat-input textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 4px var(--teal-l); background: var(--surface); }
.hold-btn {
  height: 46px; padding: 0 15px; border-radius: 13px; background: var(--surface-2);
  border: 1px solid var(--line); color: var(--ink-2); cursor: pointer; font-size: 13.5px;
  transition: all var(--t-fast) var(--ease); white-space: nowrap;
}
.hold-btn:hover { border-color: var(--teal); color: var(--teal); }
.hold-btn.on { background: var(--teal-l); border-color: var(--teal); color: var(--teal-dd); transform: scale(.97); }
.chat-box > .row { padding: 12px 18px 16px; margin-top: 0 !important; }
.plan-col { overflow-y: auto; max-height: 100%; padding-right: 3px; display: flex; flex-direction: column; gap: 14px; scroll-behavior: smooth; }
.slot-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.slot {
  position: relative; border: 1px solid var(--line); border-radius: 13px; padding: 12px 13px;
  background: var(--surface-2); cursor: pointer;
  transition: all var(--t-fast) var(--ease);
}
.slot:hover { border-color: var(--teal); transform: translateY(-2px); box-shadow: var(--shadow-xs); }
.slot:active { transform: scale(.98); }
.slot.filled { border-color: var(--teal); background: var(--teal-ll); }
.slot .k { font-size: 11.5px; color: var(--muted); }
.slot .v { font-size: 14px; margin-top: 3px; font-weight: 550; line-height: 1.45; }
.slot .v.empty { color: var(--muted-2); font-weight: 400; font-size: 12.5px; }
.slot .check { position: absolute; right: 10px; top: 9px; color: var(--teal); font-size: 11px; font-weight: 700; }
.plan-block { border: 1px solid var(--line); border-radius: var(--radius-md); padding: 17px; margin-bottom: 12px; background: var(--surface); }
.plan-block h4 { margin: 0 0 11px; font-size: 14.5px; display: flex; gap: 8px; align-items: center; }
.seg { border-left: 2px solid var(--teal); padding: 0 0 0 13px; margin-bottom: 15px; position: relative; }
.seg::before { content: ""; position: absolute; left: -5px; top: 4px; width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 3px var(--teal-l); }
.seg .at { font-size: 11.5px; color: var(--teal-dd); font-weight: 600; letter-spacing: .3px; }
.seg .st { font-weight: 650; margin: 3px 0 5px; font-size: 14.5px; }
.seg ul { margin: 0; padding-left: 17px; color: var(--ink-2); font-size: 13px; line-height: 1.75; }
.script {
  border: 1px dashed var(--line-strong); border-radius: 12px; padding: 11px 13px; margin-bottom: 9px;
  background: var(--surface-2); transition: border-color var(--t-fast), background var(--t-fast);
}
.script:hover { border-color: var(--teal); background: var(--teal-ll); }
.script .lab { font-size: 10.5px; color: var(--teal-dd); letter-spacing: 1px; font-weight: 600; }
.script p { margin: 4px 0 0; font-size: 14px; line-height: 1.6; }
.copy-btn { font-size: 11.5px; color: var(--muted); cursor: pointer; float: right; }

/* ---------- 11. 实时陪跑 ---------- */
.live-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 344px; gap: 16px; align-items: start; }
.live-main { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.advice-card {
  position: relative; overflow: hidden; padding: 24px; border-radius: 24px; color: #eefbfa;
  background:
    radial-gradient(50% 80% at 100% 0%, #2ee6d63d 0, transparent 62%),
    linear-gradient(150deg, #072334, #0a4149 55%, #076b62);
  box-shadow: 0 24px 64px -28px #04212ecc;
  animation: fadeUp .5s var(--ease) both;
}
html[data-theme="dark"] .advice-card { background: radial-gradient(50% 80% at 100% 0%, #2ee6d63d 0, transparent 62%), linear-gradient(150deg, #03121c, #063138 55%, #05544f); }
.advice-card::before { content: ""; position: absolute; inset: 0; background: radial-gradient(40% 60% at 0% 100%, #8b7bff24, transparent 66%); pointer-events: none; }
.advice-top { display: flex; align-items: center; gap: 9px; font-size: 11.5px; color: #8fe8e0; letter-spacing: 2px; font-weight: 600; position: relative; }
.advice-top b { width: 6px; height: 6px; border-radius: 50%; background: #2ee6d6; box-shadow: 0 0 12px #2ee6d6; animation: pulseDot 1.8s var(--ease) infinite; }
.advice-type { margin-left: auto; background: #ffffff1f; border: 1px solid #ffffff26; border-radius: 999px; padding: 3px 12px; color: #d9fffb; font-size: 12px; letter-spacing: 0; font-weight: 500; }
.advice-say { position: relative; font-size: 27px; line-height: 1.48; font-weight: 650; margin: 16px 0 14px; letter-spacing: -.3px; text-shadow: 0 2px 20px #00000030; }
.advice-why { position: relative; font-size: 13px; color: #b3ded9; border-top: 1px solid #ffffff24; padding-top: 13px; line-height: 1.75; }
.advice-why b { color: #8ff0e6; font-weight: 600; }
.advice-acts { position: relative; display: flex; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
.advice-acts .btn { height: 35px; font-size: 13px; background: #ffffff1a; border-color: #ffffff30; color: #e9fbfa; }
.advice-acts .btn:hover { background: #ffffff2b; border-color: #ffffff57; }
.advice-acts .btn.primary { background: linear-gradient(135deg, #2ee6d6, #38f0d6); color: #04302e; border-color: transparent; font-weight: 650; box-shadow: 0 12px 28px -10px #2ee6d677; }
.advice-acts .btn.dim { opacity: .72; }
.advice-card.flash { animation: adviceFlash .8s var(--ease); }

.spot-line {
  display: flex; gap: 10px; align-items: center; background: var(--surface);
  border: 1px solid var(--line); border-left: 3px solid var(--teal); border-radius: var(--radius-sm);
  padding: 11px 15px; font-size: 12.5px; color: var(--muted); box-shadow: var(--shadow-xs);
}
.spot-line b { color: var(--ink-2); font-weight: 550; white-space: nowrap; }
.feed { background: var(--surface); border-radius: var(--radius-md); border: 1px solid var(--line); box-shadow: var(--shadow); overflow: hidden; animation: fadeUp .5s var(--ease) both .1s; }
.feed-head { display: flex; align-items: center; gap: 9px; padding: 13px 17px; border-bottom: 1px solid var(--line-2); font-size: 13px; color: var(--muted); }
.feed-body { max-height: 46vh; overflow: auto; padding: 5px 0; scroll-behavior: smooth; }
.feed-row {
  display: flex; gap: 10px; padding: 8px 17px; font-size: 13.5px; align-items: flex-start; line-height: 1.55;
  animation: feedIn .3s var(--ease) both;
  transition: background var(--t-fast);
}
.feed-row:hover { background: var(--surface-2); }
.feed-row .who { color: var(--teal-dd); font-weight: 550; white-space: nowrap; }
.feed-row .who.master { color: var(--rose); }
.feed-row .txt { color: var(--ink-2); flex: 1; min-width: 0; }
.feed-row .t { color: var(--muted-2); font-size: 11px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.feed-row .tag { margin-left: 4px; }
.feed-row.hl { background: linear-gradient(90deg, var(--amber-l), transparent); }
.feed-row.evt .txt, .feed-row.evt .who { color: var(--muted); font-size: 12.5px; }
.signal-bar { display: flex; gap: 8px; flex-wrap: wrap; }
.sig { font-size: 11.5px; padding: 3px 10px; border-radius: 999px; background: var(--surface-3); border: 1px solid var(--line); color: var(--muted); }
.sig.ok { background: var(--teal-l); color: var(--teal-dd); border-color: transparent; }
.sig.bad { background: var(--rose-l); color: var(--rose); border-color: transparent; }
.screen {
  position: relative; overflow: hidden; height: 430px; border-radius: 15px;
  background: radial-gradient(60% 90% at 50% 8%, #2ee6d61f, transparent 70%), linear-gradient(160deg, #071c29, #0a2f3b);
  display: flex; align-items: center; justify-content: center; color: #84a7b6; font-size: 12.5px;
}
.screen .live-badge { position: absolute; left: 12px; top: 12px; z-index: 2; background: linear-gradient(135deg, #ff5571, #e8354f); color: #fff; font-size: 10px; padding: 3px 9px; border-radius: 6px; letter-spacing: 1.5px; font-weight: 600; box-shadow: 0 6px 18px #e8354f4d; animation: pulseDot 2s var(--ease) infinite; }
.screen video {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  height: 100%; width: auto; max-width: 100%; object-fit: contain;
  background: #04141d; border-radius: 11px;
}
.screen-hint { position: relative; z-index: 1; max-width: 78%; text-align: center; line-height: 1.5; }
.screen-online {
  position: absolute; right: 12px; top: 12px; z-index: 2; font-size: 11px; padding: 3px 9px;
  border-radius: 6px; color: #eafff9; background: #061c2659; border: 1px solid #ffffff26;
  backdrop-filter: blur(6px); font-weight: 600;
}
.pk-panel { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: center; background: var(--surface-2); border: 1px solid var(--line); border-radius: 14px; padding: 13px 15px; }
.pk-panel .side-name { font-size: 12px; color: var(--muted); }
.pk-panel .score { font-size: 23px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.5px; }
.pk-panel .bar, .pk-panel + .bar { height: 7px; border-radius: 5px; background: var(--surface-3); overflow: hidden; margin-top: 7px; }
.pk-panel .bar i, .bar i { display: block; height: 100%; border-radius: 5px; background: linear-gradient(90deg, var(--teal), #2ee6d6); transition: width .5s var(--ease); }
.timer-pill { font-variant-numeric: tabular-nums; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px 11px; font-size: 12px; color: var(--ink-2); font-weight: 550; letter-spacing: .5px; }
.transcript { font-size: 13px; color: var(--ink-2); max-height: 190px; overflow: auto; line-height: 1.75; }
.transcript p { margin: 0 0 7px; }
.transcript .who { color: var(--teal-dd); font-weight: 550; }

/* ---------- 12. 播后复盘 ---------- */
.review-hero {
  position: relative; overflow: hidden; padding: 26px 28px; border-radius: 24px; color: #eaf8fb;
  background: radial-gradient(60% 80% at 90% 0%, #2ee6d62b 0, transparent 62%), linear-gradient(145deg, #082334, #0b3f4b 58%, #075a55);
  box-shadow: 0 22px 58px -26px #04212ecc;
  animation: fadeUp .5s var(--ease) both;
}
html[data-theme="dark"] .review-hero { background: radial-gradient(60% 80% at 90% 0%, #2ee6d62b 0, transparent 62%), linear-gradient(145deg, #04131d, #07303a 58%, #064843); }
.review-hero .lab { font-size: 11.5px; color: #85dcd5; letter-spacing: 2px; font-weight: 600; }
.review-hero h2 { margin: 10px 0 0; font-size: clamp(19px, 1.8vw, 23px); line-height: 1.55; font-weight: 650; max-width: 920px; letter-spacing: -.3px; }
.review-nums { display: grid; grid-template-columns: repeat(5, 1fr); gap: 11px; margin-top: 20px; }
.review-nums div { background: #ffffff12; border: 1px solid #ffffff1f; border-radius: 14px; padding: 12px 14px; backdrop-filter: blur(6px); }
.review-nums b { display: block; font-size: 24px; font-weight: 700; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.review-nums .delta { font-size: 11px; color: #9dc0cd; }
.review-nums .delta.up { color: #7ff0c6; }
.review-nums .delta.down { color: #ffb3bd; }
.review-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; align-items: center; }
.review-hero .btn.ghost { background: #ffffff1a; border-color: #ffffff33; color: #eaf8fb; }
.review-hero .btn.ghost:hover { background: #ffffff2b; border-color: #ffffff5c; color: #fff; }
.review-actions .sel-dark {
  height: 35px; border-radius: 10px; border: 1px solid #ffffff33; background: #ffffff14;
  color: #eaf8fb; padding: 0 11px; font: inherit; font-size: 12.5px; outline: none; cursor: pointer;
  transition: border-color var(--t-fast), background var(--t-fast);
}
.review-actions .sel-dark:hover { border-color: #ffffff5c; background: #ffffff22; }
.review-actions .sel-dark option { background: var(--surface); color: var(--ink); }
.rev-note { color: #9dbcca; margin: 11px 0 0; line-height: 1.7; }
.tl { display: flex; flex-direction: column; }
.tl-row { display: grid; grid-template-columns: 98px 1fr; gap: 12px; padding: 11px 0; border-bottom: 1px dashed var(--line-2); font-size: 13.5px; }
.tl-row:last-child { border: 0; }
.tl-row .t { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.tl-row .n { color: var(--ink-2); }
.bars { display: flex; align-items: flex-end; justify-content: space-around; gap: 8px; height: 132px; padding: 12px 14px 8px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line-2); }
.bar-col { flex: 1; max-width: 108px; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 7px; }
.bar-col i { width: 100%; max-width: 42px; border-radius: 7px 7px 3px 3px; background: linear-gradient(180deg, #2ee6d6, #0b9e8f); display: block; transition: height .7s var(--ease-spring); box-shadow: 0 8px 22px -10px var(--teal-glow); }
.bar-col span { font-size: 10.5px; color: var(--muted-2); white-space: nowrap; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.list-line { display: flex; gap: 11px; padding: 10px 0; border-bottom: 1px dashed var(--line-2); font-size: 13.5px; line-height: 1.65; }
.list-line:last-child { border: 0; }
.list-line .k { color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.check { display: flex; gap: 11px; align-items: flex-start; padding: 10px 12px; border-radius: 11px; cursor: pointer; transition: background var(--t-fast); }
.check:hover { background: var(--surface-2); }
.check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--teal); flex: none; }

/* ---------- 13. 账号接入 ---------- */
.connect-card { display: grid; grid-template-columns: 112px 1fr; gap: 20px; align-items: center; }
.big-avatar {
  width: 104px; height: 104px; border-radius: 20px; flex: none;
  background: linear-gradient(140deg, #0b9e8f, #0d4e55); display: grid; place-items: center;
  font-size: 33px; color: #fff; font-weight: 650; box-shadow: 0 14px 34px -14px #0b9e8f88;
}
.steps { display: flex; flex-direction: column; gap: 12px; }
.step { display: flex; gap: 12px; align-items: flex-start; }
.step .n { width: 25px; height: 25px; border-radius: 50%; background: var(--teal-l); color: var(--teal-dd); display: grid; place-items: center; font-size: 12px; flex: none; font-weight: 650; }
.step.done .n { background: linear-gradient(140deg, var(--teal), #2ee6d6); color: #fff; box-shadow: 0 6px 16px -6px var(--teal-glow); }
.step p { margin: 0; font-size: 13.5px; color: var(--ink-2); line-height: 1.65; }

/* ---------- 14. 我的 / 设置 ---------- */
.setting-line { display: flex; align-items: center; padding: 15px 0; border-bottom: 1px solid var(--line-2); gap: 12px; transition: background var(--t-fast); }
.setting-line:last-child { border: 0; }
.setting-line .l { font-size: 14px; font-weight: 500; }
.setting-line .d { font-size: 11.5px; color: var(--muted); }
.setting-line .spacer { margin-left: auto; }

/* ---------- 15. 助理 Dock ---------- */
.dock { position: fixed; right: 24px; bottom: 24px; z-index: 60; }
.dock-grab { display: none; }
#view.page-in { animation: pageIn .34s var(--ease) both; }
.theme-toggle.pop .knob { animation: knobPop .4s var(--ease-spring); }
@keyframes knobPop { 0% { transform: scale(1); } 45% { transform: scale(1.22); } 100% { transform: scale(1); } }
html[data-theme="dark"] .theme-toggle.pop .knob { animation: knobPopDark .4s var(--ease-spring); }
@keyframes knobPopDark {
  0% { transform: translateX(28px) scale(1); }
  45% { transform: translateX(28px) scale(1.22); }
  100% { transform: translateX(28px) scale(1); }
}
.dock-btn {
  position: relative; display: inline-flex; align-items: center; gap: 9px; height: 48px; padding: 0 19px 0 14px;
  border-radius: 999px; border: 1px solid #ffffff2e;
  background: linear-gradient(135deg, #0b2434, #0a635c);
  color: #eafafa; font-size: 13px; font-weight: 500; cursor: pointer;
  box-shadow: 0 16px 40px -14px #04212e99;
  transition: transform var(--t-fast) var(--ease), box-shadow var(--t);
}
.dock-btn:hover { transform: translateY(-2px) scale(1.02); box-shadow: 0 22px 50px -16px #04212ecc; }
.dock-btn:active { transform: scale(.96); }
.dock-btn img { border-radius: 50%; }
.dock-pulse { position: absolute; inset: -6px; border-radius: 999px; border: 1px solid #2ee6d64d; animation: ringPulse 2.6s var(--ease) infinite; pointer-events: none; }
.dock-panel {
  position: absolute; right: 0; bottom: 62px; width: 392px; max-height: 72vh;
  background: var(--surface); border-radius: 22px; border: 1px solid var(--line);
  box-shadow: var(--shadow-lg); display: flex; flex-direction: column; overflow: hidden;
  animation: popIn .3s var(--ease-spring) both;
}
.dock-head { display: flex; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--line-2); background: var(--surface-2); }
.brand-mini { display: flex; align-items: center; gap: 9px; font-size: 14px; }
.brand-mini img { border-radius: 8px; }
.brand-mini b { font-weight: 600; }
.brand-mini .dot-on { width: 6px; height: 6px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 0 3px var(--teal-l); }
.dock-head .icon-btn { margin-left: auto; }
.dock-quick { display: flex; gap: 7px; flex-wrap: wrap; padding: 11px 15px; border-bottom: 1px solid var(--line-2); }
.dock-quick .chip { font-size: 12px; padding: 5px 11px; }
.dock-log { padding: 14px 15px; overflow: auto; flex: 1; min-height: 165px; }
.dock-msg { font-size: 13.5px; line-height: 1.72; margin-bottom: 11px; padding: 10px 13px; border-radius: 13px; animation: fadeUp .3s var(--ease) both; }
.dock-msg.ai { background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.dock-msg.me { margin-left: auto; background: linear-gradient(135deg, var(--teal), #12b7a6); color: #fff; max-width: 86%; border-bottom-right-radius: 5px; }
.dock-input { display: flex; gap: 9px; padding: 11px 13px; border-top: 1px solid var(--line-2); align-items: flex-end; }
.dock-input textarea { flex: 1; min-height: 42px; max-height: 100px; border: 1px solid var(--line); border-radius: 12px; padding: 10px 13px; font: inherit; font-size: 13.5px; resize: none; outline: none; background: var(--surface-2); transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.dock-input textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 4px var(--teal-l); }
.dock-input .send-btn { height: 42px; padding: 0 16px; }
.dock-foot { font-size: 11px; color: var(--muted-2); margin: 0; padding: 0 15px 11px; line-height: 1.6; }

/* ---------- 16. 弹窗 / Toast / 抽屉 ---------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 70; padding: 22px;
  background: rgba(6, 18, 28, .55);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
  animation: maskIn .24s var(--ease) both;
}
.modal {
  width: 100%; max-width: 540px; max-height: 88vh; overflow: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 24px;
  box-shadow: var(--shadow-lg);
  animation: popIn .34s var(--ease-spring) both;
}
.modal-head { display: flex; align-items: center; padding: 18px 21px; border-bottom: 1px solid var(--line-2); position: sticky; top: 0; background: var(--surface); z-index: 2; }
.modal-head h3 { margin: 0; font-size: 16.5px; font-weight: 650; letter-spacing: -.2px; }
.modal-head .icon-btn { margin-left: auto; }
.modal-body { padding: 19px 21px; }
.modal-foot { padding: 15px 21px; border-top: 1px solid var(--line-2); display: flex; gap: 10px; justify-content: flex-end; }

.toast {
  position: fixed; left: 50%; bottom: 46px; transform: translateX(-50%) translateY(10px);
  background: var(--glass-strong); color: var(--ink); font-size: 13px;
  padding: 11px 19px; border-radius: 12px; z-index: 80;
  border: 1px solid var(--line); box-shadow: var(--shadow-lg);
  backdrop-filter: blur(16px);
  opacity: 0; animation: toastIn .3s var(--ease) forwards;
  max-width: min(86vw, 420px); text-align: center;
}
.toast.out { animation: toastOut .26s var(--ease) forwards; }

/* ---------- 17. 动效 ---------- */
@keyframes bootbar { 0% { transform: translateX(-110%); } 100% { transform: translateX(300%); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes ringPulse { 0% { transform: scale(.92); opacity: .8; } 70% { transform: scale(1.16); opacity: 0; } 100% { opacity: 0; } }
@keyframes pulseDot { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .55; transform: scale(.86); } }
@keyframes ripple { to { transform: scale(2.6); opacity: 0; } }
@keyframes shimmer { 0% { background-position: 120% 0; } 100% { background-position: -60% 0; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes slideUp { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }
@keyframes popIn { from { opacity: 0; transform: scale(.94) translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes maskIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes feedIn { from { opacity: 0; transform: translateX(-6px); } to { opacity: 1; transform: none; } }
@keyframes toastIn { to { opacity: 1; transform: translateX(-50%) translateY(0); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(-50%) translateY(8px); } }
@keyframes adviceFlash { 0% { box-shadow: 0 24px 64px -28px #04212ecc; } 40% { box-shadow: 0 0 0 3px #2ee6d666, 0 24px 64px -28px #04212ecc; } 100% { box-shadow: 0 24px 64px -28px #04212ecc; } }
@keyframes pageIn { from { opacity: 0; transform: translateY(8px) scale(.995); } to { opacity: 1; transform: none; } }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes countUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- 18. 响应式 ---------- */
@media (max-width: 1440px) {
  .persona-wrap { grid-template-columns: minmax(0, 1fr) 296px; }
  .live-wrap { grid-template-columns: minmax(0, 1fr) 320px; }
}

@media (max-width: 1180px) {
  :root { --side: 88px; }
  .shell { grid-template-columns: var(--side) minmax(0, 1fr); }
  .brand { flex-direction: column; gap: 6px; padding: 4px 0 18px; }
  .brand b { font-size: 13px; letter-spacing: .5px; }
  .brand img { width: 30px; height: 30px; }
  .nav-item { flex-direction: column; justify-content: center; height: 62px; font-size: 12px; gap: 3px; padding: 0 4px; text-align: center; }
  .nav-item > span:first-child { font-size: 16px; }
  .nav-item .hot { display: none; }
  .nav-item .dot { display: none; }
  .side-foot { display: none; }
  .home-hero, .persona-wrap, .prelive-wrap, .live-wrap, .two-col { grid-template-columns: minmax(0, 1fr); }
  .persona-wrap, .live-wrap, .home-hero { align-items: stretch; }
  .persona-wrap > *, .live-wrap > *, .two-col > * { min-width: 0; }
  .prelive-wrap { height: auto; min-height: 0; }
  .chat-box { height: 560px; }
  .plan-col { max-height: none; overflow: visible; }
  .quick-grid { grid-template-columns: 1fr 1fr; }
  .review-nums { grid-template-columns: repeat(3, 1fr); }
  .content { padding: 20px 20px 100px; }
  .topbar { padding: 0 20px; }
}

/* ===== 手机 / 平板竖屏：独立 App 布局 ===== */
@media (max-width: 820px) {
  :root { --top: 58px; --tabbar: 64px; }

  body::before { height: 42vh; opacity: .7; }
  .shell { display: block; min-height: 100vh; padding-bottom: calc(var(--tabbar) + env(safe-area-inset-bottom, 0px)); }
  .side { display: none; }
  .main { display: block; }

  /* 顶部 App Bar */
  .appbar {
    display: flex; align-items: center; gap: 10px;
    position: sticky; top: 0; z-index: 40;
    height: calc(var(--top) + env(safe-area-inset-top, 0px));
    padding: env(safe-area-inset-top, 0px) 15px 0;
    background: var(--glass);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    border-bottom: 1px solid var(--line);
  }
  .appbar .a-brand { width: 32px; height: 32px; border-radius: 9px; flex: none; box-shadow: var(--shadow-xs); }
  .appbar .a-title { min-width: 0; flex: 1; }
  .appbar .a-title b { display: block; font-size: 15.5px; font-weight: 650; letter-spacing: -.2px; line-height: 1.25; }
  .appbar .a-title span { display: block; font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .appbar .a-actions { display: flex; align-items: center; gap: 8px; }
  .appbar .acc-switch { height: 34px; padding: 0 8px 0 4px; }
  .appbar .acc-switch .acc-name, .appbar .acc-switch .caret { display: none; }
  .appbar .theme-toggle { width: 54px; height: 32px; }
  .appbar .theme-toggle .knob { width: 24px; height: 24px; }
  html[data-theme="dark"] .appbar .theme-toggle .knob { transform: translateX(22px); }
  @keyframes knobPopDarkSm { 0% { transform: translateX(22px) scale(1); } 45% { transform: translateX(22px) scale(1.2); } 100% { transform: translateX(22px) scale(1); } }
  @keyframes knobPopSm { 0% { transform: scale(1); } 45% { transform: scale(1.2); } 100% { transform: scale(1); } }
  .appbar .theme-toggle.pop .knob { animation: knobPopSm .4s var(--ease-spring); }
  html[data-theme="dark"] .appbar .theme-toggle.pop .knob { animation: knobPopDarkSm .4s var(--ease-spring); }
  .live-main { gap: 12px; }

  /* 桌面顶栏不显示 */
  .topbar { display: none; }

  .content { padding: 14px 13px 26px; }
  .content#view, #view { padding-bottom: 118px; }

  /* 底部 Tab Bar */
  .tabbar {
    display: flex; align-items: center; justify-content: space-around;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
    height: calc(var(--tabbar) + env(safe-area-inset-bottom, 0px));
    padding: 0 6px env(safe-area-inset-bottom, 0px);
    background: var(--glass-strong);
    backdrop-filter: saturate(180%) blur(22px);
    -webkit-backdrop-filter: saturate(180%) blur(22px);
    border-top: 1px solid var(--line);
    box-shadow: 0 -8px 30px -18px rgba(0, 0, 0, .45);
  }
  .tab {
    position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 3px; height: 100%; border: 0; background: none; cursor: pointer; color: var(--muted);
    font-size: 11px; font-weight: 500; padding: 0; border-radius: 12px;
    transition: color var(--t-fast), transform var(--t-fast) var(--ease);
    -webkit-tap-highlight-color: transparent;
  }
  .tab .ti { font-size: 19px; line-height: 1; opacity: .82; transition: transform var(--t-fast) var(--ease-spring), opacity var(--t-fast); display: grid; place-items: center; }
  .tab .ti svg { width: 22px; height: 22px; }
  .tab:active .ti { transform: scale(.88); }
  .tab.active { color: var(--teal-dd); }
  .tab.active .ti { opacity: 1; transform: translateY(-1px) scale(1.06); }
  .tab.active::after {
    content: ""; position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%);
    width: 18px; height: 3px; border-radius: 3px; background: var(--teal);
    animation: popIn .28s var(--ease-spring) both;
  }
  .tab .live-dot { position: absolute; top: 8px; right: 50%; margin-right: -16px; width: 6px; height: 6px; border-radius: 50%; background: var(--rose); box-shadow: 0 0 0 3px var(--rose-l); animation: pulseDot 1.6s infinite; }

  /* 更多面板 */
  .more-sheet {
    display: block; position: fixed; inset: 0; z-index: 65;
    background: rgba(6, 18, 28, .5); backdrop-filter: blur(4px);
    opacity: 0; pointer-events: none; transition: opacity var(--t) var(--ease);
  }
  .more-sheet.on { opacity: 1; pointer-events: auto; }
  .more-card {
    position: absolute; left: 0; right: 0; bottom: 0;
    background: var(--surface); border-radius: 24px 24px 0 0; padding: 10px 16px calc(22px + env(safe-area-inset-bottom, 0px));
    box-shadow: 0 -20px 60px -20px rgba(0, 0, 0, .5);
    transform: translateY(102%); transition: transform .34s var(--ease-spring);
  }
  .more-sheet.on .more-card { transform: none; }
  .more-grab { width: 40px; height: 4px; border-radius: 3px; background: var(--line-strong); margin: 4px auto 12px; }
  .more-card h4 { margin: 0 0 10px; font-size: 14px; color: var(--muted); font-weight: 500; }
  .more-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
  .more-item {
    display: flex; align-items: center; gap: 10px; padding: 13px 14px; border-radius: 14px;
    background: var(--surface-2); border: 1px solid var(--line); font-size: 13.5px; cursor: pointer;
  }
  .more-item .mi { font-size: 17px; color: var(--teal); }
  .more-item.active { border-color: var(--teal); background: var(--teal-l); color: var(--teal-dd); }

  /* 登录页：竖屏单列 */
  .login { grid-template-columns: 1fr; min-height: 0; }
  .login-left {
    padding: 26px 22px 30px; display: block;
    border-radius: 0 0 26px 26px;
  }
  .login-left .lh-brand { margin-bottom: 20px; font-size: 12.5px; }
  .login-left .lh-brand img { width: 28px; height: 28px; }
  .login-left h1 { font-size: 27px; margin-bottom: 12px; line-height: 1.3; }
  .login-left > p { font-size: 13.5px; line-height: 1.75; margin-bottom: 18px; }
  .login-points { gap: 7px; }
  .login-points span { padding: 5px 12px; font-size: 12px; }
  .login-metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 22px; }
  .login-metrics div b { font-size: 19px; }
  .login-metrics div span { font-size: 11px; }
  .login-right { padding: 26px 22px calc(30px + env(safe-area-inset-bottom, 0px)); }
  .login-card h2 { font-size: 22px; }
  .login-card .sub { margin-bottom: 18px; }
  .login-actions { margin-top: 16px; }
  .wechat { margin-top: 18px; padding-top: 16px; }
  .qr { width: 62px; height: 62px; }

  /* 手机端信息密度 */
  .home-hero { gap: 12px; }
  .hero-card { padding: 19px; border-radius: 20px; }
  .hero-card h2 { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .hero-card .who { gap: 11px; margin-bottom: 14px; flex-wrap: nowrap; }
  .hero-card .who > div { min-width: 0; }
  .hero-card .status-pill { display: none; }
  .hero-card .avatar { width: 44px; height: 44px; border-radius: 13px; font-size: 17px; }
  .hero-nums { gap: 8px; margin: 15px 0; }
  .hero-nums div { padding: 9px 11px; border-radius: 12px; }
  .hero-nums b { font-size: 19px; }
  .hero-nums span { font-size: 10.5px; }
  .hero-actions .btn { flex: 1; min-width: 118px; }
  .stat-strip { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat b { font-size: 21px; }
  .quick-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .quick { padding: 14px; }
  .quick h4 { font-size: 14px; flex-wrap: wrap; gap: 4px 6px; line-height: 1.4; }
  .quick .q-tag { font-size: 10px; padding: 1px 6px; margin-left: 0; }
  .quick p { font-size: 11.5px; }
  .card { padding: 16px; border-radius: 18px; }
  .card.tight { padding: 14px; }
  .card-head h3 { font-size: 15px; }
  .content .grid { gap: 12px; }

  /* 画像 */
  .persona-wrap { gap: 12px; }
  .one-line { padding: 15px 17px; }
  .one-line p { font-size: 18px; }
  .sec-head { padding: 13px 15px; }
  .sec-body { padding: 2px 15px 14px; }
  .save-bar { bottom: calc(var(--tabbar) + 10px); padding: 11px 13px; font-size: 12.5px; }
  .save-bar .spacer { display: none; }

  /* 播前 */
  .prelive-wrap { display: flex; flex-direction: column; align-items: stretch; height: auto; gap: 12px; }
  .chat-box { height: auto; min-height: 0; }
  .chat-log { max-height: 42vh; padding: 13px 15px; }
  .msg { font-size: 13.5px; max-width: 88%; }
  .chat-input { padding: 11px 13px 0; gap: 8px; }
  .chat-input textarea { min-height: 56px; font-size: 16px; padding: 11px 13px; line-height: 1.5; }
  .chat-input .btn.primary { height: 56px; padding: 0 16px; }
  .chat-box > .row { display: flex; gap: 8px; }
  .chat-box > .row .btn { flex: 1; height: 38px; }
  .chat-box > .row .spacer { display: none; }
  .chat-box > .row { padding: 11px 13px 13px; }
  .hold-btn { display: none; }
  .slot-grid { gap: 8px; }
  .slot { padding: 11px; }
  .plan-col { padding-right: 0; gap: 12px; }
  .plan-block { padding: 14px; }

  /* 陪跑 */
  .live-wrap { display: flex; flex-direction: column; align-items: stretch; gap: 12px; }
  .live-wrap > .card, .live-wrap .live-main > .card { width: 100%; }
  .advice-card { padding: 19px; border-radius: 20px; }
  .advice-say { font-size: 21px; margin: 12px 0 11px; }
  .advice-why { font-size: 12.5px; }
  .advice-acts { gap: 7px; }
  .advice-acts .btn { height: 34px; font-size: 12.5px; padding: 0 13px; flex: 1; min-width: 74px; }
  .advice-acts .btn.dim { flex: 0 0 auto; }
  .feed-body { max-height: 38vh; }
  .feed-row { padding: 7px 13px; font-size: 13px; }
  .screen { height: 430px; }

  /* 复盘 */
  .review-hero { padding: 19px; border-radius: 20px; }
  .review-hero h2 { font-size: 17.5px; }
  .review-nums { grid-template-columns: 1fr 1fr; gap: 8px; }
  .review-nums div { padding: 10px 12px; border-radius: 12px; }
  .review-nums b { font-size: 19px; }
  .review-actions { gap: 8px; }
  .review-actions select { flex: 1; }
  .two-col { grid-template-columns: 1fr; gap: 12px; }
  .bars { height: 108px; }
  .tl-row { grid-template-columns: 84px 1fr; font-size: 13px; }
  .list-line { font-size: 13px; gap: 8px; }

  /* 账号 / 我的 */
  .connect-card { grid-template-columns: 1fr; gap: 14px; justify-items: start; }
  .big-avatar { width: 76px; height: 76px; border-radius: 16px; font-size: 24px; }
  .setting-line { padding: 13px 0; flex-wrap: wrap; }
  .setting-line .d { flex-basis: 100%; order: 3; }

  /* Dock → 全屏上滑抽屉 */
  .dock { right: 14px; bottom: calc(var(--tabbar) + 14px + env(safe-area-inset-bottom, 0px)); }
  .dock-btn { width: 54px; height: 54px; padding: 0; justify-content: center; border-radius: 50%; }
  .dock-label { display: none; }
  .dock-btn img { width: 30px; height: 30px; }
  .dock-panel {
    position: fixed; inset: auto 0 0 0; width: 100%; max-height: 88vh; border-radius: 24px 24px 0 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    animation: sheetUp .34s var(--ease-spring) both;
  }
  .dock-head { padding: 16px 16px 13px; }
  .dock-grab { display: block; width: 40px; height: 4px; border-radius: 3px; background: var(--line-strong); margin: 8px auto 0; }
  .dock-quick { padding: 11px 14px; }
  .dock-log { min-height: 30vh; max-height: 46vh; }
  .dock-input textarea { font-size: 16px; } /* iOS 防缩放 */

  /* 弹窗 → 底部卡片 */
  .modal-mask { padding: 0; align-items: flex-end; }
  .modal {
    max-width: none; border-radius: 24px 24px 0 0; max-height: 90vh;
    animation: sheetUp .34s var(--ease-spring) both;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
  .modal-head { padding: 17px 17px 14px; }
  .modal-head::before { content: ""; position: absolute; top: 7px; left: 50%; transform: translateX(-50%); width: 38px; height: 4px; border-radius: 3px; background: var(--line-strong); }
  .modal-body { padding: 16px 17px; }
  .modal-foot { padding: 13px 17px; }
  .modal-foot .btn { flex: 1; }

  .toast { bottom: calc(var(--tabbar) + 22px + env(safe-area-inset-bottom, 0px)); }

  /* 输入框 16px 防 iOS 自动放大 */
  .field input, .field textarea, .chat-input textarea, .dock-input textarea { font-size: 16px; }
  .btn, .chip, .tab, .more-item { touch-action: manipulation; }
}

@media (max-width: 400px) {
  .hero-actions > .btn.primary { flex: 1 1 100%; }
  .hero-actions > .btn.ghost { flex: 1 1 calc(50% - 5px); min-width: 0; }
  .quick-grid, .slot-grid, .review-nums, .stat-strip { grid-template-columns: 1fr 1fr; }
  .advice-say { font-size: 19px; }
  .content { padding: 12px 11px 24px; }
  .tabbar { height: calc(60px + env(safe-area-inset-bottom, 0px)); }
}

/* 平板横屏 */
@media (min-width: 821px) and (max-width: 1024px) {
  :root { --side: 200px; }
  .content { padding: 18px 18px 90px; }
  .topbar { padding: 0 18px; }
  .home-hero { grid-template-columns: minmax(0, 1fr); }
  .persona-wrap { grid-template-columns: minmax(0, 1fr); }
  .live-wrap { grid-template-columns: minmax(0, 1fr); }
}

/* ------------------------------------------------ 真实弹幕接入 */
.live-connect {
  display: flex;
  gap: 10px;
  margin: 18px auto 0;
  max-width: 520px;
}

.live-connect input {
  flex: 1 1 auto;
  min-width: 0;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: var(--card);
  color: var(--ink);
  font-size: 15px;
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}

.live-connect input:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-glow);
}

.live-connect .btn {
  flex: 0 0 auto;
  height: 46px;
  white-space: nowrap;
}

.live-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid rgba(224, 122, 95, .35);
  background: rgba(224, 122, 95, .1);
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.5;
}

.live-banner[hidden] { display: none; }

@media (max-width: 820px) {
  .live-connect { flex-direction: column; margin-top: 14px; }
  .live-connect .btn { width: 100%; }
}
