/* ─── Design tokens · 鹿港靛紫品牌体系（对齐卡片模版 base.html）──────── */
:root {
  /* 声明为浅色页：抑制安卓/QQ WebView「强制网页深色」对浅色页的启发式反色（保证可读） */
  color-scheme: light;
  /* 品牌主色：靛紫渐变（与卡片头一致 #6366f1→#8b5cf6→#a78bfa） */
  --brand:    #6366f1;
  --brand-2:  #8b5cf6;
  --brand-3:  #a78bfa;
  --brand-grad: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a78bfa 100%);
  --accent:   #6366f1;
  --accent-d: #4f46e5;
  --gold:     #d97706;
  /* 暖紫中性（对齐卡片文字/线条/底色） */
  --text:    #1e1b2e;
  --text-2:  #5b5672;
  --muted:   #8b85a0;
  --bg:      #f2f0fa;
  --card:    #ffffff;
  --inset:   #f8f7fc;
  --inset-2: #faf9fd;
  --line:    #ebe8f4;
  --line-2:  #e8e5f0;
  --field-bd:#ddd8ec;
  /* 看板四象限语义色（用户满意，保持不变） */
  --sell:    #16a34a;
  --buy:     #2563eb;
  --trade:   #7c3aed;
  --rent:    #b45309;
  /* 靛紫染色的层次阴影 */
  --sh-xs: 0 1px 2px rgba(99,102,241,.07);
  --sh-sm: 0 2px 8px rgba(99,102,241,.09), 0 1px 2px rgba(30,27,46,.04);
  --sh-md: 0 6px 22px rgba(99,102,241,.13), 0 2px 6px rgba(30,27,46,.05);
  --sh-lg: 0 16px 44px rgba(76,29,149,.20), 0 6px 14px rgba(30,27,46,.09);
  --r:  9px;
  --rm: 13px;
  --rl: 17px;
  --t: .16s cubic-bezier(.4,0,.2,1);
}

/* 网页发布挂单结果反馈 */
.publish-result {
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: var(--rm);
  font-size: 14px;
  line-height: 1.5;
  border: 1px solid var(--line);
}
.publish-result[data-kind="ok"] {
  background: #ecfdf5;
  border-color: #86efac;
  color: #14532d;
}
.publish-result[data-kind="warn"] {
  background: #fffbeb;
  border-color: #fcd34d;
  color: #92400e;
}
.publish-result[data-kind="pending"] {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1e3a8a;
}
.publish-result[data-kind="err"] {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #991b1b;
}
.publish-result strong { font-weight: 700; }

/* ─── Reset ──────────────────────────────────────────────────────── */
* { box-sizing: border-box; }
/* hidden 属性必须压过任何 display 规则 */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  /* 暖紫极淡底色 + 顶部双光晕，让白卡片浮起来（一流网站的氛围底） */
  background:
    radial-gradient(900px 420px at 12% -8%, rgba(139,92,246,.10), transparent 60%),
    radial-gradient(820px 400px at 92% -6%, rgba(99,102,241,.09), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-feature-settings: "cv01", "ss01";
}

