/* =========================================================
   我的画廊 · 前台样式
   设计方向：编辑部式衬线标题、浅灰底、圆角面板、粉色全屏菜单
   ========================================================= */

:root {
  --serif: "Playfair Display", "Noto Serif SC", "Songti SC", "STSong", "SimSun", Georgia, "Times New Roman", serif; /* 与参考站 font-title 同序 */
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;

  --bg: #f1f3f5;
  --panel: #fdfdfd;
  --text: #1b1b1e;
  --text-2: #70757c;
  --text-3: #9aa0a6;
  --line: rgba(20, 20, 24, 0.09);
  --line-strong: rgba(20, 20, 24, 0.18);
  --hover: rgba(20, 20, 24, 0.05);
  --menu-bg: #fbeaeb;
  --menu-text: #2b181a;
  --menu-outline: rgba(74, 34, 38, 0.2);
  --echo-line: rgba(27, 27, 30, 0.16);
  --tint-bg: #e6ebef;
  --tint-panel: #f5f7f8;
  --menu-line: rgba(74, 34, 38, 0.12);
  --menu-muted: rgba(43, 24, 26, 0.55);
  --menu-hover: rgba(74, 34, 38, 0.06);
  --viewer-bg: rgba(240, 242, 244, 0.97);
  /* 面板已经贴到页面底边，外投影会往两侧 70px 泛出去，在左右下角糊出两块灰楔形；
     只留顶部那条内高光，靠面板与底色的色差分层 */
  --shadow-panel: 0 1px 0 rgba(255, 255, 255, 0.7) inset;
  --shadow-float: 0 20px 60px rgba(20, 22, 28, 0.16);
  --radius-panel: 30px;
  --radius-small: 3px;
  --header-h: 72px;
  --gap: 18px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
  --speed: 0.55s;
}

html[data-theme="dark"] {
  --bg: #0d0e0f;
  --panel: #151617;
  --text: #ececee;
  --text-2: #9ba1a8;
  --text-3: #6f747a;
  --line: rgba(255, 255, 255, 0.1);
  --line-strong: rgba(255, 255, 255, 0.22);
  --hover: rgba(255, 255, 255, 0.06);
  --menu-bg: #1d1314;
  --menu-text: #f4e8e9;
  --menu-outline: rgba(255, 232, 233, 0.22);
  --echo-line: rgba(236, 236, 238, 0.17);
  --tint-bg: #121517;
  --tint-panel: #181a1c;
  --menu-line: rgba(255, 232, 233, 0.12);
  --menu-muted: rgba(244, 232, 233, 0.55);
  --menu-hover: rgba(255, 232, 233, 0.08);
  --viewer-bg: rgba(10, 11, 12, 0.97);
  --shadow-panel: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
  --shadow-float: 0 24px 70px rgba(0, 0, 0, 0.55);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color 0.5s var(--ease), color 0.5s var(--ease);
}

body.is-locked {
  overflow: hidden;
}

::selection {
  background: rgba(190, 96, 106, 0.22);
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid rgba(176, 74, 83, 0.7);
  outline-offset: 3px;
}

/* ---------- 噪点质感 ---------- */

.grain {
  position: fixed;
  inset: 0;
  z-index: 120;
  pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='280' height='280'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.6'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

html[data-theme="dark"] .grain {
  mix-blend-mode: screen;
  opacity: 0.07;
}

/* ---------- 取景框（滚动收边，与瀑布流布局解耦，不触发重排） ---------- */

.frame-edge {
  position: fixed;
  inset: 0;
  z-index: 55;
  pointer-events: none;
  border: var(--frame-inset, 0px) solid var(--bg);
  border-radius: calc(var(--radius-panel) + var(--frame-inset, 0px));
  transition: border-color 0.5s var(--ease);
}

/* ---------- 顶栏 ---------- */

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 60;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: max(22px, calc((100vw - 1180px) / 2));
  opacity: 0;
  visibility: hidden;
  transform: translate3d(0, -18px, 0);
  transition: background-color 0.35s var(--ease), backdrop-filter 0.35s var(--ease), box-shadow 0.35s var(--ease),
    opacity 1.2s var(--ease), transform 1.2s var(--ease), visibility 0s linear 1.2s;
}

/* 首屏不显示导航，往下翻才缓缓浮出 */
.site-header.is-revealed {
  opacity: 1;
  visibility: visible;
  transform: none;
  transition: background-color 0.35s var(--ease), backdrop-filter 0.35s var(--ease), box-shadow 0.35s var(--ease),
    opacity 1.2s var(--ease), transform 1.2s var(--ease), visibility 0s linear;
}

.site-header.is-scrolled {
  background: rgba(241, 243, 245, 0.82);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 var(--line);
}

html[data-theme="dark"] .site-header.is-scrolled {
  background: rgba(13, 14, 15, 0.82);
}

.brand {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 600;
  line-height: 1.02;
  letter-spacing: 0.015em;
  display: inline-flex;
  flex-direction: column;
  gap: 1px;
  color: var(--text);
  transition: opacity 0.3s, color 0.4s var(--ease);
}

.brand:hover {
  opacity: 0.68;
}

.brand-line {
  display: block;
}

.menu-btn {
  width: 42px;
  height: 42px;
  /* 内容区正好 26px（=42-8-8），三条线与圆形底色同心；
     没有这圈内边距时线会贴着圆边、整体偏右 8px，看着就是歪的 */
  padding: 8px;
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  border-radius: 50%;
  transition: background-color 0.25s;
}

.menu-btn:hover {
  background: var(--hover);
}

.menu-btn span {
  display: block;
  width: 26px;
  /* 2px 整：1.5px 会让三条线落在半像素上，抗锯齿后中间那条看起来更粗（也是“歪”的一种）
     参考站的菜单线同样是 30×2px、间距 10px */
  height: 2px;
  background: var(--text);
  border-radius: 1px;
  transition: transform 0.3s var(--ease), opacity 0.3s;
}

/* 菜单打开时汉堡变叉：三条线等长且同心，转出来的两笔正好重合（间距 6 + 线宽 2 = 8px） */
.menu-btn.is-open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.menu-btn.is-open span:nth-child(2) { opacity: 0; }
.menu-btn.is-open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- 首屏标题 ---------- */

.page-main {
  padding-top: 0;
}

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding: calc(var(--header-h) + 40px) max(22px, calc((100vw - 1180px) / 2)) clamp(96px, 16vh, 170px);
}

.hero-inner {
  width: 100%;
  transform: translate3d(0, var(--hero-shift, 0px), 0);
  will-change: transform;
  position: relative;
  z-index: 1;
}

/* ---------- 首屏天空层：竖向霞光 + 三团缓慢漂移的云 ---------- */

.hero-sky {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.6s var(--ease);
}

body.inimg .hero-sky,
body.viewing .hero-sky {
  opacity: 0;
}

/* 程序化云气画布：低分辨率绘制后放大，天然柔和 */
.sky-canvas {
  position: absolute;
  left: -10%;
  right: -10%;
  top: -6%;
  width: 120%;
  height: 76%;
  display: block;
  opacity: 0.95;
  filter: contrast(1.5) saturate(1.06) brightness(1.02) blur(2px);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.95) 10%, rgba(0, 0, 0, 0.5) 56%, rgba(0, 0, 0, 0) 92%);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.95) 10%, rgba(0, 0, 0, 0.5) 56%, rgba(0, 0, 0, 0) 92%);
}

html[data-theme="dark"] .sky-canvas {
  opacity: 0.8;
  filter: contrast(1.65) saturate(1.1) brightness(1.05) blur(2px);
}

.sky-wash {
  position: absolute;
  left: -10%;
  right: -10%;
  top: -8%;
  height: 78%;
  background:
    linear-gradient(180deg, rgba(255, 206, 214, 0.5), rgba(255, 206, 214, 0) 66%),
    linear-gradient(118deg, rgba(206, 221, 255, 0.42) 0%, rgba(255, 233, 214, 0.34) 46%, rgba(238, 208, 255, 0.3) 100%);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.92) 8%, rgba(0, 0, 0, 0.45) 52%, rgba(0, 0, 0, 0) 88%);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.92) 8%, rgba(0, 0, 0, 0.45) 52%, rgba(0, 0, 0, 0) 88%);
  will-change: transform, opacity;
  animation: sky-breathe 26s var(--ease) infinite alternate;
}

