/* ============================================================================
   apple.css —— Apple 设计语言层（2026-11-06）
   ----------------------------------------------------------------------------
   取代 miuix.css / 液态玻璃两套视觉：纯色、发丝线、轻投影、18px 圆角、
   #0071e3 主色、SF 字体栈。加载顺序：最后一张，覆盖 paper/flat/modern/mobile
   与脚本注入的样式（高价值窗等）。
   结构约定：所有规则带 body.paper 前缀（与旧皮肤同一作用域），只改视觉与
   交互手感，不改 DOM / JS 状态机。
   ========================================================================== */

/* ══ 1. 设计令牌 ═══════════════════════════════════════════════════════════ */
body.paper {
  --ap-bg: #f5f5f7;
  --ap-surface: #ffffff;
  --ap-surface-2: #fbfbfd;
  --ap-fill: #f5f5f7;
  --ap-fill-2: #ececf0;
  --ap-text: #1d1d1f;
  --ap-text-2: #6e6e73;
  --ap-text-3: #86868b;
  --ap-line: rgba(0, 0, 0, .08);
  --ap-line-2: rgba(0, 0, 0, .14);
  --ap-blue: #0071e3;
  --ap-blue-hover: #0077ed;
  --ap-blue-soft: rgba(0, 113, 227, .10);
  --ap-green: #34c759;
  --ap-red: #ff3b30;
  --ap-orange: #ff9f0a;
  --ap-shadow-sm: 0 2px 8px rgba(0, 0, 0, .04);
  --ap-shadow: 0 4px 12px rgba(0, 0, 0, .08);
  --ap-shadow-lg: 0 8px 24px rgba(0, 0, 0, .12);
  --ap-radius: 18px;
  --ap-radius-sm: 12px;
  --ap-ease: cubic-bezier(.25, .1, .25, 1);

  /* 旧 token 整体翻新：paper/flat/modern 里所有 var(--paper*) / var(--ink*)
     的部件自动跟着走，不必逐条重写。 */
  --paper: #f5f5f7;
  --paper-2: #ffffff;
  --paper-3: #f5f5f7;
  --ink: #1d1d1f;
  --ink-2: #6e6e73;
  --ink-3: #86868b;
  --rule: rgba(0, 0, 0, .08);
  --rule-2: rgba(0, 0, 0, .14);
  --alarm: #ff3b30;
  --good: #34c759;
  --amber: #ff9f0a;
  --brass: #8a7a52;

  --mono: "SF Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Cascadia Mono", monospace;

  --bg: #f5f5f7;
  --panel: #ffffff;
  --border: rgba(0, 0, 0, .08);
  --accent: #0071e3;
  --green: #34c759;
  --red: #ff3b30;
  --t1: #1d1d1f;
  --t2: #6e6e73;
  --t3: #86868b;
  --blur: none;
  --r: 18px;
  --shadow: 0 4px 12px rgba(0, 0, 0, .08);

  background: #f5f5f7 !important;
  color: #1d1d1f !important;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display",
    "Helvetica Neue", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body.paper *,
body.paper *::before,
body.paper *::after { text-shadow: none !important; }
body.paper ::selection { background: rgba(0, 113, 227, .18); color: #1d1d1f; }
body.paper :focus-visible {
  outline: 3px solid rgba(0, 113, 227, .30);
  outline-offset: 2px;
}
body.paper button,
body.paper input,
body.paper select { font-family: inherit; }

/* 背景层：去掉网格/光斑/玻璃 */
body.paper .bg-container {
  background: #f5f5f7 !important;
  background-image: none !important;
}
body.paper .blob { display: none !important; }

/* 细滚动条（Apple 风格） */
body.paper ::-webkit-scrollbar { width: 8px; height: 8px; }
body.paper ::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, .18); border-radius: 999px;
  border: 2px solid transparent; background-clip: content-box;
}
body.paper ::-webkit-scrollbar-thumb:hover { background: rgba(0, 0, 0, .30); background-clip: content-box; }
body.paper ::-webkit-scrollbar-track { background: transparent; }

