@font-face {
  font-family: 'Caveat';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('./fonts/caveat-latin.woff2') format('woff2'),
       url('./fonts/caveat-bold.ttf') format('truetype');
}

/* ========================================================
   大程地理实验室 ✦ 静态手账风格核心样式库 (style.css)
   ======================================================== */

:root {
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --shadow-card: 0 8px 24px rgba(236, 64, 122, 0.05), 0 2px 6px rgba(0, 0, 0, 0.03);
  --shadow-hover: 0 14px 32px rgba(236, 64, 122, 0.1), 0 4px 10px rgba(0, 0, 0, 0.04);
  --text-main: #1F2937;       /* 深入清晰深灰，对比度极佳 */
  --text-muted: #4B5563;      /* 提升对比度至 > 7:1，告别模糊浅灰 */
  --text-light: #64748B;      /* 次级辅助文字，符合 WCAG AA */
  --primary-pink: #F06292;
  --primary-deep: #D81B60;
  --accent-purple: #D1B3E8;
  --accent-deep-purple: #9C27B0;
  --bg-warm: #FFF9FA;
  --bg-card: #FFFFFF;
  --tape-color: rgba(248, 187, 208, 0.75);
}

/* 基础重置 */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "WenQuanYi Micro Hei", sans-serif;
  background-color: var(--bg-warm);
  /* 调淡底纹对比度，避免干扰正文阅读 */
  background-image: radial-gradient(circle, rgba(243, 210, 220, 0.42) 1.2px, transparent 1.2px);
  background-size: 26px 26px;
  color: var(--text-main);
  min-height: 100vh; min-height: 100dvh;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* 键盘可访问性焦点指示器 */
:focus-visible {
  outline: 2.5px solid #EC407A !important;
  outline-offset: 3px !important;
}

/* 氛围漂浮点缀与蝴蝶（降低对正文干扰） */
.bg-ambient-particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  opacity: 0.75;
}

.sparkle {
  position: absolute;
  animation: floatSparkle 6s ease-in-out infinite alternate;
}

.sparkle-1 {
  top: 10%;
  left: 6%;
  animation-duration: 5s;
}

.sparkle-2 {
  top: 24%;
  right: 8%;
  animation-duration: 7s;
  animation-delay: 1s;
}

.sparkle-3 {
  bottom: 22%;
  left: 12%;
  animation-duration: 6.5s;
  animation-delay: 2s;
}

.butterfly-dec {
  position: absolute;
  top: 16%;
  right: 14%;
  animation: floatButterfly 8s ease-in-out infinite;
  opacity: 0.65;
}

@keyframes floatSparkle {
  0% { transform: translateY(0) scale(0.9); opacity: 0.4; }
  50% { transform: translateY(-10px) scale(1.05); opacity: 0.8; }
  100% { transform: translateY(-3px) scale(0.95); opacity: 0.5; }
}

@keyframes floatButterfly {
  0% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(-8px, -12px) rotate(-5deg); }
  50% { transform: translate(5px, -22px) rotate(3deg); }
  75% { transform: translate(10px, -10px) rotate(6deg); }
  100% { transform: translate(0, 0) rotate(0deg); }
}

/* 顶部品牌栏 */
.top-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 249, 250, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px dashed rgba(240, 98, 146, 0.25);
  box-shadow: 0 2px 10px rgba(240, 98, 146, 0.04);
}

.header-container {
  max-width: 880px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.brand-wrapper {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  gap: 10px;
}

.brand-signature {
  font-family: 'Caveat', 'Segoe Print', 'Bradley Hand', 'Comic Sans MS', cursive, sans-serif;
  font-size: 26px;
  font-weight: 700;
  color: var(--primary-deep);
  letter-spacing: 0.5px;
}

.brand-divider {
  width: 1px;
  height: 18px;
  background: #F8BBD0;
}

.brand-lab-name {
  font-size: 16px;
  font-weight: 700;
  color: #1F2937;
  letter-spacing: 0.5px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-badge {
  font-size: 12px;
  font-weight: 600;
  background: linear-gradient(135deg, #FCE4EC 0%, #F3E5F5 100%);
  color: #C2185B;
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid rgba(240, 98, 146, 0.25);
}

/* 顶部主站预告项（非交互元素） */
.header-main-site-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #4B5563;
  background: #FFFFFF;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px dashed rgba(209, 179, 232, 0.8);
  cursor: default;
  user-select: none;
}

.header-main-site-badge .tag-upcoming {
  font-size: 11px;
  font-weight: 700;
  background: #FFF0F5;
  color: #D81B60;
  padding: 1px 7px;
  border-radius: 10px;
}

/* 顶部主站链接（当开关启用时变为可用链接） */
.header-main-site-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  color: #C2185B;
  background: linear-gradient(135deg, #FCE4EC 0%, #F8BBD0 100%);
  padding: 5px 12px;
  border-radius: 20px;
  text-decoration: none;
  border: 1px solid rgba(240, 98, 146, 0.3);
  transition: all 0.2s ease;
}

.header-main-site-link:hover {
  background: linear-gradient(135deg, #EC407A 0%, #AB47BC 100%);
  color: #FFFFFF;
  box-shadow: 0 3px 10px rgba(236, 64, 122, 0.25);
}

/* 页面主容器（为底部悬浮栏与 safe-area 留足空隙） */
.page-container {
  max-width: 880px;
  margin: 0 auto;
  padding: 28px 20px calc(130px + env(safe-area-inset-bottom, 0px));
  position: relative;
  z-index: 1;
}

/* 手账标题区 */
.journal-hero {
  text-align: center;
  margin-bottom: 26px;
}

.journal-tagline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Caveat', 'Segoe Print', 'Bradley Hand', 'Comic Sans MS', cursive, sans-serif;
  font-size: 19px;
  font-weight: 700;
  color: #D81B60;
  background: #FFF0F5;
  padding: 4px 16px;
  border-radius: 20px;
  margin-bottom: 12px;
  border: 1px dashed #F8BBD0;
}

.journal-title {
  font-size: 32px;
  font-weight: 800;
  color: #1F2937;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.journal-subtitle {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 620px;
  margin: 0 auto;
}

/* 首页手账相框容器：按原始比例缩小、居中完整展示，无裁剪，父容器高度随图片自动撑开 */
.cover-frame {
  position: relative;
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(240, 98, 146, 0.24);
  box-shadow: var(--shadow-card);
  padding: 14px 14px 12px;
  margin: 0 auto 28px;
  max-width: 660px; /* 桌面端适度限制宽度居中，保证比例舒展协调 */
  width: 100%;
}

.cover-frame img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  margin-inline: auto;
  border-radius: 18px;
  object-fit: contain; /* 允许留白，确保原图完整显示，绝不拉伸、绝不裁剪 */
}

.cover-frame .washi-tape {
  top: -12px;
  right: 28px;
  transform: rotate(5deg);
}

.cover-caption {
  text-align: center;
  font-size: 13.5px;
  color: var(--text-muted);
  padding: 12px 8px 4px;
  font-weight: 500;
}

/* 和纸胶带元素 */
.washi-tape {
  position: absolute;
  top: -12px;
  width: 86px;
  height: 24px;
  background: var(--tape-color);
  backdrop-filter: blur(3px);
  border-left: 2px dashed rgba(255, 255, 255, 0.9);
  border-right: 2px dashed rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  z-index: 5;
  pointer-events: none;
}

/* 入口卡片网格 */
.portal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 22px;
  margin-bottom: 30px;
}

.journal-card {
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(240, 98, 146, 0.22);
  box-shadow: var(--shadow-card);
  padding: 24px 22px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 18px;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.journal-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(240, 98, 146, 0.45);
}

.journal-card .washi-tape {
  right: 28px;
  transform: rotate(4deg);
}

.card-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-deep);
  background: #FFF0F5;
  padding: 4px 12px;
  border-radius: 12px;
  margin-bottom: 14px;
}

.card-icon-wrap {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: linear-gradient(135deg, #F06292 0%, #F8BBD0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  margin-bottom: 14px;
  box-shadow: 0 5px 14px rgba(240, 98, 146, 0.24);
}

.card-title {
  font-size: 19px;
  font-weight: 700;
  color: #1F2937;
  margin-bottom: 8px;
}

.card-desc {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.6;
}

.card-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: linear-gradient(135deg, #FCE4EC 0%, #F8BBD0 100%);
  color: #C2185B;
  border-radius: 14px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  transition: all 0.2s ease;
  border: 1px solid rgba(240, 98, 146, 0.2);
}

.card-btn:hover {
  background: linear-gradient(135deg, #EC407A 0%, #F06292 100%);
  color: #FFFFFF;
  box-shadow: 0 5px 14px rgba(236, 64, 122, 0.25);
  transform: scale(1.01);
}

/* 首页主站预告卡片专属样式（非交互、无无效按钮） */
.preview-card {
  background: #FFFFFF;
  border: 1.5px dashed rgba(209, 179, 232, 0.7);
  box-shadow: 0 6px 20px rgba(209, 179, 232, 0.1);
  cursor: default;
}

.preview-card:hover {
  transform: none; /* 预告卡片不悬浮跳动 */
  box-shadow: 0 6px 20px rgba(209, 179, 232, 0.1);
  border-color: rgba(209, 179, 232, 0.9);
}

.preview-badge {
  color: #7B1FA2;
  background: #F3E5F5;
}

.preview-icon {
  background: linear-gradient(135deg, #D1B3E8 0%, #F8BBD0 100%);
  box-shadow: 0 5px 14px rgba(209, 179, 232, 0.35);
  color: #4A148C;
}

.card-status-pending {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 11px 16px;
  background: #F8FAFC;
  border: 1px dashed #CBD5E1;
  border-radius: 14px;
  color: #64748B;
  font-size: 13.5px;
  font-weight: 600;
  user-select: none;
}

/* 学习手账区 */
.memo-section {
  background: #FFFDF9;
  border: 1.5px dashed rgba(220, 180, 150, 0.7);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  position: relative;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.02);
}

.memo-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  color: #8D6E63;
  margin-bottom: 14px;
}

.memo-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.memo-list li {
  position: relative;
  padding-left: 24px;
  font-size: 14.5px;
  color: #374151;
  line-height: 1.65;
  word-break: break-word; /* 保证手机端文字自然折行，不截断 */
}

.memo-list li::before {
  content: "✦";
  position: absolute;
  left: 4px;
  top: 0;
  color: #EC407A;
  font-size: 13px;
}

/* 新闻卡片来源区域样式 */
.news-sources-wrap {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.source-item {
  display: inline-flex;
  align-items: center;
  font-size: 12.5px;
  color: #4B5563;
  background: #FDF2F8;
  padding: 3px 10px;
  border-radius: 8px;
  border: 1px solid rgba(244, 143, 177, 0.35);
  line-height: 1.4;
}

.source-name {
  font-weight: 600;
  color: #374151;
}

.source-divider {
  margin: 0 4px;
  color: #F48FB1;
  font-weight: bold;
}

.source-link {
  color: #D81B60;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  border-bottom: 1px dashed #D81B60;
  transition: all 0.2s ease;
}

.source-link:hover {
  color: #C2185B;
  border-bottom-style: solid;
  transform: translateY(-1px);
}

.source-pending {
  color: #64748B;
  font-size: 12px;
  font-style: normal;
  user-select: none;
}

/* 新闻卡片日期多层级显示 */
.news-date-group {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.news-card-updated {
  font-size: 11.5px;
  color: #94A3B8;
  font-weight: 500;
  user-select: none;
}

.news-card-date.date-topic,
.news-card-date.date-pending {
  font-size: 12.5px;
  font-family: inherit;
  color: #8D6E63;
  background: #FFF8E1;
  padding: 2px 8px;
  border-radius: 8px;
  border: 1px dashed #FFE082;
}

/* 底部主导航条（适配手机 safe-area 与 5 键自适应） */
.bottom-nav-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  justify-content: center;
  padding: 6px 10px calc(10px + env(safe-area-inset-bottom, 0px));
  pointer-events: none;
}

.bottom-nav-inner {
  pointer-events: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  padding: 4px 6px;
  border-radius: 40px;
  border: 1px solid rgba(240, 98, 146, 0.28);
  box-shadow: 0 10px 28px rgba(236, 64, 122, 0.12), 0 2px 8px rgba(0, 0, 0, 0.04);
  max-width: 96vw;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 20px;
  text-decoration: none;
  color: #4B5563;
  font-size: 12.5px;
  font-weight: 700;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  cursor: pointer;
  pointer-events: auto;
  user-select: none;
  white-space: nowrap;
}

.nav-link svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  transition: transform 0.2s ease;
}

.nav-link:hover {
  color: var(--primary-deep);
  background: #FFF0F5;
}

.nav-link:hover svg {
  transform: scale(1.12);
}

.nav-link.active {
  color: #FFFFFF;
  background: linear-gradient(135deg, #EC407A 0%, #AB47BC 100%);
  box-shadow: 0 4px 12px rgba(236, 64, 122, 0.32);
}

/* 通用手账卡片容器 */
.content-box {
  background: #ffffff;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(240, 98, 146, 0.22);
  box-shadow: var(--shadow-card);
  padding: 24px;
  margin-bottom: 24px;
  position: relative;
}

/* ========================================================
   思维导图原图导图查看器 & 双模式切换组件
   ======================================================== */

.view-mode-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.view-mode-tabs {
  display: inline-flex;
  background: #FFFFFF;
  padding: 4px;
  border-radius: 30px;
  border: 1.5px solid rgba(240, 98, 146, 0.3);
  box-shadow: 0 4px 14px rgba(236, 64, 122, 0.08);
  gap: 6px;
}

.mode-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 16px;
  border-radius: 20px;
  border: none;
  background: transparent;
  color: #4B5563;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
}

.mode-tab-btn:hover {
  color: var(--primary-deep);
  background: #FFF0F5;
}

.mode-tab-btn.active {
  background: linear-gradient(135deg, #EC407A 0%, #AB47BC 100%);
  color: #FFFFFF;
  box-shadow: 0 4px 12px rgba(236, 64, 122, 0.3);
}

.mode-tab-btn .tab-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.06);
  color: inherit;
}