@keyframes sky-breathe {
  from { transform: translate3d(-5vw, 0, 0) scale(1); opacity: 0.82; }
  to { transform: translate3d(5vw, 1.5vh, 0) scale(1.06); opacity: 1; }
}

.sky-cloud {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(46px) saturate(1.12);
  will-change: transform, opacity;
}

.sky-cloud-1 {
  left: -10vw;
  top: 2vh;
  width: 58vw;
  height: 26vw;
  background: radial-gradient(ellipse at center, rgba(240, 168, 180, 0.5), rgba(240, 168, 180, 0) 70%);
  animation: drift-a 21s var(--ease) infinite alternate;
}

.sky-cloud-2 {
  right: -14vw;
  top: -6vh;
  width: 52vw;
  height: 24vw;
  background: radial-gradient(ellipse at center, rgba(168, 192, 240, 0.42), rgba(168, 192, 240, 0) 72%);
  animation: drift-b 27s var(--ease) infinite alternate;
}

.sky-cloud-3 {
  left: 26vw;
  top: 16vh;
  width: 44vw;
  height: 18vw;
  background: radial-gradient(ellipse at center, rgba(250, 208, 168, 0.36), rgba(250, 208, 168, 0) 70%);
  animation: drift-c 17s var(--ease) infinite alternate;
}

@keyframes drift-a {
  from { transform: translate3d(0, 0, 0) scale(0.94); opacity: 0.7; }
  50% { opacity: 1; }
  to { transform: translate3d(16vw, -5vh, 0) scale(1.16); opacity: 0.78; }
}

@keyframes drift-b {
  from { transform: translate3d(0, 0, 0) scale(1.12); opacity: 0.85; }
  45% { opacity: 1; }
  to { transform: translate3d(-14vw, 7vh, 0) scale(0.9); opacity: 0.62; }
}

@keyframes drift-c {
  from { transform: translate3d(0, 0, 0) scale(0.9); opacity: 0.55; }
  to { transform: translate3d(11vw, 6vh, 0) scale(1.24); opacity: 1; }
}

html[data-theme="dark"] .sky-wash {
  background:
    linear-gradient(180deg, rgba(120, 62, 76, 0.4), rgba(120, 62, 76, 0) 68%),
    linear-gradient(118deg, rgba(40, 58, 96, 0.34) 0%, rgba(96, 66, 44, 0.26) 48%, rgba(70, 44, 96, 0.24) 100%);
}

html[data-theme="dark"] .sky-cloud-1 {
  background: radial-gradient(ellipse at center, rgba(176, 92, 110, 0.3), rgba(176, 92, 110, 0) 70%);
}

html[data-theme="dark"] .sky-cloud-2 {
  background: radial-gradient(ellipse at center, rgba(74, 104, 160, 0.26), rgba(74, 104, 160, 0) 72%);
}

html[data-theme="dark"] .sky-cloud-3 {
  background: radial-gradient(ellipse at center, rgba(168, 124, 76, 0.2), rgba(168, 124, 76, 0) 70%);
}

/* ---------- 头部氛围光带 ---------- */

.hero-glow {
  position: absolute;
  top: calc(var(--header-h) * -0.6);
  left: -6%;
  right: -6%;
  height: clamp(320px, 56vh, 520px);
  z-index: 0;
  pointer-events: none;
  opacity: 0.6;
  background:
    radial-gradient(36% 52% at 16% 0%, rgba(190, 96, 106, 0.36), transparent 72%),
    radial-gradient(28% 46% at 52% 10%, rgba(212, 156, 104, 0.26), transparent 74%),
    radial-gradient(34% 50% at 88% 0%, rgba(94, 116, 168, 0.32), transparent 72%);
  filter: blur(36px) saturate(1.12) contrast(1.3) brightness(1.06);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), transparent 66%);
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.6), transparent 66%);
  animation: glow-drift 18s ease-in-out infinite alternate;
  transition: opacity 0.5s var(--ease);
}

html[data-theme="dark"] .hero-glow {
  opacity: 0.58;
  filter: blur(40px) saturate(1.05) contrast(1.22) brightness(1.12) hue-rotate(-6deg);
}

body.inimg .hero-glow,
body.viewing .hero-glow {
  opacity: 0;
}

@keyframes glow-drift {
  from { transform: translate3d(-1.6%, 0, 0) scale(1); }
  to { transform: translate3d(1.6%, 0, 0) scale(1.05); }
}

/* ---------- 悬停染色（inimg）：全站背景跟随照片主色，字体不变色 ---------- */

body.inimg {
  --bg: var(--tint-bg);
  --panel: var(--tint-panel);
}

.hero-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(58px, 10.4vw, 158px);
  line-height: 0.94;
  letter-spacing: 0.005em;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-line {
  position: relative;
  width: max-content;
  max-width: 100%;
  white-space: nowrap;
  color: var(--text);
  transition: color 0.4s var(--ease), transform 0.2s linear;
}

.hero-line-a {
  padding-left: 0.06em;
  transform: translate3d(calc(var(--scroll, 0px) * 0.25), 0, 0);
}

.hero-line-b {
  align-self: flex-end;
  opacity: 0.92;
  padding-right: 0.02em;
  transform: translate3d(calc(var(--scroll, 0px) * -0.25), 0, 0);
}

/* 品牌字回声：实心字两侧铺满描边副本，随滚动反向平移，实心字在字场里扫过 */
.hero-line::before,
.hero-line::after {
  content: attr(data-echo);
  position: absolute;
  top: 0;
  width: max-content;
  color: transparent;
  -webkit-text-stroke: 1px var(--echo-line);
  text-stroke: 1px var(--echo-line);
  pointer-events: none;
  user-select: none;
  transition: -webkit-text-stroke-color 0.4s var(--ease);
}

.hero-line::before {
  right: 100%;
}

.hero-line::after {
  left: 100%;
}

.hero-tagline {
  margin: clamp(22px, 3.6vh, 38px) 0 0;
  /* 用相对定位下移，不用 margin：hero 是 align-items:center 的 flex，
     加 margin-top 会把整块（含大标题）反向顶上去，标题位置跟着动 */
  position: relative;
  top: clamp(56px, 10vh, 110px);
  text-align: center;
  font-size: 17px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--text-2);
  transition: color 0.4s var(--ease);
}

.hero-scroll {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: 30px;
  display: flex;
  justify-content: center;
  color: var(--text-3);
  opacity: 0.85;
  transition: color 0.4s var(--ease), opacity 0.4s var(--ease);
}

.hero-scroll-arrow {
  display: block;
  width: 26px;
  height: 48px;
  animation: bob 2.2s var(--ease) infinite;
}

@keyframes bob {
  0%, 100% { transform: translateY(-5px); opacity: 0.45; }
  55% { transform: translateY(5px); opacity: 1; }
}

/* ---------- 内容面板 ---------- */

.panel {
  position: relative;
  z-index: 2;
  /* 底部不留 margin、下两角不圆：30px 大圆角配 10px 边距时，下角会被啃出一个楔形，
     加上 0 26px 70px 的投影在染色背景上糊成一块“多出来的圆角”，看着像脏块 */
  margin: 0 10px;
  padding: clamp(16px, 3.2vw, 44px);
  border-radius: var(--radius-panel) var(--radius-panel) 0 0;
  background: var(--panel);
  box-shadow: var(--shadow-panel);
  transition: background-color 0.5s var(--ease);
}

.grid {
  position: relative;
  min-height: 46vh;
  transition: height 0.45s var(--ease);
}

/* ---------- 瀑布流卡片 ---------- */

