/* ==========================================================================
   江城拾光 · 个人摄影地图  —  样式表
   深色（暗房胶片感）为默认主题，浅色为米白纸张主题
   ========================================================================== */

/* --------------------------------------------------------------------------
   字体：得意黑 Smiley Sans（atelier-anchor/smiley-sans）· SIL OFL 1.1
   两点必须注意（否则字体观感会被浏览器毁掉）：
   1) 得意黑**只有一个字重 400**。所以全站 500/600/700 都要压回 400 ——
      否则浏览器会做「合成加粗」（把字形机械膨胀 + 加暗边），字形立刻变糊、
      变胖，完全不是得意的样子。
   2) 得意黑**字形自带斜度**（官方 family 名就叫 Smiley Sans Oblique）。
      全站文字会呈轻微右倾，这是字体的设计特征，不是 bug，也不要去"扶正"。
      注意 font-style 写的是 normal 而不是 oblique：斜度已经做进字形里了，
      写 normal 才能让所有 font-style 的请求都命中这一份文件（不会有回退/再倾斜）。
   字体文件已本地化到 /vendor/fonts/，不依赖 Google Fonts，不受墙影响。

   3) ★ 字体分**两档**下发（2026-10-13 加的），这是首屏体积的关键：
      全量文件是 **1.1 MB**，而它是全站字体的首选（--font-sans 也指向它），
      也就是说首屏第一件事就是下这 1.1 MB。
      SmileySans-Oblique.subset.woff2 是**按 GB2312 一级常用字裁过的子集**，
      实测 1.1MB → **517KB（省 54%）**，覆盖站上全部现有内容。
      ★ 第二档（全量）不是摆设：浏览器的字体匹配是**逐字**做的 ——
        某个字在第一档里找不到，才会去下一档找，**这时才发起**那 1.1MB 的请求。
        所以平时访客只花 517KB；哪天真写了个生僻字，也不会出现"两种字体混排"。
      ★ 两档**必须用不同的 family 名**。同名同描述符的两条 @font-face 之间
        不存在这种逐字回退 —— 后者会直接覆盖前者。

   4) ★★ 第二档**必须写 unicode-range**（2026-10-13 补的，踩过才明白）：
      浏览器判断"第一档里有没有这个字"，看的是 @font-face 的 `unicode-range`，
      **它不读字形表**。不写 range 就等于声明"我这一档拥有全部码位"，
      于是第一档对每个字都是候选，第一档没画的字统统顺延到第二档 ——
      **哪怕第二档同样没有这个字**。

      实测页面上有 26 个字符（≤ ≥ ⌘ ♡ ⚠ ✅ ❄ 🌸 🍂 👏 📷 ❌ ▶ ◇ … 表情与杂项符号）
      两档都没有字形，但首屏就因此白下了第二档那份 1.1MB —— 子集省下的 600KB
      当场被吃回去，而且是在最贵的第一屏。

      修法：给第二档声明它**独有**的区域（汉字/假名/全角那几个块）。
      那 26 个符号谁也不匹配 → 直接落系统字体，第二档只在真需要时才下载。
      ★ 这份 range 由 `python tools/font-ranges.py` 自动生成 + 自动校验，
        不要手改；重新生成子集后必须重跑它。
   -------------------------------------------------------------------------- */
@font-face {
  font-family: "Smiley Sans Oblique";
  /* ?v= 版本串用于破 /vendor/ 的 30 天长缓存：换字体版本改这里即可。
     ★ 换成子集之后这个版本号必须换新的 —— 否则老访客会一直用缓存里的全量那份。 */
  src: url("/vendor/fonts/SmileySans-Oblique.subset.woff2?v=3.0.0") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Smiley Sans Oblique Full";
  src: url("/vendor/fonts/SmileySans-Oblique.woff2?v=2.0.1") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  /* @font-range:begin  —— 由 tools/font-ranges.py 生成，别手改 */
  unicode-range: U+3000-303F, U+3040-30FF, U+3400-4DBF, U+4E00-9FFF, U+FE30-FE4F, U+FF00-FFEF, U+20000-2A6DF;
  /* @font-range:end */
}

/* ★ 全局兜底：带 hidden 属性的元素必须真的不可见。
   ------------------------------------------------
   [hidden] 的默认样式只是 UA 表里的 `display:none`，而**作者样式表里的任何
   display 都会盖掉它**（作者 > UA，跟选择器优先级无关）。所以元素只要有
   `.xxx { display:flex }` 这类类规则，再加 hidden 属性也**照样显示**。
   本站后台就踩过：`.change-pw-banner { display:flex }` 让"你还在使用默认密码
   admin123"的横幅**改了密码也一直挂着**（JS 根本没去 un-hide 它）。
   这里钉死一条铁律，省得以后又漏补某个 `.x[hidden]{display:none}`。
   加 !important 是刻意的：兜底要能压过任何作者规则，否则等于没写。 */
[hidden] { display: none !important; }

:root {
  /* 只有一个字重，所有字重都指向它：--font-serif 保留是为了不动各处
     var(--font-serif) 的引用，这里让它与 sans 指向同一款字体。
     ★ "Smiley Sans Oblique Full" 紧跟在子集后面：它是**逐字回退**用的第二档，
       只有当某个字在子集里没有时才会被下载（见上面 @font-face 的注释）。
       别把它挪到系统字体后面 —— 那样等于永远轮不到它。 */
  --font-sans: "Smiley Sans Oblique", "Smiley Sans Oblique Full", "得意黑", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  --font-serif: "Smiley Sans Oblique", "Smiley Sans Oblique Full", "得意黑", system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", sans-serif;
  --accent: #d9a35a;
  --accent-soft: rgba(217, 163, 90, .14);
  --spring: #f0a0b8;
  --summer: #4fb6a3;
  --autumn: #e08a3c;
  --winter: #7fa9db;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-lg: 0 30px 70px -30px rgba(0, 0, 0, .75);
  --ease: cubic-bezier(.22, .8, .24, 1);
  --nav-h: 66px;
}

html[data-theme="dark"] {
  --bg: #0a0b0d;
  --bg-2: #0f1116;
  --elev: #14171d;
  --elev-2: #1a1e25;
  --line: rgba(255, 255, 255, .09);
  --line-2: rgba(255, 255, 255, .16);
  --text: #eef1f5;
  --text-2: #c3cad4;
  --muted: #8d97a4;
  --glass: rgba(14, 16, 20, .78);
  --hero-veil: linear-gradient(180deg, rgba(10, 11, 13, .55) 0%, rgba(10, 11, 13, .35) 40%, rgba(10, 11, 13, .96) 100%);
  color-scheme: dark;
}

html[data-theme="light"] {
  --bg: #f6f3ec;
  --bg-2: #efeae1;
  --elev: #ffffff;
  --elev-2: #fbf8f3;
  --line: rgba(30, 26, 20, .10);
  --line-2: rgba(30, 26, 20, .20);
  --text: #1d1d20;
  --text-2: #464b52;
  --muted: #7b8089;
  --glass: rgba(255, 253, 249, .82);
  --hero-veil: linear-gradient(180deg, rgba(20, 18, 14, .42) 0%, rgba(246, 243, 236, .18) 45%, rgba(246, 243, 236, .98) 100%);
  --accent: #b5792c;
  --accent-soft: rgba(181, 121, 44, .12);
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  /* 得意黑单字重：禁止浏览器合成 bold / italic，否则字形被机械膨胀 */
  font-synthesis: none;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-serif); font-weight: 400; margin: 0; letter-spacing: .01em; }
/* 得意黑只有 400，所有浏览器默认加粗的标签也要压平 */
b, strong, th, h5, h6, optgroup, legend { font-weight: 400; }
p { margin: 0; }
::selection { background: var(--accent); color: #fff; }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 10px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); background-clip: content-box; }

.eyebrow {
  font-size: 11px;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.eyebrow .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); display: inline-block; }

/* ============================ 顶部导航 ============================ */
.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 clamp(14px, 3vw, 40px);
  z-index: 1200;
  transition: background .4s var(--ease), border-color .4s, backdrop-filter .4s;
  border-bottom: 1px solid transparent;
}
.topbar.scrolled {
  background: var(--glass);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom-color: var(--line);
}
.brand { display: flex; align-items: center; gap: 11px; }
.brand .logo { color: var(--accent); display: grid; place-items: center; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: var(--font-serif); font-size: 18px; letter-spacing: .06em; }
.brand-text em { font-style: normal; font-size: 10.5px; color: var(--muted); letter-spacing: .22em; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav-link {
  padding: 8px 13px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--text-2);
  transition: .25s var(--ease);
}
.nav-link:hover { color: var(--text); background: var(--accent-soft); }
.icon-btn {
  width: 38px; height: 38px;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 50%;
  display: grid; place-items: center;
  cursor: pointer;
  color: var(--text-2);
  transition: .25s var(--ease);
}
.icon-btn:hover { color: var(--accent); border-color: var(--accent); transform: rotate(12deg); }
/* 主题按钮的两个图标按当前主题二选一（结构见 index.html）。
   原来两种主题都画月亮 —— 切到浅色后按钮还在"说"暗色，
   用户看到整站变奶白、按钮又是月亮，自然会以为站点坏了（2026-10-04 实际发生过）。
   用显式 display 而不是 [hidden]：`[hidden]` 只是 UA 表的 display:none，
   会被作者样式里的 display 盖掉（这个坑本项目踩过三次）。 */