.mode-tab-btn.active .tab-badge {
  background: rgba(255, 255, 255, 0.25);
  color: #FFFFFF;
}

/* 多子图切换胶囊 (如大气受热过程的完整导图/逆温专题图) */
.sub-image-tabs {
  display: inline-flex;
  align-items: center;
  background: #FFF0F5;
  padding: 3px;
  border-radius: 18px;
  border: 1px solid rgba(240, 98, 146, 0.28);
  gap: 4px;
}

.sub-image-btn {
  border: none;
  background: transparent;
  color: #C2185B;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 11px;
  border-radius: 14px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
}

.sub-image-btn:hover {
  background: rgba(236, 64, 122, 0.12);
}

.sub-image-btn.active {
  background: linear-gradient(135deg, #EC407A 0%, #AB47BC 100%);
  color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(236, 64, 122, 0.28);
}

/* 原图导图查看器容器 */
.svg-viewer-container {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.svg-viewport {
  position: relative;
  width: 100%;
  height: 560px;
  background-color: #FAFAFC;
  background-image: radial-gradient(circle, rgba(240, 98, 146, 0.2) 1.2px, transparent 1.2px);
  background-size: 22px 22px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(240, 98, 146, 0.25);
  overflow: hidden;
  cursor: grab;
  user-select: none;
  touch-action: none;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.03);
}

.svg-viewport.is-grabbing {
  cursor: grabbing !important;
}

.svg-canvas {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  will-change: transform;
  pointer-events: none;
}

.svg-canvas.smooth-transition {
  transition: transform 0.24s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.svg-canvas img {
  display: block;
  max-width: none;
  max-height: none;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
  object-fit: contain;
}

.zoom-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 700;
  color: #8D6E63;
  background: #FFF8E1;
  border: 1px solid #FFE082;
  border-radius: 14px;
  user-select: none;
}

.svg-viewer-tip {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: #64748B;
  background: #FFF9FA;
  padding: 8px 14px;
  border-radius: 12px;
  border: 1px dashed rgba(240, 98, 146, 0.25);
  line-height: 1.5;
}

.svg-viewer-tip strong {
  color: var(--primary-deep);
}

.svg-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
  gap: 14px;
  background: #FFFDF9;
  border-radius: var(--radius-md);
  border: 1.5px dashed #F8BBD0;
}

.svg-empty-icon {
  font-size: 40px;
}

.svg-empty-title {
  font-size: 16.5px;
  font-weight: 700;
  color: #1F2937;
}

.svg-empty-desc {
  font-size: 13.5px;
  color: #64748B;
  max-width: 440px;
  line-height: 1.6;
}

/* 全屏状态与全屏控制条统一优化 */
.graphics-fullscreen-wrapper:fullscreen,
.graphics-fullscreen-wrapper:-webkit-full-screen,
.svg-viewer-container:fullscreen,
.svg-viewer-container:-webkit-full-screen,
.html-map-container:fullscreen,
.html-map-container:-webkit-full-screen {
  background: #FFF9FA;
  padding: 16px;
  width: 100vw;
  height: 100vh; height: 100dvh;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.fullscreen-controls-bar {
  display: none;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid rgba(240, 98, 146, 0.3);
  box-shadow: 0 4px 16px rgba(236, 64, 122, 0.1);
  margin-bottom: 8px;
  z-index: 1000;
}

.graphics-fullscreen-wrapper:fullscreen .fullscreen-controls-bar,
.graphics-fullscreen-wrapper:-webkit-full-screen .fullscreen-controls-bar,
.svg-viewer-container:fullscreen .fullscreen-controls-bar,
.svg-viewer-container:-webkit-full-screen .fullscreen-controls-bar,
.html-map-container:fullscreen .fullscreen-controls-bar,
.html-map-container:-webkit-full-screen .fullscreen-controls-bar {
  display: flex;
}

.graphics-fullscreen-wrapper:fullscreen .svg-viewport,
.graphics-fullscreen-wrapper:-webkit-full-screen .svg-viewport,
.graphics-fullscreen-wrapper:fullscreen .html-map-frame-wrapper,
.graphics-fullscreen-wrapper:-webkit-full-screen .html-map-frame-wrapper,
.svg-viewer-container:fullscreen .svg-viewport,
.svg-viewer-container:-webkit-full-screen .svg-viewport,
.html-map-container:fullscreen .html-map-frame-wrapper,
.html-map-container:-webkit-full-screen .html-map-frame-wrapper {
  flex: 1;
  height: calc(100vh - 100px); height: calc(100dvh - 100px);
  border-radius: 16px;
  border: 2px solid #F8BBD0;
}

/* HTML 导图 iframe 嵌入查看器 (与 SVG 查看器高度、边框、暗纹完全一致) */
.html-map-container {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.html-map-frame-wrapper {
  position: relative;
  width: 100%;
  height: 560px;
  background-color: #FAFAFC;
  background-image: radial-gradient(circle, rgba(240, 98, 146, 0.2) 1.2px, transparent 1.2px);
  background-size: 22px 22px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(240, 98, 146, 0.25);
  overflow: hidden;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.03);
}

.html-map-iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
  background: transparent;
}

/* 响应式适配：移动端 (<768px) */
@media (max-width: 767px) {
  .page-container {
    padding: 20px 16px calc(120px + env(safe-area-inset-bottom, 0px));
  }
  .portal-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .journal-title {
    font-size: 28px;
  }
  .cover-frame {
    max-width: 100%;
    padding: 10px 10px 8px;
  }
  .svg-viewport {
    height: 420px;
  }
  .html-map-frame-wrapper {
    height: 420px;
  }
}

@media (max-width: 480px) {
  .header-container {
    padding: 10px 14px;
  }
  .brand-lab-name {
    font-size: 14px;
  }
  .brand-signature {
    font-size: 22px;
  }
  .journal-title {
    font-size: 24px;
  }
  .journal-subtitle {
    font-size: 14px;
  }
  .bottom-nav-inner {
    padding: 4px 6px;
    gap: 4px;
  }
  .nav-link {
    padding: 8px 12px;
    font-size: 13px;
    gap: 4px;
  }
  .nav-link svg {
    width: 16px;
    height: 16px;
  }
  .source-item {
    font-size: 12px;
    padding: 2px 8px;
  }
  .mode-tab-btn {
    padding: 6px 12px;
    font-size: 12.5px;
  }
  .svg-viewport {
    height: 350px;
  }
  .html-map-frame-wrapper {
    height: 350px;
  }
}

/* CSS 全屏后备模式 (针对 iOS Safari 等不支持原生 Fullscreen API 的移动端) */
.svg-viewer-container.is-css-fullscreen {
  position: fixed !important;
  inset: 0 !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important; height: 100dvh !important;
  z-index: 99999 !important;
  background: #FFF9FA !important;
  padding: 12px !important;
  box-sizing: border-box !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: space-between !important;
  margin: 0 !important;
}

.svg-viewer-container.is-css-fullscreen .fullscreen-controls-bar {
  display: flex !important;
}

.svg-viewer-container.is-css-fullscreen .svg-viewport {
  flex: 1 !important;
  height: calc(100vh - 90px) !important; height: calc(100dvh - 90px) !important;
  border-radius: 16px !important;
  border: 2px solid #F8BBD0 !important;
}

/* 手机横屏体验优化 (高度受限场景) */
@media (max-height: 500px) and (orientation: landscape) {
  .page-container {
    padding: 14px 16px calc(90px + env(safe-area-inset-bottom, 0px));
  }
  .journal-hero {
    margin-bottom: 14px;
  }
  .svg-viewport {
    height: 280px;
  }
  .mindmap-board {
    padding: 16px 14px;
    margin-bottom: 20px;
  }
}

/* ========================================================
   地理盲盒模块专属样式 (Geo Blind Box)
   ======================================================== */

/* 盲盒顶栏：统计与收藏入口 */
.blindbox-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.blindbox-progress-box {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: #FFFFFF;
  padding: 8px 16px;
  border-radius: 24px;
  border: 1px solid rgba(240, 98, 146, 0.25);
  box-shadow: 0 2px 10px rgba(236, 64, 122, 0.05);
}