.card {
  position: absolute;
  top: 0;
  left: 0;
  overflow: hidden;
  border-radius: var(--radius-small);
  background: rgb(var(--card-color, 216, 216, 216));
  cursor: zoom-in;
  opacity: 0;
  transform: translate3d(0, 0, 0);
  outline: 0 solid rgba(255, 255, 255, 0);
  outline-offset: 0;
  transition:
    transform var(--speed) var(--ease),
    opacity 0.6s var(--ease),
    width var(--speed) var(--ease),
    height var(--speed) var(--ease),
    outline-width 0.14s ease,
    outline-color 0.2s ease;
  will-change: transform;
  -webkit-tap-highlight-color: transparent;
}

.card.is-in {
  opacity: 1;
}

/* 卡片 hover：白色描边快速展开 */
@media (hover: hover) {
  .card:hover {
    outline: 6px solid rgba(255, 255, 255, 0.95);
  }
}

.card:focus-visible {
  outline: 6px solid rgba(255, 255, 255, 0.95);
}

html[data-theme="dark"] .card:hover,
html[data-theme="dark"] .card:focus-visible {
  outline-color: rgba(201, 203, 206, 0.95);
}

/* 打开照片时其余卡片交错淡出（.faded 为完成态标记） */
.card.fade-out,
.card.faded {
  opacity: 0;
  pointer-events: none;
}

body.viewing .site-footer {
  opacity: 0;
}

.site-footer {
  transition: opacity 0.45s var(--ease);
}

.card::before {
  content: "";
  position: absolute;
  inset: -6%;
  background-image: var(--lqip, none);
  background-size: cover;
  background-position: center;
  filter: blur(16px) saturate(1.15);
  transform: scale(1.08);
  opacity: 0.92;
  transition: opacity 0.7s var(--ease);
  z-index: 0;
}

.card.is-loaded::before {
  opacity: 0;
}

.card-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.75s var(--ease), transform 1.4s var(--ease), filter 0.5s;
  z-index: 1;
}

.card.is-loaded .card-img {
  opacity: 1;
}

.card-tag {
  position: absolute;
  top: 10px;
  left: 12px;
  z-index: 3;
  font-family: var(--serif);
  font-size: 11px;
  letter-spacing: 0.14em;
  color: rgba(255, 255, 255, 0.94);
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}

.card-meta {
  position: absolute;
  inset: auto 0 0 0;
  z-index: 3;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  padding: 54px 14px 12px;
  background: linear-gradient(to top, rgba(8, 9, 10, 0.55), rgba(8, 9, 10, 0));
  color: #fff;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
  pointer-events: none;
}

.card:hover .card-meta,
.card:focus-visible .card-meta {
  opacity: 1;
  transform: translateY(0);
}

.card-meta-title {
  font-family: var(--serif);
  font-size: 14px;
  line-height: 1.35;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5);
}

.card-meta-date {
  flex: none;
  font-size: 10px;
  letter-spacing: 0.14em;
  opacity: 0.82;
}

@media (hover: hover) {
  .card:hover .card-img {
    transform: scale(1.03);
  }
}

html.hdr-on .card-img,
html.hdr-on .viewer-img {
  filter: saturate(1.14) contrast(1.045) brightness(1.01);
}

/* ---------- 空状态 ---------- */

.empty {
  min-height: 42vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  text-align: center;
  color: var(--text-2);
  font-family: var(--serif);
}

.empty p {
  margin: 0;
  font-size: clamp(22px, 3vw, 32px);
}

.empty-link {
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--text-2);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 2px;
  transition: color 0.25s, border-color 0.25s;
}

.empty-link:hover {
  color: var(--text);
  border-color: var(--text);
}

/* ---------- 页脚 ---------- */

.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 10px;
  margin-top: clamp(26px, 4vw, 42px);
  padding-top: 16px;
  border-top: 1px solid var(--line);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  color: var(--text-3);
}

.footer-sep {
  opacity: 0.6;
}

/* 分隔符和它后面的项打包在一起，开关关掉时整段一起消失，不会留下孤立的「·」 */
.footer-part {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* 页脚附加文字：在 flex 行里独占一行 */
.footer-note {
  flex-basis: 100%;
  margin-top: 6px;
  opacity: 0.85;
  /* 这一项占满整行，父级的 justify-content 管不到里面的文字，必须自己居中 */
  text-align: center;
}

.footer-btn {
  color: var(--text-3);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  border-bottom: 1px solid transparent;
  padding: 0;
  transition: color 0.25s, border-color 0.25s;
}

.footer-btn:hover {
  color: var(--text);
  border-color: var(--text);
}

/* ---------- 全屏菜单 ---------- */

.menu-overlay {
  position: fixed;
  inset: 8px;
  z-index: 90;
  animation: overlay-in 0.45s var(--ease);
}

@keyframes overlay-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.menu-panel {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  padding: clamp(18px, 3vw, 42px);
  border-radius: var(--radius-panel);
  background: var(--menu-bg);
  color: var(--menu-text);
  overflow: hidden;
  box-shadow: var(--shadow-float);
}

.menu-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px var(--menu-line);
}

.menu-close {
  position: absolute;
  top: clamp(14px, 2.6vw, 30px);
  right: clamp(14px, 2.6vw, 30px);
  width: 46px;
  height: 46px;
  z-index: 5;
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: background-color 0.25s;
}

.menu-close:hover {
  background: rgba(0, 0, 0, 0.05);
}

html[data-theme="dark"] .menu-close:hover {
  background: rgba(255, 255, 255, 0.06);
}

.menu-close span {
  position: absolute;
  width: 24px;
  height: 1.5px;
  background: var(--menu-text);
}

.menu-close span:first-child { transform: rotate(45deg); }
.menu-close span:last-child { transform: rotate(-45deg); }

.menu-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
}

.menu-row {
  position: relative;
  flex: 1;
  min-height: 96px;
  max-height: 27vh;
  display: flex;
  align-items: center;
  overflow: hidden;
  border-bottom: 1px solid var(--menu-line);
  text-align: center;
  cursor: pointer;
}

.menu-row:last-child {
  border-bottom: 0;
}

/* 字场是标签自身的 ::before / ::after：从标签左右两侧分开铺满，绝不压到标签上 */
.menu-label-text {
  position: relative;
  transition: color 0.25s var(--ease), text-shadow 0.25s var(--ease);
}

.menu-label-text::before,
.menu-label-text::after {
  content: attr(data-echo);
  position: absolute;
  top: 0.045em;
  width: max-content;
  white-space: nowrap;
  font-size: 0.958em;
  color: var(--menu-bg);
  text-shadow: -0.021em -0.021em 0 var(--menu-text), 0.021em -0.021em 0 var(--menu-text),
    -0.021em 0.021em 0 var(--menu-text), 0.021em 0.021em 0 var(--menu-text);
  pointer-events: none;
  transition: color 0.25s var(--ease), text-shadow 0.25s var(--ease);
}

.menu-label-text::before {
  right: 100%;
}

.menu-label-text::after {
  left: 100%;
}

/* HDR 行右侧带 BETA 竖牌：字场从徽标右侧起排，避免压字 */
.menu-row[data-row="hdr"] .menu-label-text::after {
  left: calc(100% + 0.62em);
}

/* 悬停整行反色：标签转空心、两侧字场转实心（与参考站一致） */
.menu-row:hover .menu-label-text {
  color: var(--menu-bg);
  text-shadow: -0.021em -0.021em 0 var(--menu-text), 0.021em -0.021em 0 var(--menu-text),
    -0.021em 0.021em 0 var(--menu-text), 0.021em 0.021em 0 var(--menu-text);
}

.menu-row:hover .menu-label-text::before,
.menu-row:hover .menu-label-text::after {
  color: var(--menu-text);
  text-shadow: none;
}

.menu-label {
  position: relative;
  z-index: 2;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-left: clamp(14px, 12vw, 260px);
  gap: 14px;
  font-family: var(--serif);
  font-size: 48px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: normal;
  color: var(--menu-text);
  pointer-events: none;
}

