/* ==========================================================================
   六大核心板块样式系统 (Home / Chat / Scrapbook / Shop / Labs / Letters)
   ========================================================================== */

.page-wrap {
  width: min(1320px, calc(100vw - 48px));
  margin: 0 auto;
  padding: 26px 0 96px;
}

.section-header-center {
  text-align: center;
  margin-bottom: 34px;
}
.section-header-center h2,
.section-header-split h2,
.section-header-split h1,
.page-hero-compact h1 {
  font-family: var(--font-serif-zh);
  font-weight: 600;
  font-size: clamp(26px, 3vw, 36px);
  letter-spacing: 0.04em;
}

.section-header-split,
.page-hero-compact {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.page-desc {
  margin-top: 6px;
  color: var(--text-secondary);
  font-size: 14.5px;
  max-width: 780px;
}
.page-desc b {
  color: var(--accent);
}

.header-btn-group {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.text-link-btn {
  color: var(--accent);
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.text-link-btn:hover {
  color: var(--accent-bright);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 12.5px;
}
.is-selected-pill {
  border-color: var(--accent) !important;
  background: var(--accent-soft) !important;
  color: var(--accent) !important;
}

.reveal-block {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.85s var(--ease-cinema), transform 0.85s var(--ease-cinema);
}
.reveal-block.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ================= 01 · 时光长卷首页（秋日花间秋千主舞台） ================= */
.home-scroll {
  width: min(1260px, calc(100vw - 48px));
  margin: 0 auto;
  padding-bottom: 110px;
}

.hero-autumn-split {
  min-height: calc(100vh - 128px);
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  gap: 38px;
  align-items: center;
  padding: 28px 0 46px;
}

.hero-copy-col {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.hero-badge-line {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--accent);
  font-size: 11.5px;
  letter-spacing: 0.22em;
  font-weight: 600;
  margin-bottom: 16px;
}

.hero-display-title {
  font-family: var(--font-serif-zh);
  font-size: clamp(42px, 5.2vw, 68px);
  font-weight: 600;
  letter-spacing: 0.06em;
  line-height: 1.16;
  margin-bottom: 18px;
}
.hero-display-title em {
  font-family: var(--font-serif-en);
  font-style: italic;
  color: var(--accent);
  padding: 0 10px;
}

.hero-lead {
  font-size: clamp(15px, 1.35vw, 17.5px);
  color: var(--text-secondary);
  line-height: 1.8;
  margin-bottom: 30px;
}

.timer-single-card {
  width: 100%;
  max-width: 460px;
  padding: 22px 26px;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(255, 238, 224, 0.85), var(--bg-card));
  border: 1px solid var(--accent-border);
  box-shadow: var(--shadow-card);
}

.hero-swing-card {
  border-radius: 28px;
  background: var(--bg-card);
  border: 1px solid var(--accent-border);
  box-shadow: 0 22px 58px rgba(168, 102, 68, 0.14);
  padding: 14px 14px 16px;
}

.swing-canvas-wrap {
  position: relative;
  width: 100%;
  height: 410px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(212, 116, 89, 0.2);
}
.swing-canvas-wrap canvas {
  width: 100%;
  height: 100%;
  display: block;
  cursor: pointer;
}
.swing-caption-tag {
  position: absolute;
  left: 14px;
  bottom: 12px;
  padding: 4px 12px;
  border-radius: 99px;
  background: rgba(255, 252, 247, 0.82);
  color: #5b3c31;
  font-size: 12px;
  backdrop-filter: blur(8px);
  pointer-events: none;
}
.swing-controls-bar {
  display: flex;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

/* 网站介绍卡片 */
.site-intro-section {
  padding: 18px 0 36px;
}
.site-intro-card {
  padding: 34px 40px;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(255, 245, 235, 0.92), var(--bg-card));
  border: 1px solid var(--accent-border);
  box-shadow: var(--shadow-card);
}
.site-intro-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}
.site-intro-head h2 {
  font-family: var(--font-serif-zh);
  font-size: 25px;
  font-weight: 600;
}
.site-intro-body {
  font-size: 15px;
  line-height: 1.95;
  color: var(--text-secondary);
}

.timer-label {
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--accent);
  font-weight: 600;
}
.timer-digits {
  font-family: var(--font-serif-zh);
  font-size: clamp(21px, 2.2vw, 28px);
  font-weight: 600;
  margin: 8px 0 4px;
  color: var(--text-primary);
}
.timer-single-card small {
  font-size: 12px;
  color: var(--text-muted);
}