.progress-text {
  font-size: 13.5px;
  font-weight: 700;
  color: #374151;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.progress-text strong {
  color: var(--primary-deep);
}

.progress-bar-track {
  width: 90px;
  height: 8px;
  background: #FCE4EC;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #F06292 0%, #AB47BC 100%);
  border-radius: 10px;
  transition: width 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  width: 0%;
}

.fav-drawer-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #FFFFFF;
  border: 1.5px solid rgba(240, 98, 146, 0.3);
  border-radius: 24px;
  color: #C2185B;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(236, 64, 122, 0.05);
  transition: all 0.2s ease;
  user-select: none;
}

.fav-drawer-btn:hover {
  background: #FFF0F5;
  border-color: #EC407A;
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(236, 64, 122, 0.15);
}

.fav-drawer-btn .fav-badge {
  background: #FCE4EC;
  color: #D81B60;
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 10px;
  font-weight: 800;
}

/* 分类筛选胶囊栏 */
.blindbox-category-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 4px 2px 14px;
  margin-bottom: 22px;
  scrollbar-width: thin;
  scrollbar-color: rgba(240, 98, 146, 0.3) transparent;
}

.blindbox-category-bar::-webkit-scrollbar {
  height: 4px;
}
.blindbox-category-bar::-webkit-scrollbar-thumb {
  background: rgba(240, 98, 146, 0.3);
  border-radius: 4px;
}

.cat-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: #FFFFFF;
  border: 1.5px solid rgba(240, 98, 146, 0.22);
  border-radius: 20px;
  color: #4B5563;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
}

.cat-pill-btn:hover {
  background: #FFF0F5;
  color: var(--primary-deep);
  border-color: rgba(240, 98, 146, 0.5);
  transform: translateY(-1px);
}

.cat-pill-btn.active {
  background: linear-gradient(135deg, #EC407A 0%, #AB47BC 100%);
  color: #FFFFFF;
  border-color: transparent;
  box-shadow: 0 4px 14px rgba(236, 64, 122, 0.28);
}

.cat-pill-btn .pill-count {
  font-size: 11px;
  background: rgba(0, 0, 0, 0.06);
  padding: 1px 6px;
  border-radius: 10px;
  font-weight: 700;
}

.cat-pill-btn.active .pill-count {
  background: rgba(255, 255, 255, 0.25);
  color: #FFFFFF;
}

/* 盲盒主舞台卡片 */
.blindbox-stage-card {
  position: relative;
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(240, 98, 146, 0.25);
  box-shadow: var(--shadow-card);
  padding: 32px 28px;
  min-height: 420px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  margin-bottom: 28px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.blindbox-stage-card .washi-tape-top {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%) rotate(-1deg);
  width: 100px;
  height: 24px;
  background: var(--tape-color);
  backdrop-filter: blur(3px);
  border-left: 2px dashed rgba(255, 255, 255, 0.9);
  border-right: 2px dashed rgba(255, 255, 255, 0.9);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  z-index: 5;
  pointer-events: none;
}

/* 1. 封闭盲盒状态 (Sealed Box) */
.box-state-sealed {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 18px;
  max-width: 480px;
  animation: boxFadeIn 0.35s ease;
}

.sealed-box-graphic {
  position: relative;
  width: 110px;
  height: 110px;
  background: linear-gradient(135deg, #FCE4EC 0%, #F3E5F5 100%);
  border: 2px dashed #F48FB1;
  border-radius: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 50px;
  box-shadow: 0 10px 28px rgba(236, 64, 122, 0.15);
  animation: floatBox 3.5s ease-in-out infinite;
}

@keyframes floatBox {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-8px) rotate(2deg); }
}

.sealed-box-title {
  font-size: 24px;
  font-weight: 800;
  color: #1F2937;
}

.sealed-box-desc {
  font-size: 15px;
  color: var(--text-muted);
  line-height: 1.6;
}

.btn-open-box {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 32px;
  background: linear-gradient(135deg, #EC407A 0%, #AB47BC 100%);
  color: #FFFFFF;
  border-radius: 30px;
  border: none;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(236, 64, 122, 0.32);
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
}

.btn-open-box:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 10px 26px rgba(236, 64, 122, 0.42);
}

.btn-open-box:active {
  transform: translateY(-1px) scale(0.98);
}

/* 2. 猜一猜问题状态 (Question State) */
.box-state-question {
  width: 100%;
  max-width: 680px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: boxFlipIn 0.4s ease;
}

.card-meta-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.meta-category-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #FFF0F5;
  color: #D81B60;
  padding: 5px 14px;
  border-radius: 14px;
  font-size: 13px;
  font-weight: 700;
  border: 1px solid rgba(240, 98, 146, 0.25);
}

.meta-status-tags {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tag-first-seen {
  font-size: 11.5px;
  font-weight: 700;
  background: linear-gradient(135deg, #FFF9C4 0%, #FFE082 100%);
  color: #8D6E63;
  padding: 3px 10px;
  border-radius: 12px;
  border: 1px solid #FFE082;
}

.tag-revisit {
  font-size: 11.5px;
  font-weight: 600;
  background: #F1F5F9;
  color: #64748B;
  padding: 3px 10px;
  border-radius: 12px;
}

.question-prompt-box {
  background: #FFFDF9;
  border: 2px dashed rgba(244, 143, 177, 0.6);
  border-radius: var(--radius-md);
  padding: 26px 22px;
  text-align: center;
  position: relative;
}

.question-header-hint {
  font-size: 13px;
  font-weight: 700;
  color: #D81B60;
  margin-bottom: 12px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.question-headline {
  font-size: 22px;
  font-weight: 800;
  color: #1F2937;
  line-height: 1.5;
  letter-spacing: 0.3px;
}

.question-sub-hint {
  margin-top: 14px;
  font-size: 14px;
  color: var(--text-muted);
}

.question-action-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 8px;
  flex-wrap: wrap;
}

.btn-reveal-answer {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: linear-gradient(135deg, #EC407A 0%, #AB47BC 100%);
  color: #FFFFFF;
  border-radius: 28px;
  border: none;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 5px 18px rgba(236, 64, 122, 0.3);
  transition: all 0.22s ease;
  user-select: none;
}

.btn-reveal-answer:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(236, 64, 122, 0.4);
}

.btn-draw-other {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 11px 22px;
  background: #FFFFFF;
  border: 1.5px solid rgba(240, 98, 146, 0.35);
  border-radius: 28px;
  color: #C2185B;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.btn-draw-other:hover {
  background: #FFF0F5;
  transform: translateY(-2px);
}

/* 3. 已揭晓状态 (Revealed State) */
.box-state-revealed {
  width: 100%;
  max-width: 680px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: boxExpandIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.revealed-question-title {
  font-size: 18px;
  font-weight: 800;
  color: #374151;
  padding-bottom: 12px;
  border-bottom: 1px dashed rgba(240, 98, 146, 0.25);
}

.revealed-answer-lead {
  font-size: 16.5px;
  font-weight: 700;
  color: #D81B60;
  line-height: 1.5;
  margin-bottom: 8px;
}

.revealed-explanation {
  font-size: 15px;
  color: #374151;
  line-height: 1.75;
  background: #FFFDF9;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border-left: 4px solid #EC407A;
}

/* 地理原理手账印章 */
.geo-principle-stamp {
  position: relative;
  background: linear-gradient(135deg, #FFF9FA 0%, #FDF2F8 100%);
  border: 1.5px dashed #EC407A;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  box-shadow: 0 4px 14px rgba(236, 64, 122, 0.05);
}

.stamp-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 800;
  color: #FFFFFF;
  background: linear-gradient(135deg, #EC407A 0%, #AB47BC 100%);
  padding: 2px 10px;
  border-radius: 12px;
  margin-bottom: 8px;
}

.stamp-content {
  font-size: 14.5px;
  font-weight: 700;
  color: #1F2937;
  line-height: 1.65;
}

/* 来源出处模块 */
.geo-source-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #F8FAFC;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid #E2E8F0;
  font-size: 13px;
  flex-wrap: wrap;
}

.source-label {
  color: #64748B;
  font-weight: 500;
}

.source-link-out {
  color: #D81B60;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border-bottom: 1px dashed #D81B60;
  transition: all 0.2s ease;
}

.source-link-out:hover {
  color: #C2185B;
  border-bottom-style: solid;
}

/* 揭晓后底部操作栏 */
.revealed-action-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px dashed rgba(240, 98, 146, 0.25);
  flex-wrap: wrap;
}

.btn-fav-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: #FFFFFF;
  border: 1.5px solid rgba(240, 98, 146, 0.35);
  border-radius: 24px;
  color: #C2185B;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  user-select: none;
}

.btn-fav-toggle:hover {
  background: #FFF0F5;
  border-color: #EC407A;
}

.btn-fav-toggle.is-faved {
  background: #FCE4EC;
  border-color: #EC407A;
  color: #D81B60;
}

.btn-fav-toggle.is-faved svg {
  fill: #E91E63;
  stroke: #E91E63;
}

.btn-draw-next {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 24px;
  background: linear-gradient(135deg, #EC407A 0%, #AB47BC 100%);
  color: #FFFFFF;
  border-radius: 26px;
  border: none;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(236, 64, 122, 0.25);
  transition: all 0.22s ease;
  user-select: none;
}

.btn-draw-next:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(236, 64, 122, 0.35);
}

/* 动效 */
@keyframes boxFadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

@keyframes boxFlipIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes boxExpandIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 收藏夹模态弹窗 / 抽屉 */
.fav-modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(5px);
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.fav-modal-overlay.active {
  display: flex;
}

.fav-modal-card {
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 620px;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
  border: 2px solid #F8BBD0;
  overflow: hidden;
  animation: boxFlipIn 0.25s ease;
}

.fav-modal-header {
  padding: 16px 20px;
  border-bottom: 1px dashed rgba(240, 98, 146, 0.25);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #FFF9FA;
}

.fav-modal-title {
  font-size: 17px;
  font-weight: 800;
  color: #D81B60;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.fav-modal-close {
  background: none;
  border: none;
  font-size: 24px;
  line-height: 1;
  color: #94A3B8;
  cursor: pointer;
  padding: 4px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.fav-modal-close:hover {
  color: #D81B60;
  background: #FFF0F5;
}

.fav-modal-body {
  padding: 18px 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: calc(80vh - 120px);
}

.fav-item-card {
  background: #FFFDF9;
  border: 1px solid rgba(240, 98, 146, 0.2);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: all 0.2s ease;
}

.fav-item-card:hover {
  border-color: #EC407A;
  box-shadow: 0 4px 12px rgba(236, 64, 122, 0.08);
}

.fav-item-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.fav-item-cat {
  font-size: 12px;
  font-weight: 700;
  color: #D81B60;
  background: #FFF0F5;
  padding: 2px 8px;
  border-radius: 10px;
}

.fav-item-question {
  font-size: 14.5px;
  font-weight: 700;
  color: #1F2937;
  line-height: 1.45;
}

.fav-item-principle {
  font-size: 13px;
  color: #4B5563;
  line-height: 1.5;
  background: #FFFFFF;
  padding: 8px 12px;
  border-radius: 8px;
  border-left: 3px solid #EC407A;
}

.fav-item-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

.fav-btn-view {
  font-size: 12.5px;
  font-weight: 700;
  color: #EC407A;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}

.fav-btn-view:hover {
  background: #FFF0F5;
}

.fav-btn-remove {
  font-size: 12.5px;
  font-weight: 600;
  color: #94A3B8;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}

.fav-btn-remove:hover {
  color: #EF4444;
  background: #FEE2E2;
}

.fav-empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #94A3B8;
  font-size: 14px;
}

.fav-empty-state .empty-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

/* 简易 Toast 浮动提示 */
.geo-toast {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(-20px);
  background: rgba(31, 41, 55, 0.92);
  color: #FFFFFF;
  backdrop-filter: blur(8px);
  padding: 10px 22px;
  border-radius: 30px;
  font-size: 13.5px;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.geo-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ========================================================
   首页改版：双栏 Hero & 拍立得手账照片 & 4 核心模块 2x2 网格
   ======================================================== */

/* 双栏 Hero 容器 */
.hero-split-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
  background: #FFFFFF;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(240, 98, 146, 0.24);
  box-shadow: var(--shadow-card);
  padding: 24px 28px;
  position: relative;
  overflow: hidden;
}

.hero-split-section::before {
  content: "";
  position: absolute;
  top: -40px;
  right: -40px;
  width: 140px;
  height: 140px;
  background: radial-gradient(circle, rgba(248, 187, 208, 0.35) 0%, transparent 70%);
  pointer-events: none;
}

/* 左侧文案栏 (55%~60%) */
.hero-text-col {
  flex: 1 1 58%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.hero-tagline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Caveat', 'Segoe Print', 'Bradley Hand', 'Comic Sans MS', cursive, sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: #D81B60;
  background: #FFF0F5;
  padding: 3px 12px;
  border-radius: 16px;
  border: 1px dashed #F8BBD0;
  letter-spacing: 0.3px;
}

.hero-main-title {
  font-size: 30px;
  font-weight: 800;
  color: #1F2937;
  letter-spacing: 0.5px;
  line-height: 1.25;
  margin-top: 2px;
}

.hero-subtitle {
  font-size: 15px;
  font-weight: 700;
  color: #D81B60;
  line-height: 1.45;
}

.hero-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.55;
  margin-top: 2px;
  margin-bottom: 6px;
}

/* Hero 主站引流按钮 */
.hero-mainsite-mount {
  display: inline-flex;
  align-items: center;
  margin-top: 4px;
}

.hero-mainsite-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  font-weight: 700;
  padding: 7px 16px;
  border-radius: 20px;
  text-decoration: none;
  transition: all 0.22s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
}

.hero-mainsite-btn.active-link {
  background: linear-gradient(135deg, #EC407A 0%, #AB47BC 100%);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(236, 64, 122, 0.28);
  border: 1px solid transparent;
}

.hero-mainsite-btn.active-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(236, 64, 122, 0.38);
}

.hero-mainsite-btn.pending-badge {
  background: #FFFDF9;
  border: 1.5px dashed rgba(209, 179, 232, 0.85);
  color: #7B1FA2;
  cursor: default;
}

.hero-mainsite-btn.pending-badge .pulse-dot {
  width: 7px;
  height: 7px;
  background: #EC407A;
  border-radius: 50%;
  display: inline-block;
  margin-left: 2px;
  animation: pulseDot 1.8s infinite;
}

@keyframes pulseDot {
  0%, 100% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.3); opacity: 1; box-shadow: 0 0 8px rgba(236, 64, 122, 0.8); }
}

