:root,
html[data-theme="rose"] {
  --bg-0: #0c0918;
  --bg-1: #161028;
  --bg-card: rgba(25, 19, 44, 0.78);
  --bg-card-strong: rgba(31, 23, 54, 0.92);
  --bg-soft: rgba(255, 255, 255, 0.05);
  --bg-soft-hover: rgba(255, 255, 255, 0.09);
  --border: rgba(246, 178, 206, 0.2);
  --border-strong: rgba(246, 178, 206, 0.42);
  --ink: #fdf3f8;
  --ink-soft: #dfd0de;
  --muted: #a695b3;
  --accent: #f59ec1;
  --accent-2: #f7c78e;
  --accent-glow: rgba(245, 158, 193, 0.34);
  --her-bg: rgba(245, 158, 193, 0.14);
  --me-bg: rgba(139, 185, 255, 0.14);
  --her-color: #ffbad6;
  --me-color: #a9ceff;
  --danger: #ff7e96;
  --paper: #fff7fa;
  --paper-ink: #342130;
  --shadow: 0 20px 52px rgba(5, 3, 14, 0.56);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --topbar-h: 58px;
  --dock-h: 68px;
}

html[data-theme="amber"] {
  --bg-0: #15100c;
  --bg-1: #231912;
  --bg-card: rgba(36, 26, 19, 0.8);
  --bg-card-strong: rgba(45, 32, 23, 0.94);
  --bg-soft: rgba(255, 236, 212, 0.06);
  --bg-soft-hover: rgba(255, 236, 212, 0.11);
  --border: rgba(245, 196, 138, 0.22);
  --border-strong: rgba(245, 196, 138, 0.44);
  --ink: #fff6ec;
  --ink-soft: #e6d5c3;
  --muted: #b89e86;
  --accent: #f3b56c;
  --accent-2: #f49eb8;
  --accent-glow: rgba(243, 181, 108, 0.34);
  --her-bg: rgba(244, 158, 184, 0.16);
  --me-bg: rgba(243, 181, 108, 0.16);
  --her-color: #ffbfd2;
  --me-color: #ffd098;
  --danger: #ff8585;
  --paper: #fffaf1;
  --paper-ink: #35271c;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  background: var(--bg-0);
}

body {
  margin: 0;
  min-height: 100dvh;
  max-width: 100%;
  overflow-x: hidden;
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  line-height: 1.65;
  background:
    radial-gradient(ellipse 90% 55% at 15% 0%, rgba(245, 158, 193, 0.16), transparent 62%),
    radial-gradient(ellipse 80% 50% at 88% 10%, rgba(164, 135, 255, 0.12), transparent 60%),
    linear-gradient(180deg, var(--bg-1) 0%, var(--bg-0) 58%, #090612 100%);
  -webkit-font-smoothing: antialiased;
}

[hidden] {
  display: none !important;
}

.starfield {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.nebula-glow {
  position: fixed;
  inset: -12%;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 22% 28%, rgba(245, 158, 193, 0.08), transparent 40%),
    radial-gradient(circle at 80% 72%, rgba(247, 199, 142, 0.07), transparent 44%);
  animation: nebulaDrift 24s ease-in-out infinite alternate;
}

@keyframes nebulaDrift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(-2%, 2%, 0) scale(1.06); }
}

/* ---------- 顶部 App 导航栏 ---------- */
.app-topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  height: var(--topbar-h);
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(14, 10, 26, 0.78);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.topbar-left,
.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.identity-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.16s, border-color 0.2s, background 0.2s;
}

.identity-pill:hover {
  border-color: var(--border-strong);
  background: var(--bg-soft-hover);
}

.id-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent-glow);
}

.identity-pill[data-actor="小懿"] .id-dot {
  background: var(--me-color);
  box-shadow: 0 0 10px rgba(169, 206, 255, 0.5);
}

.id-caret {
  font-size: 10px;
  color: var(--muted);
}

.desktop-tabs {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.nav-tab {
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 6px 15px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.18s, background 0.18s;
}

.nav-tab:hover {
  color: var(--ink);
}

.nav-tab.is-active {
  color: #211020;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  box-shadow: 0 4px 16px var(--accent-glow);
}

.icon-pill {
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 12px;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}

.icon-pill:hover {
  border-color: var(--accent);
  color: var(--ink);
}

.danger-pill {
  border-color: rgba(255, 126, 150, 0.35);
  color: var(--danger);
}

/* ---------- 主容器 & 分舱切换 ---------- */
.app-shell {
  position: relative;
  z-index: 2;
  max-width: 960px;
  margin: 0 auto;
  padding: 18px 16px 40px;
}

.tab-panel {
  display: none;
  animation: panelIn 0.28s ease;
}

.tab-panel.is-active {
  display: block;
}

@keyframes panelIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- 公共文字与按钮 ---------- */
.kicker {
  margin: 0 0 4px;
  font-size: 10.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
}

h1, h2, h3 {
  margin: 0;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.lead {
  margin: 6px 0 14px;
  color: var(--muted);
  font-size: 13.5px;
}

.glass-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.btn-primary,
.btn-ghost,
.btn-subtle,
.pill-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  padding: 10px 20px;
  text-decoration: none;
  transition: transform 0.16s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn-sm {
  padding: 7px 14px;
  font-size: 13px;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #211020;
  box-shadow: 0 8px 22px var(--accent-glow);
}

.btn-primary:hover { transform: translateY(-1px); }
.btn-primary:active { transform: scale(0.98); }

.btn-ghost {
  background: var(--bg-soft);
  border-color: var(--border);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--accent);
  background: var(--bg-soft-hover);
}

.btn-subtle {
  background: transparent;
  border-color: var(--border);
  color: var(--ink-soft);
  padding: 6px 13px;
  font-size: 12.5px;
}

.btn-subtle:hover {
  border-color: var(--accent);
  color: var(--ink);
}

.text-action {
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 2px 4px;
}

.pill-btn {
  padding: 6px 14px;
  font-size: 12.5px;
  background: var(--bg-soft);
  border-color: var(--border);
  color: var(--ink-soft);
}

.pill-btn.is-active {
  background: rgba(245, 158, 193, 0.22);
  border-color: var(--accent);
  color: var(--ink);
}

.badge-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11.5px;
  background: rgba(245, 158, 193, 0.14);
  border: 1px solid rgba(245, 158, 193, 0.3);
  color: var(--accent-2);
}

