/* 邦尼定位 · App 化设计系统
 *
 * 这份样式表是为「手机 App」而不是「网页」写的：所有屏幕都被放进一个固定尺寸的
 * .app 容器里，页面本身永不滚动，滚动只发生在 .view__body 这类容器内部。桌面上
 * 容器会收窄成手机比例，保证从任何入口打开都是同一套 App 观感。
 */

:root {
  color-scheme: light;

  /* 品牌 · 蓝色 */
  --brand: #2f6bff;
  --brand-strong: #1f57e8;
  --brand-deep: #163fbf;
  --brand-soft: #eef3ff;
  --brand-line: #c9d8ff;
  --brand-grad: linear-gradient(135deg, #4d84ff 0%, #2a5fff 100%);

  /* 中性色 */
  --ink: #14181f;
  --ink-2: #333c49;
  --ink-3: #5b6675;
  --muted: #7a8798;
  --line: #e7eaef;
  --line-soft: #f0f2f6;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --app-bg: #f4f6f9;

  /* 语义色 */
  --ok: #0f9d63;
  --ok-soft: #e8f8f0;
  --ok-line: #b8e6cf;
  --warn: #c77700;
  --warn-soft: #fff6e6;
  --warn-line: #f6ddad;
  --danger: #dc3c3c;
  --danger-soft: #fdeded;
  --danger-line: #f6c3c3;
  --info: #2a6ae0;
  --info-soft: #edf3ff;
  --info-line: #c3d8fb;

  /* 圆角与阴影 */
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 20px;
  --r-xl: 26px;
  --r-pill: 999px;
  --sh-1: 0 1px 2px rgba(20, 24, 31, .06), 0 2px 8px rgba(20, 24, 31, .04);
  --sh-2: 0 4px 14px rgba(20, 24, 31, .08), 0 1px 3px rgba(20, 24, 31, .06);
  --sh-3: 0 12px 32px rgba(20, 24, 31, .14);
  --sh-brand: 0 8px 20px rgba(47, 107, 255, .26);

  /* 安全区 */
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);

  /* 图标（统一 24 线性风格，通过 mask 继承 currentColor） */
  --i-search: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='10.8' cy='10.8' r='6.3'/%3E%3Cpath d='M15.4 15.4 20 20'/%3E%3C/svg%3E");
  --i-arrow-right: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 12h14'/%3E%3Cpath d='M13 6.5 18.5 12 13 17.5'/%3E%3C/svg%3E");
  --i-chevron-right: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9.5 5.5 16 12l-6.5 6.5'/%3E%3C/svg%3E");
  --i-close: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6.5 6.5l11 11M17.5 6.5l-11 11'/%3E%3C/svg%3E");
  --i-plus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M12 5.5v13M5.5 12h13'/%3E%3C/svg%3E");
  --i-minus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M5.5 12h13'/%3E%3C/svg%3E");
  --i-alert: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.2'/%3E%3Cpath d='M12 7.6v5.2'/%3E%3Ccircle cx='12' cy='16.3' r='.95' fill='%23000' stroke='none'/%3E%3C/svg%3E");
  --i-bookmark: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6.5 4.8h11a1 1 0 0 1 1 1V19.6l-6.5-3.9-6.5 3.9V5.8a1 1 0 0 1 1-1Z'/%3E%3C/svg%3E");
  --i-bookmark-plus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6.5 4.8h11a1 1 0 0 1 1 1V19.6l-6.5-3.9-6.5 3.9V5.8a1 1 0 0 1 1-1Z'/%3E%3Cpath d='M12 8.4v3.8M10.1 10.3h3.8'/%3E%3C/svg%3E");
  --i-locate: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='6.4'/%3E%3Ccircle cx='12' cy='12' r='2.2' fill='%23000' stroke='none'/%3E%3Cpath d='M12 2.6v2.6M12 18.8v2.6M2.6 12h2.6M18.8 12h2.6'/%3E%3C/svg%3E");
  --i-pin: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21c4-4.4 6-7.7 6-10.2A6 6 0 0 0 6 10.8C6 13.3 8 16.6 12 21Z'/%3E%3Ccircle cx='12' cy='10.6' r='2.3'/%3E%3C/svg%3E");
  --i-trash: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.8 7.3h14.4M9.4 7.3V5.6a1 1 0 0 1 1-1h3.2a1 1 0 0 1 1 1v1.7'/%3E%3Cpath d='M6.6 7.3l.8 11a1 1 0 0 0 1 .95h7.2a1 1 0 0 0 1-.95l.8-11'/%3E%3Cpath d='M10.4 10.8v5M13.6 10.8v5'/%3E%3C/svg%3E");
  --i-bell: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3.6a5.2 5.2 0 0 1 5.2 5.2v3.3l1.5 2.7a.7.7 0 0 1-.6 1.05H5.9a.7.7 0 0 1-.6-1.05l1.5-2.7V8.8A5.2 5.2 0 0 1 12 3.6Z'/%3E%3Cpath d='M9.7 18.6a2.4 2.4 0 0 0 4.6 0'/%3E%3C/svg%3E");
  --i-book: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.6 5.4A1.8 1.8 0 0 1 6.4 3.6H12v16H6.4a1.8 1.8 0 0 1-1.8-1.8Z'/%3E%3Cpath d='M19.4 5.4a1.8 1.8 0 0 0-1.8-1.8H12v16h5.6a1.8 1.8 0 0 0 1.8-1.8Z'/%3E%3C/svg%3E");
  --i-shield: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3.4l6.6 2.5v5.4c0 3.9-2.6 7.3-6.6 8.9-4-1.6-6.6-5-6.6-8.9V5.9Z'/%3E%3Cpath d='M9.2 11.9l2.1 2.1 3.6-4'/%3E%3C/svg%3E");
  --i-vpn: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.3'/%3E%3Cpath d='M3.8 12h16.4M12 3.7c2.1 2.3 3.2 5 3.2 8.3s-1.1 6-3.2 8.3c-2.1-2.3-3.2-5-3.2-8.3S9.9 6 12 3.7Z'/%3E%3C/svg%3E");
  --i-download: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4.2v10.2'/%3E%3Cpath d='M8 10.8 12 14.8l4-4'/%3E%3Cpath d='M4.8 17.4v1.4a1 1 0 0 0 1 1h12.4a1 1 0 0 0 1-1v-1.4'/%3E%3C/svg%3E");
  --i-user: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8.6' r='3.6'/%3E%3Cpath d='M5.4 19.6c.6-3.3 3.3-5.3 6.6-5.3s6 2 6.6 5.3'/%3E%3C/svg%3E");
  --i-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.4 12.6l4.3 4.3 9-9.5'/%3E%3C/svg%3E");
  --i-refresh: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M19 12a7 7 0 1 1-2.6-5.4'/%3E%3Cpath d='M19.2 4.6v3.9h-3.9'/%3E%3C/svg%3E");
  --i-restore: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12a7 7 0 1 0 2.6-5.4'/%3E%3Cpath d='M4.8 4.6v3.9h3.9'/%3E%3C/svg%3E");
  --i-tune: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 8.2h9M17.4 8.2h1.6M5 15.8h1.6M10 15.8h9'/%3E%3Ccircle cx='15.7' cy='8.2' r='1.9'/%3E%3Ccircle cx='8.3' cy='15.8' r='1.9'/%3E%3C/svg%3E");
  --i-copy: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='9' y='9' width='10.4' height='10.4' rx='2.2'/%3E%3Cpath d='M15 6.6V5.8a1.2 1.2 0 0 0-1.2-1.2H5.8a1.2 1.2 0 0 0-1.2 1.2v8a1.2 1.2 0 0 0 1.2 1.2h.8'/%3E%3C/svg%3E");
  --i-logout: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M14.2 6.6V5.4a1.2 1.2 0 0 0-1.2-1.2H6.2A1.2 1.2 0 0 0 5 5.4v13.2a1.2 1.2 0 0 0 1.2 1.2H13a1.2 1.2 0 0 0 1.2-1.2v-1.2'/%3E%3Cpath d='M10.6 12h8.6M16.2 8.8 19.4 12l-3.2 3.2'/%3E%3C/svg%3E");
  --i-key: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8.4' cy='8.4' r='3.8'/%3E%3Cpath d='M11.1 11.1 19 19M16.2 16.2l-1.7 1.7M18.4 14l-1.7 1.7'/%3E%3C/svg%3E");
  --i-share: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3.8v10.4'/%3E%3Cpath d='M8.4 7.4 12 3.8l3.6 3.6'/%3E%3Cpath d='M6.4 11.6H5.6a1 1 0 0 0-1 1v6.6a1 1 0 0 0 1 1h12.8a1 1 0 0 0 1-1v-6.6a1 1 0 0 0-1-1h-.8'/%3E%3C/svg%3E");
  --i-sparkle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4.2l1.7 4.3 4.3 1.7-4.3 1.7L12 16.2l-1.7-4.3L6 10.2l4.3-1.7Z'/%3E%3Cpath d='M17.8 16.2l.7 1.8 1.8.7-1.8.7-.7 1.8-.7-1.8-1.8-.7 1.8-.7Z'/%3E%3C/svg%3E");
  --i-phone: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='6.4' y='2.8' width='11.2' height='18.4' rx='2.6'/%3E%3Cpath d='M10.4 5.6h3.2'/%3E%3Cpath d='M10.6 18.2h2.8'/%3E%3C/svg%3E");
  --i-settings: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.6 7.4h14.8M4.6 12h14.8M4.6 16.6h14.8'/%3E%3C/svg%3E");
  --i-warning: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4.4 21 19.6H3Z'/%3E%3Cpath d='M12 9.8v4.2'/%3E%3Ccircle cx='12' cy='16.9' r='.95' fill='%23000' stroke='none'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  overflow: hidden;
  overscroll-behavior: none;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  touch-action: manipulation;
  background: var(--app-bg);
}