#themeToggle .i-light { display: none; }
html[data-theme="light"] #themeToggle .i-dark { display: none; }
html[data-theme="light"] #themeToggle .i-light { display: block; }
.menu-btn { display: none; }

/* ============================ 按钮 ============================ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 22px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  letter-spacing: .04em;
  transition: .3s var(--ease);
}
.btn:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #14100a; font-weight: 400; }
.btn.primary:hover { filter: brightness(1.08); color: #14100a; box-shadow: 0 10px 26px -10px var(--accent); }
.btn.ghost { border-color: var(--line); }
.btn.small { padding: 7px 16px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

/* ============================ 首屏 ============================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding: calc(var(--nav-h) + 40px) clamp(20px, 6vw, 90px) 90px;
  overflow: hidden;
}
.hero-bg {
  position: absolute; inset: 0;
  background-size: cover;
  background-position: center;
  transform: scale(1.06);
  animation: heroZoom 24s var(--ease) infinite alternate;
  filter: saturate(1.05);
}
.hero-bg::after {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(circle at 20% 30%, rgba(217, 163, 90, .18), transparent 55%),
                    radial-gradient(circle at 80% 70%, rgba(80, 130, 190, .14), transparent 55%);
}
@keyframes heroZoom { from { transform: scale(1.04) translateY(0); } to { transform: scale(1.12) translateY(-14px); } }
.hero-veil { position: absolute; inset: 0; background: var(--hero-veil); }

/* ---------------- 首屏横滚带（只在 ≥1024 出现） ----------------
   窄屏继续用上面那套「满屏一张」：竖图在手机上按高度铺，本来就是缩小的，不糊。
   ★ 为什么是"带子"而不是"换一张更大的图"：竖图在横屏上铺 cover 必须放大
     （1440 宽要 1440 宽的像素，而 sm 档只有 900），放大必然发虚；摆成横排、
     每张只占 78% 高度（约 395×702），sm 档反而是在**缩小**显示。 */
.hero-strip, .hero-scrim { display: none; }

@media (min-width: 1024px) {
  .hero-bg, .hero-veil { display: none; }
  .hero-strip {
    display: block; position: absolute; inset: 0; z-index: 1;
    overflow: hidden; cursor: grab;
    /* 横向拖动归我们，竖向滚动留给页面 —— 否则触控板上永远滚不动页面 */
    touch-action: pan-y; user-select: none; -webkit-user-select: none;
  }
  .hero-strip.dragging { cursor: grabbing; }
  .hero-strip.dragging .hs-item { pointer-events: none; }
  .hs-track {
    position: absolute; top: 50%; left: 0; height: 78%;
    display: flex; gap: 14px;
    transform: translate3d(0, -50%, 0);
    will-change: transform;
  }
  .hs-item {
    flex: none; height: 100%; aspect-ratio: 9 / 16;
    border-radius: 10px; overflow: hidden; background: var(--elev-2);
    outline: 1px solid rgba(255, 255, 255, .07);
    box-shadow: 0 24px 60px -26px rgba(0, 0, 0, .92);
  }
  .hs-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
  .hero-scrim {
    display: block; position: absolute; inset: 0; z-index: 2; pointer-events: none;
    background:
      linear-gradient(90deg, rgba(10, 11, 13, .96) 0%, rgba(10, 11, 13, .9) 20%, rgba(10, 11, 13, .46) 42%, rgba(10, 11, 13, 0) 58%),
      linear-gradient(180deg, rgba(10, 11, 13, .5) 0%, rgba(10, 11, 13, 0) 24%, rgba(10, 11, 13, 0) 76%, rgba(10, 11, 13, .82) 100%);
  }
  /* ★ 文字块要"透"过去：不从标题区也能拖的话，左半边就是一整块死区。
     链接/按钮再单独放回来，否则点不了。 */
  .hero .hero-inner { pointer-events: none; z-index: 3; }
  .hero .hero-inner a, .hero .hero-inner button { pointer-events: auto; }
}
.hero-inner { position: relative; max-width: 720px; }
.hero-title {
  font-size: clamp(34px, 6.2vw, 66px);
  line-height: 1.16;
  letter-spacing: .01em;
  margin: 0 0 20px;
  text-wrap: balance;
}
.hero-desc { font-size: clamp(14.5px, 1.7vw, 17px); color: var(--text-2); max-width: 30em; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 10px; margin: 26px 0 30px; }
.hero-stat {
  display: flex; align-items: baseline; gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(8px);
  font-size: 12.5px;
  color: var(--muted);
}
.hero-stat b { font-family: var(--font-serif); font-size: 17px; color: var(--text); font-weight: 400; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.scroll-hint {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%);
  width: 22px; height: 36px; border: 1px solid var(--line-2); border-radius: 12px;
}
.scroll-hint span {
  position: absolute; left: 50%; top: 7px; width: 3px; height: 7px; margin-left: -1.5px;
  background: var(--accent); border-radius: 2px;
  animation: hint 1.8s var(--ease) infinite;
}
@keyframes hint { 0% { opacity: 0; transform: translateY(0); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }

/* ============================ 区块 ============================ */
.section {
  padding: clamp(56px, 8vw, 108px) clamp(16px, 4vw, 60px);
  max-width: 1480px; margin: 0 auto;
  scroll-margin-top: calc(var(--nav-h) + 16px);
}
.section-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 26px; flex-wrap: wrap; margin-bottom: 30px;
}
.section-head h2 { font-size: clamp(24px, 3.1vw, 36px); }
.section-sub { color: var(--muted); font-size: 14px; max-width: 34em; }

/* 筛选 chips */
.filters { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.filter-group { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 15px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--elev);
  color: var(--text-2);
  font-size: 13px;
  cursor: pointer;
  transition: .25s var(--ease);
}
.chip:hover { border-color: var(--line-2); transform: translateY(-1px); }
.chip.active { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.chip i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.chip.s-spring i { background: var(--spring); }
.chip.s-summer i { background: var(--summer); }
.chip.s-autumn i { background: var(--autumn); }
.chip.s-winter i { background: var(--winter); }
.chip .n { font-size: 11px; color: var(--muted); }

/* --------------- 月份切片（P3-⑦）---------------
   ★ 为什么是「一排可点的月份格」而不是 <input type="range">：
     原生滑块的圆点位置按 (v−min)/(max−min)×(轨道宽−圆点宽) 算，
     和等分 12 格的格子中心差着半个圆点 —— 12 格并排时这个偏差一眼看得出来。
     格子本身就是精确的月份，可点、可 Tab 操作，而且和站上原有的 .chip
     是同一套视觉语言（不引入第二种"选择器"外观）。
   ★ 月份按**季节着色**（3–5 春 / 6–8 夏 / 9–11 秋 / 12,1,2 冬），
     配色规则与服务端 lib/utils.js 的 seasonOfDate 完全一致 ——
     月份和季节是同一件事的两个粒度，颜色对不上就会让人怀疑筛错了。 */
.month-slice {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  margin-bottom: 14px; padding: 10px 14px;
  border: 1px solid var(--line); border-radius: 999px; background: var(--elev);
}
.ms-title { font-size: 12px; color: var(--muted); letter-spacing: .08em; white-space: nowrap; }
.ms-cells { display: flex; gap: 3px; flex: 1 1 320px; min-width: 0; }
.ms-cell {
  flex: 1 1 0; min-width: 0; padding: 5px 0;
  font: inherit; font-size: 12px; line-height: 1;
  color: var(--text-2); background: transparent;
  border: 1px solid transparent; border-radius: 8px;
  cursor: pointer; transition: .22s var(--ease);
  position: relative;
}
/* 每格底部的季节色条：一眼看出"几月属于哪一季"，不用额外画图例 */
.ms-cell::after {
  content: ""; position: absolute; left: 50%; bottom: 2px; transform: translateX(-50%);
  width: 12px; height: 3px; border-radius: 2px; opacity: .5;
}
.ms-cell.s-spring::after { background: var(--spring); }
.ms-cell.s-summer::after { background: var(--summer); }
.ms-cell.s-autumn::after { background: var(--autumn); }
.ms-cell.s-winter::after { background: var(--winter); }
.ms-cell:hover:not(:disabled) { background: var(--elev-2); border-color: var(--line); }
.ms-cell.active { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); }
.ms-cell.active::after { opacity: 1; }
/* 这个月一张照片都没有 → 直接禁用。让用户点进一个必然空白的地图没有意义，
   禁用态本身就在告诉他"这个月还没有照片"。 */