.sec-head,
.panel-header,
.card-mini-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.panel-header {
  margin-bottom: 14px;
}

.panel-header h2 {
  font-size: 22px;
}

.panel-actions {
  display: flex;
  gap: 8px;
}

.card-mini-head {
  margin-bottom: 12px;
}

/* ---------- 分段控制器 ---------- */
.seg-control {
  display: flex;
  gap: 6px;
  padding: 5px;
  margin-bottom: 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.seg-scroll {
  overflow-x: auto;
  scrollbar-width: none;
}

.seg-scroll::-webkit-scrollbar { display: none; }

.seg-btn {
  flex: 1 0 auto;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 8px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.18s, color 0.18s;
}

.seg-btn.is-active {
  background: rgba(245, 158, 193, 0.2);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px rgba(245, 158, 193, 0.36);
}

.seg-pane {
  display: none;
  animation: panelIn 0.22s ease;
}

.seg-pane.is-active {
  display: block;
}

/* ---------- TAB 1: 星海首页 ---------- */
.home-header {
  text-align: center;
  padding: 6px 4px 16px;
}

.twin-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  font-size: 12px;
  color: var(--ink-soft);
  margin-bottom: 10px;
}

.badge-star { color: var(--accent); }

.home-title {
  font-size: clamp(24px, 5vw, 36px);
  line-height: 1.25;
}

.home-title span {
  background: linear-gradient(120deg, #fff 15%, var(--accent) 62%, var(--accent-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.opening {
  margin: 6px 0 4px;
  font-size: 15px;
  color: var(--ink-soft);
}

.about {
  margin: 0 auto;
  max-width: 480px;
  font-size: 13px;
  color: var(--muted);
}

.live-pulse-pill {
  margin-top: 12px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid rgba(245, 158, 193, 0.36);
  background: rgba(245, 158, 193, 0.13);
  color: var(--ink);
  font-size: 12.5px;
  cursor: pointer;
}

.pulse-ring {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(245, 158, 193, 0.25);
  animation: pulseBeat 1.8s infinite;
}

@keyframes pulseBeat {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.3); opacity: 0.65; }
}

.hero-heartbeat-card {
  margin-bottom: 14px;
  background:
    radial-gradient(circle at 95% 10%, rgba(245, 158, 193, 0.18), transparent 48%),
    var(--bg-card);
}

.hb-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.days {
  margin: 0;
  font-size: clamp(44px, 10vw, 64px);
  line-height: 1.04;
  font-weight: 700;
  color: var(--accent);
  text-shadow: 0 0 28px var(--accent-glow);
}

.days .unit {
  font-size: 16px;
  font-weight: 500;
  margin-left: 6px;
  color: var(--ink-soft);
}

.clock {
  margin: 4px 0 2px;
  font-size: 13.5px;
  color: var(--ink-soft);
  font-variant-numeric: tabular-nums;
}

.next {
  margin: 0;
  font-size: 12.5px;
  color: var(--muted);
}