body {
  display: grid;
  place-items: center;
  -webkit-user-select: none;
  user-select: none;
}

button, input, textarea, select { font: inherit; color: inherit; }

button {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
input, textarea { -webkit-user-select: text; user-select: text; }

/* ── App 外壳 ──────────────────────────────────────────────────────────── */

.app {
  position: relative;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  background: var(--app-bg);
  isolation: isolate;
}

/* 桌面/平板上把整个应用收成手机比例，保持同一套 App 观感。 */
@media (min-width: 900px) and (min-height: 720px) {
  body {
    background:
      radial-gradient(1200px 600px at 50% -10%, #d9e6ff 0%, transparent 60%),
      linear-gradient(180deg, #eef1f6 0%, #e6eaf1 100%);
  }

  .app {
    width: 430px;
    height: min(920px, 94dvh);
    border-radius: 40px;
    box-shadow: 0 40px 80px rgba(16, 24, 40, .28), 0 0 0 10px #1b1f27, 0 0 0 11px #2c313b;
  }
}

.hidden { display: none !important; }

/* ── 屏幕 ─────────────────────────────────────────────────────────────── */

.view {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: var(--app-bg);
}

.view--map { z-index: 0; display: block; }

.appbar {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 44px;
  gap: 8px;
  align-items: center;
  padding: calc(var(--safe-t) + 10px) 14px 10px;
  background: var(--surface);
  border-bottom: 1px solid var(--line-soft);
}

.appbar__title {
  display: grid;
  gap: 1px;
  justify-items: center;
  text-align: center;
  min-width: 0;
}

.appbar__title strong { font-size: 16px; font-weight: 700; letter-spacing: .01em; }
.appbar__title small { color: var(--muted); font-size: 11.5px; }

.icon-btn {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  color: var(--ink-2);
  background: transparent;
  transition: background .16s ease, transform .12s ease;
}

.icon-btn:active { background: var(--surface-2); transform: scale(.94); }
.icon-btn--tint { color: var(--brand-strong); background: var(--brand-soft); }
.icon-btn--plain { width: 40px; height: 40px; }

.i {
  display: block;
  width: 22px;
  height: 22px;
  background: currentColor;
  -webkit-mask: var(--icon) center / contain no-repeat;
  mask: var(--icon) center / contain no-repeat;
}

.i--xs { width: 15px; height: 15px; }
.i--sm { width: 18px; height: 18px; }
.i--lg { width: 26px; height: 26px; }

.view__body {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 16px 16px 22px;
  display: grid;
  gap: 14px;
  align-content: start;
}

.view__foot {
  display: grid;
  gap: 10px;
  padding: 12px 16px calc(var(--safe-b) + 14px);
  background: var(--surface);
  border-top: 1px solid var(--line-soft);
}

/* ── 通用组件 ─────────────────────────────────────────────────────────── */

.btn {
  min-height: 50px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 18px;
  border-radius: var(--r-md);
  font-size: 16px;
  font-weight: 700;
  white-space: nowrap;
  transition: transform .12s ease, opacity .16s ease, background .16s ease;
}

.btn:active { transform: scale(.975); }
.btn:disabled { cursor: not-allowed; opacity: .42; transform: none; }

.btn--primary { color: #fff; background: var(--brand-grad); box-shadow: var(--sh-brand); }
.btn--primary:disabled { box-shadow: none; }
.btn--dark { color: #fff; background: var(--ink); }
.btn--ghost { color: var(--ink); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.btn--tint { color: var(--brand-deep); background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand-line); }
.btn--danger { color: var(--danger); background: var(--danger-soft); box-shadow: inset 0 0 0 1px var(--danger-line); }
.btn--sm { min-height: 38px; padding: 0 14px; border-radius: var(--r-xs); font-size: 13.5px; }
.btn--block { width: 100%; }
.btn--link { min-height: 36px; padding: 0; color: var(--brand-strong); font-size: 14px; font-weight: 700; }
.btn--link:active { opacity: .6; transform: none; }

.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: var(--sh-1);
}

.card--flat { box-shadow: inset 0 0 0 1px var(--line); }
.card--tint { background: var(--brand-soft); box-shadow: inset 0 0 0 1px var(--brand-line); }

.card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.card__head h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15.5px;
  font-weight: 700;
}

.card__head h2 .i { color: var(--brand-strong); }
.card__note { color: var(--muted); font-size: 12.5px; line-height: 1.55; }

.section-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 2px 0 -4px 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .06em;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  font-size: 11.5px;
  font-weight: 700;
  white-space: nowrap;
}

.badge--ok { color: var(--ok); background: var(--ok-soft); }
.badge--warn { color: var(--warn); background: var(--warn-soft); }
.badge--danger { color: var(--danger); background: var(--danger-soft); }
.badge--info { color: var(--info); background: var(--info-soft); }
.badge--muted { color: var(--muted); background: var(--surface-2); }
.badge--brand { color: var(--brand-deep); background: var(--brand-soft); }

.badge__dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

.notice {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 10px;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  font-size: 13px;
  line-height: 1.6;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.notice .i { width: 20px; height: 20px; margin-top: 1px; }
.notice strong { display: block; margin-bottom: 2px; font-size: 13.5px; }
.notice--info { color: #1f4fa8; background: var(--info-soft); box-shadow: inset 0 0 0 1px var(--info-line); }
.notice--warn { color: #8a5300; background: var(--warn-soft); box-shadow: inset 0 0 0 1px var(--warn-line); }
.notice--danger { color: #a52a2a; background: var(--danger-soft); box-shadow: inset 0 0 0 1px var(--danger-line); }
.notice--ok { color: #0a7048; background: var(--ok-soft); box-shadow: inset 0 0 0 1px var(--ok-line); }

.rows { display: grid; gap: 2px; }

.row {
  width: 100%;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 6px;
  text-align: left;
  border-radius: var(--r-sm);
  transition: background .16s ease;
}

.row + .row { box-shadow: inset 0 1px 0 var(--line-soft); }
.row:active { background: var(--surface-2); }

.row__icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: var(--brand-strong);
  background: var(--brand-soft);
}

.row__icon--info { color: var(--info); background: var(--info-soft); }
.row__icon--ok { color: var(--ok); background: var(--ok-soft); }
.row__icon--danger { color: var(--danger); background: var(--danger-soft); }
.row__icon--muted { color: var(--ink-3); background: var(--surface-2); }

.row__text { min-width: 0; display: grid; gap: 2px; }
.row__text strong { font-size: 14.5px; font-weight: 650; }
.row__text small { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.row__go { color: #b6bfcc; }

.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.kv__box {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
}

.kv__box strong { color: var(--muted); font-size: 11.5px; font-weight: 700; }

.kv__box span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 14px;
  font-weight: 700;
}

.readout {
  padding: 12px 14px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.6;
  word-break: break-word;
}

.field-group { display: grid; gap: 12px; }

.field {
  display: grid;
  gap: 6px;
}

.field > label,
.field__label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 650;
}

.field__hint {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-size: 12.5px;
  font-weight: 700;
}

.field__hint:disabled { opacity: .55; }

.input {
  width: 100%;
  height: 50px;
  padding: 0 14px;
  border: 0;
  border-radius: var(--r-sm);
  outline: 0;
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink);
  font-size: 16px;
  transition: box-shadow .16s ease, background .16s ease;
}

.input:focus {
  background: var(--surface);
  box-shadow: inset 0 0 0 1.5px var(--brand), 0 0 0 4px rgba(47, 107, 255, .16);
}

textarea.input {
  height: auto;
  min-height: 86px;
  padding: 12px 14px;
  line-height: 1.55;
  resize: none;
}

.empty {
  display: grid;
  gap: 6px;
  justify-items: center;
  padding: 30px 18px;
  border-radius: var(--r-md);
  background: var(--surface-2);
  color: var(--muted);
  text-align: center;
  font-size: 13px;
}

.empty .i { width: 30px; height: 30px; color: #c4ccd8; }

/* ── 步骤清单 ─────────────────────────────────────────────────────────── */

.steps { display: grid; gap: 0; }

.step {
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 12px;
  padding: 12px 0;
}

.step + .step::before {
  content: "";
  position: absolute;
  left: 14.5px;
  top: -14px;
  width: 1px;
  height: 26px;
  background: var(--line);
}

.step__no {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--ink-3);
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 13px;
  font-weight: 800;
}

.step__body { min-width: 0; display: grid; gap: 6px; }

.step__title {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 14.5px;
  font-weight: 700;
}

.step__desc { color: var(--muted); font-size: 12.5px; line-height: 1.6; }
.step__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }

.step--active .step__no { color: #fff; background: var(--brand-grad); box-shadow: var(--sh-brand); }

.step--done .step__no {
  color: #fff;
  background: var(--ok);
  box-shadow: none;
  font-size: 0;
}

.step--done .step__no::after {
  content: "";
  width: 15px;
  height: 15px;
  background: #fff;
  -webkit-mask: var(--i-check) center / contain no-repeat;
  mask: var(--i-check) center / contain no-repeat;
}

/* ── 卡密验证页 ───────────────────────────────────────────────────────── */

.auth {
  grid-template-rows: minmax(0, 1fr);
  background:
    radial-gradient(520px 300px at 50% -6%, #dce8ff 0%, transparent 66%),
    linear-gradient(180deg, #f7f9ff 0%, #f6f7fa 100%);
}

.auth__body {
  padding: calc(var(--safe-t) + 26px) 22px calc(var(--safe-b) + 24px);
  align-content: center;
  gap: 18px;
}

.brand { display: grid; justify-items: center; gap: 12px; }

.brand__mark {
  position: relative;
  width: 78px;
  height: 78px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  background: var(--brand-grad);
  box-shadow: 0 14px 30px rgba(47, 107, 255, .28);
}

.brand__mark::after {
  content: "";
  width: 40px;
  height: 40px;
  background: #fff;
  -webkit-mask: var(--i-pin) center / contain no-repeat;
  mask: var(--i-pin) center / contain no-repeat;
}

.brand__mark--sm { width: 42px; height: 42px; border-radius: 13px; box-shadow: var(--sh-brand); }
.brand__mark--sm::after { width: 24px; height: 24px; }

.brand__name { display: grid; justify-items: center; gap: 4px; text-align: center; }
.brand__name h1 { font-size: 26px; font-weight: 800; letter-spacing: .01em; }
.brand__name p { max-width: 280px; color: var(--muted); font-size: 13.5px; line-height: 1.6; }

.auth__card { gap: 14px; padding: 18px; border-radius: var(--r-xl); box-shadow: var(--sh-2); }
.auth__form { display: grid; gap: 12px; }

.auth__msg {
  min-height: 20px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.5;
  text-align: center;
}

.auth__msg.is-error { color: var(--danger); }
.auth__msg.is-ok { color: var(--ok); }

.auth__tips { display: grid; gap: 8px; }

.auth__tip {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 9px;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.55;
}

.auth__tip .i { width: 18px; height: 18px; margin-top: 1px; color: var(--brand-strong); }

.auth__legal {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: var(--r-lg);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}

.auth__legal-title {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-size: 14px;
}

.auth__legal-title .i { color: var(--warn); }

.auth__legal-body {
  display: grid;
  gap: 8px;
  color: var(--ink-3);
  font-size: 12.5px;
  line-height: 1.65;
  -webkit-user-select: text;
  user-select: text;
}

.auth__legal-body p { margin: 0; }

.auth__legal-check {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 11px 12px;
  border-radius: var(--r-sm);
  background: var(--warn-soft);
  box-shadow: inset 0 0 0 1px var(--warn-line);
  color: #8a5300;
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.55;
  cursor: pointer;
  -webkit-user-select: text;
  user-select: text;
}

.auth__legal-check input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--brand-strong);
}

/* ── 准备页（下载配置 / 进入系统） ────────────────────────────────────── */

.gate__hero {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.gate__hero h1 { font-size: 20px; font-weight: 800; }
.gate__hero p { color: var(--muted); font-size: 12.5px; }

.license-card {
  gap: 14px;
  padding: 16px;
  border-radius: var(--r-lg);
  color: #fff;
  background: linear-gradient(135deg, #4d84ff 0%, #2f6bff 55%, #1f57e8 100%);
  box-shadow: 0 12px 26px rgba(31, 87, 232, .26);
}

.license-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.license-card__label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
  opacity: .92;
}

.license-card__state {
  height: 24px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .22);
  font-size: 11.5px;
  font-weight: 700;
}

.license-card__code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 19px;
  font-weight: 800;
  letter-spacing: .06em;
  overflow-wrap: anywhere;
}

.license-card__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 255, 255, .24);
}

.license-card__grid div { display: grid; gap: 2px; }
.license-card__grid dt { font-size: 11px; opacity: .85; }
.license-card__grid dd { margin: 0; font-size: 13.5px; font-weight: 700; }

.license-card__actions { display: flex; gap: 8px; }

.license-card .btn--frost {
  flex: 1;
  min-height: 40px;
  border-radius: var(--r-xs);
  color: #fff;
  background: rgba(255, 255, 255, .18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .3);
  font-size: 13.5px;
}

.announce-strip {
  width: 100%;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 18px;
  gap: 10px;
  align-items: center;
  padding: 11px 12px;
  border-radius: var(--r-md);
  background: var(--info-soft);
  box-shadow: inset 0 0 0 1px var(--info-line);
  text-align: left;
}

.announce-strip__icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--info);
  background: #fff;
}