/* 与参考站一致的断点：md 60px、lg 72px */
@media (min-width: 768px) {
  .menu-label {
    font-size: 60px;
  }
}

@media (min-width: 1024px) {
  .menu-label {
    font-size: 72px;
  }
}

/* 当前值已经由字场本身表达（与参考站一致），不再单独显示小标签 */
.menu-state {
  display: none;
  font-family: var(--sans);
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--menu-muted);
  font-weight: 400;
  transform: translateY(0.15em);
}

.badge-beta {
  display: inline-block;
  font-size: 0.22em;
  letter-spacing: 0.05em;
  line-height: 1;
  padding: 0.2em 0.32em 0.24em;
  background: var(--menu-text);
  color: var(--menu-bg);
  transform: rotate(90deg) translate(0.35em);
  margin-left: -22px;
}

/* ---------- 关于 ---------- */

.about-overlay {
  position: fixed;
  inset: 8px;
  z-index: 95;
  overflow-y: auto;
  border-radius: var(--radius-panel);
  background: var(--menu-bg);
  color: var(--menu-text);
  animation: overlay-in 0.4s var(--ease);
  box-shadow: var(--shadow-float);
}

.about-panel {
  position: relative;
  min-height: 100%;
  padding: clamp(80px, 12vh, 150px) 24px 60px;
}

.about-close {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 5;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  color: var(--menu-text);
  display: grid;
  place-items: center;
  transform-origin: 50% 50%;
  transition: background-color 0.25s, transform 0.3s;
}

/* 与灯箱关闭按钮同一套几何叉号：文字 × 偏心，转起来会晃 */
.about-close span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 22px;
  height: 1.5px;
  margin: -0.75px 0 0 -11px;
  background: currentColor;
  border-radius: 1px;
}

.about-close span:first-child { transform: rotate(45deg); }
.about-close span:last-child { transform: rotate(-45deg); }

.about-close:hover {
  background: rgba(0, 0, 0, 0.06);
  transform: rotate(90deg);
}

.about-body {
  max-width: 720px;
  margin: 0 auto;
}

.about-title {
  margin: 0 0 clamp(26px, 5vh, 48px);
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(42px, 7vw, 86px);
  line-height: 1;
  letter-spacing: 0.02em;
}

.about-prose {
  font-size: 16px;
  line-height: 2.05;
  letter-spacing: 0.01em;
  color: var(--menu-text);
}

.about-prose p {
  margin: 0 0 1.35em;
}

.about-prose p:last-child {
  margin-bottom: 0;
}

.about-contact {
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid var(--menu-line);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 26px;
  font-size: 13px;
  letter-spacing: 0.06em;
}

.about-contact a {
  border-bottom: 1px solid var(--menu-line);
  padding-bottom: 2px;
  transition: border-color 0.25s;
}

.about-contact a:hover {
  border-color: currentColor;
}

.about-copy {
  margin: clamp(44px, 8vh, 80px) 0 0;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--menu-muted);
}

/* ---------- 照片详情 ---------- */

.viewer {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--viewer-bg);
  -webkit-backdrop-filter: blur(22px);
  backdrop-filter: blur(22px);
  animation: overlay-in 0.35s var(--ease);
  overflow: hidden;
}

.viewer.is-closing {
  animation: overlay-out 0.28s var(--ease) both;
}

@keyframes overlay-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

.viewer-stage {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 88px 150px 150px;
  cursor: zoom-out;
}

/* 打开 / 关闭时被 FLIP 的容器：占满舞台内容区，加载层和大图一起从缩略图位置飞到居中 */
.viewer-fly {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  transform-origin: 50% 50%;
  perspective: 1600px;
}

/* 3D 翻转层：铺满舞台，背面用 JS 量出来的照片实际矩形定位
   （百分比 max-height 在 auto 高度的父盒里不生效，靠 CSS 缩不出一模一样的尺寸） */
.viewer-card {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-style: preserve-3d;
  transition: transform 0.72s var(--ease);
}

.viewer.is-flipped .viewer-card {
  transform: rotateY(180deg);
}

.viewer-img {
  display: block;
  max-width: calc(100% - var(--vz, 0) * 12vw);
  max-height: calc(100% - var(--vz, 0) * 15vh);
  width: auto;
  height: auto;
  object-fit: contain;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  cursor: pointer;
  opacity: 0;
  transform: scale(0.99);
  transition:
    opacity 0.55s var(--ease),
    transform 0.7s var(--ease),
    filter 0.5s,
    max-width 0.35s var(--ease),
    max-height 0.35s var(--ease);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.24);
  background: rgba(0, 0, 0, 0.04);
  user-select: none;
  -webkit-user-drag: none;
}

.viewer-img.is-loaded {
  opacity: 1;
  transform: scale(1);
}

/* 加载层：模糊的 LQIP 底 + 斜 45° 的 Loading 字格，尺寸由 JS 对齐到照片画框 */
.viewer-loading {
  position: absolute;
  inset: 10%;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 0.4s var(--ease),
    visibility 0s linear 0.4s;
}

.viewer-loading.is-active {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.4s var(--ease);
}

.vl-blur {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  filter: blur(16px);
  transform: scale(1.2);
}

/* 字格比画框四周各多出 300px，漂移时不会露出边缘（外层 .viewer-loading 已 overflow:hidden） */
.vl-words {
  position: absolute;
  inset: -300px;
  width: calc(100% + 600px);
  height: calc(100% + 600px);
  opacity: 0.4;
}

/* 实心与空心两层沿各自基线反向漂移；位移量 = pattern 格子 267px，正好一格，循环无缝
   （参考站是在 loading.svg 里用 SMIL animate 做的，dur=3s repeatCount=indefinite） */
@keyframes vl-drift-solid {
  from { transform: translate(0, 0); }
  to { transform: translate(-267px, 267px); }
}

@keyframes vl-drift-hollow {
  from { transform: translate(0, 0); }
  to { transform: translate(267px, -267px); }
}

.vl-drift-solid {
  animation: vl-drift-solid 3s linear infinite;
}

.vl-drift-hollow {
  animation: vl-drift-hollow 3s linear infinite;
}

.vl-word {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 60px;
  text-anchor: middle;
  dominant-baseline: central;
  fill: var(--vl-ink, #fff);
  stroke: none;
}

.vl-hollow {
  fill: none;
  stroke: var(--vl-ink, #fff);
  stroke-width: 2.6;
  stroke-linecap: round;
}

/* 没有 LQIP 可用时（早期数据 / 抓取失败）字格换前景色，避免白字落在浅色底上看不见 */
.viewer-loading.no-lqip {
  --vl-ink: var(--line-strong);
}

.viewer-loading.no-lqip .vl-blur {
  display: none;
}

/* 液态扭曲只在切换照片的那一下挂上 */
.viewer-loading.is-warping {
  filter: url(#galleryWarp);
}

.vl-defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.viewer-close {
  position: absolute;
  top: 20px;
  right: 24px;
  z-index: 6;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  color: var(--text);
  display: grid;
  place-items: center;
  transform-origin: 50% 50%;
  transition: background-color 0.25s, transform 0.35s var(--ease);
}

/* 用两根短线画叉，不用文字 ×：文字字形在 em 框里不居中（实测墨迹中心偏下 2px），
   旋转 90° 时整体会斜着晃一下；改成几何线后旋转中心与图形中心重合，也不会被自定义字体带歪 */
.viewer-close span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 24px;
  height: 1.5px;
  margin: -0.75px 0 0 -12px;
  background: currentColor;
  border-radius: 1px;
}

.viewer-close span:first-child { transform: rotate(45deg); }
.viewer-close span:last-child { transform: rotate(-45deg); }

.viewer-close:hover {
  background: var(--hover);
  transform: rotate(90deg);
}

.viewer-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--serif);
  font-size: 30px;
  color: var(--text-2);
  transition: background-color 0.25s, color 0.25s, opacity 0.3s;
}

.viewer-nav:hover {
  background: var(--hover);
  color: var(--text);
}

.viewer-nav[disabled] {
  opacity: 0.25;
  pointer-events: none;
}