.city-bridge {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.city-node {
  text-align: center;
  min-width: 52px;
}

.city-role {
  display: block;
  font-size: 11px;
  color: var(--muted);
}

.city-node strong {
  font-size: 16px;
}

.bridge-line {
  position: relative;
  width: 68px;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 2px;
}

.pulse-dot {
  position: absolute;
  top: 50%;
  left: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 12px var(--accent);
  transform: translateY(-50%);
  animation: cityPulse 2.6s ease-in-out infinite;
}

@keyframes cityPulse {
  0% { left: 0; opacity: 0.4; }
  50% { left: calc(100% - 9px); opacity: 1; }
  100% { left: 0; opacity: 0.4; }
}

.pat-bar {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.pat-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(245, 158, 193, 0.55);
  background: linear-gradient(135deg, rgba(245, 158, 193, 0.24), rgba(247, 199, 142, 0.2));
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.16s, box-shadow 0.2s;
}

.pat-btn:hover { box-shadow: 0 6px 20px var(--accent-glow); }
.pat-btn:active { transform: scale(0.95); }

.pat-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.pat-count-line {
  font-size: 12.5px;
  color: var(--ink-soft);
}

.pat-count-line strong { color: var(--accent-2); }
.pat-echo { font-size: 12px; color: var(--muted); }

/* 双栏卡片网格 */
.home-duo-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.duo-card {
  padding: 16px 18px;
}

.mood-bubbles {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mood-bubble {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: left;
  cursor: pointer;
  color: var(--ink);
  transition: transform 0.16s, border-color 0.2s;
}

.mood-bubble:hover { transform: translateY(-1px); border-color: var(--border-strong); }
.bubble-her { background: var(--her-bg); }
.bubble-me { background: var(--me-bg); }

.mb-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.bubble-her .mb-avatar { background: rgba(245, 158, 193, 0.3); color: var(--her-color); }
.bubble-me .mb-avatar { background: rgba(139, 185, 255, 0.3); color: var(--me-color); }

.mb-info { min-width: 0; }
.mb-info strong { display: block; font-size: 14px; line-height: 1.3; }
.mb-info small {
  display: block;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 下次见面卡 */
.meet-body {
  display: flex;
  align-items: center;
  gap: 14px;
}

.meet-days-badge {
  min-width: 68px;
  padding: 12px 10px;
  border-radius: 16px;
  text-align: center;
  background: linear-gradient(145deg, rgba(245, 158, 193, 0.24), rgba(247, 199, 142, 0.18));
  border: 1px solid rgba(245, 158, 193, 0.35);
}

.meet-days-badge span {
  display: block;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.05;
  color: var(--accent-2);
}

.meet-days-badge small {
  font-size: 11px;
  color: var(--ink-soft);
}

.meet-info h3 { font-size: 16px; margin-bottom: 3px; }
.meet-sub { margin: 0 0 4px; font-size: 12.5px; color: var(--accent); }
.meet-note { margin: 0; font-size: 12.5px; color: var(--muted); }

/* 横向滑动胶囊轨 */
.section-row-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 18px 2px 10px;
}

.section-row-head h2 { font-size: 16px; }
.row-hint { font-size: 12px; color: var(--muted); }

.capsule-rail {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 2px 2px 10px;
  margin-bottom: 8px;
  scrollbar-width: none;
}

.capsule-rail::-webkit-scrollbar { display: none; }

.capsule-card {
  flex: 0 0 232px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  padding: 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  text-align: left;
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.18s, border-color 0.2s;
}

.capsule-card:hover { transform: translateY(-2px); border-color: var(--accent); }

.cap-daily { background: linear-gradient(155deg, rgba(245, 158, 193, 0.18), rgba(32, 22, 52, 0.85)); }
.cap-photo { background: linear-gradient(155deg, rgba(247, 199, 142, 0.18), rgba(32, 22, 52, 0.85)); }
.cap-star { background: linear-gradient(155deg, rgba(162, 140, 255, 0.2), rgba(26, 20, 48, 0.88)); }
.cap-praise { background: linear-gradient(155deg, rgba(255, 148, 184, 0.18), rgba(36, 20, 42, 0.86)); }

.cap-tag {
  align-self: flex-start;
  font-size: 11px;
  padding: 2px 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--accent-2);
}

.capsule-card strong {
  font-size: 14.5px;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.cap-go { font-size: 12px; color: var(--accent); font-weight: 600; }

/* 里程碑 & 足迹 */
.milestones-compact {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.milestone-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 11px;
  border-radius: 12px;
  background: var(--bg-soft);
}

.milestone-row strong { display: block; font-size: 13px; }
.milestone-row small { font-size: 11.5px; color: var(--muted); }
.m-days {
  white-space: nowrap;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--accent-2);
}

.activity-feed {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.act-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 12px;
  background: var(--bg-soft);
  font-size: 12.5px;
}

.act-item span { color: var(--ink-soft); }
.act-item small { color: var(--muted); font-size: 11px; white-space: nowrap; }

/* ---------- TAB 2: 胶片墙 & 留声机 ---------- */
.photo-wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 14px;
}

.photo-card {
  margin: 0;
  padding: 9px 9px 12px;
  border-radius: 16px;
  background: rgba(255, 248, 252, 0.95);
  color: #2f2030;
  box-shadow: 0 12px 28px rgba(4, 2, 12, 0.42);
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  display: flex;
  flex-direction: column;
}

.photo-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 36px rgba(245, 158, 193, 0.22);
}

.photo-frame {
  position: relative;
  aspect-ratio: 4 / 3;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(135deg, #2d1e42, #4d2a49);
}

.photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-author-badge {
  position: absolute;
  top: 7px;
  left: 7px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(18, 12, 30, 0.72);
  color: #fff;
  font-size: 10.5px;
  backdrop-filter: blur(6px);
}

.photo-placeholder {
  width: 100%;
  height: 100%;
  padding: 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #fdeaf3;
  gap: 4px;
}

.photo-placeholder .ph-icon { font-size: 20px; color: var(--accent-2); }
.photo-placeholder .ph-tip { font-size: 11px; opacity: 0.78; }

.photo-meta {
  padding-top: 9px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.photo-caption {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.photo-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: #82697f;
}

.photo-stats {
  display: inline-flex;
  gap: 8px;
  font-weight: 600;
  color: #b44e7d;
}

/* 留声机 */
.phonograph {
  display: grid;
  grid-template-columns: 128px 1fr;
  gap: 20px;
  align-items: center;
}

.vinyl-disc {
  width: 124px;
  height: 124px;
  border-radius: 50%;
  background: repeating-radial-gradient(circle at center, #14111d 0 4px, #251e34 4px 7px);
  border: 2px solid var(--border);
  display: grid;
  place-items: center;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
  animation: spin 10s linear infinite;
  animation-play-state: paused;
}

.vinyl-disc.is-playing { animation-play-state: running; }

.vinyl-label {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #211020;
  display: grid;
  place-items: center;
  font-size: 18px;
}

@keyframes spin { to { transform: rotate(360deg); } }

.player-sub { margin: 4px 0 12px; font-size: 13px; color: var(--muted); }

.player-controls {
  display: flex;
  align-items: center;
  gap: 10px;
}

.player-controls input[type="range"] {
  flex: 1;
  accent-color: var(--accent);
}

.audio-time {
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.audio-list {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.audio-track-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.audio-track-btn {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--ink);
  font-size: 13px;
  cursor: pointer;
  text-align: left;
}

.audio-track-btn.is-active {
  border-color: var(--accent);
  background: rgba(245, 158, 193, 0.16);
}

.audio-track-btn small { color: var(--muted); font-size: 11.5px; }

/* ---------- TAB 3: 星轨圣殿 ---------- */
.map {
  position: relative;
  width: 100%;
  height: 290px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background:
    radial-gradient(circle at 22% 30%, rgba(245, 158, 193, 0.16), transparent 52%),
    radial-gradient(circle at 80% 72%, rgba(247, 199, 142, 0.12), transparent 54%),
    rgba(9, 7, 20, 0.65);
  overflow: hidden;
}

#constellation-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

#constellation-lines line {
  stroke: rgba(245, 158, 193, 0.56);
  stroke-width: 0.45;
  stroke-dasharray: 2 1.2;
}

.star-node {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.star-node::before {
  content: "";
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.45);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.3);
  transition: transform 0.25s, background 0.25s, box-shadow 0.25s;
}

.star-node.lit::before {
  background: var(--accent);
  transform: scale(1.32);
  box-shadow: 0 0 20px var(--accent), 0 0 36px rgba(247, 199, 142, 0.6);
}

.star-label {
  position: absolute;
  top: 28px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 11px;
  color: var(--muted);
  pointer-events: none;
}

.star-node.lit .star-label { color: var(--ink); font-weight: 600; }

.star-status {
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--muted);
}

.star-line {
  margin: 8px 0 0;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--bg-soft);
  border-left: 3px solid var(--accent);
  font-size: 14px;
  color: var(--ink);
}