.announce-strip__text { min-width: 0; display: grid; gap: 1px; }

.announce-strip__text strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #1f4fa8;
  font-size: 13.5px;
  font-weight: 700;
}

.announce-strip__text small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #4a6fb5;
  font-size: 12px;
}

.announce-strip .row__go { color: #7f9ad4; }

.gate__status {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 9px;
  padding: 11px 13px;
  border-radius: var(--r-sm);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink-2);
  background: var(--surface-2);
}

.gate__status .i { width: 20px; height: 20px; color: var(--muted); }
.gate__status.is-ok { color: #0a7048; background: var(--ok-soft); }
.gate__status.is-ok .i { color: var(--ok); }
.gate__status.is-warn { color: #8a5300; background: var(--warn-soft); }
.gate__status.is-warn .i { color: var(--warn); }
.gate__status.is-error { color: #a52a2a; background: var(--danger-soft); }
.gate__status.is-error .i { color: var(--danger); }

/* ── 地图页 ───────────────────────────────────────────────────────────── */

#map {
  position: absolute;
  inset: 0;
  background: #dfe6ec;
  touch-action: pan-x pan-y;
}

.map-top {
  position: absolute;
  z-index: 20;
  top: calc(var(--safe-t) + 10px);
  left: calc(var(--safe-l) + 12px);
  right: calc(var(--safe-r) + 12px);
  display: grid;
  gap: 8px;
}

.search-bar {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  height: 50px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, .96);
  box-shadow: var(--sh-2);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  overflow: hidden;
}

.search-bar__icon { display: grid; place-items: center; color: var(--muted); }

.search-bar input {
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 15.5px;
}

.search-bar input::placeholder { color: #97a2b1; }

.search-bar__go {
  width: 40px;
  height: 40px;
  margin-right: 5px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #fff;
  background: var(--brand-grad);
}

.search-bar__go:active { transform: scale(.94); }

.map-chip-row { display: flex; gap: 8px; align-items: center; }

.map-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  height: 32px;
  padding: 0 12px;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .95);
  box-shadow: var(--sh-1);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 650;
  overflow: hidden;
}