/* 数据诗 */
.data-poem-section {
  padding: 64px 0;
}
.poem-metrics-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-bottom: 24px;
}
.poem-metric {
  padding: 24px 18px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  text-align: center;
}
.poem-metric strong {
  display: block;
  font-family: var(--font-serif-en);
  font-size: 38px;
  color: var(--accent);
  line-height: 1.1;
  margin-bottom: 6px;
}
.poem-metric span {
  font-size: 13px;
  color: var(--text-secondary);
}

.symmetry-card {
  padding: 26px 30px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--accent-border);
}
.symmetry-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}
.sym-person {
  display: flex;
  align-items: center;
  gap: 12px;
}
.sym-person--right {
  text-align: right;
}
.sym-person img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  object-fit: cover;
}
.sym-person strong {
  display: block;
  font-size: 15px;
}
.sym-person small {
  color: var(--text-muted);
  font-size: 12px;
}
.sym-badge {
  padding: 5px 14px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12.5px;
}
.symmetry-bar {
  height: 12px;
  border-radius: 99px;
  overflow: hidden;
  display: flex;
  gap: 3px;
}
.symmetry-bar-partner {
  background: linear-gradient(90deg, #cf6674, #e5989b);
  border-radius: 99px 0 0 99px;
}
.symmetry-bar-me {
  background: linear-gradient(90deg, #d9b370, #5cb28a);
  border-radius: 0 99px 99px 0;
}

/* 章节长卷 */
.chapters-section {
  padding: 56px 0;
}
.chapters-timeline {
  display: flex;
  flex-direction: column;
  gap: 54px;
}
.chapter-spread {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 42px;
  align-items: center;
  padding: 32px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
}
.chapter-spread.is-reversed {
  grid-template-columns: 1.15fr 1fr;
}
.chapter-spread.is-reversed .chapter-visual {
  order: 2;
}
.chapter-photo-frame {
  border-radius: var(--radius-md);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--border-strong);
}
.chapter-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.chapter-art-placeholder {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-md);
  border: 1px dashed var(--accent-border);
  background: radial-gradient(circle at 50% 40%, var(--accent-soft), transparent 72%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--accent);
}
.chapter-art-roman {
  font-family: var(--font-serif-en);
  letter-spacing: 0.22em;
  font-size: 13px;
}
.chapter-meta-line {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 12px;
  letter-spacing: 0.18em;
  color: var(--accent);
}
.chapter-copy h3 {
  font-family: var(--font-serif-zh);
  font-size: 26px;
  margin-bottom: 14px;
}
.chapter-copy p {
  color: var(--text-secondary);
  line-height: 1.85;
  margin-bottom: 16px;
}

/* 首页书信与传送门 */
.closing-letter-section {
  padding: 46px 0 64px;
}
.letter-paper-sheet {
  position: relative;
  max-width: 820px;
  margin: 0 auto;
  padding: 52px 54px 44px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--accent-border);
  box-shadow: var(--shadow-soft);
}
.letter-wax-badge {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #b53a48;
  color: #fff3df;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  box-shadow: 0 6px 18px rgba(181, 58, 72, 0.4);
}
.letter-paper-sheet h2 {
  font-family: var(--font-serif-zh);
  font-size: 28px;
  margin-bottom: 20px;
}
.letter-body-copy {
  font-family: var(--font-serif-zh);
  font-size: 16px;
  line-height: 2;
  color: var(--text-secondary);
  margin-bottom: 28px;
}
.letter-footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--border-subtle);
  padding-top: 18px;
}
.letter-sign {
  font-family: var(--font-serif-zh);
  font-style: italic;
  color: var(--accent);
}