.ms-cell:disabled { color: var(--muted); opacity: .38; cursor: not-allowed; }
.ms-cell:disabled::after { opacity: .22; }
.ms-read { font-size: 12px; color: var(--muted); white-space: nowrap; }
@media (max-width: 640px) {
  .month-slice { border-radius: var(--radius); padding: 10px 12px; gap: 10px; }
  .ms-cells { flex-basis: 100%; }
  .ms-read { margin-left: auto; }
}

/* --------------- 一日路线（把附近机位串成一天能走的线）--------------- */
.route-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.route-card {
  display: flex; gap: 12px; align-items: center; text-align: left; width: 100%;
  padding: 12px 14px; font: inherit; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--elev);
  transition: .28s var(--ease);
}
.route-card:hover { border-color: var(--line-2); transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.route-card.active { border-color: var(--accent); background: var(--accent-soft); }
.rc-body { min-width: 0; flex: 1 1 auto; }
.rc-name { font-size: 15px; color: var(--text); }
.rc-meta { font-size: 12px; color: var(--muted); margin-top: 3px; }
.rc-thumbs { display: flex; gap: 4px; flex: 0 0 auto; }
.rc-thumbs img { width: 38px; height: 30px; object-fit: cover; border-radius: 5px; border: 1px solid var(--line); }

.route-detail {
  margin-top: 16px; padding: 16px 18px;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--elev);
}
.dr-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.dr-head h3 { font-size: 17px; }
/* ★ 这句话是刻意的，不能删：线的顺序是**按远近排出来的"怎么走最顺"**，
   不是某一次真实走过的路线（库里根本没有轨迹，只有每个机位的一个坐标）。
   把线画在地图上很容易被读成"站主那天就是这么走的"，
   所以必须在紧挨着它的位置把边界讲清楚 —— 宁可显得啰嗦，也不要让人误读。 */
.dr-note { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.dr-stops { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.dr-stops li {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--elev-2); font-size: 12.5px; color: var(--text-2);
}
.dr-stops li b {
  width: 18px; height: 18px; border-radius: 50%; flex: 0 0 auto;
  background: var(--accent); color: #14100a; font-weight: 400; font-size: 11px;
  display: grid; place-items: center;
}
.dr-stops a { color: inherit; text-decoration: none; }
.dr-stops a:hover { color: var(--accent); }

/* 地图上的路线提示条。贴在线上，因为它要说的正是「这条线不代表什么」——
   用户点了某一天就会把视线移到地图上，提醒留在下面的文字里等于没有。 */
.map-route-note {
  position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%);
  z-index: 500;                      /* 高于 Leaflet 的 pane，低于顶部工具条 */
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  max-width: min(760px, calc(100% - 28px));
  padding: 9px 14px; border-radius: 999px;
  background: var(--glass); backdrop-filter: blur(8px);
  border: 1px solid var(--accent); color: var(--text-2);
  font-size: 12px; box-shadow: var(--shadow-lg);
}
.map-route-note[hidden] { display: none; }
.mrn-date { color: var(--accent); white-space: nowrap; }
.mrn-text strong { color: var(--text); font-weight: 400; }
.mrn-clear {
  font: inherit; font-size: 12px; padding: 4px 12px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--elev); color: var(--text-2); cursor: pointer;
  transition: .22s var(--ease);
}
.mrn-clear:hover { border-color: var(--accent); color: var(--accent); }

/* 路线上的序号（永久 tooltip）。Leaflet 的 tooltip 自带白底+边框+箭头，
   这里要的是"就是圆点里那个数字"，所以把它的壳全拆掉。 */
.leaflet-tooltip.route-num {
  background: transparent; border: none; box-shadow: none; padding: 0; margin: 0;
  color: #14100a; font-size: 11px; font-weight: 400; line-height: 1;
}
.leaflet-tooltip.route-num::before { display: none; }

/* ============================ 地图 ============================ */
.map-shell {
  position: relative;
  height: min(78svh, 780px);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--elev);
  box-shadow: var(--shadow-lg);
}
#mapCanvas { position: absolute; inset: 0; background: var(--elev-2); }
.leaflet-container { font-family: var(--font-sans); background: var(--elev-2); }
.leaflet-control-attribution {
  background: var(--glass) !important;
  color: var(--muted) !important;
  font-size: 10px !important;
  backdrop-filter: blur(6px);
}
.leaflet-control-attribution a { color: var(--muted) !important; }
.leaflet-bar a, .leaflet-bar a:hover {
  background: var(--glass) !important; color: var(--text) !important;
  border-color: var(--line) !important; backdrop-filter: blur(8px);
}
.leaflet-bar { border: 1px solid var(--line) !important; border-radius: 10px !important; overflow: hidden; }

/* --------------- 暗色底图：把亮色矢量底图压成暗房调子 ---------------
   ★★ 滤镜**只挂在 .leaflet-tile-pane 上**，绝不能挂到 #mapCanvas 或
      .leaflet-container 上 —— 那会把 marker（叠放的缩略图）、缩放控件、
      版权条一起染色：访客的作品照片会变色，按钮会发灰。瓦片窗格是
      Leaflet 给底图瓦片专用的容器，Marker/Control 都在别的层里。

   ★ 不是所有底图都该套这个滤镜（所以用 data-base 精确圈定范围）：
       · amap（矢量标准图）—— 亮灰底 + 彩色路网，套了才对得上暗色主题
       · amapimg（影像图）  —— 本质是照片。反相会把它变成一张鬼片
       · osm                —— 保持原样，作为"看真实配色"的退路
     data-base 由 app.js 在初始化与切换底图时写在 #mapShell 上，
     所以"哪个 provider 适合暗色"这件事只有一处答案，不会两边漂移。

   ★ 参数不是随手反个相：invert 之后必须 hue-rotate(180deg) 把色相转回来
     （否则蓝色路网会变成橙色），再压亮度/对比度/饱和度让它落进暗色主题的
     色阶里；末尾一点 sepia 是刻意留的暖调，让它与站上的暖金强调色同族，
     而不是一片冷蓝。对比度留 .9 是为了不把路名文字糊掉。

   ★ 为什么不再叠一层"暖色罩"：试过 `.leaflet-tile-pane::after` 与
     `.map-shell::after` 两种写法，都不成立 ——
     Leaflet 的 pane 是零尺寸的定位容器（瓦片靠自身 transform 定位），
     ::after 上写 inset:0 拿不到盒子；而挂到 .map-shell 上就会盖在
     #mapCanvas 之上，把 marker 里的照片和右侧面板一起染色。
     暖调并进 filter 里既够用，也少一次合成。 */
html[data-theme="dark"] .map-shell[data-base="amap"] .leaflet-tile-pane {
  filter: invert(1) hue-rotate(180deg) brightness(.88) contrast(.9) saturate(.62) sepia(.16);
}

