/* ============================================================
   个人主页 · 共用样式（前台 + 后台），移动端优先
   主题沿用 reading-notes 的纸墨暖色风格
   ============================================================ */
:root {
  --paper: #f7f4ee;            /* 温润米白纸感 */
  --card: #ffffff;
  --ink: #2c2a26;             /* 暖黑 */
  --ink-soft: #6e6a63;
  --ink-faint: #a6a096;
  --accent: #4a7c6f;           /* 灰调绿 · 主色 */
  --accent-dark: #3a655a;
  --accent-soft: #eaf0ec;
  --accent-blue: #5b7fa6;      /* 雾蓝，用于渐变点缀 */
  --line: #e6e1d7;
  --ok: #3fa67b;
  --warn: #d9a441;
  --bad: #d96c5a;
  --radius: 16px;
  --shadow: 0 14px 40px rgba(74, 60, 40, 0.10);
  --shadow-sm: 0 5px 16px rgba(74, 60, 40, 0.06);
  --serif: "Noto Serif SC", "Source Han Serif SC", "Songti SC", Georgia, serif;
  --sans: -apple-system, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
}

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

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.7;
  min-height: 100vh;
}

a { color: var(--accent-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  border-radius: 10px;
  font-size: 15px;
  transition: background .15s ease, transform .05s ease;
}
button:active { transform: scale(.98); }
button:disabled { opacity: .55; cursor: not-allowed; }

input, textarea {
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  width: 100%;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(176, 128, 74, .15);
}
textarea { resize: vertical; min-height: 120px; }

.container { max-width: 720px; margin: 0 auto; padding: 0 16px; }

/* ---------- 顶部栏 ---------- */
.site-header {
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
}
.site-header .container {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 62px;
}
.brand { display: flex; align-items: center; gap: 10px; }
/* 歌词区：在「我的主页」和播放按键之间的偏左位置 */
.lyric-mid {
  position: absolute;
  left: 43%;
  top: 50%;
  transform: translate(-50%, -50%);
}
.brand .logo {
  width: 22px;
  height: 22px;
  color: var(--accent-dark);   /* 房子图标用主题绿色 */
  flex: none;
  display: block;
}
.brand .title {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--ink);
}
.brand .title:hover { text-decoration: none; }
.header-actions { display: flex; align-items: center; gap: 10px; }

/* 顶部音乐播放器 */
.player {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
  width: 280px;              /* 固定宽度，播放键位置固定 */
  justify-content: flex-start;
}
.player .lyric-song { flex: 1; text-align: right; }  /* 歌名占剩余空间，靠右对齐按钮 */
.player-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-size: 14px;
  line-height: 1;
}
.player-btn:hover { background: var(--accent); color: #fff; }
.player-main { width: 34px; height: 34px; font-size: 15px; }

/* 歌词区 */
.lyric {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  min-width: 0;
  max-width: 340px;
  line-height: 1.3;
  text-align: center;
}
.lyric-line {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
.lyric-prev, .lyric-next {
  font-size: 11px;
  color: var(--ink-faint);
}
.lyric-cur {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-dark);
}
/* 歌名 - 演唱者（播放按键右侧） */
.lyric-song {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
  margin-left: 4px;
}

/* ---------- 主要按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}
.btn:hover { background: var(--accent-dark); }
.btn-ghost { background: transparent; color: var(--ink-soft); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--paper); }
.btn-danger { background: var(--bad); }
.btn-danger:hover { background: #a84a3c; }
.btn-sm { font-size: 13px; padding: 6px 12px; border-radius: 8px; }

/* ---------- 前台 · 自我介绍（随页面上滑，不固定） ---------- */
.home-main { padding: 26px 0 60px; }

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 20px 0 6px;
}
.avatar-wrap { position: relative; margin-bottom: 14px; }
.avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(74, 60, 40, 0.18);
  border: 3px solid #fff;
  background: var(--paper);
}
.avatar-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 44px;
  color: var(--ink-faint);
  background: linear-gradient(160deg, #f3ecdd, #e9e0cb);
}
.avatar-fallback[hidden] { display: none; } /* 有头像时隐藏占位（display 需显式覆盖） */
.hero-name {
  font-family: var(--serif);
  font-size: clamp(28px, 6vw, 36px);
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--ink);
}
.hero-city {
  margin-top: 6px;
  font-size: 14px;
  color: var(--ink-soft);
}
.hero-bio {
  margin-top: 14px;
  max-width: 520px;
  font-size: 15px;
  color: var(--ink-soft);
  line-height: 2;
  white-space: pre-wrap;
  word-break: break-word;
}