.map-chip span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.map-chip .i { width: 15px; height: 15px; flex: 0 0 15px; }
.map-chip--news { color: #1f4fa8; }
.map-chip--news .i { color: var(--info); }
.map-chip--ok { color: var(--ok); }
.map-chip--warn { color: var(--warn); }
.map-chip--error { color: var(--danger); }

.search-results {
  max-height: 46vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, .98);
  box-shadow: var(--sh-3);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
}

.result-row {
  width: 100%;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  padding: 11px 13px;
  text-align: left;
}

.result-row + .result-row { box-shadow: inset 0 1px 0 var(--line-soft); }
.result-row:active { background: var(--surface-2); }

.result-row__pin {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--brand-strong);
  background: var(--brand-soft);
}

.result-row__text { min-width: 0; display: grid; gap: 2px; }

.result-row__text strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 14.5px;
  font-weight: 650;
}

.result-row__text small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 12.5px;
}

.result-attribution {
  padding: 8px 13px;
  color: var(--muted);
  font-size: 11px;
  text-align: right;
}

.tool-rail {
  position: absolute;
  z-index: 18;
  right: calc(var(--safe-r) + 12px);
  bottom: calc(var(--safe-b) + var(--rail-gap, 300px));
  display: grid;
  gap: 10px;
  justify-items: end;
  transition: bottom .24s ease;
}