/* --- 堆叠缩略图标记 --- */
.pin { width: 68px; height: 68px; position: relative; }
.pin-stack {
  position: absolute; left: 8px; top: 8px;
  width: 52px; height: 44px;
  cursor: pointer;
}
.pin-stack .stk {
  position: absolute; inset: 0;
  width: 52px; height: 40px;
  object-fit: cover;
  border-radius: 5px;
  border: 2px solid rgba(255, 255, 255, .92);
  box-shadow: 0 8px 18px -6px rgba(0, 0, 0, .7);
  transition: transform .42s var(--ease), opacity .3s;
  background: linear-gradient(135deg, #2a2f38, #171a20);
}
.pin-stack .stk:nth-child(1) { transform: translate(-4px, 4px) rotate(-10deg) scale(.9); opacity: .78; }
.pin-stack .stk:nth-child(2) { transform: translate(0, 1px) rotate(-4deg) scale(.95); opacity: .92; }
.pin-stack .stk:nth-child(3) { transform: translate(4px, -2px) rotate(3deg); }
.pin:hover .pin-stack .stk:nth-child(1) { transform: translate(-22px, 6px) rotate(-18deg) scale(.94); opacity: 1; }
.pin:hover .pin-stack .stk:nth-child(2) { transform: translate(-10px, -4px) rotate(-8deg) scale(1); opacity: 1; }
.pin:hover .pin-stack .stk:nth-child(3) { transform: translate(6px, -6px) rotate(6deg) scale(1.06); }
.pin.active .pin-stack .stk { border-color: var(--accent); }
.pin.active .pin-stack .stk:nth-child(3) { transform: translate(6px, -6px) rotate(6deg) scale(1.14); box-shadow: 0 0 0 3px var(--accent-soft), 0 12px 24px -8px rgba(0, 0, 0, .8); }
.pin-badge {
  position: absolute; right: 0; top: 0;
  min-width: 22px; height: 22px; padding: 0 5px;
  border-radius: 999px;
  background: var(--accent);
  color: #14100a;
  font-size: 11px; font-weight: 400; line-height: 22px; text-align: center;
  box-shadow: 0 4px 12px -3px rgba(0, 0, 0, .6);
  z-index: 3;
}
.pin-name {
  position: absolute; left: 50%; top: 56px; transform: translateX(-50%) translateY(4px);
  white-space: nowrap;
  font-size: 11.5px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--glass);
  border: 1px solid var(--line);
  color: var(--text);
  opacity: 0;
  transition: .3s var(--ease);
  backdrop-filter: blur(8px);
  pointer-events: none;
  max-width: 150px; overflow: hidden; text-overflow: ellipsis;
}
.pin:hover .pin-name, .pin.active .pin-name { opacity: 1; transform: translateX(-50%) translateY(0); }
.pin-ph {
  display: grid; place-items: center;
  color: var(--accent);
  background: linear-gradient(140deg, rgba(38, 42, 50, .96), rgba(18, 20, 25, .96));
}
html[data-theme="light"] .pin-ph { background: linear-gradient(140deg, #ffffff, #e8e2d7); }

/* --- 地图工具（左上，避开右侧详情面板） --- */
.map-tools {
  position: absolute; left: 14px; top: 14px; z-index: 500;
  display: flex; flex-direction: column; gap: 8px; align-items: flex-start;
}
.tool {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 13px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(12px);
  color: var(--text-2);
  font-size: 12.5px;
  cursor: pointer;
  transition: .25s var(--ease);
}
.tool:hover { color: var(--text); border-color: var(--line-2); }
.tool.active { color: #14100a; background: var(--accent); border-color: var(--accent); font-weight: 400; }
.tool-group { display: flex; gap: 0; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: var(--glass); backdrop-filter: blur(12px); }
.tool-group .tool { border: 0; border-radius: 0; background: transparent; backdrop-filter: none; }
.tool-group .tool + .tool { border-left: 1px solid var(--line); }

/* --- 详情面板：桌面常驻右侧 --- */
.panel {
  position: absolute; right: 14px; top: 14px; bottom: 14px;
  width: min(392px, 38vw);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: saturate(150%) blur(20px);
  -webkit-backdrop-filter: saturate(150%) blur(20px);
  z-index: 600;
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-lg);
}
.panel-empty { padding: 34px 26px; text-align: center; }
.panel-empty h3 { font-size: 17px; margin-bottom: 8px; }
.panel-empty p { color: var(--muted); font-size: 13.5px; }
.empty-art { color: var(--accent); margin-bottom: 12px; }
.empty-tips { list-style: none; padding: 0; margin: 18px 0 0; text-align: left; display: grid; gap: 8px; }
.empty-tips li { font-size: 12.5px; color: var(--muted); padding-left: 16px; position: relative; }
.empty-tips li::before { content: ""; position: absolute; left: 0; top: 8px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); opacity: .6; }

.panel-body { display: flex; flex-direction: column; height: 100%; }
.panel-head { position: relative; padding: 20px 22px 16px; border-bottom: 1px solid var(--line); }
.panel-head h3 { font-size: 22px; line-height: 1.3; padding-right: 30px; }
.panel-head .district { color: var(--accent); font-size: 11.5px; letter-spacing: .2em; }
.panel-close {
  position: absolute; right: 12px; top: 14px;
  width: 28px; height: 28px; border-radius: 50%;
  border: 1px solid var(--line); background: transparent; cursor: pointer; color: var(--muted);
  line-height: 1; display: grid; place-items: center;
}
.panel-close:hover { color: var(--accent); border-color: var(--accent); }
.panel-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.tag {
  font-size: 11.5px; padding: 3px 9px; border-radius: 999px;
  background: var(--accent-soft); color: var(--accent); border: 1px solid transparent;
}
.tag.plain { background: transparent; border-color: var(--line); color: var(--muted); }
.panel-desc { margin-top: 12px; font-size: 13.5px; color: var(--text-2); }
.panel-row { margin-top: 10px; font-size: 13px; color: var(--muted); display: flex; gap: 8px; }
.panel-row b { color: var(--text-2); font-weight: 400; }
.panel-actions { display: flex; gap: 8px; margin-top: 14px; }
.panel-scroll { overflow-y: auto; padding: 16px 18px 26px; flex: 1; }

/* 季节分布条 */
.season-bar { display: flex; gap: 6px; margin: 14px 0 6px; }
.season-seg {
  flex: 1; border-radius: 8px; padding: 8px 6px; text-align: center;
  border: 1px solid var(--line); cursor: pointer; transition: .25s var(--ease);
  background: var(--elev);
}
.season-seg:hover, .season-seg.active { transform: translateY(-2px); border-color: var(--line-2); }
.season-seg.active { border-color: var(--accent); background: var(--accent-soft); }
.season-seg b { display: block; font-family: var(--font-serif); font-size: 16px; }
.season-seg span { font-size: 10.5px; color: var(--muted); }
.season-seg.s-spring { box-shadow: inset 0 3px 0 var(--spring); }
.season-seg.s-summer { box-shadow: inset 0 3px 0 var(--summer); }
.season-seg.s-autumn { box-shadow: inset 0 3px 0 var(--autumn); }
.season-seg.s-winter { box-shadow: inset 0 3px 0 var(--winter); }

/* 时间轴 */
.tl { position: relative; padding-left: 18px; margin-top: 8px; }
.tl::before { content: ""; position: absolute; left: 4px; top: 6px; bottom: 6px; width: 1px; background: var(--line-2); }
.tl-year {
  position: relative; margin: 18px 0 10px; font-family: var(--font-serif);
  font-size: 15px; color: var(--text); letter-spacing: .1em;
}
.tl-year::before { content: ""; position: absolute; left: -18px; top: 8px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.tl-item {
  /* 同上：这是一枚 <a href="/photo/<id>">（以前是 <div>），
     去掉下划线、继承文字色，视觉与改动前完全一致 */
  text-decoration: none; color: inherit;
  position: relative; display: flex; gap: 12px; padding: 8px; margin-bottom: 6px;
  border-radius: var(--radius-sm); cursor: pointer; transition: .25s var(--ease);
  border: 1px solid transparent;
}
.tl-item:hover { background: var(--elev); border-color: var(--line); transform: translateX(2px); }
.tl-item::before {
  content: ""; position: absolute; left: -16.5px; top: 22px; width: 5px; height: 5px; border-radius: 50%;
  background: var(--muted);
}
.tl-item[data-season="spring"]::before { background: var(--spring); }
.tl-item[data-season="summer"]::before { background: var(--summer); }
.tl-item[data-season="autumn"]::before { background: var(--autumn); }
.tl-item[data-season="winter"]::before { background: var(--winter); }
.tl-thumb { width: 76px; height: 58px; border-radius: 8px; object-fit: cover; flex: none; background: var(--elev-2); }
.tl-info { min-width: 0; }
.tl-date { font-size: 12.5px; color: var(--text); font-variant-numeric: tabular-nums; }
.tl-date .sn {
  font-size: 10.5px; padding: 1px 7px; border-radius: 999px; margin-left: 6px;
  background: var(--elev-2); color: var(--muted);
}
.tl-title { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tl-note { font-size: 11.5px; color: var(--muted); opacity: .8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.panel-empty-line { text-align: center; color: var(--muted); font-size: 13px; padding: 26px 0; }

/* 移动端地点条（暂未启用） */
.mobile-strip { display: none; }

/* ============================ 四季 ============================ */
.season-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.season-card {
  position: relative; border-radius: var(--radius); overflow: hidden;
  border: 1px solid var(--line); background: var(--elev);
  min-height: 340px; display: flex; flex-direction: column; justify-content: flex-end;
  transition: .4s var(--ease);
}
.season-card:hover { transform: translateY(-4px); border-color: var(--line-2); box-shadow: var(--shadow-lg); }
.season-card .sc-cover { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: .82; transition: .6s var(--ease); }
.season-card:hover .sc-cover { transform: scale(1.05); opacity: .95; }
.season-card .sc-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,.05) 30%, rgba(0,0,0,.82) 100%); }
.season-card .sc-body { position: relative; padding: 18px; color: #fff; }
.season-card h3 { font-size: 25px; letter-spacing: .1em; display: flex; align-items: center; gap: 10px; }
.season-card .sc-en { font-size: 10.5px; letter-spacing: .3em; opacity: .75; text-transform: uppercase; }
.season-card .sc-count { font-size: 12.5px; opacity: .85; margin-top: 4px; }
.season-card .sc-strip { display: flex; gap: 5px; margin-top: 12px; }
.season-card .sc-strip img { width: 40px; height: 30px; object-fit: cover; border-radius: 5px; border: 1px solid rgba(255,255,255,.5); }
.season-card.s-spring { box-shadow: inset 0 0 0 1px rgba(240,160,184,.25); }
.season-card.s-summer { box-shadow: inset 0 0 0 1px rgba(79,182,163,.25); }
.season-card.s-autumn { box-shadow: inset 0 0 0 1px rgba(224,138,60,.25); }
.season-card.s-winter { box-shadow: inset 0 0 0 1px rgba(127,169,219,.25); }

/* ============================ 影集 ============================ */
.wall-controls { display: flex; gap: 10px; }
.select {
  padding: 9px 14px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--elev); color: var(--text-2);
  font-size: 13px; cursor: pointer; appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 32px;
}
.select:hover { border-color: var(--line-2); }
.wall { columns: 4; column-gap: 16px; }
.wall-item {
  /* ★ display:block 不能省：这是一枚 <a>（以前是 <figure>），
     而 a 默认是 inline —— 在 .wall 的多列布局里 inline 元素
     break-inside / margin-bottom 都不按预期工作，整墙会塌成一列。 */
  display: block; text-decoration: none; color: inherit;
  position: relative; margin-bottom: 16px; break-inside: avoid;
  border-radius: var(--radius-sm); overflow: hidden; cursor: zoom-in;
  border: 1px solid var(--line); background: var(--elev-2);
  transition: .4s var(--ease);
}
.wall-item:hover { border-color: var(--line-2); transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.wall-item img { width: 100%; height: auto; transition: .6s var(--ease); }
.wall-item:hover img { transform: scale(1.04); }
.wall-cap {
  position: absolute; inset: auto 0 0 0; padding: 22px 12px 10px;
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.8));
  color: #fff; opacity: 0; transform: translateY(8px); transition: .35s var(--ease);
  font-size: 12px;
}
.wall-item:hover .wall-cap { opacity: 1; transform: none; }
.wall-cap b { display: block; font-size: 13px; font-weight: 400; }
.wall-cap span { opacity: .75; font-size: 11px; }
.wall-more { text-align: center; margin-top: 26px; }
.wall-empty { text-align: center; color: var(--muted); padding: 50px 0; font-size: 14px; }
/* 档位生成失败的照片：服务端宁可给空串也不给 _orig（对访客 403），
   前端就渲染这块占位 —— 比"破图 + 一串 403 请求"诚实。 */