/* 数字统一等宽对齐（价格/数量/编号更整齐——一流站细节） */
.lst-price, .lst-qty, .lst-code, .extra-price, .chip-count,
.total-badge, .count, .nav-badge, .inline-badge, .my-row-line2, .auth-chip {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

::selection { background: rgba(99,102,241,.22); color: var(--text); }

/* 品牌化滚动条 */
* { scrollbar-width: thin; scrollbar-color: #cdc6e6 transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb {
  background: #cdc6e6;
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: content-box;
}
*::-webkit-scrollbar-thumb:hover { background: #b3a9da; background-clip: content-box; }

/* ─── Page ───────────────────────────────────────────────────────── */
.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 16px 40px;
}

/* 入场动画（克制、尊重 reduced-motion） */
@keyframes reveal-up {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
.sidebar { animation: reveal-up .45s cubic-bezier(.22,.61,.36,1) both; }
.topbar  { animation: reveal-up .45s cubic-bezier(.22,.61,.36,1) both; animation-delay: .05s; }
/* 切换视图时当前面板整块淡入上移 */
[data-view-panel]:not([hidden]) {
  animation: reveal-up .34s cubic-bezier(.22,.61,.36,1) both;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ─── App shell 应用外壳（侧边栏 + 主区 + 底部Tab）──────────────────── */
.app {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  align-self: start;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 18px 14px;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 6px 8px 18px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
}
.brand-mark {
  width: 60px; height: 60px;
  border-radius: 14px;
  display: grid; place-items: center;
  font-size: 22px;
  background: var(--brand-grad);
  box-shadow: 0 4px 12px rgba(99,102,241,.34);
  flex-shrink: 0;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.brand-text strong { font-size: 16px; font-weight: 800; letter-spacing: -.02em; color: var(--text); }
.brand-text .brand-en {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  color: #4b3a8a;
  margin-top: 1px;
  line-height: 1.15;
}
.brand-text span { font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.side-nav { display: flex; flex-direction: column; gap: 4px; margin-top: 10px; }
.nav-item {
  display: flex; align-items: center; gap: 11px;
  width: 100%;
  border: 0; background: transparent;
  padding: 11px 12px;
  border-radius: 11px;
  font-size: 14px; font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  position: relative;
  transition: background var(--t), color var(--t);
  text-align: left;
}
.nav-item .ni-ico { width: 22px; height: 20px; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; }
.nav-item .ni-ico svg { width: 20px; height: 20px; display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.nav-item:hover { background: var(--inset); color: var(--text); }
.nav-item.nav-active {
  background: linear-gradient(135deg, rgba(99,102,241,.13), rgba(139,92,246,.10));
  color: var(--accent-d);
}
.nav-item.nav-active::before {
  content: ""; position: absolute; left: 0; top: 9px; bottom: 9px;
  width: 3px; border-radius: 0 3px 3px 0; background: var(--brand-grad);
}
.nav-item .nav-badge { margin-left: auto; }

.nav-item.nav-disabled {
  opacity: .55;
}
.nav-item.nav-disabled:hover {
  background: transparent;
  color: var(--text-2);
}

.sidebar-foot { margin-top: auto; padding-top: 12px; }
.side-safe {
  font-size: 11px; color: #92400e; font-weight: 700;
  background: linear-gradient(90deg, #fffbeb, #fef9ee);
  border: 1px solid #fcd34d; border-radius: 10px;
  padding: 9px 10px; text-align: center; line-height: 1.5;
}

.main { display: flex; flex-direction: column; min-width: 0; }

.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  padding: 12px 24px;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar-brand-mini { display: none; font-size: 20px; }
#viewTitle { margin: 0; font-size: 17px; font-weight: 800; letter-spacing: -.02em; color: var(--text); }
.topbar-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.topbar-right input { width: 130px; }

.view-area { max-width: 1140px; width: 100%; margin: 0 auto; padding: 16px 24px 40px; }

/* ─── 移动端底部 Tab 栏 ─── */
.bottom-tabs { display: none; }

/* ─── 集市顶栏：公测提示 + 四向统计（紧凑单行）──────────────── */
.market-top-compact {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.market-top-compact__beta {
  margin: 0;
  flex: 0 0 auto;
  background: linear-gradient(90deg, #fffbeb, #fef9ee);
  border: 1px solid #fcd34d;
  color: #92400e;
  border-radius: 8px;
  font-weight: 600;
  font-size: 10.5px;
  padding: 4px 10px;
  line-height: 1.25;
  white-space: nowrap;
}

/* ─── 首页热门横向卡带（审计 #23）────────────────────────────── */
.home-hot-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  min-height: 32px;
  overflow: hidden;
}
.home-hot-label {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
  letter-spacing: .02em;
}
.home-hot-list {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  flex-wrap: nowrap;
  padding-bottom: 2px;
  -webkit-overflow-scrolling: touch;
}
.home-hot-list::-webkit-scrollbar { display: none; }
.home-hot-chip {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 12px;
  cursor: pointer;
  transition: background var(--t), border-color var(--t), color var(--t);
  white-space: nowrap;
  color: var(--text);
  font-weight: 600;
  line-height: 1.3;
}
.home-hot-chip:hover, .home-hot-chip:focus-visible {
  background: #eef2ff;
  border-color: var(--brand);
  color: var(--brand);
  outline: none;
}
.home-hot-rank {
  font-size: 10px;
  font-weight: 400;
  color: var(--muted);
  margin-right: 1px;
}
/* Top 3 排名数字加点颜色区分 */
.home-hot-chip[data-rank="1"] .home-hot-rank { color: #d97706; }
.home-hot-chip[data-rank="2"] .home-hot-rank { color: #6b7280; }
.home-hot-chip[data-rank="3"] .home-hot-rank { color: #92400e; }

.market-header {
  margin-top: 12px;
  background: var(--brand-grad);
  color: #fff;
  border-radius: var(--rl);
  padding: 22px 26px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  box-shadow: 0 14px 40px rgba(99,102,241,.30), 0 4px 12px rgba(76,29,149,.18);
  position: relative;
  overflow: hidden;
}

/* 右上柔光球（呼应卡片 .card-header::after） */
.market-header::after {
  content: "";
  position: absolute;
  top: -70px; right: -40px;
  width: 260px; height: 260px;
  background: radial-gradient(circle, rgba(255,255,255,.20) 0%, transparent 62%);
  border-radius: 50%;
  pointer-events: none;
}

/* 细网格底纹，增加科技/高级质感 */
.market-header::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(ellipse at 70% 30%, #000 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at 70% 30%, #000 0%, transparent 75%);
  pointer-events: none;
}

.header-brand { position: relative; z-index: 1; }

h1 {
  margin: 0;
  font-size: 23px;
  font-weight: 800;
  letter-spacing: -.02em;
  text-shadow: 0 1px 3px rgba(76,29,149,.35);
}

.subtitle {
  margin: 5px 0 0;
  color: rgba(255,255,255,.82);
  font-size: 12px;
  letter-spacing: .02em;
}

.header-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  position: relative;
  z-index: 1;
}

.header-actions input {
  width: 140px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  color: #fff;
  border-radius: var(--r);
  padding: 8px 12px;
  font-size: 13px;
  transition: background var(--t), border-color var(--t);
}

.header-actions input::placeholder { color: rgba(255,255,255,.4); }

.header-actions input:focus {
  outline: none;
  background: rgba(255,255,255,.16);
  border-color: rgba(255,255,255,.45);
  box-shadow: none;
}

.total-badge {
  background: var(--inset);
  border: 1px solid var(--line);
  color: var(--text-2);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: .02em;
}

/* ─── Navigation ─────────────────────────────────────────────────── */
.page-nav {
  display: flex;
  gap: 4px;
  margin: 10px 0 0;
  padding: 4px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--rm);
  box-shadow: var(--sh-xs);
}

.page-nav a {
  flex: 1;
  text-align: center;
  text-decoration: none;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  padding: 8px 6px;
  border-radius: var(--r);
  transition: background var(--t), color var(--t), box-shadow var(--t);
}

.page-nav a:hover {
  background: #f1f5f9;
  color: var(--text);
}

.page-nav a.nav-active {
  background: var(--brand-grad);
  color: #fff;
  font-weight: 700;
  box-shadow: 0 3px 10px rgba(99,102,241,.36);
}

/* ─── Filters ────────────────────────────────────────────────────── */
.filters {
  margin-top: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--rm);
  padding: 14px 16px;
  box-shadow: var(--sh-xs);
}

.filter-main {
  display: grid;
  gap: 8px;
  grid-template-columns: 2fr 1fr 1fr 1fr;
}

/* ─── Form controls ──────────────────────────────────────────────── */
input, select, textarea, button { font: inherit; }

input, select, textarea {
  background: var(--inset);
  border: 1.5px solid var(--field-bd);
  border-radius: var(--r);
  padding: 8px 10px;
  font-size: 13px;
  color: var(--text);
  transition: border-color var(--t), box-shadow var(--t), background var(--t);
}

/* 彻底移除数字输入框的上下箭头（历史遗留/某些浏览器仍会给 spinbutton） */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
input[type="number"] { -moz-appearance: textfield; }

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99,102,241,.16);
  background: #fff;
}

/* ─── Chips ──────────────────────────────────────────────────────── */
.chips {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.chip {
  border: 1.5px solid var(--field-bd);
  background: var(--card);
  color: var(--text-2);
  border-radius: 999px;
  padding: 5px 14px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: background var(--t), border-color var(--t), color var(--t), transform var(--t);
}

.chip:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.chip.active {
  background: #eef2ff;
  border-color: var(--accent);
  color: var(--accent-d);
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(99,102,241,.18);
}

/* 筛选 chip 上的分面计数：把原本占一整排的统计卡折叠进 chip，省竖向空间 */
.chip-count {
  display: inline-block;
  min-width: 16px;
  margin-left: 3px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--inset-2);
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 16px;
  text-align: center;
}
.chip.active .chip-count {
  background: #fff;
  border-color: var(--accent);
  color: var(--accent-d);
}

.hint {
  color: var(--muted);
  font-size: 12px;
  margin-left: auto;
}

/* ─── Board (结构与线上一致，勿改 DOM/CSS 层级) ───────────────────── */
/* 网页看板字号略高于 QQ 浏览卡 PNG：大屏上 11px 会显得过小 */
.board {
  margin-top: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--rm);
  overflow: hidden;
  box-shadow: var(--sh-xs);
  --board-fs: 13px;
  --board-fs-sm: 11px;
  --board-fs-lg: 15px;
  --board-fs-price: 14px;
  --board-num: 26px;
}

/* 侧别筛选：只展示对应分区，避免「服务」只剩底部一条细行 */
.board.board-focus-sell .col.buy,
.board.board-focus-sell .footer-extra { display: none; }
.board.board-focus-sell .cols { grid-template-columns: minmax(0, 1fr); }

.board.board-focus-buy .col.sell,
.board.board-focus-buy .footer-extra { display: none; }
.board.board-focus-buy .cols { grid-template-columns: minmax(0, 1fr); }

.board.board-focus-trade .cols,
.board.board-focus-trade .extra-block:has(#rentList) { display: none; }

.board.board-focus-rent .cols,
.board.board-focus-rent .extra-block:has(#tradeList) { display: none; }

.cols {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0;
  border-bottom: 1px solid var(--line);
}

.board .col {
  padding: 10px 14px 12px;
  min-width: 0;
  overflow: hidden;
}

.col + .col { border-left: 1px solid var(--line); }

.board .col-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  font-size: var(--board-fs-lg);
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 2px solid currentColor;
}

.col.sell .col-head { color: #16a34a; }
.col.buy .col-head  { color: #2563eb; }

.board .count {
  background: #f3f4f6;
  color: #6b7280;
  border-radius: 8px;
  padding: 2px 8px;
  font-size: var(--board-fs-sm);
  font-weight: 700;
  margin-left: 4px;
}

.board .list { min-height: 80px; }

/* ─── 骨架屏：加载前占位动画（审计 #3） ────────────────────────────── */
@keyframes shimmer {
  0%   { background-position: -400px 0; }
  100% { background-position: 400px 0; }
}
.skel {
  background: linear-gradient(90deg, var(--card) 25%, var(--line) 50%, var(--card) 75%);
  background-size: 800px 100%;
  animation: shimmer 1.4s infinite linear;
  border-radius: var(--r);
}
.skel-card {
  height: 78px;
  margin-bottom: 8px;
  border-radius: var(--rm);
}

/* ─── 价格区间筛选（审计 #21） ──────────────────────────────────────── */
.filter-price-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}
.filter-price-label {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  flex-shrink: 0;
}
.price-filter-input {
  width: 140px;
  flex-shrink: 1;
  min-width: 80px;
}
.filter-price-sep {
  color: var(--muted);
  font-size: 13px;
  flex-shrink: 0;
}
.price-clear-btn {
  background: transparent;
  border: 1.5px solid var(--field-bd);
  border-radius: var(--r);
  color: var(--muted);
  padding: 4px 8px;
  font-size: 11px;
  cursor: pointer;
  line-height: 1;
  transition: color var(--t), border-color var(--t);
}
.price-clear-btn:hover { color: var(--accent); border-color: var(--accent); }

.board .lst {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  border-bottom: 1px dashed #f0eef8;
  padding: 8px 4px;
  font-size: var(--board-fs);
  line-height: 1.4;
}

.lst:last-child { border-bottom: 0; }

.board .lst-thumb {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  margin-top: 2px;
  border: 1px solid var(--line);
  background: var(--inset);
  cursor: pointer;
}

.board .lst-num {
  position: relative;
  width: var(--board-num);
  height: var(--board-num);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 800;
  color: #475569;
  background: #e2e8f0;
  flex-shrink: 0;
  margin-top: 2px;
}

.board .col.sell .lst-num { color: #047857; background: #d1fae5; }
.board .col.buy  .lst-num { color: #6d28d9; background: #ede9fe; }
.board #tradeList .lst-num { color: #6d28d9; background: #ede9fe; }
.board #rentList .lst-num { color: #b45309; background: #fef3c7; }

.lst-num.official {
  background: linear-gradient(135deg, #b45309, #d97706, #fbbf24);
  color: #fff;
  font-size: 12px;
  box-shadow: 0 0 0 2px #fef3c7, 0 2px 6px rgba(180, 83, 9, 0.5);
  transform: scale(1.08);
}

.lst-num.official::before {
  content: "📌";
  position: absolute;
  top: -7px;
  right: -8px;
  font-size: 11px;
  background: #fff;
  border-radius: 50%;
  padding: 1px 1px 0 1px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
  line-height: 1;
}

.lst-main { flex: 1; min-width: 0; }

.lst-line1 {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 6px;
}

.lst-line2 {
  margin-top: 2px;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: baseline;
  column-gap: 8px;
}

.lst-line2 .lst-price { grid-column: 1; }
.lst-line2 .lst-total { grid-column: 2; }
.lst-line2 .lst-loc { grid-column: 3; }

/* 两行布局：第一行 订单号 + 操作按钮；第二行 卖家/星系/信用 meta 占满整行。
   旧 grid 把 meta 与订单号挤在一行 + justify-self:end 撑到内容宽 → 长卖家名压到订单号上。
   meta 整行可容纳全部信息；仅极长卖家名时由内部 flex 省略号收缩。 */
.board .lst-line3 {
  margin-top: 4px;
  font-size: var(--board-fs-sm);
  color: #8b85a0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "code act"
    "meta meta";
  align-items: center;
  column-gap: 10px;
  row-gap: 3px;
}

.lst-line3 .lst-code { grid-area: code; justify-self: start; }
.lst-line3 .lst-meta { grid-area: meta; }
.lst-line3 .lst-act { grid-area: act; align-self: center; }

/* 委员会模式：把「接单 / 委改 / 委撤」收进同一列（接单下方竖排） */
.lst-line3.lst-line3-has-comm { align-items: start; }

.lst-act-col {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.board .lst-act-col .lst-act { width: 96px; }
.board .lst-act-col .mini-btn-comm { width: auto; }

.lst-total[hidden] { display: none !important; }

.lst-name {
  margin: 0;
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
}

.lst-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
}

.lst-name-row {
  display: flex;
  align-items: baseline;
  gap: 4px;
  min-width: 0;
  overflow: hidden;
}

.board .lst-name-text {
  font-weight: 700;
  font-size: var(--board-fs-lg);
  color: #1e1b2e;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.board .lst-official {
  display: inline-block;
  background: linear-gradient(135deg, #b45309 0%, #d97706 50%, #fbbf24 100%);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 4px;
  margin-right: 5px;
  vertical-align: middle;
  letter-spacing: 0.3px;
  box-shadow: 0 1px 3px rgba(180, 83, 9, 0.4);
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.2);
}

.lst-en {
  display: inline-block;
  color: #94a3b8;
  font-size: 10px;
  font-weight: 400;
  margin-left: 4px;
  vertical-align: middle;
}

.lst-quality {
  display: inline-block;
  background: #fef3c7;
  color: #b45309;
  border-radius: 3px;
  padding: 0 4px;
  font-size: 9.5px;
  font-weight: 700;
  margin-left: 4px;
  vertical-align: middle;
}

.board .lst-qty {
  margin: 0;
  color: #5b5672;
  font-size: var(--board-fs);
  font-weight: 600;
  flex-shrink: 0;
  padding-top: 2px;
  line-height: 1.4;
}

.board .lst-loc {
  margin: 0;
  color: #6b7280;
  font-size: var(--board-fs);
  flex: 1;
  min-width: 0;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lst-meta {
  margin: 0;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  overflow: hidden;
}

/* 仅卖家名收缩 + 省略号；订单号/星系/信用/按钮永不被挤掉 */
.lst-meta .lst-seller {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.lst-meta .lst-meta-tail {
  flex: 0 0 auto;
  white-space: nowrap;
}

.lst-meta .lst-cred {
  margin-left: 4px;
}

.board .lst-price {
  margin: 0;
  font-size: var(--board-fs-price);
  font-weight: 800;
  color: #d97706;
  flex-shrink: 0;
}

.board .col.buy .lst-price { color: #7c3aed; }
.board #tradeList .lst-price { color: #0891b2; }
.board #rentList .lst-price { color: #d97706; }

.board .lst-total {
  margin: 0;
  font-size: var(--board-fs-sm);
  font-weight: 700;
  color: #d97706;
  flex-shrink: 0;
}

.board .col.buy .lst-total { color: #7c3aed; }

.board .lst-code {
  margin: 0;
  font-family: Menlo, Consolas, monospace;
  font-size: var(--board-fs-sm);
  color: #64748b;
  font-weight: 700;
  flex-shrink: 0;
}

.lst-seller {
  color: #475569;
  font-weight: 600;
}

button.lst-seller-btn {
  border: 0;
  background: transparent;
  padding: 0;
  margin: 0;
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: rgba(99, 102, 241, 0.35);
  text-underline-offset: 2px;
}
button.lst-seller-btn:hover {
  color: var(--accent-d);
  text-decoration-color: var(--accent);
}

.lst-cred {
  display: inline-block;
  background: #ede9fe;
  color: #6d28d9;
  border-radius: 3px;
  padding: 0 4px;
  margin-left: 4px;
  font-weight: 700;
}

.lst-cred-official {
  background: transparent;
  color: #b45309;
  margin-left: 0;
}

.board .lst-act {
  align-self: center;
  margin-left: 4px;
  min-width: 72px;
  padding: 6px 12px !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  border-color: #818cf8 !important;
  background: #eef2ff !important;
  color: #3730a3 !important;
  box-shadow: 0 1px 3px rgba(67, 56, 202, 0.12);
}

.mini-btn {
  border: 1px solid #c7d2fe;
  background: #eef2ff;
  color: #4338ca;
  border-radius: 8px;
  padding: 4px 8px;
  font-size: 11px;
  cursor: pointer;
  flex-shrink: 0;
  font-weight: 600;
  transition: background var(--t), transform var(--t), box-shadow var(--t);
}

.mini-btn:hover {
  background: #e0e7ff;
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(67,56,202,.2);
}

/* 收藏星标按钮（审计 #22） */
.lst-star {
  background: transparent;
  border-color: transparent;
  color: #9ca3af;
  padding: 4px 6px;
  font-size: 14px;
}
.lst-star:hover { background: transparent; border-color: transparent; color: #f59e0b; transform: none; box-shadow: none; }
.lst-star.lst-star-active { color: #f59e0b; border-color: transparent; background: transparent; }

.board .footer-extra {
  padding: 10px 14px 12px;
  background: #faf9fd;
}

.board .extra-block { margin-top: 6px; }

.board .extra-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: var(--board-fs-lg);
  font-weight: 800;
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 2px solid currentColor;
}

.extra-head.trade { color: #9333ea; }
.extra-head.rent  { color: #d97706; }

.extra-head .count {
  font-size: 9.5px;
  margin-left: 3px;
}

.extra-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border-bottom: 1px dashed #f0eef8;
  padding: 3px 0;
  font-size: 11px;
  color: #1e1b2e;
}

.extra-row:last-child { border-bottom: 0; }

.extra-num {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #475569;
  text-align: center;
  font-weight: 800;
  font-size: 10px;
  line-height: 18px;
}

.extra-block .extra-head.trade ~ #tradeList .extra-row .extra-num {
  background: #ede9fe;
  color: #6d28d9;
}

.extra-block .extra-head.rent ~ #rentList .extra-row .extra-num {
  background: #fef3c7;
  color: #b45309;
}

.extra-code {
  flex-shrink: 0;
  font-family: Menlo, Consolas, monospace;
  font-size: 9.5px;
  color: #8b85a0;
  margin-right: 2px;
}

.extra-name {
  margin: 0;
  flex: 1;
  min-width: 0;
  font-size: 11px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.extra-official {
  display: inline-block;
  background: linear-gradient(135deg, #b45309 0%, #d97706 100%);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  border-radius: 3px;
  padding: 1px 5px;
  margin-right: 3px;
  vertical-align: middle;
}

.extra-price {
  margin: 0;
  color: #d97706;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.extra-act {
  flex-shrink: 0;
}

/* ─── Section containers ─────────────────────────────────────────── */
.my-center,
.committee-center,
.help-center,
.fleet-center {
  margin-top: 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--rm);
  padding: 16px 20px;
  box-shadow: var(--sh-xs);
}

/* ─── Fleet management ───────────────────────────────────────────── */
.fleet-role-card {
  margin-top: 12px;
  padding: 14px 16px;
  border-radius: var(--rm);
  border: 1px solid rgba(99, 102, 241, 0.25);
  background: linear-gradient(135deg, #eef2ff, #f5f3ff);
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-2);
}

.fleet-role-card strong {
  color: var(--accent-d);
  font-size: 15px;
}

.fleet-draft-banner {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: var(--rm);
  border: 1px solid #fcd34d;
  background: #fffbeb;
  color: #92400e;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
}

.fleet-section-head {
  margin: 18px 0 8px;
  font-size: 13px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: 0.02em;
}

.fleet-jielong-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fleet-jielong-card {
  border: 1px solid var(--line);
  border-radius: var(--rm);
  padding: 12px 14px;
  background: var(--card);
}

.fleet-jielong-card h4 {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.fleet-jielong-card .fj-meta {
  margin: 3px 0;
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.45;
}

.fleet-jielong-card .fj-badge {
  display: inline-block;
  margin-left: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-d);
  background: #eef2ff;
  border-radius: 6px;
  padding: 1px 6px;
}

.fleet-cmd-grid {
  margin-top: 8px;
}

.fleet-stats-panel {
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--rm);
  background: var(--inset);
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-2);
}

.fleet-sections-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.fleet-group-block {
  border: 1px solid var(--line);
  border-radius: var(--rm);
  overflow: hidden;
  background: var(--card);
}

.fleet-group-head {
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 800;
  background: linear-gradient(90deg, #eef2ff, #fafafa);
  border-bottom: 1px solid var(--line);
}

.fleet-signup-note {
  margin-top: 14px;
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
}

.fleet-target-fieldset {
  border: 1px solid var(--line);
  border-radius: var(--rm);
  padding: 10px 12px 12px;
  margin: 10px 0 0;
}

.fleet-target-fieldset legend {
  font-size: 12px;
  font-weight: 700;
  padding: 0 4px;
}

.fleet-target-checks label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  margin: 6px 0;
}

.fleet-dispatch-create-dialog { max-width: 760px; width: min(96vw, 760px); }

.fleet-squad-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.fleet-squad-chip {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  background: var(--card);
  cursor: pointer;
}

.fleet-squad-chip.active {
  border-color: rgba(99, 102, 241, 0.4);
  background: linear-gradient(135deg, rgba(99,102,241,.12), rgba(139,92,246,.10));
  color: var(--accent-d);
}

.fleet-squad-editors { display: flex; flex-direction: column; gap: 10px; }

.fleet-squad-editor {
  border: 1px solid var(--line);
  border-radius: var(--rm);
  background: var(--card);
  padding: 10px 12px;
}

.fleet-squad-editor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.fleet-squad-editor-head strong { font-size: 13px; }

.fleet-role-rows { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }

.fleet-role-row {
  display: grid;
  grid-template-columns: 1.2fr 0.6fr auto;
  gap: 8px;
  align-items: center;
}

.fleet-role-row input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.fleet-role-row .mini-btn { padding: 8px 10px; }

.fleet-add-role {
  margin-top: 8px;
}

.fleet-detail-dialog {
  max-width: 640px;
  width: min(96vw, 640px);
}

.fleet-detail-body {
  padding: 0 18px 12px;
  max-height: min(70vh, 520px);
  overflow: auto;
  font-size: 13px;
  line-height: 1.55;
}

.fleet-detail-meta {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  color: var(--text-2);
}

.fleet-signup-list {
  margin: 0;
  padding-left: 18px;
}

.fleet-signup-list li {
  margin: 4px 0;
}

.fleet-dispatch-squad {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--rm);
  background: var(--inset);
}

.fleet-dispatch-squad h5 {
  margin: 0 0 6px;
  font-size: 12px;
}

.fleet-dispatch-headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 0 6px;
}

.fleet-dispatch-headline strong { font-size: 13px; }
.fleet-dispatch-badges { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.fleet-dispatch-badges .fj-badge { margin-left: 0; }

.fleet-dispatch-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

@media (max-width: 520px) {
  .fleet-dispatch-grid { grid-template-columns: 1fr; }
}

.fleet-dispatch-role {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  padding: 10px 10px 8px;
}

.fleet-dispatch-role-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  font-weight: 800;
  color: var(--text);
}

.fleet-dispatch-role-title span {
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
}

.fleet-dispatch-slots {
  margin-top: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fleet-dispatch-slot {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 10px;
  background: #fafafa;
  border: 1px solid rgba(15, 23, 42, 0.06);
  font-size: 12px;
  color: var(--text-2);
}

.fleet-dispatch-slot .dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  flex: 0 0 auto;
  background: #d1d5db;
}

.fleet-dispatch-slot.filled .dot { background: #22c55e; }
.fleet-dispatch-slot.empty  .dot { background: #f59e0b; }
.fleet-dispatch-slot.disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}
.fleet-dispatch-slot .line { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 编组可视化 · 拖拽移动组员（Pointer Events，手机+PC 同一套代码） */
.fjm-hint-move {
  font-size: 11px;
  color: var(--muted, #64748b);
  margin: 4px 0 2px;
}
.fleet-dispatch-slot.filled.fjm-draggable {
  cursor: grab;
  touch-action: none; /* 触屏上按住组员拖动时不滚动页面 */
}
.fleet-dispatch-slot.filled.fjm-draggable:active { cursor: grabbing; }
.fleet-dispatch-slot.fjm-dragging { opacity: 0.4; }
.fleet-dispatch-slot.fjm-drop-ok {
  border-color: rgba(34, 197, 94, 0.5);
  box-shadow: inset 0 0 0 1px rgba(34, 197, 94, 0.35);
}
.fleet-dispatch-slot.fjm-drop-hot {
  background: #ecfdf5;
  border-color: #16a34a;
  box-shadow: inset 0 0 0 2px rgba(22, 163, 74, 0.6);
}
.fjm-drag-ghost {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 99999;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 10px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.12);
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.2);
  font-size: 12px;
  color: var(--text-1, #0f172a);
  max-width: 60vw;
  white-space: nowrap;
  transform: translate(-50%, calc(-100% - 6px));
  opacity: 0.96;
}
.fjm-drag-ghost .dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #22c55e;
  flex: 0 0 auto;
}

.fleet-card-actions {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: wrap;
}

/* ─── Help ───────────────────────────────────────────────────────── */
.help-grid {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.help-card {
  border: 1px solid var(--line);
  border-radius: var(--rm);
  padding: 14px 16px;
  background: var(--inset);
  transition: box-shadow var(--t);
}

.help-card:hover { box-shadow: var(--sh-sm); }

.help-card h4 {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.help-card p {
  margin: 4px 0;
  color: var(--text-2);
  font-size: 12px;
  line-height: 1.5;
}

.help-card code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  background: #eef2ff;
  color: var(--accent-d);
  border-radius: 4px;
  padding: 1px 5px;
}

/* ─── Committee row ──────────────────────────────────────────────── */
.committee-row {
  border: 1px solid var(--line);
  border-radius: var(--rm);
  padding: 10px 14px;
  background: var(--inset);
  transition: box-shadow var(--t);
}

.committee-row:hover { box-shadow: var(--sh-xs); }

.committee-row .my-row-line1,
.committee-row .my-row-line2 { font-size: 12px; }

/* ─── My head ────────────────────────────────────────────────────── */
.my-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  padding-bottom: 12px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
}

.my-head strong {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -.01em;
  display: inline-flex;
  align-items: center;
}

/* 区块标题前的品牌渐变竖条 */
.my-head strong::before {
  content: "";
  width: 4px;
  height: 17px;
  border-radius: 3px;
  margin-right: 9px;
  background: var(--brand-grad);
}

.my-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* 强制在第 4 / 5 按钮间换行 */
.actions-break {
  flex-basis: 100%;
  height: 0;
}

.my-hint {
  margin: 8px 0;
  color: var(--muted);
  font-size: 12px;
  min-height: 18px;
}

.my-tools {
  margin: 8px 0;
  display: grid;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto auto;
}

.my-list {
  margin-top: 8px;
  display: grid;
  gap: 8px;
}

/* ─── My row ─────────────────────────────────────────────────────── */
.my-row {
  border: 1px solid var(--line);
  border-radius: var(--rm);
  padding: 10px 14px;
  background: var(--inset);
  transition: box-shadow var(--t);
}

.my-row:hover { box-shadow: var(--sh-sm); }

.my-row-line1,
.my-row-line2 {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.my-row-line1 { font-size: 13px; font-weight: 700; }

.my-row-line2 {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-2);
}

.my-row-actions {
  margin-top: 8px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

/* ─── Buttons ────────────────────────────────────────────────────── */
.primary-btn, .ghost-btn, .icon-btn {
  border: 0;
  border-radius: var(--r);
  cursor: pointer;
  font-weight: 600;
  transition: background var(--t), transform var(--t), box-shadow var(--t);
}

.primary-btn {
  color: #fff;
  background: var(--brand-grad);
  padding: 9px 17px;
  font-size: 13px;
  box-shadow: 0 3px 10px rgba(99,102,241,.32);
}

.primary-btn:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(99,102,241,.42);
}

.primary-btn:active { transform: none; }

.qq-connect-btn {
  border: 0;
  padding: 7px 12px;
  border-radius: var(--r);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  color: #fff;
  background: linear-gradient(135deg, #12b7f5 0%, #0099ff 55%, #0066cc 100%);
  box-shadow: 0 2px 8px rgba(0, 153, 255, .28);
  transition: filter var(--t), transform var(--t);
  white-space: nowrap;
}
.qq-connect-btn:hover { filter: brightness(1.06); }
.qq-connect-btn:active { transform: scale(.98); }
.qq-connect-btn[hidden] { display: none !important; }

.ghost-btn {
  background: var(--card);
  border: 1.5px solid var(--field-bd);
  color: var(--text-2);
  padding: 7px 12px;
  font-size: 12px;
  transition: background var(--t), border-color var(--t), color var(--t), transform var(--t);
}

.ghost-btn:hover {
  background: var(--inset);
  border-color: var(--accent);
  color: var(--accent-d);
  transform: translateY(-1px);
}

.icon-btn {
  width: 30px;
  height: 30px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color var(--t);
}

.icon-btn:hover { color: var(--text-2); }

/* ─── Dialogs ────────────────────────────────────────────────────── */
.dialog {
  border: 1px solid var(--line);
  border-radius: var(--rl);
  background: var(--card);
  width: min(760px, 92vw);
  color: var(--text);
  box-shadow: var(--sh-lg);
  padding: 0;
}

.dialog::backdrop {
  background: rgba(2,6,23,.55);
  backdrop-filter: blur(2px);
}

.dialog form,
.dialog .dialog-panel { padding: 20px; }

.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.dialog-header h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.01em;
}

.dialog-grid {
  margin-top: 14px;
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.action-fields {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.action-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--text-2);
  font-weight: 500;
}

.action-field small {
  color: var(--muted);
  margin-top: 2px;
}

.action-field input,
.action-field textarea,
.action-field select {
  background: var(--inset);
  color: var(--text);
  border: 1.5px solid var(--field-bd);
  border-radius: var(--r);
  padding: 8px 10px;
  font-size: 13px;
}

.action-field input[readonly] { opacity: .72; cursor: default; }

.action-field textarea[readonly] {
  font-size: 11px;
  line-height: 1.5;
  max-height: 220px;
  overflow-y: auto;
  opacity: .72;
  cursor: default;
}

.dialog-grid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--text-2);
  font-weight: 500;
}

label > textarea { margin-top: 5px; }

.dialog-footer {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

/* ─── Todo banner ────────────────────────────────────────────────── */
.todo-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  padding: 10px 16px;
  background: #fff7ed;
  border: 1px solid #fdba74;
  border-radius: var(--rm);
  font-size: 13px;
  color: #9a3412;
  box-shadow: var(--sh-xs);
}

.todo-banner-btn {
  margin-left: auto;
  border: 0;
  background: #ea580c;
  color: #fff;
  border-radius: var(--r);
  padding: 5px 14px;
  font-size: 12px;
  cursor: pointer;
  font-weight: 700;
  transition: background var(--t);
}

.todo-banner-btn:hover { background: #c2410c; }

/* ─── Misc ───────────────────────────────────────────────────────── */
.nav-badge, .inline-badge {
  display: inline-block;
  min-width: 16px;
  margin-left: 4px;
  padding: 0 5px;
  background: #ef4444;
  color: #fff;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  vertical-align: middle;
}

.nav-badge[hidden], .inline-badge[hidden] { display: none; }

#section-market, #section-mine, #section-committee, #section-help {
  scroll-margin-top: 12px;
}

.fee-panel { grid-template-columns: auto auto auto !important; }

#committeeFeePanel {
  margin: 8px 0;
  gap: 8px;
  align-items: center;
}

#committeeFeePanel strong {
  font-size: 12px;
  color: var(--muted);
  margin-right: 4px;
}

.field-hint {
  display: block;
  margin-top: 4px;
  font-size: 11px;
  color: #059669;
  line-height: 1.4;
}

.field-hint.muted { color: var(--muted); }

/* requires_note 品类的醒目提示（型号配色填备注）*/
.field-hint.warn {
  color: #9a3412;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  padding: 6px 10px;
  font-weight: 600;
  font-size: 11.5px;
}

.dialog-grid .span-2 { grid-column: span 2; }

.checkbox-label {
  flex-direction: row !important;
  align-items: center;
  gap: 8px !important;
  font-size: 13px !important;
  color: var(--text) !important;
}

.checkbox-label input { width: auto; }

.required-mark {
  color: #dc2626;
  font-weight: 700;
  font-size: 12px;
}

.allow-partial-field {
  grid-column: span 2;
  margin: 0;
  padding: 12px 14px;
  border: 2px solid var(--brand-2);
  border-radius: var(--rm);
  background: linear-gradient(180deg, rgba(99,102,241,.06) 0%, rgba(255,255,255,.9) 100%);
  box-shadow: var(--sh-sm);
}

.allow-partial-field legend {
  padding: 0 6px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.allow-partial-hint {
  margin: 0 0 10px;
  font-size: 12px;
  color: var(--text-2);
}

.allow-partial-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 520px) {
  .allow-partial-options { grid-template-columns: 1fr; }
}

.allow-partial-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 12px 12px;
  border: 2px solid var(--field-bd);
  border-radius: var(--r);
  background: var(--card);
  cursor: pointer;
  transition: border-color var(--t), box-shadow var(--t), background var(--t);
}

.allow-partial-option:hover {
  border-color: var(--brand);
  box-shadow: var(--sh-xs);
}

.allow-partial-option:has(input:checked) {
  border-color: var(--brand);
  background: rgba(99,102,241,.08);
  box-shadow: 0 0 0 3px rgba(99,102,241,.15);
}

.allow-partial-option input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--brand);
}

.allow-partial-option .opt-body {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.allow-partial-option .opt-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
}

.allow-partial-option .opt-desc {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.4;
}

.empty {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
  padding: 28px 8px;
}

/* ─── Proof viewer ───────────────────────────────────────────────── */
.proof-viewer-dialog {
  width: min(92vw, 720px);
  max-height: 90vh;
  border: none;
  padding: 0;
  border-radius: var(--rl);
}

.proof-header {
  flex-wrap: wrap;
  gap: 8px;
  padding: 14px 16px 0;
}

.proof-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}

.proof-toolbar .btn-sm { padding: 4px 10px; font-size: 12px; }

#proofZoomLevel {
  font-size: 12px;
  color: var(--muted);
  min-width: 42px;
  text-align: center;
}

.proof-viewer-body {
  padding: 8px 12px 16px;
  background: #0f172a;
  max-height: calc(90vh - 60px);
  overflow: auto;
}

.proof-viewer-body img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
  border-radius: 8px;
  transform-origin: center top;
  transition: transform .15s ease;
}

/* ─── 信用档案（网页 HTML）────────────────────────────────────────── */
.credit-profile-dialog {
  width: min(92vw, 480px);
  max-height: 90vh;
  border: none;
  padding: 0;
  border-radius: var(--rl);
  overflow: hidden;
}
.credit-profile-header {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.credit-profile-body {
  max-height: calc(90vh - 56px);
  overflow: auto;
  background: var(--inset);
}
.credit-profile-card {
  background: var(--card);
  font-size: 13px;
  color: var(--text);
}
.credit-profile-card .cc-header {
  background: linear-gradient(135deg, #1e40af 0%, #3730a3 50%, #4338ca 100%);
  padding: 16px 18px 14px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.credit-profile-card .cc-header::after {
  content: "";
  position: absolute;
  top: -28px;
  right: -28px;
  width: 110px;
  height: 110px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
}
.credit-profile-card .cc-row1 {
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
  z-index: 1;
}
.credit-profile-card .cc-avatar,
.credit-profile-card .cc-avatar-fallback {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  flex-shrink: 0;
}
.credit-profile-card .cc-avatar {
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.35);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  background: rgba(255, 255, 255, 0.15);
}
.credit-profile-card .cc-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #cbd5e1, #94a3b8);
  font-size: 22px;
  font-weight: 800;
  color: #fff;
}
.credit-profile-card .cc-id { flex: 1; min-width: 0; }
.credit-profile-card .cc-id .title { font-size: 16px; font-weight: 800; }
.credit-profile-card .cc-id .sub {
  font-size: 12px;
  opacity: 0.92;
  margin-top: 2px;
  line-height: 1.45;
}
.credit-profile-card .cc-level-badge {
  background: rgba(255, 255, 255, 0.22);
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}
.credit-profile-card .cc-score {
  background: #f8fafc;
  padding: 14px 18px;
  text-align: center;
  border-bottom: 1px solid #f1f5f9;
}
.credit-profile-card .cc-score .num {
  font-size: 34px;
  font-weight: 900;
  color: #1e3a8a;
  line-height: 1;
}
.credit-profile-card .cc-score .delta {
  display: inline-block;
  margin-left: 6px;
  font-size: 13px;
  background: #dcfce7;
  color: #166534;
  padding: 1px 8px;
  border-radius: 8px;
  font-weight: 700;
  vertical-align: middle;
}
.credit-profile-card .cc-score .delta.down {
  background: #fee2e2;
  color: #991b1b;
}
.credit-profile-card .cc-score .label {
  font-size: 11px;
  color: #64748b;
  margin-top: 4px;
}
.credit-profile-card .cc-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  padding: 10px 14px;
}
.credit-profile-card .cc-stat {
  text-align: center;
  background: #f8fafc;
  border-radius: 10px;
  padding: 7px 4px;
  border: 1px solid #e2e8f0;
  min-width: 0;
}
.credit-profile-card .cc-stat .num {
  font-size: 15px;
  font-weight: 800;
  color: #1e3a8a;
  line-height: 1.2;
  word-break: break-word;
}
.credit-profile-card .cc-stat .label {
  font-size: 10px;
  color: #64748b;
  margin-top: 2px;
  line-height: 1.3;
}
.credit-profile-card .cc-banner {
  margin: 4px 14px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 11px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}
.credit-profile-card .cc-banner.fee-ok {
  background: #f0fdf4;
  border-left: 3px solid #22c55e;
  color: #166534;
}
.credit-profile-card .cc-banner.fee-bad {
  background: #fef2f2;
  border-left: 3px solid #ef4444;
  color: #991b1b;
}
.credit-profile-card .cc-banner.hint {
  background: #f0f9ff;
  border-left: 3px solid #0284c7;
  color: #075985;
}
.credit-profile-card .cc-rules {
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  padding: 8px 14px 9px;
  font-size: 11px;
  color: #475569;
  line-height: 1.55;
}
.credit-profile-card .cc-rules .rules-head {
  font-size: 10px;
  font-weight: 800;
  color: #1e3a8a;
  margin-bottom: 4px;
}
.credit-profile-card .cc-rules .row {
  display: flex;
  gap: 6px;
}
.credit-profile-card .cc-rules .key {
  color: #64748b;
  flex-shrink: 0;
  min-width: 44px;
}
.credit-profile-card .cc-rules .lvl {
  background: #ede9fe;
  color: #5b21b6;
  border-radius: 3px;
  padding: 0 4px;
  font-weight: 700;
}
.credit-profile-card .cc-rules .plus { color: #15803d; font-weight: 700; }
.credit-profile-card .cc-rules .minus { color: #b91c1c; font-weight: 700; }
.credit-profile-card .cc-priv-table {
  padding: 8px 14px 10px;
  background: #fff;
}
.credit-profile-card .cc-priv-table .priv-head {
  font-size: 10px;
  font-weight: 800;
  color: #1e3a8a;
  margin-bottom: 5px;
}
.credit-profile-card .cc-priv-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  table-layout: fixed;
}
.credit-profile-card .cc-priv-table th,
.credit-profile-card .cc-priv-table td {
  padding: 4px;
  text-align: center;
  border-bottom: 1px solid #f1f5f9;
}
.credit-profile-card .cc-priv-table th {
  color: #64748b;
  font-weight: 700;
  font-size: 10px;
  background: #f8fafc;
}
.credit-profile-card .cc-priv-table tr.current td {
  background: #fef3c7;
  font-weight: 700;
  color: #92400e;
}
.credit-profile-card .cc-priv-table .lvl-cell {
  font-weight: 700;
  color: #5b21b6;
}
.credit-profile-card .cc-priv-table tr.current .lvl-cell { color: #92400e; }
.credit-profile-card .cc-footer {
  background: #fef3c7;
  color: #92400e;
  padding: 8px 14px;
  font-size: 11.5px;
  text-align: center;
  font-weight: 600;
  border-top: 1px solid #fde68a;
}
.credit-profile-card.official .oc-header {
  background: linear-gradient(135deg, #b45309 0%, #d97706 45%, #f59e0b 100%);
  padding: 18px;
  color: #fff;
  position: relative;
  overflow: hidden;
}
.credit-profile-card.official .oc-row1 {
  display: flex;
  align-items: center;
  gap: 14px;
  position: relative;
  z-index: 1;
}
.credit-profile-card.official .oc-avatar,
.credit-profile-card.official .oc-avatar-fallback {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  flex-shrink: 0;
}
.credit-profile-card.official .oc-avatar {
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.25);
}
.credit-profile-card.official .oc-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #fed7aa, #fdba74);
  font-size: 24px;
  color: #92400e;
  font-weight: 800;
}
.credit-profile-card.official .oc-id { flex: 1; min-width: 0; }
.credit-profile-card.official .oc-id .brand {
  font-size: 18px;
  font-weight: 800;
}
.credit-profile-card.official .oc-id .slogan {
  font-size: 12px;
  opacity: 0.95;
  margin-top: 3px;
}
.credit-profile-card.official .oc-id .contact {
  font-size: 11px;
  opacity: 0.9;
  margin-top: 4px;
  line-height: 1.45;
}
.credit-profile-card.official .oc-badge {
  background: linear-gradient(135deg, #fef3c7, #fde68a);
  color: #92400e;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 800;
  flex-shrink: 0;
}
.credit-profile-card.official .oc-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  padding: 14px;
  background: #fffbeb;
}
.credit-profile-card.official .oc-stat {
  background: #fff;
  border: 1px solid #fde68a;
  border-radius: 10px;
  padding: 12px 8px;
  text-align: center;
}
.credit-profile-card.official .oc-stat .num {
  font-size: 20px;
  font-weight: 800;
  color: #b45309;
}
.credit-profile-card.official .oc-stat .num.sm { font-size: 16px; }
.credit-profile-card.official .oc-stat .label {
  font-size: 11px;
  color: #78350f;
  margin-top: 4px;
}
.credit-profile-card.official .oc-intro {
  margin: 0 14px 14px;
  padding: 12px 14px;
  border-radius: 10px;
  border-left: 4px solid #d97706;
  font-size: 12px;
  color: #44403c;
  line-height: 1.7;
  background: #fff;
}
.credit-profile-card.official .oc-intro .head {
  font-weight: 800;
  color: #b45309;
  margin-bottom: 4px;
}
.credit-profile-card.official .oc-intro .row {
  display: flex;
  gap: 6px;
}
.credit-profile-card.official .oc-intro .dot {
  color: #d97706;
  flex-shrink: 0;
}
.credit-profile-card.official .oc-footer {
  background: #fef3c7;
  color: #92400e;
  padding: 9px 14px;
  font-size: 11.5px;
  text-align: center;
  font-weight: 600;
  border-top: 1px solid #fde68a;
}

@media (max-width: 420px) {
  .credit-profile-card .cc-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* ─── My row actions ─────────────────────────────────────────────── */
.my-row-actions .mini-btn.btn-good {
  background: #fef3c7;
  border-color: #fcd34d;
  color: #92400e;
}

.proof-row { gap: 6px; flex-wrap: wrap; }

.proof-row .mini-btn,
.proof-row .ghost-mini { font-size: 11px; padding: 4px 8px; }

.mini-link { font-size: 11px; color: #7dd3fc; text-decoration: none; }

/* 鹿港贸易服务官方徽章 */
.official-badge {
  display: inline-block;
  background: linear-gradient(90deg, #b45309, #d97706);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  border-radius: 4px;
  padding: 1px 5px;
  margin-right: 5px;
  vertical-align: middle;
  letter-spacing: .02em;
}

/* 看板挂单徽章：品质分 / 必整批 */
.lst-badge {
  display: inline-block;
  font-size: 9px;
  font-weight: 700;
  border-radius: 4px;
  padding: 1px 5px;
  margin-right: 5px;
  vertical-align: middle;
  letter-spacing: .02em;
}
.badge-quality { background: #ecfccb; color: #4d7c0f; border: 1px solid #d9f99d; }
.badge-whole   { background: #fef9c3; color: #a16207; border: 1px solid #fde68a; }
.badge-partial { background: #e0f2fe; color: #0369a1; border: 1px solid #bae6fd; }

/* 登录态 chip（亮色顶栏） */
.auth-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  color: var(--accent-d);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  letter-spacing: .02em;
  max-width: 360px;
  overflow: hidden;
}

.auth-chip .auth-avatar {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid rgba(99,102,241,.25);
  object-fit: cover;
  background: #fff;
  flex-shrink: 0;
}

.auth-chip .auth-avatar-fallback {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  display: none;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: var(--brand-grad);
  color: #fff;
  font-size: 14px;
  box-shadow: 0 4px 10px rgba(99,102,241,.25);
}

.auth-chip .auth-avatar[style*="display: none"] + .auth-avatar-fallback {
  display: inline-flex;
}

.auth-chip .auth-avatar-fallback + .auth-lines {
  min-width: 0;
}

.auth-chip .auth-lines {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.15;
}

.auth-chip .auth-line1 {
  font-size: 12px;
  font-weight: 800;
  color: #1e1b2e;
  overflow: hidden;
  text-overflow: ellipsis;
}

.auth-chip .auth-line2 {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--accent-d);
  opacity: .92;
  overflow: hidden;
  text-overflow: ellipsis;
}

.auth-chip.auth-miss {
  background: #fff7ed;
  border-color: #fed7aa;
  color: #9a3412;
}

.auth-chip.auth-miss .auth-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #f97316;
  box-shadow: 0 0 0 3px rgba(249,115,22,.18);
}

.auth-chip.auth-miss .auth-miss-text {
  font-weight: 800;
  letter-spacing: .02em;
}

/* 委员会操作按钮（看板行） */
.mini-btn-comm {
  background: transparent;
  border: 0;
  color: #b45309;
  padding: 2px 2px;
  font-size: 11px;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 3px;
  box-shadow: none;
}

.mini-btn-comm:hover {
  background: rgba(251, 191, 36, .16);
  box-shadow: none;
}

/* ─── 全局加载进度条 ─── */
#globalProgress {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  z-index: 9999;
  pointer-events: none;
  overflow: hidden;
}
#globalProgress::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 38%;
  background: linear-gradient(90deg, transparent, #6366f1, #a78bfa, transparent);
  opacity: 0;
  transform: translateX(-100%);
}
#globalProgress.active::before {
  opacity: 1;
  animation: gp-slide 1.05s ease-in-out infinite;
}
@keyframes gp-slide {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(360%); }
}

/* ─── Toast 通知 ─── */
#toastHost {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
  width: min(92vw, 440px);
}
.toast {
  pointer-events: auto;
  width: 100%;
  padding: 11px 16px;
  border-radius: var(--rm);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.55;
  white-space: pre-line;
  color: #fff;
  box-shadow: var(--sh-lg);
  opacity: 0;
  transform: translateY(-12px);
  transition: opacity .22s ease, transform .22s ease;
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast-success { background: linear-gradient(135deg, #16a34a, #15803d); }
.toast-error   { background: linear-gradient(135deg, #dc2626, #b91c1c); }
.toast-info    { background: linear-gradient(135deg, #6366f1, #7c3aed); }

/* ─── 确认弹窗 ─── */
.confirm-dialog { width: min(440px, 92vw); }
.confirm-body { padding: 22px 22px 6px; }
.confirm-title { margin: 0 0 10px; font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.confirm-msg {
  margin: 0;
  font-size: 13px;
  line-height: 1.65;
  color: var(--text-2);
  white-space: pre-line;
  max-height: 52vh;
  overflow-y: auto;
}
.confirm-dialog .dialog-footer { padding: 14px 22px 18px; margin-top: 10px; }
.danger-btn { background: #dc2626 !important; box-shadow: 0 2px 6px rgba(220,38,38,.3) !important; }
.danger-btn:hover { background: #b91c1c !important; }

/* ─── 全局忙碌态：防重复提交 ─── */
body.is-busy { cursor: progress; }
body.is-busy .primary-btn:not(.fleet-action-btn),
body.is-busy .mini-btn:not(.fleet-action-btn) { pointer-events: none; opacity: .55; }

.fleet-dialog-footer {
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}
.fleet-confirm-preview {
  margin: 0;
  padding: 12px 14px;
  max-height: min(52vh, 420px);
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 13px;
  line-height: 1.5;
  background: var(--surface-2, #f8fafc);
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 10px;
  color: var(--text, #0f172a);
}

.fleet-submit-status {
  flex: 1 1 100%;
  margin: 0;
  min-height: 1.25em;
  font-size: 12px;
  line-height: 1.45;
  color: var(--text-2);
}
.fleet-submit-status.info { color: #4f46e5; font-weight: 700; }
.fleet-submit-status.ok { color: #16a34a; font-weight: 700; }
.fleet-submit-status.err { color: #dc2626; font-weight: 700; }

/* ─── 移动端底部 Tab 栏样式 ─── */
.tab-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 7px 0 max(7px, env(safe-area-inset-bottom));
  position: relative;
  transition: color var(--t);
}
.tab-item .tab-ico { display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
.tab-item .tab-ico svg { width: 22px; height: 22px; display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tab-item.nav-active { color: var(--accent-d); }
.tab-item .nav-badge { position: absolute; top: 4px; right: 22%; margin: 0; }

.lst-line3-comm {
  justify-content: flex-end;
  gap: 6px;
  margin-top: 4px;
}

/* 卖家筛选 chip（可点清除） */
.seller-chip {
  background: #fff7ed !important;
  border-color: #fdba74 !important;
  color: #9a3412 !important;
}
.seller-chip:hover { background: #ffedd5 !important; }

/* 详情底部操作按钮排版 */
.d-detail-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.d-detail-actions .btn-sm { padding: 7px 12px; font-size: 12px; }

/* 空状态操作按钮 */
.empty-cta {
  margin-top: 10px;
  display: inline-block;
}

/* 热榜成交占比条（对齐 QQ 热榜卡进度条） */
.hot-bar {
  margin-top: 7px;
  height: 5px;
  background: var(--inset);
  border-radius: 999px;
  overflow: hidden;
}
.hot-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--brand-grad);
}

/* 挂单详情底部操作按钮 */
.d-detail-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.d-detail-actions .btn-sm { padding: 7px 12px; font-size: 12px; flex: 1; }
.d-detail-actions .js-take-btn { flex: 1.4; }

/* ─── 可点元素（商品名 / 订单标题 / 指导价条目）─── */
.clickable {
  cursor: pointer;
  transition: color var(--t);
}
.clickable:hover { color: var(--accent-d); text-decoration: underline; text-underline-offset: 2px; }

/* ─── 详情弹窗（QQ 卡片风格）─── */
.detail-dialog { width: min(460px, 92vw); padding: 0; overflow: hidden; }
.detail-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 13px 18px;
  color: #fff;
  font-weight: 800;
  font-size: 14px;
}
.detail-banner .db-code {
  background: rgba(255,255,255,.25);
  border-radius: 8px;
  padding: 2px 9px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .04em;
}
.detail-body { padding: 16px 18px 6px; }
.d-hero {
  text-align: center;
  padding: 2px 0 12px;
  border-bottom: 1px dashed var(--line);
  margin-bottom: 10px;
}
.d-hero-name { font-size: 17px; font-weight: 800; color: var(--text); line-height: 1.35; }
.d-hero-sub { font-size: 12px; color: var(--muted); margin-top: 3px; }
.d-hero-price { font-size: 16px; font-weight: 800; color: var(--gold); margin-top: 6px; }
.d-row {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 10px;
  padding: 5px 0;
  font-size: 13px;
  line-height: 1.45;
  border-bottom: 1px solid var(--inset);
}
.d-row:last-child { border-bottom: 0; }
.d-lbl { color: var(--muted); }
.d-val { color: var(--text); font-weight: 600; word-break: break-word; }
.d-val.strong { color: var(--accent-d); font-weight: 800; }
.d-uex {
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: var(--r);
  padding: 9px 12px;
  font-size: 12px;
  color: #0c4a6e;
  line-height: 1.7;
  margin-top: 10px;
}
.d-uex-head { font-weight: 800; margin-bottom: 2px; }

/* 价格走势（自绘 SVG 折线，鹿港靛紫） */
.d-trend {
  margin-top: 10px;
  background: linear-gradient(180deg, #fafaff, #f5f3ff);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 9px 10px 6px;
}
.d-trend-head {
  font-size: 12px;
  font-weight: 800;
  color: var(--accent-d);
  margin-bottom: 4px;
}
.d-trend-svg { display: block; }
.d-trend-svg .d-trend-ax {
  font-size: 9px;
  fill: var(--muted);
  font-variant-numeric: tabular-nums;
}
.d-trend-note {
  font-size: 12px;
  color: var(--muted);
  padding: 6px 2px 4px;
}

/* 商品详情：图 / 介绍 / 属性 / 获取途径（网页限定，QQ 不展示） */
.d-itemdetail { margin-top: 10px; }
.d-img {
  margin-bottom: 10px;
  border-radius: var(--rm);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--inset);
}
.d-img img { display: block; width: 100%; height: auto; }
.d-desc {
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--text-2);
  background: var(--inset);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 9px 11px;
  margin-bottom: 8px;
}
.d-attrs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.d-attr {
  font-size: 11.5px;
  color: var(--text-2);
  background: var(--inset-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px 10px;
}
.d-attr b { color: var(--muted); font-weight: 600; margin-right: 3px; }
.d-acq {
  background: linear-gradient(180deg, #fafaff, #f5f3ff);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 9px 11px 7px;
}
.d-acq-head { font-size: 12px; font-weight: 800; color: var(--accent-d); margin-bottom: 4px; }
.d-acq-sub { font-size: 11.5px; font-weight: 700; color: var(--text-2); margin: 6px 0 3px; }
.d-acq-row {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 12px; color: var(--text-2); padding: 2px 0;
}
.d-acq-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.d-acq-price { flex: 0 0 auto; font-weight: 700; color: var(--gold); font-variant-numeric: tabular-nums; }
.d-acq-price.d-acq-sell { color: var(--sell); }
.d-acq-tag {
  flex: 0 0 auto; font-size: 10.5px; font-weight: 700;
  color: var(--accent-d); background: #eef2ff; border-radius: 4px; padding: 1px 6px;
}
.detail-dialog .dialog-footer { padding: 12px 18px 16px; margin-top: 8px; }

/* ─── Media queries ──────────────────────────────────────────────── */
@media (max-width: 920px) {
  /* 应用外壳切换：隐藏侧边栏 → 底部 Tab 栏 */
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .bottom-tabs {
    display: flex;
    position: fixed;
    left: 0; right: 0; bottom: 0;
    z-index: 40;
    background: rgba(255,255,255,.92);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-top: 1px solid var(--line);
    box-shadow: 0 -4px 16px rgba(99,102,241,.08);
  }
  .main { padding-bottom: 64px; }       /* 给底部 Tab 栏留空间 */
  .topbar-brand-mini { display: inline; }
  /* 顶栏纵向两行：第一行 logo+标题，第二行登录/发布按钮组，避免 375px 挤压换行 */
  .topbar {
    padding: 10px 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
  }
  .topbar-left { justify-content: flex-start; }
  .topbar-right { width: 100%; gap: 6px; flex-wrap: nowrap; }
  .topbar-right input { flex: 1; width: auto; min-width: 80px; }
  .topbar-right .ghost-btn,
  .topbar-right .primary-btn { white-space: nowrap; flex-shrink: 0; }
  .topbar .total-badge { display: none; } /* 移动端顶栏腾空间 */
  #joinGuideBtn { display: none; }         /* 移动端隐藏「新用户?」：登录失败会自动弹引导 + 帮助页有加入卡 */
  #authChip { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
  .view-area { padding: 14px 16px 28px; }

  .filter-main { grid-template-columns: 1fr 1fr; }
  .filter-price-row { gap: 4px; }
  .price-filter-input { width: 110px; }
  .cols { grid-template-columns: 1fr; }
  .help-grid { grid-template-columns: 1fr; }
  .my-tools { grid-template-columns: 1fr; }
  .col + .col { border-left: 0; border-top: 1px solid var(--line); }
  .dialog-grid .span-2 { grid-column: span 1; }
  .dialog-grid { grid-template-columns: 1fr; }
  .my-head { flex-direction: column; align-items: flex-start; }
  .my-actions { width: 100%; justify-content: flex-start; }
  .actions-break { display: none; }   /* 移动端按钮自然换行，无需强制断行 */
  #toastHost { top: 10px; }
}

@media (max-width: 560px) {
  .filter-main { grid-template-columns: 1fr; }
  .market-top-compact { flex-direction: column; align-items: stretch; }
  .market-top-compact__beta { text-align: center; white-space: normal; }
}

/* ─── 访问模式：未登录兴趣站 / 已登录鹿港集市 ───────────────────────── */
body.mode-guest .app { display: none !important; }
body.mode-guest #guestLanding { display: block; }
body.mode-member #guestLanding { display: none !important; }

#guestLanding { display: none; }

.guest-landing {
  max-width: 1180px;
  margin: 0 auto;
  padding: 28px 24px 56px;
  animation: reveal-up .45s cubic-bezier(.22,.61,.36,1) both;
}

.guest-header { margin-bottom: 28px; }

.guest-topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  padding-bottom: 16px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
}

.guest-sidebar-brand {
  border-right: 0;
  border-bottom: 0;
  padding: 0;
  margin: 0;
  flex: 1 1 220px;
  min-width: 0;
}

.guest-login-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  flex: 0 1 auto;
  padding: 6px 10px;
  border-radius: var(--rm);
  border: 1px solid #ddd8ec;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: var(--sh-xs);
}

.guest-login-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent-d);
  white-space: nowrap;
}

.guest-login-input {
  width: 108px;
  min-width: 88px;
  padding: 6px 10px;
  border: 1px solid var(--field-bd);
  border-radius: var(--r);
  font-size: 13px;
  background: #fff;
}

.guest-login-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 6px;
  align-items: center;
}

.guest-login-btn {
  padding: 6px 12px !important;
  font-size: 12px !important;
  min-height: 0;
  line-height: 1.2;
}

.guest-intro {
  margin-top: 16px;
  padding-top: 0;
}
.guest-intro > p {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--text-2);
}
.guest-intro > p:last-of-type { margin-bottom: 18px; }

.guest-bilibili {
  margin-top: 4px;
  padding: 18px;
  border-radius: var(--rl);
  border: 1px solid #c7d2fe;
  background: linear-gradient(135deg, #eef2ff 0%, #faf5ff 100%);
  box-shadow: var(--sh-xs);
}
.guest-bilibili-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}
.guest-bilibili-text strong {
  display: block;
  font-size: 14px;
  color: var(--accent-d);
  margin-bottom: 4px;
}
.guest-bilibili-text p {
  margin: 0;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-2);
  max-width: 520px;
}
.guest-bilibili-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border-radius: var(--r);
  background: var(--brand-grad);
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(99,102,241,.28);
  transition: transform var(--t), box-shadow var(--t);
}
.guest-bilibili-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(99,102,241,.34);
}

.guest-bili-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.guest-bili-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px;
  border-radius: var(--rm);
  border: 1px solid rgba(99,102,241,.14);
  background: rgba(255,255,255,.88);
  text-decoration: none;
  color: inherit;
  transition: transform var(--t), box-shadow var(--t), border-color var(--t);
}
.guest-bili-card:hover {
  transform: translateY(-2px);
  border-color: rgba(99,102,241,.32);
  box-shadow: var(--sh-sm);
}
.guest-bili-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: calc(var(--r) + 2px);
  overflow: hidden;
  background: #1e1b2e;
}
.guest-bili-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.guest-bili-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: #fff;
  background: linear-gradient(180deg, rgba(15,12,30,.08), rgba(15,12,30,.42));
  opacity: .92;
  transition: opacity var(--t);
}
.guest-bili-card:hover .guest-bili-play { opacity: 1; }
.guest-bili-meta strong {
  display: block;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text);
  margin-bottom: 2px;
}
.guest-bili-meta span {
  font-size: 11px;
  color: var(--muted);
}

.guest-main {
  margin-bottom: 8px;
}

/* ─── 星系巡览 · 编辑式大卡 ─────────────────────────────────────── */
.guest-atlas {
  position: relative;
  margin-top: 8px;
  padding: 36px 32px 40px;
  border-radius: calc(var(--rl) + 4px);
  background:
    radial-gradient(1200px 420px at 12% -10%, rgba(99, 102, 241, 0.22), transparent 58%),
    radial-gradient(900px 360px at 88% 0%, rgba(168, 85, 247, 0.14), transparent 55%),
    linear-gradient(165deg, #0b1020 0%, #12182b 42%, #0f1424 100%);
  box-shadow: 0 28px 80px rgba(15, 18, 40, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  overflow: hidden;
}

.guest-atlas::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.34) 0.6px, transparent 0.6px);
  background-size: 28px 28px;
  opacity: 0.07;
  pointer-events: none;
}

.guest-atlas-head {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin-bottom: 28px;
}

.guest-eyebrow {
  margin: 0 0 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(199, 210, 254, 0.88);
}

.guest-atlas-head h2 {
  margin: 0 0 10px;
  font-size: clamp(1.65rem, 3vw, 2.15rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #f8fafc;
}

.guest-atlas-sub {
  margin: 0;
  font-size: 14px;
  line-height: 1.75;
  color: rgba(203, 213, 225, 0.82);
}

.guest-atlas-grid {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.guest-world-card {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  gap: 0;
  min-height: 320px;
  border-radius: calc(var(--rl) + 2px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  transition: transform 0.35s cubic-bezier(.22,.61,.36,1), box-shadow 0.35s ease, border-color 0.35s ease;
}

.guest-world-card:hover {
  transform: translateY(-3px);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.34);
}

.guest-world-card--reverse {
  grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
}

.guest-world-card--reverse .guest-world-media { order: 2; }
.guest-world-card--reverse .guest-world-body { order: 1; }

.guest-world-media {
  position: relative;
  margin: 0;
  min-height: 280px;
  overflow: hidden;
  background: #0f172a;
}

.guest-world-media img {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  transform: scale(1.02);
  transition: transform 0.7s cubic-bezier(.22,.61,.36,1);
}

.guest-world-card:hover .guest-world-media img {
  transform: scale(1.06);
}

.guest-world-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(8, 12, 24, 0.08) 0%, rgba(8, 12, 24, 0.42) 100%);
  pointer-events: none;
}

.guest-world-card--reverse .guest-world-media::after {
  background: linear-gradient(270deg, rgba(8, 12, 24, 0.08) 0%, rgba(8, 12, 24, 0.42) 100%);
}

.guest-world-caption {
  position: absolute;
  left: 14px;
  bottom: 12px;
  z-index: 2;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(248, 250, 252, 0.92);
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.guest-world-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px 30px;
  background: linear-gradient(180deg, rgba(255,255,255,0.98) 0%, rgba(248,250,252,0.96) 100%);
}

.guest-world-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin-bottom: 12px;
}

.guest-world-meta time {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.guest-world-tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #312e81;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
}

.guest-world-card--xian .guest-world-tag {
  color: #115e59;
  background: #ecfdf5;
  border-color: #99f6e4;
}

.guest-world-card--pyro .guest-world-tag {
  color: #9a3412;
  background: #fff7ed;
  border-color: #fdba74;
}

.guest-world-card--uee .guest-world-tag {
  color: #1e3a8a;
  background: #eff6ff;
  border-color: #93c5fd;
}

.guest-world-body h3 {
  margin: 0;
  font-size: clamp(1.35rem, 2.4vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text);
}

.guest-world-en {
  margin: 4px 0 14px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.guest-world-lede {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.65;
  font-weight: 600;
  color: var(--text);
}

.guest-world-body p {
  margin: 0 0 12px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-2);
}

.guest-world-body p:last-of-type { margin-bottom: 14px; }

.guest-world-facts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 8px;
}

.guest-world-facts li {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--r);
  font-size: 13px;
  line-height: 1.55;
  color: var(--text-2);
  background: rgba(99, 102, 241, 0.05);
  border: 1px solid rgba(99, 102, 241, 0.1);
}