.envelope-wrap { margin-top: 16px; }

.envelope-cover {
  width: 100%;
  padding: 22px 16px;
  border-radius: 18px;
  border: 1px solid rgba(245, 158, 193, 0.45);
  background: linear-gradient(135deg, rgba(245, 158, 193, 0.2), rgba(247, 199, 142, 0.14));
  color: var(--ink);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.wax-seal {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ff8cb5, #b83363);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 20px;
  box-shadow: 0 8px 22px rgba(184, 51, 99, 0.5);
}

.envelope-title { font-size: 15px; font-weight: 600; }
.envelope-sub { font-size: 12.5px; color: var(--muted); }

.letter {
  margin-top: 16px;
  padding: 24px 22px;
  border-radius: 18px;
  background: var(--paper);
  color: var(--paper-ink);
  white-space: pre-wrap;
  line-height: 1.9;
  font-size: 15px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.4);
}

/* 表白信回信区 */
.letter-reply-box {
  margin-top: 14px;
  padding: 16px;
  border-radius: 16px;
  background: rgba(245, 158, 193, 0.08);
  border: 1px dashed var(--border-strong);
}

.reply-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.reply-seal-badge {
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(184, 51, 99, 0.24);
  border: 1px solid rgba(255, 140, 181, 0.5);
  color: #ffd3e4;
  font-size: 11.5px;
  font-weight: 600;
}

.letter-reply-display {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--bg-soft);
  margin-bottom: 10px;
  white-space: pre-wrap;
  font-size: 14px;
}

.reply-form-foot {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.reply-form-foot input { flex: 1; min-width: 140px; }

/* 折叠时间轴 */
.timeline-accordion {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.day-accordion-item {
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  overflow: hidden;
}

.day-acc-head {
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--ink);
  padding: 15px 18px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  text-align: left;
  cursor: pointer;
}

.day-acc-meta {
  font-size: 11.5px;
  color: var(--accent);
  display: block;
}

.day-acc-head strong { font-size: 15px; }
.day-acc-arrow { color: var(--muted); transition: transform 0.2s; }
.day-accordion-item.is-open .day-acc-arrow { transform: rotate(180deg); }

.day-acc-body {
  display: none;
  padding: 0 18px 16px;
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.75;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.day-accordion-item.is-open .day-acc-body {
  display: block;
  padding-top: 12px;
}

.quotes {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.quote-item {
  margin: 0;
  padding: 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.7;
}

/* ---------- TAB 4: 一起游乐场 ---------- */
.daily-q-title {
  margin: 8px 0 4px;
  font-size: 19px;
  line-height: 1.45;
}

.daily-lock-badge {
  font-size: 11.5px;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(247, 199, 142, 0.16);
  color: var(--accent-2);
  border: 1px solid rgba(247, 199, 142, 0.35);
}

.daily-lock-badge.is-unlocked {
  background: rgba(130, 230, 175, 0.16);
  color: #a9f5cb;
  border-color: rgba(130, 230, 175, 0.38);
}

.daily-answers-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0;
}

.daily-ans-card {
  padding: 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.09);
  background: var(--bg-soft);
}

.daily-ans-card.side-her { background: var(--her-bg); }
.daily-ans-card.side-me { background: var(--me-bg); }

.daily-ans-head {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  margin-bottom: 6px;
}

.daily-ans-body {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink);
  white-space: pre-wrap;
}

.daily-ans-locked {
  color: var(--muted);
  font-style: italic;
}

