/* ==========================================================================
   Cinema Guide — 样式表 v2
   暖橙 × 蓝 现代亮色主题：暖米白底、日出渐变头部、大圆角卡片、柔和阴影
   类名与 v1 完全兼容，仅替换视觉层
   ========================================================================== */

:root {
  /* 暖色基调 */
  --bg: #faf6f0;
  --bg-soft: #f4eee4;
  --surface: #ffffff;
  --surface-2: #fffaf3;

  /* 线条与文字 */
  --line: #ece3d4;
  --line-soft: #f1e9dd;
  --text: #241d14;
  --text-2: #6f6455;
  --text-3: #a3927e;

  /* 主色：暖橙 与 蓝 */
  --accent: #f26522;
  --accent-strong: #e05210;
  --accent-soft: #fde8d8;
  --blue: #2563eb;
  --blue-soft: #dbe7fe;

  --grad-warm: linear-gradient(135deg, #ff6b35 0%, #f26522 52%, #e05210 100%);
  --grad-hero: linear-gradient(135deg, #1d2b53 0%, #26356b 42%, #f26522 130%);

  --shadow-sm: 0 1px 2px rgba(80, 55, 20, 0.05), 0 2px 8px rgba(80, 55, 20, 0.06);
  --shadow-md: 0 4px 14px rgba(80, 55, 20, 0.08), 0 10px 30px rgba(80, 55, 20, 0.08);
  --shadow-warm: 0 6px 22px rgba(242, 101, 34, 0.28);

  --radius-s: 10px;
  --radius-m: 16px;
  --radius-l: 24px;

  --shell: 88%;
  --shell-max: 1800px;

  --font: ui-sans-serif, -apple-system, "Segoe UI", Roboto, "Helvetica Neue",
    "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  background-image:
    radial-gradient(900px 380px at 85% -60px, rgba(242, 101, 34, 0.07), transparent 70%),
    radial-gradient(760px 340px at 8% -80px, rgba(37, 99, 235, 0.06), transparent 70%);
  background-attachment: fixed;
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul { list-style: none; margin: 0; padding: 0; }

.shell {
  width: var(--shell);
  max-width: var(--shell-max);
  margin-inline: auto;
}

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

/* ── 顶部导航 ─────────────────────────────────────────────────────── */
.masthead {
  position: sticky;
  top: 0;
  z-index: 60;
  isolation: isolate;
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}
.masthead::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(255, 251, 245, 0.86);
}
.masthead::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  z-index: -1;
  background: var(--grad-warm);
  opacity: 0.85;
}

.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-block: 13px;
}

.brand { display: inline-flex; align-items: center; gap: 11px; }
.brand__mark { height: 26px; width: 38px; flex: none; color: var(--accent); }
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__name { font-size: 17px; font-weight: 750; letter-spacing: -0.02em; }
.brand__tag {
  font-size: 9.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text-3);
}

.masthead__controls { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* 分段控件 */
.segmented {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
}
.segmented button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 13px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
}
.segmented button:hover { color: var(--accent); }
.segmented button[aria-pressed="true"] {
  background: var(--grad-warm);
  color: #fff;
  box-shadow: var(--shadow-warm);
}
.segmented svg { width: 14px; height: 14px; flex: none; }