.tool-group {
  display: grid;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, .96);
  box-shadow: var(--sh-2);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  overflow: hidden;
}

.tool-btn {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  color: var(--ink-2);
  transition: background .16s ease, transform .12s ease;
}

.tool-btn:active { background: var(--surface-2); transform: scale(.93); }
.tool-group .tool-btn + .tool-btn { box-shadow: inset 0 1px 0 var(--line-soft); }
.tool-btn--help { color: var(--warn); }
.tool-btn--fav { color: var(--brand-strong); }
.tool-btn--locate { color: var(--info); }

.place-panel {
  position: absolute;
  z-index: 22;
  left: calc(var(--safe-l) + 10px);
  right: calc(var(--safe-r) + 10px);
  bottom: calc(var(--safe-b) + 10px);
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: var(--r-xl);
  background: rgba(255, 255, 255, .97);
  box-shadow: var(--sh-3);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
}

.place-panel__top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 46px;
  gap: 12px;
  align-items: center;
}

.place-panel__info { min-width: 0; display: grid; gap: 4px; }

.place-panel__info strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 17px;
  font-weight: 700;
}

.place-panel__info small {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  color: var(--muted);
  font-size: 12.5px;
  line-height: 1.45;
}

.coord-chip {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px;
  border-radius: var(--r-pill);
  color: var(--brand-deep);
  background: var(--brand-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
}

.fav-btn {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--brand-strong);
  background: var(--brand-soft);
  box-shadow: inset 0 0 0 1px var(--brand-line);
  transition: transform .12s ease;
}