.viewer-prev { left: 16px; }
.viewer-next { right: 16px; }

/* 左下：标题 + 拍摄地点（与右下那组元信息同一基线、左右呼应） */
.viewer-caption {
  position: absolute;
  left: clamp(20px, 4vw, 64px);
  bottom: clamp(22px, 4vw, 52px);
  z-index: 4;
  max-width: min(46vw, 460px);
  color: var(--text);
  pointer-events: none;
}

.vc-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(18px, 2.2vw, 26px);
  line-height: 1.25;
  letter-spacing: 0.02em;
}

.vc-title[hidden] {
  display: none;
}

.vc-place {
  margin: 8px 0 0;
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--text-2);
}

.vc-place[hidden] {
  display: none;
}

.viewer-info {
  position: absolute;
  right: clamp(20px, 4vw, 64px);
  bottom: clamp(22px, 4vw, 52px);
  z-index: 4;
  max-width: min(46vw, 460px);
  text-align: right;
  color: var(--text);
  pointer-events: none;
}

.vi-date {
  margin: 0 0 8px;
  font-family: var(--serif);
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1;
  letter-spacing: 0.03em;
}

.vi-exif {
  margin: 0 0 5px;
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--text-2);
}

.vi-focal {
  margin: 0 0 3px;
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--text-2);
}

.vi-camera {
  margin: 0;
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--text-2);
}

.viewer-count {
  position: absolute;
  top: 28px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  font-size: 11px;
  letter-spacing: 0.24em;
  color: var(--text-3);
  pointer-events: none;
}

/* ---------- 灯箱内容进场动画（每次开图/切图重放） ---------- */

.viewer.reveal .viewer-close {
  animation: vi-fade 0.5s var(--ease) both;
}

.viewer.reveal .viewer-nav {
  animation: vi-fade 0.6s var(--ease) both;
  animation-delay: 0.18s;
}

.viewer.reveal .viewer-count {
  animation: vi-fade 0.6s var(--ease) both;
  animation-delay: 0.1s;
}

.viewer.reveal .viewer-info {
  animation: vi-slide-right 0.8s cubic-bezier(0.25, 1, 0.5, 1) both;
  animation-delay: 0.12s;
}

.viewer.reveal .viewer-caption {
  animation: vi-slide-left 0.8s cubic-bezier(0.25, 1, 0.5, 1) both;
  animation-delay: 0.12s;
}