.wall-noimg { display: block; width: 100%; aspect-ratio: 4 / 3; background: var(--elev-2); }

/* ============================ 关于 ============================ */
.about-card {
  display: grid; grid-template-columns: auto 1fr auto; gap: 30px; align-items: center;
  padding: clamp(24px, 3.4vw, 44px);
  border-radius: var(--radius); border: 1px solid var(--line);
  background: linear-gradient(135deg, var(--elev), var(--elev-2));
}
.about-avatar {
  width: 104px; height: 104px; border-radius: 50%; overflow: hidden;
  background: linear-gradient(140deg, var(--accent), #8a5f23);
  display: grid; place-items: center; color: #fff; font-family: var(--font-serif); font-size: 34px;
  border: 2px solid var(--line);
}
.about-avatar img { width: 100%; height: 100%; object-fit: cover; }
.about-bio { color: var(--text-2); font-size: 14.5px; margin: 8px 0 18px; max-width: 46em; }
.about-meta { display: grid; gap: 10px; margin: 0; }
.about-meta > div { display: flex; gap: 14px; font-size: 13.5px; }
.about-meta dt { color: var(--muted); min-width: 74px; margin: 0; }
.about-meta dd { margin: 0; color: var(--text-2); }
.copyright-note { margin-top: 16px; font-size: 12.5px; color: var(--muted); border-left: 2px solid var(--accent); padding-left: 12px; }
.about-stats { display: grid; gap: 14px; min-width: 150px; }
.about-stats .as-item { text-align: right; }
.about-stats .as-item b { font-family: var(--font-serif); font-size: 30px; display: block; line-height: 1.1; }
.about-stats .as-item span { font-size: 11.5px; color: var(--muted); letter-spacing: .12em; }

/* ============================ 留言板 ============================ */
.gb-wrap { display: grid; grid-template-columns: minmax(300px, 380px) 1fr; gap: 26px; align-items: start; }
.gb-form {
  padding: 22px; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--elev); display: grid; gap: 12px; position: sticky; top: calc(var(--nav-h) + 18px);
}
.gb-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.input {
  width: 100%; padding: 11px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--bg-2); color: var(--text);
  transition: .25s var(--ease); outline: none;
}
.input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.textarea { resize: vertical; min-height: 88px; line-height: 1.7; }
.emoji-pick { display: flex; gap: 4px; margin-left: auto; }
.emoji {
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line);
  background: transparent; cursor: pointer; font-size: 14px; color: var(--muted);
  display: grid; place-items: center; transition: .2s var(--ease);
}
.emoji:hover { transform: translateY(-2px); }
.emoji.active { border-color: var(--accent); background: var(--accent-soft); }
.gb-foot { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.gb-count { font-size: 12px; color: var(--muted); }
.gb-hint { font-size: 12.5px; color: var(--accent); min-height: 18px; }
.gb-list { display: grid; gap: 12px; }
.gb-item {
  padding: 16px 18px; border-radius: var(--radius); border: 1px solid var(--line);
  background: var(--elev); display: grid; gap: 8px;
  animation: fadeUp .5s var(--ease) both;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.gb-top { display: flex; align-items: center; gap: 10px; }
.gb-ava {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-size: 14px;
  background: var(--accent-soft); color: var(--accent); border: 1px solid var(--line);
}
.gb-name { font-size: 13.5px; font-weight: 400; }
.gb-time { font-size: 11.5px; color: var(--muted); }
.gb-content { font-size: 14px; color: var(--text-2); white-space: pre-wrap; word-break: break-word; }
.gb-reply {
  font-size: 13px; color: var(--text-2); background: var(--bg-2);
  border-left: 2px solid var(--accent); border-radius: 8px; padding: 9px 12px; margin-top: 2px;
}
.gb-reply b { color: var(--accent); font-weight: 400; }
.gb-bottom { display: flex; align-items: center; gap: 14px; }
.gb-like {
  display: inline-flex; align-items: center; gap: 6px; background: transparent; border: 0;
  color: var(--muted); font-size: 12.5px; cursor: pointer; padding: 2px 0; transition: .2s;
}
.gb-like:hover { color: var(--accent); }
.gb-like.on { color: var(--accent); }

/* ============================ 页脚 ============================ */
.footer {
  padding: 54px 24px 40px; text-align: center; border-top: 1px solid var(--line);
  color: var(--muted); font-size: 13px; background: var(--bg-2);
}
.footer-fine { font-size: 11.5px; opacity: .7; margin-top: 8px; }

/* ============================ 看图：Cover Flow ============================ */
/* 一叠斜插进画面的卡片 + 倒影，按住能拖着甩。结构见 coverflow.js。
   层级：卡片 cf(1) → 底部渐隐遮罩(2) → 文字/进度(3) → 按钮(4) */
.lightbox {
  position: fixed; inset: 0; z-index: 3000;
  background: rgba(6, 7, 9, .965);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  overflow: hidden;
  animation: lbIn .3s var(--ease);
}
@keyframes lbIn { from { opacity: 0; } to { opacity: 1; } }
.lightbox[hidden] { display: none; }

/* 底部渐隐：让卡片倒影自然消失在暗处，同时保证下面的文字始终读得清。
   这条遮罩盖在卡片**上面**（z-index 2 > 卡片 1），太高就会把倒影整段吃掉 ——
   原来 230px 只剩一条黑边，看不到倒影。压到 200px 并把透明度曲线放平，
   倒影这才露得出来。 */
.lightbox::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 200px;
  background: linear-gradient(to top, rgba(6, 7, 9, .97) 10%, rgba(6, 7, 9, .62) 48%, rgba(6, 7, 9, 0));
  pointer-events: none; z-index: 2;
}

.cf { position: absolute; inset: 0; overflow: hidden; cursor: grab; touch-action: none; z-index: 1; }
.cf.dragging { cursor: grabbing; }
.cf-stage {
  position: absolute; left: 50%; top: 40%; width: 0; height: 0;
  transform-style: preserve-3d;
}

.cf-card {
  position: absolute; left: 0; top: 0;
  width: var(--cf-w, 300px); height: var(--cf-h, 400px);
  margin-left: calc(var(--cf-w, 300px) / -2);
  margin-top: calc(var(--cf-h, 400px) / -2);
  will-change: transform, opacity;
  backface-visibility: hidden;
}
.cf-plate {
  position: absolute; inset: 0; overflow: hidden; border-radius: 10px;
  background: #0d0f13;
  box-shadow: 0 30px 62px -26px #000, inset 0 0 0 1px rgba(255, 255, 255, .07);
  transition: box-shadow .4s var(--ease), background-color .45s var(--ease);
}
/* 正对镜头的那张：加一道暖光晕，视线自然落在它身上 */
.cf-plate.is-active {
  box-shadow: 0 46px 92px -32px #000, inset 0 0 0 1px rgba(255, 255, 255, .15),
              0 0 70px -14px rgba(217, 163, 90, .34);
}
/* 轻点正对镜头那张 = 聚焦放大（见 coverflow.js）。用 :not(.dragging) 而不是
   直接写 .cf-plate.is-active，是为了压过上面 .cf.dragging 的 grabbing ——
   否则按住拖动时手心那张还挂着放大镜光标，跟"正在拖"打架。 */
.cf:not(.dragging) .cf-plate.is-active { cursor: zoom-in; }
.lightbox.zooming .cf-plate.is-active { cursor: zoom-out; }
.cf-img {
  display: block; width: 100%; height: 100%;
  object-fit: contain;                 /* 照片不裁切，宁可留深色卡纸边 */
  opacity: 0; transition: opacity .28s var(--ease);
}
.cf-img.ready { opacity: 1; }

.cf-gloss, .cf-shade { position: absolute; inset: 0; pointer-events: none; opacity: 0; }
/* 斜面迎光的那道扫光，是 Cover Flow 最出味道的一笔 */
.cf-gloss { background: linear-gradient(104deg, rgba(255,255,255,.85) 0%, rgba(255,255,255,.16) 24%, rgba(255,255,255,0) 46%); }
.cf-shade { background: #05070a; }

/* 倒影：把卡片镜像一份挂在正下方，用 mask 渐隐掉。
   渐隐要在前 50% 就走完 —— 舞台在 40% 处，卡片下沿离屏幕底部只剩不到一半卡高，
   渐隐拉太长的话这段光是"没变淡"的，等于白做。 */
.cf-mirror {
  position: absolute; left: 0; top: 100%; width: 100%; height: 100%;
  transform: scaleY(-1); transform-origin: 50% 50%;
  overflow: hidden; border-radius: 10px; pointer-events: none;
  background: #0d0f13;
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,.70) 0%, rgba(0,0,0,.32) 16%, rgba(0,0,0,.09) 34%, rgba(0,0,0,0) 50%);
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.70) 0%, rgba(0,0,0,.32) 16%, rgba(0,0,0,.09) 34%, rgba(0,0,0,0) 50%);
}
.cf-ref { display: block; width: 100%; height: 100%; object-fit: contain; opacity: 0; transition: opacity .28s var(--ease); }
.cf-ref.ready { opacity: 1; }

