/* 闲鱼监控面板 — Apple.com 设计语言
   单一来源：本文件定义全部设计令牌与组件。浅色为默认，深色为设计过的变体。 */

:root {
  color-scheme: light;
  --bg: #ffffff;
  --band: #f5f5f7;
  --tile: #ffffff;
  --ink: #1d1d1f;
  --ink2: #6e6e73;
  --ink3: #86868b;
  --line: #d2d2d7;
  --fill: #f5f5f7;
  --fill2: #e8e8ed;
  --blue: #0071e3;
  --blue-press: #0060c9;
  --link: #0066cc;
  --good: #248a3d;
  --good-dot: #34c759;
  --warn: #c93400;
  --warn-dot: #ff9f0a;
  --bad: #d70015;
  --bad-dot: #ff3b30;
  --nav-bg: rgba(251, 251, 253, 0.82);
  --sheet-scrim: rgba(0, 0, 0, 0.36);
  --shadow-tile: 0 2px 12px rgba(0, 0, 0, 0.06);
  --shadow-sheet: 0 18px 60px rgba(0, 0, 0, 0.24);
  --radius-tile: 18px;
  --radius-chip: 980px;
  --gutter: 22px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro SC", "SF Pro Text", "PingFang SC",
          "HarmonyOS Sans SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #000000;
  --band: #161617;
  --tile: #1d1d1f;
  --ink: #f5f5f7;
  --ink2: #a1a1a6;
  --ink3: #86868b;
  --line: #424245;
  --fill: #1d1d1f;
  --fill2: #2d2d2f;
  --blue: #2997ff;
  --blue-press: #147ce5;
  --link: #2997ff;
  --good: #30d158;
  --good-dot: #30d158;
  --warn: #ff9f0a;
  --warn-dot: #ff9f0a;
  --bad: #ff453a;
  --bad-dot: #ff453a;
  --nav-bg: rgba(22, 22, 23, 0.82);
  --sheet-scrim: rgba(0, 0, 0, 0.6);
  --shadow-tile: 0 2px 12px rgba(0, 0, 0, 0.4);
  --shadow-sheet: 0 18px 60px rgba(0, 0, 0, 0.6);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #000000; --band: #161617; --tile: #1d1d1f;
    --ink: #f5f5f7; --ink2: #a1a1a6; --ink3: #86868b;
    --line: #424245; --fill: #1d1d1f; --fill2: #2d2d2f;
    --blue: #2997ff; --blue-press: #147ce5; --link: #2997ff;
    --good: #30d158; --good-dot: #30d158;
    --warn: #ff9f0a; --warn-dot: #ff9f0a;
    --bad: #ff453a; --bad-dot: #ff453a;
    --nav-bg: rgba(22, 22, 23, 0.82);
    --sheet-scrim: rgba(0, 0, 0, 0.6);
    --shadow-tile: 0 2px 12px rgba(0, 0, 0, 0.4);
    --shadow-sheet: 0 18px 60px rgba(0, 0, 0, 0.6);
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body.sheet-open { overflow: hidden; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; left: 12px; top: -60px; z-index: 400; background: var(--bg); padding: 10px 16px; border: 2px solid var(--blue); border-radius: 10px; }
.skip-link:focus { top: 8px; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.47;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; max-width: 100%; }
::selection { background: rgba(0, 113, 227, 0.18); }

:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 6px; }

.num, .tnum { font-variant-numeric: tabular-nums; }

