/* ============================================
   慢慢写恋心话 · 清新极简风
   ============================================ */

/* ============================================================
   ★★★ 参数速查表：改颜色 / 字号 / 尺寸 / 圆角 / 透明度，只改这里 ★★★
   - 改完保存，刷新浏览器（F5）即可看到效果，不需要让 AI 改。
   - 下面按「颜色 / 字体 / 圆角阴影 / 布局 / 播放器 / 日历」分组。
   ============================================================ */
:root {
  /* ---------- 颜色 ---------- */
  --bg: #faf8f5;          /* 页面背景（奶油白） */
  --bg-alt: #f4f1ec;      /* 分区浅灰背景 */
  --surface: #ffffff;     /* 卡片白 */
  --ink: #3d3a39;         /* 主文字颜色 */
  --ink-soft: #6b6661;    /* 次要文字颜色（已加深到 5:1 对比度，达标 WCAG AA） */
  --accent: #e8837a;      /* 主色：珊瑚粉（改这里=全站换主色；只用于按钮底/色块/装饰，不用作文字） */
  --accent-soft: #f6d9d5; /* 柔和粉（浅色底、hover 底） */
  --accent-deep: #dd746b; /* 主色加深（按钮 hover 用） */
  --accent-text: #c85a51; /* 强调文字专用深珊瑚（约 4.5:1，文字场景用这个，比 --accent 更清晰） */
  --author-blue: #5b9bd5;      /* 小莫署名选中高亮色（蓝色，可自己调） */
  --author-blue-soft: #dbe8f6;  /* 小莫署名选中浅色底（可自己调） */
  --author-blue-deep: #3f7db8;  /* 小莫署名选中文字色（深蓝，可自己调） */
  --author-label-size: 1.15rem; /* 署名「我是」标签字号（可自己调） */
  --world-title-size: 1.15rem;  /* 「我们的世界」卡片标题字号（可自己调） */
  --line: #ece7e0;        /* 分隔线 / 网格线 */
  --holiday: #e0483e;     /* 日历法定节假日数字的红色 */
  --danger: #c0564a;      /* 危险操作（删除等）红，统一危险按钮用 */

  /* ---------- 字体 ---------- */
  --serif: "Noto Serif SC", "Songti SC", serif;        /* 标题字体 */
  --sans: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif; /* 正文字体 */

  /* ---------- 圆角 / 阴影 ---------- */
  --radius-sm: 8px;                                      /* 小标签 / 菜单项 / 缩略图 */
  --radius: 12px;                                        /* 卡片 / 弹层 / 输入框 */
  --radius-lg: 20px;                                     /* 大卡片 / 面板 / 相册照片 */
  --shadow: 0 10px 30px rgba(60, 50, 45, 0.06);          /* 普通阴影 */
  --shadow-lg: 0 18px 50px rgba(60, 50, 45, 0.10);       /* 弹层阴影 */

  /* ---------- 布局 ---------- */
  --nav-h: 64px;          /* 顶部导航栏高度 */
  --player-h: 80px;       /* 底部播放器高度（两行布局：进度条独占一行，见下方媒体查询） */

  /* ---------- 播放器 ---------- */
  --cover-size: 46px;     /* 封面尺寸（宽=高） */
  --cover-lift: 10px;      /* 封面额外上移量：0=不突出（与歌名对齐），正数向上突出，负数下沉（单位 px） */
  --slider-track: #e8e2da; /* 音量滑条未填充轨道色（浅色，拉杆以上部分） */
  --slider-fill: #e8837a;  /* 音量滑条已填充深色（拉杆以下，从底部填到拉杆） */
  --player-gutter: 9%;    /* 手机端播放器第一行左右留白比例（与进度条两端对齐；调大=留白更多、歌名更窄，调小=反之） */
  --player-tab-w: 52px;    /* 播放器顶部凸起宽度（梯形，可自己调） */
  --player-tab-h: 16px;    /* 播放器顶部凸起高度（收起后露出屏幕底部的高度，可自己调） */

  /* ---------- 日历 ---------- */
  --cal-dim: 0.35;                                  /* 前后月补位日期的透明度（0~1，越小越透明） */
  --cal-day-size: clamp(1rem, 3.6cqw, 1.7rem);      /* 日期数字字号：随日历宽度按比例缩放（上限收窄，避免平板横屏过大） */
  --cal-sub-size: clamp(0.6rem, 3cqw, 0.95rem);     /* 农历字号（约日期的一半） */
  --cal-fest-size: clamp(0.55rem, 2.8cqw, 0.85rem); /* 节日名字号 */
  --cal-heart-size: 44%;      /* 日期小爱心占格子的比例（22%≈四分之一格） */
  --cal-heart-angle: 35deg;   /* 爱心倾斜角度（45deg=向右上斜） */
  --cal-heart-opacity: 0.38;  /* 爱心透明度（0~1，越小越淡） */

  /* ---------- 地图控制中心 ---------- */
  --map-ctrl-w: clamp(180px, 17vw, 340px); /* 控制中心展开宽度（17%屏宽，可自己调；手机端见底部媒体查询） */
  --map-ctrl-tab-w: 16px;    /* 梯形把手凸出宽度（可自己调） */
  --map-ctrl-tab-h: 54px;    /* 梯形把手高度（可自己调） */
  --map-ctrl-vpad: 0px;      /* 控制中心面板上下留白（已贴满，默认 0，可自己调） */
  --map-ctrl-bg: #fbf1ef;    /* 控制中心底层底色（极浅粉，可自己调） */
  --mc-album-h: 46vh;        /* 城市展开后微型相册最大高度（超出则内部滚动，可自己调） */
  --photo-pop-shadow: 0 24px 60px rgba(60, 50, 45, 0.28); /* 地图大图浮层阴影（可自己调强弱） */
  --region-p-fill: #e8837a;  /* 点亮省填充色（浅粉） */
  --region-p-opacity: 0.24;  /* 点亮省填充透明度（0~1，越小越浅） */
  --region-c-fill: #e8837a;  /* 点亮市填充色（深粉，透明度更高=更深） */
  --region-c-opacity: 0.52;  /* 点亮市填充透明度（比省大=更深） */
  --region-stroke: #c85a51;  /* 点亮区域深粉描边 */

  /* ---------- 高德地图 logo/版权（挪到右下角+缩小+半透明，合规折中，可调） ---------- */
  --amap-logo-scale: 0.62;   /* 缩放（越小越不显眼；别低于 0.5，否则难辨认） */
  --amap-logo-opacity: 0.55; /* 透明度（0~1，越小越淡） */
  --amap-logo-right: 4px;    /* 距右边缘 */
  --amap-logo-bottom: 4px;   /* logo 距底部 */
}

* { margin: 0; padding: 0; box-sizing: border-box; }

/* 极细滚动条（保留滚动功能，兼顾网站浏览感） */
* { scrollbar-width: thin; scrollbar-color: #d8d1c8 transparent; }
*::-webkit-scrollbar { width: 6px; height: 6px; }
*::-webkit-scrollbar-track { background: transparent; }
*::-webkit-scrollbar-thumb { background: #d8d1c8; border-radius: 3px; }
*::-webkit-scrollbar-thumb:hover { background: #c4bcb2; }

/* 移动端：去掉点击时的蓝色高亮/半透明闪烁（tap highlight） */
html { -webkit-tap-highlight-color: transparent; }
a, button, [role="button"], [tabindex], input, textarea, label {
  -webkit-tap-highlight-color: transparent;
}
/* 只保留键盘（Tab）导航时的焦点框，去掉鼠标/触摸点击后的默认蓝色方框 */
*:focus:not(:focus-visible) { outline: none; }

/* 备案开关：interactive=false 时隐藏互动入口（config.js 会给 body 打 data-interactive="off"） */
body[data-interactive="off"] #weDropdown,
body[data-interactive="off"] #uploadTrigger,
body[data-interactive="off"] #archiveTrigger,
body[data-interactive="off"] #clearUploadTrigger {
  display: none !important;
}

/* ---------- 访问密码锁（gate.js 动态插入） ---------- */
.gate {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: var(--bg);
}
.gate-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  width: min(320px, 88vw);
  padding: 40px 30px;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  text-align: center;
}
.gate-title { font-size: 1.5rem; font-weight: 700; color: var(--ink); }
.gate-sub { font-size: 0.86rem; color: var(--ink-soft); }
.gate-input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: 1rem;
  text-align: center;
  color: var(--ink);
  background: var(--surface);
  outline: none;
}
.gate-input:focus { border-color: var(--accent); }
.gate-btn {
  width: 100%;
  padding: 11px;
  border: none;
  border-radius: var(--radius);
  background: var(--accent);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  transition: background .2s ease;
}
.gate-btn:hover { background: var(--accent-deep); }
.gate-err { min-height: 1.2em; font-size: 0.8rem; color: var(--danger); }

/* 整屏滚动由 JS 自定义动画驱动，此处关闭原生平滑滚动避免干扰 */
html { scroll-behavior: auto; }

/* overflow-x: clip 不会创建滚动容器，不会破坏 position: sticky */
html, body { overflow-x: clip; }

body {
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  padding-top: var(--nav-h);      /* 给固定导航留出高度 */
  padding-bottom: 0;              /* 播放器改为浮层覆盖，不再占位推挤页面（方案A） */
}

body.no-scroll, html.no-scroll { overflow: hidden; }

/* 全局：文本不可选中、无 I 型光标（应用式手感），仅输入框/可编辑描述保留 */
body { cursor: default; }
body *, body *::before, body *::after {
  -webkit-user-select: none;
  user-select: none;
}
input, textarea, [contenteditable="true"] {
  -webkit-user-select: text;
  user-select: text;
  cursor: text;
}
/* 音量滑条等 range 输入不显示文本光标，纯滑块手感 */
input[type="range"] {
  -webkit-user-select: none;
  user-select: none;
  cursor: pointer;
}
[contenteditable="true"] { caret-color: var(--accent); }

/* 内容文字可选中（留言/愿望/胶囊正文，方便长按复制；主页标题/情话/导航/按钮/装饰不可选中） */
.message-content, .wish-title, .wish-note, .capsule-content,
.world-quote, .world-card-text, .world-wish-preview-title,
.cal-note-text, .detail-content, .detail-note, .detail-title {
  -webkit-user-select: text;
  user-select: text;
}

/* 键盘焦点态（无障碍）：与 hover 同色系的可视焦点 */
.nav-link:focus-visible,
.dropdown-item:focus-visible,
.notes-btn:focus-visible,
.upload-btn:focus-visible,
.upload-trigger:focus-visible,
.wish-filter-btn:focus-visible,
.p-btn:focus-visible,
.library-close:focus-visible,
.cal-card-more:focus-visible,
.cal-cell:focus-visible,
.cal-mp-month:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.container { width: min(1120px, 92%); margin: 0 auto; }

/* ---------- 导航（固定在顶部 + 下拉） ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(250, 248, 245, 0.85);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}
.nav-links { display: flex; align-items: center; gap: 30px; }
.brand {
  text-decoration: none;
  color: var(--ink);
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.15rem;
  white-space: nowrap;
}
.nav-link {
  text-decoration: none;
  color: var(--ink-soft);
  font-size: 0.95rem;
  transition: color .2s;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--sans);
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  line-height: 1;      /* 统一按钮高度，避免继承 body 的 1.7 导致带下拉/直链按钮高低不一 */
}
.nav-link:hover { color: var(--accent); }
.caret { font-size: 0.68rem; line-height: 1; }