.portals-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 18px;
}
.portal-card {
  text-align: left;
  padding: 26px 24px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: all 0.28s var(--ease-cinema);
}
.portal-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
  background: var(--bg-card-hover);
}
.portal-card--highlight {
  border-color: var(--accent-border);
}
.portal-num {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--accent);
}
.portal-card h3 {
  font-family: var(--font-serif-zh);
  font-size: 20px;
}
.portal-card p {
  font-size: 13.5px;
  color: var(--text-secondary);
  flex: 1;
}
.portal-enter {
  font-size: 13px;
  color: var(--accent);
  font-weight: 500;
}

/* ================= 02 · 聊天记忆馆 ================= */
.subtab-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.subtab-btn {
  padding: 9px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--bg-card);
  font-size: 13.5px;
  color: var(--text-secondary);
  transition: all 0.2s;
}
.subtab-btn.is-active {
  background: var(--accent);
  color: var(--text-inverse);
  border-color: var(--accent);
  font-weight: 600;
}

.bookmarks-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  margin-bottom: 22px;
}
.strip-label {
  font-size: 12.5px;
  color: var(--accent);
  white-space: nowrap;
}
.bookmarks-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}
.milestone-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  background: var(--bg-pill);
  border: 1px solid var(--border-subtle);
  white-space: nowrap;
  font-size: 12.5px;
}
.milestone-chip:hover {
  border-color: var(--accent);
}
.milestone-chip small {
  color: var(--accent);
  font-weight: 600;
}