/* ---------- 区块标题 ---------- */
.section-block { margin-top: 36px; }
.section-title {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 3px;
  color: var(--ink);
  padding-bottom: 12px;
  position: relative;
  margin-bottom: 18px;
}
.section-title::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 44px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-blue));
}

/* ---------- 悬浮常用网站（dock） ---------- */
.dock {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -2px 20px rgba(60, 40, 120, 0.08);
}
/* dock 内部：标题 + 链接横排 */
.dock { display: flex; align-items: center; justify-content: center; }
.dock-label {
  flex: none;
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 700;
  color: var(--accent-dark);
  letter-spacing: 2px;
  white-space: nowrap;
  padding: 8px 14px 10px 16px;
  margin-right: 6px;
  border-right: 1px solid var(--line);   /* 与链接区用分隔线隔开 */
}
.dock-links {
  flex: 1;
  min-width: 0;
  max-width: 600px;
  display: flex;
  flex-wrap: wrap;            /* 网站多时换行，不出现滚动条 */
  align-items: center;
  justify-content: flex-start;
  gap: 2px 4px;
  padding: 8px 16px calc(10px + env(safe-area-inset-bottom));
  overflow: visible;          /* 不滚动 */
}
.dock-item {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;      /* 图标+文字整体垂直居中，上下行对齐 */
  gap: 3px;
  padding: 6px 12px;
  min-height: 58px;             /* 统一高度，上下行对齐 */
  border-radius: 10px;
  transition: background .15s ease;
}
.dock-item:hover { background: var(--paper); text-decoration: none; }
.dock-icon {
  font-size: 22px;
  line-height: 28px;            /* 固定行高，emoji 垂直居中 */
  height: 28px;                 /* 图标区统一高度 */
  display: block;
  text-align: center;
}
.dock-icon-img { width: 28px; height: 28px; object-fit: contain; display: block; }
.dock-name {
  font-size: 11px;
  color: var(--ink-soft);
  white-space: nowrap;
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---------- 我的最爱 ---------- */
.fav-group { margin-bottom: 26px; }
.fav-group-title {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--ink);
}
.fav-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 12px; }
.fav-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px 10px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease;
}
.fav-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); text-decoration: none; }
.fav-cover {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 10px;
  background: var(--paper);
}
.fav-cover-ph { display: flex; align-items: center; justify-content: center; font-size: 34px; color: var(--ink-faint); }