.dropdown { position: relative; line-height: 1; display: inline-flex; align-items: center; }
.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);   /* 与按钮留 8px 间距，避免紧贴/冲突 */
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 6px;
  min-width: 190px;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s, transform .2s, visibility .2s;
  z-index: 300;
}
/* 展开只由 .open 类控制（hover 展开改由 JS 模拟，避免触屏 sticky hover 导致收不回去） */
.dropdown.open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.dropdown.open .caret { transform: rotate(180deg); }
.caret { transition: transform .2s; display: inline-block; }
.dropdown-item {
  display: block;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.92rem;
  white-space: nowrap;
}
.dropdown-item:hover { background: var(--accent-soft); color: var(--accent); }

/* ---------- 主页内容容器（用于转场时的缩小/上移） ---------- */
.home-content {
  transition: transform .5s cubic-bezier(.22, 1, .36, 1), opacity .5s, visibility 0s 0s;
  will-change: transform, opacity;
}
/* 任何覆盖层打开：主页先「推远+淡出」，转场结束后彻底隐藏，
   杜绝主页底部从覆盖层下露出（已去掉 blur，转场不再卡顿） */
body.showing-album .home-content,
body.showing-map .home-content,
body.showing-library .home-content,
body.showing-calendar .home-content,
body.showing-notes .home-content {
  transform: translateY(70px) scale(0.94);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: transform .5s cubic-bezier(.22, 1, .36, 1), opacity .5s, visibility 0s .5s;
}

/* ---------- Hero（整屏 + 元素居中 + 滚动缩小/模糊） ---------- */
.hero {
  position: sticky;
  top: var(--nav-h);
  z-index: 1;
  min-height: calc(100vh - var(--nav-h));
  min-height: calc(100dvh - var(--nav-h));
  display: flex;
  align-items: stretch;
  justify-content: center;
  text-align: left;
  padding: 44px 0 30px;
  will-change: transform, filter, opacity;
}
.hero-inner {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 48px;
  width: min(1120px, 92%);
}
.hero-top,
.hero-mid,
.hero-bottom {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.hero-eyebrow {
  letter-spacing: 0.35em;
  font-size: 0.8rem;
  color: var(--accent-text);
  text-transform: uppercase;
  margin-bottom: 14px;
}
/* 标题：全页最大 */
.hero-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.5rem, 8vw, 5.2rem);
  line-height: 1.15;
  letter-spacing: 0.01em;
  margin-bottom: 12px;
}
.hero-subtitle {
  font-family: var(--serif);
  color: var(--ink-soft);
  font-size: 1.05rem;
}

/* 计时器（比标题小一档） */
.counter {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(6px, 1.6vw, 14px);
}
.counter-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  padding: clamp(12px, 2.2vw, 20px) clamp(10px, 2.2vw, 16px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: clamp(13px, 2.6vw, 20px);
  box-shadow: var(--shadow);
}
.counter-num {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 4.6vw, 2.7rem);
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.counter-label { font-size: clamp(0.7rem, 1.8vw, 0.9rem); color: var(--ink-soft); margin-top: 8px; }
.counter-sep { font-family: var(--serif); font-size: clamp(1rem, 3.4vw, 2rem); color: #c9c2ba; }
.counter-caption { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 6px; }
.counter-days-big {
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--ink);
}

/* ---------- 横屏 / 矮视口（手机横屏、小窗口）：整屏内容压缩到一屏内 ---------- */
@media (max-height: 620px) {
  .hero {
    padding: 14px 0 62px;   /* 底部留出播放器的位置 */
  }
  .hero-inner {
    gap: 18px;
    /* 横屏贴着左边缘会显得空，整块内容往中间挪（改这个值即可微调左右位置） */
    --hero-indent: clamp(0px, 16vw, 190px);
    width: calc(92% - var(--hero-indent));
    margin-left: var(--hero-indent);
  }
  .hero-eyebrow {
    font-size: 0.68rem;
    letter-spacing: 0.3em;
    margin-bottom: 6px;
  }
  .hero-title {
    font-size: clamp(1.7rem, 5.4vw, 3.2rem);
    line-height: 1.08;
    margin-bottom: 6px;
  }
  .hero-subtitle { font-size: 0.9rem; }
  .counter { gap: clamp(4px, 1vw, 10px); }
  .counter-item {
    padding: 7px clamp(8px, 1.4vw, 14px);
    border-radius: 12px;
  }
  .counter-num { font-size: clamp(1.05rem, 2.6vw, 1.9rem); }
  .counter-label { font-size: 0.66rem; margin-top: 4px; }
  .counter-sep { font-size: clamp(0.9rem, 2vw, 1.3rem); }
  .counter-caption { font-size: 0.8rem; margin-bottom: 3px; }
  .counter-days-big { font-size: 0.98rem; }
  /* 照片墙标题在横屏也收一档，避免顶到上下边缘 */
  .photo-hero-title {
    font-size: clamp(1.5rem, 4vw, 3rem);
    padding: clamp(16px, 4vw, 40px);
  }
}

/* 极矮视口（部分手机横屏 + 浏览器工具栏）再收一档 */
@media (max-height: 430px) {
  .hero { padding: 10px 0 54px; }
  .hero-inner { gap: 12px; }
  .hero-title { font-size: clamp(1.4rem, 4.4vw, 2.4rem); }
  .hero-subtitle { font-size: 0.82rem; }
  .counter-item { padding: 5px 9px; border-radius: 10px; }
  .counter-num { font-size: clamp(0.95rem, 2.2vw, 1.5rem); }
  .counter-caption { font-size: 0.74rem; }
  .counter-days-big { font-size: 0.9rem; }
}

/* ---------- 照片墙整屏大图（滚动叠上 + 由模糊转实 + 从大变到正常） ---------- */
.photo-hero-section {
  position: relative;
  z-index: 2;
  padding: 0;
  background: #000;
  overflow: hidden;
  will-change: opacity, filter;
}
.photo-hero {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  height: 100dvh;
  min-height: 420px;
  overflow: hidden;
  text-decoration: none;
  text-align: center;
  will-change: transform;
}
.photo-hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  transition: transform .6s ease;
}
.photo-hero:hover .photo-hero-bg { transform: scale(1.05); }
.photo-hero-overlay { position: absolute; inset: 0; background: rgba(12, 8, 6, 0.6); }
.photo-hero-title {
  position: relative;
  z-index: 1;
  color: #fff;
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 5.5vw, 4.2rem);
  line-height: 1.35;
  letter-spacing: 0.04em;
  padding: clamp(28px, 6vw, 72px);
  text-shadow: 0 6px 40px rgba(0, 0, 0, 0.8), 0 2px 14px rgba(0, 0, 0, 0.65);
  will-change: transform, filter, opacity;
}
/* 上方衔接渐变：固定占背景 50%，不透明度由 JS 驱动（初始透明 → 行程结束不透明） */
.photo-hero-grad {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 50%;
  background: linear-gradient(to bottom, var(--bg) 0%, rgba(250, 248, 245, 0) 100%);
  opacity: 0;
  pointer-events: none;
  z-index: 1;
  will-change: opacity;
}

/* ---------- 相册覆盖层（无缝转场） ---------- */
.album-overlay {
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  background: var(--bg);
  overflow-y: auto;
  overflow-x: clip;
  overscroll-behavior: contain;
  transform: translateX(100%);
  visibility: hidden;
  pointer-events: none;
  transition: transform .5s cubic-bezier(.22, 1, .36, 1), visibility 0s .5s;
  will-change: transform;
}
.album-overlay.active {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
  transition: transform .5s cubic-bezier(.22, 1, .36, 1), visibility 0s 0s;
}
.album-scroll { padding-bottom: 32px; }

.album-hero { padding: 88px 0 44px; text-align: center; }
.album-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 5.5vw, 3.4rem);
  line-height: 1.4;
  letter-spacing: 0.02em;
  will-change: transform, filter, opacity;
}
/* 进入相册时：标题从屏幕中央滑到顶部，与主页照片墙标题无缝衔接 */
body.showing-album .album-title {
  animation: albumTitleIn .55s cubic-bezier(.22, 1, .36, 1);
}
@keyframes albumTitleIn {
  from { transform: translateY(40vh) scale(1.25); opacity: 1; filter: blur(0); }
  to   { transform: translateY(0) scale(1);       opacity: 1; filter: blur(0); }
}

.album-group { padding: 28px 0; }
.album-group-title {
  font-family: var(--serif);
  font-size: 1.55rem;
  font-weight: 400;
  letter-spacing: 0.06em;
  margin-bottom: 22px;
  padding-left: 18px;
  border-left: 2px solid var(--accent);
}
.album-location-title {
  font-family: var(--sans);
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--ink-soft);
  margin: 22px 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.album-location-title::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}
.album-grid {
  /* 瀑布流：按照片原比例错落排布（列优先，高度自然不裁剪） */
  columns: 260px;
  column-gap: 18px;
}
.album-photo {
  position: relative;
  margin: 0 0 18px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  break-inside: avoid;
  -webkit-column-break-inside: avoid;
}
.album-photo img {
  width: 100%;
  height: auto;       /* 保持照片原始比例，不做统一裁剪 */
  display: block;
  transition: transform .4s;
}
.album-photo:hover img { transform: scale(1.06); }

/* ---------- 上传照片 ---------- */
.album-actions {
  margin-top: 22px;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 12px;
}
.album-actions .upload-trigger { margin-top: 0; }

.upload-trigger {
  border: 1.5px dashed var(--accent);
  background: var(--accent-soft);
  color: var(--accent-deep);
  border-radius: 999px;
  padding: 10px 24px;
  font-size: 0.95rem;
  font-family: var(--sans);
  cursor: pointer;
  transition: background .2s, transform .2s;
}
.upload-trigger:hover { background: #f0c7c2; transform: translateY(-1px); }
.upload-trigger-alt {
  border-style: solid;
  background: transparent;
  color: var(--ink-soft);
  border-color: var(--line);
}
.upload-trigger-alt:hover { background: var(--bg-alt); transform: translateY(-1px); }
.upload-trigger-danger {
  border-style: solid;
  background: transparent;
  color: var(--danger);
  border-color: rgba(192, 86, 74, 0.4);
}
.upload-trigger-danger:hover { background: rgba(192, 86, 74, 0.08); transform: translateY(-1px); }

.upload-modal {
  position: fixed;
  inset: 0;
  z-index: 700;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}
.upload-modal.open { opacity: 1; visibility: visible; }
.upload-panel {
  width: min(440px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 24px 22px;
}
.upload-title {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 18px;
  text-align: center;
}
.upload-field { margin-bottom: 16px; }
.upload-label {
  display: block;
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-bottom: 7px;
}
.upload-file-box {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1.5px dashed var(--line);
  border-radius: var(--radius);
  min-height: 110px;
  cursor: pointer;
  overflow: hidden;
  transition: border-color .2s, background .2s;
}
/* 真身 input 铺满整块、完全透明：手指点到的就是它本身，
   走浏览器原生唤起（微信也就拦不了程序化 click） */
.upload-file-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 3;
  font-size: 16px;              /* 免得 iOS 聚焦时放大页面 */
  -webkit-appearance: none;
  appearance: none;
}
.upload-file-input:disabled { cursor: progress; }
.upload-wechat-tip {
  margin: 8px 2px 0;
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--ink-soft);
  text-align: left;
}
.upload-file-box:hover { border-color: var(--accent); background: var(--accent-soft); }
.upload-file-hint { color: var(--ink-soft); font-size: 0.88rem; }
.upload-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
}
.upload-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
}

