/* ===== 时空罗盘 · 全局样式（中国风 · 水墨宣纸美学）===== */
/* build: 2026-07-02 · ink-map-1 水墨底板 */

:root {
  color-scheme: light;
  /* 水墨宣纸色板 */
  --paper: #ece2cb;        /* 宣纸米黄（卡片底）*/
  --paper-deep: #e3d6b8;   /* 宣纸深一档 */
  --ink: #2b2118;          /* 浓墨（主文字）*/
  --ink-2: #5a4d3c;        /* 次墨（次要文字）*/
  --ink-3: #8a7a62;        /* 淡墨（辅助文字）*/
  --ink-line: #b9a880;     /* 淡墨描边 */
  --c-gold: #9a7b32;       /* 赭金（强调）*/
  --c-amber: #b5762a;      /* 赭石橙 */
  --c-cinnabar: #b23a2e;   /* 朱砂红（印章）*/
  --c-cyan: #3f7d6e;       /* 黛青 */
  --ink-brush-button: url("../public/textures/ink-brush-button.png");
  /* 主题强调色（由 applyTheme JS Tween 实时更新）*/
  --theme-accent: #9a7b32;
}

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

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: #ece2cb;
  font-family: 'Inter', 'Noto Sans SC', 'Noto Sans JP', 'Noto Sans KR', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

#map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  /* 水墨海图滤镜：淡赭陆地、石绿水域、低对比墨线。 */
  filter: sepia(0.24) saturate(0.76) hue-rotate(-10deg) brightness(1.06) contrast(0.9);
  /* 主题切换时平滑过渡地图色调（由 applyTheme 更新 style.filter）*/
  transition: filter 0.9s ease;
}

/* deck.gl 弧线叠加画布：覆盖地图之上、UI 之下，不拦截鼠标 */
#deck-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 6;
  pointer-events: none;
}

/* ===== 东方纹样底纹遮罩 ===== */
#ornament-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
}
#ornament-overlay::before,
#ornament-overlay::after {
  position: absolute;
  inset: 0;
  content: '';
  pointer-events: none;
}
/* ===== 水墨底板叠层（贴近手绘水墨古地图设计稿）===== */
/* 做旧宣纸底纹：正片叠底叠加做旧纸张肌理、茶渍、暗边，让地图"落在纸上" */
.ink-map-paper {
  position: absolute;
  inset: 0;
  background-image: url('../public/textures/ink-paper.png');
  background-size: cover;
  background-position: center;
  mix-blend-mode: multiply;
  opacity: 0.42;
}
/* 水彩墨晕层：柔和青黛/赭石晕染色斑，营造山水画远山云雾设色 */
.ink-map-wash {
  position: absolute;
  inset: -6%;
  background-image: url('../public/textures/ink-wash.png');
  background-size: 120% 120%;
  background-position: center;
  mix-blend-mode: soft-light;
  opacity: 0.5;
  animation: inkWashDrift 46s ease-in-out infinite alternate;
}
@keyframes inkWashDrift {
  from { transform: translate3d(-1.4%, -1%, 0) scale(1.02); }
  to   { transform: translate3d(1.6%, 1.4%, 0) scale(1.06); }
}
@media (prefers-reduced-motion: reduce) {
  .ink-map-wash { animation: none; }
}
#ornament-overlay::before {
  background:
    radial-gradient(ellipse at 18% 18%, rgba(201, 158, 89, 0.2), transparent 34%),
    radial-gradient(ellipse at 32% 72%, rgba(196, 140, 69, 0.16), transparent 38%),
    radial-gradient(ellipse at 84% 54%, rgba(70, 116, 101, 0.2), transparent 44%),
    radial-gradient(ellipse at 74% 90%, rgba(51, 80, 73, 0.16), transparent 34%),
    linear-gradient(115deg, rgba(255, 248, 226, 0.08), rgba(87, 121, 110, 0.11));
  mix-blend-mode: multiply;
  opacity: 0.62;
}
#ornament-overlay::after {
  background:
    radial-gradient(ellipse at 82% 24%, rgba(37, 39, 34, 0.1), transparent 19%),
    radial-gradient(ellipse at 56% 62%, rgba(33, 31, 27, 0.08), transparent 20%),
    linear-gradient(180deg, rgba(255, 252, 244, 0.12), rgba(255, 252, 244, 0) 28%, rgba(43, 36, 26, 0.06) 100%);
  mix-blend-mode: multiply;
  opacity: 0.46;
}
/* 四周淡墨晕染，似古画装裱边框，聚焦中心 */
.vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    ellipse at center,
    rgba(120, 100, 70, 0) 55%,
    rgba(70, 55, 30, 0.22) 100%
  );
}
/* 顶部祥云回纹隐纹（极淡墨色，仅作宣纸肌理）*/
.cloud-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.06;
  background-image: url("data:image/svg+xml,%3Csvg width='120' height='120' viewBox='0 0 120 120' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' stroke='%235a4d3c' stroke-width='1.2'%3E%3Cpath d='M20 60 q0-18 18-18 q14 0 14 14 q0 8-8 8 q-6 0-6-6'/%3E%3Cpath d='M80 90 q0-18 18-18 q14 0 14 14 q0 8-8 8 q-6 0-6-6'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 160px 160px;
  mix-blend-mode: multiply;
}
/* 宣纸纤维纹理：feTurbulence 噪声，营造绢本山水画的纸质肌理 */
.paper-grain {
  position: absolute;
  inset: 0;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
  mix-blend-mode: multiply;
}

/* 主地图轻氛围：水墨小鸟剪影，只提供生气，不抢锚点信息 */
.bird-flock {
  --bird-y: 0px;
  --bird-scale: 0.84;
  --bird-opacity: 0.44;
  --bird-drift-y: -16px;
  --bird-duration: 34s;
  --bird-delay: -10s;
  position: absolute;
  left: -180px;
  top: 12%;
  width: 176px;
  height: 58px;
  opacity: 0;
  mix-blend-mode: multiply;
  pointer-events: none;
  will-change: transform, opacity;
  animation: inkBirdDrift var(--bird-duration) linear infinite;
  animation-delay: var(--bird-delay);
}
.bird-flock-a {
  top: 15%;
}
.bird-flock-b {
  --bird-y: 12px;
  --bird-scale: 0.66;
  --bird-opacity: 0.35;
  --bird-drift-y: 10px;
  --bird-duration: 46s;
  --bird-delay: -28s;
  top: 38%;
}
.bird-flock-c {
  --bird-y: 8px;
  --bird-scale: 0.56;
  --bird-opacity: 0.3;
  --bird-drift-y: -8px;
  --bird-duration: 56s;
  --bird-delay: -44s;
  top: 24%;
}
.bird-flock span {
  position: absolute;
  width: 26px;
  height: 15px;
  filter: blur(0.1px);
}
.bird-flock span::before,
.bird-flock span::after {
  content: "";
  position: absolute;
  top: 6px;
  width: 14px;
  height: 3px;
  border-top: 2.2px solid rgba(43, 36, 26, 0.86);
  border-radius: 999px;
  box-shadow: 0 0 0.5px rgba(43, 36, 26, 0.28);
}
.bird-flock span::before {
  left: 0;
  transform: rotate(26deg);
  transform-origin: right center;
}
.bird-flock span::after {
  left: 12px;
  transform: rotate(-26deg);
  transform-origin: left center;
}
.bird-flock span:nth-child(1) { left: 0; top: 22px; }
.bird-flock span:nth-child(2) { left: 30px; top: 8px; transform: scale(0.9); }
.bird-flock span:nth-child(3) { left: 62px; top: 25px; transform: scale(0.76); }
.bird-flock span:nth-child(4) { left: 96px; top: 14px; transform: scale(0.84); }
.bird-flock span:nth-child(5) { left: 132px; top: 32px; transform: scale(0.66); }
.bird-flock span:nth-child(6) { left: 154px; top: 18px; transform: scale(0.56); }
@keyframes inkBirdDrift {
  0% {
    opacity: 0;
    transform: translate3d(-14vw, var(--bird-y), 0) scale(var(--bird-scale));
  }
  8% {
    opacity: var(--bird-opacity);
  }
  52% {
    transform: translate3d(54vw, calc(var(--bird-y) + var(--bird-drift-y)), 0) scale(var(--bird-scale));
  }
  86% {
    opacity: var(--bird-opacity);
  }
  100% {
    opacity: 0;
    transform: translate3d(116vw, calc(var(--bird-y) - 4px), 0) scale(var(--bird-scale));
  }
}
@media (prefers-reduced-motion: reduce) {
  .bird-flock {
    animation: none;
    opacity: 0.14;
    transform: translate3d(62vw, var(--bird-y), 0) scale(var(--bird-scale));
  }
}

/* ===== 四角古典回纹装饰 ===== */
.corner-fret {
  position: absolute;
  width: 64px;
  height: 64px;
  opacity: 0.6;
  animation: cornerFade 1.4s ease-out 0.6s both;
}
@media (min-width: 768px) {
  .corner-fret {
    width: 88px;
    height: 88px;
  }
}
.corner-tl { top: 10px; left: 10px; }
.corner-tr { top: 10px; right: 10px; }
.corner-bl { bottom: 10px; left: 10px; }
.corner-br { bottom: 10px; right: 10px; }
@keyframes cornerFade {
  from { opacity: 0; }
  to { opacity: 0.6; }
}

/* MapLibre 极简化：弱化版权信息、隐藏 logo */
.maplibregl-ctrl-attrib {
  background: rgba(236, 226, 203, 0.6) !important;
  color: rgba(90, 77, 60, 0.6) !important;
  font-size: 9px !important;
}
.maplibregl-ctrl-attrib a {
  color: rgba(154, 123, 50, 0.8) !important;
}
.maplibregl-ctrl-logo {
  display: none !important;
}
/* 导航控件宣纸浅色化 */
.maplibregl-ctrl-group {
  background: rgba(236, 226, 203, 0.82) !important;
  border: 1px solid rgba(154, 123, 50, 0.28) !important;
  backdrop-filter: blur(6px);
  box-shadow: 0 4px 14px -6px rgba(70, 55, 30, 0.5) !important;
}
.maplibregl-ctrl-group button {
  filter: sepia(0.3) brightness(0.55) saturate(0.8);
}

/* ===== 字体工具类 ===== */
.font-serif {
  font-family: 'Playfair Display', 'Noto Serif SC', Georgia, serif;
}
.font-brush,
.font-kai {
  font-family: 'Ma Shan Zheng', 'Noto Serif SC', KaiTi, serif;
}

/* ===== 顶部渐隐遮罩，提升宣纸底图上的文字可读性 ===== */
.top-scrim {
  background: linear-gradient(
    to bottom,
    rgba(236, 226, 203, 0.92) 0%,
    rgba(236, 226, 203, 0.45) 55%,
    rgba(236, 226, 203, 0) 100%
  );
}

.tracking-glow {
  text-shadow: 0 1px 2px rgba(255, 252, 244, 0.6);
}

/* ===== 标题栏入场 ===== */
.header-enter {
  animation: fadeDown 1s ease-out forwards;
}
@keyframes fadeDown {
  from {
    opacity: 0;
    transform: translateY(-16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== 印章（朱砂红方印）===== */
.seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  background: linear-gradient(145deg, #d6453f, #b8332e);
  color: #fff;
  font-family: 'Ma Shan Zheng', 'Noto Serif SC', KaiTi, serif;
  box-shadow: 0 2px 10px rgba(224, 82, 77, 0.45),
    inset 0 0 0 1.5px rgba(255, 255, 255, 0.25);
  letter-spacing: 0.05em;
}

/* ===== 图层控件入场 ===== */
.panel-enter-left {
  animation: fadeRight 0.8s ease-out 0.4s both;
}
@keyframes fadeRight {
  from {
    opacity: 0;
    transform: translateX(-24px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ===== 顶部工具按钮组（语言切换 / GPS 定位）===== */
.tool-cluster {
  position: absolute;
  top: 84px;
  right: 16px;
  z-index: 28;
  display: flex;
  width: 158px;
  flex-direction: column;
  gap: 8px;
  pointer-events: auto;
  transition: opacity 0.22s ease, transform 0.22s ease;
}
body.info-panel-open .tool-cluster {
  opacity: 0;
  pointer-events: none;
  transform: translateX(10px);
}
@media (min-width: 768px) {
  .tool-cluster {
    top: 104px;
    right: 24px;
  }
}
.tool-btn,
.layer-trigger {
  position: relative;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  width: 100%;
  align-items: center;
  gap: 6px;
  height: 40px;
  padding: 0 8px 0 11px;
  border: 1.5px solid rgba(43, 33, 24, 0.5);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 252, 244, 0.42), rgba(236, 226, 203, 0.26)),
    rgba(247, 244, 236, 0.24);
  color: #2b2118;
  font-family: 'Ma Shan Zheng', 'Noto Serif SC', KaiTi, serif;
  font-size: 16px;
  font-weight: 400;
  letter-spacing: 0.05em;
  cursor: pointer;
  text-align: left;
  white-space: nowrap;
  isolation: isolate;
  overflow: hidden;
  -webkit-backdrop-filter: blur(5px) saturate(0.96);
  backdrop-filter: blur(5px) saturate(0.96);
  box-shadow:
    0 4px 7px -7px rgba(43, 33, 24, 0.5),
    inset 0 0 0 1px rgba(255, 252, 244, 0.18);
  transition:
    transform 0.2s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.2s ease,
    background 0.2s ease,
    color 0.2s ease;
}
.tool-btn::before,
.layer-trigger::before {
  content: '';
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 7px;
  height: 1px;
  z-index: 0;
  background: linear-gradient(90deg, transparent, rgba(43, 33, 24, 0.22), transparent);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.tool-btn::after,
.layer-trigger::after {
  content: '';
  position: absolute;
  inset: 2px;
  z-index: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(255, 252, 244, 0.3), transparent 58%);
  opacity: 0.62;
  pointer-events: none;
}
.tool-btn:hover,
.layer-trigger:hover {
  border-color: rgba(43, 33, 24, 0.68);
  background:
    linear-gradient(180deg, rgba(255, 252, 244, 0.52), rgba(236, 226, 203, 0.34)),
    rgba(247, 244, 236, 0.32);
  color: #211810;
  transform: translateY(-1px);
}
.tool-btn:hover::before,
.layer-trigger:hover::before {
  opacity: 1;
}
.bgm-toggle {
  position: absolute;
  left: 22px;
  bottom: 22px;
  z-index: 27;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(154, 123, 50, 0.34);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 28%, rgba(255, 252, 244, 0.94), rgba(228, 218, 194, 0.88)),
    rgba(240, 232, 210, 0.88);
  color: #7a5427;
  cursor: pointer;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 10px 26px -16px rgba(50, 38, 20, 0.62);
  transition: transform 0.18s ease, border-color 0.18s ease, color 0.18s ease, opacity 0.18s ease;
}
.bgm-toggle:hover {
  border-color: rgba(63, 125, 110, 0.45);
  color: #2e6d5f;
  transform: translateY(-1px);
}
.bgm-note {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 20px;
  line-height: 1;
}
.bgm-bars {
  position: absolute;
  right: 8px;
  bottom: 9px;
  display: inline-flex;
  align-items: flex-end;
  gap: 2px;
  height: 10px;
  opacity: 0;
}
.bgm-bars i {
  display: block;
  width: 2px;
  height: 5px;
  border-radius: 999px;
  background: #3f7d6e;
  transform-origin: bottom;
}
.bgm-toggle.is-playing .bgm-bars {
  opacity: 1;
}
.bgm-toggle.is-playing .bgm-bars i {
  animation: bgmBars 1.25s ease-in-out infinite;
}
.bgm-toggle.is-playing .bgm-bars i:nth-child(2) {
  animation-delay: 0.18s;
}
.bgm-toggle.is-playing .bgm-bars i:nth-child(3) {
  animation-delay: 0.34s;
}
.bgm-toggle.is-muted {
  opacity: 0.72;
  color: #786b58;
}
@keyframes bgmBars {
  0%,
  100% {
    transform: scaleY(0.52);
  }
  45% {
    transform: scaleY(1.5);
  }
}
.tool-btn .tool-ico {
  line-height: 1;
  justify-self: center;
  position: relative;
  z-index: 1;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: transparent;
  color: #33291f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.tool-btn .tool-ico svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
}
.tool-btn > span:not(.tool-ico):not(.tool-badge),
.layer-trigger > span:not(.layer-trigger-icon):not(.layer-trigger-arrow) {
  min-width: 0;
  line-height: 1.05;
  position: relative;
  z-index: 1;
  overflow: hidden;
  text-overflow: ellipsis;
}
.tool-btn.locating {
  pointer-events: none;
  opacity: 0.8;
}
.tool-btn.locating .tool-ico {
  animation: spin 1.1s linear infinite;
}
.tool-btn.logged-in .tool-ico svg {
  stroke: #C9A84C;
}

.explore-launcher {
  position: absolute;
  bottom: 42px;
  left: 50%;
  z-index: 26;
  display: flex;
  min-width: 286px;
  max-width: calc(100vw - 40px);
  min-height: 66px;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 11px 46px 11px 22px;
  transform: translateX(-50%);
  border: none;
  background: transparent;
  color: #fff7e6;
  cursor: pointer;
  isolation: isolate;
  font-family: 'Ma Shan Zheng', 'Noto Serif SC', KaiTi, serif;
  font-size: 30px;
  font-weight: 500;
  letter-spacing: 0.12em;
  line-height: 1;
  text-shadow: 0 2px 2px rgba(0, 0, 0, 0.46), 0 0 16px rgba(255, 246, 224, 0.18);
  transition: transform 0.25s ease, filter 0.25s ease;
  animation: exploreBeacon 3.2s ease-in-out infinite;
}
/* 横扫大墨块：真实笔刷材质做底，不再依赖 SVG 滤镜变形。 */
.explore-launcher::after {
  content: '';
  position: absolute;
  inset: -9px -30px -10px -24px;
  z-index: -1;
  background-image: var(--ink-brush-button);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 60%;
  filter: drop-shadow(0 7px 8px rgba(15, 11, 7, 0.34));
  pointer-events: none;
  opacity: 0.74;
  animation: none;
}
.explore-launcher::before {
  position: absolute;
  top: var(--ripple-y, 50%);
  left: var(--ripple-x, 50%);
  z-index: 0;
  width: 12px;
  height: 12px;
  border-radius: 9999px;
  background: rgba(255, 248, 230, 0.42);
  content: '';
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0);
}
.explore-launcher > span {
  position: relative;
  z-index: 1;
}
.explore-launcher:hover {
  animation: none;
  transform: translateX(-50%) translateY(-3px) scale(1.03);
  filter: brightness(1.06);
}
.explore-launcher:hover::after {
  filter: drop-shadow(0 9px 10px rgba(15, 11, 7, 0.38)) brightness(1.04);
  opacity: 0.8;
}
.explore-launcher:active {
  transform: translateX(-50%) translateY(0) scale(0.98);
}
.explore-launcher.is-pressing {
  animation: explorePress 0.28s cubic-bezier(0.2, 0.8, 0.3, 1);
}
.explore-launcher.is-rippling::before {
  animation: exploreRipple 0.42s ease-out;
}
.explore-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border: none;
  border-radius: 7px;
  background: radial-gradient(130% 130% at 38% 28%, #c4483a 0%, #a5301f 68%, #8c1f13 100%);
  color: #fff5ea;
  font-family: 'Ma Shan Zheng', 'Noto Serif SC', KaiTi, serif;
  font-size: 24px;
  line-height: 1;
  box-shadow:
    0 4px 10px -4px rgba(120, 24, 12, 0.76),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
}
.explore-launcher.locating { pointer-events: none; opacity: 0.84; }
.explore-launcher.locating .explore-ico { animation: spin 1.1s linear infinite; }
@keyframes exploreBeacon {
  0%, 100% { transform: translateX(-50%) scale(1); }
  50% { transform: translateX(-50%) scale(1.028); }
}
@keyframes exploreRing {
  0%, 58% { opacity: 0; transform: scale(0.99); }
  70% { opacity: 0.38; }
  100% { opacity: 0; transform: scale(1.24); }
}
@keyframes explorePress {
  0% { transform: translateX(-50%) scale(0.98); }
  65% { transform: translateX(-50%) scale(1.01); }
  100% { transform: translateX(-50%) scale(1); }
}
@keyframes mainBtnPress {
  0% { transform: scale(0.96); }
  60% { transform: scale(1.01); }
  100% { transform: scale(1); }
}
@keyframes exploreRipple {
  0% { opacity: 0.38; transform: translate(-50%, -50%) scale(0); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(14); }
}
@media (min-width: 768px) {
  .explore-launcher { bottom: 46px; }
}

/* ===== 底部三主按钮容器 ===== */
.main-actions {
  position: absolute;
  bottom: 42px;
  left: 50%;
  z-index: 26;
  display: flex;
  gap: 14px;
  transform: translateX(-50%);
  transition: opacity 0.3s ease, transform 0.3s ease;
}
body.info-panel-open .main-actions,
body.route-planner-open .main-actions {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(10px);
}
@media (min-width: 768px) {
  .main-actions { bottom: 46px; }
}

/* 三主按钮：水墨毛笔笔刷风格，每块墨迹 contained 在按钮内防重叠 */
.main-actions .main-action-btn {
  position: relative;
  display: flex;
  flex: 1 1 0;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 56px;
  padding: 11px 20px;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #fff7e6;
  cursor: pointer;
  isolation: isolate;
  overflow: hidden;
  font-family: 'Ma Shan Zheng', 'Noto Serif SC', KaiTi, serif;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.1em;
  line-height: 1;
  text-shadow: 0 2px 2px rgba(0, 0, 0, 0.46), 0 0 16px rgba(255, 246, 224, 0.18);
  transition: transform 0.2s ease, filter 0.2s ease;
}
/* 水墨毛笔底：contained 在按钮内，不溢出到相邻按钮 */
.main-actions .main-action-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image: var(--ink-brush-button);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 115% 100%;
  filter: drop-shadow(0 5px 6px rgba(15, 11, 7, 0.3));
  pointer-events: none;
  opacity: 0.78;
}
.main-actions .main-action-btn > span {
  position: relative;
  z-index: 1;
}
.main-actions .main-action-btn:hover {
  transform: translateY(-3px) scale(1.03);
  filter: brightness(1.06);
}
.main-actions .main-action-btn:hover::after {
  filter: drop-shadow(0 7px 8px rgba(15, 11, 7, 0.34)) brightness(1.04);
  opacity: 0.82;
}
.main-actions .main-action-btn:active {
  transform: translateY(0) scale(0.98);
}
#ui-root .main-actions,
#ui-root .main-actions .main-action-btn {
  pointer-events: auto;
}
.main-actions .main-action-btn .explore-ico {
  width: 32px;
  height: 32px;
  font-size: 20px;
  border-radius: 7px;
}
/* 激活态：朱砂高亮 */
.main-actions .main-action-btn.active {
  filter: brightness(1.12);
}
.main-actions .main-action-btn.active .explore-ico {
  background: radial-gradient(130% 130% at 38% 28%, #d9503e 0%, #b5341f 68%, #9a2010 100%);
  box-shadow: 0 0 14px 2px rgba(217, 80, 62, 0.5), 0 4px 10px -4px rgba(120, 24, 12, 0.76);
}
.main-actions .main-action-btn.active::after {
  opacity: 0.88;
}
/* 涟漪 */
.main-actions .main-action-btn::before {
  position: absolute;
  top: var(--ripple-y, 50%);
  left: var(--ripple-x, 50%);
  z-index: 0;
  width: 12px;
  height: 12px;
  border-radius: 9999px;
  background: rgba(255, 248, 230, 0.4);
  content: '';
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0);
}
.main-actions .main-action-btn.is-pressing {
  animation: mainBtnPress 0.28s cubic-bezier(0.2, 0.8, 0.3, 1);
}
.main-actions .main-action-btn.is-rippling::before {
  animation: exploreRipple 0.42s ease-out;
}
/* 移动端横屏：三按钮宽度自适应 */
@media (max-width: 820px) and (orientation: landscape) {
  .main-actions {
    gap: 8px;
    bottom: 28px;
    width: min(100%, 440px);
  }
  .main-actions .main-action-btn {
    min-height: 48px;
    font-size: 15px;
    padding: 7px 12px;
  }
  .main-actions .main-action-btn .explore-ico {
    width: 28px;
    height: 28px;
    font-size: 17px;
  }
}
@media (max-width: 500px) and (orientation: landscape) {
  .main-actions { gap: 5px; width: calc(100vw - 24px); }
  .main-actions .main-action-btn { font-size: 13px; padding: 6px 8px; }
  .main-actions .main-action-btn .explore-ico { width: 24px; height: 24px; font-size: 15px; }
}

/* 轻量 Toast 提示 */
.toast {
  position: absolute;
  top: auto;
  bottom: 28px;
  left: 50%;
  z-index: 70;
  transform: translate(-50%, 8px);
  width: max-content;
  max-width: min(420px, calc(100vw - 32px));
  padding: 10px 14px;
  border-radius: 7px;
  border: 1px solid rgba(112, 83, 42, 0.26);
  background: rgba(247, 244, 236, 0.94);
  color: #2b2118;
  font-size: 13px;
  text-align: center;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 3px 8px rgba(70, 55, 30, 0.18);
  transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}
body.compass-panel-open .toast.show {
  opacity: 0;
  transform: translate(-50%, 8px);
}

/* ===== 信息面板：毛玻璃 + 弹簧滑出 ===== */
#info-panel {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 30;
  display: flex;
  height: 100%;
  width: 100%;
  max-width: 440px;
  padding: 16px;
  transform: translateX(110%);
  opacity: 0;
  transition:
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.5s ease;
  pointer-events: none;
}
@media (min-width: 768px) {
  #info-panel {
    padding: 24px;
  }
}
#info-panel.open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}