.timemachine-layout {
  display: grid;
  grid-template-columns: 390px 1fr;
  gap: 22px;
  align-items: start;
}
.tm-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.tm-search-box,
.heatmap-card,
.search-results-box {
  padding: 18px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
}
.search-input-row {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.tm-quick-tools {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.field-input--compact {
  width: auto;
  padding: 6px 10px;
  font-size: 12.5px;
}

.search-res-head {
  display: flex;
  justify-content: space-between;
  font-size: 12.5px;
  color: var(--accent);
  margin-bottom: 10px;
}
.search-res-list {
  max-height: 280px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.search-hit-item {
  text-align: left;
  padding: 9px 11px;
  border-radius: 10px;
  background: var(--bg-pill);
  border: 1px solid transparent;
}
.search-hit-item:hover {
  border-color: var(--accent);
}
.hit-top {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 3px;
}
.search-hit-item p {
  font-size: 12.5px;
  color: var(--text-secondary);
}

.heatmap-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 12px;
}
.heatmap-head small {
  font-size: 11.5px;
  color: var(--text-muted);
}
.heatmap-months-list {
  max-height: 490px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-right: 4px;
}
.hm-month-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}
.hm-days-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}
.hm-cell {
  height: 26px;
  border-radius: 6px;
  font-size: 11px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
}
.hm-lv-1 { background: rgba(212, 116, 89, 0.14); }
.hm-lv-2 { background: rgba(212, 116, 89, 0.30); }
.hm-lv-3 { background: rgba(212, 116, 89, 0.56); color: #fff; font-weight: 500; }
.hm-lv-4 { background: #d47459; color: #fff; font-weight: 700; }
.hm-cell.is-selected {
  outline: 2px solid var(--rose);
  outline-offset: 1px;
}

/* 微信对话舞台 */
.tm-chat-stage {
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  display: flex;
  flex-direction: column;
  height: 700px;
}
.chat-stage-header {
  padding: 16px 22px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.chat-day-sub {
  margin-left: 10px;
  font-size: 12.5px;
  color: var(--text-muted);
}
.chat-day-nav {
  display: flex;
  gap: 8px;
}

.chat-messages-stream {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.chat-sys-pill {
  text-align: center;
  font-size: 11.5px;
  color: var(--text-muted);
}
.chat-sys-pill span {
  padding: 3px 12px;
  border-radius: 99px;
  background: var(--bg-pill);
}

.chat-row {
  display: flex;
  gap: 12px;
  max-width: 82%;
}
.chat-row.is-me {
  align-self: flex-end;
  flex-direction: row-reverse;
}
.chat-row.is-highlighted .chat-bubble {
  outline: 2px solid var(--accent);
  box-shadow: 0 0 24px var(--accent-soft);
}
.chat-avatar {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--accent-soft);
  display: grid;
  place-items: center;
}
.chat-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.chat-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11.5px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.chat-row.is-me .chat-meta {
  justify-content: flex-end;
}
.bookmark-star-btn {
  opacity: 0.45;
  font-size: 12px;
}
.bookmark-star-btn:hover {
  opacity: 1;
  color: var(--accent);
}

.chat-bubble {
  padding: 11px 15px;
  border-radius: 16px;
  background: var(--bg-pill);
  border: 1px solid var(--border-subtle);
  font-size: 14.5px;
  line-height: 1.6;
  word-break: break-word;
}
.chat-row.is-me .chat-bubble {
  background: var(--accent-soft);
  border-color: var(--accent-border);
}
.chat-bubble.is-quote {
  border-left: 3px solid var(--accent);
}
.chat-media-box img {
  max-width: 240px;
  max-height: 240px;
  border-radius: 10px;
  cursor: zoom-in;
  display: block;
}
.chat-media-box.is-emoji img {
  max-width: 120px;
  max-height: 120px;
  cursor: default;
}

.voice-bubble-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 14px;
  border-radius: 99px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-border);
  color: var(--accent);
  font-size: 13px;
}
.voice-wave {
  display: inline-flex;
  align-items: center;
  gap: 2.5px;
  height: 14px;
}
.voice-wave i {
  width: 2.5px;
  height: 8px;
  background: currentColor;
  border-radius: 2px;
}
.voice-bubble-btn.is-playing .voice-wave i {
  animation: wavePulse 0.7s infinite ease-in-out alternate;
}
.voice-bubble-btn.is-playing .voice-wave i:nth-child(2) {
  animation-delay: 0.2s;
}
.voice-bubble-btn.is-playing .voice-wave i:nth-child(3) {
  animation-delay: 0.4s;
}
@keyframes wavePulse {
  from { height: 4px; }
  to { height: 14px; }
}

/* 数据星盘子页 */
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}
.glass-panel {
  padding: 26px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
}
.glass-panel--wide {
  grid-column: 1 / -1;
}
.glass-panel h3 {
  font-family: var(--font-serif-zh);
  font-size: 21px;
  margin-bottom: 6px;
}
.panel-sub {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 18px;
}
.polar-wrap {
  max-width: 320px;
  margin: 0 auto;
}
.monthly-bars {
  height: 230px;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: 18px 8px 8px;
}
.m-bar-col {
  flex: 1;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.m-bar-val {
  font-size: 11px;
  color: var(--text-muted);
}
.m-bar-track {
  flex: 1;
  width: 100%;
  max-width: 34px;
  background: var(--bg-pill);
  border-radius: 99px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.m-bar-fill {
  width: 100%;
  background: linear-gradient(180deg, var(--accent), rgba(217, 179, 112, 0.35));
  border-radius: 99px;
}
.call-summary-banner {
  margin-top: 16px;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-pill);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13px;
}

.chat-call-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: var(--text-secondary);
}
.chat-call-tag.has-duration {
  color: var(--accent);
  font-weight: 600;
}

.voice-bubble-uncached {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 99px;
  background: rgba(212, 116, 89, 0.08);
  border: 1px dashed var(--accent-border);
  font-size: 13px;
  color: var(--text-secondary);
}
.voice-bubble-uncached small {
  font-size: 11px;
  color: var(--text-muted);
}

.call-metrics-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}
.call-metric-box {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: var(--bg-pill);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.call-metric-box small {
  font-size: 12px;
  color: var(--text-muted);
}
.call-metric-box strong {
  font-family: var(--font-serif-zh);
  font-size: 24px;
  color: var(--accent);
}
.call-metric-box strong .unit {
  font-size: 14px;
  font-weight: 500;
}
.call-metric-box .sub-note {
  font-size: 11.5px;
  color: var(--text-secondary);
}

.top-calls-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 10px;
}
.call-record-chip {
  text-align: left;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-pill);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: all 0.2s;
}
.call-record-chip:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.call-record-chip .call-rank {
  font-size: 11px;
  color: var(--accent);
  font-weight: 600;
}
.call-record-chip strong {
  font-size: 13.5px;
  color: var(--text-primary);
}
.call-record-chip small {
  font-size: 11.5px;
  color: var(--text-muted);
}