.fav-btn:active { transform: scale(.93); }

/* ── 抽屉 / 弹窗 ──────────────────────────────────────────────────────── */

.scrim {
  position: absolute;
  z-index: 40;
  inset: 0;
  background: rgba(16, 22, 32, .38);
  opacity: 0;
  transition: opacity .24s ease;
  -webkit-backdrop-filter: blur(1.5px);
  backdrop-filter: blur(1.5px);
}

.scrim.is-open { opacity: 1; }

.sheet {
  position: absolute;
  z-index: 45;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  max-height: 90%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border-radius: var(--r-xl) var(--r-xl) 0 0;
  background: var(--surface);
  box-shadow: 0 -12px 40px rgba(16, 22, 32, .18);
  transform: translateY(101%);
  transition: transform .3s cubic-bezier(.22, .9, .24, 1);
  overflow: hidden;
}

.sheet.is-open { transform: translateY(0); }
.sheet--tall { height: 94%; }
.sheet--footed { grid-template-rows: auto minmax(0, 1fr) auto; }

.sheet__head {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  gap: 10px;
  align-items: center;
  padding: 18px 16px 12px;
  border-bottom: 1px solid var(--line-soft);
}

.sheet__head::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  width: 38px;
  height: 4px;
  border-radius: 2px;
  background: var(--line);
  transform: translateX(-50%);
}

.sheet__head strong { display: block; font-size: 17px; font-weight: 700; }
.sheet__head small { display: block; margin-top: 1px; color: var(--muted); font-size: 12px; }