/* 批量选图时的处理进度（手机一次选十几张也不会盲等） */
.upload-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.upload-progress[hidden] { display: none; }
.upload-progress-bar {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--accent-soft);
  overflow: hidden;
}
.upload-progress-bar > i {
  display: block;
  width: 0;
  height: 100%;
  background: var(--accent);
  border-radius: 2px;
  transition: width .18s ease;
}
.upload-progress-text {
  flex: none;
  color: var(--ink-soft);
  font-size: 0.8rem;
  font-variant-numeric: tabular-nums;
}

/* 提示：超出单次上限 / 某几张读取失败 */
.upload-warn {
  margin-top: 8px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent-deep, #b4554c);
  font-size: 0.82rem;
  line-height: 1.5;
}
.upload-warn[hidden] { display: none; }
.upload-input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: 0.9rem;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--surface);
  -webkit-user-select: text;
  user-select: text;
  cursor: text;
}
.upload-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

/* 地点输入：右侧下拉箭头 + 已有地点菜单 */
.upload-loc-wrap { position: relative; display: flex; align-items: center; }
.upload-loc-wrap .upload-input { padding-right: 42px; }
.upload-loc-toggle {
  position: absolute;
  right: 5px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  background: transparent;
  border-radius: 8px;
  cursor: pointer;
  padding: 0;
  transition: background .18s;
}
.upload-loc-toggle:hover { background: var(--accent-soft); }
.upload-loc-toggle::before {
  content: "";
  width: 7px;
  height: 7px;
  border-right: 1.5px solid var(--ink-soft);
  border-bottom: 1.5px solid var(--ink-soft);
  transform: translateY(-2px) rotate(45deg);
  transition: transform .2s ease, border-color .2s ease;
}
.upload-loc-toggle.open::before {
  transform: translateY(2px) rotate(-135deg);
  border-color: var(--accent);
}
.upload-loc-menu {
  position: fixed;
  z-index: 780;
  box-sizing: border-box;
  padding: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  max-height: 220px;
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}
.upload-loc-menu.open { opacity: 1; visibility: visible; transform: translateY(0); }
.upload-loc-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  box-sizing: border-box;
  padding: 9px 10px;
  border: none;
  background: transparent;
  border-radius: var(--radius-sm);
  font-family: var(--sans);
  font-size: 0.88rem;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.upload-loc-item:hover,
.upload-loc-item:focus-visible { background: var(--accent-soft); color: var(--accent-deep); outline: none; }
.upload-loc-dot {
  flex: none;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--accent);
  opacity: .6;
}
.upload-loc-empty {
  padding: 10px 8px;
  font-size: 0.8rem;
  line-height: 1.6;
  color: var(--ink-soft);
  text-align: center;
}
.upload-desc { resize: vertical; min-height: 64px; }
.upload-actions { display: flex; gap: 12px; margin-top: 8px; }
.upload-btn {
  flex: 1;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 10px 24px;
  font-size: 0.95rem;
  font-family: var(--sans);
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s, transform .2s;
}
.upload-btn-cancel { background: var(--surface); color: var(--ink-soft); border-color: var(--line); }
.upload-btn-cancel:hover { background: var(--bg-alt); border-color: var(--accent); color: var(--accent-deep); }
.upload-btn-confirm { background: var(--accent); color: #fff; border-color: var(--accent); }
.upload-btn-confirm:hover { background: var(--accent-deep); border-color: var(--accent-deep); }

/* ---------- 页脚 ---------- */
.site-footer { text-align: center; }
.footer-sub { color: var(--ink-soft); font-size: 0.9rem; }

/* 首页：结束语覆盖到照片墙上，滚动到底后才渐显 */
.footer-overlay {
  position: relative;
  z-index: 3;
  margin-top: -160px;
  padding: 40px 20px 24px; /* 底部留白缩小：播放器收起时不再留大片空位 */
  background: transparent;
  border: none;
  pointer-events: none;
}
.footer-overlay .footer-sub {
  font-family: var(--serif);
  font-size: clamp(1.2rem, 3.5vw, 1.7rem);
  color: #fff;
  background: linear-gradient(90deg, #ffffff, #ffd6d0 50%, #ffffff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 14px rgba(0, 0, 0, 0.6));
  opacity: 0;
  transform: translateY(26px);
  transition: opacity .8s ease, transform .8s ease;
}
.footer-overlay.visible .footer-sub {
  opacity: 1;
  transform: translateY(0);
}

/* 相册页：结束语放在照片列表之后（随内容滚动，不再用奶油渐变条盖住照片） */
.footer-fixed {
  padding: 24px 20px 96px; /* 底部留出播放器悬浮高度，避免展开时被盖住 */
  background: transparent;
  border: none;
  pointer-events: none;
}

/* ---------- 大图查看（lightbox） ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 600;
  background: rgba(0, 0, 0, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  overflow: hidden;            /* 照片放大后不产生多余的滚动条 */
  transition: opacity .3s ease, visibility .3s ease;
}
.lightbox.open { opacity: 1; visibility: visible; }
/* 手指下滑关大图：拖动中不要过渡（要跟手），松手回弹/滑出时才有过渡 */
.lightbox.lb-dragging { transition: none; }
.lightbox.lb-settling {
  transition: transform .26s cubic-bezier(.22, .61, .36, 1),
              opacity .26s ease,
              background-color .26s ease;
  /* 注意：这里不写 visibility 过渡 —— 整块是滑出屏幕后再隐藏的，
     让 visibility 立即生效才不会在复位时闪一下 */
}
.lightbox.lb-settling .lightbox-img {
  transition: transform .26s cubic-bezier(.22, .61, .36, 1), opacity .2s ease;
}
.lightbox-body {
  display: flex;
  align-items: center;
  gap: 26px;
  max-width: 96vw;
  max-height: 90vh;
}
.lightbox-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.lightbox-img {
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6);
  transition: opacity .2s ease;
  /* 手指缩放：只缩放照片本身，信息栏 / 上下张按钮等 UI 一律不动 */
  transform-origin: 50% 50%;
  touch-action: none;          /* 双指手势交给脚本，别让浏览器缩放整页 */
  -webkit-user-drag: none;
}
/* 双击放大 / 回弹归位时才带过渡，捏合过程中要跟手 */
.lightbox-img.lb-zoom-anim {
  transition: transform .3s cubic-bezier(.22, .61, .36, 1), opacity .2s ease;
}
/* 放大后的照片会画到上面来，把信息栏和按钮抬到照片之上，保证始终可见可点 */
.lightbox-info { position: relative; z-index: 3; }
.lightbox-nav { position: relative; z-index: 3; }
/* 放大照片时（lb-zoomed）：信息栏与按钮淡出，专心看照片；恢复原始大小再淡回来 */
.lightbox-info,
.lightbox-nav { transition: opacity .22s ease; }
.lightbox.lb-zoomed .lightbox-info,
.lightbox.lb-zoomed .lightbox-nav {
  opacity: 0;
  pointer-events: none;
}
/* ---------- 上一张 / 下一张的切换动效 ----------
   照片从点击方向轻轻滑入；信息卡内容做位移淡入；卡片高度另有 WAAPI 过渡（见 album.js） */
@keyframes lbPhotoInRight {
  from { transform: translate3d(34px, 0, 0) scale(.992); }
  to   { transform: translate3d(0, 0, 0) scale(1); }
}
@keyframes lbPhotoInLeft {
  from { transform: translate3d(-34px, 0, 0) scale(.992); }
  to   { transform: translate3d(0, 0, 0) scale(1); }
}
.lightbox-img.lb-in-next { animation: lbPhotoInRight .34s cubic-bezier(.22, .61, .36, 1); }
.lightbox-img.lb-in-prev { animation: lbPhotoInLeft .34s cubic-bezier(.22, .61, .36, 1); }