/* 影视/书籍/游戏：一行一个的横向卡片，左侧图 + 右侧信息 */
.fav-grid[data-cat="game"],
.fav-grid[data-cat="movie"],
.fav-grid[data-cat="book"] { grid-template-columns: 1fr; }
.fav-grid[data-cat="game"] .fav-card,
.fav-grid[data-cat="movie"] .fav-card,
.fav-grid[data-cat="book"] .fav-card {
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 20px;
  text-align: left;
  padding: 14px 18px;
}
/* 游戏/影视/书籍：竖版封面图（3:4），卡片横排 */
.fav-grid[data-cat="game"] .fav-cover,
.fav-grid[data-cat="movie"] .fav-cover,
.fav-grid[data-cat="book"] .fav-cover {
  width: 105px;
  height: 140px;
  flex: none;
  aspect-ratio: auto;
  object-fit: cover;
  padding: 0;
  border-radius: 10px;
  background: linear-gradient(160deg, #f3ecdd, #e9e0cb);
}

/* 排名徽章：金银铜「TOP N」徽章，叠在封面左上角 */
.fav-rank {
  position: absolute;
  top: 8px;
  left: 8px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 10px;
  border-radius: 14px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.5px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}
/* 金银铜：金属渐变 + 同色系描边 + 白色文字，奖牌感 */
.fav-rank.r1 {
  background: linear-gradient(160deg, #ffe9a8 0%, #f7c94e 45%, #e09c1f 100%);
  color: #7a5200;
  border: 1px solid #e0b84e;
}
.fav-rank.r2 {
  background: linear-gradient(160deg, #ffffff 0%, #e2e2e2 45%, #b5b5b5 100%);
  color: #4a4a4a;
  border: 1px solid #cfcfcf;
}
.fav-rank.r3 {
  background: linear-gradient(160deg, #f6cd9a 0%, #e29a5b 45%, #b06f2e 100%);
  color: #5a3110;
  border: 1px solid #d49a63;
}
/* 第 4 名起：灰色文字徽章 */
.fav-rank.r-num {
  background: rgba(44, 42, 38, 0.78);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

/* 卡片背景图（游戏 hero 图 / 影视书籍封面模糊） */
.fav-grid[data-cat="game"] .fav-card,
.fav-grid[data-cat="movie"] .fav-card,
.fav-grid[data-cat="book"] .fav-card { position: relative; overflow: hidden; }
.fav-cover-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  z-index: 0;
}
/* 游戏：hero 大图压暗 */
.fav-grid[data-cat="game"] .fav-cover-bg { opacity: 0.32; }
/* 影视/书籍：封面放大模糊 + 半透明白色遮罩（保证文字对比度） */
.fav-grid[data-cat="movie"] .fav-hero .fav-cover-bg,
.fav-grid[data-cat="book"] .fav-hero .fav-cover-bg {
  opacity: 0.55;
  transform: scale(1.15);
  filter: blur(18px);
}
/* 遮罩层：提亮背景，深色封面也能看清文字 */
.fav-grid[data-cat="movie"] .fav-hero::before,
.fav-grid[data-cat="book"] .fav-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.92) 0%,
    rgba(255, 255, 255, 0.88) 45%,
    rgba(255, 255, 255, 0.78) 100%
  );
  pointer-events: none;
}
.fav-grid[data-cat="game"] .fav-hero .fav-cover,
.fav-grid[data-cat="game"] .fav-hero .fav-text,
.fav-grid[data-cat="movie"] .fav-hero .fav-cover,
.fav-grid[data-cat="movie"] .fav-hero .fav-text,
.fav-grid[data-cat="book"] .fav-hero .fav-cover,
.fav-grid[data-cat="book"] .fav-hero .fav-text { position: relative; z-index: 1; }
/* 游戏 logo：右上角，放大 + 白底板突出 */
.fav-grid[data-cat="game"] .fav-logo {
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 2;
  height: 52px;                  /* 更大 */
  width: auto;
  max-width: 200px;
  object-fit: contain;
  padding: 8px 16px;             /* 底板留白 */
  background: rgba(255, 255, 255, 0.92);  /* 白色圆角底板，让透明 logo 浮现 */
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
}
.fav-grid[data-cat="game"] .fav-name,
.fav-grid[data-cat="movie"] .fav-name,
.fav-grid[data-cat="book"] .fav-name {
  font-size: 17px;
  font-weight: 600;
  color: var(--ink);
  word-break: break-word;
}
.fav-name { font-size: 13px; color: var(--ink-soft); word-break: break-all; line-height: 1.4; }

/* 文字包裹层（名称 + 详情 + 简介） */
.fav-text { display: flex; flex-direction: column; align-items: center; gap: 4px; min-width: 0; }
.fav-grid[data-cat="game"] .fav-text,
.fav-grid[data-cat="movie"] .fav-text,
.fav-grid[data-cat="book"] .fav-text { align-items: flex-start; gap: 8px; flex: 1; }
/* 影视/书籍：文字区加半透明白底，深色背景也清晰 */
.fav-grid[data-cat="movie"] .fav-hero .fav-text,
.fav-grid[data-cat="book"] .fav-hero .fav-text {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 10px;
  padding: 10px 14px;
}
.fav-cta {
  font-size: 13px;
  color: var(--accent-dark);
  font-weight: 600;
  white-space: nowrap;
}
/* 书籍/影视：作者/评分 元信息行 */
.fav-detail {
  font-size: 13px;
  color: var(--ink-soft);
}
/* 书籍/影视：简介截断 2 行 */
.fav-summary {
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---------- 顶部 tab（最爱 / 说说 / 足迹 / 留言） ---------- */
.home-tabs {
  display: flex;
  gap: 6px;
  margin: 26px 0 22px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 4px;
}
.tab-btn {
  flex: 1;
  padding: 8px 10px;
  border-radius: 8px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 14px;
}
.tab-btn.active { background: var(--accent); color: #fff; font-weight: 600; }

/* ---------- 说说 ---------- */
.status-list { display: flex; flex-direction: column; gap: 16px; }
.status-card {
  position: relative;           /* 点赞按钮绝对定位的参照 */
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 16px;
  display: flex;
  flex-direction: row;          /* 横排：图左文字右 */
  gap: 16px;
  align-items: flex-start;
}
.status-img {
  flex: none;
  width: 40%;                   /* 卡片宽度的 2/5 */
  height: auto;                 /* 高按比例自适应，完整显示不裁切 */
  object-fit: contain;
  border-radius: 10px;
}
.status-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 34px;         /* 给右下角点赞按钮留空间 */
}
.status-content {
  font-size: 15px;
  color: var(--ink);
  font-weight: 600;             /* 加粗更明显 */
  white-space: pre-wrap;
  word-break: break-word;
  line-height: 1.8;
}
.status-date { font-size: 12px; color: var(--ink-faint); }
/* 点赞按钮：固定卡片右下角 */
.status-like {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 13px;
  color: var(--ink-soft);
}
.status-like:hover { border-color: var(--accent); color: var(--ink); }

/* ---------- 足迹（左侧固定时间轴浮层 + 右侧卡片全宽） ---------- */
.places-layout { position: relative; }
/* 时间轴：贴在内容区左侧（靠近足迹卡片），滚动时吸顶 */
.place-nav {
  position: sticky;
  float: left;
  top: 74px;
  margin-left: -140px;         /* 回撤到内容区左侧，紧贴卡片 */
  width: 92px;
  max-height: calc(100vh - 100px);
  overflow-y: auto;
  z-index: 8;
  padding: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}
.pn-year { margin-bottom: 14px; }
.pn-year-name {
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-dark);
  margin-bottom: 6px;
}
.pn-months { display: flex; flex-direction: column; gap: 4px; }
.pn-month {
  padding: 4px 10px;
  border-radius: 8px;
  font-size: 13px;
  text-align: left;
  background: transparent;
  border: none;
  color: var(--ink-soft);
  cursor: pointer;
}
.pn-month:hover { background: var(--paper); color: var(--ink); }
.pn-month.active {
  background: var(--accent);
  color: #fff;
  font-weight: 600;
}
/* 右侧内容区：卡片保持原宽 */
.place-main { width: 100%; overflow: hidden; }
.place-item { margin-bottom: 18px; }
/* 年月分组标题 */
.tl-year-title {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  margin: 26px 0 6px;
  scroll-margin-top: 80px;
}
.tl-month-block { scroll-margin-top: 80px; }
.tl-month-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--accent-dark);
  margin: 14px 0 10px;
  padding-left: 10px;
  border-left: 3px solid var(--accent);
}
.place-content {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow .15s ease;
}
.place-content:hover { box-shadow: var(--shadow); }
.place-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; }
.place-body { padding: 14px 18px 16px; }
.place-name { font-family: var(--serif); font-size: 18px; font-weight: 700; color: var(--ink); }
.place-location { font-size: 13px; color: var(--ink-soft); margin-top: 4px; }
.place-desc {
  font-size: 14px;
  color: var(--ink);
  margin-top: 10px;
  padding: 8px 12px;
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}
.place-date { font-size: 12px; color: var(--ink-faint); margin-top: 8px; }

