/* ==========================================================================
   红色博物馆 · 云上观展导航  样式表
   设计基调：庄重红博风 —— 米白纸面 + 正红主色 + 烫金点缀 + 细腻分隔线
   ========================================================================== */
:root {
  /* 主色 */
  --red: #b8232f;
  --red-deep: #8e1a24;
  --red-bright: #d8333f;
  --red-soft: #fdeceb;
  --red-line: #e8b4ae;
  --gold: #a8811a;
  --gold-soft: #fff6e5;
  --gold-line: #f0dfb8;

  /* 深红版面：顶栏 / 首屏 / 页脚共用同一块红幕 */
  --red-900: #7c151d;
  --red-850: #8a1821;
  --red-950: #5e1017;
  --gold-bright: #f0d28c;
  --gold-hair: rgba(240, 210, 140, .42);
  /* 极细斜纹 + 细颗粒：让红面有织物感，不是一片纯色渐变 */
  --tex-weave: repeating-linear-gradient(115deg,
      rgba(255, 255, 255, .05) 0 1px, rgba(255, 255, 255, 0) 1px 9px);
  --tex-noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
  --tex-star: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 2l2.6 5.3 5.9.86-4.25 4.15 1 5.86L12 15.4l-5.25 2.77 1-5.86L3.5 8.16l5.9-.86z' fill='%23fff' fill-opacity='.11'/%3E%3C/svg%3E");

  /* 中性色 */
  --ink: #1f2328;
  --ink-2: #4a5058;
  --ink-3: #7b828c;
  --ink-4: #a8aeb6;
  --bg: #f8f3ec;
  --bg-2: #f3ece2;
  --card: #ffffff;
  --line: #e9dfd2;
  --line-2: #f2ebe1;

  /* 语义色 */
  --blue: #2c5f8a;
  --blue-soft: #eef4fa;
  --green: #2f6f4f;
  --green-soft: #eef6f1;
  --purple: #6b3fa0;
  --purple-soft: #f5eefb;

  --shadow-1: 0 1px 2px rgba(31, 35, 40, .05), 0 2px 8px rgba(31, 35, 40, .05);
  --shadow-2: 0 4px 12px rgba(31, 35, 40, .09), 0 12px 32px rgba(31, 35, 40, .09);
  --radius: 10px;
  --radius-sm: 6px;
  --maxw: 1240px;
  --font: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
          "Source Han Sans SC", "Noto Sans CJK SC", "Hiragino Sans GB", sans-serif;
  --mono: "SFMono-Regular", Consolas, Menlo, monospace;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  /* 暖纸底 + 顶部一片红晕，让红幕与内容区自然接续 */
  background-color: var(--bg);
  background-image:
    radial-gradient(1000px 380px at 50% -120px, rgba(154, 32, 41, .11), rgba(154, 32, 41, 0) 72%),
    linear-gradient(180deg, #f8f2ea 0%, #f6efe6 52%, #f2eadf 100%);
  background-repeat: no-repeat;
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; }
img { display: block; }

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

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  background: var(--red); color: #fff; padding: 10px 16px; border-radius: 0 0 6px 0;
}
.skip:focus { left: 0; }