.voice-missing-explain {
  text-align: left;
  max-width: 760px;
  margin: 12px auto 20px;
  padding: 20px 24px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px dashed var(--accent-border);
  line-height: 1.8;
}
.voice-missing-explain strong {
  display: block;
  color: var(--accent);
  font-size: 15px;
  margin-bottom: 8px;
}
.voice-missing-explain p {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.panel-head-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 16px;
}
.affection-words-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px;
}
.word-stat-card {
  text-align: left;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--bg-pill);
  border: 1px solid var(--border-subtle);
  transition: all 0.2s;
}
.word-stat-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.word-stat-top {
  display: flex;
  justify-content: space-between;
  margin-bottom: 8px;
  font-size: 13.5px;
}
.word-stat-top span {
  font-size: 12px;
  color: var(--accent);
}
.word-split-bar {
  height: 6px;
  border-radius: 99px;
  background: rgba(92, 178, 138, 0.55);
  overflow: hidden;
  margin-bottom: 6px;
}
.word-split-bar i {
  display: block;
  height: 100%;
  background: #cf6674;
}
.word-stat-foot {
  display: flex;
  justify-content: space-between;
  font-size: 11.5px;
  color: var(--text-muted);
}

.phrase-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 12px;
}
.phrase-tag {
  padding: 6px 13px;
  border-radius: 99px;
  background: var(--bg-pill);
  border: 1px solid var(--border-subtle);
  font-size: 13px;
  display: inline-flex;
  gap: 6px;
}
.phrase-tag.is-hot {
  border-color: var(--accent-border);
  background: var(--accent-soft);
}
.phrase-tag small {
  color: var(--accent);
}

/* 原声留声机画廊 */
.phonograph-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 20px;
}
.filter-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.voices-gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}
.voice-record-card {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.voice-card-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.voice-sender {
  display: flex;
  align-items: center;
  gap: 10px;
}
.voice-sender img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}
.voice-sender strong {
  display: block;
  font-size: 14px;
}
.voice-sender small,
.voice-seq {
  font-size: 11.5px;
  color: var(--text-muted);
}
.voice-card-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* ================= 03 · 拍立得手账与足迹星图 ================= */
.polaroid-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(265px, 1fr));
  gap: 32px;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: var(--bg-secondary);
  border: 1px solid var(--border-subtle);
  margin-bottom: 64px;
}

.polaroid-slot {
  perspective: 1100px;
  height: 360px;
  cursor: pointer;
}
.polaroid-flipper {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transform: rotate(var(--rot, 0deg));
  transition: transform 0.65s var(--ease-cinema);
}
.polaroid-slot:hover .polaroid-flipper {
  transform: rotate(0deg) translateY(-4px);
}
.polaroid-slot.is-flipped .polaroid-flipper {
  transform: rotateY(180deg);
}

.polaroid-face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  border-radius: 6px;
  padding: 14px 14px 18px;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.18);
  color: #261e16;
  display: flex;
  flex-direction: column;
}
.polaroid-tape {
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%) rotate(-2deg);
  width: 78px;
  height: 22px;
  background: rgba(226, 198, 144, 0.52);
  border: 1px solid rgba(180, 145, 86, 0.25);
}
.polaroid-photo-box {
  position: relative;
  width: 100%;
  height: 220px;
  background: #1a1714;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 12px;
}
.polaroid-photo-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.polaroid-empty-art {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #d9b370;
  gap: 6px;
}
.on-tree-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  padding: 3px 9px;
  border-radius: 99px;
  background: rgba(6, 18, 12, 0.78);
  color: #ffe0a3;
  font-size: 11px;
}
.polaroid-caption strong {
  display: block;
  font-family: var(--font-serif-zh);
  font-size: 16px;
  margin-bottom: 3px;
}
.polaroid-caption p {
  font-size: 12.5px;
  color: #5b4d3e;
  flex: 1;
}
.polaroid-meta {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #8a7864;
  margin-top: 8px;
}

