:root {
  --bg: #0e1013;
  --bg-2: #15181d;
  --surface: #1b1f25;
  --surface-2: #232830;
  --line: #2c323b;
  --text: #e8eaed;
  --muted: #8c95a1;
  --accent: #4f8cff;
  --accent-2: #3a74e8;
  --good: #3ecf8e;
  --warn: #f5b84a;
  --bad: #f0605a;
  --radius: 12px;
  --font: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 var(--font);
  -webkit-font-smoothing: antialiased;
}
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
.muted { color: var(--muted); font-weight: 400; }

/* ---------- 通用控件 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 40px; padding: 0 16px; border-radius: 10px;
  border: 1px solid var(--line); background: var(--surface-2);
  font-weight: 600; transition: background .15s, border-color .15s, opacity .15s;
}
.btn:hover { background: #2b313a; }
.btn:disabled { opacity: .55; cursor: default; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-2); }
.btn.danger { background: transparent; border-color: #5a2a2a; color: var(--bad); }
.btn.danger:hover { background: #2a1717; }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn.block { width: 100%; }
.icon-btn {
  display: inline-grid; place-items: center; width: 34px; height: 34px;
  border-radius: 8px; border: 0; background: rgba(20, 22, 26, .72); color: var(--text);
}
.icon-btn:hover { background: rgba(50, 55, 64, .9); }
.icon-btn.sm { width: 28px; height: 28px; background: transparent; }
.icon-btn.sm:hover { background: var(--surface-2); }
.pill { font-size: 12px; padding: 2px 8px; border-radius: 99px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.pill.ok { color: var(--good); }
.pill.warn { color: var(--warn); }
.pill.bad { color: var(--bad); }

.field { display: grid; gap: 6px; margin-bottom: 14px; }
.field > span { font-size: 13px; color: var(--muted); }
.field em { font-style: normal; opacity: .7; font-size: 12px; }
input:not([type=range]):not([type=checkbox]), select {
  width: 100%; height: 40px; padding: 0 12px; border-radius: 10px;
  background: var(--bg-2); border: 1px solid var(--line); outline: none;
}
input:focus, select:focus { border-color: var(--accent); }
input:disabled { opacity: .7; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 17px) 50%, calc(100% - 12px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
.check { display: flex; align-items: center; gap: 8px; margin: 6px 0; cursor: pointer; user-select: none; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }
.hint { margin: 6px 0 0; font-size: 12px; color: var(--muted); min-height: 1em; }
.hint.err { color: var(--bad); }
input[type=range] { flex: 1; min-width: 60px; accent-color: var(--accent); height: 20px; }

/* ---------- 首页 ---------- */
#home { min-height: 100%; display: grid; place-items: center; padding: 32px 16px; }
.home-wrap { width: 100%; max-width: 760px; }
.brand { display: flex; align-items: center; gap: 14px; margin-bottom: 28px; }
.brand h1 { margin: 0; font-size: 26px; letter-spacing: .5px; }
.brand .sub { margin: 2px 0 0; color: var(--muted); }
.logo { width: 46px; height: 46px; padding: 9px; border-radius: 12px; background: var(--accent); color: #fff; stroke-width: 1.7; }
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px; }
.card h2 { margin: 0 0 16px; font-size: 17px; }
.code-input { font-size: 26px !important; height: 56px !important; letter-spacing: 12px; text-align: center; font-variant-numeric: tabular-nums; font-weight: 700; }
.foot { margin-top: 20px; color: var(--muted); font-size: 13px; text-align: center; }