/* ============================ 顶部 ============================ */
.topbar {
  position: sticky; top: 0; z-index: 60;
  background-color: var(--red-900);
  background-image: var(--tex-weave), linear-gradient(180deg, var(--red-850) 0%, var(--red-900) 100%);
  color: #fff;
}
/* 滚过首屏后才加投影：红幕未走完时加投影会在红面上留一条接缝 */
.is-stuck .topbar { box-shadow: 0 8px 22px rgba(48, 8, 12, .22); }
.topbar::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: var(--tex-noise);
  mix-blend-mode: overlay;
}
.topbar-in {
  position: relative; z-index: 1;
  max-width: var(--maxw); margin: 0 auto; padding: 9px 22px;
  display: flex; align-items: center; gap: 14px;
}
.brand { display: flex; align-items: center; gap: 11px; flex-shrink: 0; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 8px; flex-shrink: 0;
  background: linear-gradient(145deg, #f7e2ab, #d9ac4a);
  display: grid; place-items: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .22);
}
.brand-mark svg { width: 21px; height: 21px; fill: var(--red-deep); }
.brand-txt b { display: block; font-size: 15.5px; letter-spacing: .3px; line-height: 1.25; color: #fff; }
/* 英文副标题会让品牌块宽 70px 且带模板味，顶栏一行要放下导航与搜索，收起不用 */
.brand-txt span { display: none; }

.topnav {
  margin-left: auto; display: flex; align-items: center; gap: 4px;
  min-width: 0; overflow-x: auto; scrollbar-width: none;
}
.topnav::-webkit-scrollbar { height: 0; }
.topnav a {
  font-size: 13px; padding: 7px 10px; border-radius: 7px; color: rgba(255, 255, 255, .84);
  white-space: nowrap; transition: background .15s, color .15s;
}
.topnav a:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.topnav a.is-active { background: var(--gold-bright); color: #6a1015; font-weight: 600; }
/* 导航位置不够、可横向滑动时，右缘渐隐（JS 实测溢出后才加这个类） */
.nav-overflow .topnav {
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 26px), transparent 100%);
  mask-image: linear-gradient(90deg, #000 calc(100% - 26px), transparent 100%);
}

/* 搜索框：顶栏右上 */
.topsearch { flex: 0 1 300px; min-width: 150px; }

/* ============================ 首屏 ============================ */
.hero {
  position: relative; overflow: hidden;
  background-color: var(--red-900);
  background-image: var(--tex-weave), linear-gradient(180deg, var(--red-900) 0%, #8f1b24 42%, var(--red-950) 100%);
  color: #fff;
  border-bottom: 1px solid var(--gold-hair);
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: var(--tex-noise);
  mix-blend-mode: overlay;
}
/* 右侧五角星水印 + 左上烫金光晕，顶部渐隐，所以与顶栏之间看不到接缝 */
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    var(--tex-star),
    radial-gradient(760px 250px at 12% 4%, rgba(240, 210, 140, .20), rgba(240, 210, 140, 0) 70%);
  background-repeat: no-repeat;
  background-position: right -64px top -74px, left top;
  background-size: 400px 400px, 100% 100%;
  -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 36px);
  mask-image: linear-gradient(180deg, transparent 0, #000 36px);
}
/* 注意：这里必须写全左右内边距 —— 用 padding 简写会把 .wrap 的 22px 清成 0，
   首屏内容就会比顶栏、卡片区左移 22px */
.hero-in { padding: 32px 22px; position: relative; z-index: 1; }
.eyebrow {
  display: inline-block; font-size: 12px; letter-spacing: 3px; color: var(--gold-bright);
  border: 1px solid rgba(240, 210, 140, .45); background: rgba(0, 0, 0, .18);
  padding: 3px 12px; border-radius: 2px; margin-bottom: 15px;
}
.hero h1 {
  font-size: 35px; line-height: 1.28; margin: 0 0 12px; letter-spacing: .5px; font-weight: 700;
  color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .16);
  text-wrap: balance;   /* 换行时避免末行只剩一个字 */
}
.hero h1 em { font-style: normal; color: var(--gold-bright); }
.hero p.lead {
  margin: 0; color: rgba(255, 255, 255, .78); font-size: 15px; max-width: 720px;
  text-wrap: pretty;
}
.hero p.lead b { color: #fff; }

/* 搜索框（深色底上的玻璃质感） */
.searchbox {
  flex: 1; display: flex; align-items: center; gap: 9px; width: 100%;
  background: rgba(255, 255, 255, .13);
  border: 1px solid rgba(255, 255, 255, .26);
  border-radius: 8px; padding: 0 12px;
  transition: background .15s, border-color .15s, box-shadow .15s;
}
.searchbox:hover { background: rgba(255, 255, 255, .17); }
.searchbox:focus-within {
  background: rgba(255, 255, 255, .22);
  border-color: rgba(240, 210, 140, .78);
  box-shadow: 0 0 0 3px rgba(240, 210, 140, .18);
}
.searchbox svg { width: 16px; height: 16px; fill: rgba(255, 255, 255, .72); flex-shrink: 0; }
.searchbox input {
  flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
  font-size: 14.5px; padding: 9px 0; color: #fff; font-family: inherit;
}
.searchbox input::placeholder { color: rgba(255, 255, 255, .6); }
.searchbox kbd {
  font-family: var(--mono); font-size: 11px; color: rgba(255, 255, 255, .7);
  border: 1px solid rgba(255, 255, 255, .3); border-bottom-width: 2px; border-radius: 4px;
  padding: 1px 6px; background: rgba(0, 0, 0, .18); flex-shrink: 0;
}
.btn-clear {
  border: 0; background: transparent; color: rgba(255, 255, 255, .68); font-size: 18px;
  padding: 0 4px; line-height: 1; display: none;
}
.btn-clear:hover { color: #fff; }
.btn-clear.show { display: block; }

/* ============================ 筛选栏 ============================ */
.filterbar {
  position: sticky; top: var(--topbar-h, 57px); z-index: 50;
  background: rgba(247, 242, 235, .94);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.filterbar-in { padding: 11px 22px 12px; display: flex; flex-direction: column; gap: 8px; }

/* ---------- 云上观展合辑 ---------- */
.cloud-card {
  display: flex; flex-direction: column; gap: 4px; text-align: left;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 15px 17px; box-shadow: var(--shadow-1);
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}
.cloud-card:hover:not([disabled]) { transform: translateY(-2px); box-shadow: var(--shadow-2); border-color: var(--red-line); }
.cloud-card[disabled] { opacity: .5; cursor: not-allowed; }
.cloud-card .cc-key { font-size: 15.5px; font-weight: 700; color: var(--red); letter-spacing: .3px; }
.cloud-card .cc-type { font-size: 12.5px; color: var(--ink-2); }
.cloud-card .cc-n { font-size: 12px; color: var(--ink-3); margin-top: 3px; }

/* ---------- 筛选栏：控制行 + 可折叠的多维选项 ---------- */
.fctl { display: flex; align-items: center; gap: 9px; overflow-x: auto; padding-bottom: 1px; }
.fctl::-webkit-scrollbar { height: 4px; }
.fctl::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
.fctl-toggle {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  font-size: 13px; font-weight: 600; padding: 6px 12px; border-radius: 15px;
  transition: border-color .15s, color .15s, background .15s;
}
.fctl-toggle:hover { border-color: var(--red-line); color: var(--red); }
.fctl-toggle[aria-expanded="true"] { background: var(--red); border-color: var(--red); color: #fff; }
.fctl-toggle .ico-sliders { width: 15px; height: 15px; fill: currentColor; flex-shrink: 0; }
.fctl-toggle .ico-caret { width: 15px; height: 15px; fill: currentColor; transition: transform .2s ease; }
.fctl-toggle[aria-expanded="true"] .ico-caret { transform: rotate(180deg); }

.fsummary { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.fsummary .fchip {
  display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0;
  border: 1px solid var(--red-line); background: var(--red-soft); color: var(--red-deep);
  font-size: 12.5px; padding: 4px 6px 4px 11px; border-radius: 14px; white-space: nowrap;
}
.fsummary .fchip b { font-weight: 600; }
.fsummary .fchip .x {
  border: 0; background: transparent; color: var(--red); font-size: 15px;
  line-height: 1; padding: 0 3px; border-radius: 50%;
}
.fsummary .fchip .x:hover { background: rgba(184, 35, 47, .14); }
.fsummary .fnone { font-size: 12.5px; color: var(--ink-3); }
.fctl-reset { flex-shrink: 0; }

/* 折叠时的最大高度按内容收缩；展开时给足空间 */
.filterbar-rows {
  display: flex; flex-direction: column; gap: 8px;
  max-height: 0; opacity: 0; overflow: hidden;
  transition: max-height .26s ease, opacity .2s ease;
}
.filterbar-rows.is-open { max-height: 620px; opacity: 1; }

.frow { display: flex; align-items: center; gap: 9px; overflow-x: auto; padding-bottom: 2px; }
.frow::-webkit-scrollbar { height: 4px; }
.frow::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
.flabel {
  font-size: 12px; color: var(--ink-3); flex-shrink: 0; letter-spacing: .5px;
  min-width: 32px; padding-top: 1px;
}
.chip {
  flex-shrink: 0; border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  font-size: 12.5px; padding: 5px 12px; border-radius: 15px; white-space: nowrap;
  transition: all .15s; line-height: 1.5;
}
.chip:hover { border-color: var(--red-line); color: var(--red); }
.chip[aria-pressed="true"] { background: var(--red); border-color: var(--red); color: #fff; }
.chip .c { opacity: .6; margin-left: 4px; font-size: 11px; }

.resultbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 14px 0 0; font-size: 13px; color: var(--ink-3);
}
.resultbar b { color: var(--ink); font-weight: 600; }
.resultbar .spacer { margin-left: auto; }
.btn-reset {
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  font-size: 12.5px; padding: 5px 11px; border-radius: 6px;
}
.btn-reset:hover { border-color: var(--red-line); color: var(--red); }

/* ============================ 区块 ============================ */
section.block { margin-top: 40px; scroll-margin-top: calc(var(--topbar-h, 57px) + 64px); }
.block-head {
  display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap;
  margin-bottom: 6px; padding-bottom: 10px;
  /* 分隔线从红到金再淡出：内容区不铺红底，靠这条线把红幕续下来 */
  border-bottom: 0;
  background-image: linear-gradient(90deg,
      rgba(184, 35, 47, .5) 0, rgba(168, 129, 26, .28) 22%, rgba(184, 35, 47, .06) 62%, transparent 100%);
  background-repeat: no-repeat;
  background-position: left bottom;
  background-size: 100% 2px;
}
.block-head h2 {
  font-size: 20px; margin: 0; padding-left: 13px; border-left: 5px solid var(--red);
  line-height: 1.35; font-weight: 700;
}
.block-head .hint { font-size: 12.5px; color: var(--ink-3); }
.block-head .spacer { margin-left: auto; }
.block-head .era-no {
  font-family: var(--mono); font-size: 12px; color: var(--red);
  border: 1px solid var(--red-line); background: var(--red-soft);
  padding: 1px 7px; border-radius: 4px; letter-spacing: .5px;
}

/* ============================ 卡片网格 ============================ */
.grid {
  display: grid; gap: 18px; margin-top: 20px;
  grid-template-columns: repeat(auto-fill, minmax(288px, 1fr));
}
.grid.compact { grid-template-columns: repeat(auto-fill, minmax(252px, 1fr)); gap: 15px; }

.card {
  position: relative; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column;
  box-shadow: var(--shadow-1);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--red-line); }
.card.is-dead { opacity: .62; }
.card.is-dead:hover { transform: none; border-color: var(--line); }

.thumb {
  position: relative; aspect-ratio: 16 / 10; overflow: hidden;
  background: var(--bg-2); display: block;
  background-size: cover; background-position: center;
}
.thumb img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform .45s ease, opacity .35s ease;
  background: transparent;
}
/* 模糊占位：真实图未到位时先显示内联微缩图（放大后自然模糊），到位后淡入 */
.thumb.loading img { opacity: 0; }
.thumb:not(.loading) img { opacity: 1; }
.card:hover .thumb img { transform: scale(1.045); }
.thumb::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 46%;
  background: linear-gradient(transparent, rgba(20, 20, 22, .5));
  pointer-events: none;
}

/* 无预览图时的品牌占位图 */
.thumb.ph {
  display: grid; place-items: center; text-align: center; padding: 18px;
  background:
    radial-gradient(120% 90% at 50% 0%, rgba(255, 255, 255, .16), transparent 60%),
    linear-gradient(140deg, #a01c27, #6f1219);
}
.thumb.ph::after { display: none; }
.thumb.ph .ph-in { position: relative; z-index: 2; color: #fff; }
.thumb.ph .ph-seal {
  width: 44px; height: 44px; margin: 0 auto 9px; border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, .55); display: grid; place-items: center;
}
.thumb.ph .ph-seal svg { width: 23px; height: 23px; fill: rgba(255, 255, 255, .9); }
.thumb.ph .ph-venue { font-size: 14.5px; font-weight: 700; letter-spacing: .5px; line-height: 1.35; }
.thumb.ph .ph-type {
  font-size: 11.5px; color: rgba(255, 255, 255, .78); margin-top: 5px;
  letter-spacing: 1.5px;
}
.thumb.ph .ph-note {
  font-size: 10.5px; color: rgba(255, 255, 255, .6); margin-top: 9px;
  border-top: 1px solid rgba(255, 255, 255, .2); padding-top: 7px;
}

.badges { position: absolute; top: 9px; left: 9px; right: 9px; display: flex; gap: 6px; z-index: 3; }
.badges .right { margin-left: auto; display: flex; gap: 6px; }
.bdg {
  font-size: 11px; padding: 2.5px 8px; border-radius: 11px; white-space: nowrap;
  line-height: 1.55; font-weight: 600; backdrop-filter: blur(4px);
  border: 1px solid transparent;
}
.bdg-type { background: rgba(255, 255, 255, .93); color: var(--red-deep); }
.bdg-hd { background: rgba(255, 255, 255, .93); color: var(--purple); }
.bdg-ok { background: rgba(47, 111, 79, .94); color: #fff; }
.bdg-http { background: rgba(44, 95, 138, .95); color: #fff; }
.bdg-dead { background: rgba(74, 80, 88, .95); color: #fff; }

.card-body { padding: 13px 15px 15px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.card-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.venue { font-weight: 700; font-size: 15px; letter-spacing: .2px; }
.region {
  font-size: 11.5px; color: var(--ink-3); border: 1px solid var(--line);
  background: var(--bg-2); padding: 1px 8px; border-radius: 10px; white-space: nowrap;
}
.card-title { font-size: 13.5px; color: var(--ink-2); line-height: 1.6; flex: 1; }

.note {
  display: flex; gap: 7px; font-size: 12px; color: var(--ink-3);
  background: var(--bg-2); border-radius: var(--radius-sm); padding: 7px 10px;
  line-height: 1.55;
}
.note svg { width: 13px; height: 13px; fill: var(--ink-4); flex-shrink: 0; margin-top: 3px; }

.card-foot { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.btn-go {
  flex: 1; border: 0; border-radius: 7px; padding: 9px 12px;
  background: linear-gradient(145deg, var(--red-bright), var(--red));
  color: #fff; font-size: 13.5px; font-weight: 600; letter-spacing: .3px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: filter .15s, transform .1s;
}
.btn-go:hover { filter: brightness(1.08); }
.btn-go:active { transform: scale(.985); }
.btn-go svg { width: 14px; height: 14px; fill: #fff; }
.btn-go.guide { background: linear-gradient(145deg, #b8862a, var(--gold)); }
.card.is-dead .btn-go { background: #8d939b; }

/* ============================ 横向滚动条（推荐/最近） ============================ */
.rail { display: flex; gap: 15px; overflow-x: auto; padding: 20px 2px 12px; scroll-snap-type: x proximity; }
.rail::-webkit-scrollbar { height: 6px; }
.rail::-webkit-scrollbar-thumb { background: var(--line); border-radius: 3px; }
.rail > * { flex: 0 0 292px; scroll-snap-align: start; }
.rail-empty { color: var(--ink-3); font-size: 13.5px; padding: 16px 0; }

/* ============================ 引导型入口 ============================ */
.guide-list { display: grid; gap: 14px; margin-top: 20px; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.guide-card {
  display: flex; gap: 14px; background: var(--gold-soft); border: 1px solid var(--gold-line);
  border-left: 4px solid var(--gold); border-radius: var(--radius); padding: 15px 16px;
}
.guide-card .gi {
  width: 38px; height: 38px; flex-shrink: 0; border-radius: 8px; background: #fff;
  border: 1px solid var(--gold-line); display: grid; place-items: center;
}
.guide-card .gi svg { width: 19px; height: 19px; fill: var(--gold); }
.guide-card h4 { margin: 0 0 3px; font-size: 14.5px; }
.guide-card .gsub { font-size: 12px; color: var(--ink-3); margin-bottom: 7px; }
.guide-card .gpath { font-size: 13px; color: var(--ink-2); line-height: 1.6; }
.guide-card .gacts { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.btn-sm {
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  font-size: 12.5px; padding: 5px 11px; border-radius: 6px;
  display: inline-flex; align-items: center; gap: 5px;
}
.btn-sm:hover { border-color: var(--red-line); color: var(--red); }
.btn-sm svg { width: 13px; height: 13px; fill: currentColor; }

/* ============================ 空状态 / 页脚 ============================ */
.empty { text-align: center; padding: 56px 20px; color: var(--ink-3); }
.empty svg { width: 46px; height: 46px; fill: var(--line); margin-bottom: 12px; }
.empty h3 { margin: 0 0 6px; color: var(--ink-2); font-size: 17px; }
.empty p { margin: 0 0 16px; font-size: 13.5px; }

footer {
  position: relative;
  margin-top: 60px; border-top: 1px solid var(--gold-hair);
  background-color: var(--red-950);
  background-image: var(--tex-weave), linear-gradient(180deg, var(--red-950) 0%, #4a0c12 100%);
  color: rgba(255, 255, 255, .66);
  padding: 30px 0 42px; font-size: 12.8px; line-height: 1.85;
}
footer::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: var(--tex-noise);
  mix-blend-mode: overlay;
}
footer > .wrap { position: relative; }
footer h4 { font-size: 13.5px; margin: 0 0 8px; color: var(--gold-bright); }
footer .fcols { display: grid; gap: 26px; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
footer ul { list-style: none; margin: 0; padding: 0; }
footer li { margin-bottom: 4px; }
footer b { color: rgba(255, 255, 255, .9); }
footer code {
  background: rgba(255, 255, 255, .1); color: #f3d9a6;
  padding: 1px 5px; border-radius: 4px; font-size: 12px;
}
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }

/* 备案号（备案通过后由 app.js 填入） */
.foot-icp {
  margin: 18px 0 0; padding-top: 14px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: 12px; color: rgba(255, 255, 255, .55); text-align: center;
}
.foot-icp a { color: inherit; text-decoration: none; border-bottom: 1px dotted rgba(255, 255, 255, .35); }
.foot-icp a:hover { color: rgba(255, 255, 255, .85); }
.dot.ok { background: var(--green); }
.dot.http { background: var(--blue); }
.dot.guide { background: var(--red); }
.dot.dead { background: #a9a29b; }
.dot.ok, .dot.http, .dot.guide { box-shadow: 0 0 0 1px rgba(0, 0, 0, .18); }
/* ============================ 浮层 / 弹窗 ============================ */
.overlay {
  position: fixed; inset: 0; z-index: 200; background: rgba(24, 22, 22, .5);
  backdrop-filter: blur(3px); display: none; align-items: center; justify-content: center;
  padding: 20px; overflow-y: auto;
}
.overlay.open { display: flex; }
.modal {
  background: #fff; border-radius: 13px; max-width: 520px; width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .3); overflow: hidden;
  animation: pop .18s ease-out; margin: auto;
}
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.985); } }
.modal-hd {
  padding: 17px 20px 14px; border-bottom: 1px solid var(--line-2);
  display: flex; align-items: flex-start; gap: 12px;
}
.modal-hd .mi {
  width: 36px; height: 36px; border-radius: 9px; flex-shrink: 0; display: grid; place-items: center;
  background: var(--red-soft); border: 1px solid var(--red-line);
}
.modal-hd .mi svg { width: 19px; height: 19px; fill: var(--red); }
.modal-hd.gold .mi { background: var(--gold-soft); border-color: var(--gold-line); }
.modal-hd.gold .mi svg { fill: var(--gold); }
.modal-hd h3 { margin: 0 0 3px; font-size: 16px; line-height: 1.4; }
.modal-hd .msub { font-size: 12.5px; color: var(--ink-3); }
.modal-x {
  margin-left: auto; border: 0; background: transparent; color: var(--ink-4);
  font-size: 22px; line-height: 1; padding: 0 2px;
}
.modal-x:hover { color: var(--ink-2); }
.modal-bd { padding: 17px 20px; font-size: 14px; color: var(--ink-2); }
.modal-bd p { margin: 0 0 11px; }
.modal-bd p:last-child { margin-bottom: 0; }
.modal-bd .kbox {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px;
  padding: 11px 13px; font-family: var(--mono); font-size: 12.5px; color: var(--blue);
  word-break: break-all; line-height: 1.6; margin-bottom: 12px;
}
.modal-bd .steps { margin: 0 0 12px; padding-left: 20px; }
.modal-bd .steps li { margin-bottom: 5px; }
.modal-ft {
  padding: 13px 20px 17px; display: flex; gap: 9px; justify-content: flex-end; flex-wrap: wrap;
}
.btn-primary {
  border: 0; border-radius: 8px; padding: 10px 17px; font-size: 14px; font-weight: 600;
  background: linear-gradient(145deg, var(--red-bright), var(--red)); color: #fff;
  display: inline-flex; align-items: center; gap: 7px;
}
.btn-primary:hover { filter: brightness(1.08); }
.btn-primary svg { width: 15px; height: 15px; fill: #fff; }
.btn-ghost {
  border: 1px solid var(--line); background: #fff; color: var(--ink-2);
  border-radius: 8px; padding: 10px 16px; font-size: 14px;
}
.btn-ghost:hover { border-color: var(--red-line); color: var(--red); }

.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translate(-50%, 20px);
  background: #24262b; color: #fff; font-size: 13.5px; padding: 10px 18px;
  border-radius: 8px; box-shadow: 0 8px 26px rgba(0, 0, 0, .28); z-index: 300;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
  display: flex; align-items: center; gap: 8px; max-width: 90vw;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast svg { width: 15px; height: 15px; fill: var(--green); flex-shrink: 0; }

/* 二维码 */
.qrbox { text-align: center; padding: 4px 0 8px; }
.qrbox img { width: 190px; height: 190px; margin: 0 auto 10px; border: 1px solid var(--line); border-radius: 8px; }
.qrbox .qrtip { font-size: 12.5px; color: var(--ink-3); }

/* ============================ http 跳转页（go.html） ============================
   源表检查清单第 4 条：http 链接需经自有 https 域跳转 + 提供复制兜底。
   这一页只用站点已有的版式语言（红幕 + 暖纸 + 白面板），不引入任何新依赖。 */
.btn-go-back {
  margin-left: auto; flex-shrink: 0;
  border: 1px solid var(--gold-hair); border-radius: 6px; color: #fff;
  font-size: 12.5px; padding: 6px 12px; white-space: nowrap;
}
.btn-go-back:hover { background: rgba(255, 255, 255, .12); }
.go-hero .eyebrow { color: var(--gold-bright); }
.go-hero h1 { margin-bottom: 6px; }
.go-page .hero p.lead { color: rgba(255, 255, 255, .82); font-size: 14.5px; }
.go-type {
  display: inline-block; margin-left: 9px; padding: 2px 9px; border-radius: 12px;
  border: 1px solid var(--gold-hair); background: rgba(255, 255, 255, .1);
  color: var(--gold-bright); font-size: 12px; vertical-align: 1px;
}
.go-block { margin-top: 26px; }
.go-panel {
  margin-top: 14px; padding: 22px 24px; border: 1px solid var(--line);
  border-radius: 14px; background: var(--card); box-shadow: var(--shadow-1);
}
.go-panel h2 {
  margin: 0 0 12px; padding-left: 13px; border-left: 5px solid var(--red);
  font-size: 17px; line-height: 1.4;
}
.go-panel .steps { margin: 0 0 16px; padding-left: 21px; font-size: 14px; color: var(--ink-2); line-height: 1.9; }
.go-panel .steps li { margin-bottom: 4px; }
.go-panel .steps b { color: var(--red-deep); }
.go-panel .kbox {
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 8px;
  padding: 12px 14px; font-family: var(--mono); font-size: 12.5px; color: var(--blue);
  word-break: break-all; line-height: 1.65;
}
.go-acts { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 15px; }
.go-utm { margin: -6px 0 0; font-size: 12px; color: var(--ink-4); }
.go-utm code { font-family: var(--mono); font-size: 11.5px; }
.go-alert {
  margin-bottom: 16px; padding: 12px 14px; border-radius: 8px; font-size: 13.5px;
  background: var(--gold-soft); border: 1px solid var(--gold-line); color: #7a5a12; line-height: 1.75;
}
.go-alert b { color: #5f4409; }
.go-qr { margin-top: 16px; }
.go-qr .qrtip { line-height: 1.8; }
.go-why { margin: 16px 0 0; font-size: 12.5px; color: var(--ink-3); line-height: 1.85; }
.go-why b { color: var(--ink-2); }
.go-why code { font-family: var(--mono); font-size: 12px; color: var(--red-deep); }

/* 回到顶部 */
.totop {
  position: fixed; right: 22px; bottom: 26px; z-index: 80;
  width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line);
  background: rgba(255, 255, 255, .95); box-shadow: var(--shadow-2);
  display: none; place-items: center;
}
.totop.show { display: grid; }
.totop svg { width: 19px; height: 19px; fill: var(--red); }

/* ============================ 响应式 ============================ */
/* 顶栏一行要放下品牌 + 导航 + 搜索：按宽度分档收紧，
   再窄就让导航横向滑动（JS 实测溢出后加 .nav-overflow 做右缘渐隐） */
@media (max-width: 1260px) {
  .topnav a { padding: 6px 8px; font-size: 12.5px; }
  .topsearch { flex-basis: 240px; }
}
@media (max-width: 1080px) {
  .topsearch { flex-basis: 190px; }
  .topnav a { padding: 5px 7px; }
}
@media (max-width: 900px) {
  .hero h1 { font-size: 27px; }
  .topnav { display: none; }
  .topsearch { margin-left: auto; }
  .filterbar { top: var(--topbar-h, 57px); }
}
@media (max-width: 620px) {
  /* 搜索框换到顶栏第二行，占满宽度：手机上更好点、也更好输 */
  .topbar-in { flex-wrap: wrap; padding: 8px 15px 9px; gap: 8px 10px; }
  .topsearch { order: 3; flex: 1 1 100%; margin-left: 0; }
  .brand-txt b { font-size: 14.5px; }
  /* 折叠筛选：展开后最多占半屏，内部各行独立横向滚动 */
  .filterbar-rows.is-open { max-height: 46vh; overflow-y: auto; }
  .fctl-toggle { padding: 5px 11px; font-size: 12.5px; }
  .fsummary .fchip { font-size: 11.5px; padding: 3px 5px 3px 9px; }
  .fsummary .fnone { display: none; }
  .grid,
  .grid.compact { grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 11px; }
  .wrap, .topbar-in { padding-left: 15px; padding-right: 15px; }
  .hero-in { padding: 24px 15px; }
  .hero h1 { font-size: 22px; }
  .hero p.lead { font-size: 14px; }
  .hero::after { background-size: 250px 250px, 100% 100%; background-position: right -80px top -60px, left top; }
  .eyebrow { margin-bottom: 12px; }
  .card-body { padding: 10px 11px 12px; gap: 7px; }
  .venue { font-size: 13.5px; }
  .card-title { font-size: 12.5px; }
  .note { display: none; }
  .btn-go { font-size: 12.5px; padding: 8px; }
  .rail > * { flex: 0 0 236px; }
  .brand-txt span { display: none; }
  .searchbox kbd { display: none; }
  .guide-list { grid-template-columns: 1fr; }
  /* 跳转页：手机上按钮铺满一行，好点 */
  .btn-go-back { font-size: 11.5px; padding: 5px 9px; }
  .go-panel { padding: 18px 16px; }
  .go-panel h2 { font-size: 16px; }
  .go-acts { gap: 8px; }
  .go-acts .btn-primary, .go-acts .btn-ghost { flex: 1 1 44%; justify-content: center; }
}
@media (max-width: 400px) {
  .grid,
  .grid.compact { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
@media print {
  .topbar, .filterbar, .rail, .totop, .overlay { display: none !important; }
  .card { break-inside: avoid; box-shadow: none; }
}