.glass-card {
  position: relative;
  display: flex;
  height: 100%;
  width: 100%;
  flex-direction: column;
  overflow-y: auto;
  border-radius: 20px;
  border: 1px solid rgba(154, 123, 50, 0.3);
  background:
    linear-gradient(180deg, rgba(244, 237, 219, 0.97), rgba(233, 222, 196, 0.97));
  padding: 28px;
  box-shadow: inset 0 1px 0 0 rgba(255, 255, 255, 0.5),
    0 24px 70px -28px rgba(70, 55, 30, 0.55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
@media (min-width: 768px) {
  .glass-card {
    padding: 36px;
  }
}

.glass-top-band {
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 3px;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
}

.impact-brief {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 18px 18px 16px;
  border: 1px solid color-mix(in srgb, var(--impact-accent, #9a7b32) 30%, rgba(154, 123, 50, 0.18));
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 252, 244, 0.72), rgba(255, 252, 244, 0.36)),
    radial-gradient(circle at 8% 0%, color-mix(in srgb, var(--impact-accent, #9a7b32) 18%, transparent), transparent 34%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}
.impact-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: color-mix(in srgb, var(--impact-accent, #9a7b32) 82%, #171a20);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.impact-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 9999px;
  background: var(--impact-accent, #9a7b32);
  box-shadow: 0 0 9px var(--impact-accent, #9a7b32);
}
.impact-era {
  margin-left: auto;
  color: #8a7a62;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: none;
}
.impact-place {
  margin: 0;
  color: #171a20;
  font-size: 34px;
  font-weight: 700;
  line-height: 1.02;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
.impact-title {
  margin: 0;
  color: #6b4f1f;
  font-size: 20px;
  line-height: 1.35;
  overflow-wrap: anywhere;
  text-wrap: balance;
}
.impact-story {
  margin: 0;
  color: #2b2118;
  max-width: 34rem;
  font-family: 'Playfair Display', 'Noto Serif SC', 'Songti SC', STSong, SimSun, Georgia, serif;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.72;
  text-wrap: pretty;
}
.impact-brief .panel-image {
  margin-top: 0;
  height: 156px;
  min-height: 132px;
  aspect-ratio: 16 / 7;
  border-color: color-mix(in srgb, var(--impact-accent, #9a7b32) 24%, rgba(255, 255, 255, 0.18));
  box-shadow: none;
}
.impact-brief .panel-image-cap {
  padding-right: 72px;
}
.impact-facts {
  display: grid;
  gap: 8px;
  margin-top: 2px;
}
.impact-facts span {
  display: flex;
  min-width: 0;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 11px;
  background: rgba(23, 26, 32, 0.06);
  color: #3d3122;
  font-size: 12px;
  line-height: 1.35;
}
.impact-facts b {
  flex: 0 0 auto;
  color: #8a3a2f;
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
@media (min-width: 768px) {
  .impact-place {
    font-size: 40px;
  }
}
@media (max-width: 520px) {
  .impact-brief {
    padding: 16px 14px 14px;
  }
  .impact-brief .panel-image {
    height: 136px;
  }
  .impact-place {
    font-size: 30px;
  }
  .impact-title {
    font-size: 18px;
  }
}

/* 面板右下角祥云水印 */
.glass-card .panel-seal {
  position: absolute;
  right: 22px;
  bottom: 20px;
  width: 46px;
  height: 46px;
  opacity: 0.5;
  pointer-events: none;
}

/* ===== 自定义滚动条 ===== */
.glass-card::-webkit-scrollbar {
  width: 4px;
}
.glass-card::-webkit-scrollbar-track {
  background: transparent;
}
.glass-card::-webkit-scrollbar-thumb {
  background: rgba(90, 77, 60, 0.35);
  border-radius: 2px;
}

.panel-place-title {
  margin: 0;
  color: #2b2118;
  font-size: 31px;
  font-weight: 700;
  line-height: 1.12;
  overflow-wrap: anywhere;
}

.panel-story-title {
  margin-top: 12px;
  color: #6b5d48;
  font-size: 18px;
  line-height: 1.6;
  letter-spacing: 0.03em;
  overflow-wrap: anywhere;
}

.panel-description {
  margin: 4px 0 0;
  line-height: 1.6;
}

@media (min-width: 768px) {
  .panel-place-title {
    font-size: 38px;
  }
}

/* ===== 面板内元素入场（错峰淡入）===== */
.fade-in-up {
  opacity: 0;
  transform: translateY(14px);
  animation: fadeInUp 0.6s ease-out forwards;
}
@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== 关闭按钮 ===== */
.close-btn {
  position: absolute;
  right: 20px;
  top: 20px;
  display: flex;
  height: 36px;
  width: 36px;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  border: 1px solid rgba(154, 123, 50, 0.35);
  background: rgba(255, 252, 244, 0.5);
  color: #5a4d3c;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 2;
}
.close-btn:hover {
  transform: rotate(90deg);
  border-color: rgba(178, 58, 46, 0.6);
  color: #b23a2e;
}

/* ===== 打字机光标 ===== */
.typewriter-caret {
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 2px;
  background: #2b2118;
  vertical-align: text-bottom;
  animation: caretBlink 0.9s step-end infinite;
}
@keyframes caretBlink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0;
  }
}

/* ===== 图层筛选控件 ===== */
.layer-control {
  position: absolute;
  top: 184px;
  right: 16px;
  z-index: 25;
  width: 168px;
  pointer-events: auto;
}
@media (min-width: 768px) {
  .layer-control {
    top: 204px;
    right: 24px;
  }
}
.layer-trigger {
  transition:
    transform 0.2s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.2s ease,
    background 0.2s ease,
    color 0.2s ease;
}
.layer-trigger:hover {
  border-color: rgba(63, 125, 110, 0.34);
  color: #171a20;
  transform: translateY(-1px);
}
.layer-trigger-icon { font-size: 16px; line-height: 1; justify-self: center; }
.layer-trigger-arrow { color: #5a4d3c; justify-self: end; transition: transform 0.2s ease; }
.layer-control.open .layer-trigger-arrow { transform: rotate(180deg); }
.layer-menu {
  display: none;
  margin-top: 8px;
  border: 1px solid rgba(154, 123, 50, 0.3);
  border-radius: 12px;
  background: rgba(244, 237, 219, 0.96);
  padding: 10px;
  box-shadow: 0 18px 44px -22px rgba(70, 55, 30, 0.6);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.layer-control.open .layer-menu { display: block; }
.layer-item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 12px;
  border-radius: 8px;
  padding: 6px 8px;
  padding-left: 6px;
  text-align: left;
  background: transparent;
  border: none;
  /* 左侧主题色竖条（默认透明，激活后亮起）*/
  border-left: 2.5px solid transparent;
  cursor: pointer;
  transition: all 0.35s ease;
}
.layer-item.active {
  background: rgba(154, 123, 50, 0.12);
  border-left-color: var(--theme-accent, #9a7b32);
  background: color-mix(in srgb, var(--theme-accent, #9a7b32) 12%, transparent);
}
.layer-item:not(.active) {
  opacity: 0.48;
}
.layer-item:not(.active):hover {
  opacity: 0.78;
  background: rgba(154, 123, 50, 0.06);
}
.layer-dot {
  height: 10px;
  width: 10px;
  flex-shrink: 0;
  border-radius: 9999px;
  transition: all 0.3s ease;
}

/* ===== 加载遮罩（宣纸水墨晕染）===== */
.loading-overlay {
  position: absolute;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center, #f2e9d4 0%, #e3d6b8 100%);
  transition: opacity 0.8s ease;
}
.loading-overlay.hidden {
  opacity: 0;
  pointer-events: none;
}

/* 水墨晕染：从中心向外扩散的三个同心圆环 */
.ink-ripple {
  position: relative;
  width: 140px;
  height: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 30px;
}
.ink-ripple .ink-ring {
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  border: 1.5px solid #5a4d3c;
  opacity: 0;
  animation: inkSpread 3s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}
.ink-ripple .ink-ring:nth-child(2) {
  animation-delay: 1s;
}
.ink-ripple .ink-ring:nth-child(3) {
  animation-delay: 2s;
}
.ink-ripple .ink-core {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border-radius: 9999px;
  background: radial-gradient(circle at 50% 40%, rgba(178, 58, 46, 0.18), rgba(178, 58, 46, 0.04));
  border: 1.5px solid rgba(178, 58, 46, 0.55);
  font-family: 'Ma Shan Zheng', 'Noto Serif SC', KaiTi, serif;
  font-size: 24px;
  color: #b23a2e;
  writing-mode: vertical-rl;
  letter-spacing: 1px;
  animation: inkBreathe 3s ease-in-out infinite;
}
@keyframes inkSpread {
  0% {
    transform: scale(0.35);
    opacity: 0.85;
    border-width: 2px;
  }
  100% {
    transform: scale(1);
    opacity: 0;
    border-width: 0.5px;
  }
}
@keyframes inkBreathe {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
.loading-title {
  font-family: 'Ma Shan Zheng', 'Noto Serif SC', serif;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: #6b4f1f;
  text-shadow: 0 1px 2px rgba(255, 252, 244, 0.6);
}
.loading-sub {
  margin-top: 12px;
  font-size: 12px;
  letter-spacing: 0.3em;
  color: #8a7a62;
}

/* ===== GPS 用户位置标记（脉冲光点）===== */
.gps-marker {
  position: relative;
  width: 18px;
  height: 18px;
}
.gps-marker .gps-core {
  position: absolute;
  inset: 4px;
  border-radius: 9999px;
  background: #4aa3ff;
  box-shadow: 0 0 10px 2px rgba(74, 163, 255, 0.9);
}
.gps-marker .gps-ring {
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  background: rgba(74, 163, 255, 0.4);
  animation: gpsPulse 1.8s ease-out infinite;
}
.gps-marker.is-locating-focus::after,
.compass-marker.is-locating-focus::after {
  content: '';
  position: absolute;
  inset: -18px;
  border-radius: 9999px;
  border: 2px solid rgba(255, 248, 230, 0.9);
  box-shadow:
    0 0 0 1px rgba(154, 123, 50, 0.42),
    0 0 24px rgba(201, 168, 76, 0.45);
  animation: userFocusRipple 1.3s ease-out 2;
  pointer-events: none;
}
@keyframes gpsPulse {
  0% {
    transform: scale(0.6);
    opacity: 0.9;
  }
  100% {
    transform: scale(2.6);
    opacity: 0;
  }
}
@keyframes userFocusRipple {
  0% {
    transform: scale(0.55);
    opacity: 0;
  }
  18% {
    opacity: 0.95;
  }
  100% {
    transform: scale(1.55);
    opacity: 0;
  }
}

/* WebGL / 地图降级提示 */
.webgl-fallback {
  position: absolute;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px;
  text-align: center;
  background: radial-gradient(ellipse at center, #f2e9d4 0%, #e3d6b8 100%);
  color: #2b2118;
}

/* ============================================================= */
/* ===== v2 新增组件样式 ======================================= */
/* ============================================================= */

/* ===== 语言选择器（右上角圆形按钮 + 下拉）===== */
.lang-selector {
  position: relative;
  display: flex;
}
.lang-trigger.tool-btn {
  border: 1.5px solid rgba(43, 33, 24, 0.5);
}
.lang-trigger.tool-btn .lang-ico {
  line-height: 1;
  justify-self: center;
  position: relative;
  z-index: 1;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: transparent;
  color: #33291f;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.lang-trigger.tool-btn .lang-ico svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
}
.lang-trigger.tool-btn:hover {
  color: #211810;
  transform: translateY(-1px);
}
.lang-menu {
  position: absolute;
  top: 48px;
  right: 0;
  width: 168px;
  border-radius: 14px;
  border: 1px solid rgba(154, 123, 50, 0.3);
  background: rgba(244, 237, 219, 0.98);
  padding: 6px;
  box-shadow: 0 18px 44px -16px rgba(70, 55, 30, 0.6);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateY(-8px) scale(0.97);
  transform-origin: top right;
  pointer-events: none;
  transition: all 0.28s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 40;
}
.lang-menu.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.lang-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 12px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: #4a3e2e;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  transition: all 0.2s ease;
}
.lang-option:hover {
  background: rgba(154, 123, 50, 0.12);
  color: #2b2118;
}
.lang-option.active {
  background: rgba(178, 58, 46, 0.12);
  color: #b23a2e;
  font-weight: 600;
}
.lang-option .flag {
  font-size: 17px;
  line-height: 1;
}

/* ===== 附近历史地（左侧抽屉）===== */
#nearby-drawer {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 28;
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  max-width: 340px;
  padding: 16px;
  transform: translateX(-110%);
  opacity: 0;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease;
  pointer-events: none;
}
@media (min-width: 768px) {
  #nearby-drawer {
    padding: 20px;
  }
}
#nearby-drawer.open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}
.nearby-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: 20px;
  border: 1px solid rgba(154, 123, 50, 0.3);
  background: linear-gradient(180deg, rgba(244, 237, 219, 0.96), rgba(233, 222, 196, 0.96));
  padding: 20px;
  box-shadow: 0 24px 64px -24px rgba(70, 55, 30, 0.6);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.nearby-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.nearby-title {
  font-family: 'Ma Shan Zheng', 'Noto Serif SC', serif;
  font-size: 22px;
  color: #6b4f1f;
}
/* 半径 Segmented Control */
.seg-control {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 10px;
  background: rgba(90, 77, 60, 0.08);
  border: 1px solid rgba(154, 123, 50, 0.2);
  margin-bottom: 14px;
}
.seg-btn {
  flex: 1;
  padding: 6px 0;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: #6b5d48;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.25s ease;
}
.seg-btn.active {
  background: rgba(178, 58, 46, 0.14);
  color: #b23a2e;
  font-weight: 600;
}
.nearby-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-right: 4px;
}
.nearby-list::-webkit-scrollbar {
  width: 4px;
}
.nearby-list::-webkit-scrollbar-thumb {
  background: rgba(90, 77, 60, 0.35);
  border-radius: 2px;
}
.nearby-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(154, 123, 50, 0.18);
  background: rgba(255, 252, 244, 0.4);
  cursor: pointer;
  text-align: left;
  transition: all 0.25s ease;
}
.nearby-item:hover {
  border-color: rgba(178, 58, 46, 0.45);
  background: rgba(178, 58, 46, 0.07);
  transform: translateX(3px);
}
.nearby-badge {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
  border-radius: 9999px;
}
.nearby-name {
  font-family: 'Ma Shan Zheng', 'Noto Serif SC', serif;
  font-size: 17px;
  color: #2b2118;
  line-height: 1.2;
}
.nearby-dist {
  font-size: 11px;
  color: #8a7a62;
  margin-top: 2px;
}
.nearby-walk {
  color: #3f7d6e;
}
.nearby-empty {
  margin-top: 30px;
  text-align: center;
  font-size: 13px;
  color: #8a7a62;
  line-height: 1.7;
}

/* ===== 探索路径面包屑（顶部中央）===== */
#breadcrumb {
  position: absolute;
  top: 70px;
  left: 50%;
  z-index: 24;
  transform: translateX(-50%);
  display: none;
  align-items: center;
  gap: 8px;
  max-width: 90vw;
  padding: 8px 14px;
  border-radius: 9999px;
  border: 1px solid rgba(154, 123, 50, 0.32);
  background: rgba(244, 237, 219, 0.92);
  box-shadow: 0 10px 30px -14px rgba(70, 55, 30, 0.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  overflow-x: auto;
  white-space: nowrap;
}
@media (min-width: 768px) {
  #breadcrumb {
    top: 88px;
  }
}
#breadcrumb.show {
  display: flex;
}
.crumb {
  flex-shrink: 0;
  padding: 3px 10px;
  border-radius: 9999px;
  background: transparent;
  border: none;
  color: #5a4d3c;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.crumb:hover {
  color: #2b2118;
  background: rgba(154, 123, 50, 0.14);
}
.crumb.current {
  color: #b23a2e;
  font-weight: 600;
}
.crumb-sep {
  flex-shrink: 0;
  color: rgba(154, 123, 50, 0.6);
  font-size: 11px;
}
.crumb-back {
  flex-shrink: 0;
  margin-left: 6px;
  padding: 3px 10px;
  border-radius: 9999px;
  border: 1px solid rgba(178, 58, 46, 0.4);
  background: rgba(178, 58, 46, 0.1);
  color: #b23a2e;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.crumb-back:hover {
  background: rgba(178, 58, 46, 0.2);
}

/* ===== 信息面板：v2 印章 + 连线信息 + 打卡信息 ===== */
.panel-stamp {
  position: absolute;
  right: 24px;
  bottom: 22px;
  width: 62px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: linear-gradient(145deg, #cf3f39, #a82d28);
  box-shadow: 0 4px 16px rgba(207, 63, 57, 0.45), inset 0 0 0 1.5px rgba(255, 255, 255, 0.3);
  transform: rotate(-6deg);
  opacity: 0.92;
  pointer-events: none;
}
.panel-stamp span {
  font-family: 'Ma Shan Zheng', 'Noto Serif SC', KaiTi, serif;
  font-size: 15px;
  line-height: 1.05;
  color: #fff;
  text-align: center;
  letter-spacing: 1px;
}

.panel-quest-card {
  position: relative;
  margin-top: 20px;
}

.panel-want-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  padding: 10px 11px;
  border-radius: 10px;
  border: 1px solid rgba(154, 123, 50, 0.2);
  background: rgba(255, 252, 244, 0.42);
}
.panel-want-card span {
  display: block;
  color: #8a7a62;
  font-size: 10px;
  line-height: 1.3;
}
.panel-want-card b {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: #3d3122;
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.panel-want-sub {
  margin: 4px 0 0;
  color: #6e6251;
  font-size: 11px;
  line-height: 1.45;
}
.want-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 32px;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid rgba(154, 123, 50, 0.28);
  background: rgba(255, 252, 244, 0.64);
  color: #6b5d48;
  cursor: pointer;
  font-size: 11px;
  font-weight: 760;
  line-height: 1.2;
  white-space: nowrap;
  transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.want-toggle:hover {
  border-color: rgba(178, 58, 46, 0.46);
  color: #b23a2e;
}
.want-toggle.active {
  border-color: rgba(63, 125, 110, 0.38);
  background: rgba(63, 125, 110, 0.1);
  color: #2f665a;
}
.want-icon {
  font-size: 12px;
  line-height: 1;
}

/* ===== 私人记忆锚点 ===== */
.memory-toolbar-btn .memory-tool-ico {
  position: relative;
}
.memory-tool-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: #f0c75e;
  box-shadow: 0 0 0 4px rgba(212, 168, 67, 0.18), 0 0 12px rgba(212, 168, 67, 0.72);
}

#memory-shell {
  position: absolute;
  inset: 0;
  z-index: 64;
  pointer-events: none;
}
.memory-scrim {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(23, 26, 32, 0.18);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
#memory-shell.memory-shell-open {
  pointer-events: auto;
}
#memory-shell.memory-shell-open .memory-scrim {
  opacity: 1;
  pointer-events: auto;
}
/* pinned 模式：移除遮罩让用户看到地图上的金色锚点 */
#memory-shell.memory-no-scrim .memory-scrim {
  opacity: 0 !important;
  pointer-events: none !important;
}
.memory-panel {
  position: absolute;
  top: 16px;
  right: 16px;
  bottom: 16px;
  display: flex;
  width: min(410px, calc(100vw - 32px));
  flex-direction: column;
  max-height: min(calc(100vh - 32px), 820px);
  overflow-y: auto;
  border: 1px solid rgba(23, 26, 32, 0.16);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(247, 244, 236, 0.98), rgba(238, 231, 215, 0.98));
  padding: 20px;
  box-shadow: 0 18px 34px -28px rgba(23, 26, 32, 0.72);
  color: #2b2118;
  font-family: 'Noto Serif SC', 'Songti SC', 'KaiTi', serif;
  opacity: 0;
  transform: translateX(22px);
  transition: opacity 0.22s ease, transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
#memory-shell.memory-shell-open .memory-panel {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}
#memory-shell.memory-mode-auth .memory-panel {
  top: 50%;
  right: 50%;
  bottom: auto;
  max-height: min(680px, calc(100vh - 32px));
  transform: translate(50%, calc(-50% + 18px));
}
#memory-shell.memory-mode-auth.memory-shell-open .memory-panel {
  transform: translate(50%, -50%);
}
.memory-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: 1px solid rgba(154, 123, 50, 0.18);
  border-radius: 8px;
  background: rgba(255, 252, 244, 0.72);
  color: #5a4d3c;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}
.memory-close:hover {
  border-color: rgba(154, 123, 50, 0.36);
  color: #171a20;
}
.memory-panel-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-right: 34px;
}
.memory-panel-head h2 {
  margin: 0;
  color: #171a20;
  font-size: 18px;
  font-weight: 760;
  line-height: 1.2;
}
.memory-panel-dot,
.anchor-memory-mark {
  width: 11px;
  height: 11px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #f0c75e;
  box-shadow: 0 0 0 5px rgba(212, 168, 67, 0.15), 0 0 14px rgba(212, 168, 67, 0.58);
}
.memory-hint,
.memory-count,
.auth-message {
  margin: 12px 0 0;
  color: #5a4d3c;
  font-size: 13px;
  line-height: 1.55;
}
.memory-form,
.auth-form,
.memory-detail {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}
.memory-photo-picker {
  position: relative;
  display: grid;
  min-height: 180px;
  place-items: center;
  overflow: hidden;
  border: 1px dashed rgba(154, 123, 50, 0.42);
  border-radius: 8px;
  background: rgba(255, 252, 244, 0.68);
  color: #6b5d48;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
}
.memory-photo-picker input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}
.memory-photo-picker img {
  width: 100%;
  height: 220px;
  object-fit: cover;
}
.memory-field {
  display: grid;
  gap: 7px;
}
.memory-field > span {
  color: #5a4d3c;
  font-size: 12px;
  font-weight: 700;
}
.memory-field textarea,
.memory-field input,
.auth-phone-row select,
.auth-phone-row input {
  width: 100%;
  border: 1px solid rgba(154, 123, 50, 0.24);
  border-radius: 8px;
  background: rgba(255, 252, 244, 0.78);
  color: #171a20;
  font: inherit;
  font-size: 14px;
  outline: none;
}
.memory-field textarea {
  min-height: 106px;
  resize: vertical;
  padding: 11px 12px;
  line-height: 1.55;
}
.memory-field input,
.auth-phone-row select,
.auth-phone-row input {
  min-height: 42px;
  padding: 0 11px;
}
.memory-field textarea:focus,
.memory-field input:focus,
.auth-phone-row select:focus,
.auth-phone-row input:focus {
  border-color: rgba(62, 106, 225, 0.62);
  box-shadow: 0 0 0 3px rgba(62, 106, 225, 0.12);
}
.memory-meta-line,
.memory-detail-meta {
  display: grid;
  gap: 5px;
  color: #7a6a4a;
  font-size: 11px;
  line-height: 1.45;
}
.memory-primary,
.memory-danger {
  min-height: 42px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}
.memory-primary {
  border: 1px solid rgba(62, 106, 225, 0.28);
  background: #3e6ae1;
  color: #fff;
}
.memory-primary:hover {
  background: #345dc9;
}
.memory-danger {
  border: 1px solid rgba(178, 58, 46, 0.3);
  background: rgba(178, 58, 46, 0.08);
  color: #9c3028;
}
.memory-danger:hover {
  background: rgba(178, 58, 46, 0.13);
}
.memory-danger-confirm {
  background: rgba(178, 58, 46, 0.22) !important;
  color: #fff !important;
  border-color: rgba(178, 58, 46, 0.6) !important;
  animation: memory-confirm-pulse 1s ease-in-out infinite;
}
@keyframes memory-confirm-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}
.memory-list-thumb-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 6px;
  background: rgba(212, 168, 67, 0.15);
  color: #8a7a5c;
  font-size: 18px;
  flex-shrink: 0;
}
.memory-detail-photo {
  width: 100%;
  max-height: 360px;
  border-radius: 8px;
  object-fit: cover;
}
.memory-detail-note {
  margin: 0;
  color: #2b2118;
  font-size: 16px;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.memory-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}
.memory-list-item {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  min-height: 76px;
  border: 1px solid rgba(154, 123, 50, 0.18);
  border-radius: 8px;
  background: rgba(255, 252, 244, 0.58);
  padding: 7px;
  color: inherit;
  cursor: pointer;
  text-align: left;
}
.memory-list-item:hover {
  border-color: rgba(212, 168, 67, 0.5);
}
.memory-list-item img {
  width: 64px;
  height: 62px;
  border-radius: 6px;
  object-fit: cover;
}
.memory-list-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}
.memory-list-copy b {
  overflow: hidden;
  color: #2b2118;
  font-size: 13px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.memory-list-copy small {
  overflow: hidden;
  color: #7a6a4a;
  font-size: 11px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.memory-empty {
  border: 1px solid rgba(154, 123, 50, 0.18);
  border-radius: 8px;
  background: rgba(255, 252, 244, 0.5);
  padding: 18px;
  color: #5a4d3c;
  font-size: 13px;
  line-height: 1.6;
}

/* ===== 我的回忆面板 ===== */
.recollect-summary {
  display: flex;
  gap: 12px;
  margin: 10px 0 16px;
}
.recollect-stat {
  flex: 1;
  text-align: center;
  border: 1px solid rgba(23, 26, 32, 0.10);
  border-radius: 10px;
  background: rgba(255, 252, 244, 0.6);
  padding: 10px 6px;
}
.recollect-stat-num {
  display: block;
  font-family: 'Ma Shan Zheng', 'Noto Serif SC', serif;
  font-size: 24px;
  color: #C44A3C;
  line-height: 1.2;
}
.recollect-stat-label {
  display: block;
  color: #7a6a4a;
  font-size: 11px;
  margin-top: 3px;
}
.recollect-list {
  display: grid;
  gap: 10px;
  flex: 1;
  overflow-y: auto;
}
.recollect-item {
  display: grid;
  grid-template-columns: 60px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: flex-start;
  border: 1px solid rgba(23, 26, 32, 0.10);
  border-radius: 10px;
  background: rgba(255, 252, 244, 0.58);
  padding: 10px;
  cursor: pointer;
  transition: border-color 0.2s ease;
}
.recollect-item:hover {
  border-color: rgba(196, 74, 60, 0.4);
}
.recollect-thumb {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
}
.recollect-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.recollect-thumb-wrap {
  position: relative;
  width: 100%;
  height: 100%;
}
.recollect-video-badge {
  position: absolute;
  bottom: 2px;
  right: 2px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 10px;
  border-radius: 4px;
  padding: 1px 4px;
}
.recollect-body {
  min-width: 0;
}
.recollect-note {
  margin: 0 0 6px;
  color: #2b2118;
  font-size: 13px;
  line-height: 1.45;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.recollect-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  color: #7a6a4a;
  font-size: 10px;
  line-height: 1.4;
}
.recollect-voice-tag {
  color: #C44A3C;
}
.recollect-share-btn {
  align-self: center;
  border: 1px solid rgba(196, 74, 60, 0.35);
  border-radius: 8px;
  background: rgba(196, 74, 60, 0.08);
  color: #C44A3C;
  font-family: inherit;
  font-size: 12px;
  padding: 6px 10px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s ease;
}
.recollect-share-btn:hover {
  background: rgba(196, 74, 60, 0.18);
}
.recollect-actions {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(23, 26, 32, 0.10);
}
.recollect-postcard-btn {
  width: 100%;
  border: 1px solid rgba(154, 123, 50, 0.35);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(247, 244, 236, 0.98), rgba(238, 231, 215, 0.98));
  color: #2b2118;
  font-family: 'Ma Shan Zheng', 'Noto Serif SC', serif;
  font-size: 15px;
  padding: 12px;
  cursor: pointer;
  transition: border-color 0.2s ease;
}
.recollect-postcard-btn:hover {
  border-color: rgba(196, 74, 60, 0.5);
  color: #C44A3C;
}

/* ===== 分享卡片弹窗 ===== */
.recollect-share-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(23, 26, 32, 0.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.recollect-share-card,
.recollect-postcard {
  position: relative;
  width: min(340px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 16px;
  background: linear-gradient(180deg, #faf6ee, #efe8d6);
  box-shadow: 0 24px 60px -20px rgba(23, 26, 32, 0.5);
  color: #2b2118;
  font-family: 'Noto Serif SC', 'Songti SC', 'KaiTi', serif;
}
.recollect-share-close {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 5;
  border: none;
  background: rgba(23, 26, 32, 0.15);
  color: #2b2118;
  font-size: 20px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.recollect-share-inner {
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
}
.recollect-share-photo {
  width: 100%;
  height: 220px;
  background-size: cover;
  background-position: center;
  background-color: rgba(196, 74, 60, 0.1);
}
.recollect-share-photo-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Ma Shan Zheng', serif;
  font-size: 48px;
  color: rgba(196, 74, 60, 0.35);
}
.recollect-share-content {
  padding: 18px 20px 16px;
}
.recollect-share-stamp {
  display: inline-block;
  border: 1.5px solid #C44A3C;
  border-radius: 4px;
  color: #C44A3C;
  font-size: 11px;
  padding: 2px 8px;
  margin-bottom: 10px;
  letter-spacing: 0.05em;
}
.recollect-share-note {
  margin: 0 0 14px;
  color: #2b2118;
  font-size: 15px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}
.recollect-share-ai {
  border-left: 3px solid rgba(196, 74, 60, 0.35);
  padding: 8px 0 8px 12px;
  margin-bottom: 14px;
}
.recollect-share-ai-label {
  display: block;
  color: #C44A3C;
  font-size: 11px;
  margin-bottom: 4px;
}
.recollect-share-ai-text {
  margin: 0;
  color: #5b625f;
  font-size: 13px;
  line-height: 1.55;
  font-style: italic;
}
.recollect-share-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  color: #7a6a4a;
  font-size: 10px;
  border-top: 1px solid rgba(23, 26, 32, 0.08);
  padding-top: 10px;
}
.recollect-share-actions {
  display: flex;
  gap: 10px;
  padding: 14px 20px;
}
.recollect-share-download,
.recollect-share-native {
  flex: 1;
  border: 1px solid rgba(23, 26, 32, 0.15);
  border-radius: 10px;
  background: rgba(255, 252, 244, 0.6);
  color: #2b2118;
  font-family: inherit;
  font-size: 13px;
  padding: 10px;
  cursor: pointer;
  transition: background 0.2s ease;
}
.recollect-share-download:hover,
.recollect-share-native:hover {
  background: rgba(196, 74, 60, 0.1);
  border-color: rgba(196, 74, 60, 0.35);
  color: #C44A3C;
}

/* ===== 明信片 ===== */
.postcard-inner {
  padding: 20px;
}
.postcard-front {
  border: 1px solid rgba(23, 26, 32, 0.12);
  border-radius: 12px;
  background: rgba(255, 252, 244, 0.7);
  padding: 18px;
}
.postcard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.postcard-brand {
  font-family: 'Ma Shan Zheng', 'Noto Serif SC', serif;
  font-size: 18px;
  color: #2b2118;
}
.postcard-stamp {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 2px solid #C44A3C;
  border-radius: 4px;
  color: #C44A3C;
  font-size: 14px;
  font-family: 'Ma Shan Zheng', serif;
  transform: rotate(-8deg);
}
.postcard-collage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-bottom: 14px;
}
.postcard-cell {
  aspect-ratio: 4/3;
  border-radius: 6px;
  background-size: cover;
  background-position: center;
  background-color: rgba(196, 74, 60, 0.08);
}
.postcard-cell-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Ma Shan Zheng', serif;
  font-size: 24px;
  color: rgba(196, 74, 60, 0.3);
}
.postcard-summary {
  text-align: center;
  padding: 12px 0;
}
.postcard-summary-text {
  margin: 0 0 8px;
  color: #2b2118;
  font-size: 14px;
  line-height: 1.5;
}
.postcard-ai-quote {
  margin: 0;
  color: #C44A3C;
  font-size: 12px;
  line-height: 1.55;
  font-style: italic;
}
.postcard-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px dashed rgba(23, 26, 32, 0.15);
  padding-top: 10px;
  margin-top: 8px;
  color: #7a6a4a;
  font-size: 10px;
}
.auth-phone-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 8px;
}
.auth-benefits {
  display: grid;
  gap: 8px;
  margin-top: 18px;
  color: #4b4134;
  font-size: 13px;
  line-height: 1.45;
}
.auth-benefits span,
.auth-benefits p {
  margin: 0;
  border: 1px solid rgba(154, 123, 50, 0.16);
  border-radius: 8px;
  background: rgba(255, 252, 244, 0.5);
  padding: 9px 10px;
}
.anchor-memory-section {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}
.anchor-memory-cta {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(212, 168, 67, 0.36);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 252, 244, 0.76), rgba(244, 237, 219, 0.72)),
    radial-gradient(circle at 8% 0%, rgba(212, 168, 67, 0.2), transparent 42%);
  padding: 10px 12px;
  color: #5f481b;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  text-align: left;
}
.anchor-memory-cta:hover {
  border-color: rgba(212, 168, 67, 0.58);
  transform: translateY(-1px);
}
.anchor-memory-arrow {
  color: #9a7b32;
  font-size: 15px;
}
.anchor-memory-here {
  display: grid;
  gap: 8px;
}
.anchor-memory-here h3 {
  margin: 0;
  color: #5a4d3c;
  font-size: 12px;
  font-weight: 800;
}
.anchor-memory-here button {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(154, 123, 50, 0.16);
  border-radius: 8px;
  background: rgba(255, 252, 244, 0.42);
  padding: 6px;
  color: #3d3122;
  cursor: pointer;
  text-align: left;
}
.anchor-memory-here img {
  width: 44px;
  height: 42px;
  border-radius: 6px;
  object-fit: cover;
}
.anchor-memory-here span {
  overflow: hidden;
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.memory-pin-ripple {
  position: absolute;
  z-index: 22;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(240, 199, 94, 0.82);
  border-radius: 999px;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.5);
  animation: memory-pin-ripple 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes memory-pin-ripple {
  to {
    opacity: 0;
    transform: translate(-50%, -50%) scale(4.4);
  }
}

/* ===== Pinned 成功视图 ===== */
.memory-pinned-view {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 8px 4px;
  text-align: center;
}
.memory-pinned-thumb {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(154, 123, 50, 0.2);
}
.memory-pinned-note {
  font-size: 14px;
  color: #3a3026;
  line-height: 1.6;
  margin: 0;
  padding: 0 8px;
}
.memory-pinned-voice {
  width: 100%;
}
.memory-pinned-voice audio {
  width: 100%;
}
.memory-pinned-coord {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #8a7a5c;
}
.memory-pinned-mark {
  font-size: 14px;
}
.memory-pinned-hint {
  font-size: 13px;
  color: #6b5d44;
  line-height: 1.5;
  margin: 0;
  padding: 8px 12px;
  background: rgba(212, 168, 67, 0.1);
  border-radius: 8px;
}
.memory-pinned-actions {
  display: flex;
  gap: 12px;
  width: 100%;
  margin-top: 4px;
}
.memory-pinned-another {
  flex: 1;
  padding: 10px 16px;
  border: 1px solid #d4a843;
  border-radius: 8px;
  background: transparent;
  color: #8a6520;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s ease;
}
.memory-pinned-another:hover {
  background: rgba(212, 168, 67, 0.12);
}
.memory-pinned-exit {
  flex: 1;
  padding: 10px 16px;
  border: none;
  border-radius: 8px;
  background: #d4a843;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s ease;
}
.memory-pinned-exit:hover {
  background: #c49830;
}

@media (max-width: 640px) {
  .memory-panel {
    top: auto;
    right: 10px;
    bottom: 10px;
    left: 10px;
    width: auto;
    max-height: min(82vh, 680px);
    padding: 18px;
    transform: translateY(24px);
  }
  #memory-shell.memory-shell-open .memory-panel {
    transform: translateY(0);
  }
  #memory-shell.memory-mode-auth .memory-panel,
  #memory-shell.memory-mode-auth.memory-shell-open .memory-panel {
    right: 10px;
    bottom: 10px;
    transform: translateY(0);
  }
  .memory-photo-picker {
    min-height: 156px;
  }
  .memory-photo-picker img {
    height: 180px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .memory-scrim,
  .memory-panel,
  .anchor-memory-cta,
  .memory-pin-ripple {
    animation: none !important;
    transition: none !important;
  }
  .memory-pin-ripple {
    opacity: 0;
  }
}