/* 下拉选择 */
.field { position: relative; display: inline-flex; align-items: center; }
.field__label {
  position: absolute;
  left: 13px;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  pointer-events: none;
  z-index: 1;
}
.field select {
  appearance: none;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  font-size: 13px;
  font-weight: 550;
  padding: 9px 34px 9px 13px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.18s, box-shadow 0.18s;
}
.field--labelled select {
  padding-left: calc(var(--label-w, 62px));
}
.field--labelled .field__label {
  left: 13px;
  max-width: calc(var(--label-w, 62px) - 14px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.field select:hover { border-color: #e0c9a8; }
.field select:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-color: var(--accent); }
.field select option { background: #fff; color: var(--text); }
.field__caret {
  position: absolute;
  right: 12px;
  width: 12px;
  height: 12px;
  color: var(--text-3);
  pointer-events: none;
}

.ghost-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
  box-shadow: var(--shadow-sm);
  transition: background 0.18s, color 0.18s, border-color 0.18s, box-shadow 0.18s;
}
.ghost-btn:hover { color: var(--accent); border-color: #ecc9a8; box-shadow: var(--shadow-md); }
.ghost-btn svg { width: 14px; height: 14px; }

/* ── 页面主体 ─────────────────────────────────────────────────────── */
.main { flex: 1; padding-block: 32px 64px; }

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 26px 28px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  background:
    radial-gradient(420px 200px at 100% 0%, rgba(242, 101, 34, 0.08), transparent 70%),
    linear-gradient(180deg, #fffdf9, #fdf8f0);
  box-shadow: var(--shadow-sm);
  margin-bottom: 28px;
}
.page-head__title {
  margin: 0;
  font-size: clamp(24px, 3.4vw, 38px);
  font-weight: 750;
  letter-spacing: -0.03em;
}
.page-head__count { color: var(--text-3); font-weight: 600; }
.page-head__meta {
  margin-top: 7px;
  font-size: 12px;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.page-head__actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* 制式分组 */
.group { margin-bottom: 46px; }
.group__head { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; }
.group__bar { width: 5px; height: 24px; border-radius: 6px; background: var(--accent); flex: none; box-shadow: 0 0 0 3px rgba(242, 101, 34, 0.12); }
.group__name { font-size: 20px; font-weight: 750; letter-spacing: -0.02em; margin: 0; }
.group__count {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-2);
  padding: 3px 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
}
.group__rule { flex: 1; height: 1px; background: var(--line); }

.tier { margin-bottom: 30px; }
.tier__head { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; }
.tier__dot { width: 8px; height: 8px; border-radius: 50%; flex: none; box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05); }
.tier__name { font-size: 13.5px; font-weight: 650; color: var(--text-2); }
.tier__count {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-2);
  min-width: 18px;
  height: 18px;
  padding-inline: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: var(--bg-soft);
}

/* ── 网格视图：银幕示意卡片 ───────────────────────────────────────── */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 18px;
}