.guest-world-facts li span {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent-d);
}

.guest-world-card--xian .guest-world-facts li {
  background: rgba(16, 185, 129, 0.06);
  border-color: rgba(16, 185, 129, 0.14);
}
.guest-world-card--xian .guest-world-facts li span { color: #0f766e; }

.guest-world-card--pyro .guest-world-facts li {
  background: rgba(249, 115, 22, 0.07);
  border-color: rgba(249, 115, 22, 0.16);
}
.guest-world-card--pyro .guest-world-facts li span { color: #c2410c; }

.guest-world-card--uee .guest-world-facts li {
  background: rgba(59, 130, 246, 0.06);
  border-color: rgba(59, 130, 246, 0.14);
}
.guest-world-card--uee .guest-world-facts li span { color: #1d4ed8; }

.guest-footer {
  text-align: center;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}
.guest-footer p {
  margin: 0 0 4px;
  font-size: 12px;
  color: var(--muted);
}
.guest-footer-sub { font-size: 11px !important; opacity: .85; }

@media (max-width: 767px) {
  .guest-landing {
    max-width: none;
    width: 100%;
    padding: 10px max(10px, env(safe-area-inset-right)) 32px max(10px, env(safe-area-inset-left));
  }
  .guest-header { margin-bottom: 14px; }
  .guest-topbar {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding-bottom: 10px;
    margin-bottom: 0;
  }
  .guest-sidebar-brand {
    flex: 1 1 140px;
    min-width: 0;
  }
  .guest-sidebar-brand .brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 10px;
  }
  .guest-sidebar-brand .brand-text strong { font-size: 15px; }
  .guest-sidebar-brand .brand-text .brand-en { font-size: 10px; }
  .guest-sidebar-brand .brand-text > span:not(.brand-en) { display: none; }
  .guest-login-bar {
    flex: 1 1 180px;
    min-width: 0;
    justify-content: flex-end;
    padding: 5px 8px;
    gap: 6px;
  }
  .guest-login-label { display: none; }
  .guest-login-input {
    flex: 1 1 72px;
    width: auto;
    min-width: 0;
    max-width: none;
    padding: 7px 10px;
  }
  .guest-login-btn {
    padding: 7px 12px !important;
    flex-shrink: 0;
  }
  .guest-intro {
    margin-top: 8px;
  }
  .guest-intro > p {
    font-size: 14px;
    line-height: 1.62;
    margin-bottom: 8px;
  }
  .guest-intro > p:last-of-type { margin-bottom: 12px; }
  .guest-bilibili {
    margin-top: 0;
    padding: 12px 10px;
    border-radius: var(--rm);
  }
  .guest-bilibili-head {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 8px 10px;
    margin-bottom: 10px;
  }
  .guest-bilibili-text {
    flex: 1 1 180px;
    min-width: 0;
  }
  .guest-bilibili-text strong { font-size: 13px; margin-bottom: 2px; }
  .guest-bilibili-text p {
    max-width: none;
    font-size: 12px;
    line-height: 1.55;
  }
  .guest-bilibili-btn {
    width: auto;
    flex: 0 0 auto;
    padding: 8px 12px;
    font-size: 12px;
  }
  .guest-bili-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .guest-bili-card {
    padding: 6px;
    gap: 5px;
  }
  .guest-bili-meta strong {
    font-size: 12px;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .guest-bili-meta span { font-size: 10px; }
  .guest-main { margin-bottom: 4px; }
  .guest-atlas {
    margin-top: 4px;
    padding: 16px 10px 18px;
    border-radius: var(--rm);
  }
  .guest-atlas-head {
    margin-bottom: 14px;
  }
  .guest-eyebrow {
    font-size: 10px;
    letter-spacing: 0.16em;
    margin-bottom: 6px;
  }
  .guest-atlas-head h2 {
    font-size: 1.45rem;
    margin-bottom: 6px;
  }
  .guest-atlas-sub {
    font-size: 13px;
    line-height: 1.6;
  }
  .guest-atlas-grid { gap: 14px; }
  .guest-world-card,
  .guest-world-card--reverse {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .guest-world-card--reverse .guest-world-media,
  .guest-world-card--reverse .guest-world-body {
    order: unset;
  }
  .guest-world-body {
    padding: 16px 12px 18px;
  }
  .guest-world-media {
    min-height: 180px;
  }
  .guest-world-media img {
    min-height: 180px;
  }
  .guest-world-body h3 { font-size: 1.25rem; }
  .guest-world-lede { font-size: 14px; margin-bottom: 8px; }
  .guest-world-body p {
    font-size: 13px;
    line-height: 1.65;
    margin-bottom: 8px;
  }
  .guest-world-facts { gap: 6px; }
  .guest-world-facts li {
    grid-template-columns: 1fr;
    gap: 3px;
    padding: 8px 10px;
    font-size: 12px;
  }
  .guest-footer { padding-top: 6px; }
}

@media (max-width: 420px) {
  .guest-landing { padding-top: 8px; }
  .guest-topbar {
    flex-direction: column;
    align-items: stretch;
  }
  .guest-login-bar {
    flex: 1 1 auto;
    width: 100%;
    justify-content: stretch;
  }
  .guest-bilibili-head {
    flex-direction: column;
    align-items: stretch;
  }
  .guest-bilibili-btn {
    width: 100%;
    text-align: center;
  }
}

/* ─── 触控目标（#4）：移动端按钮最小 44px，符合 WCAG 2.5.5 ─── */
@media (pointer: coarse) {
  .lst-act,
  .mini-btn,
  .extra-act button,
  .ghost-mini {
    min-height: 44px;
    padding-top: 10px;
    padding-bottom: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  /* 列表操作按钮额外留宽方便点击 */
  .lst-act { min-width: 80px; }
  /* 小型操作按钮统一放大 */
  .mini-btn { padding-left: 12px; padding-right: 12px; font-size: 12px; }
}

/* ───────── 舰队管理 · 战利品结算 ───────── */
.fleet-subtabs {
  display: flex;
  gap: 6px;
  margin: 12px 0 4px;
  border-bottom: 1px solid var(--line);
}
.fleet-subtab {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 14px;
  border-radius: var(--r) var(--r) 0 0;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: var(--t);
}
.fleet-subtab:hover { color: var(--accent-d); }
.fleet-subtab-active {
  color: var(--accent-d);
  border-bottom-color: var(--accent);
  background: var(--inset);
}
.loot-empty {
  margin: 8px 0;
  padding: 14px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  background: var(--inset);
  border: 1px dashed var(--line);
  border-radius: var(--rm);
}
.loot-ev {
  margin: 8px 0;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--rm);
  background: var(--card);
}
.loot-ev-head { font-size: 13px; font-weight: 700; color: var(--text); }
.loot-ev-items { margin: 6px 0 4px; padding-left: 18px; font-size: 12.5px; color: var(--text-2); }
.loot-ev-items li { margin: 2px 0; }
.loot-ev-sub { font-size: 12px; color: var(--accent-d); font-weight: 600; }
.loot-total {
  margin: 10px 0 4px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  background: var(--brand-grad);
  border-radius: var(--rm);
}
.loot-row-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 7px 0;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--rm);
  background: var(--inset);
}
.loot-rc-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.loot-rc-main strong { font-size: 13px; color: var(--text); }
.loot-rc-meta { font-size: 12px; color: var(--text-2); }
.loot-rc-act { display: flex; gap: 6px; flex-wrap: wrap; }
.loot-rc-act button { padding: 6px 13px; font-size: 12px; }
.loot-tag {
  display: inline-block;
  margin-left: 6px;
  font-size: 11px;
  font-weight: 700;
  color: var(--rent);
  background: #fff7ed;
  border-radius: 6px;
  padding: 1px 6px;
}
.loot-sub2 {
  margin: 16px 0 6px;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--text);
}
.loot-bal { display: grid; gap: 4px; margin: 4px 0; }
.loot-bal-row {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  padding: 7px 12px;
  background: var(--inset);
  border-radius: var(--r);
}
.loot-bal-row span:last-child { color: var(--accent-d); font-weight: 700; }
.loot-asset {
  margin: 14px 0 4px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
  color: var(--gold);
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--rm);
}
.loot-hist-row { font-size: 12px; color: var(--text-2); padding: 4px 0; border-bottom: 1px dashed var(--line); }
.loot-history { margin: 12px 0; }
.loot-history summary { cursor: pointer; font-size: 12.5px; font-weight: 700; color: var(--accent-d); padding: 4px 0; }