@keyframes lbInfoInRight {
  from { opacity: 0; transform: translate3d(16px, 0, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes lbInfoInLeft {
  from { opacity: 0; transform: translate3d(-16px, 0, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}
.lightbox-info.lb-swap-next .info-item,
.lightbox-info.lb-swap-next .lightbox-del {
  animation: lbInfoInRight .3s cubic-bezier(.22, .61, .36, 1) both;
}
.lightbox-info.lb-swap-prev .info-item,
.lightbox-info.lb-swap-prev .lightbox-del {
  animation: lbInfoInLeft .3s cubic-bezier(.22, .61, .36, 1) both;
}
/* 三行内容错开一点点冒出来，像被轻轻推了一下 */
.lightbox-info .info-item:nth-child(2) { animation-delay: .045s; }
.lightbox-info .info-item:nth-child(3) { animation-delay: .09s; }
/* 手机上 .lightbox-body 是可滚动容器，会把放大的照片裁掉，放大时放开裁剪 */
.lightbox.lb-zoomed .lightbox-body { overflow: visible; }
.lightbox-info {
  flex: 0 0 260px;
  width: 260px;
  padding: 22px 20px;
  background: rgba(38, 38, 42, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: var(--radius);
  color: #fff;
  text-align: left;
}
.info-item + .info-item { margin-top: 20px; }
.info-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.info-value {
  font-size: 0.98rem;
  color: #fff;
  line-height: 1.6;
  word-break: break-word;
}
.info-desc {
  margin: 0;
  cursor: text;
  min-height: 1.6em;
  border-radius: 6px;
  padding: 2px 4px;
  transition: background .2s, box-shadow .2s;
}
.info-desc:hover { background: rgba(255, 255, 255, 0.07); }
.info-desc:focus {
  outline: none;
  background: rgba(255, 255, 255, 0.10);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.25);
}
.info-tip {
  font-style: normal;
  font-size: 0.7rem;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0;
}
.desc-saved {
  margin-left: 6px;
  font-style: normal;
  font-size: 0.72rem;
  color: #8fd6a8;
  opacity: 0;
  transition: opacity .3s;
}
.desc-saved.show { opacity: 1; }

/* 大图信息栏底部「删除这张照片」（只对自己上传的照片出现） */
.lightbox-del {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-top: 24px;
  padding: 9px 12px;
  font-family: inherit;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.6);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  cursor: pointer;
  transition: color .2s, background .2s, border-color .2s;
}
.lightbox-del:hover,
.lightbox-del:focus-visible {
  outline: none;
  color: #ff9b93;
  background: rgba(255, 120, 110, 0.14);
  border-color: rgba(255, 140, 130, 0.45);
}
.lightbox-del[hidden] { display: none; }
.lightbox-del .px-ic { color: inherit; }
.lightbox-close {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  font-size: 1.4rem;
  cursor: pointer;
  line-height: 1;
  display: none; /* 已移除右上角叉叉，点遮罩或按 Esc 关闭 */
}
.lightbox-close:hover { background: rgba(255, 255, 255, 0.28); }
/* 上一张/下一张：放在照片正下方，并排居中 */
.lightbox-nav {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: center;
}
.lightbox-prev,
.lightbox-next,
.lightbox-set-cover {
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
  line-height: 1;
  transition: background .2s, color .2s, transform .15s;
}
.lightbox-prev,
.lightbox-next { font-size: 1.8rem; }
.lightbox-set-cover { font-size: 1.45rem; }
.lightbox-prev:hover,
.lightbox-next:hover,
.lightbox-set-cover:hover { background: rgba(255, 255, 255, 0.28); }
.lightbox-set-cover.active { color: #ffd66b; }
.lightbox-set-cover.just-set { animation: starPop .5s ease; }
@keyframes starPop {
  0%   { transform: scale(0.6); }
  55%  { transform: scale(1.35); }
  100% { transform: scale(1); }
}
.lightbox-set-cover:disabled { opacity: 0.35; cursor: not-allowed; }

/* ---------- 像素爱心彩蛋（一颗爱心 → 冒出 1s → 向四周均匀爆炸） ---------- */
#heartsLayer { position: fixed; inset: 0; pointer-events: none; z-index: 999; }
.pixel-heart-pop {
  position: absolute;
  user-select: none;
  pointer-events: none;
}
.pixel-heart-svg {
  display: block;
  animation: heartPop 1s cubic-bezier(.22, 1, .36, 1) both;
}
@keyframes heartPop {
  0%   { transform: scale(0); opacity: 0; }
  55%  { transform: scale(1.22); opacity: 1; }
  75%  { transform: scale(0.92); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.pixel-dot {
  position: absolute;
  width: 3px;
  height: 3px;
  animation: dotFly 0.9s ease-out forwards;
  user-select: none;
}
@keyframes dotFly {
  0% { opacity: 1; transform: translate(0, 0); }
  100% { opacity: 0; transform: translate(var(--dx), var(--dy)); }
}

/* ---------- 响应式 ---------- */
@media (max-width: 720px) {
  .nav-links { gap: 16px; }
  .brand { font-size: 1rem; }
  .nav-link { font-size: 0.85rem; }
  /* 下拉菜单右对齐，避免溢出屏幕右侧 */
  .dropdown-menu { left: auto; right: 0; transform: translateY(8px); }
  .dropdown.open .dropdown-menu { transform: translateY(0); }
  /* 相册网格：移动端统一 2 列瀑布流（竖版照片 2 列、横版照片缩小到半屏） */
  .album-grid { columns: 2; column-gap: 12px; }
  .album-photo { margin-bottom: 12px; }
  /* 主页照片墙：横版照片完整显示（contain），上下留黑边，不再裁切构图 */
  .photo-hero-bg { background-size: contain; background-repeat: no-repeat; }
  .hero { padding: 24px 16px 18px; }
  .hero-inner { gap: 16px; }
  /* 大图：竖排，整屏装下（不再整块滚动，避免右侧出现滑杆） */
  .lightbox-body { flex-direction: column; gap: 10px; max-height: 100%; overflow: hidden; padding: 10px; }
  .lightbox-img { max-height: 52vh; }
  .lightbox-nav { gap: 12px; }
  .lightbox-prev,
  .lightbox-next,
  .lightbox-set-cover { width: 42px; height: 42px; }
  .lightbox-prev,
  .lightbox-next { font-size: 1.5rem; }
  .lightbox-set-cover { font-size: 1.2rem; }
  /* 信息卡缩小一档：宽度、内边距、字号、行距都收一号 */
  .lightbox-info {
    flex: none;
    width: min(84vw, 288px);
    padding: 12px 14px;
    max-height: 30vh;              /* 极长描述才在卡片内部滚，外部不出现滑杆 */
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .lightbox-info .info-item + .info-item { margin-top: 10px; }
  .lightbox-info .info-label { font-size: 0.7rem; margin-bottom: 3px; gap: 5px; }
  .lightbox-info .info-value { font-size: 0.86rem; line-height: 1.45; }
  .lightbox-info .info-desc { min-height: 1.4em; padding: 1px 3px; }
  .lightbox-info .info-tip { font-size: 0.62rem; }
  /* 删除按钮：手机上把外边距收一收，避免卡片内部还要滚一下才看得到 */
  .lightbox-info .lightbox-del { margin-top: 12px; padding: 8px 12px; font-size: 0.76rem; }
}
/* 矮屏（老机型 / 横屏）：再压一压照片和卡片，保证一屏装得下、不用滚 */
@media (max-width: 720px) and (max-height: 640px) {
  .lightbox-body { gap: 8px; padding: 8px; }
  .lightbox-img { max-height: 44vh; }
  .lightbox-info { max-height: 34vh; padding: 10px 12px; }
  .lightbox-prev,
  .lightbox-next,
  .lightbox-set-cover { width: 38px; height: 38px; }
}
@media (max-width: 400px) {
  .nav-links { gap: 8px; }
  .brand { font-size: 0.9rem; }
  .nav-link { font-size: 0.75rem; }
}

/* 触屏/桌面统一：菜单只靠 .open 类展开，hover 展开由 router.js 用 JS 模拟 */
/* ---------- 地图覆盖层 ---------- */
.map-overlay {
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  background: var(--bg);
  transform: translateX(100%);
  visibility: hidden;
  pointer-events: none;
  transition: transform .5s cubic-bezier(.22, 1, .36, 1), visibility 0s .5s;
  will-change: transform;
}
.map-overlay.active {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
  transition: transform .5s cubic-bezier(.22, 1, .36, 1), visibility 0s 0s;
}
.map-container { width: 100%; height: 100%; position: relative; }

/* 高德地图 logo/版权：挪到右下角 + 缩小 + 半透明（保留可辨认，非隐藏） */
.amap-logo {
  left: auto !important;
  top: auto !important;
  right: var(--amap-logo-right, 4px) !important;
  bottom: var(--amap-logo-bottom, 4px) !important;
  transform: scale(var(--amap-logo-scale, 0.62));
  transform-origin: bottom right;
  opacity: var(--amap-logo-opacity, 0.55);
}
.amap-copyright {
  right: var(--amap-logo-right, 4px) !important;
  bottom: calc(var(--amap-logo-bottom, 4px) + 22px) !important;
  transform: scale(var(--amap-logo-scale, 0.62));
  transform-origin: bottom right;
  opacity: var(--amap-logo-opacity, 0.55);
}
.map-error {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  color: var(--ink-soft);
  font-size: 0.95rem;
  text-align: center;
  padding: 20px;
  line-height: 1.8;
}

/* ============ 地图左侧控制中心 ============ */
.map-control {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  z-index: 15;
  width: var(--map-ctrl-w);
  padding: 0;
  transform: translateX(0);
  transition: transform .45s cubic-bezier(.22, 1, .36, 1);
  will-change: transform;
}
/* 收起：整个控制中心（含把手）左移出屏幕，只留把手露出 */
.map-control:not(.open) {
  transform: translateX(-100%);
}
.map-control-panel {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  background: var(--map-ctrl-bg);   /* 极浅粉底层 */
  border-radius: 0;                 /* 直角矩形，无圆角 */
  box-shadow: var(--shadow-lg);
  overflow-y: auto;                 /* 内容超高时面板整体滚动（滚动条全局隐藏） */
}
/* 梯形把手：贴面板右边缘、垂直居中，向右凸出（白色，同播放器把手） */
.map-control-tab {
  position: absolute;
  right: calc(-1 * var(--map-ctrl-tab-w));
  top: 50%;
  transform: translateY(-50%);
  width: var(--map-ctrl-tab-w);
  height: var(--map-ctrl-tab-h);
  border: none;
  padding: 0;
  cursor: pointer;
  z-index: 3;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 54' preserveAspectRatio='none'%3E%3Cpath d='M0 0 L16 10 L16 44 L0 54 Z' fill='%23fbf1ef'/%3E%3C/svg%3E");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  -webkit-tap-highlight-color: transparent;
}
/* 把手内竖向小横条 */
.map-control-tab::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 4px; height: 26px;
  border-radius: 2px;
  background: var(--line);
  transition: background .2s;
}
.map-control-tab:hover::after { background: var(--accent); }

/* 卡片通用（底层之上的白色卡片：圆角 + 轻阴影，卡片间由面板 gap 分隔） */
.mc-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 13px 14px;
  flex: none;   /* 保持内容高度，不被面板拉伸 */
}
.mc-card-title {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 10px;
}
.mc-card-sub { font-size: 0.68rem; font-weight: 400; color: var(--ink-soft); margin-left: 4px; }

/* 三卡布局：向上对齐依次排列（日期时间→去过的城市→进度），进度卡随相册展开顺下去 */
.mc-cities { display: flex; flex-direction: column; }

/* 2c 日期时间卡 */
.mc-clock {
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-align: left;
  cursor: pointer;
  border: none;
  font-family: inherit;
}
.mc-clock-left { display: flex; flex-direction: column; }
.mc-clock-label { font-size: 0.74rem; color: var(--accent-text); }
.mc-clock-time { font-size: 1.7rem; font-weight: 700; color: var(--accent-text); line-height: 1.1; letter-spacing: 0.02em; }
.mc-clock-right { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.mc-clock-date { font-size: 0.9rem; color: var(--ink); font-weight: 600; }
.mc-clock-week { font-size: 0.76rem; color: var(--ink-soft); }

/* 2b 去过的城市 */
.mc-cities-list { display: flex; flex-direction: column; gap: 6px; }
.mc-empty { font-size: 0.82rem; color: var(--ink-soft); }
.mc-city { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.mc-city-head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  background: #fff;
  border: none;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
}
.mc-city-caret { color: var(--ink-soft); font-size: 0.72rem; transition: transform .3s ease; flex: none; }
.mc-city.open .mc-city-caret { transform: rotate(180deg); }
.mc-city-name { display: flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ink); font-size: 0.92rem; }
.mc-city-count { margin-left: auto; font-size: 0.72rem; color: var(--ink-soft); flex: none; }
/* 城市展开体：缓入缓出 */
.mc-city-body {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height .42s cubic-bezier(.22, 1, .36, 1), opacity .32s ease;
}
.mc-city.open .mc-city-body {
  max-height: var(--mc-album-h, 46vh);
  opacity: 1;
  overflow-y: auto;   /* 微型相册内部滚动，城市标题保持不动 */
}
.mc-loc-group { padding: 4px 10px 10px; }
.mc-loc-title { font-size: 0.74rem; color: var(--ink-soft); margin-bottom: 6px; }
.mc-loc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.mc-thumb {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: block;
  transition: transform .15s ease, opacity .15s ease;
}
.mc-thumb:hover { opacity: .85; transform: scale(1.04); }

/* 2a 点亮进度 */
.mc-prog-row { margin-bottom: 12px; }
.mc-prog-row:last-child { margin-bottom: 0; }
.mc-prog-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 5px; }
.mc-prog-head > span:first-child { font-size: 0.82rem; color: var(--ink); }
.mc-prog-num { font-size: 0.72rem; color: var(--ink-soft); }
.mc-prog-num b { font-size: 1.12rem; color: var(--accent-text); font-weight: 700; }
.mc-prog-row:last-child .mc-prog-num b { color: var(--accent-text); }
.mc-prog-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.mc-prog-fill {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: var(--accent);
  transition: width .6s cubic-bezier(.22, 1, .36, 1);
}
.mc-prog-fill-blue { background: var(--accent); }

/* 轻量大图浮层（点微型相册照片） */
.map-photo-pop {
  position: absolute;
  left: calc(var(--map-ctrl-w) + 14px);
  top: 50%;
  transform: translateY(-50%);
  max-width: min(62vw, 640px);
  max-height: 82vh;
  z-index: 14;
  opacity: 0;
  visibility: hidden;
  transition: opacity .28s ease, visibility .28s ease;
}
.map-photo-pop.open { opacity: 1; visibility: visible; }
.map-photo-pop img {
  max-width: 100%;
  max-height: 82vh;
  width: auto;
  height: auto;
  display: block;
  border-radius: var(--radius);
  box-shadow: var(--photo-pop-shadow);
  background: #fff;
  transition: transform .22s ease, opacity .22s ease;  /* 切换照片左右滑动动画 */
}
/* 切换照片：旧图向左收回，新图从右冒出 */
.map-photo-pop img.pop-out { transform: translateX(-26px); opacity: 0; }
.map-photo-pop img.pop-in-start { transform: translateX(26px); opacity: 0; transition: none; }
.map-photo-pop img.pop-in { transform: translateX(0); opacity: 1; }
/* 手机横屏：城市卡改成上下结构（上面城市名+箭头，下面地点数量） */
@media (orientation: landscape) and (max-height: 520px) {
  .mc-city-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
  }
  .mc-city-count { margin-left: 0; }
}
/* 窄屏：控制中心改为从顶部冒出（贴顶全宽，收起向上滑出），把手转到底边向下凸出 */
@media (max-width: 560px) {
  .map-control {
    left: 0; right: 0;
    top: 0; bottom: auto;
    width: 100%;
    transform: translateY(0);
  }
  /* 收起：整个面板（含把手）向上滑出屏幕，只留把手露在屏幕顶部 */
  .map-control:not(.open) {
    transform: translateY(-100%);
  }
  .map-control-panel {
    height: auto;
    max-height: 70vh;               /* 顶部冒出，不占满全屏，超出面板内滚动 */
    border-radius: 0 0 var(--radius) var(--radius);  /* 底部圆角，顶部贴边 */
  }
  /* 把手：移到底边缘、水平居中、向下凸出（横向梯形） */
  .map-control-tab {
    right: auto; left: 50%;
    top: auto; bottom: calc(-1 * var(--map-ctrl-tab-w));
    transform: translateX(-50%);
    width: var(--map-ctrl-tab-h);
    height: var(--map-ctrl-tab-w);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 54 16' preserveAspectRatio='none'%3E%3Cpath d='M0 0 L54 0 L44 16 L10 16 Z' fill='%23fbf1ef'/%3E%3C/svg%3E");
  }
  /* 把手内小横条改为横向 */
  .map-control-tab::after {
    width: 26px; height: 4px;
  }
  /* 大图浮层：水平居中、浮在面板上方（z-index 高于面板），完整可见 */
  .map-photo-pop {
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    max-width: 88vw;
    z-index: 16;
  }
}

/* 地图水滴图钉（内联 SVG，不依赖高德默认图标，避免破图） */
.map-marker {
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.28));
  transition: transform .18s ease;
  will-change: transform;
}
.map-marker:hover { transform: scale(1.18); }

/* 红点还原成图钉：从点所在位置「长出来」（0.3s） */
@keyframes mapMarkerIn {
  0% { transform: scale(.32); opacity: 0; }
  65% { transform: scale(1.06); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.map-marker-in {
  transform-origin: 50% 100%;
  animation: mapMarkerIn .3s cubic-bezier(.34, 1.45, .64, 1);
}

/* 图钉挤在一起收成红点：原地缩回针尖并淡出（0.3s，与红点冒出同步） */
@keyframes mapMarkerOut {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(.32); opacity: 0; }
}
.map-marker-out {
  transform-origin: 50% 100%;
  animation: mapMarkerOut .3s ease-in forwards;
  pointer-events: none;
}

/* 图钉重叠时收成的小红点（点一下自动放大，散开后还原图钉）
   视觉 9px，外层 24px 只当点击热区；半透明让相邻红点叠出深浅 → 热力图感 */
.map-dot {
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.28));
  transition: transform .16s ease;
  will-change: transform;
}
.map-dot svg { display: block; opacity: 0.9; }
.map-dot svg rect { fill: #d93a2b; }
.map-dot:hover { transform: scale(1.25); }

/* 图钉变红点：红点从上一步缩小的位置「冒出来」（0.3s，稍等 60ms 接上图钉收起） */
@keyframes mapDotIn {
  0% { transform: scale(.2); opacity: 0; }
  70% { transform: scale(1.15); opacity: .95; }
  100% { transform: scale(1); opacity: 1; }
}
.map-dot-in {
  animation: mapDotIn .3s cubic-bezier(.34, 1.45, .64, 1) .06s both;
}

/* 红点消失（变成图钉的那一刻）：0.3s 涨开淡出，与图钉弹入同步 */
@keyframes mapDotOut {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.9); opacity: 0; }
}
.map-dot-out {
  animation: mapDotOut .3s ease-out forwards;
  pointer-events: none;
}