/* 文字与进度 */
.lb-figure {
  position: absolute; left: 50%; bottom: 78px; transform: translateX(-50%);
  margin: 0; max-width: min(1500px, 90vw); text-align: center;
  z-index: 3; pointer-events: none;
  transition: opacity .3s var(--ease);
}
.lb-figure figcaption { color: #e9e6e1; }
.lb-title { font-family: var(--font-serif); font-size: 17px; }
.lb-title.swap { animation: lbSwap .42s var(--ease); }
@keyframes lbSwap { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.lb-meta { font-size: 12.5px; color: rgba(233, 230, 225, .62); margin-top: 5px; letter-spacing: .04em; }
/* 分隔点放在每项**后面**（而不是每项前面）：万一这行放不下要折行，
   行首就不会孤零零顶一个「·」，最坏也只是行尾多一个，观感好得多。
   手机上还会因为 left:50% 的可用宽度只剩半屏而更容易折行，见下面 620px 的媒体查询。 */
.lb-meta span:not(:last-child)::after { content: "·"; margin: 0 7px; opacity: .55; }
/* 日期不是从照片里读到的（只是上传当天兜底）：直接写成「时间待确认」，
   不把那个不可信的日期端给访客。配色沿用后台 /admin 里那条 ⚠ 提示。 */
.lb-meta span.warn { color: #e0a04c; }
.lb-meta span.warn::before { content: "⚠ "; }

/* width: max-content —— 绝对定位 + left:50% 没有 right，
   可用宽度只有半屏，shrink-to-fit 会把「3 / 25」挤成两行。给了 max-content 就不会。 */
.lb-foot {
  position: absolute; left: 50%; bottom: 30px; transform: translateX(-50%);
  z-index: 3; display: flex; align-items: center; gap: 16px;
  width: max-content; max-width: 92vw;
  transition: opacity .3s var(--ease);
}

/* ============================ 展开（点开看原图） ============================ */
/* 照片铺满屏幕时，卡纸底色 / 圆角阴影 / 标题 / 进度条**全部让开**：
   卡纸留着就是一圈假边框，标题和进度条会压在照片上。
   交给 CSS 而不是逐帧写行内样式，是为了让"让开"和"回来"都有过渡。 */
.lightbox.zooming .cf-plate { background-color: transparent; box-shadow: none; }
.lightbox.zooming .lb-figure, .lightbox.zooming .lb-foot { opacity: 0; pointer-events: none; }
/* 展开时关掉整屏背景模糊：照片已经铺满屏幕，背后什么都没有，这层 10px 的
   全屏模糊纯属白烧（软件光栅下尤其贵）。它也是 .lightbox 上的 backdrop-filter，
   每帧都要把整屏重算一遍。 */
.lightbox.zooming { backdrop-filter: none; -webkit-backdrop-filter: none; }
/* 聚焦放大时把底部渐隐收掉：那层是给"一叠牌"的倒影收尾用的，
   照片被拎到眼前之后它只会把照片下沿压暗。 */
.lightbox::after { transition: opacity .45s var(--ease); }
.lightbox.zooming::after { opacity: 0; }

/* ========== 灯箱开着时，别让被盖住的首屏继续耗合成/绘制 ========== */
/* .hero-bg 是 24s 无限 alternate 缩放、还带 filter: saturate() 的**全屏图层**；
   .scroll-hint span 是 1.8s 无限跳动。灯箱一开它们就被完全盖住
   （.lightbox 底色 rgba(6,7,9,.965)，96.5% 不透明），却仍在后台出帧。
   真机上是白耗电；软件光栅（无 GPU）下更狠 —— 实测会让无头 Chrome 在
   "展开态"截图时彻底卡死（captureScreenshot 20s 不返回，随后 Runtime.evaluate
   也不回，整个渲染进程作废）。
   用 paused 而不是 none：none 会把动画重建，关灯箱时首屏会**跳回起点**；
   paused 冻在当前帧，关掉就从原处接着跑。 */
html.lb-open .hero-bg,
html.lb-open .scroll-hint span { animation-play-state: paused; }

/* 展开态（照片铺满屏幕）时，把首屏整块从绘制里摘掉。
   这时 .lightbox.zooming 已经关掉 backdrop-filter、底色又是 96.5% 不透明，
   背后什么都看不见；而 .hero 那一整屏（filter + 两层 radial 渐变 + veil + 文字）
   仍要参与合成。摘掉它既省掉一整屏的合成开销，也是上面那条截图卡死的直接解药
   （实测：藏掉 .hero 后同一张图 0.5s 截出，之前 20s 超时）。 */
html.lb-zoom .hero { visibility: hidden; }
.lb-railbox {
  position: relative; width: min(44vw, 300px); height: 3px; border-radius: 3px;
  background: rgba(255, 255, 255, .13); overflow: hidden;
}
.lb-rail {
  position: absolute; top: 0; bottom: 0; left: 0; width: 10px;
  background: var(--accent); border-radius: 3px;
  transition: left .4s var(--ease), width .3s var(--ease);
}
.lb-hint {
  display: flex; align-items: baseline; gap: 12px; white-space: nowrap;
  font-size: 12px; color: rgba(255, 255, 255, .62);
  font-variant-numeric: tabular-nums; letter-spacing: .04em;
}
.lb-tip { color: rgba(255, 255, 255, .3); font-size: 11px; letter-spacing: .08em; }
/* 提示文案按视口分两版：桌面写全（还有滚轮和方向键），手机只留"轻点放大"。
   手机上原来整条提示是 display:none 的，于是"点一下能放大"这件事完全没人知道。 */
.lb-tip .tip-m { display: none; }

.lb-close {
  position: absolute; right: 20px; top: 18px; width: 42px; height: 42px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06);
  color: #fff; font-size: 16px; cursor: pointer; transition: .25s; z-index: 4;
}
.lb-close:hover { background: var(--accent); color: #14100a; border-color: var(--accent); }
.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 52px; height: 52px; border-radius: 50%;
  border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06);
  color: #fff; font-size: 26px; line-height: 1; cursor: pointer; transition: .25s var(--ease);
  z-index: 4;
}
.lb-nav:hover { background: rgba(255,255,255,.16); }
.lb-nav.prev { left: 18px; }
.lb-nav.next { right: 18px; }

/* 关掉动效时：只保留静态排列，不要 3D 也不要过渡 */
.cf-static .cf-card, .cf-static .cf-plate { transition: none; }
@media (prefers-reduced-motion: reduce) {
  .lightbox { animation: none; }
  .cf-plate, .cf-img, .cf-ref, .lb-rail { transition: none; }
}

@media (max-width: 620px) {
  .cf-stage { top: 38%; }
  .lb-nav { width: 42px; height: 42px; font-size: 21px; }
  .lb-nav.prev { left: 8px; }
  .lb-nav.next { right: 8px; }
  .lb-close { right: 12px; top: 12px; width: 38px; height: 38px; }
  .lb-figure { bottom: 62px; }
  .lb-railbox { width: 40vw; }
  .lb-tip { font-size: 10.5px; letter-spacing: .04em; }
  .lb-tip .tip-d { display: none; }
  .lb-tip .tip-m { display: inline; }
  /* 手机上把元信息排紧一点，一行放得下就不折行 */
  .lb-meta { font-size: 11.5px; letter-spacing: 0; }
  .lb-meta span:not(:last-child)::after { margin: 0 5px; }
}

/* ============================ Toast ============================ */
.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%) translateY(12px);
  background: var(--accent); color: #14100a; font-weight: 400;
  padding: 11px 22px; border-radius: 999px; font-size: 13.5px;
  z-index: 4000; opacity: 0; transition: .35s var(--ease);
  box-shadow: 0 18px 40px -18px rgba(0,0,0,.8);
}
.toast.show { opacity: 1; transform: translateX(-50%); }
.toast[hidden] { display: none; }