/* 录入编辑器 / 明细弹窗 */
.loot-dialog .dialog-panel { width: min(640px, 94vw); }
.loot-ed-sub { margin: 14px 0 6px; font-size: 12.5px; font-weight: 800; color: var(--text); }
.loot-roster { display: flex; flex-wrap: wrap; gap: 8px; }
.loot-chk {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-size: 12.5px;
  color: var(--text-2);
  padding: 4px 6px 4px 11px;
  background: var(--inset);
  border: 1px solid var(--line);
  border-radius: 999px;
}
.loot-chk label { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.loot-chk input { accent-color: var(--accent); }
.loot-chk-del {
  appearance: none; border: none; background: transparent;
  color: var(--muted); cursor: pointer; font-size: 11px;
  padding: 0 3px; line-height: 1;
}
.loot-chk-del:hover { color: #dc2626; }
.loot-add-member {
  display: flex; gap: 6px; margin: 8px 0 2px; align-items: center;
}
.loot-add-member input {
  padding: 7px 10px; border: 1.5px solid var(--field-bd); border-radius: var(--r);
  font-size: 12.5px; background: var(--card); min-width: 0; box-sizing: border-box;
}
.loot-add-member input:first-child { width: 108px; flex: none; }
.loot-add-member input:nth-child(2) { flex: 1; }
.loot-add-member button { padding: 7px 12px; font-size: 12.5px; white-space: nowrap; }
.loot-items { display: grid; gap: 8px; }
.loot-item-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px 82px 28px;
  gap: 6px;
  align-items: center;
}
.loot-item-row input {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 8px 11px;
  border: 1.5px solid var(--field-bd);
  border-radius: var(--r);
  font-size: 13px;
  background: var(--card);
}
.loot-item-row input:focus { border-color: var(--accent); outline: none; }
.loot-it-del {
  appearance: none;
  border: 1px solid var(--field-bd);
  background: var(--card);
  color: var(--muted);
  border-radius: var(--r);
  height: 36px;
  cursor: pointer;
  font-size: 13px;
}
.loot-it-del:hover { color: #dc2626; border-color: #fca5a5; }
.loot-add-row { margin-top: 8px; font-size: 12.5px; }
.loot-preview {
  margin-top: 12px;
  padding: 12px 14px;
  background: var(--inset);
  border: 1px solid var(--line);
  border-radius: var(--rm);
  font-size: 12.5px;
}
.loot-pv-head { font-weight: 800; color: var(--text); margin-bottom: 6px; }
.loot-pv-row { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; color: var(--text-2); }
.loot-pv-row span:last-child { color: var(--accent-d); font-weight: 600; white-space: nowrap; }
.loot-pv-total { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); font-weight: 800; color: var(--text); }
.loot-pv-hint { color: var(--muted); }
.loot-warn { color: var(--rent); font-weight: 600; }
.loot-table { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 12.5px; }
.loot-table th { text-align: left; color: var(--muted); font-weight: 700; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.loot-table td { padding: 7px 8px; border-bottom: 1px solid var(--line); color: var(--text-2); }
.loot-table td:first-child { color: var(--text); font-weight: 600; }
.loot-dt-meta { font-size: 12.5px; color: var(--text-2); margin-top: 6px; }
.loot-dt-sum { margin-top: 8px; font-size: 13.5px; font-weight: 800; color: var(--text); }
.loot-dt-part { margin-top: 6px; font-size: 12px; color: var(--muted); }

/* ───────── 成员选择器（搜昵称选人，loot/接龙复用）───────── */
.mp-dialog .dialog-panel { width: min(440px, 94vw); }
.mp-input {
  width: 100%;
  box-sizing: border-box;
  margin: 6px 0 10px;
  padding: 10px 13px;
  border: 1.5px solid var(--field-bd);
  border-radius: var(--r);
  font-size: 14px;
  background: var(--card);
}
.mp-input:focus { border-color: var(--accent); outline: none; }
.mp-results { display: flex; flex-direction: column; gap: 4px; max-height: 52vh; overflow-y: auto; }
.mp-hint { padding: 18px 8px; text-align: center; color: var(--muted); font-size: 12.5px; }
.mp-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  appearance: none;
  border: 1px solid var(--line);
  background: var(--card);
  border-radius: var(--rm);
  padding: 7px 11px;
  cursor: pointer;
  transition: var(--t);
}
.mp-row:hover { border-color: var(--accent); background: var(--inset); }
.mp-av {
  width: 34px; height: 34px;
  border-radius: 9px;
  object-fit: cover;
  flex-shrink: 0;
  background: var(--inset);
  border: 1px solid var(--line);
}
.mp-name {
  flex: 1; min-width: 0;
  font-size: 13.5px; font-weight: 600; color: var(--text);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mp-qq { font-size: 11px; color: var(--muted); flex-shrink: 0; }
.mp-manual { color: var(--accent-d); justify-content: center; }
.mp-manual .mp-name { flex: none; color: var(--accent-d); font-weight: 700; }

/* 委员会手动发起结算 + 删除 */
.loot-manual-bar {
  display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  margin: 6px 0 12px;
}
.loot-manual-hint { font-size: 11.5px; color: var(--muted); }
.loot-del-btn { color: #b91c1c; }
.loot-del-btn:hover { border-color: #fca5a5; background: #fef2f2; }

/* 编辑器·活动名称（修改已有结算）*/
.loot-ed-topic {
  display: block;
  margin: 10px 0 2px;
  font-size: 12.5px;
  font-weight: 800;
  color: var(--text);
}
.loot-ed-topic input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin-top: 5px;
  padding: 9px 12px;
  border: 1.5px solid var(--field-bd);
  border-radius: var(--r);
  font-size: 13.5px;
  font-weight: 400;
  background: var(--card);
}
.loot-ed-topic input:focus { border-color: var(--accent); outline: none; }