/* ============================================================= */
/* ===== Phase 2「留下记忆」发帖式创建界面 ====================== */
/* ============================================================= */

.memory-create-list-entry {
  text-align: right;
  margin-bottom: 4px;
}

.memory-create-list-entry button {
  background: none;
  border: none;
  color: #8a7a5c;
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 4px 0;
}

.memory-create-list-entry button:hover {
  color: #d4a843;
}

.memory-create-quota {
  text-align: center;
  padding: 8px;
  color: #8a7a5c;
  font-size: 12px;
  line-height: 1.4;
}

.memory-create-media {
  position: relative;
  width: 100%;
  min-height: 160px;
  border-radius: 12px;
  background: #ede8d8;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
}

.memory-create-media-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #b5a884;
  font-size: 13px;
}

.memory-create-media-empty .ink-cam-icon {
  width: 48px;
  height: 48px;
  opacity: 0.4;
}

.memory-create-media-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.memory-create-media-actions {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 10px;
}

.memory-create-media-btn {
  flex: 1;
  padding: 10px 8px;
  border: 1px solid #d4c9a8;
  border-radius: 8px;
  background: #f7f4ec;
  font-size: 13px;
  color: #5a4e35;
  cursor: pointer;
  transition: all 0.2s ease;
}

.memory-create-media-btn:hover {
  background: #ede8d8;
}

.memory-create-media-btn.active {
  border-color: #d4a843;
  background: #fdf6e3;
}

.memory-create-voice {
  margin-top: 12px;
}

.memory-create-voice-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid #d4c9a8;
  border-radius: 8px;
  background: #f7f4ec;
  min-height: 44px;
}

.memory-create-voice-btn {
  padding: 8px 16px;
  border: none;
  border-radius: 20px;
  background: #d4a843;
  color: #fff;
  font-size: 13px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: background 0.2s ease;
  min-height: 36px;
}

.memory-create-voice-btn.recording {
  background: #c0392b;
  animation: voice-pulse 1.4s infinite;
}

.memory-create-voice-timer {
  font-size: 13px;
  color: #8a7a5c;
  min-width: 40px;
}

.memory-create-voice-play {
  padding: 6px 12px;
  border: 1px solid #d4c9a8;
  border-radius: 16px;
  background: #fff;
  font-size: 12px;
  cursor: pointer;
}

.memory-create-voice-delete {
  padding: 6px 12px;
  border: 1px solid #e0c0c0;
  border-radius: 16px;
  background: #fdf0f0;
  color: #c0392b;
  font-size: 12px;
  cursor: pointer;
}

.memory-create-publish {
  width: 100%;
  margin-top: 16px;
  padding: 14px;
  border: none;
  border-radius: 24px;
  font-size: 16px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(180deg, #5a4e35, #3d3422);
  transition: opacity 0.2s ease;
}

.memory-create-publish:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.memory-create-publish.ink-brush {
  background: transparent;
}

@keyframes voice-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(192, 57, 43, 0.4);
  }
  100% {
    box-shadow: 0 0 0 12px rgba(192, 57, 43, 0);
  }
}

/* 全球连线信息条目 */
.link-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(154, 123, 50, 0.2);
  background: rgba(255, 252, 244, 0.45);
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.25s ease;
}
.link-row:hover {
  border-color: rgba(178, 58, 46, 0.45);
  background: rgba(178, 58, 46, 0.06);
}
.link-dot {
  width: 9px;
  height: 9px;
  flex-shrink: 0;
  margin-top: 5px;
  border-radius: 9999px;
}
.link-target {
  font-size: 13px;
  color: #2b2118;
  font-weight: 500;
}
.link-event {
  font-size: 11px;
  color: #8a7a62;
  margin-top: 2px;
  line-height: 1.5;
}
.link-year {
  margin-left: auto;
  font-size: 11px;
  color: #9a7b32;
  flex-shrink: 0;
}
.panel-visit-card {
  display: grid;
  gap: 8px;
  margin-top: 20px;
  padding: 13px 16px;
  border: 1px solid rgba(154, 123, 50, 0.2);
  border-radius: 18px;
  background: rgba(255, 252, 244, 0.4);
}
.panel-meta {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  column-gap: 7px;
  align-items: baseline;
  font-size: 13px;
  color: #6b5d48;
  line-height: 1.55;
}
.panel-meta b {
  color: #3d3122;
  font-weight: 600;
  white-space: nowrap;
}
@media (max-width: 520px) {
  .panel-visit-card { padding: 12px 14px; }
  .panel-meta { font-size: 12px; }
}

/* ===== 信息面板配图（人物/地点）===== */
.panel-image {
  position: relative;
  flex: 0 0 auto;
  margin-top: 24px;
  width: 100%;
  height: clamp(136px, 22vw, 172px);
  min-height: 136px;
  aspect-ratio: 16 / 5;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  contain: layout paint;
  isolation: isolate;
}
.panel-image img {
  width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.panel-image:hover img {
  transform: scale(1.05);
}
/* 底部渐变遮罩 + 说明文字 */
.panel-image-cap {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 24px 96px 8px 12px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
  color: #fff;
  font-size: 12px;
  line-height: 1.4;
  pointer-events: none;
}
/* 右下角版权文字 */
.panel-image-license {
  position: absolute;
  right: 6px;
  bottom: 4px;
  font-size: 10px;
  color: #fff;
  opacity: 0.5;
  pointer-events: none;
}

@media (max-width: 640px) {
  .panel-image {
    height: 140px;
    min-height: 140px;
  }
}

/* ===== 定位降级弹窗（样式与信息面板一致）===== */
#geo-modal {
  position: absolute;
  inset: 0;
  z-index: 65;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(70, 55, 30, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
#geo-modal.open {
  opacity: 1;
  pointer-events: auto;
}
.geo-card {
  position: relative;
  width: 100%;
  max-width: 380px;
  border-radius: 22px;
  border: 1px solid rgba(154, 123, 50, 0.32);
  background: linear-gradient(180deg, rgba(244, 237, 219, 0.98), rgba(233, 222, 196, 0.98));
  padding: 32px 28px 26px;
  text-align: center;
  box-shadow: 0 30px 80px -24px rgba(70, 55, 30, 0.7);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  transform: scale(0.94);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
#geo-modal.open .geo-card {
  transform: scale(1);
}
.geo-icon {
  font-size: 34px;
  margin-bottom: 14px;
}
.geo-title {
  font-family: 'Ma Shan Zheng', 'Noto Serif SC', serif;
  font-size: 21px;
  color: #6b4f1f;
  margin-bottom: 10px;
  line-height: 1.4;
}
.geo-body {
  font-size: 13px;
  color: #5a4d3c;
  line-height: 1.7;
  margin-bottom: 22px;
}
.geo-actions {
  display: flex;
  gap: 10px;
}
.geo-btn {
  flex: 1;
  padding: 11px 0;
  border-radius: 10px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.25s ease;
}
.geo-btn-ghost {
  border: 1px solid rgba(90, 77, 60, 0.3);
  background: transparent;
  color: #6b5d48;
}
.geo-btn-ghost:hover {
  border-color: rgba(90, 77, 60, 0.5);
  color: #2b2118;
}
.geo-btn-primary {
  border: 1px solid rgba(178, 58, 46, 0.5);
  background: rgba(178, 58, 46, 0.14);
  color: #b23a2e;
  font-weight: 600;
}
.geo-btn-primary:hover {
  background: rgba(178, 58, 46, 0.26);
}

/* GPS 按钮禁用态（不支持 Geolocation）*/
.tool-btn:disabled,
.tool-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: auto;
}

/* 国外目标节点标记（半透明金色小圆点）*/
.foreign-marker {
  width: 16px;
  height: 16px;
  border-radius: 9999px;
  background: rgba(201, 168, 76, 0.55);
  border: 1.5px solid rgba(232, 197, 71, 0.9);
  box-shadow: 0 0 10px 2px rgba(201, 168, 76, 0.5);
  cursor: pointer;
  transition: transform 0.2s ease;
}
.foreign-marker:hover {
  transform: scale(1.3);
}

/* ============================================================= */
/* ===== v3 主题模式新增样式 ===================================== */
/* ============================================================= */

/* ===== 主题染色 Overlay（叠在地图之上，UI 之下）===== */
/* 由 applyTheme() 更新 background-color；CSS transition 处理平滑过渡 */
#theme-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;          /* 高于地图(auto)，低于 ornament-overlay(5) */
  overflow: hidden;
  pointer-events: none;
  background-color: rgba(0, 0, 0, 0);
  transition: background-color 0.55s ease;
}
@media (prefers-reduced-motion: reduce) {
  #theme-overlay {
    transition: none;
  }
}

/* ===== 页头计数动态强调色 ===== */
#visible-count {
  color: var(--theme-accent, #b5762a);
  transition: color 0.4s ease;
}
#count-total {
  transition: opacity 0.4s ease;
}
#count-label {
  transition: color 0.4s ease;
}

/* ===== 图层面板分隔线（总览 vs 主题列表之间）===== */
.layer-divider {
  height: 1px;
  margin: 5px 2px;
  background: rgba(154, 123, 50, 0.18);
}