/* 地图图钉小卡片（带 duangduang 弹跳小动效，参数见 map.js 顶部 MAP_CARD_CONFIG） */
.map-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 12px 14px;
  text-align: center;
  min-width: 128px;
  transform-origin: 50% 100%; /* 从图钉位置往上弹起 */
  animation: cardPop .55s cubic-bezier(.34, 1.56, .64, 1) both;
  box-shadow: var(--shadow-lg);
}
@keyframes cardPop {
  0%   { transform: scale(var(--start-scale, .4)) translateY(var(--rise-y, 10px)); opacity: 0; }
  60%  { transform: scale(var(--overshoot, 1.08)) translateY(-2px); opacity: 1; }
  80%  { transform: scale(.97) translateY(0); opacity: 1; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}
/* 收起动画：弹出动画的反向（缩小 + 下移 + 淡出） */
@keyframes cardClose {
  0%   { transform: scale(1) translateY(0); opacity: 1; }
  100% { transform: scale(var(--start-scale, .4)) translateY(var(--rise-y, 10px)); opacity: 0; }
}
.map-card-name {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--ink);
  margin-bottom: 2px;
  white-space: nowrap;
}
.map-card-date { font-size: 0.8rem; color: var(--ink-soft); margin-bottom: 8px; }
.map-card-thumb {
  width: 84px;
  height: 84px;
  object-fit: cover;
  border-radius: var(--radius-sm);
  display: block;
  margin: 0 auto;
}
.map-card-thumb-wrap {
  position: relative;
  display: inline-block;
  cursor: pointer;
}
.map-card-thumb-wrap:hover .map-card-thumb { opacity: 0.9; }

/* 大图查看里的"地点定位"可点击跳地图 */
#infoLocation.map-link {
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255, 255, 255, 0.4);
}
#infoLocation.map-link:hover { color: var(--accent-soft); text-decoration-color: var(--accent-soft); }

/* ============================================
   底部音乐播放器（所有页面常驻）
   ============================================ */
.player-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  height: var(--player-h);
  z-index: 80;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  box-shadow: 0 -6px 24px rgba(60, 50, 45, 0.08);
  transition: transform .45s cubic-bezier(.22, 1, .36, 1);
}
/* 收起：整体下移出屏幕，只留顶部凸起露在屏幕底部 */
.player-bar.collapsed {
  transform: translateY(100%);
}
/* 顶部凸起（收起/展开把手）：梯形、顶端圆角，居中向上突出播放栏顶边 */
.player-tab {
  position: absolute;
  top: calc(-1 * var(--player-tab-h) + 3px);
  left: calc(50% - var(--player-tab-w) / 2);
  width: var(--player-tab-w);
  height: var(--player-tab-h);
  border: none;
  background-color: transparent;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 52 16' preserveAspectRatio='none'%3E%3Cpath d='M0 16 L52 16 L47 5 Q47 0 42 0 L10 0 Q5 0 5 5 L0 16 Z' fill='rgba(255,255,255,0.92)'/%3E%3C/svg%3E");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  cursor: pointer;
  padding: 0;
  z-index: 2;
  transition: transform .3s ease;
  -webkit-tap-highlight-color: transparent;
}
/* 收起时：凸起适当放大，更好点击（从底边向上放大，保持居中） */
body.player-collapsed .player-tab {
  transform: scale(1.3);
  transform-origin: 50% 100%;
}
/* 扩大点击热区（视觉不变，实际可点区域更大） */
.player-tab::before {
  content: "";
  position: absolute;
  left: -14px; right: -14px;
  top: -12px; bottom: -10px;
}
/* 凸起内的小把手 */
.player-tab::after {
  content: "";
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: 26px; height: 4px;
  border-radius: 2px;
  background: var(--line);
  transition: background .2s;
}
.player-tab:hover::after { background: var(--accent); }
/* 内容居中：占屏幕中间 50% 宽度，两边留白；小屏自动换行成两行 */
.player-inner {
  height: 100%;
  width: 50%;
  max-width: 900px;
  margin: 0 auto;
  padding: 10px 12px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-content: center;
  gap: 12px 16px;
}
/* 左侧：封面 + 歌名/作者 */
.player-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1 1 auto;
}
/* 封面：可向上突出播放栏（突出量见 :root 的 --cover-lift，0=居中） */
.player-cover {
  width: var(--cover-size);
  height: var(--cover-size);
  flex: 0 0 var(--cover-size);
  /* 封面垂直对齐由 flex 居中处理；--cover-lift 控制额外上移（0=不突出，正=向上突出，负=下沉） */
  transform: translateY(var(--cover-lift));
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--accent), #f0a79e);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  user-select: none;
  box-shadow: 0 4px 12px rgba(232, 131, 122, 0.4);
  transition: width .35s cubic-bezier(.22,1,.36,1), height .35s cubic-bezier(.22,1,.36,1), transform .35s cubic-bezier(.22,1,.36,1), font-size .35s cubic-bezier(.22,1,.36,1);
}
.player-meta {
  min-width: 0;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
/* 歌名不缩略：完整显示，放不下时换行（最多两行），不做省略号 */
.player-title {
  font-weight: 600;
  font-size: 0.92rem;
  color: var(--ink);
  white-space: normal;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: font-size .35s cubic-bezier(.22,1,.36,1);
}
.player-artist {
  font-size: 0.78rem;
  color: var(--ink-soft);
  white-space: normal;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: font-size .35s cubic-bezier(.22,1,.36,1);
}
.player-controls { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.player-extras { display: flex; align-items: center; gap: 2px; flex: 0 0 auto; }
/* 歌名与按钮下移，中心线与封面中心线对齐（跟随封面的 --cover-lift） */
.player-meta,
.player-controls,
.player-extras { transform: translateY(var(--cover-lift)); }
/* 所有播放器按钮：无圆圈、无底色、统一配色（粉系）+ 单色 SVG 图标 */
.p-btn {
  width: 40px; height: 40px;
  flex: 0 0 40px;
  border: none;
  background: transparent;
  border-radius: 0;
  cursor: pointer;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: color .15s, transform .15s;
  line-height: 1;
  font-family: var(--sans);
  padding: 0;
}
.p-btn:hover { color: var(--accent-deep); transform: scale(1.08); }
.p-btn svg { display: block; }
.p-btn-play { color: var(--accent); }
.player-progress {
  flex: 1 1 100%;     /* 占满最后一行 */
  order: 99;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;   /* 进度条 + 时间 整体居中 */
  gap: 10px;
  transition: flex-basis .35s cubic-bezier(.22,1,.36,1);
}
.progress-bar {
  flex: 0 0 66.66%;   /* 进度条灰线占中间三分之二，两端留空（避免贴边误触） */
  height: 6px;
  background: var(--line);
  border-radius: 999px;
  cursor: pointer;
  position: relative;
  touch-action: none; /* 手机端允许横向拖动进度 */
}
/* 扩大热区：视觉仍是 6px，实际可点击/拖动区域上下各加 10px */
.progress-bar::before {
  content: "";
  position: absolute;
  left: 0; right: 0;
  top: -10px; bottom: -10px;
}
.progress-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 0;
  background: var(--accent);
  border-radius: 999px;
  pointer-events: none;
}
/* 可拖动的圆形控制点 */
.progress-thumb {
  position: absolute;
  top: 50%;
  left: 0;
  width: 14px; height: 14px;
  transform: translate(-50%, -50%);
  background: var(--accent);
  border: 2px solid #fff;
  border-radius: 50%;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.3);
  pointer-events: none;
}
.progress-time {
  font-size: 0.72rem;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
/* 音量：点击喇叭弹出滑条 */
.player-volume { position: relative; }
.volume-pop {
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 12px 14px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s, transform .22s, visibility .22s;
  z-index: 95;
}
.volume-pop.open {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.volume-slider {
  -webkit-appearance: none;
  appearance: none;
  writing-mode: vertical-lr; /* 让滑条纵向 */
  direction: rtl;            /* 向上拖 = 增大音量 */
  width: 6px;                /* 竖条粗细 */
  height: 112px;             /* 竖条长度 */
  border-radius: 3px;
  background: var(--slider-track);
  outline: none;
  cursor: pointer;
  display: block;
  margin: 0 auto;
}
.volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
}
.volume-slider::-moz-range-thumb {
  width: 14px; height: 14px;
  border: none; border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
}

/* 播放列表卡片（弹出在播放器上方） */
.playlist-popup {
  position: fixed;
  right: 18px;
  bottom: calc(var(--player-h) + 12px);
  width: 320px;
  max-height: 420px;
  z-index: 90;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .25s, transform .25s, visibility .25s;
}
.playlist-popup.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.playlist-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}
.playlist-title { font-weight: 600; font-size: 0.95rem; color: var(--ink); }
.playlist-clear {
  border: none; background: none;
  cursor: pointer; font-size: 1rem;
  padding: 4px;
  border-radius: 6px;
  line-height: 1;
}
.playlist-clear:hover { background: var(--accent-soft); }
.playlist-body { overflow-y: auto; overscroll-behavior: contain; padding: 6px; }
.playlist-empty {
  padding: 30px 16px;
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.9rem;
}
.playlist-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: var(--radius);
  cursor: pointer;
}
.playlist-row:hover { background: var(--accent-soft); }
.playlist-row.active { background: var(--accent-soft); }
.pl-index { width: 18px; text-align: right; font-size: 0.78rem; color: var(--ink-soft); flex: 0 0 18px; }
.pl-cover {
  width: 32px; height: 32px;
  flex: 0 0 32px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--accent), #f0a79e);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem;
}
.pl-info { display: flex; flex-direction: column; min-width: 0; }
.pl-title { font-size: 0.88rem; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-artist { font-size: 0.74rem; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 曲库覆盖层 */
.library-overlay {
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  background: var(--bg);
  transform: translateX(100%);
  visibility: hidden;
  pointer-events: none;
  transition: transform .5s cubic-bezier(.22, 1, .36, 1), visibility 0s .5s;
  will-change: transform;
}
.library-overlay.active {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
  transition: transform .5s cubic-bezier(.22, 1, .36, 1), visibility 0s 0s;
}
.library-scroll { height: 100%; overflow-y: auto; overscroll-behavior: contain; padding: 28px 0 96px; }
.library-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px 20px;
}
.library-title {
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--ink);
}
.library-close {
  width: 44px; height: 44px;
  border: none; border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  font-size: 1.3rem;
  cursor: pointer;
  box-shadow: var(--shadow);
  line-height: 1;
}
.library-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 0 28px 18px;
}
.library-tab {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 999px;
  padding: 7px 16px;
  font-size: 0.9rem;
  cursor: pointer;
  font-family: var(--sans);
}
.library-tab.active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.library-list {
  padding: 0 28px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}