/* ============================ 全局导航 ============================ */
.globalnav {
  position: sticky; top: 0; z-index: 60;
  height: 48px;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.globalnav-inner {
  max-width: 1024px; margin: 0 auto; height: 100%;
  padding: 0 var(--gutter);
  display: flex; align-items: center; gap: 28px;
}
.brand {
  font-size: 17px; font-weight: 600; letter-spacing: 0.01em;
  display: flex; align-items: center; gap: 8px; color: var(--ink);
}
.brand:hover { text-decoration: none; }
.brand svg { width: 20px; height: 20px; }
.globalnav-links { display: flex; gap: 4px; margin-left: auto; }
.globalnav-links a {
  font-size: 12px; color: var(--ink); opacity: 0.88;
  padding: 6px 10px; border-radius: 8px;
}
.globalnav-links a:hover { opacity: 1; text-decoration: none; background: var(--fill2); }
.globalnav-links a.active { font-weight: 600; opacity: 1; }

/* ============================ 局部导航 ============================ */
.localnav {
  position: sticky; top: 48px; z-index: 55;
  background: var(--nav-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.localnav-inner {
  max-width: 1024px; margin: 0 auto; min-height: 56px;
  padding: 8px var(--gutter);
  display: flex; align-items: center; gap: 16px;
}
.localnav-title { font-size: 21px; font-weight: 600; letter-spacing: 0.01em; }
.localnav-actions { margin-left: auto; display: flex; gap: 10px; align-items: center; }

/* ============================ 页面骨架 ============================ */
.main { max-width: 1024px; margin: 0 auto; padding: 0 var(--gutter) calc(48px + env(safe-area-inset-bottom)); }
.band { padding: 34px 0; }
.band + .band { border-top: 1px solid var(--line); }
.band-shaded { background: var(--band); margin: 0 calc(var(--gutter) * -1); padding-left: var(--gutter); padding-right: var(--gutter); }
.section-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 18px; }
.section-title { font-size: 28px; font-weight: 600; letter-spacing: 0.01em; }
.section-sub { font-size: 14px; color: var(--ink2); }
.section-link { margin-left: auto; font-size: 14px; white-space: nowrap; }

/* ============================ 按钮 ============================ */
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  background: var(--blue); color: #fff;
  border-radius: var(--radius-chip);
  font-size: 15px; font-weight: 500; line-height: 1;
  padding: 11px 20px; min-height: 40px;
  transition: background 0.18s ease, transform 0.1s ease;
  white-space: nowrap;
}
.pill:hover { background: var(--blue-press); }
.pill:active { transform: scale(0.97); }
.pill:disabled { opacity: 0.45; cursor: default; transform: none; }
.pill-secondary { background: var(--fill2); color: var(--ink); }
.pill-secondary:hover { background: var(--line); }
.pill-danger { background: transparent; color: var(--bad); }
.pill-danger:hover { background: rgba(255, 59, 48, 0.1); }
.pill-small { font-size: 13px; padding: 8px 14px; min-height: 32px; }
.textlink {
  color: var(--link); font-size: 15px; display: inline-flex; align-items: center; gap: 3px;
  padding: 6px 2px; border-radius: 6px;
}
.textlink:hover { text-decoration: underline; }

/* ============================ 英雄区（概览） ============================ */
.hero { display: grid; grid-template-columns: 1fr auto; gap: 36px; align-items: center; padding: 44px 0 40px; }
.hero-kicker { font-size: 14px; font-weight: 600; color: var(--ink2); letter-spacing: 0.06em; margin-bottom: 10px; text-transform: uppercase; }
.hero-title { font-size: 48px; line-height: 1.1; font-weight: 600; letter-spacing: 0.005em; }
.hero-title .accent-good { color: var(--good); }
.hero-title .accent-warn { color: var(--warn); }
.hero-title .accent-bad { color: var(--bad); }
.hero-sub { margin-top: 14px; font-size: 19px; color: var(--ink2); max-width: 30em; }
.hero-actions { margin-top: 26px; display: flex; gap: 12px; flex-wrap: wrap; }
.hero-state-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; vertical-align: 1px; }

/* ============================ 轮换圆盘 ============================ */
.dial-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.dial { width: 208px; height: 208px; }
.dial-arc { fill: none; stroke-linecap: round; transition: stroke 0.4s ease; }
.dial-ring { fill: none; transition: stroke-dashoffset 0.9s linear, stroke 0.4s ease; }
.dial-spin { transform-origin: 104px 104px; animation: dial-rotate 1.6s linear infinite; }
@keyframes dial-rotate { to { transform: rotate(360deg); } }
.dial-center-big { font-size: 30px; font-weight: 600; fill: var(--ink); text-anchor: middle; font-variant-numeric: tabular-nums; }
.dial-center-small { font-size: 12.5px; fill: var(--ink2); text-anchor: middle; letter-spacing: 0.04em; }
.dial-caption { font-size: 13px; color: var(--ink2); text-align: center; max-width: 300px; line-height: 1.5; }
.dial-caption b { color: var(--ink); font-weight: 600; }