@keyframes vi-slide-left {
  from { opacity: 0; transform: translate3d(-18px, 0, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes vi-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes vi-slide-right {
  from { opacity: 0; transform: translate3d(18px, 0, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}

@keyframes pop-in {
  from { opacity: 0; transform: translateY(6px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.viewer-back {
  position: absolute;
  inset: 0;
  margin: auto;   /* 与 flex 居中的图片用同一套定位规则，尺寸由 JS 按照片实际矩形给 */
  display: flex;
  flex-direction: column;
  padding: clamp(16px, 2.4vw, 32px) clamp(16px, 2.6vw, 34px);
  border-radius: 0;   /* 照片是直角画框，背面也保持直角（原 4px 圆角已按站长要求去掉） */
  background: var(--panel);
  color: var(--text);
  box-shadow: 0 18px 46px rgba(20, 22, 28, 0.22);
  overflow: auto;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  transform: rotateY(180deg);
  cursor: pointer;
}

.vb-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.vb-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(17px, 2.2vw, 24px);
  letter-spacing: 0.02em;
}

/* 翻回照片的按钮：图标是「左右镜像」那一类（双箭头 + 两个背对背三角形），
   比原来那个 ↺ 文字符号更直白地说"这是一次翻面"，而不是"重置" */
.vb-turn {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: none;
  color: var(--text-2);
  cursor: pointer;
  transition: transform 0.4s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}

.vb-turn svg {
  width: 18px;
  height: 18px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* 三角形实心 + 同色描边：描边只为把三个尖角磨圆，宽度控制在 1 以免两个三角糊在一起 */
.vb-turn .vb-turn-tri {
  fill: currentColor;
  stroke-width: 1;
}

/* 背面底部居中：margin-top:auto 把它顶到面底；点击穿透给背面做翻回用 */
.vb-sign {
  margin-top: auto;
  align-self: center;
  display: flex;
  justify-content: center;
  padding-top: 18px;
  pointer-events: none;
  user-select: none;
}

.vb-sign[hidden] {
  display: none;
}

.vb-turn:hover {
  color: var(--text);
  border-color: var(--line-strong);
  transform: scaleX(-1);   /* 镜像一下，正好是这个图标本身的语义 */
}

@media (prefers-reduced-motion: reduce) {
  .viewer-card {
    transition: none;
  }
}

.info-list {
  margin: 0;
  display: grid;
  grid-template-columns: minmax(90px, auto) 1fr;
  gap: 0;
  font-size: 13.5px;
}

.info-list dt {
  padding: 9px 0;
  color: var(--text-2);
  border-bottom: 1px solid var(--line);
  letter-spacing: 0.06em;
}

.info-list dd {
  margin: 0;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
  text-align: right;
  word-break: break-word;
}

.info-list dt:last-of-type,
.info-list dd:last-of-type {
  border-bottom: 0;
}

/* ---------- 提示 ---------- */

.noscript {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-content: center;
  text-align: center;
  line-height: 2;
  background: var(--bg);
  color: var(--text);
  padding: 24px;
}

/* ---------- 响应式 ---------- */

@media (max-width: 1100px) {
  .viewer-stage {
    padding: 80px 96px 160px;
  }
}

@media (max-width: 900px) {
  .site-header {
    padding-inline: 22px;
  }

  .hero {
    padding-left: 22px;
    padding-right: 22px;
  }

  .hero-scroll {
    display: none;
  }

  .panel {
    margin: 0 8px;
    border-radius: 22px 22px 0 0;
  }

  .menu-overlay,
  .about-overlay {
    inset: 6px;
  }

  .menu-panel {
    border-radius: 22px;
  }

  .viewer-stage {
    padding: 72px 18px 214px;
  }

  /* 窄屏两块都是通栏：说明放上面、元信息放下面，避免叠在一起 */
  .viewer-caption {
    left: 20px;
    right: 20px;
    bottom: 176px;
    max-width: none;
  }

  .viewer-info {
    left: 20px;
    right: 20px;
    bottom: 92px;
    max-width: none;
    /* 窄屏这块本来就横向铺满，位置无所谓，保持左对齐不变 */
    text-align: left;
  }

  .vi-date {
    font-size: 24px;
    margin-bottom: 6px;
  }

  .vi-camera {
    display: none;
  }

  .viewer-count {
    top: 22px;
    font-size: 10px;
  }

  .viewer-nav {
    width: 42px;
    height: 42px;
    background: rgba(253, 253, 253, 0.65);
    background: color-mix(in srgb, var(--panel) 65%, transparent);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
  }

  .viewer-prev { left: 6px; }
  .viewer-next { right: 6px; }
}

@media (max-width: 640px) {
  :root {
    --header-h: 64px;
    --gap: 12px;
  }

  .brand {
    font-size: 17px;
  }

  .hero {
    min-height: 78vh;
    min-height: 78svh;
    padding-top: calc(var(--header-h) + 24px);
    padding-bottom: 64px;
  }

  .hero-tagline {
    font-size: 13px;
    letter-spacing: 0.24em;
  }

  .sky-cloud {
    filter: blur(28px) saturate(1.08);
  }

  .sky-cloud-3 {
    display: none;
  }

  .hero-title {
    font-size: clamp(52px, 17vw, 96px);
  }

  .panel {
    padding: 14px;
    border-radius: 18px 18px 0 0;
  }

  .site-footer {
    font-size: 10.5px;
  }

  .menu-panel {
    padding: 18px;
  }

  .menu-row {
    min-height: 84px;
    max-height: 22vh;
  }

  .menu-label {
    gap: 10px;
  }

  .menu-state {
    font-size: 9px;
  }

  .about-panel {
    padding: 88px 22px 44px;
  }

  .about-close {
    top: 14px;
    right: 14px;
  }

  .about-prose {
    font-size: 14.5px;
    line-height: 1.95;
  }

  .info-list {
    font-size: 12.5px;
    grid-template-columns: minmax(76px, auto) 1fr;
  }

  .viewer-stage {
    padding: 62px 10px 240px;
  }

  .vi-exif,
  .vi-focal {
    font-size: 11px;
    letter-spacing: 0.1em;
  }

}

/* ---------- 降低动态效果 ---------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .hero-inner {
    transform: none !important;
  }
}

/* ---------- 滚动条 ---------- */

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-thumb {
  background: rgba(120, 124, 130, 0.45);
  background: color-mix(in srgb, var(--text-3) 45%, transparent);
  border-radius: 999px;
  border: 3px solid var(--bg);
}

::-webkit-scrollbar-track {
  background: transparent;
}

/* ---------- 关于页：头像 / 版权 / 赞赏名单 / 赞赏码浮层 ---------- */

/* 签名图：尺寸与左右留白由后台设置注入的 --sign-height / --sign-margin 控制 */
/* 署名：落在关于正文的右下角，像写完信随手一签，整块稍向上斜 */
.about-sign {
  display: flex;
  justify-content: flex-end;
  margin-top: clamp(14px, 3vh, 28px);
}

.about-sign[hidden] {
  display: none;
}

.about-avatar {
  /* 允许在行宽不够时收缩（object-fit: contain 会等比留白，不会拉变形），
     但给一个与高度挂钩的下限，避免被压到看不见 */
  flex: 0 1 auto;
  min-width: calc(var(--sign-height, 56px) * 1.5);
  box-sizing: content-box;
  height: var(--sign-height, 56px);
  width: auto;
  /* 上限（高度×5）由后台算好注入成固定 px，这里不做乘法也不掺 vw，保持简单可预测 */
  max-width: var(--sign-max, 280px);
  padding-inline: var(--sign-margin, 20px);
  /* 负外边距抵掉自身右留白：签名可见右边缘与正文右边缘对齐，左留白是它与文字的间距；
     放在签名上而不是 .about-sign 上，没配签名时才不会把整块推歪 */
  margin-right: calc(-1 * var(--sign-margin, 20px));
  object-fit: contain;
  transform: rotate(-5deg);
  transform-origin: right bottom;
}

/* 浅 / 深两张签名：靠 data-theme 换显隐，关于页与页脚共用同一套规则 */
.sign-dark {
  display: none;
}

html[data-theme="dark"] .sign-light {
  display: none;
}

html[data-theme="dark"] .sign-dark:not([hidden]) {
  display: block;
}

/* 页脚上方的签名：独占一行并居中（作者样式会盖过 [hidden]，所以显式补一条） */
.footer-sign {
  flex-basis: 100%;
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.footer-sign[hidden] {
  display: none;
}

.footer-sign-img {
  box-sizing: content-box;
  height: var(--sign-height, 56px);
  width: auto;
  max-width: var(--sign-max, 280px);
  object-fit: contain;
}

/* ---------- 足迹地图 ---------- */
.footprint-overlay {
  position: fixed;
  inset: 8px;
  z-index: 95;
  border-radius: var(--radius-panel);
  overflow: hidden;
  background: var(--menu-bg);
  color: var(--menu-text);
  animation: overlay-in 0.4s var(--ease);
  box-shadow: var(--shadow-float);
}

.footprint-panel {
  position: relative;
  height: 100%;
  overflow: hidden;
  --fp-dot: #b04a53;
  --fp-dot-ring: #fdfdfd;
  --fp-label-bg: rgba(253, 253, 253, 0.94);
  --fp-label-ink: #2b181a;
}

html[data-theme="dark"] .footprint-panel {
  --fp-dot: #e2949b;
  --fp-dot-ring: #17181a;
  --fp-label-bg: rgba(23, 24, 26, 0.94);
  --fp-label-ink: #f4e8e9;
}

/* 地图只占标题以下那块，右上角关闭键与左上角标题都不被压住 */
.footprint-stage {
  position: absolute;
  inset: clamp(150px, 20vh, 200px) clamp(14px, 2.2vw, 30px) clamp(14px, 3vh, 30px);
  border: 1px solid var(--menu-line);
  border-radius: 18px;
  overflow: hidden;
  background: var(--tint-bg);
}

.footprint-map {
  position: absolute;
  inset: 0;
  /* 必须自己成一个层叠上下文：z-index:auto 时 SDK 内部那些带层级的 div
     会越过 .fp-pins 盖在最上面，圆点就点不动（elementFromPoint 命中的是地图） */
  z-index: 1;
  background: var(--tint-bg);
}

/* 默认底图是亮蓝海洋 + 高饱和，压一压才贴这套配色的低饱和调子；
   深色整体反相，且只作用在 canvas 上，圆点与卡片保持自己的颜色 */
.footprint-map canvas {
  filter: saturate(0.78) contrast(1.04) brightness(1.01);
}

html[data-theme="dark"] .footprint-map canvas {
  filter: invert(1) hue-rotate(180deg) saturate(0.5) brightness(0.92) contrast(1.04);
}

/* 列表模式下地图隐藏，圆点层与缩放控件一起收起来 */
.footprint-map[hidden] ~ .fp-pins,
.footprint-map[hidden] ~ .fp-tools {
  display: none;
}

.fp-pins {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.fp-pin {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  padding: 0;
  border: 0;
  background: none;
  pointer-events: auto;
  cursor: pointer;
}

.fp-pin.is-out {
  display: none;
}

.fp-dot {
  position: absolute;
  left: -8px;
  top: -8px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--fp-dot);
  border: 2px solid var(--fp-dot-ring);
  box-shadow: 0 2px 10px rgba(20, 22, 28, 0.28);
  transition: transform 0.28s var(--ease), box-shadow 0.28s var(--ease);
}

.fp-pin:hover .fp-dot {
  transform: scale(1.3);
}

.fp-pin.is-on .fp-dot {
  width: 24px;
  height: 24px;
  left: -12px;
  top: -12px;
  box-shadow: 0 0 0 6px rgba(176, 74, 83, 0.22), 0 2px 12px rgba(20, 22, 28, 0.34);
}

.fp-count {
  position: absolute;
  left: 6px;
  top: -16px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 9px;
  background: var(--fp-dot);
  color: var(--fp-dot-ring);
  font-size: 10px;
  font-weight: 700;
  line-height: 17px;
  text-align: center;
}

.fp-name {
  position: absolute;
  left: 0;
  top: 12px;
  transform: translateX(-50%);
  max-width: 190px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--fp-label-bg);
  color: var(--fp-label-ink);
  font-size: 11px;
  letter-spacing: 0.06em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s var(--ease);
}

.fp-pin:hover .fp-name,
.fp-pin.is-on .fp-name {
  opacity: 1;
}

.fp-pin.is-on .fp-name {
  top: 16px;
}

.fp-tools {
  position: absolute;
  right: 14px;
  bottom: 14px;
  z-index: 6;
  display: flex;
  overflow: hidden;
  border: 1px solid var(--menu-line);
  border-radius: 10px;
  background: var(--fp-label-bg);
  box-shadow: 0 2px 10px rgba(20, 22, 28, 0.14);
}

.fp-tool {
  width: 34px;
  height: 32px;
  border: 0;
  border-left: 1px solid var(--menu-line);
  background: none;
  color: var(--fp-label-ink);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s var(--ease);
}

.fp-tool:first-child {
  border-left: 0;
}

.fp-tool:hover {
  background: var(--menu-hover);
}

.footprint-map[hidden] {
  display: none;
}

.footprint-head {
  position: absolute;
  top: clamp(18px, 4vh, 40px);
  left: clamp(18px, 4vw, 44px);
  right: clamp(18px, 4vw, 44px);
  z-index: 5;
  pointer-events: none;
}

.footprint-title {
  margin: 0;
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(30px, 5vw, 58px);
  line-height: 1;
  letter-spacing: 0.02em;
}

.footprint-sub {
  margin: 10px 0 0;
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--menu-muted);
}

.footprint-card {
  position: absolute;
  left: clamp(18px, 4vw, 44px);
  bottom: clamp(18px, 3vh, 30px);
  z-index: 6;
  width: min(420px, calc(100% - 36px));
  max-height: min(58vh, 420px);
  overflow-y: auto;
  padding: 18px 20px 20px;
  border: 1px solid var(--menu-line);
  border-radius: 14px;
  background: var(--menu-bg);
  box-shadow: var(--shadow-float);
}

.footprint-card[hidden] {
  display: none;
}

.fp-card-close {
  position: absolute;
  top: 10px;
  right: 12px;
  border: 0;
  background: none;
  font-size: 20px;
  line-height: 1;
  color: var(--menu-muted);
  cursor: pointer;
}

.fp-card-title {
  margin: 0 0 4px;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.fp-card-meta {
  margin: 0 0 14px;
  font-size: 11px;
  letter-spacing: 0.14em;
  color: var(--menu-muted);
}

.fp-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.fp-thumb {
  position: relative;
  display: block;
  padding: 0;
  border: 0;
  border-radius: var(--radius-small);
  overflow: hidden;
  background: rgb(var(--card-color, 216, 216, 216));
  cursor: zoom-in;
  aspect-ratio: 1 / 1;
}

@supports not (aspect-ratio: 1 / 1) {
  .fp-thumb {
    height: 96px;
  }
}

.fp-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s var(--ease);
}

.fp-thumb:hover img {
  transform: scale(1.06);
}

.footprint-fallback {
  position: absolute;
  inset: 0;
  z-index: 5;
  overflow-y: auto;
  padding: 22px clamp(18px, 4vw, 40px) 30px;
  background: var(--menu-bg);
}

.footprint-fallback[hidden] {
  display: none;
}

.fp-group {
  margin-bottom: 26px;
}

.fp-group-title {
  margin: 0 0 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--menu-muted);
}

@media (max-width: 700px) {
  .footprint-card {
    left: 12px;
    right: 12px;
    bottom: 12px;
    width: auto;
    max-height: 46vh;
  }

  .fp-card-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ---------- 友情链接浮层（复用 .about-overlay / .about-panel 的外观） ---------- */
.link-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--menu-line);
}

.link-item {
  border-bottom: 1px solid var(--menu-line);
}

.link-a {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 6px;
  color: inherit;
  text-decoration: none;
  transition: background 0.3s var(--ease);
}

.link-a:hover,
.link-a:focus-visible {
  background: var(--menu-hover);
}

.link-icon {
  position: relative;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 1px solid var(--menu-line);
  border-radius: 10px;
  overflow: hidden;
  font-family: var(--serif);
  font-size: 17px;
  color: var(--menu-muted);
}

.link-fallback {
  transition: opacity 0.25s var(--ease);
}

/* 图标叠在首字上面，用透明度切换而不是 display —— display:none 的
   loading=lazy 图片浏览器压根不发请求，「加载成功才显示」会永远等不到 */
.link-icon img {
  position: absolute;
  inset: 2px;
  width: auto;
  height: auto;
  object-fit: contain;
  opacity: 0;
  transition: opacity 0.25s var(--ease);
}

.link-icon.has-icon img {
  opacity: 1;
}

.link-icon.has-icon .link-fallback {
  opacity: 0;
}

.link-body {
  min-width: 0;
  flex: 1 1 auto;
}

.link-name {
  display: block;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.link-desc {
  display: block;
  margin-top: 4px;
  font-size: 12.5px;
  line-height: 1.75;
  letter-spacing: 0.04em;
  color: var(--menu-muted);
}

.link-arrow {
  flex: 0 0 auto;
  font-size: 14px;
  color: var(--menu-muted);
  transition: transform 0.3s var(--ease);
}

.link-a:hover .link-arrow,
.link-a:focus-visible .link-arrow {
  transform: translate(2px, -2px);
}

.about-copyright {
  margin: 34px 0 0;
  padding-top: 20px;
  border-top: 1px solid var(--menu-line);
  font-size: 12px;
  line-height: 1.95;
  letter-spacing: 0.04em;
  color: var(--menu-muted);
}

.about-section-title {
  margin: 0 0 18px;
  font-family: var(--serif);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.26em;
  color: var(--menu-muted);
}

.about-supporters {
  margin-top: 40px;
}

.supporter-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 14px 26px;
}

.supporter-item {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--menu-line);
}

.supporter-line {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.supporter-name {
  min-width: 0;
  font-size: 14px;
  letter-spacing: 0.04em;
  color: var(--menu-text);
  overflow-wrap: anywhere;
}

.supporter-amount {
  margin-left: auto;
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.06em;
  color: var(--menu-muted);
  white-space: nowrap;
}

.supporter-note {
  margin: 6px 0 0;
  font-size: 12px;
  line-height: 1.7;
  color: var(--menu-muted);
}

.about-actions {
  margin-top: 42px;
}

.about-tip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 22px;
  border: 1px solid var(--menu-line);
  border-radius: 999px;
  font-size: 12.5px;
  letter-spacing: 0.14em;
  color: var(--menu-text);
  transition: background-color 0.25s, border-color 0.25s, color 0.25s;
}

.about-tip::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.55;
}

.about-tip:hover {
  background: var(--menu-hover);
  border-color: var(--menu-text);
}

.tip-mask {
  position: fixed;
  inset: 0;
  z-index: 8;
  background: rgba(12, 12, 14, 0.34);
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
  animation: overlay-in 0.25s var(--ease);
}

.tip-pop {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 9;
  width: min(86vw, 320px);
  padding: 26px 24px 22px;
  transform: translate(-50%, -50%);
  border: 1px solid var(--menu-line);
  border-radius: 20px;
  background: var(--menu-bg);
  color: var(--menu-text);
  box-shadow: var(--shadow-float);
  text-align: center;
  animation: overlay-in 0.28s var(--ease);
}

.tip-title {
  margin: 0 0 16px;
  font-family: var(--serif);
  font-size: 13px;
  letter-spacing: 0.24em;
  color: var(--menu-muted);
}

.tip-qr {
  display: block;
  width: 100%;
  max-width: 220px;
  margin: 0 auto;
  border-radius: 10px;
  background: #fff;
}

.tip-figs {
  display: flex;
  justify-content: center;
  gap: 18px;
}

.tip-fig {
  flex: 0 1 auto;
  min-width: 0;
  margin: 0;
}

.tip-pop.dual {
  width: min(92vw, 440px);
}

.tip-pop.dual .tip-qr {
  max-width: 168px;
}

.tip-caption {
  margin-top: 10px;
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--menu-muted);
  text-align: center;
}

/* 标签只在「两张 + 窄屏」时出现，宽屏直接并排 */
.tip-tabs {
  display: none;
  justify-content: center;
  gap: 6px;
  margin: 0 0 14px;
}

.tip-tab {
  padding: 6px 14px;
  border: 1px solid var(--menu-line);
  border-radius: 999px;
  font-size: 11.5px;
  letter-spacing: 0.1em;
  color: var(--menu-muted);
  transition: color 0.25s, border-color 0.25s, background-color 0.25s;
}

.tip-tab.is-active {
  color: var(--menu-text);
  border-color: var(--menu-text);
}

@media (max-width: 560px) {
  .tip-pop.dual {
    width: min(90vw, 320px);
  }

  .tip-pop.dual .tip-tabs {
    display: flex;
  }

  .tip-pop.dual .tip-fig {
    display: none;
  }

  .tip-pop.dual .tip-fig.is-active {
    display: block;
  }

  .tip-pop.dual .tip-qr {
    max-width: 220px;
  }
}

.tip-note {
  margin: 16px 0 0;
  font-size: 12px;
  line-height: 1.8;
  color: var(--menu-muted);
}

.tip-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--menu-text);
  display: grid;
  place-items: center;
  transition: background-color 0.25s;
}