.library-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  cursor: pointer;
  text-align: left;
  font-family: var(--sans);
  transition: transform .15s, box-shadow .15s;
}
.library-row:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.lib-cover {
  width: 40px; height: 40px;
  flex: 0 0 40px;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, var(--accent), #f0a79e);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
}
.lib-info { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.lib-title { font-size: 0.92rem; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-artist { font-size: 0.78rem; color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lib-cat {
  font-size: 0.72rem;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 2px 8px;
  white-space: nowrap;
}

/* 播放器响应式：平板（iPad 竖屏/横屏）——默认已是两行布局，此处只调宽度 */
@media (min-width: 721px) and (max-width: 1024px) {
  .player-inner {
    width: 92%;            /* 平板用更宽的内容区，不用 50% */
    max-width: 680px;
  }
}

/* 播放器响应式：手机端变两行——除进度条外全部移到进度条上面 */
@media (max-width: 720px) {
  :root {
    --player-h: 104px;     /* 手机端播放器变高，容纳两行 */
    --cover-size: 42px;
    --cover-lift: 0px;     /* 手机端封面/歌名/按钮居中（桌面端 10px 下移，手机端不偏下） */
  }
  .player-inner { width: 100%; max-width: none; gap: 12px 8px; padding: 6px var(--player-gutter) 10px; }
  .player-left { flex: 1 1 0; gap: 6px; }
  .player-title { font-size: 0.78rem; }
  .player-artist { font-size: 0.66rem; }
  .player-controls { gap: 1px; }
  .player-extras { gap: 0; }
  /* 进度条：手机端拉满内容区，与第一行两端对齐（第一行留白见 --player-gutter） */
  .player-progress { gap: 8px; }
  .progress-bar { flex: 1 1 auto; }
  .progress-time { display: none; }
  .p-btn { width: 30px; height: 30px; flex-basis: 30px; }
  .p-btn svg { width: 16px; height: 16px; }
  .p-btn-play { width: 34px; height: 34px; flex-basis: 34px; }
  .playlist-popup { width: calc(100vw - 24px); right: 12px; }
  .library-head { padding: 0 16px 16px; }
  .library-tabs { padding: 0 16px 14px; }
  .library-list { grid-template-columns: 1fr; padding: 0 16px; }
}

/* ============ 日历覆盖层 ============ */
.calendar-overlay {
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  background: var(--bg);
  transform: translateX(100%);
  visibility: hidden;
  pointer-events: none;
  transition: transform .5s cubic-bezier(.22, 1, .36, 1), visibility 0s .5s;
  will-change: transform;
  touch-action: none;   /* 让上下滑动切月的手势不被浏览器原生滚动抢走 */
}
.calendar-overlay.active {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
  transition: transform .5s cubic-bezier(.22, 1, .36, 1), visibility 0s 0s;
}
.calendar-scroll {
  height: 100%;
  overflow: hidden;
  overscroll-behavior: none;
  padding: 10px clamp(8px, 3vw, 28px) 12px;
  display: flex;
  flex-direction: column;
  /* 默认限宽居中：平板横屏时日历不再铺满整屏，
     容器查询单位 cqw 随宽度缩小，字号自然回到合理大小 */
  max-width: 580px;
  margin: 0 auto;
}
/* 桌面大屏：恢复铺满的观感，宽度占屏幕 90%（字号上限已收窄到 1.7rem，比最初更小，不会再裁农历） */
@media (min-width: 1200px) {
  .calendar-scroll {
    width: 90%;
    max-width: none;
  }
}
.calendar-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 0 0 8px;
  flex: 0 0 auto;
}
.calendar-nav {
  width: 44px; height: 44px;
  border: none; border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  font-size: 1.6rem;
  cursor: pointer;
  box-shadow: var(--shadow);
  line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
}
.calendar-nav:hover { background: var(--accent-soft); color: var(--accent); }
.calendar-title {
  font-family: var(--serif);
  font-size: clamp(1.5rem, 4.5vw, 2.4rem);
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--ink);
  min-width: 150px;
  text-align: center;
  cursor: pointer;
}
.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  padding: 0 1px;
  margin-bottom: 1px;
  flex: 0 0 auto;
}
.calendar-weekdays span {
  text-align: center;
  font-size: clamp(0.85rem, 2.4vw, 1.05rem);
  color: var(--ink-soft);
  padding: 6px 0;
}
/* 月份滑动视口：裁切 + 圆角，内部 3 个月纵向排布由滚轮驱动 */
.calendar-viewport {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  container-type: inline-size; /* 让字号能按“日历宽度”而非屏幕宽度缩放 */
  container-name: calendar;
}
.calendar-track {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 300%;
  will-change: transform;
}
/* 每个月的网格：用 gap + 底色画出网格线 */
.calendar-month {
  height: 33.3333%;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  grid-template-rows: repeat(6, 1fr);
  gap: 1px;
  background: var(--line);
  overflow: hidden;
}
.cal-cell {
  position: relative;
  border-radius: 0;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: background .15s;
  padding: 2px;
}
.cal-cell .cal-day-num {
  font-size: 1.2rem;            /* 老浏览器兜底 */
  font-size: var(--cal-day-size);
  color: var(--ink);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.cal-cell .cal-lunar {
  font-size: var(--cal-sub-size);
  color: var(--ink-soft);
  line-height: 1.15;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  max-width: 92%;
  text-overflow: ellipsis;
}
/* 非本月日期：浅色（透明度可用 --cal-dim 调） */
.cal-cell.other-month .cal-day-num,
.cal-cell.other-month .cal-lunar { opacity: var(--cal-dim, 0.35); }
/* 今天 */
.cal-cell.today { outline: 1.5px solid var(--accent); outline-offset: -1.5px; }
.cal-cell.today .cal-day-num { color: var(--accent); font-weight: 700; }
/* 从文字详情跳转过来定位到的目标日期 */
.cal-cell.cal-target { background: var(--accent-soft); }
.cal-cell.cal-target .cal-day-num { color: var(--accent-deep); font-weight: 700; }
/* 有内容日期：不做高亮底色，仅左下角放一颗低透明度小爱心标记 */
.cal-cell.has-photo { cursor: pointer; }
.cal-cell.has-photo:hover { background: #f7f2ee; }
.cal-heart {
  position: absolute;
  right: 5%;               /* 想放左下角：把 right 改成 left 即可 */
  bottom: 5%;
  width: var(--cal-heart-size);
  height: var(--cal-heart-size);
  color: var(--accent);
  opacity: var(--cal-heart-opacity);
  transform: rotate(var(--cal-heart-angle));
  pointer-events: none;
  line-height: 0;
}
.cal-heart svg { width: 100%; height: 100%; display: block; }
/* 法定节假日：数字用红色标明（优先级高于"今天"的高亮色） */
.cal-cell .cal-day-num.red { color: var(--holiday); font-weight: 700; }
.cal-cell .cal-festival {
  font-size: var(--cal-fest-size);
  color: var(--accent);
  line-height: 1.15;
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  max-width: 94%;
  text-overflow: ellipsis;
}
.calendar-hint {
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.76rem;
  margin-top: 8px;
  flex: 0 0 auto;
}
.calendar-close {
  position: absolute;
  top: 16px; right: 20px;
  z-index: 20;
  width: 44px; height: 44px;
  border: none; border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  font-size: 1.3rem;
  cursor: pointer;
  box-shadow: var(--shadow);
  line-height: 1;
  display: none; /* 已移除日历关闭叉叉 */
}

/* 日历日期卡片（弹层，紧贴日期旁弹出，duangduang 动效同地图卡片） */
.cal-card {
  position: fixed;
  left: 0; top: 0;
  z-index: 95;
  width: min(92vw, 300px);
  max-height: 70vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 14px 16px;
  transform-origin: 50% 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.cal-card.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  animation: cardPop .55s cubic-bezier(.34, 1.56, .64, 1) both;
}
.cal-card.closing {
  animation: cardClose .3s ease-in forwards;
}
.cal-card-date {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--ink);
  margin-bottom: 2px;
}
.cal-card-lunar { font-size: 0.8rem; color: var(--ink-soft); margin-bottom: 12px; }
.cal-card-locs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.cal-card-loc {
  border: 1px solid var(--accent-soft);
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background .15s;
}
.cal-card-loc:hover { background: #f0c7c2; }
.cal-card-photos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
.cal-card-photo {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.cal-card-more {
  display: none;
  width: 100%;
  margin-top: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  border-radius: var(--radius-sm);
  padding: 6px 0;
  font-size: 0.8rem;
  cursor: pointer;
  font-family: var(--sans);
}
.cal-card-more.show { display: block; }
.cal-card-more:hover { color: var(--accent); border-color: var(--accent-soft); }
.cal-card-more .px-ic { color: inherit; width: 0.7em; height: 0.7em; margin-left: 2px; vertical-align: -0.08em; }

/* 月份选择器（点日历标题弹出，紧贴年月标题下方，位置由 JS 定位） */
.cal-month-picker {
  position: fixed;
  left: 0; top: 0;
  z-index: 96;
  width: 260px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 14px;
  transform: translateX(-50%) translateY(8px) scale(0.95);
  transform-origin: top center;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .2s, transform .2s, visibility .2s;
}
.cal-month-picker.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0) scale(1);
}
.cal-mp-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.cal-mp-year {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--ink);
}
.cal-mp-nav {
  width: 32px; height: 32px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 1.1rem;
  cursor: pointer;
  line-height: 1;
}
.cal-mp-nav:hover { background: #f0c7c2; }
.cal-mp-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.cal-mp-month {
  padding: 10px 0;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: var(--radius);
  font-size: 0.9rem;
  cursor: pointer;
  color: var(--ink);
  font-family: var(--sans);
}
.cal-mp-month:hover { background: var(--accent-soft); color: var(--accent); }
.cal-mp-month.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ============================================================
   文字模块 · 时间胶囊 / 愿望清单 / 留言板 / 我们的世界
   ============================================================ */

/* 覆盖层：与相册/日历一致的从右滑入转场 */
.notes-overlay {
  position: fixed;
  top: var(--nav-h);
  left: 0; right: 0; bottom: 0;
  z-index: 50;
  background: var(--bg);
  overflow-y: auto;
  overflow-x: clip;
  overscroll-behavior: contain;
  transform: translateX(100%);
  visibility: hidden;
  pointer-events: none;
  transition: transform .5s cubic-bezier(.22, 1, .36, 1), visibility 0s .5s;
  will-change: transform;
}
.notes-overlay.active {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
  transition: transform .5s cubic-bezier(.22, 1, .36, 1), visibility 0s 0s;
}
.notes-scroll { padding-bottom: 96px; } /* 底部留出播放器悬浮高度 */

.notes-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 720px;
  margin: 0 auto;
  padding: 44px 20px 10px;
}
.notes-title {
  font-family: var(--serif);
  font-size: clamp(1.7rem, 5vw, 2.4rem);
  font-weight: 400;
  letter-spacing: 0.08em;
  color: var(--ink);
}
.notes-subtitle {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px 12px;
  color: var(--ink-soft);
  font-size: 0.88rem;
}
/* 我们的世界：标题与相册标题同字号、左对齐，副标题也左对齐（与下方总览卡片对齐） */
#worldOverlay .notes-head {
  justify-content: flex-start;
  max-width: 1040px;
}
#worldOverlay .notes-title {
  font-size: clamp(1.8rem, 5vw, 3rem);
  line-height: 1.4;
}
#worldOverlay .notes-subtitle {
  max-width: 1040px;
  text-align: left;
  font-size: 1rem;
}
.notes-add {
  display: block;
  max-width: 720px;
  width: calc(100% - 40px);
  margin: 6px auto 8px;
  border: 1.5px dashed var(--accent);
  background: var(--accent-soft);
  color: var(--accent-deep);
  border-radius: 999px;
  padding: 10px 24px;
  font-size: 0.95rem;
  font-family: var(--sans);
  cursor: pointer;
  transition: background .2s, transform .2s;
}
.notes-add:hover { background: #f0c7c2; transform: translateY(-1px); }

/* 愿望筛选（全部 / 已完成 / 未完成） */
.wish-filter {
  max-width: 720px;
  width: calc(100% - 40px);
  margin: 0 auto 10px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.wish-filter-btn {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 5px 16px;
  font-size: 0.82rem;
  font-family: var(--sans);
  cursor: pointer;
  transition: background .2s, color .2s, border-color .2s;
}
.wish-filter-btn:hover { border-color: var(--accent); color: var(--accent-deep); }
.wish-filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.notes-body { max-width: 720px; margin: 0 auto; padding: 8px 20px 0; }
.notes-empty {
  text-align: center;
  color: var(--ink-soft);
  padding: 64px 20px;
  font-size: 0.95rem;
}

/* ---------- 署名选择（小莫 / 小导） ---------- */
.author-picker {
  display: flex;
  align-items: center;
  justify-content: flex-start;   /* 向左对齐 */
  gap: 10px;
  flex-wrap: wrap;
}
.author-picker-label {
  font-family: var(--serif);            /* 与大标题同款宋体 */
  font-size: var(--author-label-size);  /* 字号可调（见 :root 的 --author-label-size） */
  font-weight: 600;
  color: var(--ink);
}
.author-picker-btns {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.author-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  padding: 6px 14px 6px 8px;
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--ink-soft);
  transition: border-color .2s, background .2s, color .2s;
}
.author-btn:hover { border-color: var(--accent); }
.author-btn.active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-weight: 500;
}
/* 小莫选中态：蓝色高亮（颜色在 :root 的 --author-blue 系列可调） */
.author-btn[data-author="小莫"].active {
  border-color: var(--author-blue);
  background: var(--author-blue-soft);
  color: var(--author-blue-deep);
}
.author-avatar {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: var(--bg-alt);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  flex: none;
}