/* 右侧拍立得小卡片 (40%~45%) */
.hero-character-col {
  flex: 0 0 auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

.polaroid-card {
  position: relative;
  background: #FFFFFF;
  border-radius: 20px;
  border: 1.5px solid rgba(240, 98, 146, 0.3);
  box-shadow: 0 8px 22px rgba(236, 64, 122, 0.12), 0 2px 6px rgba(0, 0, 0, 0.04);
  padding: 8px 8px 6px;
  width: 155px;
  transform: rotate(1.8deg);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.polaroid-card:hover {
  transform: rotate(0deg) translateY(-3px) scale(1.02);
  box-shadow: 0 12px 28px rgba(236, 64, 122, 0.2);
}

.polaroid-tape {
  position: absolute;
  top: -9px;
  left: 50%;
  transform: translateX(-50%) rotate(-2deg);
  width: 56px;
  height: 18px;
  background: rgba(248, 187, 208, 0.85);
  backdrop-filter: blur(2px);
  border-left: 2px dashed rgba(255, 255, 255, 0.9);
  border-right: 2px dashed rgba(255, 255, 255, 0.9);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
  z-index: 5;
  pointer-events: none;
}

.polaroid-img-wrap {
  width: 100%;
  height: 175px;
  border-radius: 14px;
  overflow: hidden;
  background: #FFF0F5;
  display: flex;
  align-items: center;
  justify-content: center;
}

.polaroid-img-wrap img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.polaroid-caption {
  text-align: center;
  font-size: 11.5px;
  font-family: 'Caveat', 'Segoe Print', 'Bradley Hand', cursive, sans-serif;
  font-weight: 700;
  color: #C2185B;
  padding: 5px 2px 2px;
  letter-spacing: 0.2px;
}

/* ========================================================
   四大核心模块 2x2 网格
   ======================================================== */
.core-modules-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.module-card {
  position: relative;
  background: #FFFFFF;
  border-radius: 18px;
  border: 1.5px solid rgba(240, 98, 146, 0.24);
  box-shadow: var(--shadow-card);
  padding: 18px 16px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  text-decoration: none;
  color: inherit;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow: hidden;
}

.module-card:hover {
  transform: translateY(-4px);
  border-color: rgba(240, 98, 146, 0.6);
  box-shadow: 0 10px 24px rgba(236, 64, 122, 0.16), 0 2px 8px rgba(0, 0, 0, 0.04);
}

.module-card:hover .module-icon-box svg {
  transform: scale(1.12);
}

.module-card .module-tape {
  position: absolute;
  top: -8px;
  right: 18px;
  width: 48px;
  height: 16px;
  background: var(--tape-color);
  border-left: 1.5px dashed rgba(255, 255, 255, 0.9);
  border-right: 1.5px dashed rgba(255, 255, 255, 0.9);
  transform: rotate(3deg);
  pointer-events: none;
}

.module-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.module-index {
  font-family: 'Caveat', 'Segoe Print', cursive, sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: #EC407A;
  background: #FFF0F5;
  padding: 1px 8px;
  border-radius: 10px;
}

.module-icon-box {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  background: linear-gradient(135deg, #FCE4EC 0%, #F8BBD0 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #D81B60;
  box-shadow: 0 3px 10px rgba(240, 98, 146, 0.18);
  transition: transform 0.25s ease;
}

.module-icon-box svg {
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.module-card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.module-title {
  font-size: 16.5px;
  font-weight: 800;
  color: #1F2937;
  letter-spacing: 0.2px;
}

.module-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.45;
}

.module-arrow-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 8px;
  border-top: 1px dashed rgba(240, 98, 146, 0.2);
  font-size: 12px;
  font-weight: 700;
  color: #C2185B;
}

.module-arrow-row svg {
  transition: transform 0.2s ease;
}

.module-card:hover .module-arrow-row svg {
  transform: translateX(3px);
}

/* 移动端与 5 键底部导航全端响应式 (<768px) */
@media (max-width: 767px) {
  .top-header .header-container {
    padding: 8px 12px;
    gap: 6px;
  }
  .brand-signature {
    font-size: 20px;
  }
  .brand-lab-name {
    font-size: 13.5px;
  }
  .brand-badge {
    font-size: 11px;
    padding: 2px 8px;
  }
  .header-main-site-badge {
    font-size: 11px;
    padding: 2px 6px;
    gap: 4px;
  }
  .header-main-site-badge .tag-upcoming {
    font-size: 10px;
    padding: 1px 5px;
  }

  /* Hero 双栏在手机端改为精致纵向堆叠，彻底消除右侧溢出 */
  .hero-split-section {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 18px 14px;
    gap: 16px;
    margin-bottom: 16px;
  }
  .hero-text-col {
    flex: none;
    width: 100%;
    align-items: center;
    text-align: center;
  }
  .hero-main-title {
    font-size: 23px;
  }
  .hero-subtitle {
    font-size: 13.5px;
  }
  .hero-desc {
    font-size: 12px;
    line-height: 1.5;
  }
  .hero-mainsite-mount {
    justify-content: center;
    width: 100%;
  }
  .hero-mainsite-btn {
    font-size: 12px;
    padding: 5px 14px;
  }
  .hero-character-col {
    width: 100%;
    justify-content: center;
  }
  .polaroid-card {
    width: 138px;
    padding: 6px 6px 4px;
    transform: rotate(0.8deg);
  }
  .polaroid-img-wrap {
    height: 145px;
  }

  /* 4 核心模块 2x2 网格紧凑适配 390px */
  .core-modules-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 16px;
  }
  .module-card {
    padding: 12px 10px 8px;
    gap: 6px;
    border-radius: 14px;
  }
  .module-index {
    font-size: 12px;
    padding: 1px 6px;
  }
  .module-icon-box {
    width: 34px;
    height: 34px;
    border-radius: 10px;
  }
  .module-icon-box svg {
    width: 18px;
    height: 18px;
  }
  .module-title {
    font-size: 14.5px;
  }
  .module-desc {
    font-size: 12.5px;
    line-height: 1.35;
  }
  .module-arrow-row {
    font-size: 11px;
    padding-top: 6px;
  }

  /* 猜谜页副顶栏与标题适配 */
  .quiz-sub-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 14px 6px;
  }
  .quiz-page-title {
    font-size: 20px;
  }
  #passport-btn {
    font-size: 12px;
    padding: 6px 12px;
  }
}

@media (max-width: 767px) {
  .page-container {
    padding: 16px 12px calc(90px + env(safe-area-inset-bottom, 0px));
  }
  .bottom-nav-bar {
    padding: 0 4px max(8px, env(safe-area-inset-bottom, 8px)) !important;
  }
  .bottom-nav-inner {
    padding: 3px 4px !important;
    gap: 2px !important;
    max-width: calc(100vw - 10px) !important;
    justify-content: center !important;
  }
  .nav-link {
    padding: 5px 7px !important;
    font-size: 11.5px !important;
    gap: 3px !important;
    border-radius: 16px !important;
  }
  .nav-link svg {
    width: 14.5px !important;
    height: 14.5px !important;
  }
}

@media (max-width: 480px) {
  .bottom-nav-inner {
    padding: 2px 2px !important;
    gap: 1px !important;
  }
  .nav-link {
    padding: 4px 4px !important;
    font-size: 10.5px !important;
    gap: 2px !important;
  }
  .nav-link svg {
    width: 13px !important;
    height: 13px !important;
  }
}