.tip-close span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 16px;
  height: 1.5px;
  margin: -0.75px 0 0 -8px;
  background: currentColor;
  border-radius: 1px;
}

.tip-close span:first-child { transform: rotate(45deg); }
.tip-close span:last-child { transform: rotate(-45deg); }

.tip-close:hover {
  background: var(--menu-hover);
}

@media (max-width: 640px) {
  .supporter-list {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px 16px;
  }
}

/* =========================================================
   v1.33.0 前台移动端适配：刘海/手势条安全区、触摸可点区、
   照片背面在窄屏下的紧凑排布、横屏矮视口的舞台留白
   ========================================================= */

:root {
  --sa-t: env(safe-area-inset-top, 0px);
  --sa-b: env(safe-area-inset-bottom, 0px);
  --sa-l: env(safe-area-inset-left, 0px);
  --sa-r: env(safe-area-inset-right, 0px);
}

/* 头部是 fixed 且 viewport-fit=cover，刘海会把品牌与菜单按钮压进状态栏 */
.site-header {
  height: calc(var(--header-h) + var(--sa-t));
  padding-top: var(--sa-t);
  padding-left: max(calc(22px + var(--sa-l)), calc((100vw - 1180px) / 2 + var(--sa-l)));
  padding-right: max(calc(22px + var(--sa-r)), calc((100vw - 1180px) / 2 + var(--sa-r)));
}

