/* Sestina Connect v0.1
   Mobile: LINE-like light chat list + chat.
   Desktop: DSH-like dark rail / chat / info. */

:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --text: #121417;
  --muted: #8a9099;
  --line: rgba(17, 24, 39, .08);
  --green: #06c755;
  --green-2: #05b34c;
  --bubble-user: #06c755;
  --bubble-other: #ffffff;
  --shadow: 0 10px 30px rgba(16, 24, 40, .08);
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 15px/1.55 "Segoe UI", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, textarea { font: inherit; }
.hidden { display: none !important; }

/* ---------- 手机 ---------- */
.app { min-height: 100vh; }
body.logged-out .app { display: none !important; }
.mobile-only { display: block; }
.desktop-only { display: none; }

/* 登录：密码 */
.login {
  min-height: 100vh; display: grid; place-items: center; padding: 24px;
  background:
    radial-gradient(600px 380px at 20% 0%, rgba(6,199,85,.18), transparent 60%),
    radial-gradient(500px 380px at 100% 100%, rgba(80,120,255,.12), transparent 60%),
    #f6f7f9;
}
.login-card {
  width: min(360px, 100%); background: #fff; border-radius: 24px;
  padding: 28px 22px; box-shadow: 0 20px 60px rgba(16,24,40,.12);
  text-align: center;
}
.login-mark {
  width: 58px; height: 58px; border-radius: 18px; margin: 0 auto 12px;
  display: grid; place-items: center; color: #fff; font-size: 28px; font-weight: 800;
  background: linear-gradient(135deg, #8ce6ad, #06c755);
  box-shadow: 0 12px 30px rgba(6,199,85,.28);
}
.login-card h1 { margin: 0; font-size: 22px; letter-spacing: -.4px; }
.login-card p { margin: 4px 0 18px; color: #8a9099; font-size: 12px; }
.login-card form { display: flex; flex-direction: column; gap: 9px; }
.login-card input {
  border: 1px solid rgba(17,24,39,.12); border-radius: 12px; padding: 12px 14px;
  background: #f5f7f8; color: #121417; outline: none; text-align: center; letter-spacing: 1px;
}
.login-card input:focus { border-color: rgba(6,199,85,.55); background: #fff; }
.login-card button { border: 0; border-radius: 12px; padding: 12px; background: #06c755; color: #fff; font-weight: 700; cursor: pointer; }
.login-error { min-height: 18px; color: #e5484d; font-size: 12px; margin-top: 8px; }
.login-card small { display: block; color: #8a9099; font-size: 10px; line-height: 1.6; margin-top: 8px; }
.mobile-list { min-height: 100vh; padding: 20px 18px 112px; background: var(--bg); }
.mobile-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.mobile-top h1 { margin: 0; font-size: 26px; letter-spacing: -.4px; }
.mobile-top p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.mobile-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, #8ce6ad, var(--green));
  color: #fff; font-weight: 700; font-size: 13px;
  box-shadow: 0 6px 16px rgba(6, 199, 85, .25);
}
.mobile-search { margin: 4px 0 14px; }
.mobile-search input {
  width: 100%; border: 0; border-radius: 12px; padding: 10px 14px;
  background: rgba(17, 24, 39, .05); color: var(--text); outline: none;
}
.conversation-list { display: flex; flex-direction: column; gap: 2px; }
.conversation {
  display: flex; gap: 12px; align-items: center;
  padding: 11px 8px; border-radius: 14px; cursor: pointer;
  border: 0; background: transparent; color: inherit; text-align: left; width: 100%;
}
.conversation:hover, .conversation.active { background: rgba(6, 199, 85, .07); }
.avatar {
  width: 48px; height: 48px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center; color: #fff; font-weight: 700;
  background: linear-gradient(135deg, #8ce6ad, var(--green));
}
.conversation .meta { min-width: 0; flex: 1; }
.conversation .meta b { display: block; font-size: 15px; color: var(--text); }
.conversation .meta small {
  display: block; color: var(--muted); font-size: 12px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.conversation .time { color: var(--muted); font-size: 11px; align-self: flex-start; padding-top: 3px; }
.mobile-empty { text-align: center; color: var(--muted); padding: 40px 20px; font-size: 12px; }
.mobile-empty strong { display: block; color: var(--text); font-size: 14px; margin-bottom: 4px; }

.bottom-nav {
  position: fixed; left: 14px; right: 14px; bottom: calc(12px + env(safe-area-inset-bottom));
  z-index: 30;
  display: flex; align-items: stretch;
  background: rgba(255, 255, 255, .92); backdrop-filter: blur(18px);
  border: 1px solid rgba(17, 24, 39, .08);
  border-radius: 999px; padding: 5px;
  box-shadow: 0 12px 30px rgba(16, 24, 40, .14);
  transition: opacity .18s ease;
}
body.chat-open .bottom-nav { display: none; }
.nav-pill {
  position: absolute; top: 5px; bottom: 5px; left: 5px;
  width: calc((100% - 10px) / 3);
  border-radius: 999px; background: rgba(17, 24, 39, .07);
  transform: translateX(calc(var(--nav-i, 0) * 100%));
  transition: transform .24s cubic-bezier(.22, .9, .28, 1);
  pointer-events: none;
}
.tab {
  flex: 1; min-width: 0; position: relative; z-index: 1;
  border: 0; background: transparent; color: #9aa1aa;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  font-size: 11px; cursor: pointer; padding: 9px 2px; border-radius: 999px;
}
.tab.active { color: #121417; font-weight: 650; }
.tab-icon { display: none; }
.tab.active { color: var(--green); }
.tab-icon { font-size: 18px; line-height: 1; }

.chat { display: none; flex-direction: column; height: 100vh; background: #eef1f4; }
body.chat-open .chat { display: flex; }
body.chat-open .mobile-list { display: none; }
.chat-header {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; background: rgba(255, 255, 255, .97);
  border-bottom: 1px solid var(--line); flex: 0 0 auto;
}
.chat-header .back {
  border: 0; background: transparent; color: var(--text);
  font-size: 30px; line-height: 1; padding: 0 4px 4px; cursor: pointer;
}
.chat-peer { display: flex; align-items: center; gap: 9px; min-width: 0; }
.peer-avatar {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  background: linear-gradient(135deg, #8ce6ad, var(--green)); color: #fff; font-weight: 700; font-size: 12px;
}
.chat-peer h2 { margin: 0; font-size: 15px; }
.chat-peer p { margin: 1px 0 0; color: var(--muted); font-size: 10px; display: flex; align-items: center; gap: 4px; }
.chat-actions { margin-left: auto; }
.pill { font-size: 10px; border: 1px solid var(--line); border-radius: 999px; padding: 2px 8px; color: var(--muted); margin-left: 4px; }

.messages {
  flex: 1; overflow: auto; padding: 16px 14px 12px;
  display: flex; flex-direction: column; gap: 9px;
}
.msg { max-width: 82%; display: flex; flex-direction: column; gap: 3px; }
.msg .bubble {
  padding: 9px 12px; border-radius: 16px; font-size: 14px;
  white-space: pre-wrap; word-break: break-word; box-shadow: 0 1px 1px rgba(16,24,40,.04);
}
.msg time { color: var(--muted); font-size: 9px; padding: 0 4px; }
.msg.user { align-self: flex-end; align-items: flex-end; }
.msg.user .bubble { background: var(--bubble-user); color: #fff; border-bottom-right-radius: 5px; }
.msg.assistant, .msg.system { align-self: flex-start; align-items: flex-start; }
.msg.assistant .bubble, .msg.system .bubble { background: var(--bubble-other); color: var(--text); border-bottom-left-radius: 5px; }
.empty {
  margin: auto; text-align: center; color: var(--muted); font-size: 12px;
  background: rgba(255,255,255,.7); border: 1px solid var(--line); border-radius: 16px; padding: 22px 18px;
}
.empty strong { display: block; color: var(--text); font-size: 15px; margin-bottom: 5px; }
.composer {
  display: flex; gap: 7px; align-items: flex-end;
  padding: 9px 10px calc(9px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .97); border-top: 1px solid var(--line);
}
.composer-icon {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line);
  background: #fff; color: var(--muted); font-size: 18px; cursor: pointer;
}
textarea {
  flex: 1; resize: none; min-height: 36px; max-height: 120px;
  padding: 8px 12px; border-radius: 18px; border: 1px solid var(--line);
  background: #f4f6f8; color: var(--text); outline: none;
}
textarea:focus { border-color: rgba(6, 199, 85, .45); background: #fff; }
.send-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--green); color: #fff; font-size: 17px; font-weight: 700;
}
.send-btn:disabled { opacity: .5; }
.hint { display: none; }
.mobile-tab-panel { position: fixed; inset: 0; z-index: 20; background: var(--bg); padding: 20px 18px 112px; overflow: auto; }
.panel-close {
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line);
  background: #fff; color: #8a9099; font-size: 22px; line-height: 1; cursor: pointer;
}
.rail-nav { display: flex; flex-direction: column; gap: 2px; padding: 2px 4px 8px; border-bottom: 1px solid rgba(17,24,39,.08); }
.rail-tab {
  border: 0; background: transparent; color: #8a9099; text-align: left;
  padding: 8px 10px; border-radius: 9px; cursor: pointer; font: inherit; font-size: 12px;
}
.rail-tab:hover { background: rgba(6,199,85,.06); }
.rail-tab.active { background: rgba(6,199,85,.10); color: #06a94a; font-weight: 650; }
.tab-body { display: grid; gap: 10px; }
.tab-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; box-shadow: var(--shadow); }
.tab-card h3 { margin: 0 0 6px; font-size: 14px; }
.tab-card p { margin: 0 0 6px; color: var(--text); font-size: 12px; }
.tab-card p:last-child { margin-bottom: 0; }
.tab-card .muted { color: var(--muted); }
.tab-card code { font-size: 11px; background: #f1f4f6; border-radius: 5px; padding: 1px 5px; }
.mini-form { display: flex; flex-direction: column; gap: 7px; }
.mini-form input {
  border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px;
  background: #f5f7f8; color: var(--text); outline: none;
}
.mini-form input:focus { border-color: rgba(6,199,85,.5); background: #fff; }
.mini-form .primary { border: 0; border-radius: 9px; padding: 9px; background: var(--green); color: #fff; font-weight: 650; cursor: pointer; }
.form-msg { min-height: 14px; color: #e5484d; font-size: 10px; }
.tab-card .danger {
  border: 1px solid rgba(229,72,77,.28); border-radius: 9px; padding: 8px 11px;
  background: rgba(229,72,77,.06); color: #d9363e; font: inherit; cursor: pointer;
}

/* ---------- 桌面：DSH 风格 ---------- */
@media (min-width: 900px) {
  body { background: #0b1020; color: #eaf0ff; }
  .mobile-only { display: none !important; }
  .desktop-only { display: flex !important; }
  .app {
    display: grid; grid-template-columns: 248px minmax(0, 1fr);
    height: 100vh; min-height: 0;
    background:
      radial-gradient(900px 600px at 15% 0%, rgba(80, 120, 255, .14), transparent 60%),
      radial-gradient(800px 500px at 100% 100%, rgba(150, 80, 255, .1), transparent 60%),
      #0b1020;
  }
  .rail {
    flex-direction: column; gap: 10px; padding: 20px 14px;
    border-right: 1px solid rgba(150, 180, 255, .14);
    background: rgba(9, 14, 30, .6); backdrop-filter: blur(18px);
    min-height: 0;
  }
  .brand { display: flex; gap: 10px; align-items: center; padding: 0 6px 12px; }
  .mark {
    width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center;
    background: linear-gradient(135deg, #6ea8ff, #9b7bff); color: #fff; font-weight: 800;
    box-shadow: 0 8px 24px rgba(90, 120, 255, .35);
  }
  .brand strong { display: block; font-size: 14px; }
  .brand small { color: #8ea0c8; font-size: 11px; }
  .rail-label { color: #8ea0c8; font-size: 10px; letter-spacing: 1px; padding: 0 8px; }
  .conversation { color: #eaf0ff; }
  .conversation:hover, .conversation.active { background: rgba(110, 168, 255, .12); }
  .conversation .meta b { color: #eaf0ff; }
  .conversation .meta small, .conversation .time { color: #8ea0c8; }
  .avatar { background: rgba(110, 168, 255, .18); color: #bcd4ff; }
  .rail-links { display: flex; flex-direction: column; gap: 6px; padding: 8px; margin-top: 8px; border-top: 1px solid rgba(150,180,255,.12); }
  .rail-links a, .rail-links span { color: #8ea0c8; font-size: 11px; text-decoration: none; }
  .rail-links a:hover { color: #bcd4ff; }
  .rail-footer { margin-top: auto; display: flex; align-items: center; gap: 7px; color: #8ea0c8; font-size: 11px; padding: 8px; }
  .dot { width: 7px; height: 7px; border-radius: 50%; background: #f0b35a; display: inline-block; }
  .dot.ok { background: #55d79a; box-shadow: 0 0 9px rgba(85,215,154,.7); }
  .dot.bad { background: #ff6b7a; }
  .chat {
    display: flex !important; height: 100vh; min-width: 0;
    background: rgba(11, 16, 32, .35);
  }
  .chat-header {
    background: rgba(11, 16, 32, .55); border-bottom: 1px solid rgba(150, 180, 255, .14);
    backdrop-filter: blur(14px); padding: 18px 24px;
  }
  .chat-header .back { display: none; }
  .peer-avatar { width: 38px; height: 38px; background: rgba(110, 168, 255, .18); color: #bcd4ff; }
  .chat-peer h2 { font-size: 17px; }
  .chat-peer p { color: #8ea0c8; font-size: 11px; }
  .pill { border-color: rgba(150,180,255,.18); color: #8ea0c8; }
  .messages { padding: 24px 28px; gap: 13px; }
  .msg { max-width: min(680px, 78%); }
  .msg .bubble { background: rgba(255,255,255,.06); border: 1px solid rgba(150,180,255,.14); color: #eaf0ff; box-shadow: none; }
  .msg.user .bubble { background: linear-gradient(135deg, #3d6dff, #7b5cff); border: 0; color: #fff; }
  .msg time { color: #8ea0c8; font-size: 10px; }
  .empty { background: rgba(255,255,255,.04); border-color: rgba(150,180,255,.14); color: #8ea0c8; }
  .empty strong { color: #eaf0ff; }
  .composer { background: rgba(11, 16, 32, .7); border-top-color: rgba(150,180,255,.14); padding: 14px 24px 10px; }
  .composer-icon { background: rgba(255,255,255,.04); border-color: rgba(150,180,255,.14); color: #8ea0c8; }
  textarea { background: rgba(255,255,255,.04); border-color: rgba(150,180,255,.14); color: #eaf0ff; }
  textarea:focus { background: rgba(255,255,255,.06); border-color: rgba(110,168,255,.55); }
  .send-btn { background: linear-gradient(135deg, #6ea8ff, #9b7bff); }
  .hint { display: block; color: #8ea0c8; font-size: 10px; padding: 0 24px 10px; background: rgba(11,16,32,.7); }
  .info {
    flex-direction: column; gap: 10px; padding: 26px 20px;
    border-left: 1px solid rgba(150, 180, 255, .14);
    background: rgba(9, 14, 30, .55); backdrop-filter: blur(18px);
  }
  .info-avatar {
    width: 58px; height: 58px; border-radius: 50%; display: grid; place-items: center;
    background: rgba(110,168,255,.18); color: #bcd4ff; font-weight: 700; font-size: 20px; margin: 4px auto 0;
  }
  .info h3 { margin: 2px 0 0; text-align: center; font-size: 16px; }
  .info .muted { margin: 0 0 6px; text-align: center; color: #8ea0c8; font-size: 11px; }
  .info-card {
    border: 1px solid rgba(150,180,255,.14); border-radius: 12px;
    padding: 10px 12px; display: grid; gap: 7px; background: rgba(255,255,255,.03);
  }
  .info-card div { display: flex; justify-content: space-between; gap: 8px; font-size: 11px; color: #8ea0c8; }
  .info-card b { color: #eaf0ff; font-weight: 600; }
  .info-link { color: #9ec2ff; font-size: 11px; text-decoration: none; padding: 4px 2px; }
  .info-note { color: #8ea0c8; font-size: 10px; line-height: 1.6; margin-top: auto; }
}
@media (min-width: 900px) and (max-width: 1120px) {
  .app { grid-template-columns: 220px minmax(0, 1fr); }
  .info { display: none !important; }
}

/* 统一浅色：桌面与手机同一套 LINE 风格（覆盖上面的深色桌面） */
@media (min-width: 900px) {
  body { background: #f6f7f9; color: #121417; }
  .app { background: #f6f7f9; }
  .rail { background: #fff; border-right-color: rgba(17,24,39,.08); backdrop-filter: none; }
  .brand strong { color: #121417; }
  .brand small, .rail-label, .rail-footer, .rail-links a, .rail-links span { color: #8a9099; }
  .conversation .meta b, .chat-peer h2, .info h3 { color: #121417; }
  .conversation .meta small, .conversation .time, .chat-peer p { color: #8a9099; }
  .conversation:hover, .conversation.active { background: rgba(6,199,85,.07); }
  .avatar { background: rgba(6,199,85,.12); color: #06a94a; }
  .chat { background: #eef1f4; }
  .chat-header { background: #fff; border-bottom-color: rgba(17,24,39,.08); backdrop-filter: none; }
  .pill { border-color: rgba(17,24,39,.10); color: #8a9099; }
  .messages { background: #eef1f4; }
  .msg .bubble { background: #fff; color: #121417; border: 1px solid rgba(17,24,39,.06); box-shadow: 0 1px 1px rgba(16,24,40,.04); }
  .msg.user .bubble { background: #06c755; color: #fff; border: 0; }
  .msg time { color: #8a9099; }
  .empty { background: rgba(255,255,255,.75); border-color: rgba(17,24,39,.08); color: #8a9099; }
  .empty strong { color: #121417; }
  .composer { background: #fff; border-top-color: rgba(17,24,39,.08); }
  .composer-icon { background: #fff; border-color: rgba(17,24,39,.10); color: #8a9099; }
  textarea { background: #f4f6f8; border-color: rgba(17,24,39,.10); color: #121417; }
  textarea:focus { background: #fff; border-color: rgba(6,199,85,.45); }
  .send-btn { background: #06c755; }
  .hint { background: #fff; color: #8a9099; }
  .info { background: #fff; border-left-color: rgba(17,24,39,.08); backdrop-filter: none; }
  .info-avatar { background: rgba(6,199,85,.12); color: #06a94a; }
  .info .muted, .info-card div, .info-note { color: #8a9099; }
  .info-card { background: #f7f8fa; border-color: rgba(17,24,39,.08); }
  .info-card b { color: #121417; }
  .info-link { color: #06a94a; }
  .mark { background: linear-gradient(135deg, #8ce6ad, #06c755); box-shadow: 0 8px 24px rgba(6,199,85,.25); }
}

@media (min-width: 900px) {
  .mobile-tab-panel {
    left: auto; right: 40px; top: 76px; bottom: auto;
    width: min(520px, calc(100vw - 320px));
    max-height: calc(100vh - 120px);
    padding: 16px; border: 1px solid rgba(17,24,39,.08);
    border-radius: 18px; background: #fff; color: #121417;
    box-shadow: 0 24px 70px rgba(16,24,40,.16); z-index: 40;
  }
  .mobile-tab-panel .mobile-top h1 { color: #121417; font-size: 22px; }
  .mobile-tab-panel .mobile-top p { color: #8a9099; }
  .mobile-tab-panel .tab-card { background: #f7f8fa; border-color: rgba(17,24,39,.08); box-shadow: none; }
  .mobile-tab-panel .tab-card h3 { color: #121417; }
  .mobile-tab-panel .tab-card p { color: #121417; }
  .mobile-tab-panel .tab-card .muted { color: #8a9099; }
}

/* v0.3：会话列表 + 新建按钮（浅色） */
.rail-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.new-chat {
  width: 26px; height: 26px; border-radius: 9px; cursor: pointer;
  border: 1px solid rgba(0, 0, 0, .12); background: #fff; color: #333;
  font: 16px/1 "Segoe UI", sans-serif; display: grid; place-items: center; padding: 0;
}
.new-chat:hover { background: #eef7f1; border-color: rgba(6, 199, 85, .35); }
.mobile-top .new-chat { flex: 0 0 auto; }
.conversation .meta b, .conversation .meta small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* v0.3：聊天页也保留底部三个文字 tab */
body.chat-open .bottom-nav { display: flex; }
body.chat-open .chat { padding-bottom: 78px; }

/* v0.3：远程只读屏幕 */
.remote-view { width: 100%; border-radius: 12px; background: #000; display: block; min-height: 160px; object-fit: contain; }
.remote-actions { display: flex; align-items: center; gap: 10px; margin-top: 10px; flex-wrap: wrap; }
.remote-actions .primary { border: 0; border-radius: 9px; padding: 9px 13px; background: var(--green); color: #fff; font-weight: 650; cursor: pointer; }

/* v0.3：远程 tab 结构 */
.remote-addrs { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--line); }
.stage-list { margin: 6px 0 0; padding-left: 18px; color: var(--text); font-size: 12px; line-height: 1.7; }

/* v0.3：手机远程桌面四控制 */
.remote-controls { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 10px; }
.remote-controls button {
  border: 1px solid var(--line); border-radius: 9px; padding: 8px 4px;
  background: #fff; color: var(--text); font-size: 11px; cursor: pointer;
}
.remote-controls button:hover { background: #eef7f1; }
.ghost { border: 1px solid var(--line); border-radius: 9px; padding: 8px 11px; background: #fff; color: var(--text); cursor: pointer; }

/* 桌面：设置/设备/远程显示在右侧同一栏，不浮层 */
@media (min-width: 900px) {
  body.desk-tab #mobileTabPanel.mobile-only {
    display: block !important;
    grid-column: 3; grid-row: 1;
    height: 100vh; overflow: auto;
    background: #f6f7f9; border-left: 1px solid var(--line);
    padding: 14px 12px;
  }
  body.desk-tab #mobileTabPanel .mobile-top { display: none; }
  body.desk-tab #mobileTabPanel .tab-card { margin-bottom: 10px; }
}

/* 修正：桌面右侧栏铺满第 3 列 */
@media (min-width: 900px) {
  body.desk-tab #mobileTabPanel.mobile-only {
    position: fixed; top: 0; right: 0; bottom: 0; left: auto;
    width: 270px; max-height: none; height: 100vh;
    border-radius: 0; border-left: 1px solid var(--line); border-top: 0; border-right: 0; border-bottom: 0;
    box-shadow: none; padding: 14px 12px; overflow: auto;
    background: #f6f7f9;
  }
}

/* 12:5x：设备/远程/设置显示在中间聊天区（不是右栏） */
@media (min-width: 1120px) {
  body.desk-tab .info { display: flex !important; }
  body.desk-tab #mobileTabPanel.mobile-only {
    display: block !important;
    position: fixed !important; top: 0; bottom: 0; left: 248px; right: 270px;
    width: auto; height: 100vh; max-height: none;
    border: 0; border-radius: 0; box-shadow: none;
    background: #f6f7f9; padding: 20px 26px; overflow: auto; z-index: 15;
  }
  body.desk-tab #mobileTabPanel .mobile-top { display: none; }
}
@media (min-width: 900px) and (max-width: 1119px) {
  body.desk-tab .info { display: none !important; }
  body.desk-tab #mobileTabPanel.mobile-only {
    display: block !important;
    position: fixed !important; top: 0; bottom: 0; left: 220px; right: 0;
    width: auto; height: 100vh; max-height: none;
    border: 0; border-radius: 0; box-shadow: none;
    background: #f6f7f9; padding: 18px 22px; overflow: auto; z-index: 15;
  }
  body.desk-tab #mobileTabPanel .mobile-top { display: none; }
}

/* 13:xx：远程键盘/鼠标 */
.remote-keyboard { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.remote-keyboard input { flex: 1; min-width: 0; border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; background: #fff; outline: none; }
.remote-keyboard button { border: 0; border-radius: 9px; padding: 9px 14px; background: var(--green); color: #fff; font-weight: 650; cursor: pointer; }
.remote-controls button.active { background: var(--green); color: #fff; border-color: var(--green); }

/* 13:xx：剪贴板 + 更多按键 */
.remote-clip, .remote-keys { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; flex: 1 0 100%; }
.remote-clip button, .remote-keys button { border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; background: #fff; color: var(--text); font-size: 11px; cursor: pointer; }
.remote-clip button:hover, .remote-keys button:hover { background: #eef7f1; }


/* 2026-11-08（P5.5）：会话条 —— 输入框下面一行，和 DSH 桌面同一套信息 */
.composer-stats{
  display:flex;align-items:center;gap:6px;flex-wrap:wrap;
  padding:2px 14px 6px;font-size:11.5px;line-height:1.4;
  color:var(--dim,#8a93a8);font-variant-numeric:tabular-nums;
  user-select:none;
}
.composer-stats .cs-sep{opacity:.45}
.composer-stats .cs-gap{flex:1;min-width:8px}
.composer-stats .warn{color:#e8b84b}
.composer-stats .bad{color:#e85050}


/* 2026-11-08（用户要求）：
   ① 页面本身不滚、不能拖（只有消息区滚）；
   ② 浏览器那层滚动条隐藏（窗口边不再多一条）；
   ③ 桌面点「设备/远程/设置」时，面板盖满右侧（不再留 270px 把聊天挤成一条）。 */
/* ⚠️ 只在桌面端锁滚动：手机端列表还要滚，别一起锁死 */
@media (min-width: 900px) {
  html, body { height: 100%; overflow: hidden; overscroll-behavior: none; }
  html::-webkit-scrollbar, body::-webkit-scrollbar { width: 0; height: 0; }
}
/* 设备/设置/远程那个面板：滚动条也收细，别在窗口右边再来一条宽的 */
#mobileTabPanel::-webkit-scrollbar { width: 6px; }
#mobileTabPanel::-webkit-scrollbar-thumb { background: rgba(80, 90, 110, .28); border-radius: 3px; }
#mobileTabPanel { scrollbar-width: thin; scrollbar-color: rgba(80,90,110,.28) transparent; }
.app { height: 100vh; overflow: hidden; }
.chat { min-height: 0; }
.messages { min-height: 0; }
/* 消息区自己的滚动条留一条细的（位置感），但不占宽度 */
.messages::-webkit-scrollbar { width: 6px; }
.messages::-webkit-scrollbar-thumb { background: rgba(150, 180, 255, .28); border-radius: 3px; }
.messages { scrollbar-width: thin; scrollbar-color: rgba(150,180,255,.28) transparent; }
/* 桌面打开标签页时，聊天让位，标签页独占右侧 */
body.desk-tab .chat { display: none !important; }

/* 会话行上的删除按钮（悬停出现） */
.conversation { position: relative; }


/* 2026-11-08：会话右键菜单（固定在会话右下角） */
.conv-menu {
  position: fixed; z-index: 9999; width: 132px; padding: 6px;
  border-radius: 10px; background: #1b2233;
  border: 1px solid rgba(150, 180, 255, .18);
  box-shadow: 0 12px 32px rgba(0, 0, 0, .45);
  display: flex; flex-direction: column; gap: 2px;
}
.conv-menu button {
  border: 0; background: transparent; color: #eaf0ff; text-align: left;
  padding: 7px 10px; border-radius: 8px; font-size: 12.5px; cursor: pointer;
}
.conv-menu button:hover { background: rgba(110, 168, 255, .16); }
.conv-menu button.danger { color: #ff8a95; }
.conv-menu button.danger:hover { background: rgba(232, 80, 80, .18); }