.polaroid-back {
  transform: rotateY(180deg);
  background: #f9f2e3;
  border: 1px solid #e3d3b7;
  padding: 22px;
}
.polaroid-back-head {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #8f6c34;
  border-bottom: 1px dashed #d8c6a8;
  padding-bottom: 8px;
  margin-bottom: 14px;
}
.polaroid-secret-copy {
  flex: 1;
  font-family: var(--font-serif-zh);
  font-size: 15px;
  line-height: 1.85;
  color: #2c2218;
  overflow-y: auto;
}
.polaroid-back-actions {
  display: flex;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px dashed #d8c6a8;
}
.pol-act-btn {
  font-size: 12px;
  color: #7c5821;
  font-weight: 600;
}

/* 足迹星图 */
.footprint-workspace {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 22px;
}
.constellation-map-card {
  padding: 20px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
}
.footprint-svg {
  width: 100%;
  height: auto;
  display: block;
}
.map-legend {
  display: flex;
  gap: 18px;
  font-size: 12.5px;
  color: var(--text-secondary);
  margin-top: 10px;
}
.map-legend i {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 5px;
}
.footprint-cards-col {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 460px;
  overflow-y: auto;
}
.fp-item-card {
  padding: 16px 18px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
}
.fp-item-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.fp-status-pill {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 99px;
  margin-right: 6px;
}
.fp-status-pill.is-visited {
  background: var(--accent-soft);
  color: var(--accent);
}
.fp-status-pill.is-wish {
  background: rgba(207, 102, 116, 0.15);
  color: var(--rose);
}
.fp-item-card p {
  font-size: 13.5px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}
.fp-item-foot {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
}

/* ================= 04 · 小盖商店桌面旗舰版 ================= */
.shop-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 20px 26px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--accent-border);
  margin-bottom: 24px;
}
.shop-switcher-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.shop-switch-pill {
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-strong);
  background: var(--bg-pill);
  font-size: 13.5px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.shop-switch-pill.is-active {
  background: var(--accent);
  color: var(--text-inverse);
  border-color: var(--accent);
  font-weight: 600;
}
.shop-role-badge {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 99px;
  background: rgba(0, 0, 0, 0.16);
}

.shop-wallet-hero {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 18px;
  margin-bottom: 24px;
}
.wallet-main-card {
  padding: 26px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, var(--accent-soft), var(--bg-card));
  border: 1px solid var(--accent-border);
}
.wallet-star-balance {
  font-family: var(--font-serif-en);
  font-size: 48px;
  font-weight: 600;
  color: var(--accent);
  line-height: 1.1;
  margin: 8px 0;
}
.wallet-stat-card {
  padding: 22px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.shop-tabs-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 20px;
}
.product-card {
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s;
}
.product-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-border);
}
.product-cover {
  height: 168px;
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.product-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-emoji {
  font-size: 48px;
}
.product-tag {
  position: absolute;
  top: 12px;
  left: 12px;
  padding: 3px 10px;
  border-radius: 99px;
  background: rgba(20, 16, 12, 0.72);
  color: #ffe0a3;
  font-size: 11.5px;
}
.product-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.product-body h3 {
  font-family: var(--font-serif-zh);
  font-size: 19px;
}
.product-body p {
  font-size: 13px;
  color: var(--text-secondary);
  flex: 1;
}
.product-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border-subtle);
}
.product-price {
  font-size: 20px;
  font-weight: 700;
  color: var(--amber);
}

.sources-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.source-card-btn {
  text-align: left;
  padding: 16px 18px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(0, 0, 0, 0.08);
  color: #241d15;
  transition: transform 0.2s;
}
.source-card-btn:hover {
  transform: translateY(-2px);
}
.source-card-btn strong {
  display: block;
  font-size: 15.5px;
  margin: 6px 0 3px;
}
.source-card-btn small {
  font-size: 12px;
  opacity: 0.78;
}