/* ========================================================
   地理猜谜模块专属样式 (Geo Mystery Quiz)
   ======================================================== */

.quiz-page-body {
  background-color: var(--bg-warm);
  min-height: 100vh; min-height: 100dvh;
  position: relative;
}

.quiz-sub-header {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 20px 8px;
  max-width: 1200px;
  margin: 0 auto;
  gap: 12px;
}

.quiz-title-box {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.quiz-tagline {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12.5px;
  font-weight: 700;
  color: #D81B60;
  background: #FFF0F5;
  padding: 2px 10px;
  border-radius: 12px;
  width: fit-content;
  border: 1px dashed #F8BBD0;
}

.quiz-page-title {
  font-size: 24px;
  font-weight: 800;
  color: #1F2937;
  letter-spacing: 1px;
}

.quiz-sub-desc {
  font-size: 13px;
  color: var(--text-muted);
}

.quiz-main-container {
  padding-bottom: calc(90px + env(safe-area-inset-bottom, 0px)) !important;
}


:root{
  --bg:#FFF9F7; --cream:#FFFDF9; --pink-50:#FCEEF3;
  --rose:#E96B9A; --pink:#F58BB0; --lav:#E8DDF5;
  --ink:#3F3940; --gray:#8D858B;
  --sage:#9DBE9F; --sage-bg:#EFF6EE;
  --coral:#E8938B; --coral-bg:#FDF0EE;
  --card-shadow:0 8px 24px rgba(233,107,154,.10), 0 2px 6px rgba(63,57,64,.06);
  --radius:18px;
}



.mono{font-family:"SF Mono","Roboto Mono",Consolas,monospace;letter-spacing:.5px;}
.hand{font-family:"Chalkboard SE","Comic Sans MS","STKaiti","KaiTi","Kaiti SC",cursive;}
#bg-decor{position:fixed;inset:0;z-index:0;pointer-events:none;opacity:.5;}
#bg-decor svg{width:100%;height:100%;}
#topbar{position:relative;z-index:5;display:flex;align-items:center;justify-content:space-between;padding:14px 22px 10px;max-width:1200px;margin:0 auto;}
#btn-back{border:1px solid #F3D9E4;background:var(--cream);color:var(--rose);border-radius:999px;padding:8px 16px;font-size:14px;cursor:pointer;box-shadow:0 2px 8px rgba(233,107,154,.08);transition:transform .15s;}
#btn-back:active{transform:scale(.96);}
#title-wrap{text-align:center;}
#title-wrap h1{font-size:22px;letter-spacing:3px;}
#title-wrap .sub{font-size:12px;color:var(--gray);margin-top:2px;letter-spacing:1px;}
#title-wrap .en{font-size:10px;color:#C9BFD2;letter-spacing:4px;margin-top:2px;}
#passport-btn{display:flex;align-items:center;gap:8px;border:1px solid #F3D9E4;background:var(--cream);border-radius:999px;padding:8px 14px;font-size:13px;color:var(--ink);cursor:pointer;box-shadow:0 2px 8px rgba(233,107,154,.08);transition:transform .15s;}
#passport-btn:active{transform:scale(.96);}
#passport-btn .badge{background:var(--rose);color:#fff;font-size:11px;border-radius:999px;padding:1px 8px;}
#progress-wrap{max-width:1200px;margin:0 auto;padding:0 22px;position:relative;z-index:5;}
#progress-line{display:flex;justify-content:space-between;font-size:12px;color:var(--gray);margin-bottom:6px;}
#progress-bar{height:4px;background:#F6E3EC;border-radius:999px;overflow:hidden;}
#progress-fill{height:100%;width:0%;background:linear-gradient(90deg,var(--pink),var(--rose));border-radius:999px;transition:width .5s ease;}

/* 桌面端弹性双栏布局（防溢出） */
#main{
  position:relative;
  z-index:5;
  display:flex;
  gap:24px;
  max-width:1200px;
  width:100%;
  margin:10px auto 0;
  padding:0 22px;
  height:calc(100vh - 128px); height: calc(100dvh - 128px);
  min-height:0;
  box-sizing:border-box;
}
#quiz-panel{
  flex:0 0 420px;
  max-width:45%;
  display:flex;
  flex-direction:column;
  min-width:0;
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
  padding:6px 4px 24px;
  scrollbar-width:thin;
}
#globe-panel{
  flex:1 1 0;
  position:relative;
  min-width:0;
  min-height:0;
  border-radius:26px;
  overflow:hidden;
  background:linear-gradient(160deg,#FFFDF9 0%,#FCEEF3 45%,#F1EAF9 100%);
  border:1px solid #F6E2EC;
  box-shadow:var(--card-shadow);
}
#globe-canvas-wrap{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  touch-action:none;
  overflow:hidden;
}
#globe-canvas-wrap canvas{
  position:absolute;
  top:0;
  left:0;
  width:100% !important;
  height:100% !important;
  display:block;
  touch-action:none;
}

