/* ============================================================
   小边说地理 · 铁路绘图集  ——  样式表（明亮主题 · 铁路风）
   配色参考天地图：清爽蓝白、蓝色选中态
   ============================================================ */

:root {
  --bg: #edf2f8;
  --bg-soft: #f7fafd;
  --card: #ffffff;
  --ink: #1d2b3a;
  --ink-dim: #55677c;
  --ink-faint: #8b9bad;
  --blue: #1c6fc9;
  --blue-strong: #155cae;
  --blue-deep: #123a6b;
  --blue-soft: #e7f1fc;
  --amber: #f0a020;
  --line: rgba(28, 111, 201, 0.16);
  --line-strong: rgba(28, 111, 201, 0.34);
  --shadow-card: 0 4px 18px rgba(23, 58, 102, 0.09);
  --shadow-lift: 0 16px 44px rgba(23, 58, 102, 0.2);
  --paper: #f1f4f9;

  --type-g: #0d9f6e; --type-d: #1d7fd6; --type-c: #0e9488;
  --type-z: #d43d3d; --type-t: #ea6a12; --type-k: #7b4fd0;
  --type-y: #d63f8f; --type-o: #64748b; --type-h: #d9900a;

  /* 铁路老官方字体：车次、图号、票样、站牌 */
  --font-rail: "STZhongsong", "华文中宋", "SimSun", "Songti SC", serif;

  --ease: cubic-bezier(0.22, 0.7, 0.3, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(1100px 520px at 85% -8%, rgba(86, 165, 235, 0.2), transparent 62%),
    radial-gradient(900px 460px at -10% 12%, rgba(240, 160, 32, 0.1), transparent 60%),
    var(--bg);
  color: var(--ink);
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", "Source Han Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}

::selection { background: rgba(28, 111, 201, 0.22); }

/* ------- 滚动条 ------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(28, 111, 201, 0.25); border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(28, 111, 201, 0.5); }

/* ------- 背景装饰（细点阵 + 真实铁路网地图） ------- */
.bg-decor { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.bg-map {
  position: absolute; right: -5%; top: 5%;
  width: min(1200px, 62vw); height: auto;
  opacity: 0.15;
  filter: grayscale(0.3) contrast(1.02);
  border-radius: 28px;
  box-shadow: 0 0 120px rgba(28, 111, 201, 0.12);
  transform: rotate(2deg);
}
.bg-grid {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(28, 111, 201, 0.12) 1.1px, transparent 1.1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(ellipse 95% 80% at 50% 0%, #000 25%, transparent 85%);
  -webkit-mask-image: radial-gradient(ellipse 95% 80% at 50% 0%, #000 25%, transparent 85%);
}
.bg-orb { position: absolute; border-radius: 50%; filter: blur(80px); }
.bg-orb-1 { width: 460px; height: 460px; top: -140px; left: -120px; background: radial-gradient(circle, rgba(28, 111, 201, 0.16), transparent 70%); }
.bg-orb-2 { width: 520px; height: 520px; top: 5%; right: -180px; background: radial-gradient(circle, rgba(240, 160, 32, 0.12), transparent 70%); }

/* ======= 顶栏 ======= */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 4px 18px rgba(23, 58, 102, 0.05);
}
.header-inner {
  max-width: 1280px; margin: 0 auto; padding: 11px 22px;
  display: flex; align-items: center; gap: 26px;
}
.brand { display: flex; align-items: center; gap: 13px; min-width: 0; }
.brand-logo-img {
  width: 46px; height: 46px; flex: 0 0 auto;
  border-radius: 50%; object-fit: cover;
  border: 2.5px solid #fff;
  outline: 2px solid var(--blue);
  box-shadow: 0 4px 14px rgba(28, 111, 201, 0.3);
  background: #fff;
}
.brand-text h1 {
  margin: 0; font-size: 18px; font-weight: 800; letter-spacing: 0.02em; color: var(--blue-deep);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.brand-text p { margin: 2px 0 0; font-size: 12px; color: var(--ink-faint); letter-spacing: 0.12em; white-space: nowrap; }

.search-box { margin-left: auto; position: relative; width: min(420px, 46vw); min-width: 200px; }
.search-box .search-icon { position: absolute; left: 14px; top: 50%; translate: 0 -50%; color: var(--ink-faint); pointer-events: none; }
#searchInput {
  width: 100%; padding: 10px 38px 10px 40px;
  border-radius: 999px;
  border: 1.5px solid var(--line-strong);
  background: #fff;
  color: var(--ink); font-size: 14px; font-family: inherit;
  outline: none;
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
#searchInput::placeholder { color: var(--ink-faint); }
#searchInput:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px rgba(28, 111, 201, 0.14);
}
.search-clear {
  position: absolute; right: 9px; top: 50%; translate: 0 -50%;
  width: 24px; height: 24px; border: none; border-radius: 50%;
  background: rgba(28, 111, 201, 0.12); color: var(--ink-dim);
  font-size: 15px; line-height: 1; cursor: pointer;
  display: grid; place-items: center;
  transition: background 0.2s, color 0.2s;
}
.search-clear:hover { background: var(--blue); color: #fff; }

/* ======= Hero ======= */
.hero {
  padding: 46px 22px 0;
  background:
    radial-gradient(600px 300px at 75% 0%, rgba(255, 255, 255, 0.9), transparent 70%),
    linear-gradient(180deg, #eaf4fe 0%, rgba(234, 244, 254, 0) 78%);
}
.hero-date {
  max-width: 1280px; margin: 0 auto 6px; padding: 0 24px;
  text-align: center;
  font-size: 13px; color: var(--ink-faint); letter-spacing: 0.16em;
}
.hero-date::before { content: "— "; opacity: .7; }
.hero-date::after { content: " —"; opacity: .7; }
.hero-inner { max-width: 1280px; margin: 0 auto; display: flex; gap: 48px; align-items: center; }
.hero-left { flex: 1 1 0; min-width: 0; }
.hero-right { flex: 0 0 440px; display: flex; flex-direction: column; align-items: center; gap: 16px; }

/* 站牌 */
.hero-signs { display: flex; gap: 12px; }
.sign {
  font-family: var(--font-rail);
  font-size: 15px; font-weight: 800; letter-spacing: 0.18em;
  color: #fff; background: linear-gradient(135deg, var(--blue-deep), #1d4e8f);
  padding: 7px 18px 7px 16px; border-radius: 999px;
  box-shadow: 0 5px 14px rgba(18, 58, 107, 0.28);
  white-space: nowrap;
}
.sign::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 3px rgba(240, 160, 32, 0.35); margin-right: 9px; vertical-align: 1px; }

.hero-tagline { display: flex; align-items: center; gap: 11px; }
.hero-line { width: 46px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--blue), rgba(28, 111, 201, 0.2)); }
.hero-logo { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; border: 2px solid #fff; outline: 1.5px solid var(--blue); box-shadow: 0 3px 10px rgba(28, 111, 201, 0.3); }
.hero-label { font-size: 12px; letter-spacing: 0.28em; color: var(--blue); font-weight: 700; }

.hero-title {
  margin: 18px 0 12px;
  font-size: clamp(30px, 5vw, 48px);
  font-weight: 900; letter-spacing: 0.02em; line-height: 1.22; color: var(--blue-deep);
}
.hero-title em { font-style: normal; color: var(--blue); }
.hero-desc { margin: 0; color: var(--ink-dim); font-size: clamp(14px, 1.6vw, 16px); line-height: 1.9; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.stat-chip {
  display: inline-flex; align-items: baseline; gap: 8px;
  padding: 8px 16px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-card);
  font-size: 13px; color: var(--ink-dim);
}
.stat-chip b { font-size: 18px; font-weight: 800; color: var(--blue); }

/* 火车票小卡片 */
.hero-ticket {
  width: 400px; background: #fff; border-radius: 16px;
  box-shadow: 0 18px 44px rgba(23, 58, 102, 0.22);
  border: 1px solid rgba(28, 111, 201, 0.2);
  overflow: hidden;
  position: relative;
}
.hero-ticket::before, .hero-ticket::after {
  content: ""; position: absolute; left: 50%; translate: -50% 0;
  width: 28px; height: 28px; border-radius: 50%; background: var(--bg);
  box-shadow: inset 0 2px 4px rgba(23, 58, 102, 0.14);
}
.hero-ticket::before { top: -14px; }
.hero-ticket::after { bottom: -14px; }
.ticket-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 18px 11px 16px;
  background: linear-gradient(90deg, var(--blue), #3a8fdd);
  color: #fff;
}
.ticket-head .t12306 {
  height: 34px; width: auto; border-radius: 6px; flex: 0 0 auto;
}
.ticket-head .t-sub { font-size: 13px; opacity: 0.96; letter-spacing: 0.08em; }
.ticket-head .t-tel { margin-left: auto; font-size: 11.5px; opacity: 0.8; letter-spacing: 0.06em; }
.ticket-body { padding: 18px 18px 19px; }
.ticket-main { display: flex; align-items: center; gap: 20px; }
.ticket-left { flex: 1 1 0; min-width: 0; }
.ticket-route { display: flex; align-items: center; gap: 10px; white-space: nowrap; }
.ticket-station { font-size: 24px; font-weight: 900; color: var(--blue-deep); font-family: var(--font-rail); min-width: 0; }
.ticket-arrow { flex: 1 1 auto; display: flex; align-items: center; gap: 6px; min-width: 40px; }
.ticket-arrow i { flex: 1 1 0; border-top: 2px dashed rgba(28, 111, 201, 0.45); }
.ticket-arrow b { color: var(--blue); font-size: 12px; }
.ticket-train {
  display: flex; align-items: baseline; gap: 10px;
  margin-top: 14px; padding-top: 12px;
  border-top: 1px dashed var(--line-strong);
}
.ticket-no { font-size: 27px; font-weight: 900; color: var(--blue); letter-spacing: 0.06em; font-family: var(--font-rail); }
.ticket-type { font-size: 13.5px; color: var(--ink-dim); letter-spacing: 0.04em; font-family: var(--font-rail); }
.ticket-meta {
  display: flex; justify-content: space-between;
  margin-top: 8px; font-size: 12.5px; color: var(--ink-faint); letter-spacing: 0.06em;
}
.ticket-meta span:first-child::before { content: "● "; color: var(--amber); font-size: 8px; vertical-align: 1px; }
.ticket-qr { flex: 0 0 auto; }
.ticket-qr img { display: block; width: 78px; height: 78px; border-radius: 8px; border: 1px solid var(--line); background: #fff; object-fit: contain; }
.hero-footnote { font-size: 13px; color: var(--ink-faint); letter-spacing: 0.32em; margin-top: 2px; }

/* 真实列车照片横幅 */
.hero-train-wrap { max-width: 1280px; margin: 30px auto 0; padding: 0 24px; }
.hero-train-photo {
  display: block; width: 100%; height: auto;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(23, 58, 102, 0.22);
  border: 1px solid rgba(28, 111, 201, 0.18);
  background: #fff;
}
.hero-train-tag { display: block; margin-top: 7px; font-size: 11px; color: var(--ink-faint); letter-spacing: 0.04em; }

/* 铁轨装饰 */
.hero-rails { position: relative; height: 34px; margin-top: 34px; }
.hero-rails::before, .hero-rails::after {
  content: ""; position: absolute; left: 0; right: 0; height: 3.5px; border-radius: 3px;
  background: linear-gradient(90deg, rgba(120, 150, 185, 0.55), rgba(120, 150, 185, 0.25));
}
.hero-rails::before { top: 9px; }
.hero-rails::after { top: 24px; }
.hero-rails .ties {
  position: absolute; inset: 0;
  background: repeating-linear-gradient(90deg, rgba(110, 140, 175, 0.28) 0 9px, transparent 9px 64px);
}

/* ======= 筛选栏 ======= */
.filter-bar {
  position: sticky; top: var(--header-h, 69px); z-index: 40;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(16px) saturate(1.3);
  -webkit-backdrop-filter: blur(16px) saturate(1.3);
  border-top: 1px solid rgba(28, 111, 201, 0.08);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 6px 20px rgba(23, 58, 102, 0.06);
}
.filter-inner { max-width: 1680px; margin: 0 auto; padding: 10px 24px 12px; }

/* 分级筛选：分类(1级) / 路局(2级) / 车型(3级) */
.filter-level { display: flex; align-items: flex-start; gap: 16px; padding: 6px 0; flex-wrap: wrap; }
.filter-level + .filter-level { border-top: 1px dashed rgba(28, 111, 201, 0.2); margin-top: 6px; padding-top: 8px; }
.flabel {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 7px;
  font-size: 15px; font-weight: 800; letter-spacing: 0.14em; color: var(--blue-strong);
  padding-top: 13px; user-select: none;
}
.flabel::before {
  content: ""; width: 4px; height: 16px; border-radius: 2px;
  background: linear-gradient(180deg, var(--blue), rgba(28, 111, 201, 0.35));
}
/* 一级“分类”：两个大按钮一左一右 */
.filter-lv1 { justify-content: space-between; }
/* 二级“路局”：标识放大 */
#groupLevel .flabel { font-size: 17px; padding-top: 12px; color: var(--blue-deep); }
#groupLevel .flabel::before { background: linear-gradient(180deg, #2e9e6b, rgba(46, 158, 107, 0.35)); }

.filter-bottom {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin-top: 10px; flex-wrap: wrap;
}
.filter-meta { font-size: 12.5px; color: var(--ink-faint); letter-spacing: 0.05em; }
.filter-meta b { color: var(--blue); font-weight: 700; }

/* 一级分类：两个超大方形按钮，一左一右醒目布局（带作品底图） */
.cat-tiles { display: flex; width: 100%; gap: 24px; }
.cat-tile {
  appearance: none; cursor: pointer;
  flex: 1 1 0; min-width: 0;
  min-height: 168px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  border-radius: 24px;
  border: 2.5px solid rgba(28, 111, 201, 0.55);
  background-color: #fff;
  background-size: cover; background-position: center;
  /* 底图不铺到边框底下，避免透过半透明边框露出来 */
  background-clip: padding-box;
  color: var(--blue-strong);
  font-family: inherit;
  box-shadow: var(--shadow-card);
  transition: all 0.28s var(--ease);
  padding: 18px 22px;
  position: relative;
  overflow: hidden;
}
.cat-tile::before {
  content: ""; position: absolute; inset: 0;
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(1px);
  transition: background 0.28s var(--ease);
}
.cat-tile:hover { transform: translateY(-4px); border-color: var(--blue); box-shadow: var(--shadow-lift); }
.cat-tile:hover::before { background: rgba(255, 255, 255, 0.7); }
.cat-tile.active {
  color: #fff; border-color: var(--blue);
  box-shadow: 0 14px 34px rgba(28, 111, 201, 0.42);
}
.cat-tile.active::before { background: linear-gradient(145deg, rgba(28, 111, 201, 0.8), rgba(58, 143, 221, 0.64)); }
.cat-tile > * { position: relative; z-index: 1; }
.cat-tile .tile-icon { line-height: 1; }
.cat-tile .tile-name {
  font-size: 17px; font-weight: 800; letter-spacing: 0.05em;
  line-height: 1.5; text-align: center;
  white-space: normal; word-break: break-all;
  max-width: 100%;
}
.cat-tile .tile-count { font-size: 13px; opacity: 0.85; letter-spacing: 0.1em; }

.sort-box { display: flex; align-items: center; gap: 10px; }
.sort-label { font-size: 13.5px; color: var(--ink-faint); letter-spacing: 0.08em; }
#sortSelect {
  appearance: none; padding: 9px 34px 9px 16px;
  border-radius: 12px; border: 1.5px solid var(--line-strong);
  background: #fff url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2355677c' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 14px center;
  color: var(--ink); font-size: 13.5px; font-family: inherit; cursor: pointer; outline: none;
  transition: border-color 0.25s;
}
#sortSelect:focus { border-color: var(--blue); }

.type-chips { display: flex; gap: 10px; flex-wrap: wrap; }
.type-chips[hidden] { display: none; }
.chip {
  appearance: none; border: 1.5px solid var(--line); background: #fff;
  color: var(--ink-dim); padding: 8px 18px; border-radius: 999px;
  font-size: 13.5px; font-weight: 600; font-family: inherit; cursor: pointer;
  display: inline-flex; align-items: center; gap: 7px;
  transition: all 0.25s var(--ease);
}
.chip .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.chip:hover { color: var(--ink); border-color: var(--line-strong); transform: translateY(-1px); }
.chip.active { background: var(--tc, var(--type-o)); border-color: transparent; color: #fff; box-shadow: 0 4px 12px color-mix(in srgb, var(--tc, #64748b) 40%, transparent); }

/* 二级分类（路局） */
.group-pills { display: flex; gap: 10px; flex-wrap: wrap; }
.group-pills[hidden] { display: none; }
.gp-pill {
  appearance: none; border: 1.5px dashed var(--line-strong);
  background: var(--blue-soft); color: var(--blue-strong);
  padding: 8px 18px; border-radius: 999px;
  font-size: 13.5px; font-weight: 700; font-family: inherit; cursor: pointer; letter-spacing: 0.03em;
  transition: all 0.25s var(--ease);
}
.gp-pill:hover { border-style: solid; transform: translateY(-1px); }
.gp-pill.active {
  background: var(--blue-deep); color: #fff; border: 1.5px solid var(--blue-deep);
  box-shadow: 0 4px 12px rgba(18, 58, 107, 0.35);
}
.gp-pill .pill-count { font-size: 11.5px; opacity: 0.75; margin-left: 5px; }

/* ======= 画廊 ======= */
.gallery { max-width: 1680px; margin: 0 auto; padding: 30px 24px 60px; }

.section { margin-bottom: 48px; }
.section-head { display: flex; align-items: center; gap: 13px; margin: 0 0 22px; }
.section-badge {
  width: 38px; height: 38px; flex: 0 0 auto;
  display: grid; place-items: center;
  border-radius: 12px;
  background: linear-gradient(145deg, var(--blue), #3a8fdd);
  color: #fff;
  box-shadow: 0 6px 16px rgba(28, 111, 201, 0.32);
}
.section-badge svg { display: block; }
.section-title { margin: 0; font-size: 19px; font-weight: 800; letter-spacing: 0.03em; color: var(--blue-deep); }
.section-sub { margin: 2px 0 0; font-size: 12.5px; color: var(--ink-faint); }
.section-count { margin-left: auto; font-size: 12.5px; color: var(--blue-strong); background: var(--blue-soft); border: 1px solid var(--line); padding: 4px 13px; border-radius: 999px; letter-spacing: 0.06em; font-weight: 600; }

/* ------- 局组（站牌样式 + 双栏，模拟总览表） ------- */
.group-grid { display: flex; gap: 32px; flex-wrap: wrap; align-items: flex-start; }
.group-col { flex: 1 1 0; min-width: 320px; }
.group-head { margin: 0 0 16px; display: flex; align-items: center; gap: 10px; }
.group-head h4 {
  margin: 0; font-size: 14px; font-weight: 800; letter-spacing: 0.08em;
  color: #fff; background: linear-gradient(135deg, var(--blue-deep), #1d4e8f);
  padding: 7px 16px 7px 14px; border-radius: 999px;
  display: inline-flex; align-items: center; gap: 8px;
  box-shadow: 0 5px 14px rgba(18, 58, 107, 0.28);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%;
  font-family: var(--font-rail);
}
.group-head h4::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%;
  background: var(--amber); box-shadow: 0 0 0 3px rgba(240, 160, 32, 0.35);
  flex: 0 0 auto;
}
.group-count { font-size: 11.5px; color: var(--ink-faint); letter-spacing: 0.06em; }

.masonry { display: flex; flex-wrap: wrap; gap: 18px; align-content: flex-start; }
.masonry-col { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 18px; }

/* ------- 卡片 ------- */
.card {
  position: relative; width: 100%;
  border-radius: 14px; overflow: hidden;
  background: var(--card);
  border: 1px solid rgba(28, 111, 201, 0.12);
  cursor: zoom-in;
  box-shadow: var(--shadow-card);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
  animation: card-in 0.55s var(--ease) both;
  animation-delay: var(--d, 0ms);
}
@keyframes card-in {
  from { opacity: 0; transform: translateY(16px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}
.card:hover {
  transform: translateY(-6px);
  border-color: var(--blue);
  box-shadow: var(--shadow-lift);
}
.card:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

.card-media { position: relative; background: var(--paper); overflow: hidden; }
.card-media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(13, 38, 74, 0.18));
  opacity: 0; transition: opacity 0.35s; pointer-events: none;
}
.card:hover .card-media::after { opacity: 1; }
.card-media img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: contain; opacity: 0;
  transition: opacity 0.5s ease, transform 0.6s var(--ease);
}
.card-media img.loaded { opacity: 1; }
.card:hover .card-media img { transform: scale(1.04); }

.card-badges { position: absolute; top: 10px; left: 10px; right: 10px; display: flex; gap: 6px; pointer-events: none; align-items: flex-start; }
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: 999px;
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.04em;
  box-shadow: 0 2px 8px rgba(13, 38, 74, 0.2);
}
.badge.bl-badge {
  font-size: 15px; letter-spacing: 0.06em;
  background: linear-gradient(135deg, var(--blue-deep), #1d4e8f);
  color: #fff; padding: 6px 15px;
  border: 1.5px solid rgba(255, 255, 255, 0.65);
  font-family: var(--font-rail);
}
.badge.soft { background: rgba(255, 255, 255, 0.92); color: var(--blue-strong); border: 1px solid var(--line-strong); }
.badge.multi { margin-left: auto; background: rgba(255, 255, 255, 0.92); color: var(--ink-dim); border: 1px solid var(--line); }

.card-open {
  position: absolute; right: 12px; bottom: 12px; z-index: 2;
  width: 40px; height: 40px; border: none; border-radius: 12px;
  background: var(--blue); color: #fff;
  display: grid; place-items: center; cursor: zoom-in;
  opacity: 0; transform: translateY(8px);
  transition: all 0.3s var(--ease);
  box-shadow: 0 8px 20px rgba(28, 111, 201, 0.4);
}
.card:hover .card-open { opacity: 1; transform: none; }
.card-open:hover { background: var(--blue-strong); transform: translateY(-2px) !important; }

.card-info { padding: 14px 16px 15px; }
.card-code { font-size: 17px; font-weight: 800; letter-spacing: 0.02em; color: var(--ink); display: flex; align-items: center; gap: 9px; font-family: var(--font-rail); }
.card-code .code-type { font-size: 11.5px; font-weight: 700; padding: 3px 10px; border-radius: 7px; background: color-mix(in srgb, var(--tc, #64748b) 16%, transparent); color: var(--tc, var(--ink-dim)); letter-spacing: 0.1em; font-family: var(--font-rail); }
.card-title { margin-top: 4px; font-size: 15px; color: var(--ink-dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--font-rail); }
.card-sub { margin-top: 3px; font-size: 13px; color: var(--amber); font-weight: 600; }
.card-meta { display: flex; gap: 9px; margin-top: 11px; flex-wrap: nowrap; overflow: hidden; }
.tag {
  font-size: 12.5px; color: var(--ink-dim); letter-spacing: 0.04em;
  padding: 3.5px 11px; border-radius: 999px; white-space: nowrap;
  border: 1px solid var(--line); background: var(--bg-soft);
}
.tag.bl-tag { color: var(--blue-strong); border-color: rgba(28, 111, 201, 0.4); background: var(--blue-soft); font-weight: 700; }

/* ------- 空状态 ------- */
.empty-state { text-align: center; padding: 90px 20px; color: var(--ink-faint); }
.empty-state svg { opacity: 0.5; margin-bottom: 14px; color: var(--blue); }
.empty-title { font-size: 17px; font-weight: 700; color: var(--ink-dim); margin: 0 0 6px; }
.empty-sub { font-size: 13px; margin: 0; }

/* ======= 页脚 ======= */
.site-footer { border-top: 1px solid var(--line); background: rgba(255, 255, 255, 0.7); }
.footer-inner {
  max-width: 1680px; margin: 0 auto; padding: 26px 24px 32px;
  display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  align-items: flex-start;
}
.footer-brand { display: flex; flex-direction: column; gap: 4px; }
.footer-brand strong { font-size: 14.5px; letter-spacing: 0.04em; color: var(--blue-deep); }
.footer-brand span, .footer-note p { margin: 0; font-size: 12.5px; color: var(--ink-faint); }
.footer-note { text-align: right; }
.footer-note code { background: var(--blue-soft); padding: 1.5px 7px; border-radius: 6px; font-size: 12px; color: var(--blue-strong); }

/* ======= 大图查看器（明亮风格） ======= */
.lightbox { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; }
.lightbox[hidden] { display: none; }
.lb-backdrop {
  position: absolute; inset: 0;
  background: rgba(240, 245, 251, 0.94);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  opacity: 0; transition: opacity 0.3s ease;
}
.lightbox.open .lb-backdrop { opacity: 1; }

.lb-top {
  position: relative; z-index: 3;
  display: flex; align-items: center; gap: 16px;
  padding: 13px 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.75));
  border-bottom: 1px solid var(--line);
}
.lb-info { min-width: 0; }
.lb-code { font-size: 17px; font-weight: 800; color: var(--blue-deep); display: flex; align-items: center; gap: 10px; font-family: var(--font-rail); }
.lb-code .lb-type { font-size: 11px; padding: 2px 9px; border-radius: 6px; background: var(--blue-soft); color: var(--blue-strong); letter-spacing: 0.1em; font-weight: 700; font-family: var(--font-rail); }
.lb-route { font-size: 13.5px; color: var(--ink-dim); margin-top: 2px; font-family: var(--font-rail); }
.lb-meta { font-size: 11.5px; color: var(--ink-faint); margin-top: 2px; letter-spacing: 0.05em; }
.lb-tools { margin-left: auto; display: flex; gap: 8px; }
.lb-btn {
  width: 40px; height: 40px; border-radius: 12px;
  border: 1px solid var(--line-strong);
  background: #fff; color: var(--ink-dim);
  display: grid; place-items: center; cursor: pointer;
  transition: all 0.22s var(--ease);
  box-shadow: var(--shadow-card);
}
.lb-btn:hover { color: #fff; background: var(--blue); border-color: var(--blue); transform: translateY(-1px); }
.lb-btn.lb-close:hover { background: #d43d3d; border-color: #d43d3d; color: #fff; }
.lb-btn[disabled] { opacity: 0.35; pointer-events: none; }

.lb-count {
  position: absolute; top: 14px; left: 50%; translate: -50% 0; z-index: 3;
  font-size: 12px; letter-spacing: 0.14em; color: var(--ink-faint);
  background: rgba(255, 255, 255, 0.9); border: 1px solid var(--line);
  padding: 5px 14px; border-radius: 999px;
}

.lb-stage { position: relative; z-index: 1; flex: 1; min-height: 0; overflow: hidden; cursor: grab; touch-action: none; }
.lb-stage.panning { cursor: grabbing; }
.lb-canvas { position: absolute; inset: 0; will-change: transform; }
.lb-canvas img {
  position: absolute; left: 0; top: 0;
  user-select: none; -webkit-user-drag: none;
  box-shadow: 0 20px 60px rgba(23, 58, 102, 0.28);
  background: #fff;
  will-change: transform;
  opacity: 0; transition: opacity 0.3s ease;
}
.lb-canvas img.show { opacity: 1; }
.lb-loading {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px;
  color: var(--ink-faint); font-size: 13px; letter-spacing: 0.1em;
}
.lb-loading[hidden] { display: none; }
.spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid rgba(28, 111, 201, 0.2); border-top-color: var(--blue);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.lb-nav {
  position: absolute; top: 50%; translate: 0 -50%; z-index: 3;
  width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.92); color: var(--ink-dim);
  display: grid; place-items: center; cursor: pointer;
  box-shadow: var(--shadow-card);
  transition: all 0.25s var(--ease);
}
.lb-nav:hover { color: #fff; background: var(--blue); border-color: var(--blue); transform: translate(0, -50%) scale(1.08); }
.lb-prev { left: 22px; }
.lb-next { right: 22px; }
.lb-nav[hidden] { display: none; }

.lb-strip {
  position: relative; z-index: 3;
  display: flex; gap: 10px; overflow-x: auto;
  padding: 13px 22px 16px;
  background: linear-gradient(0deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.8));
  border-top: 1px solid var(--line);
}
.lb-strip:empty { display: none; }
.lb-strip-item {
  flex: 0 0 auto; width: 88px; height: 62px;
  border-radius: 10px; overflow: hidden;
  border: 2px solid transparent; padding: 0; cursor: pointer;
  background: var(--paper); opacity: 0.7;
  transition: all 0.25s var(--ease);
  box-shadow: var(--shadow-card);
}
.lb-strip-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lb-strip-item:hover { opacity: 1; transform: translateY(-2px); }
.lb-strip-item.active { border-color: var(--blue); opacity: 1; box-shadow: 0 0 0 3px rgba(28, 111, 201, 0.25); }

/* ------- 响应式 ------- */
@media (max-width: 900px) {
  .hero-right { display: none; }
}
@media (max-width: 760px) {
  .header-inner { flex-wrap: wrap; gap: 12px; }
  .search-box { margin-left: 0; width: 100%; }
  .brand-text p { display: none; }
  .sort-box { margin-left: 0; width: 100%; }
  .lb-count { display: none; }
  .lb-prev { left: 8px; } .lb-next { right: 8px; }
  .lb-nav { width: 44px; height: 44px; }
  .lb-tools .lb-btn { width: 36px; height: 36px; }
  .lb-strip-item { width: 70px; height: 50px; }
  .group-col { min-width: 0; }
}

/* ------- 减少动效 ------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  html { scroll-behavior: auto; }
}