.daily-form-foot {
  margin-top: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.daily-as-hint { font-size: 12.5px; color: var(--muted); }
.daily-as-hint strong { color: var(--accent); }

.daily-history-wrap { margin-top: 16px; }
.sub-title { font-size: 15px; margin: 0 0 10px; color: var(--ink-soft); }

.daily-history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.daily-hist-card {
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.daily-hist-card small { color: var(--accent); font-size: 11.5px; }
.daily-hist-card h4 { margin: 4px 0 8px; font-size: 14.5px; }
.daily-hist-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; font-size: 13px; color: var(--ink-soft); }

/* 愿望清单 */
.wish-list {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.wish-item {
  padding: 11px 13px;
  border-radius: 15px;
  background: var(--bg-soft);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.wish-item.done {
  border-color: rgba(245, 158, 193, 0.36);
  background: rgba(245, 158, 193, 0.1);
}

.wish-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wish-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  background: transparent;
  color: #211020;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  display: grid;
  place-items: center;
}

.wish-item.done .wish-check {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent;
}

.wish-title { flex: 1; font-size: 14px; }
.wish-item.done .wish-title { text-decoration: line-through; opacity: 0.8; }

.wish-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--accent-2);
  white-space: nowrap;
}

.wish-proof-strip {
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px dashed rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  gap: 10px;
}

.wish-proof-thumb {
  width: 56px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  cursor: pointer;
  border: 1px solid var(--border);
}

.wish-proof-meta { font-size: 12px; color: var(--ink-soft); }

/* 转盘 & 夸夸 */
.wheel-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }

.wheel-stage {
  min-height: 92px;
  padding: 18px;
  border-radius: 16px;
  border: 1px dashed var(--border-strong);
  background: rgba(255, 255, 255, 0.03);
  display: grid;
  place-items: center;
  text-align: center;
  margin-bottom: 14px;
}

.wheel-result { margin: 0; font-size: 16px; font-weight: 600; color: var(--accent-2); }

.praise-switch { display: flex; gap: 6px; }

.praise-stage { margin: 14px 0; }

.praise-card {
  padding: 22px 20px;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(245, 158, 193, 0.16), rgba(247, 199, 142, 0.12));
  border: 1px solid var(--border-strong);
  transition: opacity 0.18s, transform 0.18s;
}

.praise-card.is-flipping { opacity: 0.4; transform: scale(0.98); }
.praise-badge { display: inline-block; font-size: 11px; color: var(--accent-2); margin-bottom: 6px; }
.praise-card h3 { font-size: 18px; margin-bottom: 8px; }
.praise-card p { margin: 0; font-size: 14.5px; color: var(--ink-soft); }

.praise-actions { display: flex; align-items: center; justify-content: space-between; }
.praise-counter { font-size: 12.5px; color: var(--muted); }

/* 悄悄话与盖楼回复 */
.note-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.note-as-pill { font-size: 12.5px; color: var(--muted); }
.note-as-pill strong { color: var(--accent); }

.notes-list {
  margin-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.note-card {
  padding: 13px 15px;
  border-radius: 16px;
  background: var(--bg-soft);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.note-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  margin-bottom: 6px;
}

.note-author { font-weight: 700; color: var(--accent); }
.note-author.is-me { color: var(--me-color); }
.note-text { margin: 0; font-size: 14px; color: var(--ink); white-space: pre-wrap; }

.note-actions {
  margin-top: 8px;
  display: flex;
  gap: 12px;
  font-size: 12px;
}

.note-replies {
  margin-top: 8px;
  padding-left: 12px;
  border-left: 2px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.note-reply-item {
  font-size: 12.5px;
  color: var(--ink-soft);
}

.note-reply-item strong { color: var(--accent-2); margin-right: 6px; }
.note-reply-form { margin-top: 8px; display: flex; gap: 6px; }

/* ---------- TAB 5: 全屏 AI 聊天舱 ---------- */
.tab-panel-chat.is-active {
  display: flex;
  flex-direction: column;
}

.chat-shell {
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: calc(100dvh - var(--topbar-h) - 56px);
  min-height: 460px;
  max-height: 760px;
}

.chat-header {
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.chat-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #211020;
  display: grid;
  place-items: center;
  font-size: 18px;
  flex-shrink: 0;
}

.chat-title-wrap { flex: 1; min-width: 0; }
.chat-title-wrap h2 { font-size: 16px; }
.chat-sub { margin: 0; font-size: 11.5px; color: var(--muted); }

.chat-head-tools { display: flex; gap: 6px; }

.chat-quick-bar {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  overflow-x: auto;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  scrollbar-width: none;
}

.chat-quick-bar::-webkit-scrollbar { display: none; }

.quick-chip {
  flex: 0 0 auto;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 12px;
  cursor: pointer;
}

.quick-chip:hover { border-color: var(--accent); color: var(--ink); }

.chat-stream {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.chat-msg {
  max-width: 84%;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.chat-msg.from-ai { align-self: flex-start; }
.chat-msg.from-user { align-self: flex-end; align-items: flex-end; }

.chat-bubble {
  padding: 11px 14px;
  border-radius: 18px;
  font-size: 14px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.from-ai .chat-bubble {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-top-left-radius: 6px;
}

.from-user .chat-bubble {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #211020;
  font-weight: 500;
  border-top-right-radius: 6px;
}

.chat-meta { font-size: 11px; color: var(--muted); padding: 0 4px; }

.chat-composer {
  padding: 10px 12px;
  display: flex;
  gap: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(14, 10, 26, 0.72);
}

.chat-composer input { flex: 1; }

/* ---------- 表单控件通用 ---------- */
input[type="text"],
input[type="date"],
textarea,
select {
  width: 100%;
  padding: 10px 13px;
  border-radius: 13px;
  border: 1px solid var(--border);
  background: rgba(10, 7, 22, 0.65);
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--accent);
}

.inline-form {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.inline-form input:first-child { flex: 1 1 180px; }
.inline-form #wish-tag { flex: 0 1 100px; }

.two-col-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.form-status {
  margin: 0;
  min-height: 18px;
  font-size: 12.5px;
  color: var(--accent-2);
}

/* ---------- 手机端底部 5 舱固定导航 ---------- */
.bottom-dock {
  display: none;
}

/* ---------- 底部抽屉 (Bottom Sheets) & 弹层 ---------- */
.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(5, 3, 14, 0.72);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 12px;
}

.sheet-card {
  width: 100%;
  max-width: 500px;
  max-height: 90dvh;
  overflow-y: auto;
  border-radius: 26px;
  padding: 12px 20px 24px;
  background: var(--bg-card-strong);
  border: 1px solid var(--border-strong);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.65);
  animation: sheetUp 0.22s ease;
}

@keyframes sheetUp {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}

.sheet-handle {
  width: 40px;
  height: 4px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.22);
  margin: 0 auto 12px;
}

.sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.icon-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.sheet-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.id-choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 14px 0;
}

.id-choice-card {
  padding: 18px 12px;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--ink);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: transform 0.16s, border-color 0.2s, background 0.2s;
}