/* ============================ 瓦片与网格 ============================ */
.tile-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.tile {
  background: var(--tile); border-radius: var(--radius-tile);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-tile);
  padding: 20px;
}
.stat-value { font-size: 34px; font-weight: 600; letter-spacing: 0.01em; }
.stat-value .unit { font-size: 15px; font-weight: 500; color: var(--ink2); margin-left: 3px; }
.stat-label { margin-top: 4px; font-size: 13px; color: var(--ink2); }
.stat-note { font-size: 12px; color: var(--ink3); margin-top: 2px; }

/* ============================ 徽标与状态点 ============================ */
.chip {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; font-weight: 500; line-height: 1;
  padding: 5px 10px; border-radius: var(--radius-chip);
  background: var(--fill2); color: var(--ink2);
  white-space: nowrap;
}
.chip-blue { background: rgba(0, 113, 227, 0.12); color: var(--link); }
.chip-good { background: rgba(52, 199, 89, 0.14); color: var(--good); }
.chip-warn { background: rgba(255, 159, 10, 0.16); color: var(--warn); }
.chip-bad  { background: rgba(255, 59, 48, 0.12); color: var(--bad); }
.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }
.dot-good { background: var(--good-dot); }
.dot-warn { background: var(--warn-dot); }
.dot-bad  { background: var(--bad-dot); }
.dot-gray { background: var(--ink3); }

/* ============================ 规则瓦片 ============================ */
.rule-list { display: grid; gap: 14px; }
.rule-tile { display: grid; gap: 12px; }
.rule-top { display: flex; align-items: center; gap: 12px; }
.rule-name { font-size: 19px; font-weight: 600; }
.rule-idtag { font-size: 12px; color: var(--ink3); font-variant-numeric: tabular-nums; }
.rule-summary { font-size: 14px; color: var(--ink2); }
.rule-meta { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; color: var(--ink2); }
.rule-meta b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }
.rule-actions { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.rule-disabled { opacity: 0.55; }

/* ============================ 价格胶囊 / 分布图 ============================ */
.capsule { padding: 4px 0 2px; }
.capsule-track-zone { position: relative; height: 34px; }
.capsule svg { display: block; width: 100%; height: 34px; overflow: visible; }
.capsule-caption { margin-top: 8px; font-size: 12.5px; color: var(--ink2); display: flex; gap: 6px 16px; flex-wrap: wrap; }
.capsule-caption b { color: var(--ink); font-variant-numeric: tabular-nums; }
.chart-tip {
  position: fixed; z-index: 200; pointer-events: none;
  background: var(--ink); color: var(--bg);
  font-size: 12px; padding: 5px 9px; border-radius: 8px;
  transform: translate(-50%, -130%);
  white-space: nowrap; opacity: 0; transition: opacity 0.12s ease;
  font-variant-numeric: tabular-nums;
}
.chart-tip.on { opacity: 1; }

/* ============================ 开关（iOS） ============================ */
.switch { position: relative; width: 50px; height: 30px; flex: none; display: inline-block; }
.switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.switch .track {
  position: absolute; inset: 0; border-radius: 980px;
  background: var(--fill2); border: 1px solid var(--line);
  transition: background 0.22s ease, border-color 0.22s ease;
}
.switch .thumb {
  position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%;
  background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,0.25);
  transition: transform 0.22s cubic-bezier(0.34, 1.3, 0.64, 1);
}
.switch input:checked + .track { background: var(--good-dot); border-color: transparent; }
.switch input:checked + .track + .thumb { transform: translateX(20px); }
.switch input:focus-visible + .track { outline: 2px solid var(--blue); outline-offset: 2px; }

/* ============================ 分段选择器 ============================ */
.segmented {
  display: inline-flex; padding: 2px; gap: 1px;
  background: var(--fill2); border-radius: 10px;
}
.segmented button {
  font-size: 13px; font-weight: 500; color: var(--ink);
  padding: 6px 14px; border-radius: 8px; min-height: 30px;
  transition: background 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}