.hero {
  padding-top: calc(var(--header-h) + 40px + var(--sa-t));
}

/* 照片面板贴到屏幕底，手势条会盖住最后一行与页脚 */
.panel {
  padding-bottom: calc(clamp(16px, 3.2vw, 44px) + var(--sa-b));
}

.menu-close {
  top: calc(clamp(14px, 2.6vw, 30px) + var(--sa-t));
  right: calc(clamp(14px, 2.6vw, 30px) + var(--sa-r));
}

.about-close {
  top: calc(24px + var(--sa-t));
  right: calc(24px + var(--sa-r));
}

.about-panel {
  padding-bottom: calc(44px + var(--sa-b));
}

.viewer-close {
  top: calc(20px + var(--sa-t));
  right: calc(24px + var(--sa-r));
}

.viewer-prev { left: calc(16px + var(--sa-l)); }
.viewer-next { right: calc(16px + var(--sa-r)); }

.viewer-caption,
.viewer-info {
  bottom: calc(clamp(22px, 4vw, 52px) + var(--sa-b));
}

.fp-tools {
  right: calc(14px + var(--sa-r));
  bottom: calc(14px + var(--sa-b));
}

.footprint-card {
  bottom: calc(12px + var(--sa-b));
}

/* ---------- 背面装不下时的紧凑排布（JS 量完内容高度再决定加不加） ---------- */

.viewer-back.is-tight {
  padding: 12px 14px;
  --sign-height: 34px;
}

.viewer-back.is-tight .vb-head {
  margin-bottom: 2px;
}

.viewer-back.is-tight .vb-title {
  font-size: 15px;
}

.viewer-back.is-tight .info-list {
  font-size: 11.5px;
  grid-template-columns: minmax(64px, auto) 1fr;
}

.viewer-back.is-tight .info-list dt,
.viewer-back.is-tight .info-list dd {
  padding: 4px 0;
}

/* 紧凑模式下标题压到 13px，回转按钮里的图标得跟着缩，否则 18px 的图撑破 40px 的圆 */
.viewer-back.is-tight .vb-turn svg {
  width: 14px;
  height: 14px;
}

.viewer-back.is-tight .vb-sign {
  padding-top: 8px;
}

/* ---------- 触摸设备：可点区补到 44px 上下 ---------- */

@media (hover: none) and (pointer: coarse) {
  .menu-btn {
    width: 46px;
    height: 46px;
  }

  .viewer-nav {
    width: 46px;
    height: 46px;
  }

  .fp-tool {
    width: 44px;
    height: 40px;
  }

  .vb-turn {
    width: 40px;
    height: 40px;
  }

  /* 页脚那两个文字按钮很小（实测 24×19 / 17×19），用伪元素把命中区撑开，
     不占布局、视觉一个字都不动 */
  .footer-btn {
    position: relative;
  }

  .footer-btn::after {
    content: "";
    position: absolute;
    inset: -12px -10px;
  }

  .menu-btn,
  .menu-close,
  .about-close,
  .viewer-close,
  .viewer-nav,
  .fp-tool,
  .fp-pin,
  .vb-turn,
  .footer-btn,
  .menu-row {
    touch-action: manipulation;
  }
}

/* ≤900 里两块说明是上下堆叠的（通栏），上面的定值会被安全区规则连带盖掉，补回来 */
@media (max-width: 900px) {
  .viewer-stage {
    padding: calc(72px + var(--sa-t)) 18px calc(214px + var(--sa-b));
  }

  /* 窄屏下这两块本来就通栏，居中的同时左右各让出 62px 给上下张按钮 */
  .viewer-caption,
  .viewer-info {
    left: 62px;
    right: 62px;
    max-width: none;
    text-align: center;
  }

  .viewer-caption {
    bottom: calc(176px + var(--sa-b));
  }

  .viewer-info {
    bottom: calc(92px + var(--sa-b));
  }

  /* 上下张按钮从照片正中间挪到底部这条带上，与元信息同一水平线：
     原来两个半透明圆片浮在照片上，既挡画面又看不出能点，
     现在给一层淡底色，读起来就是两个正经按钮 */
  .viewer-nav {
    top: auto;
    bottom: calc(84px + var(--sa-b));
    transform: none;
    background: var(--hover);
  }

  .viewer-prev {
    left: calc(10px + var(--sa-l));
  }

  .viewer-next {
    right: calc(10px + var(--sa-r));
  }
}

/* ---------- 手机横屏：视口只有三四百高，原来的底部留白会吃掉大半画面 ---------- */

@media (orientation: landscape) and (max-height: 560px) {
  .viewer-stage {
    padding: calc(52px + var(--sa-t)) 64px calc(118px + var(--sa-b));
  }

  /* 横屏时元信息落到 34px，按钮跟着同一基线（差 8px 对齐中线） */
  .viewer-nav {
    bottom: calc(26px + var(--sa-b));
  }

  /* 同一基线就要让位：按钮占掉左右 56px，文字块再往里收一点 */
  .viewer-caption,
  .viewer-info {
    left: calc(76px + var(--sa-l));
    right: calc(76px + var(--sa-r));
  }

  .viewer-caption {
    bottom: calc(74px + var(--sa-b));
  }

  .viewer-info {
    bottom: calc(34px + var(--sa-b));
  }

  .hero {
    min-height: auto;
    padding-top: calc(var(--header-h) + 24px + var(--sa-t));
    padding-bottom: 40px;
  }
}

/* ---------- 窄屏（≤640）里重声明一遍带安全区的值，避免被上面的规则盖回定值 ---------- */

@media (max-width: 640px) {
  .hero {
    padding-top: calc(var(--header-h) + 24px + var(--sa-t));
  }

  .about-close {
    top: calc(14px + var(--sa-t));
    right: calc(14px + var(--sa-r));
  }

  .about-panel {
    padding: 88px 22px calc(44px + var(--sa-b));
  }

  .viewer-stage {
    padding: calc(62px + var(--sa-t)) 10px calc(240px + var(--sa-b));
  }
}

/* ---------- 美化地址指向已删除照片时的一句人话 ---------- */
.route-note {
  position: fixed;
  left: 50%;
  bottom: calc(28px + var(--sa-b));
  transform: translateX(-50%);
  z-index: 60;
  max-width: min(84vw, 520px);
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: 0 12px 30px rgba(20, 22, 28, 0.16);
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
  opacity: 0;
  animation: route-note-in 0.4s ease forwards;
}

.route-note.is-out {
  opacity: 0;
  transform: translateX(-50%) translateY(8px);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

@keyframes route-note-in {
  from { opacity: 0; transform: translateX(-50%) translateY(8px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .route-note {
    animation: none;
    opacity: 1;
  }
}