.id-choice-card:hover { transform: translateY(-2px); border-color: var(--accent); background: rgba(245, 158, 193, 0.14); }
.id-choice-card small { font-size: 11.5px; color: var(--muted); }

.id-big-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 700;
}

.av-her { background: var(--her-bg); color: var(--her-color); border: 1px solid rgba(245, 158, 193, 0.45); }
.av-me { background: var(--me-bg); color: var(--me-color); border: 1px solid rgba(169, 206, 255, 0.45); }

.sheet-close-btn { width: 100%; }

/* 上传区域 & 录音盒 */
.upload-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 148px;
  border-radius: 16px;
  border: 1.5px dashed var(--border-strong);
  background: rgba(255, 255, 255, 0.03);
  cursor: pointer;
  overflow: hidden;
  padding: 12px;
  text-align: center;
}

.dropzone-compact { min-height: 102px; }

.upload-dropzone img {
  max-height: 210px;
  max-width: 100%;
  border-radius: 12px;
  object-fit: contain;
}

.drop-hint { display: flex; flex-direction: column; gap: 4px; align-items: center; }
.drop-icon { font-size: 26px; }
.drop-hint small { font-size: 12px; color: var(--muted); }

.place-chips,
.mood-preset-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.chip-sm {
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--ink-soft);
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12px;
  cursor: pointer;
}

.chip-sm.is-active {
  border-color: var(--accent);
  background: rgba(245, 158, 193, 0.22);
  color: var(--ink);
}

.recorder-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
}

.rec-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 126, 150, 0.5);
  background: rgba(255, 126, 150, 0.16);
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
}

.rec-btn.is-recording {
  background: rgba(255, 90, 120, 0.35);
  box-shadow: 0 0 18px rgba(255, 90, 120, 0.45);
}

.rec-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ff607c;
}

.rec-timer { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--accent-2); }
.file-pick-btn { cursor: pointer; }

/* ---------- 全屏互动拍立得灯箱 ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(7, 5, 16, 0.94);
  backdrop-filter: blur(14px);
  display: grid;
  place-items: center;
  padding: 14px;
}

.lb-shell {
  width: 100%;
  max-width: 680px;
  max-height: 94dvh;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.lb-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.lb-top-actions { display: flex; align-items: center; gap: 8px; }

.lb-front {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lb-front img {
  width: 100%;
  max-height: 66dvh;
  object-fit: contain;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.04);
}

.lb-front-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.lb-front-foot strong { display: block; font-size: 15px; }
.lb-front-foot small { font-size: 12px; color: var(--muted); }

.like-pill {
  border: 1px solid rgba(245, 158, 193, 0.45);
  background: rgba(245, 158, 193, 0.14);
  color: var(--ink);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.like-pill.is-liked {
  background: linear-gradient(135deg, #ff7aa8, var(--accent-2));
  color: #211020;
  border-color: transparent;
}

.lb-back {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 78dvh;
}

.lb-story-card {
  padding: 18px;
  border-radius: 18px;
  background: var(--paper);
  color: var(--paper-ink);
}

.lb-story-card .kicker { color: #b54d7a; }
.lb-story-text { margin: 8px 0 10px; white-space: pre-wrap; font-size: 14.5px; }
.lb-likers { font-size: 12px; color: #8c5a74; }

.lb-comments-wrap {
  padding: 14px;
  border-radius: 18px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lb-comments-list {
  max-height: 220px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.lb-comment-row {
  padding: 8px 11px;
  border-radius: 12px;
  background: var(--bg-soft);
  font-size: 13px;
}

.lb-comment-row strong { color: var(--accent); margin-right: 6px; }
.lb-comment-row small { float: right; color: var(--muted); font-size: 11px; }

/* ---------- 私密暗号门 ---------- */
.gate-overlay {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  padding: 20px;
  background: radial-gradient(circle at 50% 35%, rgba(38, 22, 62, 0.96), rgba(9, 6, 18, 0.99));
  backdrop-filter: blur(16px);
}

.gate-card {
  width: 100%;
  max-width: 410px;
  padding: 32px 24px;
  border-radius: 26px;
  background: var(--bg-card-strong);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow);
  text-align: center;
}

.gate-orbit {
  position: relative;
  width: 68px;
  height: 68px;
  margin: 0 auto 14px;
  border-radius: 50%;
  border: 1px dashed rgba(245, 158, 193, 0.45);
  display: grid;
  place-items: center;
  animation: spin 16s linear infinite;
}

.orbit-core { font-size: 22px; color: var(--accent); }
.orbit-dot { position: absolute; width: 9px; height: 9px; border-radius: 50%; }
.dot-a { top: -4px; left: 50%; background: var(--accent); }
.dot-b { bottom: -4px; left: 50%; background: var(--accent-2); }