/* 竖图足迹：图片居左、宽度自适应（完整显示），文字与其他内容靠右 */
.place-content.place-portrait { display: flex; align-items: flex-start; }
.place-content.place-portrait .place-img {
  width: 42%;
  flex: none;
  aspect-ratio: auto;
  height: auto;
  object-fit: cover;
  border-radius: 10px;
  margin: 12px 0 12px 12px;
}
.place-content.place-portrait .place-body { flex: 1; min-width: 0; }
/* 竖图卡片内：操作按钮行与文字对齐 */
.place-content.place-portrait .place-ops { margin-top: 10px; }
/* 卡片内操作按钮（编辑/删除） */
.place-ops {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
}

/* 后台足迹：时间轴相对内容区，不覆盖导航 */
.admin-places { position: relative; }
.admin-place-nav {
  position: sticky;
  float: left;
  top: 80px;
  margin-left: -124px;         /* 回撤到内容区左侧 */
  width: 92px;
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  z-index: 8;
  padding: 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}
.admin-places .place-main { overflow: hidden; }

/* ---------- 留言板 ---------- */
.board-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 22px;
}
.board-form { margin-bottom: 20px; }
.board-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.board-fields input { max-width: 240px; }
.board-fields textarea { min-height: 100px; }
/* 验证码行与上面内容保持间距 */
.board-form .captcha-row { margin-top: 14px; }
.board-submit-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 10px;
}
.board-msg { font-size: 13px; color: var(--bad); min-height: 20px; }