.card {
  display: block;
  position: relative;
  padding: 18px 18px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.card:hover {
  border-color: #ecc9a8;
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.card:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* 银幕比例示意图 */
.screen {
  position: relative;
  margin: 6px 26px 12px 4px;
  padding-top: 14px;
}
.screen__w {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-2);
}
.screen__w::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.screen__box {
  position: relative;
  width: 100%;
  border: 1px solid rgba(242, 101, 34, 0.3);
  border-radius: 6px;
  background:
    radial-gradient(130% 100% at 50% 0%, rgba(255, 255, 255, 0.85), transparent 60%),
    linear-gradient(165deg, #ffe9d4, #ffd9b8 55%, #ffc895);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 3px 10px rgba(242, 101, 34, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.screen__box::after {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(
    -45deg, transparent 0 8px, rgba(242, 101, 34, 0.05) 8px 9px
  );
  pointer-events: none;
}
.screen__area {
  position: relative;
  z-index: 1;
  text-align: center;
  line-height: 1.25;
}
.screen__area strong { display: block; font-size: 15px; font-weight: 750; color: #7a2e05; letter-spacing: -0.01em; }
.screen__area span { font-size: 10.5px; color: #a05a22; }
.screen__h {
  position: absolute;
  top: 14px;
  bottom: 0;
  right: -26px;
  width: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.screen__h em {
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
  writing-mode: vertical-rl;
}

.card__name {
  font-size: 14.5px;
  font-weight: 650;
  letter-spacing: -0.01em;
  margin: 0 0 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card__sub { font-size: 11.5px; color: var(--text-3); display: flex; gap: 8px; flex-wrap: wrap; }
.card__rank {
  position: absolute;
  top: 12px;
  right: 14px;
  font-size: 10px;
  font-weight: 750;
  color: var(--accent);
  font-family: var(--mono);
  background: var(--accent-soft);
  padding: 2px 7px;
  border-radius: 999px;
}

/* ── 列表视图 ─────────────────────────────────────────────────────── */
.table-wrap {
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow-sm);
}
table.list { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.list th {
  text-align: left;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  font-weight: 700;
  padding: 11px 14px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.list td { padding: 12px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
table.list tr:last-child td { border-bottom: 0; }
table.list tbody tr { cursor: pointer; transition: background 0.15s; }
table.list tbody tr:hover { background: var(--accent-soft); }
.cell-name { font-weight: 650; }
.cell-sub { font-size: 11.5px; color: var(--text-3); }
.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pill {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid currentColor;
  white-space: nowrap;
}

/* ── 详情页 ───────────────────────────────────────────────────────── */
.detail__back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
  margin-bottom: 18px;
  transition: color 0.18s;
}
.detail__back:hover { color: var(--accent); }
.detail__back svg { width: 13px; height: 13px; }

.detail__head { margin-bottom: 28px; }
.detail__badges { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.detail__title {
  margin: 0 0 6px;
  font-size: clamp(24px, 3.6vw, 40px);
  font-weight: 750;
  letter-spacing: -0.03em;
}
.detail__where { color: var(--text-2); font-size: 14px; }

.detail__body { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 26px; align-items: start; }

.stage {
  border: 1px solid rgba(242, 101, 34, 0.28);
  border-radius: var(--radius-l);
  padding: 28px 34px 26px;
  background:
    radial-gradient(480px 240px at 50% -40px, rgba(255, 255, 255, 0.14), transparent 70%),
    var(--grad-hero);
  color: #fff;
  box-shadow: var(--shadow-md);
}
.stage__label {
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.65);
  margin-bottom: 18px;
}
.stage .screen { margin: 6px 34px 6px 4px; }
.stage .screen__box {
  border-color: rgba(255, 255, 255, 0.5);
  background:
    radial-gradient(130% 100% at 50% 0%, rgba(255, 255, 255, 0.9), transparent 60%),
    linear-gradient(165deg, #ffedda, #ffd9b8 55%, #ffc895);
  box-shadow: 0 6px 26px rgba(0, 0, 0, 0.35);
}
.stage .screen__area strong { font-size: 20px; color: #7a2e05; }
.stage .screen__area span { color: #a05a22; }
.stage .screen__w, .stage .screen__h em { color: rgba(255, 255, 255, 0.9); }
.stage .screen__w::after { background: rgba(255, 255, 255, 0.28); }
.stage__scale {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.7);
  display: flex;
  align-items: center;
  gap: 8px;
}
.stage__human { height: 30px; width: auto; opacity: 0.85; color: #fff; }

/* ── 地图视图 ─────────────────────────────────────────────────────── */
.map-shell {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.map-canvas {
  height: 560px;
  width: 100%;
  background: #1a1c22;
}
.map-legend {
  position: absolute;
  left: 14px;
  bottom: 14px;
  z-index: 500;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  padding: 10px 14px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line);
  border-radius: 12px;
  max-width: calc(100% - 28px);
  font-size: 11px;
  color: var(--text-2);
}
.map-legend__item { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; }
.map-legend__item i { width: 9px; height: 9px; border-radius: 50%; flex: none; }

.map-pin-wrap { background: none; border: none; }
.map-pin {
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--pin, #f97316);
  border: 2.5px solid #fff;
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.55);
  cursor: pointer;
}
.map-pop-wrap { border-radius: 12px; overflow: hidden; }
.map-pop { font-family: var(--font); padding: 4px 2px; }
.map-pop__name { font-size: 13px; font-weight: 650; line-height: 1.35; }
.map-pop__meta { font-size: 11.5px; color: #777; margin-top: 2px; }
.map-pop__size { font-size: 11.5px; color: #555; margin-top: 3px; }
.map-pop__link { display: inline-block; margin-top: 7px; font-size: 11.5px; font-weight: 600; color: var(--accent); }

@media (max-width: 760px) {
  .map-canvas { height: 420px; }
  .map-legend { font-size: 10px; padding: 8px 10px; }
}

.specs { border: 1px solid var(--line); border-radius: var(--radius-l); overflow: hidden; background: #fff; box-shadow: var(--shadow-sm); }
.specs__row { display: flex; justify-content: space-between; gap: 16px; padding: 13px 18px; border-bottom: 1px solid var(--line-soft); }
.specs__row:last-child { border-bottom: 0; }
.specs__row dt { font-size: 12.5px; color: var(--text-3); margin: 0; }
.specs__row dd { margin: 0; font-size: 13.5px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.specs__note { padding: 14px 18px; font-size: 12.5px; color: var(--text-2); background: var(--bg-soft); line-height: 1.6; }

/* 座位排布图 */
.seatmap { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 20px; }
.seatmap__head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.seatmap__title { margin: 0; font-size: 15px; letter-spacing: -0.01em; }
.seatmap__meta { font-size: 12px; color: var(--text-3); }
.seatmap__wrap { max-width: 100%; overflow-x: auto; padding-bottom: 6px; }
.seatmap__screen {
  display: flex; justify-content: center; align-items: center;
  height: 26px; margin: 0 auto 18px; max-width: 92%;
  border-radius: 4px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0.08));
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 11px; color: var(--text-2); letter-spacing: 0.3em;
}
.seatmap__grid { display: flex; flex-direction: column; gap: 3px; min-width: max-content; }
.seatmap__sectionname { font-size: 11px; color: var(--text-3); margin: 10px 0 4px 26px; }
.seatmap__row { display: flex; align-items: center; gap: 6px; }
.seatmap__rowlabel { width: 20px; flex: none; font-size: 9px; color: var(--text-3); text-align: right; font-variant-numeric: tabular-nums; }
.seatmap__seats { display: flex; gap: 3px; }
.seatmap__seat {
  width: 15px; height: 15px; flex: none;
  border-radius: 3px;
  background: var(--seat, var(--accent));
  opacity: 0.88;
  font-size: 8px; line-height: 15px; text-align: center;
  color: #fff; font-weight: 700;
  cursor: default;
}
.seatmap__gap { width: 15px; height: 15px; flex: none; }
.seatmap__legend { display: flex; align-items: center; gap: 18px; margin-top: 16px; font-size: 11px; color: var(--text-3); flex-wrap: wrap; }
.seatmap__legend span { display: inline-flex; align-items: center; gap: 5px; }
.seatmap__swatch { width: 11px; height: 11px; border-radius: 2px; display: inline-block; }
.seatmap__swatch--gap { background: transparent; border: 1px dashed var(--line); }
.seatmap__source { margin-left: auto; }

/* 详情页位置地图 */
.detail-map { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 20px; }
.detail-map__title { margin: 0 0 14px; font-size: 15px; letter-spacing: -0.01em; }
.detail-map__canvas { height: 240px; border-radius: var(--radius-m); overflow: hidden; background: #1a1c22; }
.detail-map__amap { display: inline-block; margin-top: 10px; font-size: 12px; color: var(--accent); text-decoration: none; }
.detail-map__amap:hover { text-decoration: underline; }

/* 详情页影迷点评 */
.detail-reviews { background: var(--bg-soft); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 20px; }
.detail-reviews__head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.detail-reviews__title { margin: 0; font-size: 15px; letter-spacing: -0.01em; }
.detail-reviews__score { font-size: 12px; color: var(--text-3); }
.detail-reviews__item { border-top: 1px solid var(--line-soft); padding: 14px 0 4px; }
.detail-reviews__meta { font-size: 12px; color: var(--text-3); margin-bottom: 6px; }
.detail-reviews__meta b { color: var(--text-2); }
.detail-reviews__text { margin: 0; font-size: 13px; line-height: 1.7; color: var(--text-1); }

/* 制式说明页 */
.prose { max-width: 780px; }
.prose h2 { font-size: 18px; letter-spacing: -0.02em; margin: 30px 0 10px; }
.prose p { color: var(--text-2); font-size: 14px; margin: 0 0 12px; }
.guide-item { border: 1px solid var(--line); border-radius: var(--radius-m); padding: 16px 18px; margin-bottom: 12px; background: #fff; box-shadow: var(--shadow-sm); }
.guide-item h3 { margin: 0 0 6px; font-size: 14.5px; display: flex; align-items: center; gap: 8px; }
.guide-item p { margin: 0; font-size: 13px; color: var(--text-2); }

/* 空状态 */
.empty { padding: 70px 0; text-align: center; color: var(--text-3); }
.empty svg { width: 40px; height: 40px; opacity: 0.4; margin-bottom: 12px; color: var(--accent); }

/* ── 页脚 ─────────────────────────────────────────────────────────── */
.footer { border-top: 1px solid var(--line); padding-block: 34px 40px; margin-top: auto; background: #fffdf9; }
.footer__grid { display: flex; justify-content: space-between; gap: 30px; flex-wrap: wrap; }
.footer__tag { color: var(--text-3); font-size: 12.5px; margin-top: 8px; max-width: 340px; }
.footer__links { display: flex; gap: 22px; flex-wrap: wrap; font-size: 12.5px; }
.footer__links a { color: var(--text-2); font-weight: 600; transition: color 0.18s; }
.footer__links a:hover { color: var(--accent); }
.footer__note {
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  color: var(--text-3);
  line-height: 1.7;
  max-width: 760px;
}

/* ── 分享弹层 ─────────────────────────────────────────────────────── */
.modal[hidden] { display: none; }
.modal {
  position: fixed;
  inset: 0;
  z-index: 2000; /* 必须高于 Leaflet 地图各图层(pane 最高 700)，避免地图标记穿透遮挡弹层 */
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(36, 29, 20, 0.55);
  backdrop-filter: blur(8px);
}
.modal__panel {
  width: min(440px, 100%);
  max-height: 88vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius-l);
  background: #fff;
  padding: 22px;
  box-shadow: var(--shadow-md);
}
.modal__title { margin: 0 0 4px; font-size: 16px; font-weight: 700; }
.modal__desc { margin: 0 0 16px; font-size: 12.5px; color: var(--text-3); }
.modal__preview {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  display: block;
  background: #1d2b53;
}
.modal__actions { display: flex; gap: 10px; margin-top: 16px; }
.modal__actions .ghost-btn { flex: 1; justify-content: center; }

/* ── 地区选择按钮与搜索面板 ─────────────────────────────────────── */
.region-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  font-size: 12.5px;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.region-btn:hover { border-color: #ecc9a8; box-shadow: var(--shadow-md); }
.region-btn svg { width: 12px; height: 12px; color: var(--text-3); }
.region-btn__label {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
}
.region-btn__value { font-weight: 650; }

.modal__panel--region { width: min(760px, 100%); }
.region-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.region-panel__title { margin: 0; font-size: 16px; font-weight: 700; }
.region-panel__close { padding: 4px 12px; font-size: 15px; }
.region-panel__search { display: flex; gap: 10px; margin-bottom: 12px; }
.region-panel__search input {
  flex: 1;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font: inherit;
  font-size: 13px;
  background: var(--bg);
  color: var(--text);
  outline: none;
  transition: border-color 0.18s;
}
.region-panel__search input:focus { border-color: var(--accent); }
.region-panel__locate {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-2);
  white-space: nowrap;
  cursor: pointer;
  transition: color 0.18s, border-color 0.18s;
}
.region-panel__locate:hover { color: var(--accent); border-color: #ecc9a8; }
.region-panel__locate svg { width: 13px; height: 13px; }

.region-panel__tabs {
  display: inline-flex;
  gap: 4px;
  padding: 3px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  margin-bottom: 14px;
}
.region-panel__tabs button {
  padding: 6px 16px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
  cursor: pointer;
  transition: background 0.18s, color 0.18s;
}
.region-panel__tabs button.is-active {
  background: var(--grad-warm);
  color: #fff;
  box-shadow: var(--shadow-warm);
}

.region-panel__cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  overflow: hidden;
  max-height: 46vh;
}
.region-panel__col { overflow-y: auto; max-height: 46vh; }
.region-panel__col--prov { border-right: 1px solid var(--line); background: var(--bg); }
.region-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 9px 14px;
  font-size: 13px;
  color: var(--text);
  background: none;
  border: 0;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}
.region-item:hover { background: var(--accent-soft); }
.region-item.is-active { background: var(--accent-soft); color: var(--accent-strong); font-weight: 650; }
.region-item .tnum { font-size: 11px; color: var(--text-3); }
.region-item em { font-style: normal; font-size: 11px; color: var(--text-3); margin-left: 4px; }
.region-panel__empty { padding: 30px; text-align: center; color: var(--text-3); font-size: 13px; }

@media (max-width: 760px) {
  .region-panel__cols { grid-template-columns: 1fr; max-height: 60vh; }
  .region-panel__col--prov { border-right: 0; border-bottom: 1px solid var(--line); }
  .region-panel__search { flex-direction: column; }
}

/* ── 响应式 ───────────────────────────────────────────────────────── */
@media (max-width: 1100px) {
  :root { --shell: 92%; }
  .detail__body { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  :root { --shell: 91%; }
  body { font-size: 14px; }
  .masthead__inner { flex-direction: column; align-items: stretch; gap: 12px; padding-block: 12px; }
  .masthead__controls { justify-content: space-between; }
  .brand { justify-content: center; }
  .page-head { padding: 20px 18px 18px; }
  .grid { grid-template-columns: 1fr; }
  .hide-sm { display: none; }
  .table-wrap { overflow-x: auto; }
  table.list { min-width: 620px; }
  .stage { padding: 20px 30px 20px 18px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
  html { scroll-behavior: auto; }
}