.gate-hint { margin: 8px 0 18px; font-size: 13px; color: var(--muted); }
.gate-form { display: flex; flex-direction: column; gap: 10px; }
.gate-error { min-height: 20px; margin: 10px 0 0; font-size: 13px; color: var(--danger); }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 88px;
  transform: translateX(-50%);
  z-index: 95;
  padding: 10px 18px;
  border-radius: 999px;
  background: rgba(24, 17, 42, 0.95);
  border: 1px solid var(--border-strong);
  color: var(--ink);
  font-size: 13px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.48);
  white-space: nowrap;
}

/* ---------- 手机端 App 适配 (<= 768px) ---------- */
@media (max-width: 768px) {
  .desktop-tabs {
    display: none;
  }

  .app-shell {
    padding: 12px 12px calc(var(--dock-h) + env(safe-area-inset-bottom, 0px) + 18px);
  }

  .bottom-dock {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    z-index: 40;
    height: var(--dock-h);
    padding: 6px 8px;
    border-radius: 22px;
    background: rgba(18, 13, 34, 0.88);
    border: 1px solid var(--border);
    backdrop-filter: blur(22px);
    -webkit-backdrop-filter: blur(22px);
    box-shadow: 0 14px 36px rgba(4, 2, 12, 0.65);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: center;
  }

  .dock-btn {
    position: relative;
    border: 0;
    background: transparent;
    color: var(--muted);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 6px 2px;
    border-radius: 15px;
    cursor: pointer;
    transition: color 0.16s, background 0.16s;
  }

  .dock-btn.is-active {
    color: var(--accent);
    background: rgba(245, 158, 193, 0.14);
  }

  .dock-ico { font-size: 18px; line-height: 1.1; }
  .dock-lbl { font-size: 11px; font-weight: 600; }

  .dock-dot {
    position: absolute;
    top: 6px;
    right: 18%;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-2);
    box-shadow: 0 0 8px var(--accent-2);
  }

  .home-duo-grid,
  .daily-answers-grid,
  .daily-hist-pair,
  .phonograph {
    grid-template-columns: 1fr;
  }

  .vinyl-disc { margin: 0 auto; }

  .hb-top { flex-direction: column; align-items: flex-start; }
  .city-bridge { width: 100%; justify-content: space-between; }
  .pat-bar { flex-direction: column; align-items: stretch; }
  .pat-meta { align-items: flex-start; }

  .photo-wall {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .chat-shell {
    height: calc(100dvh - var(--topbar-h) - var(--dock-h) - env(safe-area-inset-bottom, 0px) - 34px);
    min-height: 380px;
  }

  .sheet-backdrop {
    padding: 0;
  }

  .sheet-card {
    border-radius: 26px 26px 0 0;
    padding-bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  }
}

/* ==================== v4.0 小巧思专属样式 ==================== */

/* 1. 防误读信号灯 */
.signal-strip {
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px dashed rgba(255, 255, 255, 0.09);
}

.signal-banner {
  margin-bottom: 9px;
  padding: 9px 12px;
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(245, 158, 193, 0.16), rgba(247, 199, 142, 0.14));
  border: 1px solid rgba(245, 158, 193, 0.34);
  font-size: 12.5px;
  line-height: 1.55;
  color: var(--ink);
}

.signal-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.sig-pill {
  border: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 11.5px;
  cursor: pointer;
  transition: all 0.16s ease;
}

.sig-pill.is-active {
  background: rgba(245, 158, 193, 0.24);
  border-color: var(--accent);
  color: var(--ink);
  font-weight: 600;
}

/* 2. 枕边晚安熄灯卡 */
.night-lamp-card {
  margin-bottom: 14px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  background:
    radial-gradient(circle at 8% 20%, rgba(164, 135, 255, 0.16), transparent 48%),
    var(--bg-card);
}

.night-lamp-card.is-night-highlight {
  border-color: rgba(247, 199, 142, 0.48);
  box-shadow: 0 12px 36px rgba(155, 118, 255, 0.2);
}

.nl-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}

.nl-status {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--ink-soft);
}

.nl-bulbs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.nl-bulb {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--ink-soft);
}

.nl-bulb.is-off {
  background: rgba(145, 120, 235, 0.2);
  border-color: rgba(180, 158, 255, 0.4);
  color: #e6dcff;
}

.nl-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.cap-fund {
  background: linear-gradient(155deg, rgba(130, 224, 180, 0.16), rgba(28, 22, 52, 0.88));
}

/* 3. 4-7-8 放空呼吸灯 */
.breathe-card { text-align: center; }

.breathe-stage {
  height: 196px;
  display: grid;
  place-items: center;
  margin: 8px 0 14px;
}

.breathe-orb {
  width: 124px;
  height: 124px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255, 200, 224, 0.72), rgba(164, 135, 255, 0.35));
  border: 1.5px solid rgba(255, 214, 232, 0.65);
  box-shadow: 0 0 36px rgba(245, 158, 193, 0.42);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transition: transform 3.8s ease-in-out, box-shadow 2s ease;
}

.breathe-orb.phase-inhale {
  transform: scale(1.36);
  box-shadow: 0 0 58px rgba(245, 158, 193, 0.68);
}

.breathe-orb.phase-hold {
  transform: scale(1.36);
  box-shadow: 0 0 64px rgba(247, 199, 142, 0.65);
}

.breathe-orb.phase-exhale {
  transform: scale(0.88);
  transition-duration: 7.6s;
}

.breathe-orb span { font-size: 13px; color: var(--ink); }
.breathe-orb strong { font-size: 28px; line-height: 1.1; color: #fff; }

.breathe-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
}