/* ══ 2. 入场页 ═══════════════════════════════════════════════════════════════ */
body.paper .landing-overlay {
  background: #f5f5f7 !important;
  background-image: none !important;
  padding: 24px !important;
}
body.paper .landing-card {
  width: min(420px, 100%) !important;
  background: #ffffff !important;
  border: 0 !important;
  border-top: 0 !important;
  border-radius: 28px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .12) !important;
  padding: 44px 40px 36px !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  animation: apple-fade-in .45s cubic-bezier(.25, .1, .25, 1) both !important;
}
body.paper .landing-title {
  font-family: inherit !important;
  font-size: 36px !important;
  font-weight: 600 !important;
  letter-spacing: -.02em !important;
  text-indent: 0 !important;
  line-height: 1.08 !important;
  margin: 0 0 10px !important;
  color: #1d1d1f !important;
  background: none !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
  filter: none !important;
  animation: none !important;
}
body.paper .landing-title::after { display: none !important; }
body.paper .landing-desc {
  color: #6e6e73 !important;
  font-size: 15px !important;
  line-height: 1.5 !important;
  letter-spacing: -.01em !important;
  margin: 0 0 28px !important;
}
body.paper .otp-wrap { gap: 10px !important; margin-bottom: 18px !important; padding: 0 !important; }
body.paper .otp-box {
  width: 48px !important;
  height: 56px !important;
  background: #f5f5f7 !important;
  border: 1px solid transparent !important;
  border-radius: 14px !important;
  color: #1d1d1f !important;
  font-family: var(--mono) !important;
  font-size: 22px !important;
  font-weight: 600 !important;
  text-align: center !important;
  transition: background .2s var(--ap-ease), box-shadow .2s var(--ap-ease) !important;
}
body.paper .otp-box:focus {
  background: #ffffff !important;
  border-color: rgba(0, 113, 227, .55) !important;
  box-shadow: 0 0 0 4px rgba(0, 113, 227, .14) !important;
}
body.paper .landing-btn {
  width: 100% !important;
  height: 50px !important;
  margin-top: 4px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: #0071e3 !important;
  color: #ffffff !important;
  font-size: 16px !important;
  font-weight: 500 !important;
  letter-spacing: -.01em !important;
  box-shadow: none !important;
  transition: background .2s var(--ap-ease), transform .2s var(--ap-ease) !important;
}
body.paper .landing-btn:hover { background: #0077ed !important; }
body.paper .landing-btn:active { transform: scale(.98) !important; }
body.paper .landing-btn[data-state="retry"] {
  background: #f5f5f7 !important;
  color: #1d1d1f !important;
  border: 0 !important;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .10) !important;
}
body.paper .landing-btn[data-state="retry"]:hover { background: #ececf0 !important; color: #1d1d1f !important; }
body.paper .landing-btn.is-busy::after { border-color: rgba(255, 255, 255, .35); border-top-color: #fff; }
body.paper .error-msg { color: #ff3b30 !important; font-size: 13px !important; }

/* ══ 3. 顶栏（mx-topmenu 页面隐藏，map.html 等老页仍用）════════════════════ */
html.mx-topmenu body.paper .topbar,
html.mx-topmenu body.paper .sidebar,
html.mx-topmenu body.paper .sidebar-toggle { display: none !important; }

body.paper .topbar {
  height: 52px !important;
  padding: 0 16px !important;
  gap: 8px !important;
  background: #ffffff !important;
  border-bottom: 0 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .04) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
body.paper .topbar-pill {
  height: 32px;
  padding: 0 14px;
  border: 0 !important;
  border-radius: 999px !important;
  background: #f5f5f7 !important;
  color: #1d1d1f !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  transition: background .2s var(--ap-ease), transform .2s var(--ap-ease) !important;
}
body.paper .topbar-pill:hover { background: #ececf0 !important; color: #1d1d1f !important; transform: none !important; box-shadow: none !important; }
body.paper .topbar-pill:active { transform: scale(.97) !important; }
body.paper .topbar-pill.active { background: #0071e3 !important; color: #fff !important; }
body.paper .top-room { background: #f5f5f7 !important; border: 0 !important; border-radius: 999px !important; height: 32px !important; }
body.paper .top-room .tr-k { color: #86868b !important; }
body.paper .top-room .tr-v { color: #1d1d1f !important; }
body.paper .map-tabs { gap: 2px !important; }
body.paper .map-tab {
  border-radius: 999px !important;
  color: #6e6e73 !important;
  font-weight: 500 !important;
  transition: background .2s var(--ap-ease), color .2s var(--ap-ease) !important;
}
body.paper .map-tab:hover { background: #f5f5f7 !important; color: #1d1d1f !important; }
body.paper .map-tab.active { background: #1d1d1f !important; color: #fff !important; box-shadow: none !important; }
body.paper .topbar-sep { background: rgba(0, 0, 0, .08) !important; }
body.paper .topbar > .tele {
  display: inline-flex !important;
  align-items: center;
  gap: 6px;
  height: 28px !important;
  padding: 0 10px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: #f5f5f7 !important;
  color: #6e6e73 !important;
  font-family: var(--mono) !important;
  font-size: 11px !important;
  box-shadow: none !important;
}
body.paper .view-switch { background: #f5f5f7 !important; border-radius: 999px !important; padding: 3px !important; }
body.paper .view-switch .vs-btn { border-radius: 999px !important; color: #6e6e73 !important; font-weight: 500 !important; }
body.paper .view-switch .vs-btn.active { background: #fff !important; color: #1d1d1f !important; box-shadow: 0 1px 3px rgba(0,0,0,.12) !important; }

/* ══ 4. 左侧面板（桌面 / 老页）═════════════════════════════════════════════ */
body.paper .sidebar {
  top: 68px !important;
  left: 16px !important;
  width: 296px !important;
  padding: 8px !important;
  gap: 0 !important;
  background: #ffffff !important;
  border: 0 !important;
  border-radius: 20px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .08) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
body.paper .panel { padding: 10px 12px !important; }
body.paper .panel + .panel { border-top: 1px solid rgba(0, 0, 0, .08) !important; padding-top: 12px !important; margin-top: 2px !important; }
body.paper .panel-title {
  font-size: 13px !important;
  font-weight: 600 !important;
  letter-spacing: -.01em !important;
  color: #1d1d1f !important;
  margin-bottom: 10px !important;
}
body.paper .panel-title::before { display: none !important; }
body.paper .pt-note { font-size: 11px !important; color: #86868b !important; font-weight: 400 !important; }
body.paper .sidebar-toggle {
  background: #ffffff !important;
  border: 0 !important;
  border-radius: 999px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .10) !important;
  color: #6e6e73 !important;
}

/* ══ 5. 状态胶囊 + 悬浮菜单（index 的主交互）════════════════════════════════ */
body.paper .mx-stat {
  display: none;
  align-items: center;
  gap: 9px;
  position: fixed;
  z-index: 1400;
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100vw - 20px);
  box-sizing: border-box;
  top: calc(var(--sa-t, 0px) + 10px);
  height: 40px;
  padding: 0 16px 0 14px;
  border-radius: 999px;
  background: #ffffff;
  border: 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .10);
  color: #1d1d1f;
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform .18s var(--ap-ease), box-shadow .18s var(--ap-ease);
}
html.mx-topmenu body.paper .mx-stat { display: inline-flex; }
body.paper .mx-stat:hover { box-shadow: 0 8px 24px rgba(0, 0, 0, .12); }
body.paper .mx-stat:active { transform: translateX(-50%) scale(.97); }
body.paper .ms-dot { width: 8px; height: 8px; border-radius: 50%; background: #86868b; transition: background .2s; }
body.paper .ms-dot.ok { background: #34c759; box-shadow: none; }
body.paper .ms-dot.wait { background: #ff9f0a; box-shadow: none; }
body.paper .ms-dot.bad { background: #ff3b30; box-shadow: none; }
body.paper .ms-n { display: inline-flex; align-items: baseline; gap: 4px; }
body.paper .ms-n b { font-family: var(--mono); font-size: 14px; font-weight: 600; line-height: 1; color: #1d1d1f; font-variant-numeric: tabular-nums; }
body.paper .ms-n i { font-style: normal; font-size: 11px; color: #86868b; }
body.paper .ms-n.foe b { color: #ff3b30; }
body.paper .ms-n.evac b { color: #0071e3; }
/* 观看人数（上限 4）：满员变琥珀，提醒第 5 个人进不来 */
body.paper .ms-n.view b { color: #34c759; }
body.paper .ms-n.view.full b { color: #ff9f0a; }
body.paper .ms-n.view i { white-space: nowrap; }
body.paper .ms-line { width: 1px; height: 14px; background: rgba(0, 0, 0, .10); }
body.paper .ms-age, body.paper .ms-fps { font-family: var(--mono); font-size: 11px; color: #86868b; }
body.paper .ms-age.ok { color: #34c759; }
body.paper .ms-age.warn { color: #ff9f0a; }
body.paper .ms-age.bad { color: #ff3b30; }
body.paper .ms-caret { font-size: 10px; color: #86868b; margin-left: 1px; }

body.paper .mx-menu-wrap { position: fixed; inset: 0; z-index: 9700; display: none; }
body.paper .mx-menu-wrap.open { display: block; }
body.paper .mx-menu-scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, .18); backdrop-filter: none; -webkit-backdrop-filter: none; }

body.paper .mx-menu,
body.paper .mx-menu2 {
  position: absolute;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #ffffff;
  border: 0;
  border-radius: 22px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
  color: #1d1d1f;
  font-size: 13px;
  animation: apple-menu-in .22s var(--ap-ease) both;
}
body.paper .mx-menu { width: min(360px, calc(100vw - 24px)); min-height: 0; max-height: min(680px, calc(100dvh - 32px)); }
body.paper .mx-menu2 { display: none; width: min(560px, calc(100vw - 24px)); max-height: min(680px, calc(100dvh - 32px)); }
body.paper .mx-menu2.on { display: flex; }
body.paper .mx-menu2[hidden] { display: none !important; }

@keyframes apple-menu-in {
  from { opacity: 0; transform: translateY(-6px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* 一级菜单头部 */
body.paper .mm1-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 16px 10px;
  border-bottom: 0;
}
body.paper .mm-title { font-size: 13px; color: #6e6e73; white-space: nowrap; }
body.paper .mm-title b { font-family: var(--mono); font-size: 15px; font-weight: 600; color: #1d1d1f; letter-spacing: .02em; }
body.paper .mm-statebox { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 999px; background: #f5f5f7; }
body.paper .mm-state { font-size: 11.5px; font-weight: 500; color: #6e6e73; white-space: nowrap; }
body.paper .mm-grow { flex: 1 1 auto; }
body.paper .mm-online { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; color: #86868b; }
body.paper .mm-online b { font-family: var(--mono); font-weight: 600; color: #6e6e73; }
body.paper .mm-od { width: 6px; height: 6px; border-radius: 50%; background: #c7c7cc; }
body.paper .mm-online.live .mm-od { background: #34c759; }
body.paper .mm-tele { font-family: var(--mono); font-size: 11px; color: #86868b; }
body.paper .mm-x {
  width: 30px; height: 30px; min-width: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 50%;
  background: #f5f5f7; color: #6e6e73;
  font: inherit; font-size: 13px; line-height: 1; cursor: pointer;
  transition: background .2s var(--ap-ease), color .2s var(--ap-ease);
}
body.paper .mm-x:hover { background: #ececf0; color: #1d1d1f; }
body.paper .mm-x:active { transform: scale(.94); }

/* 平面 / 3D：iOS 分段控件 */
body.paper .mx-menu-seg {
  display: flex; gap: 2px; margin: 4px 16px 12px; padding: 3px;
  width: auto; box-sizing: border-box;
  border-radius: 10px; background: #f5f5f7; border: 0;
}
body.paper .mx-menu-seg button {
  flex: 1 1 0; height: 32px; border: 0; border-radius: 8px;
  background: transparent; color: #6e6e73;
  font: inherit; font-size: 13px; font-weight: 500; cursor: pointer;
  transition: background .2s var(--ap-ease), color .2s var(--ap-ease), box-shadow .2s var(--ap-ease);
  -webkit-tap-highlight-color: transparent;
}
body.paper .mx-menu-seg button.on {
  background: #ffffff; color: #1d1d1f; font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
}

/* 快捷动作：2×2 网格 */
body.paper .mm-quick {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  padding: 0 16px 12px;
}
body.paper #mxMenu .mm-quick { grid-template-columns: 1fr 1fr; }
body.paper .mx-btn {
  height: 44px; padding: 0 14px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; border-radius: 12px;
  background: #f5f5f7; color: #1d1d1f;
  font: inherit; font-size: 13px; font-weight: 500; cursor: pointer;
  transition: background .2s var(--ap-ease), transform .2s var(--ap-ease);
  -webkit-tap-highlight-color: transparent;
}
body.paper .mx-btn:hover { background: #ececf0; }
body.paper .mx-btn:active { transform: scale(.97); }
body.paper .mx-btn.on { background: rgba(0, 113, 227, .10); color: #0071e3; font-weight: 600; }
body.paper .mx-btn.danger { background: #fff; color: #ff3b30; box-shadow: inset 0 0 0 1px rgba(255, 59, 48, .20); }
body.paper .mx-btn.danger:hover { background: rgba(255, 59, 48, .06); }
body.paper .chat-chip { position: relative; }
body.paper .chat-dot {
  position: absolute; top: 9px; right: 11px;
  width: 7px; height: 7px; border-radius: 50%;
  background: #ff3b30; opacity: 0; transition: opacity .2s;
}
body.paper .chat-chip.unread .chat-dot { opacity: 1; }

/* 底部：面板设置 + 退出 */
body.paper .mm1-foot {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px 16px;
  border-top: 1px solid rgba(0, 0, 0, .08);
}
body.paper .mx-btn.danger { flex: 0 0 auto; height: 40px; }
body.paper .mm-more {
  flex: 1 1 auto; height: 40px;
  border: 0; border-radius: 12px;
  background: #f5f5f7; color: #1d1d1f;
  font: inherit; font-size: 13px; font-weight: 500; cursor: pointer;
  transition: background .2s var(--ap-ease);
}
body.paper .mm-more:hover { background: #ececf0; }

/* 二级：面板窗 */
body.paper .mm2-bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 14px; border-bottom: 1px solid rgba(0, 0, 0, .08);
}
body.paper .mm2-back {
  width: 30px; height: 30px; min-width: 30px;
  border: 0; border-radius: 50%;
  background: #f5f5f7; color: #6e6e73;
  font: inherit; font-size: 18px; line-height: 1; cursor: pointer;
}
body.paper .mm2-back:hover { background: #ececf0; color: #1d1d1f; }
body.paper .mx-menu-tabs {
  display: flex; gap: 2px; padding: 3px;
  border-radius: 10px; background: #f5f5f7; border: 0;
  min-width: 0; overflow-x: auto; scrollbar-width: none;
}
body.paper .mx-menu-tabs::-webkit-scrollbar { display: none; }
body.paper .mx-menu-tabs button {
  height: 30px; padding: 0 14px; border: 0; border-radius: 8px;
  background: transparent; color: #6e6e73;
  font: inherit; font-size: 12.5px; font-weight: 500; cursor: pointer;
  white-space: nowrap;
  transition: background .2s var(--ap-ease), color .2s var(--ap-ease);
}
body.paper .mx-menu-tabs button.on { background: #ffffff; color: #1d1d1f; font-weight: 600; box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
body.paper .mx-menu-tabs button.only-3d { display: none; }
html.m3d-on body.paper .mx-menu-tabs button.only-3d { display: block; }

body.paper .mx-menu-panels {
  flex: 1 1 auto; min-height: 0;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  display: block;
  padding: 8px 12px 14px;
  background: #f5f5f7 !important;
}
body.paper .mx-menu-panels > .panel { display: none !important; }
body.paper .mx-menu-panels > .panel.on {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px; align-content: start; align-items: start;
}
body.paper .mx-menu-panels > .panel.on > * { margin-top: 0 !important; }
body.paper .mx-menu-panels > .panel.on > .layer-grid,
body.paper .mx-menu-panels > .panel.on > .mx-panel-hint,
body.paper .mx-menu-panels .mx-panel-hint,
body.paper .mx-menu-panels > .panel > .panel-title { grid-column: 1 / -1; }
body.paper .mx-menu-panels > .panel > .panel-title { display: none !important; }
body.paper .mx-menu-panels .panel {
  padding: 0 !important; margin: 0 !important;
  border: 0 !important; background: transparent !important;
  box-shadow: none !important; overflow: visible !important;
}
body.paper .mx-menu-panels .panel + .panel { border-top: 0 !important; margin-top: 0 !important; padding-top: 0 !important; }
body.paper .mx-menu-panels .panel > * + * { margin-top: 10px !important; }
body.paper .mx-menu-panels .mx-panel-hint {
  padding: 2px 4px; font-size: 11px; line-height: 1.5; color: #86868b; letter-spacing: 0;
}

/* 分组列表（Apple inset group） */
body.paper .mx-menu-panels .layer-grid {
  display: grid !important;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)) !important;
  gap: 0 !important;
  background: transparent !important;
  border-radius: 14px;
  padding: 0;
  align-content: start;
}
body.paper .layer-row,
body.paper .stat-row,
body.paper .scale-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  min-height: 48px;
  padding: 10px 0;
  background: transparent !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(0, 0, 0, .08) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  transition: background .2s var(--ap-ease);
}
body.paper .layer-grid > *:last-child,
body.paper .layer-row:last-child,
body.paper .scale-row:last-child { border-bottom: 0 !important; }
body.paper .layer-row:hover,
body.paper .stat-row:hover,
body.paper .scale-row:hover { background: rgba(0, 0, 0, .025) !important; }
body.paper .layer-row:active { background: rgba(0, 0, 0, .05) !important; }
body.paper .layer-lbl { font-size: 14px !important; font-weight: 400 !important; color: #1d1d1f !important; letter-spacing: -.01em; }
body.paper .lcount { font-family: var(--mono); font-size: 12px !important; color: #86868b !important; }
body.paper .lc-btn {
  height: 26px;
  padding: 0 10px;
  border: 0 !important;
  border-radius: 8px;
  background: #ececf0 !important;
  color: #6e6e73 !important;
  font: inherit;
  font-size: 11.5px;
  cursor: pointer;
}
body.paper .lc-btn:hover { background: #e2e2e7 !important; color: #1d1d1f !important; }
body.paper .diag-sum { font-family: var(--mono); font-size: 11.5px; color: #86868b; }
body.paper .ldot { width: 8px !important; height: 8px !important; }

/* iOS 开关 */
body.paper .ltog {
  width: 48px !important; height: 28px !important;
  border-radius: 999px !important;
  background: #e5e5ea !important;
  box-shadow: none !important;
  transition: background .25s var(--ap-ease) !important;
}
body.paper .ltog::after {
  top: 3px !important; left: 3px !important;
  width: 22px !important; height: 22px !important;
  border-radius: 50% !important;
  background: #ffffff !important;
  box-shadow: 0 2px 4px rgba(0, 0, 0, .18) !important;
  transition: transform .25s var(--ap-ease) !important;
}
body.paper .ltog.on { background: #0071e3 !important; }
body.paper .ltog.on::after {
  background: #ffffff !important;
  transform: translateX(20px) !important;
}
body.paper .ltog:active::after { width: 24px !important; }

/* 分段（图标/数字/关、跟随模式） */
body.paper .cfg-seg {
  display: inline-flex !important;
  gap: 2px !important;
  padding: 2px !important;
  border-radius: 9px !important;
  background: #ececf0 !important;
  border: 0 !important;
  flex: 0 0 auto;
}
body.paper .cfg-seg button {
  height: 28px !important;
  padding: 0 10px !important;
  border: 0 !important;
  border-radius: 7px !important;
  background: transparent !important;
  color: #6e6e73 !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  cursor: pointer;
  transition: background .15s var(--ap-ease), color .15s var(--ap-ease);
}
body.paper .cfg-seg button.on,
body.paper .cfg-seg button.active {
  background: #ffffff !important;
  color: #1d1d1f !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .12) !important;
}

/* 滑条 */
body.paper .scale-row { gap: 12px !important; }
body.paper .cfg-lbl { width: auto !important; font-size: 14px !important; font-weight: 400 !important; color: #1d1d1f !important; }
body.paper .scale-slider {
  flex: 1 1 auto; min-width: 60px;
  height: 4px !important;
  border-radius: 999px !important;
  background: #d9d9de !important;
  outline: none;
  accent-color: #0071e3;
}
body.paper .scale-slider::-webkit-slider-thumb {
  width: 18px !important; height: 18px !important;
  border: 0 !important;
  background: #ffffff !important;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .25) !important;
  cursor: pointer;
}
body.paper .scale-val { font-family: var(--mono); font-size: 12px !important; color: #6e6e73 !important; }
body.paper .scale-val-input {
  background: #ececf0 !important;
  border: 0 !important;
  border-radius: 8px !important;
  color: #1d1d1f !important;
  height: 30px !important;
  font-family: var(--mono);
}

/* 品级选择：扁圆 chip */
body.paper .grade-pick { gap: 6px !important; }
body.paper .grade-chip,
body.paper .grade-pick > button {
  height: 30px !important;
  border: 0 !important;
  border-radius: 8px !important;
  background: #ececf0 !important;
  color: #6e6e73 !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  box-shadow: none !important;
}
body.paper .grade-chip.on,
body.paper .grade-pick > button.on {
  background: #0071e3 !important;
  color: #ffffff !important;
}

/* 品级刻度滑条（gs-*）：浅色版 */
body.paper .gs-track { position: relative; flex: 1 1 auto; min-width: 90px; height: 28px; touch-action: none; }
body.paper .gs-rail { position: absolute; left: 0; right: 0; top: 50%; height: 4px; transform: translateY(-50%); border-radius: 999px; background: #d9d9de; box-shadow: none; }
body.paper .gs-fill { position: absolute; left: 0; top: 50%; height: 4px; transform: translateY(-50%); width: calc(8px + var(--gs-i, 0) * (100% - 16px) / 5); border-radius: 999px; background: var(--gc, #0071e3); opacity: .9; transition: width .12s linear; }
body.paper .gs-dot { position: absolute; top: 50%; left: calc(8px + var(--n, 0) * (100% - 16px) / 5); width: 6px; height: 6px; transform: translate(-50%, -50%); border-radius: 50%; background: var(--dc, #0071e3); opacity: .45; }
body.paper .gs-dot.lit { opacity: 1; }
body.paper .gs-knob { position: absolute; top: 50%; left: calc(8px + var(--gs-i, 0) * (100% - 16px) / 5); width: 18px; height: 18px; transform: translate(-50%, -50%); border-radius: 50%; background: #ffffff; box-shadow: 0 1px 4px rgba(0, 0, 0, .25), 0 0 0 1px rgba(0, 0, 0, .06); transition: left .12s var(--ap-ease); }
body.paper .gs-hit { position: absolute; inset: -6px 0; display: block; cursor: pointer; outline: none; }
body.paper .gs-val { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 500; }
body.paper .gs-cap { font-size: 11px; color: #86868b; font-weight: 400; }
body.paper .gs-sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
body.paper .gs-name { font-weight: 600; }

/* ══ 6. 名册（Apple 分组列表）═══════════════════════════════════════════════ */
body.paper .roster {
  top: 62px !important;
  right: 16px !important;
  width: 344px !important;
  max-height: calc(100dvh - 78px) !important;
  background: #ffffff !important;
  border: 0 !important;
  border-radius: 22px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .12) !important;
  color: #1d1d1f !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  font-size: 13px !important;
}
body.paper .rs-head {
  display: flex; align-items: center; gap: 10px;
  height: 54px;
  padding: 0 16px !important;
  background: #ffffff !important;
  border-bottom: 1px solid rgba(0, 0, 0, .08) !important;
  color: #1d1d1f !important;
  font-size: 13px !important;
  letter-spacing: 0 !important;
}
body.paper .rs-title { font-size: 15px !important; font-weight: 600 !important; letter-spacing: -.02em !important; color: #1d1d1f !important; }
body.paper .rs-title::before { display: none !important; }
body.paper .rs-meta {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: #f5f5f7;
  font-family: var(--mono);
  font-size: 11.5px !important;
  color: #6e6e73 !important;
}
body.paper .rs-meta .rs-dot { width: 7px; height: 7px; border-radius: 50%; margin: 0; flex: 0 0 auto; }
body.paper .rs-meta .rs-dot.our { background: #34c759; }
body.paper .rs-meta .rs-dot.foe { background: #ff3b30; }
body.paper .rs-x {
  width: 30px !important; height: 30px !important;
  border: 0 !important; border-radius: 50% !important;
  background: #f5f5f7 !important; color: #6e6e73 !important;
  font-size: 13px !important;
  transition: background .18s var(--ap-ease), color .18s var(--ap-ease);
}
body.paper .rs-x:hover { background: #ececf0 !important; color: #1d1d1f !important; }
body.paper .rs-list { padding: 6px 8px 10px !important; }
body.paper .rs-row {
  min-height: 0;
  margin: 2px 0;
  padding: 10px 12px !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 14px !important;
  color: #1d1d1f !important;
  transition: background .18s var(--ap-ease), transform .18s var(--ap-ease);
}
body.paper .rs-row:nth-child(2n) { background: transparent !important; }
body.paper .rs-row:hover { background: #f5f5f7 !important; }
body.paper .rs-row:active { transform: scale(.99); }
body.paper .rs-row.self { background: rgba(0, 113, 227, .06) !important; }
body.paper .rs-row.self:hover { background: rgba(0, 113, 227, .10) !important; }
body.paper .rs-l1 { display: flex; align-items: center; gap: 9px; min-width: 0; }
body.paper .rs-l2 { display: flex; align-items: center; gap: 8px; margin-top: 6px; padding-left: 29px; }
body.paper .rs-d { flex: 0 0 auto; }
body.paper .rs-wpn {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 148px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #6e6e73;
  font-size: 11.5px;
}
body.paper .rs-wpn-i { flex: 0 0 auto; width: 28px; height: 14px; object-fit: contain; opacity: .9; }
body.paper .rs-wpn-n { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.paper .rs-t {
  flex: 0 0 auto;
  width: 20px; height: 20px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 6px;
  background: var(--c, #d2d2d7);
  color: #ffffff;
  font-family: var(--mono);
  font-size: 10.5px;
  font-style: normal;
  font-weight: 700;
}
body.paper .rs-t[style*="#FFFFFF"], body.paper .rs-t[style*="#ffffff"] { color: #1d1d1f; }
body.paper .rs-n { flex: 1 1 auto; min-width: 0; color: #1d1d1f !important; font-weight: 600; font-size: 14px; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.paper .rs-n.is-long { font-size: 12.5px; }
body.paper .rs-hero { color: #6e6e73; font-weight: 500; }
body.paper .rs-nick { color: #1d1d1f; }
body.paper .rs-dot { color: #c7c7cc; margin: 0 4px; font-style: normal; }
body.paper .rs-s, body.paper .rs-badge {
  flex: 0 0 auto;
  padding: 3px 9px;
  border-radius: 999px !important;
  font-size: 10.5px !important;
  font-weight: 600 !important;
  font-style: normal;
  background: #f5f5f7;
  color: #6e6e73 !important;
}
body.paper .rs-s.ok { background: rgba(52, 199, 89, .12); color: #1f8a3b !important; }
body.paper .rs-s.mid { background: rgba(255, 159, 10, .14); color: #b25000 !important; }
body.paper .rs-s.bad, body.paper .rs-s.down, body.paper .rs-s.one { background: rgba(255, 59, 48, .12); color: #d70015 !important; }
body.paper .rs-s.ai { background: #f5f5f7; color: #86868b !important; }
body.paper .rs-s.self { background: rgba(0, 113, 227, .10); color: #0071e3 !important; }
body.paper .rs-badge.dead { background: rgba(255, 59, 48, .12); color: #d70015 !important; }
body.paper .rs-badge.evac { background: rgba(0, 113, 227, .10); color: #0071e3 !important; }
body.paper .rs-d { font-family: var(--mono); font-size: 11.5px; font-style: normal; color: #86868b !important; min-width: 30px; }
body.paper .rs-gear { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; }
body.paper .rs-gear:empty { display: none; }
body.paper .rs-gear > i {
  position: relative;
  flex: 0 0 auto;
  width: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: #f5f5f7;
}
body.paper .rs-gear img.gear-ico { width: 24px; height: 24px; object-fit: contain; display: block; }
body.paper .rs-gear b {
  position: absolute;
  right: -3px;
  bottom: -3px;
  min-width: 13px;
  height: 13px;
  padding: 0 3px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  background: #ffffff;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .08);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 700;
  line-height: 1;
}
body.paper .rs-gear > i.none { background: transparent; color: #d2d2d7; }
body.paper .rs-gear > i.none b { color: #86868b !important; }
body.paper .rs-bh {
  position: sticky; top: 0; z-index: 2;
  display: flex; align-items: center; gap: 7px;
  height: 34px;
  padding: 0 12px !important;
  background: #ffffff !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(0, 0, 0, .06) !important;
  color: #86868b !important;
  font-size: 11px !important; font-weight: 600 !important;
  letter-spacing: 0 !important; border-radius: 0 !important;
}
body.paper .rs-bh::before {
  content: '';
  width: 7px; height: 7px; border-radius: 50%;
  background: #c7c7cc;
  flex: 0 0 auto;
}
body.paper .rs-bh.mate::before { background: #34c759; }
body.paper .rs-bh.foe::before { background: #ff3b30; }
body.paper .rs-bs.mate { color: #34c759 !important; }
body.paper .rs-bs.foe { color: #ff3b30 !important; }
body.paper .rs-bc { margin-left: auto; font-family: var(--mono); color: #86868b !important; }
body.paper .rs-empty { padding: 34px 16px !important; color: #86868b !important; text-align: center; font-size: 13px; }

/* ══ 7. 聊天窗 ═══════════════════════════════════════════════════════════════ */
body.paper .chat-win {
  position: fixed;
  left: 16px;
  bottom: calc(var(--sa-b, 0px) + var(--sb-h, 0px) + 16px);
  z-index: 1002;
  width: min(320px, calc(100vw - 24px));
  min-height: 190px;
  max-height: min(46dvh, 380px);
  display: none;
  flex-direction: column;
  overflow: hidden;
  border-radius: 20px;
  background: #ffffff;
  border: 0;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
  animation: apple-menu-in .22s var(--ap-ease);
}
body.paper .chat-win.on { display: flex; }
body.paper .chat-win .chat-bar {
  position: relative;
  display: flex; align-items: center; gap: 8px;
  height: 44px; min-height: 44px;
  padding: 0 8px 0 14px;
  background: #ffffff;
  border-bottom: 1px solid rgba(0, 0, 0, .08);
}
body.paper .chat-win .chat-bar::before { display: none; }
body.paper .chat-win .chat-ico { color: #6e6e73; }
body.paper .chat-win .chat-num { font-family: var(--mono); font-size: 11px; color: #86868b; }
body.paper .chat-win .chat-me { font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: 999px; background: rgba(0, 113, 227, .10); color: #0071e3; }
body.paper .chat-win.is-anon .chat-me { background: #f5f5f7; color: #6e6e73; }
body.paper .chat-win .chat-grow { flex: 1 1 auto; }
body.paper .chat-win .chat-x {
  width: 30px; height: 30px; min-width: 30px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 50%;
  background: #f5f5f7; color: #6e6e73;
  font-size: 13px; cursor: pointer;
}
body.paper .chat-win .chat-x:hover { background: #ececf0; color: #1d1d1f; }
body.paper .chat-win .chat-anon-hint { padding: 5px 12px; font-size: 11px; color: #b25000; background: rgba(255, 159, 10, .12); border-bottom: 1px solid rgba(255, 159, 10, .18); }
body.paper .chat-win .chat-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 6px; }
body.paper .chat-win .chat-list::-webkit-scrollbar { width: 0; height: 0; }
body.paper .chat-row { padding: 7px 10px; border-radius: 12px; background: #f5f5f7; }
body.paper .chat-row.mine { background: rgba(0, 113, 227, .08); }
body.paper .chat-row.anon { background: #f5f5f7; }
body.paper .chat-row .chat-meta { display: flex; align-items: center; gap: 6px; font-size: 10.5px; color: #86868b; margin-bottom: 3px; }
body.paper .chat-name { font-size: 11.5px; font-weight: 600; color: #1d1d1f; max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.paper .chat-tag { font-size: 9.5px; padding: 1px 5px; border-radius: 5px; background: #ececf0; color: #6e6e73; }
body.paper .chat-time { margin-left: auto; font-family: var(--mono); }
body.paper .chat-text { font-size: 12.5px; line-height: 1.45; color: #1d1d1f; word-break: break-word; }
body.paper .chat-sys { font-size: 11px; color: #86868b; text-align: center; padding: 2px 4px; }
body.paper .chat-win .chat-inputbar { flex: 0 0 auto; display: flex; align-items: center; gap: 8px; padding: 8px; border-top: 1px solid rgba(0, 0, 0, .08); background: #ffffff; }
body.paper .chat-input {
  flex: 1 1 auto; min-width: 0; height: 36px;
  padding: 0 12px;
  border: 0; border-radius: 999px;
  background: #f5f5f7; color: #1d1d1f;
  font: inherit; font-size: 13px; outline: none;
  transition: box-shadow .2s var(--ap-ease), background .2s var(--ap-ease);
}
body.paper .chat-input:focus { background: #ffffff; box-shadow: 0 0 0 3px rgba(0, 113, 227, .18); }
body.paper .chat-input::placeholder { color: #86868b; }
body.paper .chat-send {
  flex: 0 0 auto; width: 36px; height: 36px; min-width: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 50%;
  background: #0071e3; color: #ffffff; cursor: pointer;
  transition: background .2s var(--ap-ease), transform .2s var(--ap-ease);
}
body.paper .chat-send:hover { background: #0077ed; }
body.paper .chat-send:active { transform: scale(.94); }

/* 角落聊天提示 */
body.paper .chat-toasts { position: fixed; left: 16px; bottom: calc(var(--sa-b, 0px) + var(--sb-h, 0px) + 16px); z-index: 1001; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; max-width: min(340px, calc(100vw - 28px)); pointer-events: none; }
body.paper .chat-win.on ~ .chat-toasts { display: none; }
body.paper .chat-toast { pointer-events: auto; padding: 7px 12px; border-radius: 999px; background: #ffffff; box-shadow: 0 2px 8px rgba(0, 0, 0, .10); font-size: 12px; color: #1d1d1f; }

/* ══ 8. 高价值物资窗（Apple 卡片列表）═══════════════════════════════════════ */
body.paper #nfkHv {
  right: 16px !important;
  top: 100px !important;
  width: 272px !important;
  max-height: min(60vh, 520px) !important;
  background: #ffffff !important;
  border: 0 !important;
  border-radius: 20px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .12) !important;
  color: #1d1d1f !important;
  font-size: 13px !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
body.paper #nfkHv .nfk-hv-bar {
  background: #ffffff !important;
  border-bottom: 1px solid rgba(0, 0, 0, .08) !important;
  height: 48px !important;
  padding: 0 10px 0 12px !important;
  gap: 8px !important;
}
body.paper #nfkHv .nfk-hv-caret { width: 26px !important; height: 26px !important; color: #86868b !important; }
body.paper #nfkHv .nfk-hv-ttl {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 13px !important; font-weight: 600 !important;
  letter-spacing: -.01em !important; color: #1d1d1f !important;
}
body.paper #nfkHv .nfk-hv-ttl svg { color: #6e6e73; }
body.paper #nfkHv .nfk-hv-lbl { font: inherit; }
body.paper #nfkHv .nfk-hv-num {
  padding: 2px 9px;
  border-radius: 999px;
  background: #f5f5f7;
  font-family: var(--mono);
  font-size: 11px !important;
  color: #6e6e73 !important;
}
body.paper #nfkHv .nfk-hv-segs { margin-left: auto; border: 0 !important; border-radius: 8px !important; background: #f5f5f7 !important; padding: 2px !important; }
body.paper #nfkHv .nfk-hv-seg { width: 26px; height: 26px; border: 0 !important; border-radius: 6px !important; padding: 0 !important; display: inline-flex; align-items: center; justify-content: center; color: #6e6e73 !important; }
body.paper #nfkHv .nfk-hv-seg.on { background: #0071e3 !important; color: #ffffff !important; }
body.paper #nfkHv .nfk-hv-x {
  width: 28px; height: 28px; min-width: 28px;
  border: 0 !important; border-radius: 50% !important;
  background: #f5f5f7 !important; color: #6e6e73 !important;
  font-size: 12px; cursor: pointer;
}
body.paper #nfkHv .nfk-hv-x:hover { background: #ececf0 !important; color: #1d1d1f !important; }
body.paper #nfkHv .nfk-hv-note {
  padding: 8px 14px !important;
  font-size: 11px !important;
  color: #b25000 !important;
  background: #fff8ec !important;
  border-bottom: 1px solid rgba(255, 159, 10, .16) !important;
}
body.paper #nfkHv .nfk-hv-list { padding: 4px 6px 8px !important; }
body.paper #nfkHv .nfk-hv-row {
  height: 46px !important;
  padding: 0 10px !important;
  gap: 9px !important;
  border: 0 !important;
  border-radius: 10px !important;
  transition: background .18s var(--ap-ease);
}
body.paper #nfkHv .nfk-hv-row:hover { background: #f5f5f7 !important; }
body.paper #nfkHv .nfk-hv-chip { width: 3px !important; height: 22px !important; border-radius: 999px !important; }
body.paper #nfkHv .nfk-hv-ico { width: 24px !important; height: 24px !important; border-radius: 7px; background: #f5f5f7; object-fit: contain; }
body.paper #nfkHv .nfk-hv-name { font-size: 13px !important; color: #1d1d1f !important; }
body.paper #nfkHv .nfk-hv-tag { font-size: 11px !important; color: #86868b !important; }
body.paper #nfkHv .nfk-hv-val { font-family: var(--mono); font-size: 12px !important; min-width: 44px; color: #0071e3 !important; }
body.paper #nfkHv .nfk-hv-val.nfk-hv-none { color: #86868b !important; }
body.paper #nfkHv .nfk-hv-cnt {
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(255, 159, 10, .14);
  font-family: var(--mono);
  font-size: 10.5px !important;
  color: #b25000 !important;
}
body.paper #nfkHv .nfk-hv-empty, body.paper #nfkHv .nfk-hv-more { padding: 26px 12px !important; text-align: center; font-size: 12.5px !important; color: #86868b !important; }

/* 名册与高价值窗同时在桌面端打开：高价值窗让到名册左侧，不再重叠。
   手机端两块由 mxFloat.layoutPhone 排成一列（2026-11-12 WREN：也要能同屏 + 贴边），
   不再像以前那样「名册一开就把高价值 display:none」。 */
@media (min-width: 901px) {
  body:has(#rosterPanel:not([hidden])) #nfkHv { right: 376px !important; top: 62px !important; }
}

/* ══ 9. 底栏 / 3D 小地图 / 跟随菜单 ═════════════════════════════════════════ */
body.paper .spectate-bar {
  position: fixed !important;
  bottom: calc(var(--sa-b, 0px) + 16px) !important;
  min-height: 52px;
  box-sizing: border-box;
  gap: 6px !important;
  background: #ffffff !important;
  border: 0 !important;
  border-radius: 999px !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, .12) !important;
  color: #1d1d1f !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  padding: 6px 8px 6px 10px !important;
}
body.paper .spectate-bar > .sb-sep:first-child { display: none !important; }
body.paper .spectate-bar .spacer { flex: 1 1 auto; min-width: 10px; }
body.paper .spectate-bar .sb-div {
  flex: 0 0 auto;
  width: 1px !important;
  height: 20px !important;
  margin: 0 4px !important;
  background: rgba(0, 0, 0, .08) !important;
}
body.paper .spectate-bar select {
  height: 34px;
  padding: 0 12px;
  border: 0 !important;
  border-radius: 999px !important;
  background: #f5f5f7 !important;
  color: #1d1d1f !important;
  font-size: 12.5px !important;
  outline: none;
}
body.paper .spectate-bar .m3d-buttons { display: inline-flex; align-items: center; gap: 4px; }
body.paper .spectate-bar .m3d-buttons button,
body.paper .spectate-bar .sb-icon {
  width: 38px;
  height: 38px;
  min-width: 38px;
  padding: 0 !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0 !important;
  border-radius: 50% !important;
  background: transparent !important;
  color: #6e6e73 !important;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background .18s var(--ap-ease), color .18s var(--ap-ease), transform .18s var(--ap-ease);
}
body.paper .spectate-bar .m3d-buttons button:hover,
body.paper .spectate-bar .sb-icon:hover { background: #f5f5f7 !important; color: #1d1d1f !important; }
body.paper .spectate-bar .m3d-buttons button:active { transform: scale(.94); }
body.paper .spectate-bar .m3d-buttons button.on,
body.paper .spectate-bar .m3d-buttons button[aria-pressed="true"] { background: rgba(0, 113, 227, .10) !important; color: #0071e3 !important; }
body.paper .spectate-bar .m3d-buttons button svg { width: 18px; height: 18px; }
body.paper .spectate-bar .m3d-buttons button:focus-visible,
body.paper .spectate-bar .sb-icon:focus-visible { outline: 3px solid rgba(0, 113, 227, .28); outline-offset: 1px; }

body.paper .m3d-mini {
  background: #ffffff !important;
  border: 0 !important;
  border-radius: 18px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .12) !important;
  color: #1d1d1f !important;
  overflow: hidden;
}
body.paper .m3d-mini .mm-head { height: 40px !important; padding: 0 10px !important; gap: 8px !important; background: #ffffff !important; border-bottom: 1px solid rgba(0, 0, 0, .08) !important; }
body.paper .m3d-mini .mm-ttl { font-size: 12px !important; font-weight: 600 !important; color: #1d1d1f !important; }
body.paper .m3d-mini .mm-ctr, body.paper .m3d-mini .mm-z { color: #86868b !important; font-size: 11px !important; }
body.paper .m3d-mini .mm-zo, body.paper .m3d-mini .mm-x { width: 30px !important; height: 30px !important; border: 0 !important; border-radius: 50% !important; background: #f5f5f7 !important; color: #6e6e73 !important; }
body.paper .m3d-mini .mm-zo:hover, body.paper .m3d-mini .mm-x:hover { background: #ececf0 !important; color: #1d1d1f !important; }

/* ── 跟随目标：自定义下拉（原生 select 只留作状态源）──────────────────── */
body.paper .mx-sp { position: relative !important; display: inline-flex !important; align-items: center; }
body.paper .mx-sp > select {
  position: absolute !important;
  width: 1px !important; height: 1px !important;
  min-width: 0 !important; max-width: 0 !important;
  min-height: 0 !important; max-height: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden !important;
}
body.paper .mx-sp-trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 11px 0 13px;
  border: 0 !important;
  border-radius: 999px !important;
  background: #f5f5f7 !important;
  color: #1d1d1f !important;
  font-size: 13.5px !important;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background .18s var(--ap-ease), box-shadow .18s var(--ap-ease);
}
body.paper .mx-sp-trigger .mx-sp-ico {
  flex: 0 0 auto;
  width: 16px; height: 16px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #86868b;
  transition: color .18s var(--ap-ease);
}
body.paper .mx-sp-trigger .mx-sp-ico svg { width: 100%; height: 100%; display: block; }
body.paper .mx-sp-trigger:hover .mx-sp-ico,
body.paper .mx-sp-trigger.open .mx-sp-ico { color: #0071e3; }
body.paper .mx-sp-trigger:hover { background: #ececf0 !important; }
body.paper .mx-sp-trigger:active { transform: scale(.97); }
body.paper .mx-sp-trigger.open { background: #ffffff !important; box-shadow: 0 0 0 3px rgba(0, 113, 227, .18) !important; }
body.paper .mx-sp-trigger .mx-sp-arrow {
  flex: 0 0 auto;
  width: 15px; height: 15px;
  display: inline-flex; align-items: center; justify-content: center;
  color: #86868b;
  transition: transform .2s var(--ap-ease), color .15s;
}
body.paper .mx-sp-trigger .mx-sp-arrow svg { width: 100%; height: 100%; display: block; }
body.paper .mx-sp-trigger.open .mx-sp-arrow { transform: rotate(180deg); color: #0071e3; }

/* 浮层：fixed（js 算 left/bottom），白卡 + 苹果分组列表 */
body.paper .mx-sp-pop {
  position: fixed !important;
  min-width: 200px !important;
  width: max-content !important;
  max-width: min(280px, calc(100vw - 24px)) !important;
  max-height: min(360px, calc(100dvh - 24px)) !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  background: #ffffff !important;
  border: 0 !important;
  border-radius: 16px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .14) !important;
  color: #1d1d1f !important;
  padding: 6px !important;
  z-index: 1250 !important;
  opacity: 0 !important;
  transform: scale(.96) translateY(4px) !important;
  transform-origin: bottom center !important;
  transition: opacity .16s ease, transform .22s var(--ap-ease) !important;
}
body.paper .mx-sp-pop.open { opacity: 1 !important; transform: scale(1) translateY(0) !important; }
body.paper .mx-sp-row {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 10px !important;
  border-radius: 10px !important;
  font-size: 13.5px !important;
  color: #1d1d1f !important;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s var(--ap-ease);
}
body.paper .mx-sp-row:hover { background: #f5f5f7 !important; }
body.paper .mx-sp-row:active { background: #ececf0 !important; }
body.paper .mx-sp-row.on { background: rgba(0, 113, 227, .10) !important; color: #0071e3 !important; font-weight: 600; }
body.paper .mx-sp-dot { width: 8px !important; height: 8px !important; border-radius: 50% !important; flex: 0 0 auto; }
body.paper .mx-sp-txt { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.paper .mx-sp-chk { margin-left: auto; padding-left: 10px; color: #0071e3 !important; font-size: 12px; opacity: 0; }
body.paper .mx-sp-row.on .mx-sp-chk { opacity: 1; }
body.paper .mx-sp-grp {
  padding: 8px 10px 4px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: .02em !important;
  color: #86868b !important;
  white-space: nowrap;
}
body.paper .mx-sp-grp + .mx-sp-row { margin-top: 1px; }
body.paper .mx-sp-empty { padding: 18px 12px !important; text-align: center; font-size: 12.5px !important; color: #86868b !important; white-space: nowrap; }
body.paper .mx-sp-pop::-webkit-scrollbar { width: 6px; }
body.paper .mx-sp-pop::-webkit-scrollbar-thumb { background: rgba(0, 0, 0, .18); border-radius: 999px; }

/* ══ 10. 公告 / 状态窗 / toast / 悬停卡 ═════════════════════════════════════ */
body.paper .announce-bar {
  left: 50% !important;
  right: auto !important;
  top: calc(var(--sa-t, 0px) + var(--tb-h, 46px) + 10px) !important;
  transform: translateX(-50%) translateY(-6px) !important;
  width: max-content;
  max-width: min(calc(100vw - 24px), 480px) !important;
  padding: 8px 8px 8px 14px !important;
  border-radius: 999px !important;
  background: #ffffff !important;
  border: 0 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .10) !important;
  color: #1d1d1f !important;
  font-size: 12px !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
body.paper .announce-bar.show { transform: translateX(-50%) translateY(0) !important; }
body.paper .ab-icon { color: #0071e3 !important; }
body.paper .ab-title { font-weight: 600 !important; color: #1d1d1f !important; }
body.paper .ab-body { color: #6e6e73 !important; }
body.paper .ab-idx { color: #86868b !important; font-family: var(--mono); }
body.paper .ab-close { color: #86868b !important; }
body.paper .ab-prog { background: #0071e3 !important; }

body.paper .raid-gate { background: transparent !important; backdrop-filter: none !important; -webkit-backdrop-filter: none !important; }
body.paper .raid-gate .rg-card {
  background: #ffffff !important;
  border: 0 !important;
  border-radius: 22px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .12) !important;
  color: #1d1d1f !important;
  padding: 26px 28px 22px !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
body.paper .raid-gate .rg-title { font-size: 17px !important; font-weight: 600 !important; letter-spacing: -.01em !important; color: #1d1d1f !important; }
body.paper .raid-gate .rg-sub { font-size: 13px !important; color: #6e6e73 !important; }

/* ── 全屏闸门（等待推流 / 连接失败）—— Apple 全屏布局 ─────────────────────
   roomStatus.js 会往页面注入一套深色海报样式；这里整块接管：
   整屏 #f5f5f7、内容居中、蓝色细环 spinner + 大标题 + 说明 + 细进度条。
   闸门是 z1100 的整屏层，天然盖住名册/高价值窗（另见下方 :has 兜底）。 */
html body.paper .raid-gate.show {
  background: #f5f5f7 !important;
  z-index: 1100 !important;
  pointer-events: none !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
html body.paper .raid-gate.show::before,
html body.paper .raid-gate.show::after { display: none !important; }
html body.paper .raid-gate.show .rg-card {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  max-width: min(560px, 86vw) !important;
  text-align: center !important;
  pointer-events: auto !important;
}
html body.paper .raid-gate.show .rg-spin {
  display: block !important;
  width: 34px !important;
  height: 34px !important;
  margin: 0 auto 26px !important;
  border: 3px solid #e5e5ea !important;
  border-top-color: #0071e3 !important;
  border-radius: 50% !important;
  animation: apple-spin .8s linear infinite !important;
}
html body.paper .raid-gate.show .rg-radar,
html body.paper .raid-gate.show .rg-dots,
html body.paper .raid-gate.show .rg-waitbar { display: none !important; }
html body.paper .raid-gate.show .rg-icon { display: none !important; }
html body.paper .raid-gate.show .rg-head { display: flex !important; justify-content: center !important; background: transparent !important; border: 0 !important; padding: 0 !important; }
html body.paper .raid-gate.show .rg-title {
  font-size: 30px !important;
  line-height: 1.2 !important;
  font-weight: 600 !important;
  letter-spacing: -.02em !important;
  color: #1d1d1f !important;
  text-shadow: none !important;
  background: transparent !important;
}
html body.paper .raid-gate.show .rg-sub {
  margin-top: 12px !important;
  padding: 0 !important;
  font-size: 15px !important;
  line-height: 1.5 !important;
  color: #6e6e73 !important;
  background: transparent !important;
  border: 0 !important;
}
html body.paper .raid-gate.show .rg-bar { display: block !important; width: 180px !important; height: 3px !important; margin: 26px 0 0 !important; border-radius: 999px !important; background: #e5e5ea !important; overflow: hidden; }
html body.paper .raid-gate.show .rg-bar i { display: block; height: 100% !important; border-radius: 999px !important; background: #0071e3 !important; }
html body.paper .raid-gate.show .rg-meta {
  display: flex !important;
  justify-content: center !important;
  gap: 12px !important;
  margin-top: 18px !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  font-family: var(--mono) !important;
  font-size: 12px !important;
  color: #86868b !important;
}
html body.paper .raid-gate.show .rg-acts { display: flex !important; justify-content: center !important; gap: 10px !important; margin-top: 22px !important; padding: 0 !important; background: transparent !important; border: 0 !important; }
html body.paper .raid-gate.show .rg-retry,
html body.paper .raid-gate.show .rg-reload {
  min-width: 0 !important;
  height: 40px !important;
  padding: 0 22px !important;
  border: 0 !important;
  border-radius: 999px !important;
  font: inherit !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  white-space: nowrap;
}
html body.paper .raid-gate.show .rg-retry { background: #0071e3 !important; color: #ffffff !important; }
html body.paper .raid-gate.show .rg-retry:hover { background: #0077ed !important; }
html body.paper .raid-gate.show .rg-reload { background: #ffffff !important; color: #1d1d1f !important; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .10) !important; }
html body.paper .raid-gate.show .rg-reload:hover { background: #f5f5f7 !important; }
@keyframes apple-spin { to { transform: rotate(360deg); } }

/* 闸门开着时，名册 / 高价值窗一律不显示（闸门 = 还没有可看的数据） */
body:has(#raidGate.show) #rosterPanel,
body:has(#raidGate.show) #nfkHv { display: none !important; }
body.paper .rg-bar { background: #ececf0 !important; }
body.paper .rg-bar i { background: #0071e3 !important; }
body.paper .rg-meta { font-family: var(--mono); font-size: 11px !important; color: #86868b !important; }
body.paper .rg-retry {
  height: 40px; padding: 0 20px;
  border: 0 !important; border-radius: 999px !important;
  background: #0071e3 !important; color: #fff !important;
  font: inherit; font-size: 13px; font-weight: 500; cursor: pointer;
}
body.paper .rg-retry:hover { background: #0077ed !important; }
body.paper .rg-reload {
  height: 40px; padding: 0 20px;
  border: 0 !important; border-radius: 999px !important;
  background: #f5f5f7 !important; color: #1d1d1f !important;
  font: inherit; font-size: 13px; font-weight: 500; cursor: pointer;
}
body.paper .rg-reload:hover { background: #ececf0 !important; }

body.paper #toast {
  background: #1d1d1f !important;
  border: 0 !important;
  border-radius: 999px !important;
  color: #ffffff !important;
  font-size: 12.5px !important;
  font-weight: 500 !important;
  padding: 10px 18px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

/* ── 悬停 / 点按卡（玩家、物资、堆叠）Apple 重排版 ───────────────────────
   结构见 canvasRenderer._playerTipHtml / _tipItemBlock / _rtipBlock。 */
body.paper .rtip {
  position: absolute;
  width: 280px;
  min-width: 0;
  max-width: min(300px, calc(100vw - 20px));
  padding: 0 !important;
  background: #ffffff !important;
  border: 0 !important;
  border-radius: 18px !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .14) !important;
  color: #1d1d1f !important;
  overflow: hidden !important;
  font-size: 13px;
  line-height: 1.45;
  text-align: left;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
body.paper .rtip.show { display: block; }
body.paper .rtip.pinned { box-shadow: 0 0 0 2px rgba(0, 113, 227, .45), 0 8px 24px rgba(0, 0, 0, .14) !important; }
body.paper .rtip-item {
  padding: 14px !important;
  border-left: 0 !important;
}
body.paper .rtip-item + .rtip-item {
  margin-top: 0 !important;
  padding-top: 14px !important;
  border-top: 1px solid rgba(0, 0, 0, .08) !important;
}
body.paper .rtip-multi-head {
  padding: 12px 14px 0 !important;
  margin-bottom: 0 !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: .02em !important;
  color: #86868b !important;
}

/* ── 一堆物资：顶部图标页签 + 下方单卡 ──────────────────────────────────
   canvasRenderer 的 _mkTip('items') 输出 .rtip-pile-*，但这套选择器此前
   没有任何样式：页签里的 .tip-ico 没有尺寸，而 _injectIcons 注入的图带
   width:100%，宽度的百分比在 auto 容器里回落到图片原始像素（约 288px），
   于是「此处 N 件」变成一列撑满卡片的大图。这里把整条链补全：
   图标槽固定 34px、页签四列等宽、价格一行等宽小字、选中页签 2px 蓝环。 */
body.paper .rtip-pile { padding: 12px 12px 2px; }
body.paper .rtip-pile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}
body.paper .rtip-pile-head .pile-n {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .01em;
  color: #1d1d1f;
}
body.paper .rtip-pile-head .pile-hint { font-size: 10.5px; color: #86868b; }

body.paper .rtip-pile-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  max-height: 150px;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin: 0 -2px;
  padding: 2px;
}
body.paper .rtip-pile-tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  padding: 7px 2px;
  border: 0;
  border-radius: 10px;
  background: #f5f5f7;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .04);
  cursor: pointer;
  /* .rtip 本体是 pointer-events:none（悬停卡不能挡住地图），
     页签必须自己把指针事件打开，否则点击会穿透到地图、被当成「点空白」直接收起卡片。 */
  pointer-events: auto;
  -webkit-tap-highlight-color: transparent;
  transition: background .15s cubic-bezier(.28, 0, .22, 1), box-shadow .15s cubic-bezier(.28, 0, .22, 1);
}
body.paper .rtip-pile-tab:hover { background: #ececf0; }
body.paper .rtip-pile-tab.on { background: #ffffff; box-shadow: inset 0 0 0 2px #0071e3; }
body.paper .rtip-pile-tab:focus-visible { outline: 2px solid #0071e3; outline-offset: 1px; }
body.paper .rtip-pile-tab .tip-ico,
body.paper .rtip-pile-tab .pile-fallback {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #ffffff;
}
body.paper .rtip-pile-tab .pile-fallback { background: #e8e8ed; opacity: .9; }
body.paper .rtip-pile-tab .pile-val {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -.01em;
  color: #6e6e73;
  font-variant-numeric: tabular-nums;
}
body.paper .rtip-pile-tab.on .pile-val { color: #1d1d1f; }
body.paper .rtip-pile-body .rtip-item {
  margin-top: 10px !important;
  padding: 12px 0 10px !important;
  border-top: 1px solid rgba(0, 0, 0, .08) !important;
}

/* 「点空白处关闭」页脚：此前没有任何桌面样式，直接以 13px 正文压在卡片底边，
   和卡内内容挤在一起。统一成一条页脚：细分隔线 + 居中的 10.5px 灰字。 */
body.paper .rtip-taphint {
  margin: 0;
  padding: 9px 14px 11px;
  border-top: 1px solid rgba(0, 0, 0, .07);
  background: #fbfbfd;
  font-size: 10.5px;
  font-weight: 400;
  line-height: 1.3;
  letter-spacing: .01em;
  color: #86868b;
  text-align: center;
  pointer-events: none;
}

/* 头部：44px 头像/图标 + 身份 pill + 名字 */
body.paper .rtip-head { display: flex !important; align-items: center !important; gap: 10px !important; min-width: 0; }
body.paper .rtip-ico,
body.paper .rtip-head .tip-ico {
  flex: 0 0 auto !important;
  position: relative;
  width: 44px !important; height: 44px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: #f5f5f7 !important;
  overflow: hidden !important;
}
body.paper .rtip-loot .rtip-ico,
body.paper .rtip-loot .rtip-head .tip-ico { border-radius: 12px !important; }
body.paper .rtip-ava { width: 100% !important; height: 100% !important; object-fit: cover !important; display: block !important; background: #f5f5f7; }
body.paper .rtip-ico:empty {
  background: color-mix(in srgb, var(--rtip-c, #86868b) 14%, #fff) !important;
}
body.paper .rtip-ico:empty::after {
  content: '';
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--rtip-c, #c7c7cc);
  opacity: .5;
}
body.paper .rtip-mark { width: 100% !important; height: 100% !important; border-radius: 50% !important; opacity: 1 !important; display: block; }
body.paper .rtip-loot .rtip-mark { border-radius: 12px !important; }
body.paper .tip-ico img { width: 100% !important; height: 100% !important; object-fit: contain !important; display: block; }
body.paper .rtip-kind {
  flex: 0 0 auto !important;
  padding: 3px 9px !important;
  border-radius: 999px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  color: var(--rtip-c, #6e6e73) !important;
  background: color-mix(in srgb, var(--rtip-c, #86868b) 12%, #fff) !important;
  white-space: nowrap;
}
body.paper .rtip-name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 15px !important;
  font-weight: 600 !important;
  letter-spacing: -.01em !important;
  color: #1d1d1f !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.paper .rtip-val {
  flex: 0 0 auto;
  font-family: var(--mono) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  color: var(--rtip-c, #0071e3) !important;
}
body.paper .rtip-ai {
  flex: 0 0 auto;
  padding: 2px 7px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: #f5f5f7 !important;
  color: #6e6e73 !important;
  font-size: 10px !important;
  font-weight: 600 !important;
}
body.paper .rtip-meta { margin-top: 8px !important; font-size: 12px !important; color: #86868b !important; }

/* 副行 chips */
body.paper .rtip-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
body.paper .rchip {
  font-size: 11px;
  line-height: 1;
  padding: 4px 9px;
  border-radius: 999px;
  color: #6e6e73;
  background: #f5f5f7;
  border: 0;
  white-space: nowrap;
}
body.paper .rchip.ok { color: #1f8a3b; background: rgba(52, 199, 89, .12); }
body.paper .rchip.warn { color: #b25000; background: rgba(255, 159, 10, .14); }
body.paper .rchip.bad { color: #d70015; background: rgba(255, 59, 48, .12); }
body.paper .rchip.dim { color: #86868b; background: #f5f5f7; }

/* 生命体征 */
body.paper .rtip-vitals { margin-top: 12px; }
body.paper .rtip-vitals .rv-line { display: flex; align-items: baseline; gap: 7px; }
body.paper .rtip-vitals .rv-lb { font-size: 11px; color: #86868b; }
body.paper .rtip-vitals .rv-v { font-family: var(--mono); font-size: 13px; font-weight: 600; line-height: 1; color: var(--c, #34c759); font-variant-numeric: tabular-nums; }
body.paper .rtip-vitals .rv-v em { font-style: normal; font-weight: 500; font-size: 11px; color: #86868b; }
body.paper .rtip-vitals .rv-pct { margin-left: auto; font-style: normal; font-family: var(--mono); font-size: 11px; font-weight: 600; color: #6e6e73; }
body.paper .rtip-vitals .hpbar { margin-top: 6px; }
body.paper .hpbar-t { position: relative; height: 6px; border-radius: 999px; background: #ececf0; overflow: hidden; }
body.paper .hpbar-f { position: absolute; left: 0; top: 0; bottom: 0; width: var(--pct, 0%); border-radius: 999px; background: var(--c, #34c759); transition: width .18s ease-out; }
body.paper .hpbar-tick { position: absolute; top: 0; bottom: 0; width: 1px; background: rgba(255, 255, 255, .55); }
body.paper .hpbar-pct { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-family: var(--mono); font-size: 9px; font-weight: 600; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
body.paper .hpbar-num { margin-top: 4px; text-align: right; font-family: var(--mono); font-size: 10px; font-weight: 600; color: var(--c, #34c759); }
body.paper .hpbar-num em { font-style: normal; color: #86868b; }
body.paper .hpbar.low .hpbar-t { box-shadow: inset 0 0 0 1px rgba(255, 59, 48, .35); }

/* 手持 */
body.paper .rtip-wpn { display: flex; align-items: center; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(0, 0, 0, .08); min-width: 0; }
body.paper .rtip-wpn .rw-lb { flex: 0 0 auto; min-width: 30px; font-size: 11px; color: #86868b; }
body.paper .rtip-wpn-i { width: 42px; height: 20px; object-fit: contain; flex: 0 0 auto; opacity: .95; }
body.paper .rtip-wpn-n { min-width: 0; font-size: 12.5px; font-weight: 500; color: #1d1d1f; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 装备格：盔/甲并排，弹挂/背包整行 */
body.paper .rtip-gears { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
body.paper .gtile-row { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
body.paper .gtile {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 6px 8px;
  border-radius: 10px;
  background: #f5f5f7;
  border: 0;
}
body.paper .gtile.none { opacity: .55; }
body.paper .gtile-i { width: 18px; height: 18px; object-fit: contain; flex: 0 0 auto; }
body.paper .gtile-i.ph { display: block; width: 18px; height: 18px; border-radius: 4px; background: #e5e5ea; }
body.paper .gtile-k { flex: 0 0 auto; font-size: 11px; color: #86868b; white-space: nowrap; }
body.paper .gtile-n { flex: 1 1 auto; min-width: 0; font-style: normal; font-size: 12px; color: #1d1d1f; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body.paper .gtile .gchip-lv { margin-left: auto; flex: 0 0 auto; }
body.paper .gchip-lv {
  font-style: normal;
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
  line-height: 1;
  padding: 2px 5px;
  border-radius: 6px;
  color: var(--c, #6e6e73);
  background: color-mix(in srgb, var(--c, #86868b) 12%, #fff);
  border: 0;
  font-variant-numeric: tabular-nums;
}
body.paper .gchip-lv.none { color: #c7c7cc; background: #f5f5f7; padding: 1px 5px; }
body.paper .gchip-i { width: 16px; height: 16px; object-fit: contain; flex: 0 0 auto; }
body.paper .gchip-n { font-style: normal; font-size: 11.5px; color: #1d1d1f; max-width: 7.5em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 距离 */
body.paper .rtip-dist { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(0, 0, 0, .08); }
body.paper .rtip-dist .rd-lb { font-size: 11px; color: #86868b; }
body.paper .rtip-dist .rd-v { font-family: var(--mono); font-size: 13px; font-weight: 600; color: #1d1d1f; }

/* 动作按钮 */
body.paper .rtip-act { display: flex !important; align-items: center !important; gap: 8px !important; margin-top: 12px !important; padding-top: 12px !important; border-top: 1px solid rgba(0, 0, 0, .08) !important; }
body.paper .rtip .rtip-btn {
  flex: 1 1 0;
  height: 34px;
  padding: 0 12px !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: #f5f5f7 !important;
  color: #1d1d1f !important;
  font: inherit !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 1 !important;
  text-align: center;
  cursor: pointer;
  pointer-events: auto;
  transition: background .18s var(--ap-ease), color .18s var(--ap-ease);
}
body.paper .rtip .rtip-btn:hover { background: #ececf0 !important; }
body.paper .rtip .rtip-btn.on { background: #0071e3 !important; color: #ffffff !important; }
body.paper .rtip.pinned .rtip-head::after {
  content: "固定";
  margin-left: auto;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(0, 113, 227, .10);
  color: #0071e3;
  font-size: 10px;
  font-weight: 600;
}

/* 物资卡：价值块 / 明细行 / 脚注 */
body.paper .rtip-value {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-top: 10px;
  padding: 9px 11px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--c, #d9a21b) 10%, #fff);
  border: 0;
}
body.paper .rtip-value .rvl { font-size: 11px; color: #86868b; }
body.paper .rtip-value .rvv { margin-left: auto; font-family: var(--mono); font-size: 16px; font-weight: 700; line-height: 1; color: var(--c, #b25000); font-variant-numeric: tabular-nums; }
body.paper .rtip-value .rvx { font-style: normal; font-family: var(--mono); font-size: 10px; color: #86868b; }
body.paper .rtip-rows { margin-top: 10px !important; padding-top: 8px !important; border-top: 1px solid rgba(0, 0, 0, .08) !important; }
body.paper .rtip-row { display: flex; align-items: center; gap: 8px; border-top: 0 !important; color: #6e6e73 !important; }
body.paper .rtip-row + .rtip-row { margin-top: 3px; }
body.paper .rtip-row > span { flex: 0 0 auto; min-width: 36px; font-size: 11px; color: #86868b !important; }
body.paper .rtip-row > b { margin-left: auto; font-family: var(--mono); font-size: 12px; font-weight: 600; color: #1d1d1f; text-align: right; word-break: break-all; }
body.paper .rtip-bar { height: 4px !important; margin-top: 10px !important; border-radius: 999px !important; background: #ececf0 !important; overflow: hidden; }
body.paper .rtip-bar > i { height: 100%; display: block; border-radius: 999px !important; }
body.paper .rtip-foot { margin-top: 8px !important; padding-top: 6px !important; border-top: 1px solid rgba(0, 0, 0, .06) !important; font-family: var(--mono); font-size: 10.5px !important; color: #86868b !important; overflow-wrap: anywhere; }

@media (max-width: 760px) {
  body.paper .rtip { width: min(300px, calc(100vw - 20px)); }
  body.paper .rtip-item { padding: 12px !important; }
}

/* 手机端状态胶囊里的数字/延迟 */
body.paper .ms-age.ok { color: #34c759 !important; }
body.paper .ms-age.warn { color: #ff9f0a !important; }
body.paper .ms-age.bad { color: #ff3b30 !important; }

/* mxMobile 手势遮罩 */
body.paper .mx-scrim { background: rgba(0, 0, 0, .18) !important; }

/* ══ 11. 响应式 ═════════════════════════════════════════════════════════════ */
@media (max-width: 960px), (hover: none) and (pointer: coarse) {
  /* 手机底栏：浮在底部安全区上方的白色胶囊（不再是贴边全宽方角条） */
  body.paper .spectate-bar {
    left: 12px !important;
    right: 12px !important;
    bottom: calc(var(--sa-b, 0px) + 10px) !important;
    transform: none !important;
    min-height: 56px;
    gap: 4px !important;
    border: 0 !important;
    border-radius: 999px !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .12) !important;
    padding: 6px 8px 6px 10px !important;
  }
  body.paper .mx-sp-trigger { height: 44px; font-size: 14px !important; padding: 0 12px 0 14px; }
  body.paper .mx-sp-trigger .mx-sp-ico { width: 18px; height: 18px; }
  body.paper .spectate-bar .m3d-buttons button {
    width: 44px;
    height: 44px;
    min-width: 44px;
  }
  body.paper .spectate-bar .m3d-buttons button svg { width: 20px; height: 20px; }
}

@media (max-width: 760px), (hover: none) and (pointer: coarse) {
  body.paper .mx-menu,
  body.paper .mx-menu2 { border-radius: 20px; }
  /* 手机上二级面板全屏替换一级：两张卡叠起来会顶出屏幕 */
  body.paper .mx-menu-wrap.panels-open #mxMenu { display: none !important; }
  body.paper .mx-menu-wrap.panels-open #mxMenu2 {
    left: 50% !important;
    top: 50% !important;
    translate: -50% -50% !important;
    width: calc(100vw - 20px) !important;
    max-height: calc(100dvh - 24px) !important;
  }
  body.paper .mx-menu-panels > .panel.on { grid-template-columns: 1fr; }
  body.paper .mx-menu-panels .layer-grid { grid-template-columns: 1fr !important; }
  body.paper .chat-win { left: 10px; right: 10px; width: auto; border-radius: 18px; }
  body.paper .roster {
    top: auto !important;
    right: 10px !important;
    left: 10px !important;
    bottom: calc(var(--sa-b, 0px) + 68px) !important;
    width: auto !important;
    max-height: min(64dvh, 560px) !important;
    border-radius: 20px !important;
  }
  body.paper .rs-row { padding: 9px 10px !important; }
  body.paper .rs-n { font-size: 13.5px; }
  body.paper .rs-gear > i { width: 22px; height: 22px; }
  body.paper .rs-gear img.gear-ico { width: 22px; height: 22px; }
  body.paper .rs-wpn-i { width: 22px; height: 11px; }
  body.paper .landing-card { padding: 32px 24px 28px !important; border-radius: 24px !important; }
  body.paper .landing-title { font-size: 30px !important; }
  body.paper .otp-box { width: 44px !important; height: 52px !important; }
}

@media (prefers-reduced-motion: reduce) {
  body.paper *,
  body.paper *::before,
  body.paper *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}

@keyframes apple-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