.msg-list { display: flex; flex-direction: column; gap: 12px; }
.msg-item {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
}
.msg-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.msg-nick { font-weight: 600; font-size: 14px; color: var(--accent-dark); }
.msg-date { font-size: 12px; color: var(--ink-faint); }
.msg-content {
  font-size: 15px;
  color: var(--ink);
  line-height: 1.7;
  white-space: pre-wrap;
  word-break: break-word;
}
.msg-reply {
  margin-top: 10px;
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 8px 12px;
}
.reply-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 2px;
}
.reply-name { color: var(--accent-dark); }
.reply-time { color: var(--ink-faint); font-weight: 400; }
.reply-content { font-size: 14px; color: var(--ink-soft); white-space: pre-wrap; word-break: break-word; }

/* ---------- 页脚 ---------- */
.home-footer { padding: 30px 0 90px; text-align: center; } /* 底部留白，避免被悬浮 dock 遮挡 */
.footer-slogan { font-size: 13px; color: var(--ink-faint); }

/* ---------- 验证码 ---------- */
.captcha-row { display: flex; gap: 10px; align-items: center; }
.captcha-row input { flex: 1; }
.captcha-img {
  height: 40px;
  width: 100px;
  border-radius: 8px;
  cursor: pointer;
  border: 1px solid var(--line);
  background: #fff;
  display: block;
}

/* ---------- 空状态 ---------- */
.empty-state { padding: 32px 20px; color: var(--ink-soft); text-align: center; }
.empty-state .big { font-size: 40px; margin-bottom: 8px; }

/* ---------- 弹窗 ---------- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(61, 52, 37, .45);
  display: none;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  z-index: 50;
  overflow-y: auto;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  width: 100%;
  max-width: 560px;
  padding: 26px;
  animation: fadeIn .25s ease;
}
.modal h2 {
  font-family: var(--serif);
  font-size: 22px;
  margin-bottom: 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.modal .close { background: none; font-size: 24px; color: var(--ink-faint); padding: 0 4px; line-height: 1; }
.modal .close:hover { color: var(--ink); }
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ---------- 表单 ---------- */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 14px; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; }
.form-group label .req { color: var(--bad); }
.form-group .hint { font-size: 12px; color: var(--ink-faint); margin-top: 4px; }
.form-actions { display: flex; gap: 10px; margin-top: 20px; align-items: center; }
.form-actions .btn { flex: none; }
.form-msg { font-size: 14px; margin-top: 12px; min-height: 20px; }
.form-msg.error { color: var(--bad); }
.form-msg.ok { color: var(--ok); }