.sheet__body {
  min-width: 0;
  width: 100%;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 14px 16px calc(var(--safe-b) + 20px);
  display: grid;
  gap: 14px;
  align-content: start;
}

.sheet__foot {
  padding: 12px 16px calc(var(--safe-b) + 14px);
  border-top: 1px solid var(--line-soft);
  background: var(--surface);
}

.dialog {
  position: absolute;
  z-index: 50;
  left: 50%;
  top: 50%;
  width: min(calc(100% - 36px), 400px);
  max-height: 86%;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--sh-3);
  overflow: hidden;
  opacity: 0;
  transform: translate(-50%, -50%) scale(.94);
  transition: opacity .2s ease, transform .24s cubic-bezier(.22, .9, .24, 1);
}

.dialog.is-open { opacity: 1; transform: translate(-50%, -50%) scale(1); }

.dialog__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 40px;
  gap: 10px;
  align-items: center;
  padding: 16px 14px 12px 18px;
  border-bottom: 1px solid var(--line-soft);
}

.dialog__head strong { display: block; font-size: 16.5px; font-weight: 700; }
.dialog__head small { display: block; margin-top: 1px; color: var(--muted); font-size: 12px; }

.dialog__body {
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 16px 18px 20px;
  display: grid;
  gap: 14px;
  align-content: start;
}

.dialog--plain { grid-template-rows: minmax(0, 1fr); }

.result-dialog__body {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 30px 24px 22px;
  overflow-y: auto;
  text-align: center;
  -webkit-overflow-scrolling: touch;
}

.result-dialog__icon {
  width: 66px;
  height: 66px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--ok);
  box-shadow: 0 12px 26px rgba(15, 157, 99, .26);
}

.result-dialog__icon .i { width: 34px; height: 34px; }
.result-dialog__icon.is-restore { background: var(--info); box-shadow: 0 12px 26px rgba(42, 106, 224, .24); }
.result-dialog__body h2 { font-size: 21px; font-weight: 800; }
.result-dialog__body p { color: var(--ink-3); font-size: 14px; line-height: 1.65; }

.ordered {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 13px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  list-style: none;
  counter-reset: ordered;
  text-align: left;
  box-sizing: border-box;
}

.ordered li {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.6;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.ordered li::before {
  counter-increment: ordered;
  content: counter(ordered);
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: var(--brand);
  font-size: 11.5px;
  font-weight: 800;
  line-height: 1;
}

.ordered--warn li::before { background: var(--warn); }
.ordered--info li::before { background: var(--info); }

/* ── 收藏 ─────────────────────────────────────────────────────────────── */

.fav-list { display: grid; gap: 10px; }

.fav-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 38px;
  gap: 10px;
  align-items: start;
  padding: 13px;
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}

.fav-card__main { min-width: 0; display: grid; gap: 5px; text-align: left; }
.fav-card__main strong { font-size: 15px; font-weight: 700; }
.fav-card__addr { color: var(--muted); font-size: 12.5px; line-height: 1.45; word-break: break-word; }

.fav-card__coord {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--brand-deep);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
}

.fav-card__note { color: var(--ink-3); font-size: 12.5px; line-height: 1.45; word-break: break-word; }
.fav-card__note.is-empty { color: #a9b3c1; }

.del-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: var(--danger);
  background: var(--danger-soft);
}

.del-btn:active { transform: scale(.93); }

/* ── 公告 ─────────────────────────────────────────────────────────────── */

.news-list { display: grid; gap: 10px; }

.news-item {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}

.news-item__head {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
}

.news-item__icon {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: var(--info);
  background: var(--info-soft);
}