/* ============================ 图片版权保护 ============================ */
/* 禁拖拽、禁选中、禁 iOS 长按气泡。JS 侧见 guard.js（拦右键/拖拽/保存）。 */
img {
  -webkit-user-drag: none;
  -khtml-user-drag: none;
  -moz-user-drag: none;
  -o-user-drag: none;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
}

.guard-tip {
  position: fixed;
  left: -9999px;
  top: 0;
  z-index: 5200;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: saturate(170%) blur(14px);
  -webkit-backdrop-filter: saturate(170%) blur(14px);
  border: 1px solid var(--line-2);
  color: var(--text);
  font-size: 12.5px;
  letter-spacing: .02em;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  translate: 0 6px;
  transition: opacity .28s var(--ease), translate .28s var(--ease);
  box-shadow: 0 14px 32px -14px rgba(0, 0, 0, .8);
}
.guard-tip.show { opacity: 1; translate: 0 0; }

/* ============================ 滚动进场动效 ============================ */
/* 【重要】所有隐藏样式都挂在 html.motion-ready 之下。这个 class 由 <head>
   里的内联脚本添加，若动效脚本没跑起来，兜底定时器会把它摘掉，
   页面回归静态、内容全部可见 —— 不会出现「JS 挂了整页空白」。

   动效统一用 translate / scale / rotate 这几个**独立属性**，而不是 transform。
   原因：.season-card:hover、.wall-item:hover 已经用了 transform 做上浮，
   用独立属性才能让「进场偏移」和「悬停上浮」叠加而互不覆盖。 */