/* ---------- 通用输入 ---------- */
.notes-input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px 12px;
  font-size: 0.9rem;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--surface);
  -webkit-user-select: text;
  user-select: text;
}
.notes-input:focus { outline: none; border-color: var(--accent); }
.notes-textarea { resize: vertical; line-height: 1.6; }

.notes-btn {
  padding: 10px 22px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-soft);
  border-radius: 999px;
  font-size: 0.92rem;
  font-family: var(--sans);
  cursor: pointer;
  transition: background .2s, color .2s, transform .2s;
}
.notes-btn:hover { background: var(--bg-alt); }
.notes-btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.notes-btn-primary:hover { background: var(--accent-deep); }
.notes-btn-danger { background: transparent; border-color: rgba(192, 86, 74, 0.45); color: var(--danger); }
.notes-btn-danger:hover { background: rgba(192, 86, 74, 0.08); border-color: var(--danger); }

/* ---------- 详情小窗 ---------- */
.note-detail-panel { width: min(440px, 100%); }
.note-detail-body { display: flex; flex-direction: column; gap: 12px; margin-bottom: 4px; }
.detail-cat {
  align-self: flex-start;
  font-size: 0.72rem;
  color: var(--accent-deep);
  background: var(--accent-soft);
  padding: 2px 10px;
  border-radius: 999px;
}
.detail-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--ink);
  line-height: 1.4;
  word-break: break-word;
}
.detail-content {
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.7;
}
.detail-note { font-size: 0.9rem; color: var(--ink-soft); white-space: pre-wrap; word-break: break-word; }
.detail-meta { font-size: 0.82rem; color: var(--ink-soft); }
.detail-lock { font-size: 2.4rem; text-align: center; line-height: 1; }

/* 条目编号（第1条 / 第1个） */
.item-no {
  flex: none;
  font-size: 0.72rem;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
}

/* 详情弹窗里的可跳转「定位 / 时间」 */
.detail-link { cursor: pointer; transition: color .2s; }
.detail-link:hover { color: var(--accent-deep); }
.detail-link-hint { font-size: 0.72rem; color: var(--accent); margin-left: 2px; }

/* 可点开详情的记录卡片：手型光标提示 */
.wish-item[data-detail-id],
.message-item[data-detail-id],
.capsule-item[data-detail-id] { cursor: pointer; }

/* ---------- 弹窗 ---------- */
.notes-modal {
  position: fixed;
  inset: 0;
  z-index: 700;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}