.task-card{background:var(--cream);border-radius:var(--radius);border:1px solid #F6E2EC;box-shadow:var(--card-shadow);padding:22px 22px 20px;position:relative;}
.task-card::before{content:"";position:absolute;top:-12px;left:50%;transform:translateX(-50%) rotate(-2deg);width:96px;height:24px;background:rgba(245,139,176,.28);border-left:1px dashed rgba(255,255,255,.7);border-right:1px dashed rgba(255,255,255,.7);border-radius:2px;}
.task-no{display:inline-block;font-size:12px;letter-spacing:2px;color:#fff;background:linear-gradient(90deg,var(--pink),var(--rose));padding:4px 14px;border-radius:999px;margin-bottom:4px;}
.task-type{display:inline-block;font-size:12px;color:var(--rose);border:1px solid #F3C9DB;border-radius:999px;padding:3px 10px;margin-left:8px;background:#FFF5F9;}
.task-diff{float:right;font-size:12px;color:#C9A24B;letter-spacing:1px;text-align:right;}
.task-diff small{display:block;font-size:11.5px;color:var(--gray);letter-spacing:0;}
.task-riddle{font-size:17px;line-height:2;margin:12px 0 4px;clear:both;}
.task-riddle p{margin-bottom:2px;}
.task-visual{margin:12px 0;border-radius:14px;overflow:hidden;border:1px dashed #EFC6D8;background:#FFF8FB;min-height:110px;display:flex;align-items:center;justify-content:center;position:relative;padding:10px;}
.task-visual .cap{position:absolute;bottom:6px;right:10px;font-size:11.5px;color:var(--gray);letter-spacing:1px;}
.task-visual svg{max-width:100%;height:auto;display:block;}
.coord-big{font-size:25px;color:var(--ink);text-align:center;padding:14px 8px;}
.coord-big small{display:block;font-size:12px;color:var(--gray);margin-top:6px;letter-spacing:2px;}
#clue-box{margin-top:10px;}
.clue{display:flex;gap:8px;align-items:flex-start;background:var(--pink-50);border-radius:12px;padding:10px 12px;margin-top:8px;font-size:13.5px;line-height:1.7;color:#6B5B63;animation:fadeUp .4s ease both;}
@keyframes fadeUp{from{opacity:0;transform:translateY(8px);}to{opacity:1;transform:none;}}
#options{margin-top:14px;display:grid;gap:10px;}
.opt{background:var(--cream);border:1.5px solid #F1DCE6;border-radius:14px;padding:13px 16px;font-size:15.5px;color:var(--ink);cursor:pointer;text-align:left;transition:transform .18s ease,border-color .18s,box-shadow .18s,background .18s;min-height:52px;}
.opt:hover{transform:translateY(-2px);border-color:var(--pink);box-shadow:0 6px 16px rgba(233,107,154,.16);}
.opt:active{transform:scale(.985);}
.opt.correct{background:var(--sage-bg);border-color:var(--sage);color:#3E6B45;}
.opt.wrong{background:var(--coral-bg);border-color:var(--coral);color:#A4554E;}
.opt:disabled{cursor:default;}
#feedback{margin-top:12px;min-height:30px;font-size:14.5px;}
#feedback .ok{color:#4E7F57;font-weight:600;}
#feedback .no{color:#B0625A;font-weight:600;}
.shake{animation:shake .45s ease;}
@keyframes shake{0%,100%{transform:translateX(0);}20%{transform:translateX(-9px);}40%{transform:translateX(8px);}60%{transform:translateX(-6px);}80%{transform:translateX(4px);}}
#know-card{display:none;margin-top:14px;background:var(--cream);border-radius:var(--radius);border:1px solid #F6E2EC;box-shadow:var(--card-shadow);padding:20px;position:relative;animation:fadeUp .5s ease both;}
#know-card.show{display:block;}
#know-card .pin{font-size:13px;color:var(--rose);letter-spacing:1px;}
#know-card h3{font-size:19px;margin:6px 0 2px;}
#know-card .latlng{font-size:12.5px;color:var(--gray);}
#know-card .fun{margin-top:10px;font-size:14px;line-height:1.9;color:#5C5158;background:#FFF8FB;border-left:3px solid var(--pink);border-radius:0 10px 10px 0;padding:10px 12px;}
#know-card .fun b{color:var(--rose);}
.btn-row{display:flex;gap:10px;margin-top:14px;}
.btn{flex:1;border:none;border-radius:999px;padding:12px;font-size:15px;cursor:pointer;transition:transform .15s,box-shadow .15s;min-height:48px;}
.btn:active{transform:scale(.97);}
.btn-primary{background:linear-gradient(90deg,var(--pink),var(--rose));color:#fff;box-shadow:0 6px 16px rgba(233,107,154,.30);}
.btn-ghost{background:#fff;border:1.5px solid #F1DCE6;color:var(--rose);}
#fragment-got{display:none;margin-top:10px;text-align:center;font-size:14px;color:#8A6D3B;background:#FFF9EC;border:1px dashed #E7C87E;border-radius:12px;padding:10px;animation:fadeUp .4s ease both;}
#fragment-got.show{display:block;}
#screen-start{text-align:center;padding:30px 10px;}
#screen-start .book-emoji{font-size:54px;}
#screen-start h2{font-size:24px;margin:14px 0 8px;letter-spacing:2px;}
#screen-start p{font-size:14.5px;color:var(--gray);line-height:2;}
#screen-start .btn-row{max-width:340px;margin:22px auto 0;flex-direction:column;}
#globe-tip{position:absolute;top:12px;left:0;right:0;text-align:center;z-index:6;font-size:12px;color:#A08E9C;letter-spacing:2px;pointer-events:none;}
#combo-toast,#radar-toast{position:absolute;top:44px;left:50%;transform:translateX(-50%) scale(.9);z-index:7;background:rgba(255,253,249,.94);border:1px solid #F3C9DB;color:var(--rose);font-size:14px;padding:8px 20px;border-radius:999px;opacity:0;pointer-events:none;transition:opacity .3s,transform .3s;white-space:nowrap;box-shadow:0 4px 14px rgba(233,107,154,.18);}
#combo-toast.show,#radar-toast.show{opacity:1;transform:translateX(-50%) scale(1);}
#locate-chip{position:absolute;bottom:16px;left:50%;transform:translateX(-50%) translateY(10px);z-index:7;background:rgba(63,57,64,.85);color:#fff;font-size:12.5px;padding:8px 18px;border-radius:999px;opacity:0;pointer-events:none;transition:opacity .4s,transform .4s;white-space:nowrap;}
#locate-chip.show{opacity:1;transform:translateX(-50%) translateY(0);}

/* 恢复全貌按钮（粉白手账风格） */
#btn-reset-view{
  position:absolute;
  bottom:16px;
  right:16px;
  z-index:8;
  display:flex;
  align-items:center;
  gap:6px;
  background:rgba(255,253,249,.94);
  backdrop-filter:blur(8px);
  -webkit-backdrop-filter:blur(8px);
  border:1px solid #F3C9DB;
  color:var(--rose);
  border-radius:999px;
  padding:7px 14px;
  font-size:12px;
  font-weight:600;
  cursor:pointer;
  box-shadow:0 4px 14px rgba(233,107,154,.16);
  transition:transform .18s ease,box-shadow .18s ease,background .18s ease;
  user-select:none;
}
#btn-reset-view:hover{transform:translateY(-2px);background:#FFF5F9;box-shadow:0 6px 18px rgba(233,107,154,.25);}
#btn-reset-view:active{transform:scale(.95);}

#passport-modal{position:fixed;inset:0;z-index:50;display:none;align-items:center;justify-content:center;background:rgba(63,57,64,.35);padding:20px;}
#passport-modal.show{display:flex;}
#passport-book{background:var(--cream);border-radius:20px;max-width:520px;width:100%;max-height:82vh;overflow-y:auto;padding:26px 24px;position:relative;box-shadow:0 20px 60px rgba(63,57,64,.25);animation:fadeUp .35s ease both;}
#passport-book h2{font-size:20px;letter-spacing:2px;text-align:center;}
#passport-book .count{text-align:center;font-size:13px;color:var(--gray);margin:6px 0 16px;}
#stamp-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:14px;}
.stamp{aspect-ratio:1;border-radius:50%;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:12px;position:relative;text-align:center;padding:4px;}
.stamp.todo{border:2px dashed #D8CBD4;color:#B9ADB6;background:#FBF7FA;}
.stamp.done{border:2.5px solid var(--rose);color:var(--rose);background:#FFF5F9;transform:rotate(-8deg);font-weight:700;box-shadow:inset 0 0 0 3px #fff,inset 0 0 0 4.5px var(--pink);}
.stamp.done .tick{font-size:15px;}
#passport-close{position:absolute;top:12px;right:12px;width:36px;height:36px;border-radius:50%;border:1px solid #F1DCE6;background:#fff;color:var(--gray);font-size:18px;cursor:pointer;}
#screen-report{display:none;text-align:center;padding:10px 4px;}
#screen-report.show{display:block;animation:fadeUp .5s ease both;}
#screen-report h2{font-size:23px;letter-spacing:3px;margin-bottom:6px;}
#screen-report .motto{font-size:13px;color:var(--gray);margin-bottom:14px;}
.stat-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin:14px 0;}
.stat{background:#fff;border:1px solid #F6E2EC;border-radius:14px;padding:12px;}
.stat .n{font-size:24px;color:var(--rose);font-weight:700;}
.stat .t{font-size:12px;color:var(--gray);margin-top:2px;}
#report-title{font-size:19px;color:var(--rose);margin:8px 0;letter-spacing:2px;}
#report-stamps{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;margin:12px 0;}
#report-stamps .mini-stamp{width:64px;height:64px;border-radius:50%;font-size:11px;border:2px solid var(--rose);color:var(--rose);background:#FFF5F9;display:flex;align-items:center;justify-content:center;transform:rotate(-6deg);font-weight:700;}
/* 局部地球加载遮罩（仅限 globe-panel 内部，绝不覆盖答题面板与主界面） */
#globe-loading, #loading{
  position:absolute;
  inset:0;
  z-index:10;
  background:rgba(255,253,249,0.94);
  backdrop-filter:blur(4px);
  -webkit-backdrop-filter:blur(4px);
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:12px;
  transition:opacity .4s ease, visibility .4s ease;
  pointer-events:auto;
}
#globe-loading.done, #loading.done{
  opacity:0;
  pointer-events:none;
  visibility:hidden;
}
#globe-loading .earth-spin, #loading .earth-spin{
  width:52px;
  height:52px;
  border-radius:50%;
  background:radial-gradient(circle at 35% 35%,#F9D3E3,#E96B9A 60%,#C24E7E);
  animation:spin 1.6s linear infinite;
  box-shadow:0 0 24px rgba(233,107,154,.35);
}
@keyframes spin{to{transform:rotate(360deg);}}
#globe-loading p, #loading p{
  font-size:13.5px;
  color:var(--gray);
  letter-spacing:2px;
  font-weight:600;
  margin:0;
}
#globe-loading .loading-sub-hint{
  font-size:11.5px;
  color:#B9ADB6;
  letter-spacing:0.5px;
}

/* 离线/轻量模式面板 */
#globe-offline-view{
  position:absolute;
  inset:0;
  z-index:5;
  display:none;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:20px;
  text-align:center;
  background:radial-gradient(circle at 50% 40%,#FFFDF9 0%,#FCEEF3 60%,#F1EAF9 100%);
}
#globe-offline-view.show{
  display:flex;
}
.offline-compass{
  width:130px;
  height:130px;
  border-radius:50%;
  border:2px dashed #F58BB0;
  background:#FFF5F9;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  position:relative;
  box-shadow:0 8px 24px rgba(233,107,154,.15);
  margin-bottom:14px;
  animation:compassPulse 4s ease-in-out infinite;
}
@keyframes compassPulse{
  0%,100%{transform:scale(1);}
  50%{transform:scale(1.03);}
}
.offline-compass .compass-icon{
  font-size:46px;
  line-height:1;
}
.offline-compass .compass-badge{
  font-size:11px;
  font-weight:700;
  color:var(--rose);
  background:#FFF0F5;
  border:1px solid #F8BBD0;
  border-radius:10px;
  padding:1px 8px;
  margin-top:6px;
}
.offline-title{
  font-size:15.5px;
  font-weight:800;
  color:#3F3940;
  margin-bottom:6px;
}
.offline-desc{
  font-size:12px;
  color:var(--gray);
  line-height:1.55;
  max-width:270px;
  margin-bottom:14px;
}
.btn-reconnect{
  display:inline-flex;
  align-items:center;
  gap:6px;
  background:linear-gradient(90deg,var(--pink),var(--rose));
  color:#fff;
  border:none;
  border-radius:999px;
  padding:7px 16px;
  font-size:12.5px;
  font-weight:600;
  cursor:pointer;
  box-shadow:0 4px 12px rgba(233,107,154,.28);
  transition:transform .18s ease,box-shadow .18s ease;
  user-select:none;
}
.btn-reconnect:hover{
  transform:translateY(-2px);
  box-shadow:0 6px 16px rgba(233,107,154,.38);
}
.btn-reconnect:active{
  transform:scale(.96);
}
#sound-btn{position:fixed;bottom:18px;left:18px;z-index:60;width:44px;height:44px;border-radius:50%;font-size:18px;background:var(--cream);border:1px solid #F1DCE6;cursor:pointer;box-shadow:var(--card-shadow);transition:transform .15s;}
#sound-btn:active{transform:scale(.95);}

/* 平板端 (768px ~ 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
  #quiz-panel { flex: 0 0 380px; max-width: 48%; }
  #main { gap: 16px; padding: 0 16px; }
  .page-container { max-width: 100%; padding: 20px 16px calc(110px + env(safe-area-inset-bottom, 0px)); }
}

/* 手机竖屏 / 小屏 (< 768px) */
@media (max-width: 767px) {
  #bg-decor { overflow: hidden; }
  #main {
    flex-direction: column;
    height: auto;
    min-height: auto;
    padding: 0 14px 90px;
    gap: 16px;
  }
  #globe-panel {
    flex: none;
    order: -1;
    width: 100%;
    height: 38vh;
    min-height: 280px;
    max-height: 420px;
  }
  #quiz-panel {
    flex: none;
    max-width: 100%;
    width: 100%;
    overflow: visible;
    padding: 0 2px 20px;
  }
  #globe-tip { top: 10px; left: 14px; right: auto; text-align: left; font-size: 12px; }
  #btn-reset-view {
    top: 8px; right: 10px; bottom: auto;
    min-height: 44px; padding: 6px 14px; font-size: 11px;
    display: inline-flex; align-items: center; justify-content: center;
  }
  #title-wrap h1 { font-size: 18px; }
  .task-riddle { font-size: 16px; }
  #stamp-grid { gap: 8px; }
  .stamp { font-size: 10px; }
  /* 手机端音效按钮抬高至底部导航栏上方，彻底杜绝重叠误触 */
  #sound-btn {
    bottom: calc(72px + env(safe-area-inset-bottom, 12px));
    left: 14px;
    z-index: 60;
  }
}

/* 手机横屏特别适配 */
@media (max-height: 520px) and (orientation: landscape) {
  #main {
    flex-direction: row;
    height: calc(100vh - 76px); height: calc(100dvh - 76px);
    padding: 0 12px 10px;
    gap: 12px;
  }
  #globe-panel {
    order: 1;
    height: 100%;
    min-height: 0;
    max-height: none;
    flex: 1 1 0;
  }
  #quiz-panel {
    flex: 0 0 50%;
    max-width: 50%;
    height: 100%;
    overflow-y: auto;
    padding: 4px 2px 16px;
  }
  #topbar { padding: 6px 14px 4px; }
  #title-wrap h1 { font-size: 16px; }
  #title-wrap .sub, #title-wrap .en { display: none; }
  #sound-btn { bottom: 10px; left: 10px; width: 38px; height: 38px; font-size: 16px; }
}

/* ===== 移动端统一底部导航适配与触控保障（仅在小屏生效，绝不影响桌面端） ===== */
.nav-link, .nav-link span { white-space: nowrap !important; word-break: keep-all !important; }
@media (max-width: 767px) {
  .bottom-nav-inner {
    width: calc(100vw - 20px) !important;
    max-width: 390px !important;
    padding: 4px 4px !important;
    gap: 2px !important;
    justify-content: space-around !important;
  }
  .nav-link {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    min-height: 44px !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    padding: 4px 2px !important;
    font-size: 11px !important;
    gap: 2px !important;
    border-radius: 12px !important;
  }
  .nav-link span { display: block !important; font-size: 11px !important; line-height: 1.2 !important; }
  .nav-link svg { width: 17px !important; height: 17px !important; }

  /* 统一全站图片不超宽 */
  img { max-width: 100%; height: auto; }
}

/* ========================================================
   第二轮精修：主题切换、Toast、动效减弱、深色模式与横屏适配
   ======================================================== */