select {
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 34px 10px 12px;
  width: 100%;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease;
  background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238a7a5c' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}
select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(176, 128, 74, .15); }

.douban-row { display: flex; gap: 8px; align-items: flex-start; }
.douban-row input { flex: 1; }

/* 足迹：省份 / 城市 级联下拉 */
.place-region-row { display: flex; gap: 8px; }
.place-region-row select { flex: 1; }

/* 头像裁剪 */
.crop-modal { max-width: 420px; }
.crop-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 12px;
  overflow: hidden;
  background: #1a1a1a;
  touch-action: none;
}
#crop-canvas { width: 100%; height: 100%; display: block; }
.crop-mask { position: absolute; inset: 0; pointer-events: none; box-shadow: 0 0 0 9999px rgba(0,0,0,.5); }
.crop-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}
.crop-controls input[type=range] { flex: 1; }
.upload-btn { display: inline-flex; align-items: center; white-space: nowrap; cursor: pointer; }

.avatar-preview { margin-top: 8px; }
.avatar-preview img { width: 64px; height: 64px; object-fit: cover; border-radius: 50%; box-shadow: var(--shadow-sm); }

.img-preview { margin-top: 8px; }
.img-preview img {
  max-width: 100%;
  max-height: 180px;
  object-fit: contain;
  border-radius: 8px;
  border: 1px solid var(--line);
}

/* ---------- 后台 ---------- */
.admin-main { padding: 24px 0 60px; max-width: 1080px; margin: 0 auto; }
.admin-title { font-family: var(--serif); font-size: 24px; margin-bottom: 18px; }
.admin-nav {
  display: flex;
  gap: 8px;
  margin-bottom: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 5px;
}
.nav-btn {
  flex: 1;
  padding: 10px 12px;
  border-radius: 9px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 14px;
  white-space: nowrap;           /* 文字不换行 */
}
.nav-btn.active { background: var(--accent); color: #fff; font-weight: 600; }
.whoami { font-size: 13px; color: var(--ink-soft); }

.config-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 24px;
}

.toolbar { display: flex; justify-content: flex-end; margin-bottom: 14px; }