/* ---------- 房间布局 ---------- */
#room { height: 100%; height: 100dvh; display: grid; grid-template-rows: auto 1fr auto; }
.topbar {
  display: flex; align-items: center; gap: 12px; padding: 10px 16px;
  border-bottom: 1px solid var(--line); background: var(--bg-2); min-width: 0;
}
.room-title { display: flex; align-items: center; gap: 10px; min-width: 0; flex: 1; }
.room-title strong { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.invite { display: flex; align-items: center; gap: 8px; }
.code-badge {
  height: 32px; padding: 0 12px; border-radius: 8px; border: 1px dashed #3d4552;
  background: var(--surface); font-size: 13px;
}
.code-badge b { font-size: 16px; letter-spacing: 3px; font-variant-numeric: tabular-nums; }
.code-badge:hover { border-color: var(--accent); }
.top-actions { display: flex; gap: 8px; }

.room-body { display: grid; grid-template-columns: minmax(0, 1fr) 300px; min-height: 0; }
.stage { position: relative; background: #000; min-height: 0; overflow: hidden; }
.stage video { width: 100%; height: 100%; object-fit: contain; display: block; background: #000; }
@media (hover: hover) {
  .stage:fullscreen .stage-tools { opacity: 0; transition: opacity .25s; }
  .stage:fullscreen:hover .stage-tools, .stage:fullscreen .stage-tools:focus-within { opacity: 1; }
}
.stage-empty { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 10px; color: var(--muted); text-align: center; padding: 16px; }
.stage-empty svg { width: 54px; height: 54px; stroke-width: 1.2; opacity: .6; }
.stage-empty p { margin: 0; }
.stage-tools { position: absolute; right: 12px; top: 12px; display: flex; gap: 6px; align-items: center; }
.mini-select select { height: 34px; padding: 0 28px 0 10px; font-size: 13px; background-color: rgba(20, 22, 26, .8); border-color: transparent; }
.stats {
  position: absolute; left: 12px; top: 12px; padding: 8px 10px; border-radius: 8px;
  background: rgba(10, 12, 15, .78); font: 12px/1.6 ui-monospace, "SF Mono", Consolas, monospace;
  white-space: pre; pointer-events: none;
}
.unlock { position: absolute; left: 50%; bottom: 24px; transform: translateX(-50%); box-shadow: 0 6px 24px rgba(0,0,0,.5); }

.side { border-left: 1px solid var(--line); background: var(--bg-2); display: flex; flex-direction: column; min-height: 0; }
.side-block { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.side-block.grow { flex: 1; overflow: auto; border-bottom: 0; }
.side h3 { margin: 0 0 10px; font-size: 13px; color: var(--muted); font-weight: 600; letter-spacing: .5px; }
.vol-row { display: flex; align-items: center; gap: 8px; min-height: 32px; }
.vol-label { font-size: 13px; white-space: nowrap; min-width: 56px; }
.vol-icon { display: inline-grid; place-items: center; width: 28px; color: var(--muted); }
.vol-row output { width: 40px; text-align: right; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
#deafen .i-off, #deafen.off .i-on { display: none; }
#deafen.off .i-off { display: block; color: var(--bad); }

.members { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px; }
.member { padding: 8px 10px; border-radius: 10px; background: var(--surface); }
.member-head { display: flex; align-items: center; gap: 8px; min-width: 0; }
.avatar {
  width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; flex: none;
  font-size: 13px; font-weight: 700; color: #fff; outline: 2px solid transparent; outline-offset: 1px; transition: outline-color .15s;
}
.member.speaking .avatar { outline-color: var(--good); }
.member .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag { font-size: 11px; padding: 1px 6px; border-radius: 6px; background: #22324d; color: #9cc0ff; }
.tag.me { background: #2a2f37; color: var(--muted); }
.member .mic-state { color: var(--muted); display: inline-grid; }
.member .mic-state.off { color: var(--bad); }
.member .mic-state svg { width: 16px; height: 16px; }
.member .kick { width: 24px; height: 24px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); display: grid; place-items: center; }
.member .kick:hover { background: #3a1f1f; color: var(--bad); }
.member .kick svg { width: 14px; height: 14px; }
.member .vol-row { margin-top: 4px; min-height: 24px; }
.member .vol-row input { height: 16px; }

/* ---------- 底部控制栏 ---------- */
.controls {
  display: flex; justify-content: center; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 12px 16px; border-top: 1px solid var(--line); background: var(--bg-2);
}
.ctl-group { display: flex; }
.ctl-group .ctl:first-child { border-radius: 12px 0 0 12px; }
.ctl-group .ctl.caret { border-radius: 0 12px 12px 0; border-left: 1px solid rgba(0,0,0,.35); padding: 0 10px; }
.ctl {
  position: relative; display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px;
  border: 0; border-radius: 12px; background: var(--surface-2); font-weight: 600; white-space: nowrap;
}
.ctl:hover { background: #2d333c; }
.ctl .i-off { display: none; }
#mic.off { background: #3a1f22; color: #ffb4b0; }
#mic.off .i-on { display: none; }
#mic.off .i-off { display: block; }
#mic.off .level { display: none; }
.ctl.accent { background: var(--accent); color: #fff; }
.ctl.accent:hover, .ctl-group .ctl.accent + .ctl.caret:hover { background: var(--accent-2); }
.ctl-group .ctl.accent + .ctl.caret { background: var(--accent); color: #fff; }
.ctl.accent.live { background: var(--bad); }
.ctl-group .ctl.accent.live + .ctl.caret { background: var(--bad); }
.level { width: 4px; height: 18px; border-radius: 2px; background: rgba(255,255,255,.12); display: flex; align-items: flex-end; overflow: hidden; }
.level b { display: block; width: 100%; height: 0; background: var(--good); transition: height .08s; }

/* ---------- 弹出面板 ---------- */
.panel {
  position: fixed; bottom: 80px; left: 50%; transform: translateX(-50%); z-index: 20;
  width: min(340px, calc(100vw - 32px)); max-height: calc(100vh - 160px); overflow: auto;
  background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px;
  box-shadow: 0 16px 48px rgba(0,0,0,.55);
}
.panel.wide { width: min(560px, calc(100vw - 32px)); }
.panel h4 { margin: 0 0 14px; font-size: 15px; }
.meter { height: 6px; border-radius: 3px; background: var(--bg-2); overflow: hidden; margin: 6px 0 12px; }
.meter b { display: block; height: 100%; width: 0; background: var(--good); transition: width .08s; }
.presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.presets button { height: 30px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg-2); font-size: 12px; }
.presets button:hover { border-color: var(--accent); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.grid2 .span2 { grid-column: span 2; }

.toast {
  position: fixed; left: 50%; top: 18px; transform: translate(-50%, -20px); z-index: 50;
  padding: 10px 16px; border-radius: 10px; background: #2b313a; box-shadow: 0 8px 30px rgba(0,0,0,.5);
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; max-width: calc(100vw - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { background: #4a2124; }

.apply-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.apply-row .hint { margin: 0; flex: 1; }

/* ---------- 新增：画面音量、噪声门、面板头 ---------- */
button, a, input, select, label { touch-action: manipulation; }
.btn svg { width: 16px; height: 16px; }
#stage-vol-btn .i-off { display: none; }
#stage-vol-btn.off .i-on { display: none; }
#stage-vol-btn.off .i-off { display: block; color: var(--bad); }
.stage-vol {
  position: absolute; right: 12px; top: 54px; z-index: 5; width: min(300px, calc(100% - 24px));
  padding: 12px 14px; border-radius: 12px; background: rgba(21, 24, 29, .94); border: 1px solid var(--line);
  box-shadow: 0 10px 30px rgba(0,0,0,.5); display: grid; gap: 4px;
}
.stage-vol .btn { margin-top: 6px; }
.stage-vol .btn.on { color: var(--bad); border-color: #5a2a2a; }
.h-note { margin: 0 0 8px; font-size: 11px; color: var(--muted); opacity: .8; }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.panel-head h4 { margin: 0; }
.gate-box { padding: 10px 12px 8px; margin: 4px 0 10px; border-radius: 10px; background: var(--bg-2); border: 1px solid var(--line); }
.gate-head { display: flex; gap: 18px; flex-wrap: wrap; }
.gate-head .check { margin: 2px 0; }
.gate-meter { position: relative; height: 10px; border-radius: 5px; margin: 8px 0 6px; overflow: visible; }
.gate-meter b { border-radius: 5px; }
.gate-meter.closed b { background: #5b6572; }
.gate-meter i { position: absolute; top: -3px; bottom: -3px; width: 2px; left: 50%; background: var(--warn); border-radius: 1px; }
.gate-box.disabled .gate-meter i, .gate-box.disabled #gate-thr, .gate-box.disabled .vol-row { opacity: .45; }
.panel-backdrop { position: fixed; inset: 0; z-index: 19; background: rgba(0,0,0,.45); }
.member .mute-one { width: 26px; height: 26px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); display: grid; place-items: center; flex: none; }
.member .mute-one:hover { background: var(--surface-2); }
.member .mute-one.off { color: var(--bad); }
.member .mute-one svg { width: 15px; height: 15px; }
.unlock { display: inline-flex; gap: 8px; z-index: 6; }

/* 安全区（刘海屏 / 底部横条） */
.topbar { padding-top: max(10px, env(safe-area-inset-top)); padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
.controls { padding-bottom: max(12px, env(safe-area-inset-bottom)); padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }

/* 触屏：控件更大更好按 */
@media (pointer: coarse) {
  input[type=range] { height: 32px; }
  .member .vol-row input { height: 28px; }
  .icon-btn { width: 40px; height: 40px; }
  .icon-btn.sm { width: 34px; height: 34px; }
  .check input { width: 20px; height: 20px; }
  .check { min-height: 32px; }
}

/* ---------- 窄屏（平板竖屏 / 手机） ---------- */
@media (max-width: 860px) {
  .room-body { display: flex; flex-direction: column; overflow: hidden; }
  .stage { flex: none; width: 100%; aspect-ratio: 16 / 9; max-height: 60dvh; }
  .side { flex: 1; min-height: 0; overflow-y: auto; border-left: 0; border-top: 1px solid var(--line); -webkit-overflow-scrolling: touch; }
  .side-block.grow { flex: none; overflow: visible; }
}
@media (max-width: 640px) {
  .cards { grid-template-columns: 1fr; }
  #home { padding: max(24px, env(safe-area-inset-top)) 16px max(24px, env(safe-area-inset-bottom)); align-items: start; }
  .brand { margin-bottom: 20px; }
  .card { padding: 18px 16px; }
  /* iOS 输入框字号小于 16px 会自动放大页面 */
  input:not([type=range]):not([type=checkbox]), select { font-size: 16px; height: 44px; }
  .code-input { font-size: 24px !important; letter-spacing: 8px; }
  .topbar { flex-wrap: wrap; gap: 8px 10px; padding-bottom: 8px; }
  .room-title { flex-basis: 100%; }
  .invite { flex: 1; min-width: 0; }
  .top-actions .btn { padding: 0 10px; }
  .ctl span { display: none; }
  .ctl { padding: 0 16px; height: 48px; }
  .ctl-group .ctl.caret { padding: 0 12px; }
  .controls { gap: 10px; flex-wrap: nowrap; }
  .grid2 { grid-template-columns: 1fr; }
  .grid2 .span2 { grid-column: auto; }
  .stage-tools { top: 8px; right: 8px; gap: 4px; }
  .stage-vol { top: 52px; right: 8px; }
  .stats { top: 8px; left: 8px; font-size: 10px; padding: 6px 8px; }
  .h-note { display: none; }
  /* 弹出面板变成底部抽屉 */
  .panel, .panel.wide {
    left: 0; right: 0; bottom: 0; transform: none; width: 100%; max-height: 82dvh;
    border-radius: 18px 18px 0 0; border-bottom: 0; padding: 14px 16px max(18px, env(safe-area-inset-bottom));
  }
}
@media (min-width: 641px) { .panel-backdrop { display: none; } }

/* 手机横屏：画面和侧栏左右排列，尽量把高度留给画面 */
@media (orientation: landscape) and (max-height: 540px) {
  #room { grid-template-rows: auto 1fr auto; }
  .topbar { flex-wrap: nowrap; padding-top: 6px; padding-bottom: 6px; }
  .room-title { flex-basis: auto; }
  .room-title strong { max-width: 30vw; }
  .room-body { display: grid; grid-template-columns: minmax(0, 1fr) 260px; overflow: hidden; }
  .stage { aspect-ratio: auto; max-height: none; height: 100%; }
  .side { border-top: 0; border-left: 1px solid var(--line); overflow-y: auto; }
  .controls { padding-top: 6px; padding-bottom: max(6px, env(safe-area-inset-bottom)); }
  .ctl { height: 40px; }
  .ctl span { display: none; }
  .h-note { display: none; }
  #copy-link-text { display: none; }
}

/* ---------- 最近的房间 ---------- */
.recent { margin-bottom: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; }
.recent-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.recent-head h2 { margin: 0; font-size: 15px; }
.link-btn { border: 0; background: none; color: var(--muted); font-size: 13px; padding: 4px 6px; border-radius: 6px; }
.link-btn:hover { color: var(--text); background: var(--surface-2); }
.recent-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.recent-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; background: var(--bg-2); border: 1px solid var(--line); min-width: 0; }
.recent-item.ended { opacity: .55; }
.recent-main { flex: 1; min-width: 0; }
.recent-title { display: flex; align-items: center; gap: 6px; font-weight: 600; min-width: 0; }
.recent-title span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-meta { font-size: 12px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.recent-meta b { color: var(--text); font-weight: 600; letter-spacing: 1px; font-variant-numeric: tabular-nums; }
.recent-status { font-size: 11px; padding: 1px 6px; border-radius: 6px; flex: none; }
.recent-status.live { background: #173a2b; color: var(--good); }
.recent-status.ended { background: #2a2f37; color: var(--muted); }
.recent-item .btn { flex: none; }
.recent-del { width: 30px; height: 30px; flex: none; border: 0; border-radius: 8px; background: transparent; color: var(--muted); display: grid; place-items: center; }
.recent-del:hover { background: var(--surface-2); color: var(--bad); }
.recent-del svg { width: 14px; height: 14px; }
.check.remember { margin: -6px 0 12px; font-size: 13px; color: var(--muted); }
@media (max-width: 640px) { .recent { padding: 14px; } .recent-item { gap: 8px; padding: 10px; } }

/* ---------- 成员 / 聊天 标签页 ---------- */
.side-tabs { display: flex; gap: 4px; padding: 8px 12px 0; border-bottom: 1px solid var(--line); }
.side-tab { flex: 1; height: 38px; border: 0; background: none; color: var(--muted); font-weight: 600; font-size: 13px; border-bottom: 2px solid transparent; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.side-tab.active { color: var(--text); border-bottom-color: var(--accent); }
.badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
.chat-pane { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
.chat-list { list-style: none; margin: 0; padding: 0; flex: 1; min-height: 120px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; -webkit-overflow-scrolling: touch; }
.chat-msg { font-size: 13px; line-height: 1.45; word-break: break-word; }
.chat-msg .who { font-weight: 600; margin-right: 6px; }
.chat-msg .when { font-size: 11px; color: var(--muted); margin-left: 4px; }
.chat-msg .txt { display: block; color: var(--text); white-space: pre-wrap; }
.chat-msg.self .who::after { content: '（我）'; font-weight: 400; color: var(--muted); font-size: 11px; }
.chat-msg .htag { font-size: 10px; padding: 0 4px; border-radius: 4px; background: #22324d; color: #9cc0ff; margin-right: 4px; vertical-align: 1px; }
.chat-msg.sys { color: var(--muted); font-size: 12px; text-align: center; }
.chat-empty { color: var(--muted); font-size: 12px; text-align: center; margin: auto 0; }
.chat-form { display: flex; gap: 6px; flex: none; }
.chat-form input { flex: 1; min-width: 0; height: 36px !important; }
.chat-form .btn { height: 36px; }

/* 弹幕：画面左下角，几秒后淡出 */
.danmaku { position: absolute; left: 12px; bottom: 12px; right: 30%; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; pointer-events: none; z-index: 3; }
.dm { max-width: 100%; padding: 5px 10px; border-radius: 14px; background: rgba(10, 12, 15, .72); font-size: 14px; line-height: 1.4; color: #fff; word-break: break-word; animation: dm-in .2s ease-out; transition: opacity .4s; }
.dm b { margin-right: 6px; }
.dm.out { opacity: 0; }
@keyframes dm-in { from { opacity: 0; transform: translateY(6px); } }
.stage:fullscreen .dm { font-size: 18px; }

/* 悬浮聊天：画中画小窗和网页内浮层共用 */
.float-chat-root { display: flex; flex-direction: column; background: var(--surface); color: var(--text); font: 14px/1.5 var(--font); }
.float-chat { position: fixed; right: 20px; bottom: 90px; z-index: 30; width: 320px; height: 380px; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 48px rgba(0,0,0,.55); overflow: hidden; }
body.float-chat-root { margin: 0; height: 100vh; }
.fc-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 14px; border-bottom: 1px solid var(--line); background: var(--bg-2); cursor: move; user-select: none; flex: none; }
body.float-chat-root .fc-head { cursor: default; }
.fc-title { flex: 1; font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fc-list { padding: 10px 12px; flex: 1; }
.fc-form { padding: 8px 10px 10px; border-top: 1px solid var(--line); }
#float-chat-btn.on { background: var(--accent); }

@media (max-width: 860px) {
  .chat-list { max-height: 45dvh; }
  .chat-pane { padding-bottom: 12px; }
}