/* 主题切换按钮（顶栏右上角，44px 触控尺寸） */
.theme-toggle-btn {
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  min-width: 44px;
  min-height: 44px;
  border-radius: 50%;
  border: 1px solid #F8BBD0;
  background: #FFFFFF;
  color: #D81B60;
  font-size: 20px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(236, 64, 122, 0.12);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  z-index: 105;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  line-height: 1;
  padding: 0;
}
.theme-toggle-btn:hover {
  transform: translateY(-50%) scale(1.08);
  background: #FFF0F5;
  box-shadow: 0 4px 14px rgba(236, 64, 122, 0.22);
}
.theme-toggle-btn:active {
  transform: translateY(-50%) scale(0.95);
}

/* 全局手账风格 Toast 提示 */
.dcdili-toast {
  position: fixed;
  top: 72px;
  left: 50%;
  transform: translateX(-50%) translateY(-10px);
  background: rgba(255, 240, 245, 0.96);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1.5px solid #F06292;
  color: #D81B60;
  padding: 8px 22px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 700;
  box-shadow: 0 6px 20px rgba(236, 64, 122, 0.22);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.dcdili-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* 顶栏避让切换按钮（仅在小于1024px生效，桌面端>=1024px保持原样） */
@media (max-width: 1023px) {
  .header-container {
    padding-right: 64px !important;
  }
}
@media (max-width: 767px) {
  .theme-toggle-btn {
    right: 12px;
  }
  .header-container {
    padding-right: 58px !important;
  }
  .bottom-nav-inner {
    align-items: center !important;
  }
  .nav-link {
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
  }
  .nav-link span {
    text-align: center !important;
    line-height: 1.2 !important;
  }
}

/* 弹窗遮罩与 200ms 淡入上移动画 */
@keyframes modalFadeUp {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.fav-modal-card, #passport-book, .editor-modal .modal-card {
  animation: modalFadeUp 200ms cubic-bezier(0.16, 1, 0.3, 1) both;
}

#passport-modal {
  background: rgba(40, 32, 37, 0.45) !important;
  backdrop-filter: blur(4px) !important;
  -webkit-backdrop-filter: blur(4px) !important;
}

#favModalOverlay {
  background: rgba(40, 32, 37, 0.45) !important;
  backdrop-filter: blur(4px) !important;
  -webkit-backdrop-filter: blur(4px) !important;
}

/* ========================================================
   深色模式 (Dark Mode)
   严格通过 (prefers-color-scheme: dark) 与 html[data-theme="dark"] 生效，
   浅色桌面端与原站完全一致，不改变一个像素。
   ======================================================== */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --text-main: #F3EDE8;
    --text-muted: #D1C5CC;
    --text-light: #A89BA3;
    --primary-pink: #EC407A;
    --primary-deep: #F48FB1;
    --accent-purple: #CE93D8;
    --accent-deep-purple: #BA68C8;
    --bg-warm: #1A1518;
    --bg-card: #282025;
    --tape-color: rgba(186, 104, 137, 0.45);
    --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.45), 0 2px 6px rgba(0, 0, 0, 0.35);
    --shadow-hover: 0 14px 32px rgba(0, 0, 0, 0.6), 0 4px 10px rgba(0, 0, 0, 0.45);

    /* quiz 专用变量 */
    --bg: #1A1518;
    --cream: #282025;
    --pink-50: #35262F;
    --rose: #F48FB1;
    --pink: #EC407A;
    --lav: #3A2E3B;
    --ink: #F3EDE8;
    --gray: #B0A2AA;
    --sage: #81C784;
    --sage-bg: #1F2D21;
    --coral: #E57373;
    --coral-bg: #331F21;
  }
}

html[data-theme="dark"] {
  --text-main: #F3EDE8;
  --text-muted: #D1C5CC;
  --text-light: #A89BA3;
  --primary-pink: #EC407A;
  --primary-deep: #F48FB1;
  --accent-purple: #CE93D8;
  --accent-deep-purple: #BA68C8;
  --bg-warm: #1A1518;
  --bg-card: #282025;
  --tape-color: rgba(186, 104, 137, 0.45);
  --shadow-card: 0 8px 24px rgba(0, 0, 0, 0.45), 0 2px 6px rgba(0, 0, 0, 0.35);
  --shadow-hover: 0 14px 32px rgba(0, 0, 0, 0.6), 0 4px 10px rgba(0, 0, 0, 0.45);

  /* quiz 专用变量 */
  --bg: #1A1518;
  --cream: #282025;
  --pink-50: #35262F;
  --rose: #F48FB1;
  --pink: #EC407A;
  --lav: #3A2E3B;
  --ink: #F3EDE8;
  --gray: #B0A2AA;
  --sage: #81C784;
  --sage-bg: #1F2D21;
  --coral: #E57373;
  --coral-bg: #331F21;
}