.ledger-list,
.orders-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ledger-item,
.order-ticket {
  padding: 16px 20px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.ledger-left {
  display: flex;
  align-items: center;
  gap: 14px;
}
.ledger-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 20px;
}
.proof-thumb {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: cover;
  cursor: zoom-in;
  border: 1px solid var(--border-strong);
}

.breakfast-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
  margin-top: 18px;
}
.meal-card {
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
}
.meal-card img {
  width: 100%;
  height: 128px;
  object-fit: cover;
}
.meal-card span {
  display: block;
  padding: 8px 12px;
  font-size: 12.5px;
  text-align: center;
}

.receipt-paper {
  max-width: 480px;
  margin: 0 auto;
  padding: 36px 32px;
  border-radius: 12px;
  background: #fffdf8;
  color: #231c14;
  border: 1px dashed #cbb899;
  box-shadow: var(--shadow-soft);
}
.receipt-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px dotted #e0d3be;
  font-size: 14px;
}

/* ================= 05 · 造梦馆（双互动实验室） ================= */
.labs-stage-wrap {
  width: min(1400px, calc(100vw - 36px));
  margin: 0 auto;
  padding: 10px 0 36px;
}
.labs-switcher-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
}
.lab-frame-box {
  width: 100%;
  height: calc(100vh - 185px);
  min-height: 580px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--accent-border);
  box-shadow: var(--shadow-soft);
  background: #030b08;
}
.lab-frame-box.is-warm-canvas {
  background: #fcead6;
}
.lab-frame-box iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

/* ================= 06 · 火漆时光信箱 ================= */
.envelopes-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 24px;
}
.envelope-card {
  position: relative;
  padding: 30px 26px 24px;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: transform 0.28s var(--ease-cinema), border-color 0.28s;
}
.envelope-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
}
.wax-seal {
  position: absolute;
  top: 20px;
  right: 22px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #fff6e6;
  display: grid;
  place-items: center;
  font-size: 15px;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.28);
}
.envelope-from-to {
  display: flex;
  gap: 14px;
  font-size: 12px;
  color: var(--accent);
  margin-bottom: 10px;
}
.envelope-card h3 {
  font-family: var(--font-serif-zh);
  font-size: 20px;
  margin-bottom: 12px;
  padding-right: 44px;
}
.envelope-preview {
  font-size: 13.5px;
  color: var(--text-secondary);
  line-height: 1.75;
  margin-bottom: 18px;
}
.envelope-foot {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  border-top: 1px solid var(--border-subtle);
  padding-top: 12px;
}
.open-hint {
  color: var(--accent);
}
.capsule-lock-banner {
  padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  border: 1px dashed var(--accent-border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.capsule-countdown {
  font-size: 13.5px;
  color: var(--accent);
}

/* 弹窗通用内容 */
.modal-form-wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.modal-form-wrap h3 {
  font-family: var(--font-serif-zh);
  font-size: 22px;
}
.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 8px;
}
.stationery-modal {
  padding: 12px 10px;
}
.stationery-seal {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  color: #fff;
  display: grid;
  place-items: center;
  margin-bottom: 14px;
}
.stationery-modal h2 {
  font-family: var(--font-serif-zh);
  font-size: 26px;
  margin-bottom: 18px;
}
.stationery-content {
  font-family: var(--font-serif-zh);
  font-size: 16px;
  line-height: 2;
  color: var(--text-secondary);
  padding: 20px 0;
  border-top: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-subtle);
}
.stationery-sign {
  text-align: right;
  margin-top: 16px;
  font-family: var(--font-serif-zh);
  color: var(--accent);
}
.lightbox-view img {
  max-width: 100%;
  max-height: 78vh;
  display: block;
  margin: 0 auto;
  border-radius: 12px;
}

@media (max-width: 980px) {
  .timemachine-layout,
  .analytics-grid,
  .footprint-workspace,
  .chapter-spread,
  .chapter-spread.is-reversed,
  .hero-autumn-split,
  .shop-wallet-hero {
    grid-template-columns: 1fr;
  }
  .poem-metrics-row {
    grid-template-columns: repeat(2, 1fr);
  }
}