.note-list { display: flex; flex-direction: column; gap: 12px; }
.note-item {
  background: var(--card);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 2px 8px rgba(93, 74, 42, .06);
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.note-item .thumb {
  width: 46px;
  height: 46px;
  object-fit: contain;
  border-radius: 8px;
  flex: 0 0 46px;
  background: var(--paper);
}
.note-item .thumb-ph {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex: 0 0 46px;
}
.note-item .body { flex: 1; min-width: 0; }
.note-item .title-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.note-item .t { font-family: var(--serif); font-size: 16px; font-weight: 700; }
.note-item .meta { font-size: 12px; color: var(--ink-faint); margin-top: 2px; word-break: break-all; }
.note-item .content-preview {
  font-size: 13px;
  color: var(--ink-soft);
  margin-top: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.note-item .ops { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }

.badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 20px;
  font-weight: 600;
  white-space: nowrap;
}
.badge.pending { background: #f7ecd8; color: #96683a; }
.badge.approved { background: #e3f1e7; color: #3c7a4e; }

.empty-list { text-align: center; color: var(--ink-faint); padding: 40px 0; }

/* 回复弹窗 · 原留言展示 */
.reply-original {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 16px;
}
.reply-original .msg-content { font-size: 14px; margin-top: 6px; }

/* ---------- 登录 ---------- */
.login-wrap { max-width: 380px; margin: 8vh auto 0; }
.login-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px;
}
.login-card h2 { font-family: var(--serif); margin-bottom: 20px; text-align: center; }

/* ---------- toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 92px; /* 悬浮 dock 之上 */
  transform: translateX(-50%) translateY(20px);
  background: var(--ink);
  color: #fff;
  padding: 12px 22px;
  border-radius: 12px;
  font-size: 14px;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease, transform .25s ease;
  z-index: 100;
  max-width: 90vw;
  text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { background: var(--bad); }
.toast.ok { background: var(--ok); }

/* ---------- 响应式 ---------- */
@media (max-width: 640px) {
  .site-header .container { height: 54px; }
  .brand .title { font-size: 17px; }
  .brand .logo { width: 20px; height: 20px; }
  /* 顶部：播放器自适应宽度，手机上隐藏歌名（中间歌词区已展示歌名/歌词） */
  .player { width: auto; }
  .player .lyric-song { display: none; }
  /* 歌词区：居中显示，避开左右两侧的标题和播放按钮 */
  .lyric-mid { left: 50%; width: 38%; }
  .lyric { max-width: 100%; }
  .lyric-prev, .lyric-next { display: none; }   /* 手机只显示当前歌词行，避免拥挤 */
  .lyric-cur { font-size: 13px; }
  .player-btn { width: 26px; height: 26px; font-size: 12px; }
  .player-main { width: 30px; height: 30px; }


  .fav-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .fav-grid[data-cat="game"],
  .fav-grid[data-cat="movie"],
  .fav-grid[data-cat="book"] { grid-template-columns: 1fr; }
  .fav-grid[data-cat="game"] .fav-card,
  .fav-grid[data-cat="movie"] .fav-card,
  .fav-grid[data-cat="book"] .fav-card { gap: 12px; padding: 10px 12px; }
  .fav-grid[data-cat="game"] .fav-cover,
  .fav-grid[data-cat="movie"] .fav-cover,
  .fav-grid[data-cat="book"] .fav-cover { width: 66px; height: 88px; }
  .fav-grid[data-cat="game"] .fav-name,
  .fav-grid[data-cat="movie"] .fav-name,
  .fav-grid[data-cat="book"] .fav-name { font-size: 15px; }
  /* 底部悬浮栏：小屏下缩小图标/隐藏名称，但仍换行显示全部 */
  .dock-label { font-size: 14px; padding: 8px 10px 10px 12px; }
  .dock-item { padding: 5px 9px; min-height: 46px; }
  .dock-icon { font-size: 20px; line-height: 24px; height: 24px; }
  .dock-icon-img { width: 24px; height: 24px; }
  .dock-name { display: none; } /* 小屏只显示图标，节省空间 */

  .avatar { width: 80px; height: 80px; }
  .avatar-fallback { font-size: 36px; }

  /* 整体间距：手机上略微加大留白，更透气 */
  .section-block { margin-top: 28px; }
  .home-tabs { margin: 20px 0 18px; }

  .status-card { gap: 12px; padding: 14px; }
  .status-img { width: 40%; height: auto; }
  .status-content { font-size: 15px; }

  .board-card { padding: 18px; }
  .msg-item { padding: 14px 15px; }
  .msg-nick { font-size: 15px; }
  .msg-content { font-size: 15px; }
  .hero-bio { font-size: 15px; }

  /* 足迹：移动端时间轴变横向滚动条 */
  .places-layout { flex-direction: column; gap: 14px; }
  .place-nav {
    width: 100%;
    position: static;
    float: none;
    margin-left: 0;
    max-height: none;
    display: flex;
    gap: 16px;
    overflow-x: auto;
    padding-bottom: 8px;
    border-right: none;
    border-bottom: 2px solid var(--line);
  }
  .pn-year { flex: none; margin-bottom: 0; }
  .pn-months { flex-direction: row; gap: 6px; }

  .modal-overlay { padding: 0; align-items: flex-end; }
  .modal {
    border-radius: 18px 18px 0 0;
    max-width: none;
    max-height: 92vh;
    overflow-y: auto;
    padding: 22px 18px calc(22px + env(safe-area-inset-bottom));
  }
  .note-item { flex-wrap: wrap; }
  .note-item .ops { width: 100%; justify-content: flex-end; }
  .douban-row { flex-direction: column; }
  .board-submit-row { flex-wrap: wrap; }
}

/* 真正的手机宽度（≤480px）：底部悬浮栏改单行横向滑动，避免换行垫高遮挡内容 */
@media (max-width: 480px) {
  .dock-links { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .dock-links::-webkit-scrollbar { display: none; }
}