/* 深色模式全局与组件样式覆盖 */
@media (prefers-color-scheme: dark) {
  html:not([data-theme="light"]) body {
    background-color: var(--bg-warm);
    background-image: radial-gradient(circle, rgba(240, 98, 146, 0.12) 1.2px, transparent 1.2px);
    color: var(--text-main);
  }
  html:not([data-theme="light"]) .bg-ambient-particles { opacity: 0.35; }
  html:not([data-theme="light"]) #bg-decor svg { opacity: 0.22; }
  html:not([data-theme="light"]) .top-header {
    background: rgba(26, 21, 24, 0.94);
    border-bottom: 1px dashed rgba(240, 98, 146, 0.25);
  }
  html:not([data-theme="light"]) .brand-signature { color: #F48FB1; }
  html:not([data-theme="light"]) .brand-lab-name { color: #F3EDE8; }
  html:not([data-theme="light"]) .brand-divider { background: rgba(240, 98, 146, 0.35); }
  html:not([data-theme="light"]) .brand-badge {
    background: #35262F;
    color: #F48FB1;
    border-color: #5C3A4A;
  }
  html:not([data-theme="light"]) .header-main-site-badge {
    background: #282025;
    color: #D1C5CC;
    border-color: #5C3A4A;
  }
  html:not([data-theme="light"]) .tag-upcoming {
    background: #4A2736;
    color: #F48FB1;
  }
  html:not([data-theme="light"]) .theme-toggle-btn {
    background: #282025;
    border-color: #5C3A4A;
    color: #F48FB1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  }
  html:not([data-theme="light"]) .theme-toggle-btn:hover {
    background: #35262F;
    border-color: #EC407A;
  }
  html:not([data-theme="light"]) .bottom-nav-inner {
    background: rgba(40, 32, 37, 0.96);
    border-color: rgba(240, 98, 146, 0.3);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
  }
  html:not([data-theme="light"]) .nav-link { color: #D1C5CC; }
  html:not([data-theme="light"]) .nav-link:hover { color: #F48FB1; background: rgba(240, 98, 146, 0.15); }
  html:not([data-theme="light"]) .dcdili-toast {
    background: rgba(53, 38, 47, 0.96);
    border-color: #EC407A;
    color: #F48FB1;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
  }
  html:not([data-theme="light"]) .content-box,
  html:not([data-theme="light"]) .module-card,
  html:not([data-theme="light"]) .news-card,
  html:not([data-theme="light"]) .blindbox-stage-card,
  html:not([data-theme="light"]) .mindmap-board,
  html:not([data-theme="light"]) .memo-section,
  html:not([data-theme="light"]) .modal-card,
  html:not([data-theme="light"]) .fav-modal-card,
  html:not([data-theme="light"]) #passport-book,
  html:not([data-theme="light"]) .polaroid-card {
    background: #282025;
    border-color: #4A3A44;
    color: var(--text-main);
  }
  html:not([data-theme="light"]) .polaroid-pin { background: #F48FB1; }
  html:not([data-theme="light"]) .polaroid-caption { color: #F48FB1; }
  html:not([data-theme="light"]) .polaroid-date { color: #A89BA3; }
  html:not([data-theme="light"]) .module-title { color: #F3EDE8; }
  html:not([data-theme="light"]) .module-desc { color: #D1C5CC; }
  html:not([data-theme="light"]) .hero-mainsite-btn {
    background: #282025;
    border-color: #5C3A4A;
    color: #F48FB1;
  }
  html:not([data-theme="light"]) .filter-btn,
  html:not([data-theme="light"]) .cat-pill-btn,
  html:not([data-theme="light"]) .mode-tab-btn,
  html:not([data-theme="light"]) .tool-btn {
    background: #282025;
    color: #D1C5CC;
    border-color: #4A3A44;
  }
  html:not([data-theme="light"]) .filter-btn:hover,
  html:not([data-theme="light"]) .cat-pill-btn:hover,
  html:not([data-theme="light"]) .mode-tab-btn:hover,
  html:not([data-theme="light"]) .tool-btn:hover {
    background: #35262F;
    color: #F48FB1;
  }
  html:not([data-theme="light"]) .filter-btn.active,
  html:not([data-theme="light"]) .cat-pill-btn.active,
  html:not([data-theme="light"]) .mode-tab-btn.active {
    background: #4A2736;
    color: #F48FB1;
    border-color: #EC407A;
  }
  html:not([data-theme="light"]) .gaokao-section {
    background: #32252D;
    border-color: #4A3A44;
  }
  html:not([data-theme="light"]) .question-block {
    background: #282025;
    border-color: #4A3A44;
    color: #F3EDE8;
  }
  html:not([data-theme="light"]) .teacher-tip {
    background: #35262F;
    border-color: #5C3A4A;
    color: #D1C5CC;
  }
  html:not([data-theme="light"]) .news-card-title { color: #F3EDE8; }
  html:not([data-theme="light"]) .news-card-summary { color: #D1C5CC; }
  html:not([data-theme="light"]) .expand-btn {
    background: #282025;
    color: #F48FB1;
    border-color: #5C3A4A;
  }
  html:not([data-theme="light"]) .expand-btn:hover {
    background: #35262F;
    border-color: #EC407A;
  }
  html:not([data-theme="light"]) .svg-viewport {
    background: #201A1E;
    border-color: #4A3A44;
  }
  html:not([data-theme="light"]) .tree-node .node-content-wrap {
    background: #282025;
    border-color: #4A3A44;
    color: #F3EDE8;
  }
  html:not([data-theme="light"]) .theme-select {
    background: #282025;
    color: #F3EDE8;
    border-color: #4A3A44;
  }
  html:not([data-theme="light"]) .sealed-box-graphic {
    background: #35262F;
    border-color: #5C3A4A;
  }
  html:not([data-theme="light"]) .question-prompt-box,
  html:not([data-theme="light"]) .geo-principle-stamp {
    background: #32252D;
    border-color: #4A3A44;
  }
  html:not([data-theme="light"]) #topbar {
    background: rgba(26, 21, 24, 0.94);
    border-color: rgba(240, 98, 146, 0.2);
  }
  html:not([data-theme="light"]) #title-wrap h1 { color: #F48FB1; }
  html:not([data-theme="light"]) #title-wrap .sub { color: #D1C5CC; }
  html:not([data-theme="light"]) #btn-back,
  html:not([data-theme="light"]) #passport-btn,
  html:not([data-theme="light"]) #btn-reset-view,
  html:not([data-theme="light"]) #sound-btn {
    background: #282025;
    border-color: #5C3A4A;
    color: #F48FB1;
  }
  html:not([data-theme="light"]) .opt {
    background: #282025;
    border-color: #4A3A44;
    color: #F3EDE8;
  }
  html:not([data-theme="light"]) .opt:hover {
    background: #35262F;
    border-color: #EC407A;
  }
  html:not([data-theme="light"]) #feedback { color: #F3EDE8; }
  html:not([data-theme="light"]) #know-card {
    background: #282025;
    border-color: #4A3A44;
    color: #F3EDE8;
  }
  html:not([data-theme="light"]) #know-card .fun {
    background: #32252D;
    color: #D1C5CC;
  }
  html:not([data-theme="light"]) .stamp.todo {
    background: #201A1E;
    border-color: #4A3A44;
    color: #6D5E67;
  }
  html:not([data-theme="light"]) #loading {
    background: #1A1518;
    color: #F3EDE8;
  }
  html:not([data-theme="light"]) .stat {
    background: #282025;
    border-color: #4A3A44;
  }
}

html[data-theme="dark"] body {
  background-color: var(--bg-warm);
  background-image: radial-gradient(circle, rgba(240, 98, 146, 0.12) 1.2px, transparent 1.2px);
  color: var(--text-main);
}
html[data-theme="dark"] .bg-ambient-particles { opacity: 0.35; }
html[data-theme="dark"] #bg-decor svg { opacity: 0.22; }
html[data-theme="dark"] .top-header {
  background: rgba(26, 21, 24, 0.94);
  border-bottom: 1px dashed rgba(240, 98, 146, 0.25);
}
html[data-theme="dark"] .brand-signature { color: #F48FB1; }
html[data-theme="dark"] .brand-lab-name { color: #F3EDE8; }
html[data-theme="dark"] .brand-divider { background: rgba(240, 98, 146, 0.35); }
html[data-theme="dark"] .brand-badge {
  background: #35262F;
  color: #F48FB1;
  border-color: #5C3A4A;
}
html[data-theme="dark"] .header-main-site-badge {
  background: #282025;
  color: #D1C5CC;
  border-color: #5C3A4A;
}
html[data-theme="dark"] .tag-upcoming {
  background: #4A2736;
  color: #F48FB1;
}
html[data-theme="dark"] .theme-toggle-btn {
  background: #282025;
  border-color: #5C3A4A;
  color: #F48FB1;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
html[data-theme="dark"] .theme-toggle-btn:hover {
  background: #35262F;
  border-color: #EC407A;
}
html[data-theme="dark"] .bottom-nav-inner {
  background: rgba(40, 32, 37, 0.96);
  border-color: rgba(240, 98, 146, 0.3);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
}
html[data-theme="dark"] .nav-link { color: #D1C5CC; }
html[data-theme="dark"] .nav-link:hover { color: #F48FB1; background: rgba(240, 98, 146, 0.15); }
html[data-theme="dark"] .dcdili-toast {
  background: rgba(53, 38, 47, 0.96);
  border-color: #EC407A;
  color: #F48FB1;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}
html[data-theme="dark"] .content-box,
html[data-theme="dark"] .module-card,
html[data-theme="dark"] .news-card,
html[data-theme="dark"] .blindbox-stage-card,
html[data-theme="dark"] .mindmap-board,
html[data-theme="dark"] .memo-section,
html[data-theme="dark"] .modal-card,
html[data-theme="dark"] .fav-modal-card,
html[data-theme="dark"] #passport-book,
html[data-theme="dark"] .polaroid-card {
  background: #282025;
  border-color: #4A3A44;
  color: var(--text-main);
}
html[data-theme="dark"] .polaroid-pin { background: #F48FB1; }
html[data-theme="dark"] .polaroid-caption { color: #F48FB1; }
html[data-theme="dark"] .polaroid-date { color: #A89BA3; }
html[data-theme="dark"] .module-title { color: #F3EDE8; }
html[data-theme="dark"] .module-desc { color: #D1C5CC; }
html[data-theme="dark"] .hero-mainsite-btn {
  background: #282025;
  border-color: #5C3A4A;
  color: #F48FB1;
}
html[data-theme="dark"] .filter-btn,
html[data-theme="dark"] .cat-pill-btn,
html[data-theme="dark"] .mode-tab-btn,
html[data-theme="dark"] .tool-btn {
  background: #282025;
  color: #D1C5CC;
  border-color: #4A3A44;
}
html[data-theme="dark"] .filter-btn:hover,
html[data-theme="dark"] .cat-pill-btn:hover,
html[data-theme="dark"] .mode-tab-btn:hover,
html[data-theme="dark"] .tool-btn:hover {
  background: #35262F;
  color: #F48FB1;
}
html[data-theme="dark"] .filter-btn.active,
html[data-theme="dark"] .cat-pill-btn.active,
html[data-theme="dark"] .mode-tab-btn.active {
  background: #4A2736;
  color: #F48FB1;
  border-color: #EC407A;
}
html[data-theme="dark"] .gaokao-section {
  background: #32252D;
  border-color: #4A3A44;
}
html[data-theme="dark"] .question-block {
  background: #282025;
  border-color: #4A3A44;
  color: #F3EDE8;
}
html[data-theme="dark"] .teacher-tip {
  background: #35262F;
  border-color: #5C3A4A;
  color: #D1C5CC;
}
html[data-theme="dark"] .news-card-title { color: #F3EDE8; }
html[data-theme="dark"] .news-card-summary { color: #D1C5CC; }
html[data-theme="dark"] .expand-btn {
  background: #282025;
  color: #F48FB1;
  border-color: #5C3A4A;
}
html[data-theme="dark"] .expand-btn:hover {
  background: #35262F;
  border-color: #EC407A;
}
html[data-theme="dark"] .svg-viewport {
  background: #201A1E;
  border-color: #4A3A44;
}
html[data-theme="dark"] .tree-node .node-content-wrap {
  background: #282025;
  border-color: #4A3A44;
  color: #F3EDE8;
}
html[data-theme="dark"] .theme-select {
  background: #282025;
  color: #F3EDE8;
  border-color: #4A3A44;
}
html[data-theme="dark"] .sealed-box-graphic {
  background: #35262F;
  border-color: #5C3A4A;
}
html[data-theme="dark"] .question-prompt-box,
html[data-theme="dark"] .geo-principle-stamp {
  background: #32252D;
  border-color: #4A3A44;
}
html[data-theme="dark"] #topbar {
  background: rgba(26, 21, 24, 0.94);
  border-color: rgba(240, 98, 146, 0.2);
}
html[data-theme="dark"] #title-wrap h1 { color: #F48FB1; }
html[data-theme="dark"] #title-wrap .sub { color: #D1C5CC; }
html[data-theme="dark"] #btn-back,
html[data-theme="dark"] #passport-btn,
html[data-theme="dark"] #btn-reset-view,
html[data-theme="dark"] #sound-btn {
  background: #282025;
  border-color: #5C3A4A;
  color: #F48FB1;
}
html[data-theme="dark"] .opt {
  background: #282025;
  border-color: #4A3A44;
  color: #F3EDE8;
}
html[data-theme="dark"] .opt:hover {
  background: #35262F;
  border-color: #EC407A;
}
html[data-theme="dark"] #feedback { color: #F3EDE8; }
html[data-theme="dark"] #know-card {
  background: #282025;
  border-color: #4A3A44;
  color: #F3EDE8;
}
html[data-theme="dark"] #know-card .fun {
  background: #32252D;
  color: #D1C5CC;
}
html[data-theme="dark"] .stamp.todo {
  background: #201A1E;
  border-color: #4A3A44;
  color: #6D5E67;
}
html[data-theme="dark"] #loading {
  background: #1A1518;
  color: #F3EDE8;
}
html[data-theme="dark"] .stat {
  background: #282025;
  border-color: #4A3A44;
}

/* ========================================================
   减弱动效 (prefers-reduced-motion: reduce)
   ======================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .sparkle, .butterfly-dec, .pulse-dot, .washi-tape,
  .sealed-box-graphic, .bg-ambient-particles, #loading .earth-spin {
    animation: none !important;
    transition: none !important;
  }
  #passport-modal, #passport-book, .fav-modal-card, .modal-card, #favModalOverlay, .editor-modal, .dcdili-toast {
    animation: none !important;
    transition: none !important;
  }
}

/* ========================================================
   横屏适配 (orientation: landscape) and (max-height: 500px)
   ======================================================== */
@media (orientation: landscape) and (max-height: 500px) {
  .top-header { position: sticky; top: 0; z-index: 100; }
  .header-container { padding: 4px 12px !important; }
  .brand-signature { font-size: 20px !important; }
  .brand-lab-name { font-size: 12px !important; }
  .theme-toggle-btn { width: 36px; height: 36px; min-width: 36px; min-height: 36px; font-size: 16px; right: 8px; }
  .header-container { padding-right: 48px !important; }

  .bottom-nav-bar { padding: 0 4px max(4px, env(safe-area-inset-bottom, 4px)) !important; }
  .bottom-nav-inner { padding: 2px 4px !important; gap: 2px !important; height: 38px !important; }
  .nav-link { min-height: 34px !important; padding: 2px 4px !important; font-size: 10px !important; }
  .nav-link svg { width: 14px !important; height: 14px !important; }

  .journal-hero { margin-bottom: 8px !important; padding: 4px 0 !important; }
  .journal-title { font-size: 18px !important; margin-bottom: 2px !important; }
  .journal-subtitle { display: none !important; }

  /* mindmap 横屏适配 */
  .svg-viewport { height: 60vh !important; }
  .mindmap-toolbar { padding: 4px 8px !important; gap: 4px !important; }
  .view-mode-bar { gap: 6px !important; margin-bottom: 8px !important; }

  /* quiz 横屏适配 */
  #topbar { padding: 4px 12px !important; min-height: 36px !important; }
  #title-wrap h1 { font-size: 15px !important; }
  #title-wrap .sub, #title-wrap .en { display: none !important; }
  #main {
    flex-direction: row !important;
    height: calc(100vh - 65px) !important; height: calc(100dvh - 65px) !important;
    padding: 0 8px 8px !important;
    gap: 10px !important;
  }
  #globe-panel {
    order: 1 !important;
    height: 100% !important;
    min-height: 0 !important;
    max-height: none !important;
    flex: 1 1 0 !important;
  }
  #quiz-panel {
    order: 2 !important;
    flex: 0 0 50% !important;
    max-width: 50% !important;
    height: 100% !important;
    overflow-y: auto !important;
    padding: 4px 4px 16px !important;
  }
  #sound-btn { bottom: 8px !important; left: 8px !important; width: 36px !important; height: 36px !important; font-size: 14px !important; }
}


/* ===== 2026-10 适配修复：手机顶栏不再逐字换行 / 平板底部导航与来源链接加大点击区 ===== */
.header-main-site-badge, .header-main-site-link, .brand-badge, .brand-lab-name { white-space: nowrap; }
@media (max-width: 480px) {
  .header-actions .brand-badge { display: none; }
  .header-container { gap: 8px; }
}
@media (min-width: 768px) {
  .nav-link { min-height: 40px; }
}
.source-link { display: inline-flex; align-items: center; min-height: 32px; padding: 0 4px; }