/* 顶部滚动进度条 */
.scroll-progress {
  position: fixed;
  left: 0; top: 0;
  width: 100%; height: 2px;
  z-index: 1300;
  pointer-events: none;
  transform-origin: 0 50%;
  transform: scaleX(0);
  /* 从左端就是实色 —— 之前写成 transparent 起头，bar 会显得像从 8% 处才开始 */
  background: linear-gradient(90deg, #b0762a, var(--accent) 45%, #f6dfae);
  opacity: 0;
  transition: opacity .5s var(--ease);
}
.scroll-progress.on { opacity: .95; }

html.motion-ready [data-reveal] {
  opacity: 0;
  transition:
    opacity .85s var(--ease),
    translate .95s var(--ease),
    scale .95s var(--ease),
    rotate .95s var(--ease),
    filter .8s var(--ease);
  transition-delay: calc(var(--d, 0ms) + var(--i, 0) * 55ms);
}
/* 上浮：最通用。地图容器也用它 —— scale 会让 Leaflet 的
   坐标投影与视觉位置错位，所以地图绝不能缩放进场。 */
html.motion-ready [data-reveal="rise"] { translate: 0 38px; }
/* 显影：模糊 -> 清晰，贴「暗房胶片」主题，给文字块用 */
html.motion-ready [data-reveal="develop"] { translate: 0 22px; filter: blur(14px); }
/* 缩放回弹：给影集墙的图用 */
html.motion-ready [data-reveal="zoom"] { translate: 0 24px; scale: .93; }
/* 3D 翻起：给四季卡用（需父级 perspective，见下） */
html.motion-ready [data-reveal="card"] { translate: 0 46px; scale: .95; rotate: x 12deg; }

html.motion-ready [data-reveal].is-in {
  opacity: 1;
  translate: 0 0;
  scale: 1 1;
  rotate: x 0deg;
  filter: none;
}

/* 容器内子元素按 --i 逐个错峰入场 */
html.motion-ready [data-stagger] > * {
  opacity: 0;
  translate: 0 26px;
  transition: opacity .8s var(--ease), translate .9s var(--ease);
  transition-delay: calc(var(--d, 0ms) + var(--i, 0) * 85ms);
}
html.motion-ready [data-stagger].is-in > * { opacity: 1; translate: 0 0; }

/* 四季卡的 3D 翻起需要父级透视；从底边翻，才有「立起来」的感觉 */
.season-grid { perspective: 1400px; }
.season-card { transform-origin: 50% 100%; }

/* 首屏视差：背景比内容慢。translate 与 heroZoom 动画的 transform 互不干扰 */
.hero-bg { translate: 0 var(--py, 0px); }
.hero-inner { will-change: opacity, translate; }

/* ============================ 响应式 ============================ */
@media (max-width: 1180px) {
  .season-grid { grid-template-columns: repeat(2, 1fr); }
  .wall { columns: 3; }
}
@media (max-width: 900px) {
  .nav { display: none; }
  .menu-btn { display: grid; }
  .nav.open {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; right: 14px; top: calc(var(--nav-h) - 6px);
    background: var(--glass); backdrop-filter: blur(18px);
    border: 1px solid var(--line); border-radius: 14px; padding: 10px; min-width: 180px;
  }
  .nav.open .nav-link { padding: 10px 14px; }
  .nav.open .btn.ghost { margin-top: 4px; justify-content: center; }
  .panel {
    width: auto; left: 10px; right: 10px; top: auto; bottom: 10px;
    max-height: 62svh;
    transform: translateY(calc(100% + 20px));
    opacity: 0; pointer-events: none;
    transition: transform .45s var(--ease), opacity .3s;
  }
  .panel.open { transform: none; opacity: 1; pointer-events: auto; }
  .map-shell { height: 72svh; }
  .gb-wrap { grid-template-columns: 1fr; }
  .gb-form { position: static; }
  .about-card { grid-template-columns: 1fr; text-align: left; }
  .about-avatar { width: 78px; height: 78px; font-size: 26px; }
  /* ★ 从 4 格加到 5 格（2026-10-05 加了「访客」）后，把原来的一行横排改成能自动换行的网格。
     ★ 触发条件实测（deploy/probe-visits-ui.mjs 里钉着，别凭印象改）：
       旧规则 grid-auto-flow:column 是**强制单行、不换行**。当前数字（≤4 位）在
       320~480px 下还塞得下（最右 279~439px，不溢出）——所以**不是现在就坏**；
       但数字长到 5 位时内容宽 509px，320/390px 视口下真溢出（doc 509 > 视口 320）。
       统计条上的数字只会涨不会跌，所以这条是迟早会炸，不是防御性写法。
     ★ 判溢出别用 window.innerWidth：mobile 设备仿真下它会被溢出的内容一起撑大
       （实测内容 509px 时 innerWidth 也报 509），拿它对比永远检测不到溢出。
       要用 documentElement.clientWidth 或 visualViewport.width。 */
  .about-stats {
    grid-auto-flow: row;
    grid-template-columns: repeat(auto-fit, minmax(74px, auto));
    gap: 12px 10px; justify-content: start;
  }
  .about-stats .as-item { text-align: left; }
  .wall { columns: 2; }
  .section { padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 620px) {
  .season-grid { grid-template-columns: 1fr; }
  .wall { columns: 1; }
  .brand-text em { display: none; }
  .hero-stats { gap: 8px; }
  .lb-nav { width: 42px; height: 42px; font-size: 22px; }
  .lb-nav.prev { left: 8px; } .lb-nav.next { right: 8px; }
  .lb-close { right: 12px; top: 12px; width: 36px; height: 36px; }
  .map-tools { left: 8px; top: 8px; }
  .filter-group { gap: 6px; }
  .chip { padding: 6px 12px; font-size: 12.5px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ============================ 全局背景音乐播放器 ============================ */
/* DOM 由 music.js 自注入（不进 html，这样多页只需各加一个 <script>）：
     .music > .music-mini（折叠态） + .music-panel（展开态）

   z-index 定在 3500：**高于看图遮罩 .lightbox(3000)** —— 看照片时还能切歌；
   低于 .toast(4000) —— 提示条永远浮在最上面，不会被播放器盖住。
   位置放左下角：看图遮罩的关闭键在右上、翻页键在中线、底部文字居中，
   左下是唯一既不压内容也不挡按钮的地方。 */
.music {
  position: fixed;
  left: 18px; bottom: 18px;
  z-index: 3500;
  font-family: var(--font-sans);
  -webkit-tap-highlight-color: transparent;
}
.music[data-state="loading"] { display: none; }   /* 还没确认有没有音频，先不露脸 */
.music.is-open .music-mini { display: none; }
.music:not(.is-open) .music-panel { display: none; }

/* ---------------------------- 折叠态：圆形按钮 + 进度环 ---------------------------- */
.music-mini {
  position: relative;
  width: 50px; height: 50px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  backdrop-filter: blur(14px) saturate(1.3);
  color: var(--accent);
  cursor: pointer;
  padding: 0;
  box-shadow: 0 14px 34px -16px rgba(0, 0, 0, .8);
  transition: transform .28s var(--ease), border-color .28s var(--ease);
}
.music-mini:hover { transform: translateY(-2px); border-color: var(--accent); }
.music-mini-ico { font-size: 20px; line-height: 1; transform: translateY(1px); }
.music-ring { position: absolute; inset: -3px; width: calc(100% + 6px); height: calc(100% + 6px); transform: rotate(-90deg); }
.music-ring-bg { fill: none; stroke: var(--line-2); stroke-width: 2.5; }
.music-ring-fg {
  fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linecap: round;
  /* dasharray/dashoffset 由 JS 按播放进度写 */
  transition: stroke-dashoffset .3s linear;
}
.music[data-state="playing"] .music-mini-ico { animation: musicSpin 3.4s linear infinite; }
.music[data-state="paused"] .music-ring-fg,
.music[data-state="idle"] .music-ring-fg { stroke: var(--muted); }
@keyframes musicSpin { to { transform: translateY(1px) rotate(360deg); } }

/* ------------------------------- 展开态：玻璃卡片 ------------------------------- */
.music-panel {
  width: 272px;
  padding: 12px 14px 11px;
  border-radius: 18px;
  border: 1px solid var(--line-2);
  background: var(--glass);
  -webkit-backdrop-filter: blur(18px) saturate(1.35);
  backdrop-filter: blur(18px) saturate(1.35);
  color: var(--text);
  box-shadow: 0 26px 60px -26px rgba(0, 0, 0, .85);
  animation: musicIn .34s var(--ease);
}
@keyframes musicIn { from { opacity: 0; transform: translateY(10px) scale(.97); } }

.music-head { display: flex; align-items: center; gap: 10px; }
.music-disc {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent);
  border: 1px solid var(--line);
  font-size: 14px;
}
.music[data-state="playing"] .music-disc { animation: musicSpin 3.4s linear infinite; }
.music-disc i { font-style: normal; transform: translateY(1px); }
.music-meta { flex: 1 1 auto; min-width: 0; display: flex; align-items: baseline; gap: 6px; overflow: hidden; }
.music-title { font-size: 14px; color: var(--text); white-space: nowrap; }
.music-artist { font-size: 12px; font-style: normal; color: var(--muted); white-space: nowrap; }
.music-artist::before { content: "· "; }

.music-icobtn {
  flex: 0 0 auto; width: 24px; height: 24px; padding: 0;
  display: grid; place-items: center;
  border-radius: 8px; border: 1px solid transparent;
  background: none; color: var(--muted); cursor: pointer;
  transition: color .2s, background .2s;
}
.music-icobtn:hover { color: var(--text); background: var(--accent-soft); }
.music-icobtn svg { width: 16px; height: 16px; display: block; }
.music-ico-line path { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }

/* ---------------------------------- 进度 ---------------------------------- */
.music-prog { display: flex; align-items: center; gap: 9px; margin-top: 10px; }
.music-clock { flex: 0 0 auto; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.music-cur { color: var(--text-2); }

/* range 统一外观：用 background 渐变当"已播放"填充（--played 由 JS 写）。
   注意 -moz-range-track 要设成透明，否则 Firefox 会盖住自己画的填充。 */
.music-seek, .music-vol {
  --played: 0%;
  -webkit-appearance: none; appearance: none;
  height: 4px; border-radius: 999px; outline: none; cursor: pointer;
  background:
    linear-gradient(var(--accent), var(--accent)) 0 / var(--played) 100% no-repeat,
    var(--line-2);
}
.music-seek { flex: 1 1 auto; min-width: 0; }
.music-vol { flex: 0 0 54px; width: 54px; }
.music-seek::-webkit-slider-thumb, .music-vol::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 11px; height: 11px; border-radius: 50%; border: none;
  background: var(--accent); cursor: pointer;
  box-shadow: 0 1px 5px rgba(0, 0, 0, .45);
}
.music-seek::-moz-range-thumb, .music-vol::-moz-range-thumb {
  width: 11px; height: 11px; border: none; border-radius: 50%;
  background: var(--accent); cursor: pointer;
}
.music-seek::-moz-range-track, .music-vol::-moz-range-track { background: transparent; }
.music-seek:focus-visible, .music-vol:focus-visible { box-shadow: 0 0 0 2px var(--accent-soft); }

/* ---------------------------------- 控制键 ---------------------------------- */
.music-ctrl { display: flex; align-items: center; gap: 8px; margin-top: 11px; }
.music-gap { flex: 1 1 auto; }
.music-btn {
  position: relative;
  width: 34px; height: 34px; padding: 0;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line-2);
  background: var(--elev);
  color: var(--text-2);
  cursor: pointer;
  transition: color .2s, border-color .2s, background .2s, transform .16s var(--ease);
}
.music-btn:hover { color: var(--text); border-color: var(--accent); }
.music-btn:active { transform: scale(.93); }
.music-btn svg { width: 17px; height: 17px; display: block; fill: currentColor; }
.music-toggle { background: var(--accent); border-color: var(--accent); color: #14100a; }
.music-toggle:hover { color: #14100a; }
/* 播放/暂停两个图标叠在一起，靠 data-state 决定显哪个 —— 免去 JS 换 DOM */
.music-toggle .ico-pause { display: none; }
.music[data-state="playing"] .music-toggle .ico-play { display: none; }
.music[data-state="playing"] .music-toggle .ico-pause { display: block; }

.music-volbtn svg path { fill: currentColor; }
.music-volbtn svg .music-w1, .music-volbtn svg .music-w2 {
  fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round;
}
.music[data-mute="1"] .music-volbtn { color: var(--muted); }
.music[data-mute="1"] .music-volbtn svg .music-w1,
.music[data-mute="1"] .music-volbtn svg .music-w2 { display: none; }

/* 自动播放被浏览器拦下时的提示：让播放键呼吸 + 冒一句气泡 */
.music.is-nudge .music-toggle { animation: musicNudge 1.7s ease-in-out infinite; }
/* ★ 窄屏默认是**收起**的，上面那条作用在面板里的按钮上 —— 而面板此刻是
   display:none，等于手机上完全没有提示：访客只看到一个安静的小圆钮，
   既不知道有音乐，也不知道要点它。所以收起态也要会呼吸。 */
.music.is-nudge .music-mini { animation: musicNudge 1.7s ease-in-out infinite; }
.music.is-nudge .music-toggle::after {
  content: "点这里播放";
  position: absolute; left: 50%; bottom: calc(100% + 9px);
  transform: translateX(-50%);
  background: var(--accent); color: #14100a;
  font-size: 11.5px; line-height: 1; padding: 6px 9px; border-radius: 999px;
  white-space: nowrap; pointer-events: none;
  box-shadow: 0 8px 20px -8px rgba(0, 0, 0, .8);
}
@keyframes musicNudge {
  0%, 100% { box-shadow: 0 0 0 0 var(--accent-soft); }
  50% { box-shadow: 0 0 0 8px transparent; }
}

/* 看图遮罩打开时（JS 加 .is-lightbox）在窄屏自动收起，别压住底部那排计数/进度 */
@media (max-width: 620px) {
  .music { left: 12px; bottom: 12px; }
  .music.is-lightbox { /* 展开态也不展开 */ }
  .music.is-lightbox .music-panel { width: 244px; }
  .music-panel { width: 244px; padding: 11px 12px 10px; }
  .music-mini { width: 44px; height: 44px; }
}
/* 触屏设备上没有"悬停调音量"的余裕，音量交给系统键 */
@media (hover: none) {
  .music-vol { display: none; }
}
/* 窄屏 + 看图遮罩时，折叠态也缩小并上移一点，避开遮罩底部的文字 */
@media (max-width: 620px) {
  .music.is-lightbox .music-mini { transform: scale(.9); }
}