/* 4. 我们的小金库 */
.fund-overview {
  margin: 14px 0 16px;
  display: grid;
  grid-template-columns: 98px 1fr;
  gap: 16px;
  align-items: center;
}

.fund-jar {
  position: relative;
  width: 92px;
  height: 118px;
  border-radius: 20px 20px 26px 26px;
  border: 2px solid var(--border-strong);
  background: rgba(255, 255, 255, 0.04);
  overflow: hidden;
  display: grid;
  place-items: center;
}

.fund-jar-fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(245, 158, 193, 0.78), rgba(247, 199, 142, 0.72));
  transition: height 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.fund-jar-pct {
  position: relative;
  z-index: 2;
  font-size: 16px;
  font-weight: 700;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
}

.fund-balance-lbl { margin: 0; font-size: 12px; color: var(--muted); }

.fund-balance {
  margin: 2px 0 4px;
  font-size: 32px;
  font-weight: 700;
  line-height: 1.1;
  color: var(--accent-2);
}

.fund-target-line { margin: 0 0 8px; font-size: 12px; color: var(--muted); }

.fund-kpis {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--ink-soft);
}

.fund-kpis strong { color: var(--ink); }

.fund-form {
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.fund-type-switch { display: flex; gap: 8px; }

input[type="number"] {
  width: 100%;
  padding: 10px 13px;
  border-radius: 13px;
  border: 1px solid var(--border);
  background: rgba(10, 7, 22, 0.65);
  color: var(--ink);
  font-family: inherit;
  font-size: 14px;
  outline: none;
}

.fund-ledger-head {
  margin: 16px 2px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.fund-ledger-head h4 { margin: 0; font-size: 14.5px; }

.fund-ledger {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.fund-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
  border-radius: 14px;
  background: var(--bg-soft);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.fund-row-main strong { display: block; font-size: 13.5px; }
.fund-row-main small { font-size: 11.5px; color: var(--muted); }

.fund-row-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.fund-amt { font-weight: 700; font-size: 15px; white-space: nowrap; }
.fund-amt.is-in { color: #9cf2c5; }
.fund-amt.is-out { color: #ff9cb0; }

/* 5. 城市足迹地图 */
.city-map-stage {
  position: relative;
  width: 100%;
  height: 290px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    radial-gradient(circle at 50% 52%, rgba(245, 158, 193, 0.14), transparent 56%),
    radial-gradient(circle at 80% 22%, rgba(154, 190, 255, 0.12), transparent 40%),
    rgba(9, 7, 20, 0.72);
  overflow: hidden;
  margin-bottom: 12px;
}

#city-map-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

#city-map-lines line.route-visited {
  stroke: rgba(245, 158, 193, 0.68);
  stroke-width: 0.6;
}

#city-map-lines line.route-future {
  stroke: rgba(247, 199, 142, 0.34);
  stroke-width: 0.45;
  stroke-dasharray: 1.8 1.5;
}

.city-pin {
  position: absolute;
  transform: translate(-50%, -50%);
  border: 0;
  background: transparent;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 4px;
}

.city-pin-dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px dashed rgba(247, 199, 142, 0.75);
  background: rgba(255, 255, 255, 0.12);
  transition: transform 0.2s, box-shadow 0.2s;
}

.city-pin.is-visited .city-pin-dot {
  border-style: solid;
  border-color: #fff;
  background: var(--accent);
  box-shadow: 0 0 16px var(--accent), 0 0 28px rgba(247, 199, 142, 0.55);
}

.city-pin.is-selected .city-pin-dot {
  transform: scale(1.38);
}

.city-pin-lbl {
  font-size: 11px;
  color: var(--ink-soft);
  white-space: nowrap;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.85);
}

.city-pin.is-visited .city-pin-lbl {
  color: #fff;
  font-weight: 600;
}

.city-detail-card {
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
}

.city-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.city-thumbs {
  margin-top: 10px;
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.city-thumb-img {
  width: 72px;
  height: 54px;
  border-radius: 10px;
  object-fit: cover;
  cursor: pointer;
  border: 1px solid var(--border-strong);
}

/* 6. 零试探偏爱兑换券 */
.coupon-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.coupon-ticket {
  position: relative;
  padding: 15px 16px;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(245, 158, 193, 0.16), rgba(247, 199, 142, 0.11));
  border: 1px dashed var(--border-strong);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}

.coupon-ticket.is-used {
  opacity: 0.68;
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.14);
}

.coupon-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--accent-2);
}

.coupon-ticket h4 { margin: 0; font-size: 15.5px; }
.coupon-ticket p { margin: 0; font-size: 12.5px; color: var(--ink-soft); }

.coupon-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
}

/* 7. 时间胶囊 & 句号翻译彩蛋 */
.capsule-list {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.capsule-item {
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--bg-soft);
  border: 1px solid var(--border);
}

.capsule-item.is-unlocked {
  background: linear-gradient(145deg, rgba(245, 158, 193, 0.14), rgba(247, 199, 142, 0.09));
  border-color: var(--border-strong);
}

.capsule-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.capsule-body-text {
  margin: 8px 0 0;
  white-space: pre-wrap;
  font-size: 14px;
  color: var(--ink);
}

.period-egg {
  display: inline-block;
  margin-top: 5px;
  font-size: 11px;
  color: var(--accent-2);
  opacity: 0.85;
}

@media (max-width: 768px) {
  .fund-overview { grid-template-columns: 82px 1fr; gap: 12px; }
  .fund-jar { width: 78px; height: 104px; }
  .night-lamp-card { flex-direction: column; align-items: stretch; }
}