/* ===== 图层面板：总览按钮特殊样式 ===== */
.layer-item[data-theme="all"].active {
  background: rgba(154, 123, 50, 0.16);
  border-left-color: var(--theme-accent, #9a7b32);
}
.layer-item[data-theme="all"] .layer-dot {
  /* 总览使用罗盘图标感 */
  border-radius: 2px;
  transform: rotate(45deg);
}

/* ===== 主题模式沉浸感：图层面板阴影跟随主题色 ===== */
.layer-control {
  transition: box-shadow 0.9s ease;
}

/* ============================================================= */
/* ===== 玩法一/二 新增组件样式（罗盘探索 · 剧情副本）========= */
/* ============================================================= */

/* —— 工具按钮：强调态 + 进度角标 + loading —— */
.tool-btn-accent {
  color: #fff6e9;
  font-weight: 500;
}
.tool-btn-accent .tool-ico {
  font-size: 18px;
}
.tool-btn.locating {
  pointer-events: none;
  opacity: 0.85;
}
.tool-btn.locating .tool-ico {
  animation: spin 1.1s linear infinite;
}
.tool-btn.logged-in .tool-ico svg {
  stroke: #C9A84C;
}
.tool-badge {
  justify-self: end;
  margin-left: 0;
  min-width: 37px;
  padding: 3px 7px 4px;
  border-radius: 9999px;
  background: radial-gradient(120% 120% at 40% 30%, #c4483a 0%, #a5301f 70%, #8f2114 100%);
  border: none;
  color: #fff4ea;
  font-variant-numeric: tabular-nums;
  position: relative;
  z-index: 1;
  text-align: center;
  text-shadow: 0 1px 1px rgba(77, 16, 9, 0.42);
  box-shadow: 0 2px 6px -3px rgba(120, 24, 12, 0.62);
  font-family: 'Inter', 'Noto Sans SC', sans-serif;
  font-size: 9px;
  font-weight: 760;
  letter-spacing: 0;
}
.tool-badge:empty {
  display: none;
}

/* —— 我的位置：罗盘脉冲 marker —— */
.compass-marker {
  position: relative;
  width: 30px;
  height: 30px;
}
.compass-marker .cm-pulse {
  position: absolute;
  inset: 0;
  border-radius: 9999px;
  background: rgba(178, 58, 46, 0.32);
  animation: gpsPulse 2s ease-out infinite;
}
.compass-marker .cm-pulse2 {
  animation-delay: 1s;
}
.compass-marker.simulated .cm-pulse {
  background: rgba(154, 123, 50, 0.32);
}
.compass-marker .cm-core {
  position: absolute;
  inset: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: radial-gradient(circle at 50% 35%, #d6453f, #a82d28);
  border: 1.5px solid rgba(255, 252, 244, 0.9);
  box-shadow: 0 2px 10px rgba(178, 58, 46, 0.7);
}
.compass-marker.simulated .cm-core {
  background: radial-gradient(circle at 50% 35%, #c9a24b, #9a7b32);
  box-shadow: 0 2px 10px rgba(154, 123, 50, 0.7);
}
.compass-marker .cm-needle {
  width: 0;
  height: 0;
  border-left: 3px solid transparent;
  border-right: 3px solid transparent;
  border-bottom: 9px solid #fff8e6;
  transform: translateY(-1px);
  animation: needleSwing 3s ease-in-out infinite;
}
@keyframes needleSwing {
  0%, 100% { transform: translateY(-1px) rotate(-22deg); }
  50% { transform: translateY(-1px) rotate(22deg); }
}
@media (max-width: 820px) {
  .gps-marker,
  .compass-marker {
    transform: scale(1.12);
    transform-origin: center;
  }
}

/* —— 已通关锚点：朱砂印章 marker —— */
.stamp-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: linear-gradient(145deg, #cf3f39, #a82d28);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  border: 1.5px solid rgba(255, 252, 244, 0.85);
  box-shadow: 0 2px 8px rgba(178, 58, 46, 0.6);
  transform: rotate(-8deg);
  pointer-events: none;
}

/* —— 罗盘探索面板（左侧抽屉）—— */
#compass-panel {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 29;
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  max-width: 500px;
  padding: 16px;
  transform: translateX(-110%);
  opacity: 0;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.4s ease;
  pointer-events: none;
}
@media (min-width: 768px) {
  #compass-panel { padding: 20px; }
}
#compass-panel.open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}
.compass-card {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: 12px;
  border: 1px solid rgba(23, 26, 32, 0.16);
  background: linear-gradient(180deg, rgba(247, 244, 236, 0.98), rgba(238, 231, 215, 0.98));
  color: #2b2118;
  font-family: 'Noto Serif SC', 'Songti SC', 'KaiTi', serif;
  padding: 20px;
  box-shadow: 0 18px 34px -28px rgba(23, 26, 32, 0.72);
}
.compass-card::before,
.compass-card::after {
  display: none;
}
.compass-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin: 0 0 14px;
  padding: 6px 4px 14px;
  border-bottom: 1px solid rgba(112, 83, 42, 0.18);
  gap: 14px;
}
.compass-head::after {
  position: absolute;
  left: 4px;
  right: 58px;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, rgba(178, 58, 46, 0.52), rgba(154, 123, 50, 0.22), transparent);
  content: '';
}
.compass-title {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 2px;
}
.compass-title-main {
  color: #171a20;
  font-size: 22px;
  font-weight: 760;
  line-height: 1.12;
}
.compass-title-sub {
  color: #2f6f62;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.compass-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border-radius: 10px;
  background: rgba(90, 77, 60, 0.08);
  border: 1px solid rgba(154, 123, 50, 0.2);
  margin-bottom: 10px;
}
.compass-tab {
  flex: 1;
  padding: 8px 6px;
  border: none;
  border-radius: 7px;
  background: transparent;
  color: #6b5d48;
  font-size: 12px;
  line-height: 1.25;
  cursor: pointer;
  transition: all 0.25s ease;
}
.compass-tab.active {
  background: var(--theme-accent, #b23a2e);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 2px 8px -2px var(--theme-accent, rgba(178, 58, 46, 0.5));
}
.compass-content {
  position: relative;
  z-index: 1;
  flex: 1;
  overflow-y: auto;
  margin: 0 -2px 0 0;
  padding: 2px 4px 0 2px;
}
.compass-content::-webkit-scrollbar { width: 4px; }
.compass-content::-webkit-scrollbar-thumb {
  background: rgba(90, 77, 60, 0.35);
  border-radius: 2px;
}
.compass-hint {
  margin-top: 28px;
  text-align: center;
  font-size: 13px;
  color: #8a7a62;
  line-height: 1.7;
}

/* —— 路线规划中心 —— */
#route-planner-panel {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  max-width: 520px;
  padding: 16px;
  transform: translateX(-110%);
  opacity: 0;
  transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.26s ease;
  pointer-events: none;
}
@media (min-width: 768px) {
  #route-planner-panel { padding: 20px; }
}
#route-planner-panel.open {
  transform: translateX(0);
  opacity: 1;
  pointer-events: auto;
}
.route-planner-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: 12px;
  border: 1px solid rgba(23, 26, 32, 0.16);
  background: linear-gradient(180deg, rgba(247, 244, 236, 0.98), rgba(238, 231, 215, 0.98));
  color: #2b2118;
  font-family: 'Noto Serif SC', 'Songti SC', 'KaiTi', serif;
  padding: 20px;
  box-shadow: 0 18px 34px -28px rgba(23, 26, 32, 0.72);
}
.route-planner-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}
.route-planner-title {
  display: block;
  color: #171a20;
  font-family: 'Ma Shan Zheng', 'Noto Serif SC', 'KaiTi', serif;
  font-size: 22px;
  font-weight: 500;
  line-height: 1.12;
}
.route-planner-head p {
  max-width: 34em;
  margin-top: 5px;
  color: #5b625f;
  font-size: 12px;
  line-height: 1.55;
  text-wrap: pretty;
}
.route-planner-content {
  flex: 1;
  overflow-y: auto;
  padding-right: 4px;
}
.route-planner-content::-webkit-scrollbar { width: 4px; }
.route-planner-content::-webkit-scrollbar-thumb {
  background: rgba(90, 77, 60, 0.35);
  border-radius: 2px;
}
.route-planner-tabs {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  gap: 4px;
  margin-bottom: 10px;
  padding: 4px;
  border-radius: 10px;
  border: 1px solid rgba(154, 123, 50, 0.2);
  background: rgba(240, 232, 210, 0.94);
}
.route-planner-tab {
  flex: 1;
  min-height: 34px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #6b5d48;
  cursor: pointer;
  font-family: 'Ma Shan Zheng', 'Noto Serif SC', 'KaiTi', serif;
  font-size: 15px;
  font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease;
}
.route-planner-tab.active {
  background: #b23a2e;
  color: #fff8e6;
}
.route-plan-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
  padding: 7px 8px;
  border-radius: 8px;
  border: 1px solid rgba(154, 123, 50, 0.18);
  background: rgba(255, 252, 244, 0.36);
}
.route-plan-bar > span {
  color: #6b5d48;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.route-plan-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}
.route-plan-actions .rt-plan-btn {
  width: auto;
  min-width: 124px;
  margin-top: 0;
  padding: 7px 11px;
  border-radius: 7px;
  font-family: 'Ma Shan Zheng', 'Noto Serif SC', 'KaiTi', serif;
  font-size: 14px;
  letter-spacing: 0;
  box-shadow: none;
}
.route-plan-actions .rt-select-action {
  min-height: 31px;
  padding: 5px 9px;
  border-radius: 7px;
  background: rgba(255, 252, 244, 0.62);
  color: #6b5d48;
  font-family: 'Ma Shan Zheng', 'Noto Serif SC', 'KaiTi', serif;
  font-size: 13px;
}
.rt-select-action:disabled {
  cursor: not-allowed;
  opacity: 0.48;
}
.route-anchor-list-full {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 18px;
}
.route-anchor-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 32px;
  align-items: center;
  gap: 10px;
  border-radius: 10px;
  border: 1px solid rgba(154, 123, 50, 0.2);
  background: rgba(255, 252, 244, 0.48);
  padding: 9px;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.route-anchor-row:hover {
  border-color: color-mix(in srgb, var(--row-accent, #b23a2e) 54%, rgba(23, 26, 32, 0.16));
}
.route-anchor-row.selected {
  border-color: color-mix(in srgb, var(--row-accent, #b23a2e) 72%, rgba(23, 26, 32, 0.16));
  background: color-mix(in srgb, var(--row-accent, #b23a2e) 10%, rgba(255, 252, 244, 0.78));
}
.route-anchor-info {
  display: flex;
  width: 100%;
  align-items: center;
  min-width: 0;
  min-height: 42px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}
.route-anchor-info:hover .route-anchor-top b {
  color: #8a352c;
}
.route-anchor-select {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  align-self: center;
  border-radius: 7px;
  border: 1px solid rgba(154, 123, 50, 0.54);
  background: rgba(255, 255, 255, 0.42);
  color: #fff8e6;
  cursor: pointer;
  font-size: 13px;
  font-weight: 780;
}
.route-anchor-row.selected .route-anchor-select {
  border-color: #b23a2e;
  background: #b23a2e;
}
.route-anchor-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
}
.route-anchor-top {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 7px;
}
.route-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 999px;
  background: var(--row-accent, #9a7b32);
  box-shadow: 0 0 7px color-mix(in srgb, var(--row-accent, #9a7b32) 58%, transparent);
}
.route-anchor-top b {
  min-width: 0;
  overflow: hidden;
  color: #2b2118;
  font-family: 'Ma Shan Zheng', 'Noto Serif SC', serif;
  font-size: 16px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.route-anchor-copy > span:last-child {
  overflow: hidden;
  color: #6d746f;
  font-size: 11px;
  line-height: 1.42;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.route-empty-cta {
  min-height: 30px;
  border-radius: 7px;
  border: 1px solid rgba(154, 123, 50, 0.25);
  background: rgba(255, 252, 244, 0.58);
  color: #5a4d3c;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  padding: 6px 9px;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.route-empty-cta:hover {
  border-color: rgba(178, 58, 46, 0.45);
  color: #b23a2e;
}
.route-empty-state {
  display: grid;
  gap: 8px;
  padding: 24px 14px;
  border-radius: 10px;
  border: 1px dashed rgba(154, 123, 50, 0.32);
  background: rgba(255, 252, 244, 0.38);
  text-align: center;
}
.route-empty-state b {
  color: #171a20;
  font-family: 'Ma Shan Zheng', 'Noto Serif SC', 'KaiTi', serif;
  font-size: 18px;
  font-weight: 500;
}
.route-empty-state p {
  margin: 0 auto;
  max-width: 30em;
  color: #5b625f;
  font-size: 12px;
  line-height: 1.7;
}
.route-empty-cta {
  justify-self: center;
  margin-top: 4px;
  border-color: rgba(178, 58, 46, 0.42);
  color: #8a352c;
  font-family: 'Ma Shan Zheng', 'Noto Serif SC', 'KaiTi', serif;
  font-size: 14px;
}
.route-recommend-panel {
  display: grid;
  gap: 10px;
  padding-bottom: 18px;
}
.route-recommend-intro {
  padding: 4px 2px 2px;
}
.route-recommend-intro b {
  display: block;
  color: #2b2118;
  font-family: 'Ma Shan Zheng', 'Noto Serif SC', 'KaiTi', serif;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.2;
}
.route-recommend-intro p {
  margin-top: 5px;
  color: #5f574b;
  font-size: 12px;
  line-height: 1.65;
  text-wrap: pretty;
}
.route-recommend-list {
  display: grid;
  gap: 8px;
}
.route-recommend-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
  border-radius: 10px;
  border: 1px solid rgba(116, 99, 72, 0.24);
  background:
    linear-gradient(90deg, rgba(178, 58, 46, 0.07), transparent 42%),
    rgba(255, 252, 244, 0.46);
  padding: 11px;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.route-recommend-card:hover {
  border-color: rgba(178, 58, 46, 0.36);
  background:
    linear-gradient(90deg, rgba(178, 58, 46, 0.1), transparent 44%),
    rgba(255, 252, 244, 0.58);
}
.route-recommend-copy {
  display: grid;
  min-width: 0;
  gap: 4px;
}
.route-recommend-copy span {
  color: #8a7a62;
  font-size: 11px;
  line-height: 1.2;
}
.route-recommend-copy b {
  color: #2b2118;
  font-family: 'Ma Shan Zheng', 'Noto Serif SC', 'KaiTi', serif;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.25;
}
.route-recommend-copy p {
  margin: 0;
  color: #5f574b;
  font-size: 12px;
  line-height: 1.55;
}
.route-recommend-copy em {
  overflow: hidden;
  color: #746348;
  font-size: 11px;
  font-style: normal;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.route-recommend-nav {
  min-width: 72px;
  min-height: 30px;
  border: 1px solid rgba(90, 77, 60, 0.34);
  border-radius: 999px;
  background: rgba(255, 252, 244, 0.5);
  color: #6b4f1f;
  cursor: pointer;
  font-family: 'Ma Shan Zheng', 'Noto Serif SC', 'KaiTi', serif;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.route-recommend-nav:hover {
  border-color: rgba(178, 58, 46, 0.48);
  background: rgba(255, 248, 230, 0.72);
  color: #9c3328;
}
.route-result-card {
  margin-bottom: 12px;
  border-radius: 10px;
  border: 1px solid rgba(178, 58, 46, 0.25);
  background: rgba(255, 252, 244, 0.62);
  padding: 13px;
  animation: fadeInUp 0.36s ease-out both;
}
.route-result-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(23, 26, 32, 0.1);
}
.route-result-head h3 {
  color: #6b4f1f;
  font-size: 16px;
  font-weight: 800;
}
.route-result-head span {
  color: #8a7a62;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.route-result-list {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}
.route-result-stop {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  width: 100%;
  gap: 9px;
  padding: 9px;
  border: 0;
  border-radius: 8px;
  background: rgba(154, 123, 50, 0.08);
  cursor: pointer;
  text-align: left;
  transition: background 0.2s ease;
}
.route-result-stop:hover {
  background: rgba(154, 123, 50, 0.13);
}
.route-result-index {
  color: #b23a2e;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.route-result-stop b {
  display: block;
  color: #171a20;
  font-size: 13px;
}
.route-result-stop span {
  color: #6d746f;
  font-size: 11px;
}
.route-result-go {
  color: #b23a2e;
  font-size: 16px;
}
.route-result-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  margin-top: 10px;
}

.clue-brief {
  position: relative;
  margin: 0 0 12px;
  padding: 2px 4px 13px;
  border-bottom: 1px solid rgba(112, 83, 42, 0.16);
}
.clue-brief::after {
  position: absolute;
  left: 4px;
  bottom: -1px;
  width: 108px;
  height: 1px;
  background: linear-gradient(90deg, rgba(63, 125, 110, 0.46), rgba(154, 123, 50, 0.18), transparent);
  content: '';
}
.clue-brief p {
  margin: 0;
  color: #393c41;
  font-size: 12px;
  line-height: 1.58;
  text-wrap: pretty;
}
.clue-brief span {
  display: block;
  margin-top: 5px;
  color: #6d746f;
  font-size: 11px;
  line-height: 1.35;
}
.nearby-clue-list {
  display: flex;
  flex-direction: column;
  gap: 13px;
}
.clue-card {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1fr;
  border-radius: 7px;
  border: 1px solid color-mix(in srgb, var(--clue-task-accent, #3f7d6e) 36%, rgba(112, 83, 42, 0.32));
  background:
    linear-gradient(135deg, rgba(255, 252, 244, 0.95), rgba(232, 222, 196, 0.9)),
    rgba(255, 252, 244, 0.82);
  box-shadow:
    0 2px 6px rgba(83, 61, 32, 0.12),
    inset 0 1px 0 rgba(255, 252, 244, 0.78),
    inset 0 0 0 1px rgba(255, 252, 244, 0.32);
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}
.clue-card::before {
  position: absolute;
  inset: 7px;
  z-index: 1;
  border-radius: 4px;
  border: 1px solid rgba(112, 83, 42, 0.12);
  background:
    radial-gradient(circle at 0 0, color-mix(in srgb, var(--clue-task-accent, #3f7d6e) 38%, transparent) 0 2px, transparent 3px),
    radial-gradient(circle at 100% 0, rgba(154, 123, 50, 0.2) 0 2px, transparent 3px),
    radial-gradient(circle at 0 100%, rgba(154, 123, 50, 0.16) 0 2px, transparent 3px),
    radial-gradient(circle at 100% 100%, color-mix(in srgb, var(--clue-task-accent, #3f7d6e) 26%, transparent) 0 2px, transparent 3px),
    linear-gradient(90deg, color-mix(in srgb, var(--clue-task-accent, #3f7d6e) 12%, transparent), transparent 36%),
    linear-gradient(180deg, rgba(255, 252, 244, 0.28), rgba(23, 26, 32, 0.035));
  content: '';
  opacity: 0.82;
  pointer-events: none;
}
.clue-card::after {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(90deg, rgba(255, 252, 244, 0.82) 0%, rgba(255, 252, 244, 0.5) 46%, rgba(255, 252, 244, 0.12) 100%),
    radial-gradient(circle at 24% 52%, rgba(255, 252, 244, 0.42), transparent 52%),
    linear-gradient(180deg, rgba(255, 252, 244, 0.14), rgba(23, 26, 32, 0.045)),
    var(--clue-cover-image),
    var(--clue-bg-image, url('../public/assets/clues/fallback-cover.webp')),
    url('../public/assets/clues/fallback-cover.webp');
  background-position: center, center, center, center right, center right, center right;
  background-size: cover, cover, cover, cover, cover, cover;
  content: '';
  filter: saturate(0.92) contrast(1.02) brightness(1.02);
  opacity: 0.88;
  pointer-events: none;
}
.clue-card.soft-background::after {
  background-image:
    linear-gradient(90deg, rgba(255, 252, 244, 0.86) 0%, rgba(255, 252, 244, 0.6) 50%, rgba(255, 252, 244, 0.22) 100%),
    radial-gradient(circle at 23% 48%, rgba(255, 252, 244, 0.5), transparent 55%),
    linear-gradient(180deg, rgba(255, 252, 244, 0.18), rgba(23, 26, 32, 0.035)),
    var(--clue-cover-image),
    var(--clue-bg-image, url('../public/assets/clues/fallback-cover.webp')),
    url('../public/assets/clues/fallback-cover.webp');
  filter: saturate(0.82) contrast(0.96) brightness(1.04);
}
.clue-card:hover,
.clue-card.active,
.clue-card:focus-within {
  border-color: color-mix(in srgb, var(--clue-task-accent, #3f7d6e) 64%, rgba(23, 26, 32, 0.18));
  background:
    linear-gradient(135deg, rgba(255, 252, 244, 0.98), rgba(237, 231, 216, 0.94)),
    rgba(255, 252, 244, 0.9);
  box-shadow:
    0 4px 8px rgba(83, 61, 32, 0.16),
    inset 0 1px 0 rgba(255, 252, 244, 0.78);
  transform: translateY(-1px);
}
.clue-card:hover::after,
.clue-card.active::after,
.clue-card:focus-within::after {
  opacity: 1;
}
.clue-card.completed {
  border-color: rgba(178, 58, 46, 0.28);
}
.clue-card.recommended {
  border-color: color-mix(in srgb, var(--clue-task-accent, #3f7d6e) 70%, rgba(23, 26, 32, 0.16));
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--clue-task-accent, #3f7d6e) 10%, rgba(255, 252, 244, 0.96)), rgba(237, 231, 216, 0.94)),
    rgba(255, 252, 244, 0.9);
}
.clue-card-body {
  position: relative;
  z-index: 2;
  display: flex;
  min-width: 0;
  flex-direction: column;
}
.clue-card-open {
  display: flex;
  width: 100%;
  flex-direction: column;
  gap: 7px;
  padding: 16px 16px 11px;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
  text-align: left;
}
.clue-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.clue-type,
.clue-distance {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 4px;
  font-size: 10px;
  line-height: 1.1;
}
.clue-type {
  padding: 4px 8px;
  border: 1px solid color-mix(in srgb, var(--clue-task-accent, #3f7d6e) 42%, rgba(112, 83, 42, 0.2));
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--clue-task-accent, #3f7d6e) 12%, transparent), rgba(255, 252, 244, 0.06)),
    rgba(247, 244, 236, 0.88);
  color: color-mix(in srgb, var(--clue-task-accent, #3f7d6e) 70%, #2b2118);
  font-weight: 780;
  box-shadow: inset 0 0 0 1px rgba(255, 252, 244, 0.62);
}
.clue-distance {
  color: #5f665f;
  font-variant-numeric: tabular-nums;
}
.clue-place-title {
  color: #171a20;
  font-size: 20px;
  font-weight: 860;
  line-height: 1.18;
  letter-spacing: 0;
  text-wrap: balance;
}
.clue-mission {
  max-width: 96%;
  color: color-mix(in srgb, var(--clue-task-accent, #3f7d6e) 72%, #2b2118);
  font-size: 13px;
  font-weight: 760;
  line-height: 1.42;
  text-wrap: balance;
}
.clue-anchor-name {
  display: inline-flex;
  width: max-content;
  max-width: 100%;
  align-items: center;
  color: color-mix(in srgb, var(--clue-task-accent, #3f7d6e) 72%, #2b2118);
  font-size: 12px;
  font-weight: 780;
  line-height: 1.34;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.clue-anchor-name::before {
  width: 7px;
  height: 7px;
  margin-right: 7px;
  border-radius: 50%;
  background: var(--clue-task-accent, #3f7d6e);
  box-shadow: 0 0 8px color-mix(in srgb, var(--clue-task-accent, #3f7d6e) 64%, transparent);
  content: '';
  flex: 0 0 auto;
}
.clue-description {
  color: #393c41;
  font-size: 12px;
  line-height: 1.62;
  text-wrap: pretty;
}
.clue-rewards {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  gap: 5px;
}
.clue-rewards span {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 3px 6px;
  border-radius: 4px;
  border: 1px solid rgba(178, 58, 46, 0.22);
  background: rgba(178, 58, 46, 0.06);
  color: #843127;
  font-size: 10px;
  line-height: 1.15;
}
.clue-cta {
  position: relative;
  overflow: hidden;
  display: flex;
  width: calc(100% - 30px);
  align-items: center;
  justify-content: space-between;
  margin: 0 15px 15px;
  padding: 10px 3px 1px;
  border: 0;
  border-top: 1px solid color-mix(in srgb, var(--clue-task-accent, #3f7d6e) 28%, rgba(23, 26, 32, 0.12));
  border-radius: 0;
  background: transparent;
  color: color-mix(in srgb, var(--clue-task-accent, #3f7d6e) 78%, #171a20);
  cursor: pointer;
  font-size: 12px;
  font-weight: 820;
  transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}
.clue-cta::before {
  position: absolute;
  top: -1px;
  left: 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    color-mix(in srgb, var(--clue-task-accent, #3f7d6e) 72%, rgba(255, 252, 244, 0.3)),
    transparent
  );
  content: '';
  opacity: 0;
  transform: translateX(-62%);
  pointer-events: none;
}
.clue-cta span[aria-hidden="true"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--clue-task-accent, #3f7d6e) 12%, rgba(255, 252, 244, 0.76));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--clue-task-accent, #3f7d6e) 25%, transparent);
  font-size: 13px;
  line-height: 1;
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  will-change: transform;
}
.clue-card.recommended:not(.completed) .clue-cta {
  animation: clueCtaBreath 3.6s ease-in-out infinite;
}
.clue-card.recommended:not(.completed) .clue-cta::before {
  animation: clueCtaInkSweep 3.2s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}
.clue-card.recommended:not(.completed) .clue-cta span[aria-hidden="true"] {
  animation: clueCtaArrowNudge 2.2s cubic-bezier(0.22, 1, 0.36, 1) infinite;
}
.clue-cta:hover {
  border-color: color-mix(in srgb, var(--clue-task-accent, #3f7d6e) 52%, rgba(23, 26, 32, 0.12));
  color: color-mix(in srgb, var(--clue-task-accent, #3f7d6e) 92%, #171a20);
  transform: translateY(-1px);
}
.clue-cta:hover span[aria-hidden="true"],
.clue-card:focus-within .clue-cta span[aria-hidden="true"] {
  background: color-mix(in srgb, var(--clue-task-accent, #3f7d6e) 18%, rgba(255, 252, 244, 0.82));
  box-shadow:
    inset 0 0 0 1px color-mix(in srgb, var(--clue-task-accent, #3f7d6e) 34%, transparent),
    0 4px 8px color-mix(in srgb, var(--clue-task-accent, #3f7d6e) 16%, transparent);
  transform: translateX(2px);
}
@keyframes clueCtaBreath {
  0%,
  100% {
    color: color-mix(in srgb, var(--clue-task-accent, #3f7d6e) 76%, #171a20);
  }
  50% {
    color: color-mix(in srgb, var(--clue-task-accent, #3f7d6e) 94%, #171a20);
  }
}
@keyframes clueCtaInkSweep {
  0% {
    opacity: 0;
    transform: translateX(-62%);
  }
  18% {
    opacity: 0.78;
  }
  46% {
    opacity: 0.26;
    transform: translateX(62%);
  }
  100% {
    opacity: 0;
    transform: translateX(62%);
  }
}
@keyframes clueCtaArrowNudge {
  0%,
  72%,
  100% {
    transform: translateX(0);
  }
  84% {
    transform: translateX(3px);
  }
}
@media (prefers-reduced-motion: reduce) {
  .clue-card.recommended:not(.completed) .clue-cta,
  .clue-card.recommended:not(.completed) .clue-cta::before,
  .clue-card.recommended:not(.completed) .clue-cta span[aria-hidden="true"] {
    animation: none;
  }
}
@media (min-width: 560px) {
  .clue-place-title {
    font-size: 21px;
  }
}
.free-explore-entry {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid rgba(23, 26, 32, 0.1);
}
.free-explore-entry b,
.free-explore-head span {
  display: block;
  color: #171a20;
  font-size: 13px;
  font-weight: 760;
}
.free-explore-entry span {
  display: block;
  margin-top: 3px;
  color: #5b625f;
  font-size: 11px;
  line-height: 1.45;
}
.free-explore-entry button,
.free-back {
  border: 1px solid rgba(23, 26, 32, 0.16);
  border-radius: 6px;
  background: rgba(255, 252, 244, 0.74);
  color: #393c41;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}
.free-explore-entry button {
  padding: 8px 9px;
  white-space: nowrap;
}
.free-back {
  padding: 7px 9px;
}
.free-explore-entry button:hover,
.free-back:hover {
  border-color: rgba(63, 125, 110, 0.42);
  color: #235e52;
}
.free-explore-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.compass-route-bar {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 2px 0 8px;
  background: linear-gradient(180deg, rgba(247, 244, 236, 0.98) 86%, rgba(247, 244, 236, 0));
}
.compass-route-mode {
  padding: 10px;
  border-radius: 13px;
  border: 1px solid rgba(154, 123, 50, 0.18);
  background: rgba(255, 252, 244, 0.34);
}
.rt-mini-label {
  display: block;
  margin-bottom: 7px;
  color: #8a7a62;
  font-size: 10px;
  letter-spacing: 0.16em;
}
.compass-route-hint {
  margin: 5px 0 0;
  color: #8a7a62;
  font-size: 11px;
  line-height: 1.5;
}
.compass-diy-panel,
.compass-rec-panel {
  margin-bottom: 10px;
}
.compass-diy-panel {
  padding: 10px 11px;
  border: 1px solid rgba(154, 123, 50, 0.18);
  border-radius: 12px;
  background: rgba(255, 252, 244, 0.28);
}
.rt-plan-btn:disabled { cursor: not-allowed; opacity: 0.48; }

/* —— 附近探索列表 —— */
.compass-near-title,
.rt-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.18em;
  color: #6b5d48;
  margin-bottom: 10px;
}
.compass-diy-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.compass-diy-meta .compass-near-title {
  margin-bottom: 0;
}
.compass-near-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.compass-anchor-list { padding-bottom: 10px; }
.compass-near-item {
  display: flex;
  align-items: stretch;
  border-radius: 12px;
  border: 1px solid rgba(154, 123, 50, 0.18);
  background: rgba(255, 252, 244, 0.45);
  transition: all 0.25s ease;
}
.compass-near-item:hover {
  border-color: rgba(178, 58, 46, 0.4);
  background: rgba(178, 58, 46, 0.06);
}
.compass-near-item.selected {
  border-color: rgba(178, 58, 46, 0.58);
  background: rgba(178, 58, 46, 0.09);
}
.compass-anchor-info {
  display: flex;
  flex: 1;
  min-width: 0;
  padding: 11px 8px 11px 12px;
  border: 0;
  background: transparent;
  cursor: pointer;
  text-align: left;
}
.compass-anchor-select {
  align-self: center;
  width: 26px;
  height: 26px;
  margin: 0 11px 0 4px;
  border: 1px solid rgba(154, 123, 50, 0.55);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.45);
  color: #fff8e6;
  cursor: pointer;
  font-size: 14px;
  font-weight: 700;
}
.compass-near-item.selected .compass-anchor-select {
  border-color: #b23a2e;
  background: #b23a2e;
}
.cn-rank {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  border-radius: 9999px;
  background: rgba(154, 123, 50, 0.16);
  color: #6b4f1f;
  font-size: 12px;
  font-weight: 700;
  margin-top: 2px;
}
.cn-body { flex: 1; min-width: 0; }
.cn-top {
  display: flex;
  align-items: center;
  gap: 6px;
}
.cn-dot {
  width: 9px;
  height: 9px;
  flex-shrink: 0;
  border-radius: 9999px;
}
.cn-name {
  font-family: 'Ma Shan Zheng', 'Noto Serif SC', serif;
  font-size: 16px;
  color: #2b2118;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cn-dist {
  margin-left: auto;
  font-size: 11px;
  font-weight: 600;
  color: #b23a2e;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}
.cn-hero {
  display: block;
  font-size: 11px;
  color: #9a7b32;
  margin-top: 3px;
}
.cn-title {
  display: block;
  font-size: 11px;
  color: #8a7a62;
  margin-top: 2px;
  line-height: 1.4;
}

/* —— 路线规划表单 —— */
.route-form { margin-bottom: 14px; }
.rt-label { margin-top: 14px; }
.rt-label:first-child { margin-top: 0; }
.rt-chips,
.rt-modes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.rt-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 11px;
  border-radius: 9999px;
  border: 1px solid rgba(154, 123, 50, 0.3);
  background: rgba(255, 252, 244, 0.5);
  color: #5a4d3c;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.22s ease;
}
.rt-chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
}
.rt-chip:hover { border-color: rgba(178, 58, 46, 0.45); }
.rt-chip.active {
  background: rgba(178, 58, 46, 0.12);
  border-color: rgba(178, 58, 46, 0.55);
  color: #b23a2e;
  font-weight: 600;
}
.rt-mode {
  flex: 1;
  padding: 9px 0;
  border-radius: 10px;
  border: 1px solid rgba(154, 123, 50, 0.3);
  background: rgba(255, 252, 244, 0.5);
  color: #5a4d3c;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.22s ease;
}
.rt-mode.active {
  background: rgba(154, 123, 50, 0.16);
  border-color: rgba(154, 123, 50, 0.55);
  color: #6b4f1f;
  font-weight: 600;
}
.rt-plan-btn {
  width: 100%;
  margin-top: 10px;
  padding: 12px 0;
  border-radius: 12px;
  border: none;
  background: linear-gradient(135deg, #b5762a, #8f6726);
  color: #fff8e6;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.05em;
  cursor: pointer;
  box-shadow: 0 8px 20px -10px rgba(93, 65, 18, 0.75);
  transition: all 0.25s ease;
}
.rt-plan-btn:hover { transform: translateY(-1px); }
.rt-plan-btn.loading { opacity: 0.7; pointer-events: none; }
.rt-diy-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 9px;
}
.rt-diy-actions .rt-plan-btn {
  width: auto;
  min-width: 92px;
  margin-top: 0;
  padding: 7px 13px;
  border-radius: 9px;
  font-size: 12px;
  letter-spacing: 0.03em;
  box-shadow: 0 6px 14px -11px rgba(93, 65, 18, 0.8);
}
.rt-anchor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
}
.rt-anchor-head .rt-label { margin: 0; }
.rt-selected-count {
  color: #8a7a62;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.rt-selection-actions {
  display: flex;
  gap: 8px;
  margin: 8px 0;
}
.rt-select-action {
  border: 1px solid rgba(154, 123, 50, 0.3);
  background: rgba(255, 252, 244, 0.5);
  color: #6b5d48;
  cursor: pointer;
  font-size: 11px;
  transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}
.rt-select-action {
  padding: 5px 9px;
  border-radius: 7px;
}
.rt-select-action:hover {
  border-color: rgba(178, 58, 46, 0.5);
  color: #b23a2e;
}
.route-anchor-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  max-height: 210px;
  overflow-y: auto;
  padding: 2px 3px 3px 0;
}
.route-anchor-option {
  display: flex;
  align-items: center;
  min-width: 0;
  min-height: 34px;
  gap: 6px;
  padding: 6px 7px;
  border: 1px solid rgba(154, 123, 50, 0.22);
  border-radius: 7px;
  background: rgba(255, 252, 244, 0.45);
  color: #5a4d3c;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.route-anchor-option:hover { border-color: rgba(178, 58, 46, 0.42); }
.route-anchor-option.active {
  border-color: rgba(178, 58, 46, 0.58);
  background: rgba(178, 58, 46, 0.09);
  color: #2b2118;
}
.rao-check {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  border: 1px solid rgba(154, 123, 50, 0.55);
  border-radius: 4px;
  color: #fff8e6;
  background: rgba(255, 255, 255, 0.45);
  font-size: 10px;
  font-weight: 700;
}
.route-anchor-option.active .rao-check { border-color: #b23a2e; background: #b23a2e; }
.rao-dot { width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; }
.rao-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 11px;
}

/* —— 推荐路线 —— */
.compass-rec-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rec-route-card {
  position: relative;
  overflow: hidden;
  padding: 13px;
  border-radius: 15px;
  border: 1px solid rgba(154, 123, 50, 0.2);
  border-left: 3px solid var(--rr-accent, #9a7b32);
  background: rgba(255, 252, 244, 0.52);
  box-shadow: 0 12px 22px -20px rgba(70, 55, 30, 0.62);
}
.rec-route-card::after {
  position: absolute;
  inset: auto -30px -36px auto;
  width: 86px;
  height: 86px;
  border-radius: 999px;
  background: var(--rr-accent, #9a7b32);
  content: '';
  opacity: 0.08;
}
.rr-head {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
}
.rr-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: rgba(154, 123, 50, 0.14);
}
.rr-title {
  min-width: 0;
  overflow: hidden;
  color: #3f3020;
  font-size: 15px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rr-count {
  color: #8a7a62;
  font-size: 10px;
}
.rr-desc {
  margin: 8px 0 7px;
  color: #6b5d48;
  font-size: 12px;
  line-height: 1.55;
}
.rr-stops {
  margin-bottom: 10px;
  color: #9a7b32;
  font-size: 11px;
  line-height: 1.45;
}
.rec-plan-btn {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 9px 11px;
  border: 1px solid rgba(154, 123, 50, 0.28);
  border-radius: 10px;
  background: rgba(255, 248, 230, 0.58);
  color: #6b4f1f;
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}
.rec-plan-btn:hover {
  border-color: var(--rr-accent, #9a7b32);
  background: rgba(255, 248, 230, 0.82);
  box-shadow: 0 10px 20px -16px rgba(70, 55, 30, 0.72);
  transform: translateY(-1px);
}
.rec-plan-btn.loading { opacity: 0.7; pointer-events: none; }

/* —— 附近线索：扫描过渡 —— */
.clue-scan-layer {
  position: fixed;
  inset: 0;
  z-index: 54;
  display: grid;
  place-items: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.24s ease;
}
.clue-scan-layer::before {
  position: absolute;
  inset: 0;
  background: rgba(8, 18, 17, 0.42);
  content: '';
}
.clue-scan-layer.show {
  opacity: 1;
}
.clue-scan-reticle {
  position: relative;
  width: min(58vw, 280px);
  aspect-ratio: 1;
}
.scan-ring {
  position: absolute;
  inset: 50%;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(94, 207, 177, 0.68);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: clueScanRing 1.05s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.scan-ring-2 { animation-delay: 0.12s; }
.scan-ring-3 { animation-delay: 0.24s; }
.scan-sweep {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 48%;
  height: 1px;
  transform-origin: left center;
  background: linear-gradient(90deg, rgba(94, 207, 177, 0.9), rgba(94, 207, 177, 0));
  animation: clueScanSweep 1.05s ease-out both;
}
.scan-point {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5ecfb1;
  box-shadow: 0 0 13px rgba(94, 207, 177, 0.95);
  animation: cluePointFlash 1.05s ease-out both;
}
.scan-point-a { left: 30%; top: 35%; animation-delay: 0.18s; }
.scan-point-b { right: 28%; top: 45%; animation-delay: 0.32s; }
.scan-point-c { left: 48%; bottom: 27%; animation-delay: 0.48s; }
.clue-scan-text {
  position: absolute;
  left: 50%;
  top: calc(50% + min(34vw, 170px));
  width: min(86vw, 430px);
  transform: translateX(-50%);
  color: #f7f4ec;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.7;
  text-align: center;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.45);
}

@keyframes clueScanRing {
  0% {
    width: 24px;
    height: 24px;
    opacity: 0;
  }
  16% { opacity: 0.9; }
  100% {
    width: 100%;
    height: 100%;
    opacity: 0;
  }
}
@keyframes clueScanSweep {
  0% { transform: rotate(-24deg); opacity: 0; }
  12% { opacity: 1; }
  100% { transform: rotate(248deg); opacity: 0; }
}
@keyframes cluePointFlash {
  0%, 100% { transform: scale(0.7); opacity: 0; }
  38%, 72% { transform: scale(1); opacity: 1; }
}

/* —— 附近线索：完成反馈 —— */
#clue-complete-modal {
  position: fixed;
  inset: 0;
  z-index: 57;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 21, 20, 0.46);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}
#clue-complete-modal.open {
  opacity: 1;
  pointer-events: auto;
}
.clue-complete-card {
  width: min(100%, 430px);
  border-radius: 10px;
  border: 1px solid rgba(178, 58, 46, 0.26);
  background: #f7f4ec;
  padding: 22px;
  color: #171a20;
  box-shadow: 0 22px 38px -28px rgba(0, 0, 0, 0.72);
  transform: translateY(8px);
  transition: transform 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
#clue-complete-modal.open .clue-complete-card {
  transform: translateY(0);
}
.clue-complete-seal {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  margin-bottom: 15px;
  border: 2px solid #b23a2e;
  border-radius: 6px;
  color: #b23a2e;
  font-family: 'Ma Shan Zheng', 'Noto Serif SC', serif;
  font-size: 20px;
  transform: rotate(-6deg);
}
.clue-complete-kicker {
  color: #8a352c;
  font-size: 11px;
  font-weight: 760;
}
.clue-complete-copy h2 {
  margin: 4px 0 7px;
  color: #171a20;
  font-size: 22px;
  font-weight: 800;
}
.clue-complete-copy p {
  margin: 0 0 16px;
  color: #393c41;
  font-size: 13px;
  line-height: 1.68;
}
.clue-reveal-row,
.clue-earned {
  display: grid;
  gap: 6px;
  padding: 11px 0;
  border-top: 1px solid rgba(23, 26, 32, 0.1);
}
.clue-reveal-row span,
.clue-earned > span {
  color: #6d746f;
  font-size: 11px;
}
.clue-reveal-row b {
  color: #171a20;
  font-size: 16px;
}
.clue-want-note {
  display: grid;
  gap: 5px;
  padding: 11px 0;
  border-top: 1px solid rgba(23, 26, 32, 0.1);
}
.clue-want-note b {
  color: #3d3122;
  font-size: 13px;
  line-height: 1.5;
}
.clue-want-note p {
  margin: 0;
  color: #5b625f;
  font-size: 12px;
  line-height: 1.65;
}
.clue-complete-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 9px;
  margin-top: 16px;
}
.clue-complete-actions button {
  min-height: 38px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 760;
}
.clue-complete-secondary {
  border: 1px solid rgba(23, 26, 32, 0.16);
  background: transparent;
  color: #393c41;
  padding: 0 12px;
}
.clue-complete-primary {
  border: 1px solid #b23a2e;
  background: #b23a2e;
  color: #fff8e6;
  padding: 0 14px;
}
.clue-complete-primary.active {
  border-color: #3f7d6e;
  background: #3f7d6e;
}

/* —— 行程卡片 —— */
.route-card {
  margin-top: 16px;
  border-radius: 16px;
  border: 1px solid rgba(154, 123, 50, 0.28);
  border-top: 3px solid var(--rc-accent, #9a7b32);
  background: rgba(255, 252, 244, 0.6);
  padding: 16px;
  animation: fadeInUp 0.5s ease-out both;
}
.route-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.rc-title {
  font-size: 19px;
  color: #6b4f1f;
}
.rc-source {
  font-size: 10px;
  padding: 2px 8px;
  border-radius: 9999px;
}
.rc-source.real {
  background: rgba(63, 125, 110, 0.15);
  color: #3f7d6e;
  border: 1px solid rgba(63, 125, 110, 0.35);
}
.rc-source.straight {
  background: rgba(154, 123, 50, 0.14);
  color: #8a7a62;
  border: 1px solid rgba(154, 123, 50, 0.3);
}
.route-stat {
  display: flex;
  align-items: center;
  padding: 12px 0;
  border-top: 1px solid rgba(154, 123, 50, 0.18);
  border-bottom: 1px solid rgba(154, 123, 50, 0.18);
}
.rc-stat-item {
  flex: 1;
  text-align: center;
}
.rc-stat-num {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 22px;
  color: var(--rc-accent, #b5762a);
  font-weight: 600;
}
.rc-stat-unit {
  font-size: 12px;
  margin-left: 2px;
}
.rc-stat-label {
  display: block;
  font-size: 10px;
  color: #8a7a62;
  margin-top: 2px;
  letter-spacing: 0.05em;
}
.rc-stat-sep {
  width: 1px;
  height: 34px;
  background: rgba(154, 123, 50, 0.22);
}
.route-start {
  margin-top: 12px;
  padding: 7px 10px;
  border-radius: 9px;
  background: rgba(178, 58, 46, 0.08);
  font-size: 12px;
  color: #b23a2e;
  font-weight: 500;
}
.route-stops {
  margin-top: 6px;
  position: relative;
}
/* 站点之间的竖向连线 */
.route-stops::before {
  content: '';
  position: absolute;
  left: 22px;
  top: 8px;
  bottom: 32px;
  width: 2px;
  background: repeating-linear-gradient(to bottom, var(--rc-accent, #9a7b32) 0 4px, transparent 4px 8px);
  opacity: 0.4;
}
.route-stop {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 9px 6px;
  background: transparent;
  border: none;
  cursor: pointer;
  text-align: left;
  border-radius: 9px;
  transition: background 0.2s ease;
  position: relative;
  z-index: 1;
}
.route-stop:hover { background: rgba(154, 123, 50, 0.08); }
.rs-index {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 9999px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 2px 6px -1px rgba(70, 55, 30, 0.4);
}
.rs-body { flex: 1; min-width: 0; }
.rs-name {
  display: block;
  font-family: 'Ma Shan Zheng', 'Noto Serif SC', serif;
  font-size: 16px;
  color: #2b2118;
}
.rs-meta {
  display: block;
  font-size: 11px;
  color: #8a7a62;
  margin-top: 1px;
}
.rs-go {
  color: #b23a2e;
  font-size: 16px;
  flex-shrink: 0;
}
.route-nav-hint {
  margin: 10px 0 0;
  color: #8a7a62;
  font-size: 11px;
  line-height: 1.55;
}
.route-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 10px;
}
.route-nav {
  padding: 9px 0;
  border-radius: 9px;
  border: 1px solid rgba(154, 123, 50, 0.36);
  background: rgba(255, 248, 230, 0.72);
  color: #6b4f1f;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  transition: all 0.2s ease;
}
.route-nav:hover {
  border-color: rgba(181, 118, 42, 0.72);
  background: rgba(255, 248, 230, 0.95);
  transform: translateY(-1px);
}
.route-clear {
  min-width: 74px;
  padding: 8px 10px;
  border-radius: 9px;
  border: 1px solid rgba(90, 77, 60, 0.25);
  background: transparent;
  color: #8a7a62;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.2s ease;
}
.route-clear:hover {
  border-color: rgba(178, 58, 46, 0.4);
  color: #b23a2e;
}

/* —— 信息面板：副本入口按钮 —— */
.episode-enter-btn {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 36px;
  align-items: center;
  gap: 14px;
  width: 100%;
  margin-top: 0;
  min-height: 82px;
  padding: 15px 16px;
  border-radius: 20px;
  border: 1px solid rgba(179, 143, 72, 0.48);
  background:
    radial-gradient(circle at 88% 50%, rgba(207, 167, 82, 0.18), transparent 30%),
    linear-gradient(135deg, rgba(255, 253, 247, 0.96) 0%, rgba(244, 235, 214, 0.9) 100%);
  color: #47351f;
  cursor: pointer;
  transition: transform 0.24s ease, box-shadow 0.24s ease, border-color 0.24s ease, background 0.24s ease;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  box-shadow: 0 16px 28px -22px rgba(87, 65, 34, 0.72), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.episode-enter-btn::before {
  position: absolute;
  right: 14px;
  top: 50%;
  z-index: 0;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: rgba(185, 143, 57, 0.13);
  content: '';
  pointer-events: none;
  transform: translateY(-50%) scale(0.86);
  animation: episode-cta-breathe 2.8s ease-in-out infinite;
}
.episode-enter-btn::after {
  position: absolute;
  inset: 0 auto 0 -50%;
  z-index: 0;
  width: 24%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.54), transparent);
  content: '';
  opacity: 0;
  pointer-events: none;
  transform: skewX(-18deg);
  animation: episode-cta-sheen 6.4s ease-in-out 1.6s infinite;
}
.episode-enter-btn > span {
  position: relative;
  z-index: 1;
}
.episode-enter-btn:hover {
  transform: translateY(-3px);
  border-color: rgba(170, 128, 48, 0.74);
  background:
    radial-gradient(circle at 88% 50%, rgba(207, 167, 82, 0.24), transparent 32%),
    linear-gradient(135deg, rgba(255, 254, 249, 0.98) 0%, rgba(246, 233, 203, 0.96) 100%);
  box-shadow: 0 22px 34px -22px rgba(79, 56, 23, 0.86), 0 0 0 4px rgba(182, 139, 54, 0.09);
}
.episode-enter-btn:active {
  transform: translateY(-1px) scale(0.99);
}
.episode-enter-btn:focus-visible {
  outline: 3px solid rgba(154, 123, 50, 0.78);
  outline-offset: 3px;
}
.episode-enter-btn .ee-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: linear-gradient(145deg, #b98c35, #8e6823);
  color: #fff8e7;
  box-shadow: 0 8px 16px -12px rgba(93, 65, 18, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.34);
  transition: transform 0.24s ease, box-shadow 0.24s ease;
}
.episode-enter-btn .ee-icon svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.7;
}
.episode-enter-btn .ee-copy {
  min-width: 0;
  text-align: left;
  white-space: normal;
  color: #47351f;
  font-size: 15.5px;
  font-weight: 700;
  line-height: 1.45;
  letter-spacing: 0.02em;
}
.episode-enter-btn .ee-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: end;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid rgba(154, 119, 49, 0.22);
  background: rgba(255, 252, 241, 0.55);
  color: #816326;
  font-size: 22px;
  line-height: 1;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76);
  animation: episode-arrow-pulse 2s ease-in-out infinite;
  transition: background 0.24s ease, transform 0.24s ease, color 0.24s ease;
}
.episode-enter-btn:hover .ee-icon {
  transform: translateY(-1px) rotate(-2deg);
  box-shadow: 0 12px 20px -13px rgba(88, 60, 17, 0.88), inset 0 1px 0 rgba(255, 255, 255, 0.38);
}
.episode-enter-btn:hover .ee-arrow {
  background: rgba(255, 248, 226, 0.78);
  color: #6f521d;
}
.episode-enter-btn.completed {
  border-style: dashed;
}

@media (max-width: 520px) {
  .episode-enter-btn {
    grid-template-columns: 40px minmax(0, 1fr) 32px;
    gap: 11px;
    min-height: 78px;
    padding: 12px 13px;
  }
  .episode-enter-btn .ee-icon {
    width: 40px;
    height: 40px;
  }
  .episode-enter-btn .ee-icon svg { width: 22px; height: 22px; }
  .episode-enter-btn .ee-copy {
    font-size: 14px;
    line-height: 1.45;
    letter-spacing: 0;
  }
  .episode-enter-btn .ee-arrow {
    width: 32px;
    height: 32px;
    font-size: 21px;
  }
  .episode-enter-btn::before {
    right: 11px;
    width: 38px;
    height: 38px;
  }
}

@keyframes episode-cta-sheen {
  0%, 58% { opacity: 0; transform: translateX(0) skewX(-18deg); }
  68% { opacity: 0.5; }
  84%, 100% { opacity: 0; transform: translateX(560%) skewX(-18deg); }
}

@keyframes episode-cta-breathe {
  0%, 100% { opacity: 0.45; transform: translateY(-50%) scale(0.86); }
  50% { opacity: 0.9; transform: translateY(-50%) scale(1); }
}

@keyframes episode-arrow-pulse {
  0%, 100% { opacity: 0.72; transform: translateX(0); }
  50% { opacity: 1; transform: translateX(4px); }
}

@media (prefers-reduced-motion: reduce) {
  .episode-enter-btn,
  .episode-enter-btn .ee-arrow,
  .episode-enter-btn::before,
  .episode-enter-btn::after {
    transition: none;
  }
  .episode-enter-btn .ee-arrow,
  .episode-enter-btn::before,
  .episode-enter-btn::after {
    animation: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .clue-card,
  .clue-cta,
  .clue-scan-layer,
  .clue-complete-card,
  #route-planner-panel,
  .route-anchor-row,
  .route-result-card {
    transition: none;
  }
  .scan-ring,
  .scan-sweep,
  .scan-point {
    animation: none;
  }
  .scan-ring {
    width: 100%;
    height: 100%;
    opacity: 0.28;
  }
  .scan-sweep,
  .scan-point {
    opacity: 0.8;
  }
}

/* —— 全屏剧情卷轴层 —— */
#episode-layer {
  position: absolute;
  inset: 0;
  z-index: 55;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(40, 30, 16, 0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
#episode-layer.open {
  opacity: 1;
  pointer-events: auto;
}
.episode-scroll {
  position: relative;
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  border-radius: 22px;
  border: 1px solid rgba(154, 123, 50, 0.4);
  border-top: 4px solid var(--ep-accent, #9a7b32);
  background:
    linear-gradient(180deg, rgba(246, 239, 222, 0.99), rgba(235, 224, 197, 0.99));
  padding: 30px 32px 34px;
  box-shadow: 0 40px 100px -30px rgba(40, 30, 16, 0.8);
  transform: scale(0.94) translateY(10px);
  transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
#episode-layer.open .episode-scroll {
  transform: scale(1) translateY(0);
}
.episode-scroll::-webkit-scrollbar { width: 5px; }
.episode-scroll::-webkit-scrollbar-thumb {
  background: rgba(90, 77, 60, 0.35);
  border-radius: 3px;
}
.episode-close {
  position: absolute;
  right: 18px;
  top: 18px;
  width: 34px;
  height: 34px;
  border-radius: 9999px;
  border: 1px solid rgba(154, 123, 50, 0.35);
  background: rgba(255, 252, 244, 0.6);
  color: #5a4d3c;
  cursor: pointer;
  z-index: 2;
  transition: all 0.3s ease;
}
.episode-close:hover {
  transform: rotate(90deg);
  color: #b23a2e;
  border-color: rgba(178, 58, 46, 0.6);
}
/* 顶部场景进度点 */
.episode-progress {
  display: flex;
  align-items: center;
  gap: 0;
  margin-bottom: 22px;
  padding-right: 40px;
}
.ep-dot {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 9999px;
  border: 1.5px solid rgba(154, 123, 50, 0.35);
  background: rgba(255, 252, 244, 0.5);
  color: #8a7a62;
  font-size: 11px;
  font-family: 'Ma Shan Zheng', 'Noto Serif SC', serif;
}
.ep-dot.active {
  background: var(--ep-accent, #b23a2e);
  border-color: var(--ep-accent, #b23a2e);
  color: #fff8e6;
  box-shadow: 0 0 10px -1px var(--ep-accent, rgba(178, 58, 46, 0.6));
}
.ep-dot.done {
  background: rgba(154, 123, 50, 0.2);
  border-color: rgba(154, 123, 50, 0.5);
  color: #6b4f1f;
}
.ep-dot-sep {
  flex: 1;
  height: 1.5px;
  min-width: 8px;
  background: rgba(154, 123, 50, 0.25);
}
/* 剧情正文 */
.ep-tag {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.1em;
  margin-bottom: 12px;
}
.ep-tag-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
}
.ep-title {
  font-size: 28px;
  color: #2b2118;
  line-height: 1.3;
  margin-bottom: 18px;
}
/* 角色头像区域 */
.ep-characters {
  display: flex;
  gap: 20px;
  justify-content: center;
  margin-bottom: 22px;
  padding: 16px 0;
  border-top: 1px solid rgba(154, 123, 50, 0.15);
  border-bottom: 1px solid rgba(154, 123, 50, 0.15);
}
.ep-char {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  min-width: 70px;
}
.ep-char-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  border: 2.5px solid #9a7b32;
  overflow: hidden;
  position: relative;
  background: rgba(240, 232, 210, 0.8);
  box-shadow: 0 4px 16px -4px rgba(0,0,0,0.2), inset 0 0 0 1px rgba(255,255,255,0.3);
  animation: ep-avatar-in 0.6s ease backwards;
}
.ep-char-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ep-char-avatar.theme-avatar,
.ep-speaker-avatar.theme-avatar {
  background:
    radial-gradient(circle at 50% 42%, rgba(255, 252, 244, 0.96), rgba(236, 226, 203, 0.66) 62%, rgba(154, 123, 50, 0.16)),
    linear-gradient(145deg, rgba(255, 252, 244, 0.88), rgba(236, 226, 203, 0.62));
}
.ep-char-avatar.theme-avatar img,
.ep-speaker-avatar.theme-avatar img {
  object-fit: contain;
  padding: 7px;
  transform: translateY(2px) scale(1.12);
}
.ep-speaker-avatar.theme-avatar img {
  padding: 5px;
}
.ep-char-avatar.portrait-pending,
.ep-speaker-avatar.portrait-pending {
  border-style: dashed;
  background:
    radial-gradient(circle at 50% 34%, rgba(255, 252, 244, 0.94), rgba(236, 226, 203, 0.72)),
    linear-gradient(145deg, rgba(255, 252, 244, 0.7), rgba(154, 123, 50, 0.12));
}
.ep-char-avatar.portrait-pending::before,
.ep-speaker-avatar.portrait-pending::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 20%;
  width: 20px;
  height: 20px;
  border-radius: 9999px;
  background: rgba(154, 123, 50, 0.36);
  box-shadow: 0 24px 0 10px rgba(154, 123, 50, 0.28);
  transform: translateX(-50%);
}
.ep-char-avatar.no-img img { display: none; }
.ep-char-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 700;
  color: #9a7b32;
  font-family: 'Ma Shan Zheng', serif;
}
.ep-char-avatar.portrait-pending .ep-char-fallback,
.ep-speaker-avatar.portrait-pending .ep-char-fallback {
  inset: auto 5px 5px;
  display: block;
  border-radius: 9999px;
  background: rgba(255, 252, 244, 0.82);
  color: #7a6a4a;
  font-family: 'Noto Sans SC', system-ui, sans-serif;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
}
.ep-char-avatar:not(.no-img) .ep-char-fallback { display: none; }
.ep-char-name {
  font-size: 12px;
  font-weight: 600;
  color: #2b2118;
  text-align: center;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ep-char-role {
  font-size: 10px;
  color: #7a6a4a;
  text-align: center;
  max-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@keyframes ep-avatar-in {
  from { transform: scale(0.5) rotate(-10deg); opacity: 0; }
  to { transform: scale(1) rotate(0); opacity: 1; }
}
.ep-char:nth-child(2) .ep-char-avatar { animation-delay: 0.15s; }
.ep-char:nth-child(3) .ep-char-avatar { animation-delay: 0.3s; }
/* 场景中说话者头像 */
.ep-speaker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  padding: 8px 12px;
  border-radius: 12px;
  background: rgba(240, 232, 210, 0.5);
  border: 1px solid rgba(154, 123, 50, 0.15);
}
.ep-speaker-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid #9a7b32;
  overflow: hidden;
  position: relative;
  background: rgba(240, 232, 210, 0.8);
  flex-shrink: 0;
  box-shadow: 0 2px 8px -2px rgba(0,0,0,0.15);
}
.ep-speaker-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.ep-speaker-avatar.no-img img { display: none; }
.ep-speaker-avatar .ep-char-fallback {
  font-size: 16px;
}
.ep-speaker-avatar.portrait-pending .ep-char-fallback {
  font-size: 8px;
}
.ep-speaker-avatar.portrait-pending::before {
  width: 15px;
  height: 15px;
  box-shadow: 0 18px 0 7px rgba(154, 123, 50, 0.28);
}
.ep-speaker-avatar:not(.no-img) .ep-char-fallback { display: none; }
.ep-speaker-name {
  font-size: 13px;
  font-weight: 600;
  color: #2b2118;
}
.ep-intro {
  font-size: 16px;
  line-height: 1.9;
  color: #3d3122;
  min-height: 80px;
  font-family: 'Noto Serif SC', serif;
}
.ep-scene-no {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: #9a7b32;
  margin-bottom: 10px;
  text-transform: uppercase;
}
.ep-question {
  font-size: 22px;
  line-height: 1.5;
  color: #2b2118;
  margin-bottom: 20px;
}
.ep-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ep-option {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 15px 16px;
  border-radius: 14px;
  border: 1px solid rgba(154, 123, 50, 0.3);
  background: rgba(255, 252, 244, 0.55);
  cursor: pointer;
  text-align: left;
  transition: all 0.25s ease;
}
.ep-option:hover:not(.locked) {
  border-color: var(--ep-accent, #b23a2e);
  background: rgba(255, 252, 244, 0.9);
  transform: translateX(3px);
}
.ep-option.locked { cursor: default; }
.ep-option-idx {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 9999px;
  background: rgba(154, 123, 50, 0.16);
  color: #6b4f1f;
  font-size: 13px;
  font-weight: 700;
}
.ep-option-text {
  flex: 1;
  font-size: 15px;
  line-height: 1.6;
  color: #2b2118;
  padding-top: 2px;
}
.ep-option.is-correct {
  border-color: #3f7d6e;
  background: rgba(63, 125, 110, 0.12);
}
.ep-option.is-correct .ep-option-idx {
  background: #3f7d6e;
  color: #fff;
}
.ep-option.is-wrong {
  border-color: #b23a2e;
  background: rgba(178, 58, 46, 0.1);
}
.ep-option.is-wrong .ep-option-idx {
  background: #b23a2e;
  color: #fff;
}
/* 反馈 */
.ep-feedback {
  margin-top: 16px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.ep-feedback.show {
  max-height: 600px;
  opacity: 1;
}
.ep-fb-head {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 8px;
}
.ep-fb-head.ok { color: #3f7d6e; }
.ep-fb-head.no { color: #b23a2e; }
.ep-fb-body {
  font-size: 14px;
  line-height: 1.8;
  color: #3d3122;
  padding: 14px 16px;
  border-radius: 12px;
  background: rgba(154, 123, 50, 0.09);
  border-left: 3px solid var(--ep-accent, #9a7b32);
}
.ep-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}
.ep-btn {
  flex: 1;
  padding: 12px 0;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}
.ep-btn-primary {
  border: none;
  background: linear-gradient(135deg, var(--ep-accent, #b23a2e), color-mix(in srgb, var(--ep-accent, #b23a2e) 78%, #000));
  color: #fff8e6;
  box-shadow: 0 8px 22px -10px var(--ep-accent, rgba(178, 58, 46, 0.7));
}
.ep-btn-primary:hover { transform: translateY(-1px); }
.ep-btn-secondary {
  border: 1px solid color-mix(in srgb, var(--ep-accent, #b23a2e) 45%, rgba(90, 77, 60, 0.2));
  background: color-mix(in srgb, var(--ep-accent, #b23a2e) 12%, rgba(255, 252, 244, 0.7));
  color: color-mix(in srgb, var(--ep-accent, #b23a2e) 78%, #2b2118);
}
.ep-btn-secondary:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--ep-accent, #b23a2e) 65%, rgba(90, 77, 60, 0.2));
}
.ep-btn-ghost {
  border: 1px solid rgba(90, 77, 60, 0.3);
  background: transparent;
  color: #6b5d48;
  flex: 0 0 auto;
  padding: 12px 18px;
}
.ep-btn-ghost:hover { color: #b23a2e; border-color: rgba(178, 58, 46, 0.5); }

/* —— M03 南头古城：RPG 剧情副本模式 —— */
.episode-scroll.is-rpg-dialogue {
  width: min(1220px, calc(100vw - 32px));
  max-width: none;
  height: min(760px, calc(100vh - 32px));
  max-height: calc(100vh - 32px);
  overflow: hidden;
  border: 1px solid rgba(219, 190, 124, 0.42);
  border-top: 1px solid rgba(219, 190, 124, 0.42);
  border-radius: 18px;
  background: #111613;
  padding: 0;
  box-shadow:
    0 40px 120px -32px rgba(7, 10, 8, 0.9),
    inset 0 0 0 1px rgba(255, 247, 220, 0.1);
}
.episode-scroll.is-rpg-dialogue .episode-progress {
  display: none;
}
.episode-scroll.is-rpg-dialogue .episode-body {
  height: 100%;
}
.episode-scroll.is-rpg-dialogue .episode-close {
  right: 18px;
  top: 16px;
  z-index: 20;
  border-color: rgba(255, 247, 220, 0.42);
  background: rgba(30, 25, 18, 0.54);
  color: #fff4dc;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.rpg-episode {
  position: relative;
  isolation: isolate;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  color: #fff8e6;
}
.rpg-bg,
.rpg-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.rpg-bg {
  z-index: 0;
  background-image: var(--rpg-bg-image, var(--rpg-bg));
  background-position: center;
  background-size: cover;
  transform: scale(1.015);
}
.rpg-shade {
  z-index: 1;
  background:
    radial-gradient(ellipse at 66% 42%, rgba(255, 229, 166, 0.12), transparent 34%),
    linear-gradient(90deg, rgba(7, 14, 12, 0.38), transparent 34%, transparent 68%, rgba(7, 14, 12, 0.34)),
    linear-gradient(180deg, rgba(246, 239, 222, 0.04), transparent 30%, rgba(6, 8, 7, 0.76) 100%);
}
.rpg-hud {
  position: absolute;
  left: 28px;
  top: 24px;
  z-index: 6;
  display: grid;
  gap: 8px;
  width: min(520px, calc(100% - 96px));
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
  pointer-events: none;
}
.rpg-kicker {
  color: rgba(255, 247, 220, 0.78);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
}
.rpg-scene-title {
  margin: 2px 0 0;
  color: #f8e7b4;
  font-size: 36px;
  line-height: 1.05;
  text-shadow: 0 3px 18px rgba(0, 0, 0, 0.55);
}
.rpg-act-title {
  width: fit-content;
  border: 1px solid rgba(218, 185, 106, 0.42);
  border-radius: 999px;
  background: rgba(14, 18, 15, 0.44);
  padding: 5px 10px;
  color: rgba(255, 247, 220, 0.88);
  font-size: 12px;
  font-weight: 700;
}
.rpg-progress {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  max-width: 520px;
}
.rpg-chapter {
  border: 1px solid rgba(255, 247, 220, 0.2);
  border-radius: 999px;
  background: rgba(11, 16, 14, 0.34);
  padding: 4px 8px;
  color: rgba(255, 247, 220, 0.56);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}
.rpg-chapter.done {
  border-color: rgba(90, 162, 136, 0.44);
  color: rgba(204, 239, 224, 0.82);
}
.rpg-chapter.active {
  border-color: rgba(218, 185, 106, 0.78);
  background: rgba(92, 66, 28, 0.42);
  color: #fff4dc;
}
.rpg-task,
.rpg-clue-meter {
  width: fit-content;
  max-width: min(520px, 100%);
  border: 1px solid rgba(255, 247, 220, 0.18);
  border-radius: 10px;
  background: rgba(9, 15, 13, 0.46);
  padding: 8px 10px;
  color: rgba(255, 247, 220, 0.82);
  font-size: 12px;
  line-height: 1.45;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.rpg-task b {
  margin-right: 6px;
  color: #e4c36f;
}
.rpg-task.done {
  border-color: rgba(90, 162, 136, 0.45);
  color: rgba(224, 244, 234, 0.9);
}
.rpg-clue-meter b {
  color: #f1d184;
  font-variant-numeric: tabular-nums;
}
.rpg-hotspots {
  position: absolute;
  inset: 0;
  z-index: 4;
}
.rpg-hotspot {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transform: translate(-50%, -50%);
  border: 1px solid rgba(255, 247, 220, 0.46);
  border-radius: 999px;
  background: rgba(17, 24, 20, 0.48);
  color: #fff6df;
  padding: 7px 10px 7px 8px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 22px -12px rgba(0, 0, 0, 0.7);
  -webkit-backdrop-filter: blur(7px);
  backdrop-filter: blur(7px);
  transition: transform 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.rpg-hotspot:hover,
.rpg-hotspot.active {
  transform: translate(-50%, -50%) translateY(-2px);
  border-color: rgba(218, 185, 106, 0.88);
  background: rgba(78, 59, 28, 0.62);
}
.rpg-hotspot.collected {
  border-color: rgba(86, 160, 133, 0.62);
  background: rgba(28, 66, 55, 0.54);
}
.rpg-hotspot-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #e0bf68;
  box-shadow: 0 0 0 5px rgba(224, 191, 104, 0.16), 0 0 18px rgba(224, 191, 104, 0.42);
  animation: rpgHotspotPulse 2.2s ease-out infinite;
}
.rpg-hotspot.collected .rpg-hotspot-dot {
  background: #69b89e;
  box-shadow: 0 0 0 5px rgba(105, 184, 158, 0.16);
  animation: none;
}
.rpg-character-layer {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}
.rpg-npc {
  position: absolute;
  right: 4%;
  bottom: 136px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: min(30%, 360px);
  height: min(68%, 560px);
}
.rpg-npc img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: bottom center;
  mix-blend-mode: normal;
  opacity: 0.96;
  filter: contrast(1.02) saturate(0.98) drop-shadow(0 22px 26px rgba(0, 0, 0, 0.36));
  -webkit-mask-image: radial-gradient(ellipse at 50% 48%, #000 0%, #000 76%, rgba(0, 0, 0, 0.86) 88%, transparent 100%);
  mask-image: radial-gradient(ellipse at 50% 48%, #000 0%, #000 76%, rgba(0, 0, 0, 0.86) 88%, transparent 100%);
}
.rpg-npc.no-img {
  display: none;
}
.rpg-episode.mode-player .rpg-npc {
  opacity: 0.7;
  filter: saturate(0.9);
}
.rpg-dialogue {
  position: absolute;
  left: 4%;
  right: 4%;
  bottom: 22px;
  z-index: 8;
  min-height: 166px;
  border: 1px solid rgba(105, 78, 38, 0.5);
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(255, 251, 239, 0.96), rgba(236, 226, 202, 0.94)),
    rgba(246, 239, 222, 0.96);
  color: #241b12;
  padding: 34px 28px 22px;
  box-shadow:
    0 24px 70px -28px rgba(0, 0, 0, 0.82),
    inset 0 0 0 1px rgba(255, 255, 255, 0.44);
  animation: rpgDialogueIn 0.16s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.rpg-dialogue::before {
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(154, 123, 50, 0.18);
  border-radius: 11px;
  content: '';
  pointer-events: none;
}
.rpg-dialogue-npc {
  padding-top: 42px;
}
.rpg-dialogue-player {
  left: auto;
  right: 4%;
  width: min(720px, 66%);
  min-height: 150px;
  border-color: rgba(63, 125, 110, 0.38);
  background:
    linear-gradient(180deg, rgba(250, 248, 239, 0.96), rgba(229, 233, 219, 0.94)),
    rgba(246, 239, 222, 0.96);
  color: #1d2a24;
  padding-top: 34px;
}
.rpg-dialogue-player::before {
  border-color: rgba(63, 125, 110, 0.18);
}
.rpg-dialogue-narration {
  width: min(720px, 72%);
  min-height: 132px;
  border-color: rgba(255, 247, 220, 0.34);
  background:
    linear-gradient(180deg, rgba(29, 35, 29, 0.86), rgba(13, 19, 17, 0.88)),
    rgba(15, 21, 20, 0.88);
  color: #fff8e6;
}
.rpg-speaker-tab {
  position: absolute;
  left: 26px;
  top: -22px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 180px;
  border: 1px solid rgba(105, 78, 38, 0.5);
  border-radius: 10px 10px 6px 6px;
  background: linear-gradient(180deg, #9d5f38, #70401f);
  color: #fff6df;
  padding: 8px 13px;
  box-shadow: 0 12px 24px -18px rgba(0, 0, 0, 0.72);
}
.rpg-speaker-tab-npc {
  top: -31px;
  gap: 12px;
  padding: 8px 14px 8px 8px;
  background: linear-gradient(180deg, #8f5734, #65391e);
}
.rpg-speaker-tab-player {
  min-width: 168px;
  border-color: rgba(63, 125, 110, 0.36);
  background: linear-gradient(180deg, #edf1e3, #dfe7d8);
  color: #1f453b;
}
.rpg-speaker-tab-narration {
  border-color: rgba(255, 247, 220, 0.24);
  background: rgba(16, 21, 18, 0.82);
}
.rpg-speaker-avatar-mini {
  position: relative;
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid rgba(255, 247, 220, 0.54);
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 24%, rgba(255, 247, 220, 0.95), rgba(201, 157, 88, 0.42)),
    #6d4426;
  color: #fff6df;
  font-family: 'Ma Shan Zheng', 'Noto Serif SC', serif;
  font-size: 22px;
  line-height: 1;
  box-shadow: 0 10px 24px -16px rgba(0, 0, 0, 0.72);
}
.rpg-speaker-avatar-mini::after {
  content: attr(data-label);
}
.rpg-speaker-avatar-mini.has-img::after {
  display: none;
}
.rpg-speaker-avatar-mini img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}
.rpg-speaker-copy {
  display: grid;
  gap: 3px;
}
.rpg-record-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border: 1px solid rgba(63, 125, 110, 0.28);
  border-radius: 6px;
  background: rgba(255, 252, 244, 0.66);
  color: #2e6d5f;
  font-family: 'Ma Shan Zheng', 'Noto Serif SC', serif;
  font-size: 18px;
}
.rpg-speaker-tab strong {
  font-size: 15px;
  line-height: 1.1;
}
.rpg-speaker-tab span {
  color: rgba(255, 246, 223, 0.72);
  font-size: 11px;
}
.rpg-speaker-tab-player strong {
  color: #1f453b;
}
.rpg-speaker-tab-player span {
  color: rgba(31, 69, 59, 0.7);
}
.rpg-speaker-tab .rpg-speaker-avatar-mini {
  color: #fff6df;
  font-size: 22px;
}
.rpg-speaker-tab .rpg-record-mark {
  color: #2e6d5f;
  font-size: 18px;
}
.rpg-dialogue-copy {
  position: relative;
  z-index: 1;
  max-width: min(760px, 68%);
  display: grid;
  gap: 8px;
}
.rpg-dialogue-copy p {
  margin: 0;
  color: #2b2118;
  font-family: 'Noto Serif SC', serif;
  font-size: 17px;
  line-height: 1.85;
  text-wrap: pretty;
}
.rpg-clue-dialogue-copy {
  max-width: none;
  gap: 8px;
  padding-right: 148px;
  padding-bottom: 26px;
}
.rpg-clue-dialogue-copy p {
  white-space: normal;
}
.rpg-clue-line {
  display: block;
  margin-bottom: 7px;
  color: #2e6d5f;
  font-family: 'Noto Sans SC', sans-serif;
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0.02em;
}
.rpg-clue-lead {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 10px;
  color: #7a5427;
  font-size: 14px;
  font-weight: 840;
  line-height: 1.4;
  white-space: nowrap;
}
.rpg-clue-lead::before {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #c59b4a;
  box-shadow: 0 0 0 4px rgba(197, 155, 74, 0.14);
  content: '';
}
.rpg-dialogue-player .rpg-dialogue-copy {
  max-width: 100%;
}
.rpg-dialogue-player .rpg-dialogue-copy p {
  max-width: 100%;
  color: #24342d;
  font-size: 16px;
  line-height: 1.8;
}
.rpg-dialogue-narration .rpg-dialogue-copy p {
  color: rgba(255, 248, 230, 0.9);
}
.rpg-options {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 9px;
  max-width: min(760px, 72%);
  margin-top: 14px;
}
.rpg-dialogue-player .rpg-options {
  max-width: 100%;
}
.rpg-option {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(105, 78, 38, 0.28);
  border-radius: 9px;
  background: rgba(255, 252, 244, 0.68);
  padding: 10px 12px;
  color: #2b2118;
  cursor: pointer;
  text-align: left;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.rpg-option:hover:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(154, 96, 54, 0.62);
  background: #fff9e9;
}
.rpg-option span {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: rgba(154, 123, 50, 0.18);
  color: #6b4f1f;
  font-size: 12px;
  font-weight: 800;
}
.rpg-option b {
  font-size: 13px;
  font-weight: 750;
  line-height: 1.45;
}
.rpg-option.is-correct {
  border-color: rgba(63, 125, 110, 0.72);
  background: rgba(63, 125, 110, 0.12);
}
.rpg-option.is-correct span {
  background: #3f7d6e;
  color: #fffaf0;
}
.rpg-option.is-wrong {
  border-color: rgba(178, 58, 46, 0.68);
  background: rgba(178, 58, 46, 0.1);
}
.rpg-option.is-wrong span {
  background: #b23a2e;
  color: #fffaf0;
}
.rpg-option.locked {
  opacity: 0.52;
}
.rpg-dialogue-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
  z-index: 2;
}
.rpg-next-btn,
.rpg-ghost-btn {
  border-radius: 999px;
  padding: 10px 18px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 820;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, opacity 0.18s ease;
}
.rpg-next-btn {
  border: 1px solid rgba(105, 78, 38, 0.34);
  background: linear-gradient(180deg, #9d5f38, #7c4825);
  color: #fff6df;
  box-shadow: 0 12px 24px -18px rgba(0, 0, 0, 0.72);
}
.rpg-next-btn:hover:not(:disabled),
.rpg-ghost-btn:hover {
  transform: translateY(-1px);
}
.rpg-next-btn:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}
.rpg-ghost-btn {
  border: 1px solid rgba(105, 78, 38, 0.26);
  background: rgba(255, 252, 244, 0.66);
  color: #604524;
}
.rpg-clue-panel {
  position: absolute;
  left: 4%;
  bottom: 208px;
  z-index: 7;
  width: min(420px, 48%);
  border: 1px solid rgba(218, 185, 106, 0.38);
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255, 251, 239, 0.96), rgba(233, 224, 202, 0.94)),
    rgba(246, 239, 222, 0.96);
  padding: 14px 15px 15px;
  color: #261d14;
  box-shadow:
    0 18px 44px -24px rgba(0, 0, 0, 0.72),
    inset 0 0 0 1px rgba(255, 255, 255, 0.34);
  animation: rpgDialogueIn 0.16s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.rpg-clue-panel span {
  display: block;
  color: #3f7d6e;
  font-size: 11px;
  font-weight: 820;
  letter-spacing: 0.08em;
}
.rpg-clue-panel strong {
  display: block;
  margin-top: 3px;
  color: #6b4f1f;
  font-size: 16px;
}
.rpg-clue-panel p {
  margin: 8px 0 0;
  color: #2b2118;
  font-family: 'Noto Serif SC', serif;
  font-size: 13px;
  line-height: 1.65;
  text-wrap: pretty;
}
.rpg-reward-panel {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 8;
  display: grid;
  justify-items: center;
  width: min(520px, calc(100% - 36px));
  transform: translate(-50%, -50%);
  border: 1px solid rgba(218, 185, 106, 0.42);
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255, 251, 239, 0.96), rgba(236, 226, 202, 0.94)),
    rgba(246, 239, 222, 0.96);
  padding: 26px 28px 24px;
  color: #2b2118;
  text-align: center;
  box-shadow: 0 30px 86px -28px rgba(0, 0, 0, 0.82);
}
.rpg-reward-label {
  color: #8d6830;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
}
.rpg-reward-panel h2 {
  margin: 10px 0 4px;
  color: #6b4f1f;
  font-size: 28px;
}
.rpg-reward-panel p {
  margin: 10px 0 0;
  color: #3d3122;
  font-family: 'Noto Serif SC', serif;
  font-size: 15px;
  line-height: 1.8;
  text-align: left;
}
.rpg-reward-panel em {
  margin-top: 12px;
  color: #3f7d6e;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}
.rpg-reward-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}
@keyframes rpgHotspotPulse {
  0% { box-shadow: 0 0 0 0 rgba(224, 191, 104, 0.26), 0 0 18px rgba(224, 191, 104, 0.42); }
  100% { box-shadow: 0 0 0 14px rgba(224, 191, 104, 0), 0 0 18px rgba(224, 191, 104, 0.42); }
}
@keyframes rpgDialogueIn {
  from {
    opacity: 0.82;
    transform: translateY(7px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* 结算页 */
.ep-reward {
  text-align: center;
  padding: 10px 0;
  animation: fadeInUp 0.6s ease-out both;
}
.ep-reward-label {
  font-size: 11px;
  letter-spacing: 0.3em;
  color: #9a7b32;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.ep-badge {
  width: 110px;
  height: 110px;
  margin: 0 auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  background: radial-gradient(circle at 50% 38%,
    color-mix(in srgb, var(--ep-accent, #b23a2e) 28%, #fff),
    color-mix(in srgb, var(--ep-accent, #b23a2e) 8%, transparent));
  border: 2px solid var(--ep-accent, #b23a2e);
  box-shadow: 0 0 40px -6px var(--ep-accent, rgba(178, 58, 46, 0.6)), inset 0 2px 8px rgba(255, 255, 255, 0.4);
  animation: badgePop 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes badgePop {
  0% { transform: scale(0) rotate(-30deg); opacity: 0; }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}
.ep-badge-emoji,
.ep-badge .badge-emoji { font-size: 52px; }
.stamp-cell-badge .badge-emoji { font-size: 26px; }
.badge-art {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  line-height: 1;
}
.badge-art svg {
  display: block;
  width: 86%;
  height: 86%;
  filter: drop-shadow(0 4px 8px rgba(70, 55, 30, 0.18));
}
.ep-badge-art svg {
  width: 88px;
  height: 88px;
}
.ep-badge-name {
  font-size: 24px;
  color: #6b4f1f;
  margin-bottom: 8px;
}
.ep-onsite-tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 9999px;
  background: rgba(63, 125, 110, 0.15);
  border: 1px solid rgba(63, 125, 110, 0.4);
  color: #3f7d6e;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 16px;
}
.ep-insight {
  margin: 18px 0 4px;
  padding: 18px 20px;
  border-radius: 14px;
  background: rgba(154, 123, 50, 0.1);
  border: 1px solid rgba(154, 123, 50, 0.25);
  text-align: left;
}
.ep-insight-label {
  display: block;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: #9a7b32;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.ep-insight p {
  font-family: 'Ma Shan Zheng', 'Noto Serif SC', serif;
  font-size: 17px;
  line-height: 1.8;
  color: #3d3122;
}

/* —— 印章册弹窗 —— */
#stamp-modal {
  position: absolute;
  inset: 0;
  z-index: 58;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(40, 30, 16, 0.5);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
#stamp-modal.open {
  opacity: 1;
  pointer-events: auto;
}
.stamp-card {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: 86vh;
  overflow-y: auto;
  border-radius: 22px;
  border: 1px solid rgba(154, 123, 50, 0.35);
  background: linear-gradient(180deg, rgba(246, 239, 222, 0.99), rgba(235, 224, 197, 0.99));
  padding: 28px 30px 30px;
  box-shadow: 0 36px 90px -28px rgba(40, 30, 16, 0.75);
  transform: scale(0.95);
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
#stamp-modal.open .stamp-card { transform: scale(1); }
.stamp-card::-webkit-scrollbar { width: 5px; }
.stamp-card::-webkit-scrollbar-thumb {
  background: rgba(90, 77, 60, 0.35);
  border-radius: 3px;
}
.stamp-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 20px;
}
.stamp-seal {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  flex-shrink: 0;
  border-radius: 8px;
  background: linear-gradient(145deg, #d6453f, #b8332e);
  color: #fff;
  font-family: 'Ma Shan Zheng', 'Noto Serif SC', serif;
  font-size: 24px;
  box-shadow: 0 4px 14px rgba(207, 63, 57, 0.5);
}
.stamp-title {
  font-size: 24px;
  color: #6b4f1f;
}
.stamp-sub {
  font-size: 12px;
  color: #8a7a62;
  margin-top: 2px;
}
.stamp-total {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 22px;
}
.stamp-total-label {
  font-size: 11px;
  color: #6b5d48;
  letter-spacing: 0.1em;
}
.stamp-total-bar {
  flex: 1;
  height: 8px;
  border-radius: 9999px;
  background: rgba(90, 77, 60, 0.14);
  overflow: hidden;
}
.stamp-total-fill {
  height: 100%;
  border-radius: 9999px;
  background: linear-gradient(90deg, #9a7b32, #b5762a);
  transition: width 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.stamp-total-num {
  font-size: 13px;
  font-weight: 700;
  color: #b5762a;
  font-variant-numeric: tabular-nums;
}
.stamp-empty {
  text-align: center;
  font-size: 13px;
  color: #8a7a62;
  line-height: 1.7;
  padding: 20px;
}
.stamp-section { margin-bottom: 22px; }
.stamp-section-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}
.stamp-dot {
  width: 10px;
  height: 10px;
  border-radius: 9999px;
}
.stamp-section-title {
  font-size: 14px;
  font-weight: 600;
  color: #3d3122;
}
.stamp-section-prog {
  margin-left: auto;
  font-size: 12px;
  color: #8a7a62;
  font-variant-numeric: tabular-nums;
}
.stamp-section-prog.full { color: #b5762a; font-weight: 700; }
.stamp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 12px;
}
.stamp-cell {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 8px;
  border-radius: 14px;
  border: 1px solid rgba(154, 123, 50, 0.22);
  background: rgba(255, 252, 244, 0.5);
  cursor: pointer;
  outline: none;
  transition:
    transform 0.22s ease,
    border-color 0.22s ease,
    background 0.22s ease,
    box-shadow 0.22s ease;
}
.stamp-cell.earned {
  border-color: color-mix(in srgb, var(--cell-accent, #9a7b32) 50%, transparent);
  background: color-mix(in srgb, var(--cell-accent, #9a7b32) 8%, rgba(255, 252, 244, 0.6));
}
.stamp-cell.just-earned {
  z-index: 1;
  padding-top: 28px;
  border-color: color-mix(in srgb, var(--cell-accent, #b5762a) 70%, transparent);
  background:
    radial-gradient(circle at 50% 26%, color-mix(in srgb, var(--cell-accent, #b5762a) 16%, transparent), transparent 48%),
    color-mix(in srgb, var(--cell-accent, #b5762a) 10%, rgba(255, 252, 244, 0.78));
  box-shadow:
    0 12px 28px -16px rgba(70, 55, 30, 0.55),
    inset 0 0 0 1px color-mix(in srgb, var(--cell-accent, #b5762a) 24%, transparent);
  animation: stampFocusCard 1.8s cubic-bezier(0.22, 1, 0.36, 1) 0.18s both;
}
.stamp-cell.just-earned::before {
  content: '';
  position: absolute;
  inset: -7px;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--cell-accent, #b5762a) 42%, transparent);
  opacity: 0;
  pointer-events: none;
  animation: stampFocusRipple 1.8s cubic-bezier(0.22, 1, 0.36, 1) 0.24s both;
}
.stamp-new-label {
  position: absolute;
  left: 50%;
  top: 9px;
  z-index: 2;
  transform: translateX(-50%);
  border-radius: 999px;
  padding: 2px 7px;
  background: color-mix(in srgb, var(--cell-accent, #b5762a) 86%, #fff 14%);
  color: #fffaf0;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: 0.04em;
  white-space: nowrap;
  box-shadow: 0 5px 10px -7px rgba(61, 49, 34, 0.8);
}
.stamp-cell:hover,
.stamp-cell:focus-visible,
.stamp-cell.is-hovered {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--cell-accent, #9a7b32) 56%, transparent);
  background: color-mix(in srgb, var(--cell-accent, #9a7b32) 10%, rgba(255, 252, 244, 0.72));
  box-shadow:
    0 10px 22px -10px rgba(70, 55, 30, 0.5),
    inset 0 0 0 1px color-mix(in srgb, var(--cell-accent, #9a7b32) 18%, transparent);
}
.stamp-cell:active {
  transform: translateY(-1px) scale(0.99);
}
.stamp-cell-badge {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 9999px;
  font-size: 26px;
  background: rgba(255, 252, 244, 0.7);
  border: 1.5px solid rgba(154, 123, 50, 0.3);
  transition:
    opacity 0.22s ease,
    filter 0.22s ease,
    transform 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease;
}
.stamp-cell.earned .stamp-cell-badge {
  border-color: var(--cell-accent, #9a7b32);
  box-shadow: 0 0 16px -4px var(--cell-accent, rgba(154, 123, 50, 0.6));
}
.stamp-cell.just-earned .stamp-cell-badge {
  margin-top: 1px;
  animation: stampBadgePress 1.35s cubic-bezier(0.22, 1, 0.36, 1) 0.22s both;
}
.stamp-cell.locked .stamp-cell-badge {
  opacity: 0.45;
  filter: grayscale(0.6);
}
.stamp-cell:hover .stamp-cell-badge,
.stamp-cell:focus-visible .stamp-cell-badge,
.stamp-cell.is-hovered .stamp-cell-badge {
  opacity: 1;
  filter: none;
  transform: scale(1.05);
  border-color: color-mix(in srgb, var(--cell-accent, #9a7b32) 62%, rgba(154, 123, 50, 0.3));
  box-shadow: 0 0 18px -6px var(--cell-accent, rgba(154, 123, 50, 0.5));
}
.stamp-badge-art svg {
  width: 43px;
  height: 43px;
}
.stamp-lock {
  font-size: 24px;
  line-height: 1;
  transition: transform 0.22s ease;
}
.stamp-cell:hover .stamp-lock,
.stamp-cell:focus-visible .stamp-lock,
.stamp-cell.is-hovered .stamp-lock {
  transform: translateY(-1px) rotate(-5deg);
}
.stamp-onsite {
  position: absolute;
  right: -3px;
  bottom: -3px;
  font-size: 13px;
}
.stamp-cell-name {
  font-size: 11px;
  font-weight: 600;
  color: #6b4f1f;
  text-align: center;
  line-height: 1.3;
}
.stamp-cell.locked .stamp-cell-name { color: #a89878; }
.stamp-cell:hover .stamp-cell-name,
.stamp-cell:focus-visible .stamp-cell-name,
.stamp-cell.is-hovered .stamp-cell-name {
  color: #5f451b;
}
.stamp-cell-place {
  font-size: 10px;
  color: #8a7a62;
  text-align: center;
}

@keyframes stampFocusCard {
  0% { transform: translateY(0) scale(0.96); }
  38% { transform: translateY(-4px) scale(1.035); }
  100% { transform: translateY(0) scale(1); }
}
@keyframes stampFocusRipple {
  0% { opacity: 0; transform: scale(0.9); }
  28% { opacity: 0.58; }
  100% { opacity: 0; transform: scale(1.14); }
}
@keyframes stampBadgePress {
  0% { transform: scale(1.38) rotate(-5deg); filter: saturate(1.12); }
  38% { transform: scale(0.94) rotate(1deg); }
  100% { transform: scale(1) rotate(0); filter: saturate(1); }
}

@media (prefers-reduced-motion: reduce) {
  .stamp-cell.just-earned,
  .stamp-cell.just-earned::before,
  .stamp-cell.just-earned .stamp-cell-badge {
    animation: none;
  }
  .stamp-cell.just-earned {
    transform: none;
  }
}

/* —— 图层成就解锁贺卡 —— */
#achievement-card {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 62;
  transform: translate(-50%, -50%) scale(0.8);
  width: 340px;
  max-width: 86vw;
  padding: 32px 28px;
  border-radius: 22px;
  border: 1px solid var(--ach-accent, #9a7b32);
  background: linear-gradient(180deg, rgba(246, 239, 222, 0.99), rgba(235, 224, 197, 0.99));
  text-align: center;
  box-shadow: 0 30px 80px -20px rgba(40, 30, 16, 0.7);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}
#achievement-card.show {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}
.ach-inner { position: relative; z-index: 1; }
.ach-rays {
  position: absolute;
  inset: -60px;
  background: conic-gradient(from 0deg,
    transparent 0deg, color-mix(in srgb, var(--ach-accent, #9a7b32) 18%, transparent) 12deg,
    transparent 24deg, color-mix(in srgb, var(--ach-accent, #9a7b32) 18%, transparent) 36deg,
    transparent 48deg, color-mix(in srgb, var(--ach-accent, #9a7b32) 18%, transparent) 60deg,
    transparent 72deg);
  animation: spin 14s linear infinite;
  z-index: 0;
  opacity: 0.5;
}
.ach-trophy {
  font-size: 56px;
  animation: badgePop 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
.ach-title {
  font-size: 22px;
  color: #6b4f1f;
  margin-top: 8px;
}
.ach-theme {
  font-size: 18px;
  font-weight: 700;
  margin-top: 4px;
}
.ach-body {
  font-size: 13px;
  color: #5a4d3c;
  line-height: 1.7;
  margin-top: 10px;
}

/* —— 地理围栏到店提示 —— */
#geofence-toast {
  position: absolute;
  bottom: 90px;
  left: 50%;
  z-index: 56;
  transform: translateX(-50%) translateY(20px);
  display: flex;
  align-items: center;
  gap: 12px;
  width: 420px;
  max-width: 92vw;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(63, 125, 110, 0.45);
  background: linear-gradient(135deg, rgba(244, 237, 219, 0.98), rgba(228, 222, 200, 0.98));
  box-shadow: 0 20px 50px -16px rgba(40, 30, 16, 0.6);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
#geofence-toast.show {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}
body.compass-panel-open #geofence-toast.show {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(14px);
}
.gf-icon {
  font-size: 26px;
  flex-shrink: 0;
}
.gf-text { flex: 1; min-width: 0; }
.gf-title {
  font-size: 14px;
  font-weight: 600;
  color: #2b2118;
}
.gf-sub {
  font-size: 11px;
  color: #6b5d48;
  margin-top: 2px;
  line-height: 1.5;
}
.gf-btn {
  flex-shrink: 0;
  padding: 9px 14px;
  border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, #3f7d6e, #2f6256);
  color: #fff8e6;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease;
}
.gf-btn:hover { transform: translateY(-1px); }

/* —— 移动端适配 —— */
@media (max-width: 640px) {
  #compass-panel,
  #route-planner-panel { max-width: 100%; }
  .compass-card { padding: 16px; }
  .route-planner-card { padding: 16px; }
  .compass-title-main { font-size: 21px; }
  .compass-title-sub { font-size: 10px; }
  .route-planner-title { font-size: 21px; }
  .panel-want-card {
    grid-template-columns: 1fr;
  }
  .panel-want-card .want-toggle {
    width: 100%;
  }
  .route-plan-actions {
    justify-content: stretch;
  }
  .route-plan-actions {
    flex-direction: column;
    align-items: stretch;
  }
  .route-plan-actions .rt-plan-btn {
    width: 100%;
  }
  .route-recommend-card {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .route-recommend-copy em {
    white-space: normal;
  }
  .route-recommend-nav {
    justify-self: start;
  }
  .route-result-footer {
    grid-template-columns: 1fr;
  }
  .free-explore-entry {
    grid-template-columns: 1fr;
  }
  .free-explore-entry button {
    width: 100%;
  }
  .clue-complete-actions {
    flex-direction: column-reverse;
  }
  .clue-complete-actions button {
    width: 100%;
  }
  .episode-scroll { padding: 24px 20px 28px; }
  .episode-scroll.is-rpg-dialogue {
    width: calc(100vw - 14px);
    height: calc(100vh - 14px);
    max-height: calc(100vh - 14px);
    border-radius: 14px;
  }
  .episode-scroll.is-rpg-dialogue .episode-close {
    right: 12px;
    top: 12px;
  }
  .rpg-hud {
    left: 14px;
    top: 14px;
    width: calc(100% - 64px);
    gap: 6px;
  }
  .rpg-kicker {
    font-size: 10px;
  }
  .rpg-scene-title {
    font-size: 26px;
  }
  .rpg-act-title,
  .rpg-task,
  .rpg-clue-meter,
  .rpg-chapter {
    font-size: 10px;
  }
  .rpg-task {
    max-width: 100%;
  }
  .rpg-npc {
    right: -12%;
    bottom: 170px;
    width: 58%;
    height: 48%;
    opacity: 0.92;
  }
  .rpg-hotspot {
    padding: 8px;
  }
  .rpg-hotspot-label {
    display: none;
  }
  .rpg-dialogue {
    left: 10px;
    right: 10px;
    bottom: 10px;
    min-height: 210px;
    padding: 30px 15px 22px;
  }
  .rpg-dialogue-npc {
    padding-top: 38px;
  }
  .rpg-dialogue-player,
  .rpg-dialogue-narration {
    left: 10px;
    right: 10px;
    width: auto;
  }
  .rpg-speaker-tab {
    left: 16px;
    max-width: calc(100% - 32px);
  }
  .rpg-speaker-tab-npc {
    top: -26px;
  }
  .rpg-speaker-avatar-mini {
    width: 40px;
    height: 40px;
  }
  .rpg-speaker-tab .rpg-speaker-avatar-mini {
    font-size: 18px;
  }
  .rpg-record-mark {
    width: 25px;
    height: 25px;
  }
  .rpg-dialogue-copy {
    max-width: 100%;
    gap: 7px;
  }
  .rpg-dialogue-copy p {
    font-size: 15px;
    line-height: 1.75;
  }
  .rpg-clue-dialogue-copy {
    padding-right: 0;
    padding-bottom: 54px;
  }
  .rpg-clue-line {
    margin-bottom: 5px;
    font-size: 12px;
  }
  .rpg-clue-lead {
    display: flex;
    width: fit-content;
    margin: 0 0 3px;
    font-size: 13px;
    white-space: normal;
  }
  .rpg-options {
    grid-template-columns: 1fr;
    max-width: 100%;
    gap: 7px;
  }
  .rpg-dialogue-actions {
    justify-content: flex-end;
    margin-top: 10px;
  }
  .rpg-clue-panel {
    left: 10px;
    right: 10px;
    bottom: 232px;
    width: auto;
    max-height: 136px;
    overflow: auto;
    padding: 12px 13px;
  }
  .rpg-clue-panel strong {
    font-size: 14px;
  }
  .rpg-clue-panel p {
    font-size: 12px;
    line-height: 1.55;
  }
  .rpg-reward-panel {
    padding: 22px 18px 20px;
  }
  .rpg-reward-panel h2 {
    font-size: 24px;
  }
  .ep-title { font-size: 24px; }
  .ep-question { font-size: 19px; }
  #geofence-toast { bottom: 80px; }
}

@media (prefers-reduced-motion: reduce) {
  .rpg-dialogue,
  .rpg-clue-panel {
    animation: none;
  }
  .rpg-hotspot-dot {
    animation: none;
  }
  .bgm-toggle.is-playing .bgm-bars i {
    animation: none;
  }
}

/* ============================================================= */
/* ===== 主题吉祥物样式（古风可爱卡通角色）===================== */
/* ============================================================= */

/* 悬浮漂浮动画 */
@keyframes mascot-float {
  0%,  100% { transform: translateY(0px) rotate(0deg); }
  30%        { transform: translateY(-7px) rotate(1deg); }
  60%        { transform: translateY(-3px) rotate(-0.5deg); }
}

/* —— 副本 Intro 阶段吉祥物（无角色时全尺寸展示）—— */
.ep-mascot-intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 20px auto 12px;
  padding: 16px 20px 20px;
  background: rgba(255, 248, 220, 0.25);
  border-radius: 24px;
  border: 1px solid rgba(201, 168, 76, 0.22);
  max-width: 240px;
  backdrop-filter: blur(4px);
}

.ep-mascot-img {
  width: 130px;
  height: auto;
  object-fit: contain;
  animation: mascot-float 3.2s ease-in-out infinite;
  filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.12));
}

.ep-mascot-meta {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.ep-mascot-name {
  font-size: 17px;
  color: var(--ep-accent, #C9A84C);
  font-weight: 600;
  letter-spacing: 0.05em;
}

.ep-mascot-role {
  font-size: 11.5px;
  color: #8a7a62;
  letter-spacing: 0.12em;
}

.ep-mascot-speech {
  margin-top: 14px;
  background: rgba(255, 248, 220, 0.85);
  border-radius: 14px;
  padding: 8px 16px;
  font-size: 12.5px;
  color: #5a4d3c;
  text-align: center;
  border: 1px solid rgba(154, 123, 50, 0.25);
  line-height: 1.6;
  font-style: italic;
}

/* —— 印章册主题区块吉祥物小图 —— */
.stamp-section-mascot {
  width: 34px;
  height: 42px;
  object-fit: contain;
  margin-right: 8px;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.12));
  transition: transform 0.3s ease;
}

.stamp-section-mascot:hover {
  transform: scale(1.12) rotate(-3deg);
}

@keyframes fade-in-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ============================================================= */
/* ===== Phase 2「留下记忆」创建界面 — 移动端响应式 ============= */
/* ============================================================= */

@media (max-width: 768px) {
  .memory-create-media {
    min-height: 140px;
  }
  .memory-create-media-btn {
    font-size: 12px;
    padding: 8px 6px;
  }
  .memory-create-publish {
    font-size: 15px;
    padding: 12px;
  }
  .memory-create-voice-btn {
    font-size: 12px;
    padding: 7px 14px;
  }
  .memory-create-voice-timer {
    font-size: 12px;
  }
}

/* ============================================================= */
/* ===== Phase 3 好友系统样式 =================================== */
/* ============================================================= */

.friends-panel {
  position: absolute;
  top: 16px;
  right: 16px;
  bottom: 16px;
  display: flex;
  width: min(410px, calc(100vw - 32px));
  flex-direction: column;
  max-height: min(calc(100vh - 32px), 820px);
  overflow-y: auto;
  border: 1px solid rgba(154, 123, 50, 0.24);
  border-radius: 10px;
  background: #f7f4ec;
  padding: 22px;
  box-shadow: 0 18px 42px -26px rgba(43, 33, 24, 0.62);
  color: #171a20;
  z-index: 30;
}

.friend-detail-panel {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(380px, calc(100vw - 32px));
  max-height: min(600px, calc(100vh - 32px));
  overflow-y: auto;
  border: 1px solid rgba(154, 123, 50, 0.24);
  border-radius: 10px;
  background: #f7f4ec;
  padding: 22px;
  box-shadow: 0 18px 42px -26px rgba(43, 33, 24, 0.62);
  color: #171a20;
  z-index: 31;
}

.friends-panel .memory-panel-title,
.friend-detail-panel .memory-panel-title {
  margin: 0 0 18px;
  padding-right: 34px;
  color: #171a20;
  font-size: 18px;
  font-weight: 760;
}

.friend-section {
  margin-bottom: 22px;
}

.friend-section-title {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 600;
  color: #5a4d3c;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.friend-item,
.friend-request-item,
.friend-sent-item,
.friend-search-result-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(154, 123, 50, 0.1);
}

.friend-name {
  flex: 1;
  font-size: 15px;
  color: #171a20;
}

.friend-status-pending {
  font-size: 12px;
  color: #9a7b32;
}

.friend-empty {
  padding: 20px 0;
  text-align: center;
  font-size: 14px;
  color: #9a89c4;
}

.friend-add-form {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.friend-input {
  flex: 1;
  padding: 9px 12px;
  border: 1px solid rgba(154, 123, 50, 0.24);
  border-radius: 8px;
  background: #fffcf4;
  font-size: 14px;
  color: #171a20;
  outline: none;
}

.friend-input:focus {
  border-color: rgba(154, 123, 50, 0.48);
}

.friend-search-btn,
.friend-add-btn,
.friend-accept-btn,
.friend-reject-btn,
.friend-remove-btn {
  padding: 8px 14px;
  border: 1px solid rgba(154, 123, 50, 0.24);
  border-radius: 8px;
  background: #fffcf4;
  font-size: 13px;
  color: #5a4d3c;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.friend-search-btn:hover,
.friend-add-btn:hover,
.friend-accept-btn:hover {
  background: #f0e8d4;
  border-color: rgba(154, 123, 50, 0.4);
}

.friend-accept-btn {
  background: #d4a843;
  color: #fff;
  border-color: #d4a843;
}

.friend-reject-btn:hover,
.friend-remove-btn:hover {
  background: #f8e8e0;
  border-color: rgba(178, 58, 46, 0.3);
  color: #b23a2e;
}

.friend-search-error {
  display: block;
  padding: 8px 0;
  font-size: 13px;
  color: #b23a2e;
}

.friend-search-success {
  display: block;
  padding: 8px 0;
  font-size: 13px;
  color: #3f7d6e;
}

.friend-searching {
  display: block;
  padding: 8px 0;
  font-size: 13px;
  color: #9a7b32;
}

.friend-detail-panel .memory-detail-photo {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 14px;
}

.friend-detail-panel .memory-detail-note {
  font-size: 15px;
  line-height: 1.6;
  color: #171a20;
  margin: 0 0 8px;
}

.friend-detail-panel .memory-detail-time {
  font-size: 12px;
  color: #9a7b32;
}

.friend-feed-section {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid rgba(154, 123, 50, 0.16);
}

.friend-feed-title {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 600;
  color: #5a4d3c;
}

.friend-feed-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.friend-feed-card {
  flex-shrink: 0;
  width: 120px;
  cursor: pointer;
  border-radius: 8px;
  overflow: hidden;
  background: #fffcf4;
  border: 1px solid rgba(154, 123, 50, 0.16);
  transition: transform 0.15s;
}

.friend-feed-card:hover {
  transform: translateY(-2px);
}

.friend-feed-thumb {
  width: 100%;
  height: 80px;
  object-fit: cover;
  display: block;
}

.friend-feed-thumb-placeholder {
  width: 100%;
  height: 80px;
  background: linear-gradient(135deg, #e8d8b8, #d4c4a0);
}

.friend-feed-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 8px;
}

.friend-feed-name {
  font-size: 12px;
  font-weight: 600;
  color: #171a20;
}

.friend-feed-note {
  font-size: 11px;
  color: #5a4d3c;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#friends-request-count:not(:empty) {
  background: #b23a2e;
  color: #fff;
}

/* ===== 账户页面样式 ============================================ */
/* =============================================================== */
.account-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(30, 24, 18, 0.45);
  backdrop-filter: blur(4px);
  transition: opacity 0.3s ease;
}
.account-overlay.account-hidden {
  opacity: 0;
  pointer-events: none;
}
.account-content {
  width: min(400px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  border-radius: 14px;
  border: 1px solid rgba(154, 123, 50, 0.34);
  background:
    linear-gradient(180deg, rgba(247, 242, 228, 0.97), rgba(235, 224, 197, 0.98)),
    url('../public/textures/ink-paper.png');
  background-size: cover;
  background-blend-mode: multiply;
  box-shadow: 0 26px 64px rgba(43, 33, 24, 0.42);
  position: relative;
}
.account-card {
  padding: 34px 30px 32px;
  text-align: center;
  position: relative;
}
.account-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(154, 123, 50, 0.12);
  color: #5a4d3c;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  transition: background 0.18s;
}
.account-close:hover { background: rgba(154, 123, 50, 0.25); }
/* 首页选择 */
.account-actions { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.account-btn-primary {
  padding: 14px; border: 1px solid rgba(154, 123, 50, 0.5); border-radius: 10px;
  background: linear-gradient(180deg, #a9883c, #8a6f2b); color: #fff7e6;
  font-family: 'Ma Shan Zheng', 'Noto Serif SC', KaiTi, serif; font-size: 19px; letter-spacing: 0.12em;
  cursor: pointer; transition: background 0.18s;
}
.account-btn-primary:hover { background: linear-gradient(180deg, #b8963f, #94772e); }
.account-btn-guest {
  padding: 12px; border: 1px solid rgba(154,123,50,0.3); border-radius: 10px;
  background: rgba(255, 252, 244, 0.5); color: #5a4d3c; font-size: 15px; cursor: pointer; transition: background 0.18s;
}
.account-btn-guest:hover { background: rgba(154,123,50,0.1); }
.account-guest-hint { font-size: 12px; color: #8a7d6c; margin: 0; line-height: 1.6; }
/* 返回按钮 */
.account-back {
  position: absolute; top: 0; left: 0; width: 36px; height: 36px;
  border: none; border-radius: 50%; background: rgba(154,123,50,0.1);
  color: #5a4d3c; font-size: 18px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.account-back:hover { background: rgba(154,123,50,0.2); }
.account-hint { font-size: 12px; color: #8a7d6c; text-align: center; margin: 20px 0 0; line-height: 1.6; }
.account-seal {
  height: 72px;
  margin: 0 auto 20px;
  border-radius: 50%;
  background: #b23a2e;
  color: #fff4dc;
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(178, 58, 46, 0.3);
}
.account-title {
  font-size: 29px;
  font-weight: 500;
  color: #2b2118;
  margin: 0 0 8px;
  font-family: 'Ma Shan Zheng', 'Noto Serif SC', KaiTi, serif;
  letter-spacing: 0.06em;
}
.account-sub {
  font-size: 15px;
  color: #5a4d3c;
  margin: 0 0 36px;
}
.account-form {
  text-align: left;
}
.account-field {
  display: block;
  margin-bottom: 16px;
}
.account-field > span {
  display: block;
  font-size: 13px;
  color: #5a4d3c;
  margin-bottom: 6px;
}
.account-phone-row {
  display: flex;
  gap: 8px;
}
.account-phone-row select {
  width: 90px;
  padding: 12px 8px;
  border: 1px solid rgba(154, 123, 50, 0.3);
  border-radius: 8px;
  background: #fff;
  font-size: 15px;
  color: #2b2118;
}
.account-phone-row select:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.account-phone-row input,
.account-field input {
  flex: 1;
  padding: 12px;
  border: 1px solid rgba(154, 123, 50, 0.3);
  border-radius: 8px;
  background: #fff;
  font-size: 16px;
  color: #2b2118;
  width: 100%;
  box-sizing: border-box;
}
.account-phone-row input:read-only {
  opacity: 0.6;
}
.account-field input:focus {
  outline: none;
  border-color: rgba(154, 123, 50, 0.62);
  box-shadow: 0 0 0 2px rgba(154, 123, 50, 0.16);
}
.account-code-hint {
  font-size: 13px;
  color: #5a4d3c;
  margin: -8px 0 16px;
  text-align: center;
}
.account-link {
  border: none;
  background: none;
  color: #9a7b32;
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
  margin-left: 8px;
}
.account-link:hover {
  color: #6b4f1f;
}
.account-message {
  font-size: 13px;
  text-align: center;
  margin: 8px 0;
  color: #3f7d6e;
}
.account-error {
  color: #b23a2e;
}
.account-submit {
  width: 100%;
  padding: 14px;
  border: 1px solid rgba(154, 123, 50, 0.5);
  border-radius: 10px;
  background: linear-gradient(180deg, #a9883c, #8a6f2b);
  color: #fff7e6;
  font-family: 'Ma Shan Zheng', 'Noto Serif SC', KaiTi, serif;
  font-size: 19px;
  letter-spacing: 0.12em;
  cursor: pointer;
  transition: background 0.2s ease;
  margin-top: 8px;
}
.account-submit:hover {
  background: linear-gradient(180deg, #b8963f, #94772e);
}
.account-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}
.account-footer {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid rgba(154, 123, 50, 0.16);
}
.account-footer span {
  font-size: 12px;
  color: #8a7d6c;
  line-height: 1.6;
}

@media (max-width: 640px) {
  .account-card {
    padding: 24px 20px;
  }
  .account-title {
    font-size: 24px;
  }
  .account-seal {
    width: 60px;
    height: 60px;
    font-size: 18px;
  }
}

/* ============================================================= */
/* ===== Product polish: account / memory / friends ============= */
/* ============================================================= */

.account-overlay {
  background: rgba(15, 21, 20, 0.58);
  backdrop-filter: none;
  padding: 18px;
}

.account-content {
  width: min(720px, calc(100vw - 36px));
  max-height: calc(100vh - 36px);
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid rgba(247, 244, 236, 0.16);
  border-radius: 8px;
  background: #f7f4ec;
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.22);
}

.account-card {
  position: relative;
  min-height: 430px;
  padding: 38px 42px 34px 206px;
  text-align: left;
  color: #171a20;
}

.account-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 164px;
  content: "";
  background:
    radial-gradient(circle at 50% 34%, rgba(201, 168, 76, 0.18) 0 1px, transparent 2px 100%),
    linear-gradient(180deg, #171a20 0%, #101614 100%);
}

.account-card::after {
  position: absolute;
  left: 8px;
  top: 128px;
  width: 148px;
  height: 148px;
  border-radius: 50%;
  content: "";
  background:
    radial-gradient(circle at 50% 50%, rgba(201, 168, 76, 0.16) 0%, rgba(201, 168, 76, 0.07) 40%, transparent 62%),
    radial-gradient(circle at 50% 50%, transparent 57%, rgba(201, 168, 76, 0.15) 59% 61%, transparent 64%),
    radial-gradient(circle at 50% 50%, transparent 74%, rgba(201, 168, 76, 0.09) 76% 78%, transparent 82%);
  pointer-events: none;
}

.account-seal {
  position: absolute;
  left: 38px;
  top: 38px;
  width: 88px;
  height: 88px;
  margin: 0;
  border: 1px solid rgba(201, 168, 76, 0.72);
  border-radius: 6px;
  background:
    radial-gradient(120% 120% at 30% 22%, rgba(255, 255, 255, 0.16), transparent 46%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='88'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='88' height='88' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E"),
    linear-gradient(155deg, #c4463a 0%, #a5301f 62%, #8c1f13 100%);
  background-blend-mode: normal, soft-light, normal;
  color: #fff4dc;
  box-shadow: 0 8px 18px -6px rgba(120, 24, 12, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.14);
  font-family: "Ma Shan Zheng", "Noto Serif SC", serif;
  font-size: 21px;
  letter-spacing: 0;
  transform: rotate(-2deg);
}

.account-close,
.account-back {
  width: 34px;
  height: 34px;
  border: 1px solid rgba(154, 123, 50, 0.18);
  border-radius: 8px;
  background: rgba(255, 252, 244, 0.72);
  color: #393c41;
  font-size: 16px;
}

.account-close:hover,
.account-back:hover {
  background: #ece2cb;
}

.account-back {
  left: 182px;
  top: 24px;
}

.account-title {
  max-width: 430px;
  margin: 0 0 10px;
  color: #2b2118;
  font-family: 'Ma Shan Zheng', 'Noto Serif SC', KaiTi, serif;
  font-size: 27px;
  font-weight: 500;
  letter-spacing: 0.06em;
  line-height: 1.16;
  text-wrap: balance;
}

.account-sub {
  max-width: 420px;
  margin: 0 0 22px;
  color: #393c41;
  font-size: 14px;
  line-height: 1.65;
  text-wrap: pretty;
}

.account-benefits {
  display: grid;
  gap: 0;
  margin: 0 0 24px;
  border-top: 1px solid rgba(154, 123, 50, 0.18);
}

.account-benefits span {
  position: relative;
  display: flex;
  align-items: center;
  min-height: 38px;
  padding: 0 2px 0 22px;
  border-bottom: 1px solid rgba(154, 123, 50, 0.18);
  color: #393c41;
  font-size: 13px;
  line-height: 1.35;
}

.account-benefits span::before {
  position: absolute;
  left: 2px;
  top: 50%;
  width: 7px;
  height: 7px;
  margin-top: -4px;
  border-radius: 1px;
  background: #9a7b32;
  content: "";
  transform: rotate(45deg);
}

.account-actions {
  display: grid;
  gap: 10px;
  margin: 0;
}

.account-btn-primary,
.account-btn-guest,
.account-submit {
  min-height: 44px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 760;
  letter-spacing: 0.04em;
}

.account-btn-primary,
.account-submit {
  border: 1px solid rgba(154, 123, 50, 0.5);
  background: linear-gradient(180deg, #a9883c, #8a6f2b);
  color: #fff7e6;
  font-family: 'Ma Shan Zheng', 'Noto Serif SC', KaiTi, serif;
  font-size: 18px;
  letter-spacing: 0.12em;
}

.account-btn-primary:hover,
.account-submit:hover {
  background: linear-gradient(180deg, #b8963f, #94772e);
}

.account-btn-guest {
  border: 1px solid rgba(154, 123, 50, 0.26);
  background: rgba(255, 252, 244, 0.52);
  color: #393c41;
}

.account-btn-guest:hover {
  background: #ece2cb;
}

.account-guest-hint,
.account-switch-mode,
.account-hint {
  max-width: 420px;
  color: #5a4d3c;
  font-size: 12px;
  line-height: 1.55;
}

.account-form {
  display: grid;
  gap: 14px;
  max-width: 420px;
  text-align: left;
}

.account-field {
  display: grid;
  gap: 7px;
  margin: 0;
}

.account-field > span {
  margin: 0;
  color: #393c41;
  font-size: 12px;
  font-weight: 760;
}

.account-field input {
  min-height: 44px;
  border: 1px solid rgba(154, 123, 50, 0.24);
  border-radius: 8px;
  background: #fffcf4;
  color: #171a20;
  font-size: 14px;
}

.account-field input:focus {
  border-color: rgba(154, 123, 50, 0.6);
  box-shadow: 0 0 0 3px rgba(154, 123, 50, 0.16);
}

.account-message {
  margin: 0;
  text-align: left;
}

.account-link {
  color: #9a7b32;
  font-weight: 760;
  text-decoration: none;
}

.account-link:hover {
  color: #6b4f1f;
}

#memory-shell.memory-shell-open .memory-scrim {
  opacity: 0.72;
}

.memory-panel,
.friends-panel,
.friend-detail-panel {
  border: 1px solid rgba(154, 123, 50, 0.22);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 252, 244, 0.74), rgba(247, 244, 236, 0.96)),
    #f7f4ec;
  box-shadow: 0 6px 8px rgba(43, 33, 24, 0.16);
}

.memory-panel {
  width: min(432px, calc(100vw - 32px));
  padding: 20px;
}

.memory-panel-head {
  min-height: 38px;
  padding: 0 42px 14px 0;
  border-bottom: 1px solid rgba(154, 123, 50, 0.16);
}

.memory-panel-head h2,
.friends-panel .memory-panel-title,
.friend-detail-panel .memory-panel-title {
  color: #171a20;
  font-size: 18px;
  font-weight: 760;
  letter-spacing: 0;
  line-height: 1.22;
  text-wrap: balance;
}

.memory-panel-dot,
.anchor-memory-mark {
  border-radius: 3px;
  background: #d4a843;
  box-shadow: 0 0 0 4px rgba(212, 168, 67, 0.12);
  transform: rotate(45deg);
}

.memory-close {
  border-color: rgba(154, 123, 50, 0.2);
  border-radius: 8px;
  background: rgba(255, 252, 244, 0.82);
  color: #393c41;
  font-size: 18px;
}

.memory-close:hover {
  background: #ece2cb;
}

.memory-create-list-entry {
  margin: 12px 0 0;
  text-align: left;
}

.memory-create-list-entry button {
  min-height: 32px;
  border: 1px solid rgba(154, 123, 50, 0.16);
  border-radius: 8px;
  background: rgba(255, 252, 244, 0.6);
  padding: 0 10px;
  color: #5a4d3c;
  font-size: 12px;
  font-weight: 760;
  text-decoration: none;
}

.memory-create-list-entry button:hover {
  border-color: rgba(154, 123, 50, 0.32);
  color: #171a20;
}

.memory-create-quota {
  margin: 12px 0 0;
  border: 1px solid rgba(212, 168, 67, 0.22);
  border-radius: 8px;
  background: rgba(212, 168, 67, 0.1);
  padding: 8px 10px;
  color: #5a4d3c;
  text-align: left;
}

.memory-form,
.auth-form,
.memory-detail {
  gap: 13px;
  margin-top: 14px;
}

.memory-create-media {
  min-height: 206px;
  border: 1px solid rgba(154, 123, 50, 0.24);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 48%, transparent 0 44%, rgba(154, 123, 50, 0.12) 45% 46%, transparent 47%),
    linear-gradient(135deg, rgba(23, 26, 32, 0.08), transparent 46%),
    #ece2cb;
}

.memory-create-media::after {
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(255, 252, 244, 0.72);
  border-radius: 6px;
  content: "";
  pointer-events: none;
}

.memory-create-media-empty {
  max-width: 230px;
  color: #5a4d3c;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.45;
  text-align: center;
}

.memory-create-media-empty .ink-cam-icon {
  position: relative;
  width: 48px;
  height: 36px;
  border: 2px solid rgba(90, 77, 60, 0.72);
  border-radius: 8px;
  opacity: 1;
}

.memory-create-media-empty .ink-cam-icon::before {
  position: absolute;
  left: 13px;
  top: 8px;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(90, 77, 60, 0.72);
  border-radius: 50%;
  content: "";
}

.memory-create-media-empty .ink-cam-icon::after {
  position: absolute;
  left: 7px;
  top: -6px;
  width: 14px;
  height: 7px;
  border-radius: 4px 4px 0 0;
  background: rgba(90, 77, 60, 0.72);
  content: "";
}

.memory-create-media-preview,
.memory-detail-photo,
.memory-pinned-thumb {
  border-radius: 7px;
}

.memory-create-media-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.memory-create-media-btn {
  min-height: 38px;
  border-color: rgba(154, 123, 50, 0.22);
  border-radius: 8px;
  background: rgba(255, 252, 244, 0.66);
  color: #393c41;
  font-size: 13px;
  font-weight: 720;
}

.memory-create-media-btn:hover,
.memory-create-media-btn:focus-visible {
  border-color: rgba(62, 106, 225, 0.42);
  background: #fffcf4;
  color: #171a20;
}

.memory-create-voice {
  margin-top: 0;
}

.memory-create-voice-bar {
  flex-wrap: wrap;
  gap: 8px;
  border-color: rgba(154, 123, 50, 0.18);
  background: rgba(255, 252, 244, 0.54);
  padding: 10px;
}

.memory-create-voice-btn,
.memory-create-voice-play,
.memory-create-voice-delete {
  min-height: 34px;
  border-radius: 8px;
  font-weight: 720;
}

.memory-create-voice-btn {
  border: 1px solid rgba(154, 123, 50, 0.24);
  background: #9a7b32;
  color: #fff;
}

.memory-create-voice-btn.recording {
  background: #b23a2e;
}

.memory-create-voice-timer,
.memory-create-voice-max {
  color: #5a4d3c;
  font-size: 12px;
}

.memory-field > span {
  color: #393c41;
}

.memory-field textarea,
.memory-field input {
  background: #fffcf4;
}

.memory-meta-line,
.memory-detail-meta {
  border-top: 1px solid rgba(154, 123, 50, 0.12);
  padding-top: 10px;
  color: #5a4d3c;
}

.memory-create-publish {
  min-height: 46px;
  margin-top: 4px;
  border: 1px solid rgba(23, 26, 32, 0.18);
  border-radius: 8px;
  background: #171a20;
  color: #f7f4ec;
  font-size: 14px;
  font-weight: 780;
}

.memory-create-publish:hover {
  background: #252930;
}

.memory-create-publish:focus-visible,
.memory-primary:focus-visible,
.memory-danger:focus-visible,
.account-submit:focus-visible,
.account-btn-primary:focus-visible,
.account-btn-guest:focus-visible,
.friend-search-btn:focus-visible,
.friend-add-btn:focus-visible,
.friend-accept-btn:focus-visible,
.friend-reject-btn:focus-visible,
.friend-remove-btn:focus-visible {
  outline: 3px solid rgba(62, 106, 225, 0.2);
  outline-offset: 2px;
}

.memory-detail-photo {
  max-height: 390px;
}

.memory-detail-note {
  color: #171a20;
  font-size: 15px;
}

.memory-list {
  gap: 9px;
}

.memory-list-item {
  grid-template-columns: 58px minmax(0, 1fr);
  min-height: 70px;
  border-color: rgba(154, 123, 50, 0.16);
  background: rgba(255, 252, 244, 0.48);
}

.memory-list-item:hover {
  border-color: rgba(212, 168, 67, 0.5);
  background: #fffcf4;
}

.memory-list-item img,
.memory-list-thumb-fallback {
  width: 58px;
  height: 56px;
}

.memory-list-thumb-fallback {
  border-radius: 6px;
  background: rgba(212, 168, 67, 0.14);
}

.memory-pinned-view {
  align-items: stretch;
  padding: 14px 0 0;
  text-align: left;
}

.memory-pinned-note {
  color: #171a20;
  font-size: 16px;
}

.memory-pinned-coord {
  justify-content: flex-start;
  border: 1px solid rgba(154, 123, 50, 0.14);
  border-radius: 8px;
  background: rgba(255, 252, 244, 0.54);
  padding: 9px 10px;
}

.memory-pinned-mark {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: #d4a843;
  box-shadow: 0 0 0 4px rgba(212, 168, 67, 0.16);
  transform: rotate(45deg);
}

.memory-pinned-actions {
  grid-template-columns: 1fr 1fr;
}

.memory-pinned-another,
.memory-pinned-exit,
.memory-primary,
.memory-danger {
  border-radius: 8px;
}

.anchor-memory-section {
  margin-top: 18px;
}

.anchor-memory-cta {
  min-height: 50px;
  border-color: rgba(154, 123, 50, 0.2);
  border-radius: 8px;
  background: rgba(255, 252, 244, 0.56);
  color: #393c41;
}

.anchor-memory-cta:hover {
  border-color: rgba(212, 168, 67, 0.5);
  background: #fffcf4;
}

.anchor-memory-here h3,
.friend-section-title,
.friend-feed-title {
  color: #393c41;
  font-size: 12px;
  font-weight: 780;
  letter-spacing: 0;
  text-transform: none;
}

.friends-panel {
  width: min(432px, calc(100vw - 32px));
  padding: 20px;
}

.friends-panel .memory-panel-inner,
.friend-detail-panel .memory-panel-inner {
  display: grid;
  gap: 16px;
}

.friend-section {
  margin: 0;
  border-top: 1px solid rgba(154, 123, 50, 0.14);
  padding-top: 14px;
}

.friend-item,
.friend-request-item,
.friend-sent-item,
.friend-search-result-item {
  min-height: 46px;
  border-bottom-color: rgba(154, 123, 50, 0.1);
}

.friend-name {
  color: #171a20;
  font-size: 14px;
  font-weight: 650;
}

.friend-empty {
  border: 1px solid rgba(154, 123, 50, 0.14);
  border-radius: 8px;
  background: rgba(255, 252, 244, 0.48);
  color: #5a4d3c;
}

.friend-add-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.friend-input {
  min-height: 40px;
  border-color: rgba(154, 123, 50, 0.22);
  background: #fffcf4;
}

.friend-input:focus {
  border-color: rgba(62, 106, 225, 0.52);
  outline: none;
  box-shadow: 0 0 0 3px rgba(62, 106, 225, 0.12);
}

.friend-search-btn,
.friend-add-btn,
.friend-accept-btn,
.friend-reject-btn,
.friend-remove-btn {
  min-height: 38px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 760;
}

.friend-search-btn,
.friend-add-btn {
  border-color: rgba(62, 106, 225, 0.24);
  background: #3e6ae1;
  color: #fff;
}

.friend-search-btn:hover,
.friend-add-btn:hover {
  background: #345dc9;
}

.friend-accept-btn {
  border-color: rgba(63, 125, 110, 0.28);
  background: #3f7d6e;
  color: #fff;
}

.friend-reject-btn,
.friend-remove-btn {
  background: rgba(255, 252, 244, 0.5);
}

.friend-feed-card {
  width: 128px;
  border-radius: 8px;
  box-shadow: none;
}

.friend-detail-panel {
  border-radius: 8px;
}

@media (max-width: 820px) {
  .memory-panel,
  .friends-panel {
    top: auto;
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: auto;
    max-height: min(78vh, 620px);
    padding: 18px;
    transform: translateY(18px);
  }

  #memory-shell.memory-shell-open .memory-panel {
    transform: translateY(0);
  }

  #memory-shell.memory-mode-auth .memory-panel,
  #memory-shell.memory-mode-auth.memory-shell-open .memory-panel {
    top: auto;
    right: 12px;
    bottom: 12px;
    left: 12px;
    transform: translateY(0);
  }
}

@media (max-width: 640px) {
  .account-overlay {
    align-items: flex-end;
    padding: 12px;
  }

  .account-content {
    width: 100%;
    max-height: calc(100vh - 24px);
    overflow-y: auto;
  }

  .account-card {
    min-height: auto;
    padding: 128px 20px 24px;
  }

  .account-card::before {
    inset: 0 0 auto 0;
    width: auto;
    height: 102px;
  }

  .account-card::after {
    left: auto;
    right: 28px;
    top: 22px;
    width: 62px;
    height: 62px;
  }

  .account-seal {
    left: 22px;
    top: 22px;
    width: 62px;
    height: 62px;
    font-size: 17px;
  }

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

  .account-back {
    left: 98px;
    top: 24px;
  }

  .account-title {
    font-size: 22px;
  }

  .memory-create-media-actions {
    grid-template-columns: 1fr;
  }

  .friend-add-form {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .account-overlay,
  .memory-panel,
  .memory-pin-ripple,
  .friend-feed-card,
  .anchor-memory-cta {
    animation: none !important;
    transition: none !important;
  }
}

/* 移动端横屏（矮屏幕，本产品主要使用场景）：压缩账号卡布局，
   确保标题/表单/提交按钮完整可见，避免此前 overflow:hidden 裁切登录按钮 */
@media (max-height: 480px) and (orientation: landscape) {
  .account-content {
    max-height: calc(100vh - 20px);
  }
  .account-card {
    min-height: auto;
    padding: 20px 26px 20px 128px;
  }
  .account-card::before {
    width: 108px;
  }
  .account-card::after {
    left: -6px;
    top: 78px;
    width: 108px;
    height: 108px;
  }
  .account-seal {
    left: 22px;
    top: 22px;
    width: 64px;
    height: 64px;
    font-size: 16px;
  }
  .account-back {
    left: auto;
    right: 56px;
    top: 14px;
  }
  .account-close {
    top: 14px;
    right: 14px;
  }
  .account-title {
    max-width: none;
    margin-bottom: 6px;
    font-size: 20px;
  }
  .account-sub {
    margin-bottom: 12px;
  }
  .account-benefits {
    margin-bottom: 14px;
  }
  .account-benefits span {
    min-height: 30px;
  }
  .account-form {
    gap: 10px;
  }
  .account-actions {
    margin-top: 0;
  }
}

/* ============================================================= */
/* ===== 记忆模块 · 古风重做（宣纸 / 毛笔 / 朱砂 / 金点） ====== */
/* 目标：与 explore-launcher 毛笔按钮、stamp-card 宣纸弹窗、    */
/*       account-card 做旧卡视觉统一。覆盖前面的现代风格定义。   */
/* ============================================================= */

/* —— 1. 遮罩与面板底板：与路线规划面板统一风格 —— */
#memory-shell.memory-shell-open .memory-scrim {
  opacity: 0.6;
  background: rgba(28, 20, 10, 0.42);
}

.memory-panel {
  border: 1px solid rgba(23, 26, 32, 0.16);
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(247, 244, 236, 0.98), rgba(238, 231, 215, 0.98));
  box-shadow: 0 18px 34px -28px rgba(23, 26, 32, 0.72);
  padding: 20px;
}

/* —— 2. 栏目标题：朱砂书法印 + 毛笔标题 —— */
.memory-panel-head {
  min-height: 40px;
  padding: 0 40px 13px 0;
  border-bottom: 1px solid rgba(154, 123, 50, 0.22);
}

.memory-panel-dot {
  display: none; /* 旧圆点辉光标记不再使用 */
}

.memory-panel-seal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border-radius: 6px;
  background: linear-gradient(145deg, #d6453f, #b8332e);
  color: #fff5ea;
  font-family: 'Ma Shan Zheng', 'Noto Serif SC', KaiTi, serif;
  font-size: 18px;
  line-height: 1;
  box-shadow: 0 3px 10px rgba(178, 58, 46, 0.42);
  transform: rotate(-3deg);
}

.memory-panel-title,
.memory-panel-head h2 {
  margin: 0;
  color: #2b2118;
  font-family: 'Ma Shan Zheng', 'Noto Serif SC', KaiTi, serif;
  font-size: 21px;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.2;
}

/* 关闭按钮：淡墨描边 + 宣纸底 */
.memory-close {
  border: 1px solid rgba(154, 123, 50, 0.22);
  border-radius: 8px;
  background: rgba(255, 252, 244, 0.8);
  color: #5a4d3c;
  font-size: 18px;
}
.memory-close:hover {
  background: #ece2cb;
  color: #171a20;
}

/* —— 3. 文字层级：浓墨 / 次墨 / 淡墨 —— */
.memory-hint,
.memory-count,
.auth-message {
  margin: 12px 0 0;
  color: #5a4d3c;
  font-size: 13px;
  line-height: 1.6;
}

.memory-field > span {
  color: #5a4d3c;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.memory-field textarea,
.memory-field input,
.auth-phone-row select,
.auth-phone-row input {
  border: 1px solid rgba(154, 123, 50, 0.26);
  border-radius: 8px;
  background: rgba(255, 252, 244, 0.82);
  color: #2b2118;
  font: inherit;
  font-size: 14px;
}
.memory-field textarea:focus,
.memory-field input:focus,
.auth-phone-row select:focus,
.auth-phone-row input:focus {
  border-color: rgba(154, 123, 50, 0.6);
  box-shadow: 0 0 0 3px rgba(154, 123, 50, 0.16);
}

.memory-meta-line,
.memory-detail-meta {
  border-top: 1px solid rgba(154, 123, 50, 0.16);
  padding-top: 10px;
  color: #7a6a4a;
  font-size: 11px;
  line-height: 1.5;
}

/* —— 4. 按钮体系：去掉蓝/橙红，统一深墨 + 赭金 + 朱砂印 —— */
.memory-primary,
.memory-danger {
  min-height: 44px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
}
/* 主行动：赭金实心（等同印章册/账号主操作的非蓝古风色） */
.memory-primary {
  border: 1px solid rgba(154, 123, 50, 0.5);
  background: linear-gradient(180deg, #a9883c, #8a6f2b);
  color: #fff7e6;
}
.memory-primary:hover {
  background: linear-gradient(180deg, #b8963f, #94772e);
}
/* 危险：朱砂纸面（古风印红，不用刺眼纯红块） */
.memory-danger {
  border: 1px solid rgba(178, 58, 46, 0.42);
  background: rgba(178, 58, 46, 0.1);
  color: #9c3028;
}
.memory-danger:hover {
  background: rgba(178, 58, 46, 0.16);
}
.memory-danger-confirm {
  background: #b23a2e !important;
  color: #fff5ea !important;
  border-color: rgba(178, 58, 46, 0.7) !important;
  animation: memory-confirm-pulse 1s ease-in-out infinite;
}

/* —— 5. 创建界面：发帖式沉浸，宣纸框 + 笔触边 —— */
.memory-create-list-entry {
  margin: 12px 0 0;
  text-align: left;
}
.memory-create-list-entry button {
  min-height: 32px;
  border: 1px solid rgba(154, 123, 50, 0.18);
  border-radius: 8px;
  background: rgba(255, 252, 244, 0.6);
  padding: 0 10px;
  color: #5a4d3c;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}
.memory-create-list-entry button:hover {
  border-color: rgba(154, 123, 50, 0.36);
  color: #171a20;
}

.memory-create-quota {
  margin: 12px 0 0;
  border: 1px solid rgba(212, 168, 67, 0.28);
  border-radius: 8px;
  background: rgba(212, 168, 67, 0.12);
  padding: 9px 12px;
  color: #5a4d3c;
  font-size: 12px;
  text-align: left;
  line-height: 1.5;
}

.memory-create-media {
  position: relative;
  width: 100%;
  min-height: 200px;
  border: 1px solid rgba(154, 123, 50, 0.3);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 46%, transparent 0 43%, rgba(154, 123, 50, 0.14) 44% 45%, transparent 46%),
    linear-gradient(135deg, rgba(23, 26, 32, 0.08), transparent 46%),
    #ece2cb;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
}
/* 内宣纸描边（双线框，仿古画装裱） */
.memory-create-media::after {
  position: absolute;
  inset: 9px;
  border: 1px solid rgba(255, 252, 244, 0.72);
  border-radius: 6px;
  content: "";
  pointer-events: none;
}
.memory-create-media-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  max-width: 220px;
  color: #5a4d3c;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.5;
  text-align: center;
}
/* 水墨相机图标（墨线勾勒） */
.memory-create-media-empty .ink-cam-icon {
  position: relative;
  width: 48px;
  height: 36px;
  border: 2px solid rgba(90, 77, 60, 0.78);
  border-radius: 8px;
  opacity: 1;
}
.memory-create-media-empty .ink-cam-icon::before {
  position: absolute;
  left: 13px;
  top: 8px;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(90, 77, 60, 0.78);
  border-radius: 50%;
  content: "";
}
.memory-create-media-empty .ink-cam-icon::after {
  position: absolute;
  left: 7px;
  top: -6px;
  width: 14px;
  height: 7px;
  border-radius: 4px 4px 0 0;
  background: rgba(90, 77, 60, 0.78);
  content: "";
}
.memory-create-media-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 7px;
}

/* 媒体按钮：宣纸 + 淡墨描边 */
.memory-create-media-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.memory-create-media-btn {
  min-height: 38px;
  border: 1px solid rgba(154, 123, 50, 0.24);
  border-radius: 8px;
  background: rgba(255, 252, 244, 0.66);
  color: #393c41;
  font-size: 13px;
  font-weight: 720;
  cursor: pointer;
  transition: all 0.2s ease;
}
.memory-create-media-btn:hover,
.memory-create-media-btn:focus-visible {
  border-color: rgba(154, 123, 50, 0.5);
  background: #fffcf4;
  color: #171a20;
}
.memory-create-media-btn.active {
  border-color: #9a7b32;
  background: #fdf6e3;
  color: #6b4f1f;
}

/* —— 6. 语音条：改用赭金/朱砂，去除蓝色焦点 —— */
.memory-create-voice {
  margin-top: 0;
}
.memory-create-voice-bar {
  flex-wrap: wrap;
  gap: 8px;
  border: 1px solid rgba(154, 123, 50, 0.22);
  border-radius: 8px;
  background: rgba(255, 252, 244, 0.54);
  padding: 10px;
  min-height: 44px;
}
.memory-create-voice-btn,
.memory-create-voice-play,
.memory-create-voice-delete {
  min-height: 34px;
  border-radius: 8px;
  font-weight: 720;
}
/* 录音按钮：赭金（非蓝非红） */
.memory-create-voice-btn {
  border: 1px solid rgba(154, 123, 50, 0.3);
  background: #9a7b32;
  color: #fff7e6;
  padding: 0 16px;
  cursor: pointer;
  user-select: none;
}
/* 录音中：朱砂呼吸（替代原蓝/橙红发光脉冲） */
.memory-create-voice-btn.recording {
  background: #b23a2e;
  border-color: rgba(178, 58, 46, 0.6);
  animation: memory-voice-breath 1.4s ease-in-out infinite;
}
.memory-create-voice-timer,
.memory-create-voice-max {
  color: #5a4d3c;
  font-size: 12px;
}
.memory-create-voice-play {
  border: 1px solid rgba(154, 123, 50, 0.3);
  background: #fff;
  color: #5a4d3c;
  padding: 0 12px;
  cursor: pointer;
}
.memory-create-voice-delete {
  border: 1px solid rgba(178, 58, 46, 0.3);
  background: rgba(178, 58, 46, 0.08);
  color: #9c3028;
  padding: 0 12px;
  cursor: pointer;
}
@keyframes memory-voice-breath {
  0%, 100% { box-shadow: 0 0 0 0 rgba(178, 58, 46, 0.4); }
  50% { box-shadow: 0 0 0 10px rgba(178, 58, 46, 0); }
}

/* —— 7. 发布按钮「钉下记忆」：深墨底 + 朱砂镶边 + 毛笔字 —— */
.memory-create-publish {
  width: 100%;
  min-height: 50px;
  margin-top: 16px;
  border: 1px solid rgba(178, 58, 46, 0.5);
  border-radius: 8px;
  background: linear-gradient(180deg, #2b2118, #171a20);
  color: #f7f4ec;
  font-family: 'Ma Shan Zheng', 'Noto Serif SC', KaiTi, serif;
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 0.14em;
  cursor: pointer;
  transition: opacity 0.2s ease, filter 0.2s ease;
}
.memory-create-publish:hover {
  filter: brightness(1.14);
}
.memory-create-publish:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  filter: grayscale(0.4);
}
.memory-create-publish.ink-brush {
  background: transparent;
  color: #2b2118;
  border-color: rgba(154, 123, 50, 0.5);
}

/* —— 8. 列表 / 详情：宣纸卡片 + 菱形金点 —— */
.memory-detail-photo {
  width: 100%;
  max-height: 390px;
  border: 1px solid rgba(154, 123, 50, 0.22);
  border-radius: 8px;
  object-fit: cover;
}
.memory-detail-note {
  margin: 0;
  color: #2b2118;
  font-size: 15px;
  line-height: 1.7;
  overflow-wrap: anywhere;
}
.memory-list {
  display: grid;
  gap: 9px;
  margin-top: 16px;
}
.memory-list-item {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  min-height: 70px;
  border: 1px solid rgba(154, 123, 50, 0.18);
  border-radius: 8px;
  background: rgba(255, 252, 244, 0.52);
  padding: 7px;
  color: inherit;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.memory-list-item:hover {
  border-color: rgba(212, 168, 67, 0.55);
  background: #fffcf4;
  transform: translateY(-1px);
}
.memory-list-item img {
  width: 58px;
  height: 56px;
  border-radius: 6px;
  object-fit: cover;
}
.memory-list-thumb-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 56px;
  border-radius: 6px;
  background: rgba(212, 168, 67, 0.16);
  color: #8a7a5c;
  font-family: 'Ma Shan Zheng', 'Noto Serif SC', serif;
  font-size: 22px;
}
.memory-list-copy b {
  overflow: hidden;
  color: #2b2118;
  font-size: 13px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.memory-list-copy small {
  overflow: hidden;
  color: #7a6a4a;
  font-size: 11px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.memory-empty {
  border: 1px solid rgba(154, 123, 50, 0.2);
  border-radius: 8px;
  background: rgba(255, 252, 244, 0.55);
  padding: 18px;
  color: #5a4d3c;
  font-size: 13px;
  line-height: 1.6;
}

/* 详情页删除按钮（朱砂危险风格已统一定义在 .memory-danger） */
.memory-detail .memory-danger {
  width: 100%;
  margin-top: 4px;
}

/* —— 9. 登录/注册面板：古风账号卡风格 —— */
.auth-benefits {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  color: #4b4134;
  font-size: 13px;
  line-height: 1.5;
}
.auth-benefits span,
.auth-benefits p {
  position: relative;
  margin: 0;
  border: none;
  border-bottom: 1px solid rgba(154, 123, 50, 0.18);
  background: transparent;
  padding: 9px 2px 9px 22px;
}
.auth-benefits {
  border-top: 1px solid rgba(154, 123, 50, 0.18);
}
.auth-benefits span::before {
  position: absolute;
  left: 2px;
  top: 50%;
  width: 7px;
  height: 7px;
  margin-top: -4px;
  border-radius: 1px;
  background: #9a7b32;
  content: "";
  transform: rotate(45deg);
}
.auth-phone-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 8px;
}

/* —— 10. 锚点详情内的「留下记忆」CTA + 已有记忆 —— */
.anchor-memory-section {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}
.anchor-memory-cta {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 50px;
  border: 1px solid rgba(154, 123, 50, 0.3);
  border-radius: 9px;
  background:
    linear-gradient(180deg, rgba(255, 252, 244, 0.8), rgba(235, 224, 197, 0.74)),
    radial-gradient(circle at 8% 0%, rgba(212, 168, 67, 0.22), transparent 42%);
  padding: 10px 12px;
  color: #5f481b;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  text-align: left;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.anchor-memory-cta:hover {
  border-color: rgba(212, 168, 67, 0.6);
  transform: translateY(-1px);
  background: #fffcf4;
}
/* 小印章落款意象（替代原圆点辉光） */
.anchor-memory-mark {
  width: 16px;
  height: 16px;
  border-radius: 3px;
  background: linear-gradient(145deg, #d6453f, #b8332e);
  box-shadow: 0 2px 6px rgba(178, 58, 46, 0.4);
  transform: rotate(-3deg);
}
.anchor-memory-arrow {
  color: #9a7b32;
  font-size: 15px;
  transition: transform 0.2s ease;
}
.anchor-memory-cta:hover .anchor-memory-arrow {
  transform: translateX(3px);
}
.anchor-memory-here {
  display: grid;
  gap: 8px;
}
.anchor-memory-here h3 {
  margin: 0;
  color: #5a4d3c;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.anchor-memory-here button {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  border: 1px solid rgba(154, 123, 50, 0.18);
  border-radius: 8px;
  background: rgba(255, 252, 244, 0.5);
  padding: 6px;
  color: #3d3122;
  cursor: pointer;
  text-align: left;
}
.anchor-memory-here button:hover {
  border-color: rgba(212, 168, 67, 0.5);
  background: #fffcf4;
}
.anchor-memory-here img {
  width: 44px;
  height: 42px;
  border-radius: 6px;
  object-fit: cover;
}
.anchor-memory-here span {
  overflow: hidden;
  font-size: 12px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* —— 11. Pinned 成功视图：宣纸卡 + 菱形金点 + 毛笔按钮 —— */
.memory-pinned-view {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
  padding: 12px 0 0;
  text-align: left;
}
.memory-pinned-thumb {
  width: 100%;
  max-height: 220px;
  object-fit: cover;
  border: 1px solid rgba(154, 123, 50, 0.26);
  border-radius: 8px;
}
.memory-pinned-note {
  font-size: 15px;
  color: #2b2118;
  line-height: 1.65;
  margin: 0;
  padding: 0 4px;
  font-family: 'Noto Serif SC', 'Ma Shan Zheng', serif;
}
.memory-pinned-voice {
  width: 100%;
}
.memory-pinned-voice audio {
  width: 100%;
}
.memory-pinned-coord {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #5a4d3c;
  border: 1px solid rgba(154, 123, 50, 0.18);
  border-radius: 8px;
  background: rgba(255, 252, 244, 0.56);
  padding: 9px 10px;
}
/* 菱形金点（与地图金色菱形锚点呼应） */
.memory-pinned-mark {
  width: 11px;
  height: 11px;
  flex: 0 0 auto;
  border-radius: 2px;
  background: #d4a843;
  box-shadow: 0 0 0 4px rgba(212, 168, 67, 0.16);
  transform: rotate(45deg);
}
.memory-pinned-hint {
  font-size: 12.5px;
  color: #6b5d44;
  line-height: 1.6;
  margin: 0;
  padding: 9px 12px;
  background: rgba(212, 168, 67, 0.12);
  border-radius: 8px;
}
.memory-pinned-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  width: 100%;
  margin-top: 4px;
}
.memory-pinned-another {
  padding: 11px 16px;
  border: 1px solid rgba(154, 123, 50, 0.5);
  border-radius: 8px;
  background: rgba(255, 252, 244, 0.6);
  color: #6b4f1f;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s ease;
}
.memory-pinned-another:hover {
  background: rgba(212, 168, 67, 0.14);
}
.memory-pinned-exit {
  padding: 11px 16px;
  border: 1px solid rgba(178, 58, 46, 0.5);
  border-radius: 8px;
  background: linear-gradient(180deg, #2b2118, #171a20);
  color: #f7f4ec;
  font-family: 'Ma Shan Zheng', 'Noto Serif SC', KaiTi, serif;
  font-size: 16px;
  letter-spacing: 0.1em;
  cursor: pointer;
  transition: filter 0.2s ease;
}
.memory-pinned-exit:hover {
  filter: brightness(1.14);
}

/* 「继续浏览地图」按钮：水墨中性风格 */
.memory-pinned-browse {
  padding: 11px 16px;
  border: 1px solid rgba(154, 123, 50, 0.5);
  border-radius: 8px;
  background: rgba(255, 252, 244, 0.6);
  color: #5a4d3c;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s ease;
}
.memory-pinned-browse:hover {
  background: rgba(255, 252, 244, 0.9);
  border-color: rgba(154, 123, 50, 0.72);
}

/* pinned 模式三按钮布局 */
.memory-pinned-actions:has(.memory-pinned-browse) {
  grid-template-columns: 1fr;
  gap: 8px;
}

/* pinned 模式：shell 不拦截地图事件，用户可拖动地图 */
#memory-shell.memory-shell-transparent {
  pointer-events: none !important;
}
#memory-shell.memory-shell-transparent .memory-panel {
  pointer-events: auto;
}

/* 合并后的媒体区域：预览区 + 按钮合为一体 */
.memory-create-media-combined {
  position: relative;
  min-height: 150px;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(154, 123, 50, 0.24);
  border-radius: 8px;
  background:
    radial-gradient(circle at 50% 40%, transparent 0 44%, rgba(154, 123, 50, 0.08) 45% 46%, transparent 47%),
    linear-gradient(135deg, rgba(23, 26, 32, 0.06), transparent 46%),
    #ece2cb;
  overflow: hidden;
}
.memory-create-media-combined .memory-create-media-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 12px 8px;
  max-width: 100%;
  cursor: pointer;
}
.memory-create-media-combined .memory-create-media-preview {
  flex: 1;
  width: 100%;
  max-height: 180px;
  object-fit: cover;
  border-radius: 0;
}
.memory-create-media-combined .memory-create-media-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px 10px;
  margin-top: 0;
  border-top: 1px solid rgba(154, 123, 50, 0.14);
  background: rgba(255, 252, 244, 0.42);
}
.memory-create-media-combined .memory-create-media-btn {
  flex: 1;
  min-width: 70px;
  min-height: 34px;
  border: 1px solid rgba(154, 123, 50, 0.22);
  border-radius: 7px;
  background: rgba(255, 252, 244, 0.66);
  color: #393c41;
  font-size: 12.5px;
  font-weight: 720;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.memory-create-media-combined .memory-create-media-btn:hover,
.memory-create-media-combined .memory-create-media-btn:focus-visible {
  border-color: rgba(154, 123, 50, 0.48);
  background: #fffcf4;
  color: #171a20;
}

/* —— 12. 地图标记点辉光：收敛为克制金晕（去现代大辉光） —— */
.memory-pin-ripple {
  width: 16px;
  height: 16px;
  border: 2px solid rgba(212, 168, 67, 0.85);
  border-radius: 999px;
  animation: memory-pin-ripple 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* —— 13. 移动端：继承古风面板，仅调布局 —— */
@media (max-width: 640px) {
  .memory-panel {
    top: auto;
    right: 10px;
    bottom: 10px;
    left: 10px;
    width: auto;
    max-height: min(82vh, 680px);
    padding: 18px;
    transform: translateY(24px);
  }
  #memory-shell.memory-shell-open .memory-panel {
    transform: translateY(0);
  }
  #memory-shell.memory-mode-auth .memory-panel,
  #memory-shell.memory-mode-auth.memory-shell-open .memory-panel {
    right: 10px;
    bottom: 10px;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .memory-panel,
  .memory-create-media-btn,
  .memory-list-item,
  .anchor-memory-cta,
  .memory-pin-ripple,
  .memory-create-voice-btn.recording {
    animation: none !important;
    transition: none !important;
  }
  .memory-pin-ripple { opacity: 0; }
}