.news-item h3 { font-size: 15px; font-weight: 700; line-height: 1.35; }
.news-item time { color: #a3adbb; font-size: 11.5px; }

.news-item__body {
  color: var(--ink-2);
  font-size: 13.5px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
  -webkit-user-select: text;
  user-select: text;
}

.news-item__body a { color: var(--info); text-decoration: underline; }
.news-item--top { background: var(--info-soft); box-shadow: inset 0 0 0 1px var(--info-line); }

/* ── 诊断 ─────────────────────────────────────────────────────────────── */

.diag-summary {
  padding: 11px 13px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 12.5px;
  line-height: 1.55;
}

.diag-summary.pass { color: #0a7048; background: var(--ok-soft); }
.diag-summary.warn { color: #8a5300; background: var(--warn-soft); }
.diag-summary.fail { color: #a52a2a; background: var(--danger-soft); }

.diag-list { display: grid; gap: 8px; }

.diag-row {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 10px 12px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
}

.diag-row strong { display: block; font-size: 13px; font-weight: 700; }
.diag-row small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; line-height: 1.5; word-break: break-word; }
.diag-dot { width: 10px; height: 10px; margin-top: 4px; border-radius: 50%; background: #b9c2cf; }
.diag-row.pass .diag-dot { background: var(--ok); }
.diag-row.warn .diag-dot { background: var(--warn); }
.diag-row.fail .diag-dot { background: var(--danger); }

/* ── 使用教程 ─────────────────────────────────────────────────────────── */

/* Keep every tutorial tab visible inside the sheet width. Do not use
   horizontal scrolling — it also stretches the sheet past the viewport. */
.segmented {
  position: sticky;
  top: 0;
  z-index: 3;
  margin: 0;
  padding: 2px 0 12px;
  background: var(--surface);
  min-width: 0;
  max-width: 100%;
}

.segmented__track {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  align-items: stretch;
  padding: 2px;
  min-width: 0;
  max-width: 100%;
  overflow: visible;
}

.segmented button {
  min-width: 0;
  width: 100%;
  min-height: 34px;
  height: 34px;
  padding: 0 6px;
  border-radius: var(--r-pill);
  color: var(--ink-3);
  background: var(--surface-2);
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color .16s ease, background .16s ease;
}

.segmented button.is-active { color: #fff; background: var(--brand-strong); }

.tut {
  display: grid;
  gap: 14px;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.tut[hidden] { display: none; }

.tut__hero {
  display: grid;
  gap: 8px;
  padding: 16px;
  border-radius: var(--r-lg);
  color: #fff;
  background: var(--brand-grad);
  box-shadow: var(--sh-brand);
  min-width: 0;
  max-width: 100%;
}

.tut__hero h2 { font-size: 19px; font-weight: 800; overflow-wrap: anywhere; }
.tut__hero p { font-size: 13px; line-height: 1.65; opacity: .95; overflow-wrap: anywhere; }

.tut__group { display: grid; gap: 10px; min-width: 0; max-width: 100%; }

.tut__group > h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15.5px;
  font-weight: 750;
  min-width: 0;
}

.tut__group > h3 .i { color: var(--brand-strong); flex: 0 0 auto; }

.tut__steps {
  display: grid;
  gap: 0;
  padding: 4px 14px;
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  min-width: 0;
  max-width: 100%;
}

.tut__path {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  padding: 7px 10px;
  border-radius: var(--r-xs);
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.5;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow-wrap: anywhere;
  word-break: break-word;
  -webkit-user-select: text;
  user-select: text;
}

.tut__path .sep { color: #b2bbc8; }

.tut__faq { display: grid; gap: 8px; min-width: 0; max-width: 100%; }

.tut__faq details {
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
  min-width: 0;
  max-width: 100%;
}

.tut__faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
  list-style: none;
  min-width: 0;
}

.tut__faq summary::-webkit-details-marker { display: none; }

.tut__faq summary::after {
  content: "";
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  background: currentColor;
  color: #b6bfcc;
  -webkit-mask: var(--i-chevron-right) center / contain no-repeat;
  mask: var(--i-chevron-right) center / contain no-repeat;
  transition: transform .2s ease;
}

.tut__faq details[open] summary::after { transform: rotate(90deg); }

.tut__faq p {
  margin-top: 8px;
  color: var(--ink-2);
  font-size: 13px;
  line-height: 1.7;
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* ── 提示条 ───────────────────────────────────────────────────────────── */

.toast {
  position: absolute;
  z-index: 60;
  left: 50%;
  top: calc(var(--safe-t) + 74px);
  max-width: min(calc(100% - 36px), 360px);
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  padding: 11px 14px;
  border-radius: var(--r-sm);
  color: #fff;
  background: rgba(20, 24, 31, .94);
  box-shadow: var(--sh-3);
  font-size: 13.5px;
  line-height: 1.45;
  transform: translate(-50%, -8px);
  opacity: 0;
  transition: opacity .2s ease, transform .2s ease;
  pointer-events: none;
}

.toast.is-open { opacity: 1; transform: translate(-50%, 0); }
.toast .i { width: 18px; height: 18px; }
.toast.is-ok { background: rgba(11, 122, 78, .96); }
.toast.is-error { background: rgba(196, 46, 46, .96); }

/* ── 地图 SDK 覆盖 ────────────────────────────────────────────────────── */

.amap-logo,
.amap-copyright,
.amap-toolbar,
.amap-zoomcontrol,
.amap-touch-toolbar,
.leaflet-control-zoom { display: none !important; }

.leaflet-container { background: #dfe6ec; font: inherit; }

/* OpenStreetMap requires visible attribution, but Leaflet parks it at z-index
   1000 in the bottom right, where it would cover the place panel and the tool
   rail. Move it to the free space on the left, just above the panel. */
.leaflet-bottom {
  z-index: 2 !important;
  left: 0 !important;
  right: auto !important;
  bottom: calc(var(--safe-b) + var(--rail-gap, 300px)) !important;
}

.leaflet-control-attribution {
  margin: 0 0 0 10px !important;
  padding: 2px 7px !important;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .82) !important;
  color: var(--muted) !important;
  font-size: 10px !important;
}

.leaflet-control-attribution a { color: var(--muted) !important; }

.pin-marker {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50% 50% 50% 6px;
  background: var(--brand-grad);
  box-shadow: 0 8px 18px rgba(31, 87, 232, .34);
  transform: rotate(-45deg);
}

.pin-marker::after {
  content: "";
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #fff;
  transform: rotate(45deg);
}