.segmented button.on { background: var(--tile); box-shadow: 0 1px 4px rgba(0,0,0,0.14); font-weight: 600; }
.segmented-wrap { overflow-x: auto; scrollbar-width: none; }
.segmented-wrap::-webkit-scrollbar { display: none; }

/* ============================ 表单 ============================ */
.field { display: grid; gap: 7px; margin-bottom: 18px; }
.field-label { font-size: 13px; font-weight: 600; color: var(--ink2); letter-spacing: 0.02em; }
.field-hint { font-size: 12px; color: var(--ink3); }
.field-error { font-size: 13px; color: var(--bad); }
.input, .textarea, .select {
  width: 100%; background: var(--fill);
  border: 1px solid var(--line); border-radius: 12px;
  font-size: 15px; padding: 11px 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.input:focus, .textarea:focus, .select:focus {
  outline: none; border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0, 113, 227, 0.18);
}
.input::placeholder, .textarea::placeholder { color: var(--ink3); }
.textarea { min-height: 74px; resize: vertical; line-height: 1.5; }
.input[type="time"] { padding: 8px 12px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

/* 步进器 */
.stepper { display: inline-flex; align-items: center; gap: 2px; background: var(--fill2); border-radius: 10px; padding: 2px; }
.stepper-btn {
  width: 32px; height: 32px; border-radius: 8px;
  font-size: 17px; font-weight: 500; color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
}
.stepper-btn:hover { background: var(--tile); }
.stepper-val { min-width: 66px; text-align: center; font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.stepper-val small { font-weight: 400; color: var(--ink2); font-size: 12px; margin-left: 2px; }

/* 品牌芯片组 */
.chip-set { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-toggle {
  font-size: 14px; padding: 8px 15px; border-radius: var(--radius-chip);
  background: var(--fill); border: 1px solid var(--line); color: var(--ink);
  transition: all 0.15s ease;
}
.chip-toggle.on { background: var(--blue); border-color: var(--blue); color: #fff; }

/* 类型卡片 */
.type-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.type-card {
  border: 1.5px solid var(--line); border-radius: 14px; background: var(--fill);
  padding: 14px 12px; text-align: left; display: grid; gap: 4px;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.type-card b { font-size: 14px; font-weight: 600; }
.type-card span { font-size: 12px; color: var(--ink2); line-height: 1.4; }
.type-card.on { border-color: var(--blue); background: rgba(0, 113, 227, 0.07); }

/* 设置分组列表（iOS inset-grouped） */
.group { margin-bottom: 30px; }
.group-title { font-size: 13px; font-weight: 600; color: var(--ink2); letter-spacing: 0.04em; margin: 0 0 8px 16px; }
.group-foot { font-size: 12.5px; color: var(--ink3); margin: 8px 16px 0; line-height: 1.5; }
.group-card { background: var(--tile); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.row {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 16px; min-height: 48px;
  border-bottom: 1px solid var(--line);
}
.row:last-child { border-bottom: 0; }
.row-label { font-size: 15px; }
.row-sub { font-size: 12.5px; color: var(--ink3); margin-top: 1px; }
.row-body { flex: 1; min-width: 0; }
.row-tail { margin-left: auto; display: flex; align-items: center; gap: 10px; flex: none; }
.row button.row-link { color: var(--link); font-size: 15px; }

/* ============================ 挂单列表 ============================ */
.filter-bar { display: flex; gap: 10px; margin: 16px 0 18px; flex-wrap: wrap; align-items: center; }
.filter-bar .select { width: auto; min-width: 150px; }
.filter-bar .input { flex: 1; min-width: 160px; }
.listing-list { display: grid; gap: 10px; }
.listing-row {
  display: flex; gap: 14px; align-items: center;
  background: var(--tile); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 14px; cursor: pointer; text-align: left; width: 100%;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.listing-row:hover { border-color: var(--ink3); box-shadow: var(--shadow-tile); }
.listing-thumb { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; background: var(--fill2); flex: none; }
.listing-thumb-ph { display: flex; align-items: center; justify-content: center; color: var(--ink3); }
.listing-main { flex: 1; min-width: 0; display: grid; gap: 4px; }
.listing-title {
  font-size: 15px; font-weight: 500; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.listing-sub { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--ink3); }
.listing-price { font-size: 19px; font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.listing-price small { font-size: 12px; font-weight: 400; color: var(--ink3); }
.price-cut { color: var(--bad); font-size: 12px; font-weight: 500; }

/* 横滑卡片架（最近命中） */
.shelf { display: flex; gap: 12px; overflow-x: auto; padding: 2px 2px 14px; scroll-snap-type: x proximity; scrollbar-width: none; }
.shelf::-webkit-scrollbar { display: none; }
.shelf-card {
  scroll-snap-align: start; flex: 0 0 200px;
  background: var(--tile); border: 1px solid var(--line); border-radius: 16px;
  overflow: hidden; cursor: pointer; text-align: left; padding: 0;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.shelf-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-tile); }
.shelf-img { width: 100%; height: 132px; object-fit: cover; background: var(--fill2); }
.shelf-body { padding: 12px 14px 14px; display: grid; gap: 5px; }
.shelf-title { font-size: 13px; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 35px; }
.shelf-price { font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ============================ 动态 ============================ */
.event-list { display: grid; }
.event-row { display: flex; gap: 12px; padding: 11px 2px; border-bottom: 1px solid var(--line); align-items: baseline; }
.event-row:last-child { border-bottom: 0; }
.event-dot { margin-top: 7px; }
.event-msg { flex: 1; font-size: 14.5px; line-height: 1.45; min-width: 0; }
.event-kind { font-size: 11.5px; color: var(--ink3); }
.event-time { font-size: 12.5px; color: var(--ink3); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ============================ 底部弹层（Sheet） ============================ */
.sheet-scrim {
  position: fixed; inset: 0; z-index: 100;
  background: var(--sheet-scrim);
  display: flex; align-items: flex-end; justify-content: center;
  opacity: 0; transition: opacity 0.24s ease;
}
.sheet-scrim.on { opacity: 1; }
.sheet {
  background: var(--bg); border-radius: 20px 20px 0 0;
  width: 100%; max-width: 720px; max-height: 92dvh;
  display: flex; flex-direction: column;
  transform: translateY(40px); transition: transform 0.28s cubic-bezier(0.32, 0.72, 0, 1);
  box-shadow: var(--shadow-sheet);
}
.sheet-scrim.on .sheet { transform: translateY(0); }
.sheet-grabber { width: 38px; height: 5px; border-radius: 3px; background: var(--line); margin: 9px auto 2px; flex: none; }
.sheet-head { display: flex; align-items: center; gap: 12px; padding: 12px 20px 12px; border-bottom: 1px solid var(--line); flex: none; }
.sheet-title { font-size: 17px; font-weight: 600; }
.sheet-close { margin-left: auto; width: 32px; height: 32px; border-radius: 50%; background: var(--fill2); color: var(--ink2); font-size: 15px; display: inline-flex; align-items: center; justify-content: center; }
.sheet-body { overflow-y: auto; padding: 20px; -webkit-overflow-scrolling: touch; }
.sheet-foot { flex: none; display: flex; gap: 10px; padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); align-items: center; }
.sheet-foot .spacer { flex: 1; }
@media (min-width: 700px) {
  .sheet-scrim { align-items: center; padding: 40px 20px; }
  .sheet { border-radius: 20px; max-height: min(86dvh, 900px); }
  .sheet-grabber { display: none; }
}

/* 登录弹层画面 */
.screen-frame {
  background: #0a0a0c; border-radius: 14px; overflow: hidden;
  aspect-ratio: 1280 / 900; display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line);
}
.screen-frame img { width: 100%; height: 100%; object-fit: contain; }
.screen-waiting { color: #8e8e93; font-size: 14px; display: grid; gap: 12px; justify-items: center; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid var(--line); border-top-color: var(--blue); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================ Toast ============================ */
.toast-root { position: fixed; left: 0; right: 0; bottom: calc(24px + env(safe-area-inset-bottom)); z-index: 300; display: grid; justify-items: center; gap: 8px; pointer-events: none; }
.toast {
  background: rgba(28, 28, 30, 0.94); color: #f5f5f7;
  font-size: 14px; font-weight: 500;
  padding: 12px 20px; border-radius: var(--radius-chip);
  box-shadow: 0 8px 28px rgba(0,0,0,0.28);
  animation: toast-in 0.26s cubic-bezier(0.32, 0.72, 0, 1);
  max-width: min(90vw, 480px); text-align: center;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
:root[data-theme="dark"] .toast { background: rgba(235, 235, 240, 0.94); color: #1c1c1e; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .toast { background: rgba(235, 235, 240, 0.94); color: #1c1c1e; }
}
.toast.out { opacity: 0; transform: translateY(8px); transition: all 0.25s ease; }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px) scale(0.96); } }

/* ============================ 登录页 ============================ */
.signin-wrap { min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px; background: var(--band); }
.signin-card { width: 100%; max-width: 380px; background: var(--tile); border: 1px solid var(--line); border-radius: 24px; padding: 40px 32px; box-shadow: var(--shadow-tile); text-align: center; }
.signin-card h1 { font-size: 28px; font-weight: 600; margin: 14px 0 8px; }
.signin-card p { font-size: 14px; color: var(--ink2); margin-bottom: 26px; }
.signin-card .input { text-align: center; font-size: 17px; padding: 13px 14px; }
.signin-card .pill { width: 100%; margin-top: 14px; }
.signin-logo { width: 52px; height: 52px; margin: 0 auto; border-radius: 14px; background: var(--blue); display: flex; align-items: center; justify-content: center; }
.signin-logo svg { width: 28px; height: 28px; }
.shake { animation: shake 0.4s ease; }
@keyframes shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-7px)} 75%{transform:translateX(7px)} }

/* ============================ 空态 ============================ */
.empty { padding: 56px 20px; text-align: center; color: var(--ink3); font-size: 15px; display: grid; gap: 8px; justify-items: center; }
.empty b { color: var(--ink2); font-size: 17px; font-weight: 600; }

/* ============================ 加载骨架 ============================ */
.skel { border-radius: 8px; background: linear-gradient(100deg, var(--fill2) 40%, var(--fill) 50%, var(--fill2) 60%); background-size: 200% 100%; animation: skel 1.4s ease infinite; }
@keyframes skel { to { background-position: -200% 0; } }

/* ============================ 底部标签栏（手机） ============================ */
.tabbar { display: none; }
@media (max-width: 720px) {
  :root { --gutter: 16px; }
  .globalnav-links { display: none; }
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: var(--nav-bg);
    -webkit-backdrop-filter: saturate(180%) blur(20px); backdrop-filter: saturate(180%) blur(20px);
    border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .tabbar a {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 7px 0 5px; color: var(--ink3); font-size: 10px;
  }
  .tabbar a:hover { text-decoration: none; }
  .tabbar a.active { color: var(--blue); }
  .tabbar svg { width: 24px; height: 24px; }
  .main { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }
  .hero { grid-template-columns: 1fr; gap: 26px; padding: 30px 0; }
  .hero-title { font-size: 34px; }
  .tile-grid { grid-template-columns: repeat(2, 1fr); }
  .section-title { font-size: 24px; }
  .field-row { grid-template-columns: 1fr; }
  .globalnav-inner, .localnav-inner, .main { padding-left: var(--gutter); padding-right: var(--gutter); }
  .hero { grid-template-columns: 1fr; gap: 24px; }
  .hero-sub { font-size: 17px; }
  .dial { width: min(208px, 64vw); height: auto; }
  .filter-bar { align-items: stretch; }
  .filter-bar .select, .filter-bar .input { min-width: 0; flex: 1 1 42%; }
  .filter-bar .pill { flex: 1 1 auto; }
  .listing-row { gap: 9px; padding: 10px; }
  .listing-thumb { width: 52px; height: 52px; }
  .listing-price { font-size: 16px; }
  .row { gap: 9px; padding-left: 12px; padding-right: 12px; }
  .row-tail { max-width: 65%; }
}

/* ============================ 减少动态 ============================ */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* 工具 */
.muted { color: var(--ink2); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