.notes-modal.open { opacity: 1; visibility: visible; }
.notes-panel {
  width: min(460px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  background: var(--surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 24px 22px;
}
.notes-modal-title {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 18px;
  text-align: center;
}
.notes-field { margin-bottom: 15px; }
.notes-label {
  display: block;
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-bottom: 7px;
}
.notes-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

/* ---------- 愿望清单 ---------- */
.notes-progress {
  text-align: center;
  color: var(--ink-soft);
  font-size: 0.86rem;
  margin-bottom: 14px;
}
.wish-list { display: flex; flex-direction: column; gap: 12px; }
.wish-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  line-height: 1.5;
  transition: opacity .3s;
}
.wish-item.done { opacity: 0.62; }
.wish-check {
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  background: transparent;
  color: #fff;
  font-size: 0.9rem;
  line-height: 1;
  cursor: pointer;
  flex: none;
  margin-top: 2px;
  transition: background .2s;
}
.wish-item.done .wish-check { background: var(--accent); }
.wish-check:disabled { cursor: default; }
.wish-main { flex: 1; min-width: 0; }
.wish-top { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.wish-cat {
  flex: none;
  font-size: 0.72rem;
  color: var(--accent-deep);
  background: var(--accent-soft);
  padding: 1px 9px;
  border-radius: 999px;
}
.wish-title { font-weight: 500; color: var(--ink); }
.wish-item.done .wish-title { text-decoration: line-through; }
.wish-note { font-size: 0.86rem; color: var(--ink-soft); margin-top: 4px; }
.wish-meta { font-size: 0.78rem; color: var(--ink-soft); margin-top: 6px; }
.wish-del {
  border: none;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
  padding: 2px;
  flex: none;
  opacity: 0.5;
}
.wish-del:hover { color: #c0564a; opacity: 1; }
.wish-cat-box { display: flex; flex-wrap: wrap; gap: 8px; }
.wish-cat-btn {
  padding: 6px 14px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 999px;
  font-size: 0.86rem;
  cursor: pointer;
  color: var(--ink-soft);
  font-family: var(--sans);
  transition: border-color .2s, background .2s, color .2s;
}
.wish-cat-btn:hover { border-color: var(--accent); }
.wish-cat-btn.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-deep); }

/* ---------- 留言板 ---------- */
.message-composer {
  max-width: 720px;
  margin: 6px auto 16px;
  width: calc(100% - 40px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.message-composer-actions { display: flex; justify-content: flex-end; }
.message-list { display: flex; flex-direction: column; gap: 12px; }
.message-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  line-height: 1.5;
}
.message-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--accent-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex: none;
}
.message-main { flex: 1; min-width: 0; }
.message-head { display: flex; align-items: baseline; gap: 10px; }
.message-author { font-weight: 600; color: var(--ink); }
.message-time { font-size: 0.76rem; color: var(--ink-soft); }
.message-no { margin-left: auto; align-self: flex-start; }
.message-content { margin-top: 5px; color: var(--ink); white-space: pre-wrap; word-break: break-word; }
.message-loc {
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--ink-soft);
  cursor: pointer;
  display: inline-block;
  transition: color .2s;
}
.message-loc:hover { color: var(--accent-deep); }
.message-del {
  border: none;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
  padding: 2px;
  flex: none;
  opacity: 0.5;
}
.message-del:hover { color: #c0564a; opacity: 1; }

/* ---------- 时间胶囊 ---------- */
.capsule-list { display: flex; flex-direction: column; gap: 14px; }
.capsule-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  position: relative;
  line-height: 1.5;
}
.capsule-item.sealed {
  background: linear-gradient(135deg, var(--surface), var(--accent-soft));
  cursor: pointer;
  text-align: center;
}
.capsule-item.opened {
  padding: 22px 18px 14px;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.capsule-item.opened::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
}
.capsule-seal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px 0;
}
.capsule-lock { font-size: 2rem; }
.capsule-seal-title { font-family: var(--serif); font-weight: 700; font-size: 1.05rem; color: var(--ink); }
.capsule-countdown { font-size: 0.86rem; color: var(--accent-deep); }
.capsule-item.sealed.shake { animation: capsuleShake .4s; }
@keyframes capsuleShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}
.capsule-unsealed-tag {
  display: inline-block;
  font-size: 0.72rem;
  color: var(--accent-deep);
  background: var(--accent-soft);
  border-radius: 999px;
  padding: 2px 10px;
  margin-bottom: 10px;
}
/* 已解封但未点开：醒目提示 */
.capsule-unsealed-notice {
  display: inline-block;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.02rem;
  color: var(--accent);
  margin-bottom: 8px;
}
/* 已点开看过（已开封）：整体转浅，弱化存在感 */
.capsule-item.opened.viewed { opacity: 0.6; }
.capsule-open-title {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--ink);
  margin-bottom: 8px;
}
.capsule-content { color: var(--ink); white-space: pre-wrap; word-break: break-word; line-height: 1.7; }
.capsule-loc {
  margin-top: 8px;
  font-size: 0.82rem;
  color: var(--ink-soft);
  cursor: pointer;
  display: inline-block;
  transition: color .2s;
}
.capsule-loc:hover { color: var(--accent-deep); }
.capsule-meta { margin-top: 8px; font-size: 0.78rem; color: var(--ink-soft); }
.capsule-del {
  position: absolute;
  top: 12px; right: 12px;
  border: none;
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
  font-size: 0.95rem;
  line-height: 1;
  padding: 2px;
  opacity: 0.5;
}
.capsule-del:hover { color: #c0564a; opacity: 1; }

/* ---------- 我们的世界（总览） ---------- */
.world-grid {
  max-width: 1040px;
  margin: 0 auto;
  padding: 4px 20px 0;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.world-banner {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px 26px;
  margin-bottom: 2px;
}
.world-banner-days { display: flex; align-items: baseline; gap: 10px; }
.world-banner-num {
  font-family: var(--serif);
  font-size: 2.6rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--accent-text);
  line-height: 1;
}
.world-banner-label { font-size: 1rem; color: var(--ink); }
.world-banner-stats { display: flex; gap: 20px; flex-wrap: wrap; }
.world-stat { font-size: 0.88rem; color: var(--ink-soft); white-space: nowrap; }
.world-stat i { font-style: normal; margin-right: 3px; }
.world-stat .px-ic { width: 1em; height: 1em; vertical-align: -0.12em; }
.world-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 18px;
  text-decoration: none;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  gap: 6px;
  line-height: 1.5;
  transition: transform .2s, box-shadow .2s;
}
.world-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.world-thumb {
  width: 100%;
  aspect-ratio: 16 / 10;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 4px;
}
.world-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.world-thumb-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-alt);
  font-size: 2rem;
}
.world-card-title {
  font-family: var(--serif);
  font-weight: 400;
  font-size: var(--world-title-size);
  letter-spacing: 0.04em;
  color: var(--ink);
}
.world-card-text {
  font-size: 0.88rem;
  color: var(--ink);
  line-height: 1.5;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.world-card-sub { font-size: 0.78rem; color: var(--ink-soft); }
/* 最新留言：语录样式，填满卡片高度、减少留白 */
.world-msg .world-quote {
  flex: 1;
  position: relative;
  padding-top: 22px;
  font-family: var(--serif);
  font-size: 1.06rem;
  line-height: 1.8;
  color: var(--ink);
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.world-msg .world-quote::before {
  content: "“";
  position: absolute;
  top: -8px;
  left: -2px;
  font-size: 3.4rem;
  line-height: 1;
  color: var(--accent-soft);
  font-family: var(--serif);
}
.world-quote-author { margin-top: 10px; font-size: 0.78rem; color: var(--ink-soft); }

/* 世界页愿望清单预览（未完成优先） */
.world-wish-preview {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin-top: 2px;
}
.world-wish-preview-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 1.06rem;   /* 与「最新留言」正文同号，预览更清晰 */
  color: var(--ink);
  line-height: 1.4;
  min-width: 0;
}
.world-wish-preview-dot {
  flex: none;
  color: var(--accent);
  font-size: 0.95rem;
}
.world-wish-preview-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.world-wish-preview-item.done .world-wish-preview-dot { color: var(--ink-soft); }
.world-wish-preview-item.done .world-wish-preview-title { color: var(--ink-soft); text-decoration: line-through; }

.world-countdown {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 2rem;
  color: var(--accent);
  line-height: 1;
}

/* ---------- 像素风小图标（统一主 UI 配色） ---------- */
.px-ic {
  display: inline-block;
  width: 1em;
  height: 1em;
  color: var(--accent);            /* 主体统一珊瑚粉 */
  fill: currentColor;
  shape-rendering: crispEdges;     /* 保持像素硬边 */
  vertical-align: -0.12em;
  line-height: 0;
}
.px-ic rect { fill: currentColor; }
.px-ic polygon { fill: currentColor; }
.px-ic .px-ic-h { fill: #ffffff; } /* 镂空用白，形成像素空洞 */

/* 功能图标（caret/plus/trash/archive/star/close）：跟随父元素颜色，而非默认珊瑚粉 */
.caret .px-ic,
.upload-trigger .px-ic,
.notes-add .px-ic,
.playlist-clear .px-ic,
.library-close .px-ic,
.lightbox-set-cover .px-ic { color: inherit; }
/* 带文字的按钮：图标与文字间距 */
.upload-trigger .px-ic,
.notes-add .px-ic { margin-right: 6px; }
/* 关闭/收藏这类纯图标按钮：图标垂直居中 */
.library-close .px-ic,
.playlist-clear .px-ic,
.lightbox-set-cover .px-ic { vertical-align: middle; }

/* 标识图标（location/calendar/note/check）在各上下文的排版 */
.info-label .px-ic { margin-right: 4px; }
.wish-check .px-ic { color: #fff; width: 1.05em; height: 1.05em; vertical-align: middle; }
.detail-lock .px-ic,
.capsule-lock .px-ic { vertical-align: middle; }

/* ---------- 相册地点副标题角标（照片/留言/愿望/胶囊计数） ---------- */
.album-loc-badges { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.loc-badge { font-size: 0.78rem; color: var(--ink-soft); }

/* ---------- 地图卡片记忆包统计行 ---------- */
.map-card-stats {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
  font-size: 0.76rem;
  color: var(--ink-soft);
}
.map-card-stats span { white-space: nowrap; }

/* ---------- 日历文字标记 ---------- */
.cal-note {
  /* 大小可调：改 calendar.js 顶部 CALENDAR_CONFIG.noteIconScale（默认 1.5） */
  font-size: calc(clamp(0.6rem, 3.5cqw, 0.95rem) * var(--cal-note-scale, 1.5));
  line-height: 1;
  margin-top: 2px;
}
/* 日历卡片里的文字记录（留言/愿望/胶囊） */
.cal-card-notes {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}
.cal-note-item {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  font-size: 0.82rem;
  color: var(--ink);
  background: var(--bg-alt);
  border-radius: var(--radius-sm);
  padding: 6px 10px;
  line-height: 1.5;
  word-break: break-word;
}
.cal-note-item .px-ic { flex: none; width: 1.1em; height: 1.1em; margin-top: 0.18em; }
.cal-note-done { color: var(--ink-soft); font-size: 0.78rem; }

/* 7a：留言默认只显示 1 行，点正文展开（最多 5 行再滚动），再点收起；带缓入缓出 */
.cal-note-msg { cursor: pointer; }
.cal-note-msg .cal-note-text {
  flex: 1;
  min-width: 0;
  max-height: 1.5em;            /* 恰好 1 行 */
  overflow: hidden;
  transition: max-height .32s ease;   /* 缓入缓出展开/收起 */
}
.cal-note-msg.expanded .cal-note-text {
  max-height: 7.5em;            /* 1.5em 行高 × 5 行，超过出滚动条 */
  overflow-y: auto;
}
.cal-note-author { font-weight: 600; }

/* 7b：愿望标分类，点标题展开详情（备注/地点/日期），再点标题收起；带缓入缓出 */
.cal-note-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cal-note-wish-head { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; cursor: pointer; }
.cal-note-cat {
  flex: none;
  font-size: 0.68rem;
  color: var(--accent-deep);
  background: var(--accent-soft);
  padding: 0 6px;
  border-radius: 999px;
  line-height: 1.5;
}
.cal-note-wish-title { font-weight: 500; }
.cal-note-wish-more {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  margin-top: 0;
  font-size: 0.78rem;
  color: var(--ink-soft);
  transition: max-height .32s ease, opacity .3s ease, margin-top .32s ease;   /* 缓入缓出展开/收起 */
}
.cal-note-wish.expanded .cal-note-wish-more {
  max-height: 200px;            /* 足够容纳详情内容 */
  opacity: 1;
  margin-top: 3px;
}
.cal-note-wish-note { white-space: pre-wrap; word-break: break-word; }
.cal-note-wish-meta { display: block; }

/* 手机端：总览单列 */
@media (max-width: 560px) {
  .world-grid { grid-template-columns: 1fr; }
  .world-banner { flex-direction: column; align-items: flex-start; }
}

/* 无障碍：尊重系统「减弱动态效果」设置，关闭/压缩所有动画与过渡 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- 新消息通知（主页右上角，每类一张卡，从屏幕外滑入） ---------- */
.notify-stack {
  position: fixed;
  top: calc(var(--nav-h) + 16px);
  right: 16px;
  z-index: 950;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  pointer-events: none;
}
.notify-card {
  display: flex;
  align-items: center;
  gap: 9px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 10px 16px;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  font-family: var(--sans);
  font-size: 0.9rem;
  color: var(--ink);
  pointer-events: none;
  opacity: 0;
  transform: translateX(140%);
  transition: transform .5s cubic-bezier(.22, 1, .36, 1), opacity .5s;
}
.notify-card.show {
  pointer-events: auto;
  opacity: 1;
  transform: translateX(0);
}
.notify-card:hover { border-color: var(--accent); }
.notify-icon { display: inline-flex; flex: none; }
.notify-text { white-space: nowrap; }
@media (max-width: 560px) {
  .notify-stack { right: 10px; gap: 8px; }
  .notify-card { padding: 9px 14px; font-size: 0.82rem; }
}
