/* ============================================================
   《我们的宇宙》阶段二视觉原型 · 组件与页面样式
   ============================================================ */

/* ---------- 环境背景（桌面端） ---------- */
.ambient {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(70% 60% at 18% 12%, rgba(217, 140, 134, .16), transparent 60%),
    radial-gradient(60% 55% at 85% 22%, rgba(155, 138, 196, .18), transparent 60%),
    radial-gradient(80% 70% at 50% 105%, rgba(185, 142, 78, .10), transparent 60%),
    var(--bg);
  transition: background .6s var(--ease);
}

[data-theme="dark"] .ambient {
  background:
    radial-gradient(70% 60% at 18% 10%, rgba(60, 52, 96, .35), transparent 60%),
    radial-gradient(60% 55% at 85% 20%, rgba(183, 78, 78, .18), transparent 60%),
    #0b0c12;
}

/* ---------- 应用外壳 ---------- */
.app {
  width: 100%;
  height: 100dvh;
  position: relative;
  z-index: 1;
}

.app-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--bg);
  transition: background .5s var(--ease);
}

.view {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.view::-webkit-scrollbar {
  display: none;
}

@media (min-width: 760px) {
  .ambient {
    background:
      radial-gradient(60% 50% at 20% 18%, rgba(217, 140, 134, .18), transparent 60%),
      radial-gradient(55% 50% at 82% 20%, rgba(155, 138, 196, .20), transparent 60%),
      radial-gradient(90% 80% at 50% 108%, rgba(185, 142, 78, .12), transparent 60%),
      #F3EDE6;
  }
  [data-theme="dark"] .ambient {
    background:
      radial-gradient(60% 50% at 20% 16%, rgba(70, 60, 110, .4), transparent 60%),
      radial-gradient(55% 50% at 82% 18%, rgba(183, 78, 78, .22), transparent 60%),
      #07080d;
  }
  .app {
    width: min(440px, 100vw);
    margin: 0 auto;
    height: calc(100dvh - 48px);
    top: 24px;
    border-radius: 36px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 40px 100px -40px rgba(30, 20, 40, .5);
  }
  [data-theme="dark"] .app {
    box-shadow: 0 40px 100px -40px #000;
  }
}

/* ---------- 通用 ---------- */
.eyebrow {
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-3);
  font-weight: 600;
}

.demo-chip,
.demo-tag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--text-3);
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 9px;
  white-space: nowrap;
}

.demo-chip i,
.demo-tag i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}

.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  transition: background .5s var(--ease), border-color .5s var(--ease);
}

.text-link {
  border: 0;
  background: none;
  color: var(--text-3);
  font-size: 13px;
  padding: 4px;
}

.chev {
  color: var(--text-3);
  font-size: 18px;
  line-height: 1;
}

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 18px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  color: var(--text);
  font-size: 15px;
  font-weight: 500;
  transition: transform var(--dur-press) var(--ease), background var(--dur-ui) var(--ease), opacity var(--dur-ui) var(--ease);
}

.btn:active {
  transform: scale(.97);
}

.btn-primary {
  background: var(--rose-600);
  border-color: transparent;
  color: #fff;
}

[data-theme="dark"] .btn-primary {
  background: var(--rose-300);
  color: #2a1f22;
}

.btn-ghost {
  background: transparent;
  border-color: var(--border);
  color: var(--text);
}

.btn-sm {
  height: 36px;
  padding: 0 14px;
  font-size: 14px;
}

.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  color: var(--text-2);
  transition: transform var(--dur-press) var(--ease);
}

.icon-btn:active {
  transform: scale(.94);
}

.icon-btn svg {
  width: 20px;
  height: 20px;
}

/* ---------- 顶栏 / 页面头 ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(14px + env(safe-area-inset-top)) 20px 10px;
}

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

.topbar .date {
  font-size: 13px;
  color: var(--text-2);
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: calc(16px + env(safe-area-inset-top)) 20px 12px;
}

.page-head h1 {
  font-size: 26px;
  font-weight: 650;
  letter-spacing: .01em;
}

.page-head .eyebrow {
  margin-bottom: 5px;
  display: block;
}

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

.page-head .back-btn {
  margin-right: 10px;
}

/* ---------- 内容区 ---------- */
.content {
  padding: 14px 16px calc(30px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.content.flush {
  padding-top: 6px;
}

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

.section-head h2 {
  font-size: 16px;
  font-weight: 650;
}

.demo-note {
  text-align: center;
  font-size: 11px;
  color: var(--text-3);
  padding: 6px 12px 0;
  line-height: 1.7;
}

/* ---------- 英雄区（首页封面） ---------- */
.hero {
  position: relative;
  margin: 2px 16px 0;
  height: clamp(340px, 46vh, 460px);
  border-radius: var(--radius-xl);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  box-shadow: var(--shadow-float);
}

.hero-bokeh {
  position: absolute;
  inset: 0;
  transition: opacity .7s var(--ease);
  background:
    radial-gradient(60% 52% at 22% 16%, rgba(255, 231, 205, .92), transparent 68%),
    radial-gradient(52% 46% at 80% 24%, rgba(243, 198, 192, .78), transparent 70%),
    radial-gradient(72% 62% at 62% 92%, rgba(201, 190, 228, .88), transparent 75%),
    linear-gradient(162deg, #F9E7DC 0%, #EFD9D6 46%, #E3D6EC 100%);
}

[data-theme="dark"] .hero-bokeh {
  background:
    radial-gradient(72% 62% at 30% 10%, #2B3357 0%, transparent 70%),
    radial-gradient(60% 52% at 82% 18%, #3E3460 0%, transparent 70%),
    linear-gradient(162deg, #1B2038 0%, #141624 58%, #0E0F16 100%);
}

.hero-vignette {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(20, 16, 25, 0) 34%, rgba(20, 16, 25, .34) 70%, rgba(16, 13, 22, .78) 100%);
}

#stars {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

[data-theme="light"] #stars {
  display: none;
}

.shooting-star {
  position: absolute;
  width: 90px;
  height: 1.5px;
  border-radius: 2px;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, .9));
  opacity: 0;
  z-index: 1;
  transform: rotate(-28deg);
}

[data-theme="dark"] .shooting-star {
  animation: shoot 22s linear infinite;
}

.shooting-star:nth-child(2) {
  top: 22%;
  animation-delay: 9s;
}

@keyframes shoot {
  0% { opacity: 0; transform: translate(-40px, -40px) rotate(-28deg); }
  3% { opacity: .9; }
  6% { opacity: 0; transform: translate(360px, 160px) rotate(-28deg); }
  100% { opacity: 0; }
}

.hero-photo-hint {
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 2;
  font-size: 11px;
  color: rgba(255, 255, 255, .6);
  letter-spacing: .06em;
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 24px 22px;
  width: 100%;
  color: #fff;
}

.hero-eyebrow {
  font-size: 10px;
  letter-spacing: .3em;
  color: rgba(255, 255, 255, .66);
  margin-bottom: 10px;
  font-weight: 600;
}

.hero-names {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 30px;
  letter-spacing: .02em;
  line-height: 1.2;
}

.hero-names em {
  font-style: normal;
  font-weight: 400;
  margin: 0 8px;
  color: rgba(255, 255, 255, .72);
  font-size: .8em;
}

.hero-sub {
  font-size: 13px;
  color: rgba(255, 255, 255, .86);
  margin-top: 8px;
  letter-spacing: .04em;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 16px;
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 13px;
  background: rgba(24, 18, 28, .32);
  border: 1px solid rgba(255, 255, 255, .28);
  color: #fff;
  backdrop-filter: blur(4px);
}

.hero-pill.ghost {
  cursor: pointer;
}

/* ---------- 聚光灯（纪念日倒计时） ---------- */
.spotlight {
  padding: 18px;
  background:
    linear-gradient(140deg, rgba(255, 253, 249, .0), rgba(243, 198, 192, .12)),
    var(--bg-elev);
  overflow: hidden;
  position: relative;
}

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

.spot-main {
  display: flex;
  align-items: center;
  gap: 18px;
}

.spot-num {
  display: flex;
  align-items: baseline;
  gap: 3px;
  min-width: 82px;
}

.spot-num b {
  font-family: var(--font-display);
  font-size: 46px;
  font-weight: 600;
  color: var(--gold);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.spot-num span {
  font-size: 13px;
  color: var(--text-3);
}

.spot-info h3 {
  font-size: 16px;
  font-weight: 650;
  margin-bottom: 4px;
}

.spot-info p {
  font-size: 13px;
  color: var(--text-3);
}

.spot-link {
  margin-top: 14px;
  border: 0;
  background: none;
  padding: 0;
  font-size: 13px;
  color: var(--rose-600);
}

[data-theme="dark"] .spot-link {
  color: var(--rose-300);
}

/* ---------- 情话卡 ---------- */
.quote-card {
  padding: 20px 20px 16px;
  background: var(--bg-paper);
}

.quote-mark {
  font-family: var(--font-display);
  font-size: 40px;
  line-height: 1;
  color: var(--rose-300);
  display: block;
  margin-bottom: 2px;
}

.quote-text {
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1.9;
  color: var(--text);
}

.quote-foot {
  margin-top: 14px;
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: .06em;
}

/* ---------- 双人日程卡 ---------- */
.partner-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.partner-card {
  text-align: left;
  padding: 14px;
  border-radius: var(--radius-md);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  transition: transform var(--dur-press) var(--ease);
}

.partner-card:active {
  transform: scale(.98);
}

.partner-top {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
}

.avatar-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.avatar-dot.purple { background: var(--purple-500); }
.avatar-dot.rose { background: var(--rose-500); }

.partner-top b {
  font-size: 13px;
  font-weight: 650;
}

.partner-top span {
  font-size: 11px;
  color: var(--text-3);
  margin-left: auto;
}

.partner-course b {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  line-height: 1.35;
}

.partner-course small {
  display: block;
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.5;
}

.partner-empty {
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.5;
}

/* ---------- 图片轨道 / 网格 ---------- */
.rail {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  scrollbar-width: none;
  margin: 0 -2px;
}

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

.photo-thumb {
  position: relative;
  flex: 0 0 128px;
  height: 160px;
  border: 0;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
  padding: 0;
}

.photo-cap {
  position: absolute;
  inset: auto 0 0 0;
  padding: 22px 10px 9px;
  font-size: 11px;
  color: #fff;
  text-align: left;
  background: linear-gradient(180deg, transparent, rgba(12, 10, 18, .72));
}

/* 演示图片的抽象渐变 */
.grad { position: relative; }
.grad-sunset { background: radial-gradient(60% 55% at 30% 12%, #FFD9A8, transparent 70%), linear-gradient(160deg, #F7C9A3 0%, #E79E8E 48%, #8E6FA8 100%); }
.grad-rain { background: radial-gradient(50% 40% at 70% 20%, rgba(255,255,255,.5), transparent 65%), linear-gradient(160deg, #BFD3D2 0%, #8FB3C7 55%, #6E8CAD 100%); }
.grad-food { background: radial-gradient(60% 50% at 70% 26%, #FFE1A8, transparent 68%), linear-gradient(160deg, #E8B98A 0%, #C98A6A 55%, #8A5A44 100%); }
.grad-mountain { background: radial-gradient(55% 45% at 30% 20%, rgba(255,255,255,.6), transparent 66%), linear-gradient(170deg, #D9E6C8 0%, #A8C79B 50%, #7FA383 100%); }
.grad-sea { background: radial-gradient(60% 50% at 30% 24%, rgba(255,255,255,.55), transparent 66%), linear-gradient(168deg, #B7D9D0 0%, #7FAEC6 55%, #5E86A8 100%); }
.grad-night { background: radial-gradient(70% 60% at 70% 16%, #4A4268, transparent 70%), linear-gradient(162deg, #232A4A 0%, #2E3154 55%, #171828 100%); }
.grad-light { background: radial-gradient(55% 45% at 60% 30%, #FFF3D6, transparent 62%), linear-gradient(160deg, #F6E9D2 0%, #E9D6C0 60%, #D8C0A8 100%); }
.grad-autumn { background: radial-gradient(60% 50% at 70% 18%, #FFE0A0, transparent 66%), linear-gradient(160deg, #E7B06A 0%, #C9825A 52%, #8A5A3C 100%); }

/* ---------- 信箱入口 ---------- */
.letter-tease {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 16px;
  text-align: left;
}

.tease-main {
  flex: 1;
  min-width: 0;
}

.tease-main b {
  display: block;
  font-size: 14px;
  font-weight: 650;
  margin-bottom: 3px;
}

.tease-main small {
  display: block;
  font-size: 12px;
  color: var(--text-2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.envelope-badge {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: var(--rose-100);
  color: var(--rose-600);
  flex: 0 0 auto;
}

[data-theme="dark"] .envelope-badge {
  color: var(--rose-300);
}

.envelope-badge svg {
  width: 22px;
  height: 22px;
}

/* ---------- 快捷入口 ---------- */
.quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.quick {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 15px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--bg-elev);
  font-size: 14px;
  font-weight: 600;
  box-shadow: var(--shadow-card);
  text-align: left;
  transition: transform var(--dur-press) var(--ease);
}

.quick:active {
  transform: scale(.98);
}

.quick-ico {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--purple-100);
  color: var(--purple-600);
  flex: 0 0 auto;
}

.quick:nth-child(2) .quick-ico { background: var(--rose-100); color: var(--rose-600); }
.quick:nth-child(3) .quick-ico { background: var(--rose-100); color: var(--rose-600); }
.quick:nth-child(4) .quick-ico { background: var(--purple-100); color: var(--purple-600); }

.quick-ico svg {
  width: 20px;
  height: 20px;
}

/* ---------- 底部导航 ---------- */
.tabbar {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  background: var(--bg-elev);
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 5;
}

.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 0;
  border: 0;
  background: none;
  color: var(--text-3);
  font-size: 11px;
  transition: color var(--dur-ui) var(--ease);
}

.tab-icon {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  transition: background var(--dur-ui) var(--ease), color var(--dur-ui) var(--ease);
}

.tab-icon svg {
  width: 22px;
  height: 22px;
}

.tab.active {
  color: var(--text);
}

.tab.active .tab-icon {
  background: var(--rose-100);
  color: var(--rose-600);
}

[data-theme="dark"] .tab.active .tab-icon {
  color: var(--rose-300);
}

/* ---------- 分段控件 ---------- */
.segmented {
  display: flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: var(--bg-subtle);
  margin: 0 16px 12px;
}

.segmented button {
  flex: 1;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-2);
  font-size: 13px;
  font-weight: 500;
  transition: background var(--dur-ui) var(--ease), color var(--dur-ui) var(--ease), box-shadow var(--dur-ui) var(--ease);
}

.segmented button.active {
  background: var(--seg-active-bg);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .08);
}

/* ---------- 星期切换 ---------- */
.day-strip {
  display: flex;
  gap: 8px;
  padding: 0 16px 12px;
}

.day-chip {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 12px;
  color: var(--text-2);
  transition: transform var(--dur-press) var(--ease), background var(--dur-ui) var(--ease), color var(--dur-ui) var(--ease);
}

.day-chip .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--rose-500);
}

.day-chip.active {
  background: var(--rose-600);
  border-color: transparent;
  color: #fff;
}

[data-theme="dark"] .day-chip.active {
  background: var(--rose-300);
  color: #2a1f22;
}

.day-chip.active .dot {
  background: rgba(255, 255, 255, .8);
}

/* ---------- 课程表 ---------- */
.course-row {
  width: 100%;
  display: flex;
  align-items: stretch;
  gap: 12px;
  padding: 13px 16px;
  border: 0;
  background: var(--bg-elev);
  text-align: left;
  border-bottom: 1px solid var(--border);
}

.course-row:last-child {
  border-bottom: 0;
}

.course-row:active {
  background: var(--bg-subtle);
}

.course-time {
  width: 44px;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex: 0 0 auto;
}

.course-time b {
  font-size: 13px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.course-time i {
  font-style: normal;
  font-size: 11px;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}

.course-bar {
  width: 4px;
  border-radius: 4px;
  background: var(--c, var(--purple-500));
  flex: 0 0 auto;
}

.course-bar.rose { background: var(--rose-500); }
.course-bar.purple { background: var(--purple-500); }

.course-main {
  flex: 1;
  min-width: 0;
}

.course-main b {
  display: block;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 3px;
}

.course-main small {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.4;
  display: block;
}

.owner-chip {
  display: inline-block;
  margin-top: 5px;
  font-size: 10px;
  padding: 1px 7px;
  border-radius: 999px;
  color: var(--purple-600);
  background: var(--purple-100);
}

.owner-chip.rose {
  color: var(--rose-600);
  background: var(--rose-100);
}

.week-list {
  overflow: hidden;
}

.week-row {
  display: flex;
  gap: 12px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
}

.week-row:last-child {
  border-bottom: 0;
}

.week-day {
  width: 34px;
  flex: 0 0 auto;
  font-size: 13px;
  color: var(--text-2);
  padding-top: 4px;
}

.week-courses {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.course-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 9px 12px;
  border-radius: 12px;
  border: 0;
  text-align: left;
  background: var(--purple-100);
  color: var(--purple-600);
  font-size: 13px;
}

.course-chip.rose {
  background: var(--rose-100);
  color: var(--rose-600);
}

.course-chip b {
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.course-chip span {
  font-size: 11px;
  opacity: .85;
  flex: 0 0 auto;
  font-variant-numeric: tabular-nums;
}

.week-none {
  font-size: 12px;
  color: var(--text-3);
  padding: 6px 0;
}

/* ---------- 共同空闲 ---------- */
.free-card {
  padding: 16px;
  background:
    linear-gradient(150deg, rgba(239, 235, 248, .4), transparent 60%),
    var(--bg-elev);
}

[data-theme="dark"] .free-card {
  background:
    linear-gradient(150deg, rgba(36, 33, 53, .5), transparent 60%),
    var(--bg-elev);
}

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

.free-head h2 {
  font-size: 15px;
  font-weight: 650;
}

.free-note {
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.6;
  margin-bottom: 12px;
}

.free-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed var(--border);
}

.free-list li:last-child {
  border-bottom: 0;
}

.free-list b {
  width: 62px;
  font-size: 13px;
  font-weight: 650;
  flex: 0 0 auto;
}

.free-list span {
  flex: 1;
  font-size: 13px;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

.free-list em {
  font-style: normal;
  font-size: 12px;
  color: var(--gold);
}

.free-list .muted {
  font-size: 12px;
  color: var(--text-3);
}

/* ---------- 相册 / 照片网格 ---------- */
.album-row {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 2px 16px 6px;
}

.album-row::-webkit-scrollbar {
  display: none;
}

.album-card {
  flex: 0 0 140px;
  text-align: left;
  border: 0;
  padding: 0;
  background: none;
}

.album-cover {
  height: 104px;
  border-radius: 18px;
  box-shadow: var(--shadow-card);
  position: relative;
}

.album-cover::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 18px;
  background: linear-gradient(180deg, transparent 50%, rgba(12, 10, 18, .45));
}

.album-card b {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-top: 8px;
}

.album-card small {
  font-size: 11px;
  color: var(--text-3);
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 0 16px;
}

.photo-grid .photo-thumb {
  width: 100%;
  height: 0;
  padding-bottom: 100%;
  border-radius: 14px;
  flex: 0 0 auto;
}

/* ---------- 时间轴 ---------- */
.year-sep {
  margin: 6px 16px 10px;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 12px;
}

.year-sep::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.tl {
  padding: 0 16px;
}

.tl-item {
  position: relative;
  padding: 0 0 16px 24px;
  border-left: 1px solid var(--border);
  margin-left: 6px;
}

.tl-item::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 5px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 3px var(--bg);
}

.tl-date {
  font-size: 12px;
  color: var(--text-3);
  margin-bottom: 8px;
}

.tl-card {
  padding: 15px;
  border-radius: var(--radius-md);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}

.tl-card h3 {
  font-size: 15px;
  font-weight: 650;
  margin-bottom: 4px;
}

.tl-place {
  font-size: 12px;
  color: var(--text-2);
  margin-bottom: 8px;
}

.tl-text {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-2);
}

.mood-chip {
  display: inline-block;
  margin-top: 10px;
  font-size: 11px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--rose-100);
  color: var(--rose-600);
}

/* ---------- 感动瞬间 ---------- */
.moment-card {
  display: flex;
  gap: 12px;
  padding: 15px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  margin: 0 16px 10px;
}

.moment-emoji {
  width: 40px;
  height: 40px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  font-size: 20px;
  background: var(--bg-subtle);
  flex: 0 0 auto;
}

.moment-body p {
  font-size: 14px;
  line-height: 1.7;
}

.moment-body small {
  display: block;
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-3);
}

/* ---------- 信箱 ---------- */
.letter-list {
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.letter-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 16px;
  text-align: left;
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  transition: transform var(--dur-press) var(--ease);
}

.letter-card:active {
  transform: scale(.985);
}

.letter-ico {
  width: 44px;
  height: 44px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  background: var(--bg-subtle);
  color: var(--text-2);
}

.letter-ico svg {
  width: 22px;
  height: 22px;
}

.letter-ico.locked {
  background: var(--rose-100);
  color: var(--rose-600);
}

.letter-info {
  flex: 1;
  min-width: 0;
}

.letter-info .from {
  font-size: 11px;
  color: var(--text-3);
  margin-bottom: 3px;
}

.letter-info .title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.letter-info .hint {
  font-size: 12px;
  color: var(--rose-600);
}

[data-theme="dark"] .letter-info .hint {
  color: var(--rose-300);
}

.letter-info .meta {
  font-size: 11px;
  color: var(--text-3);
}

.letter-card .star {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 0;
  background: none;
  color: var(--text-3);
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}

.letter-card .star.on {
  color: var(--gold);
}

.letter-card .star svg {
  width: 19px;
  height: 19px;
}

/* 信封锁徽标 */
.lock-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  color: var(--rose-600);
  background: var(--rose-100);
  padding: 3px 9px;
  border-radius: 999px;
}

[data-theme="dark"] .lock-chip {
  color: var(--rose-300);
}

.lock-chip svg {
  width: 12px;
  height: 12px;
}

/* ---------- 我们（更多） ---------- */
.profile-card {
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 0;
}

.member {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 11px;
}

.member + .member {
  padding-left: 16px;
  border-left: 1px solid var(--border);
}

.member-avatar {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 19px;
  color: #fff;
  flex: 0 0 auto;
}

.member-avatar.purple { background: linear-gradient(145deg, #B3A4DD, #7A69A6); }
.member-avatar.rose { background: linear-gradient(145deg, #F0B3AC, #C77F78); }

.member b {
  display: block;
  font-size: 14px;
  font-weight: 650;
}

.member small {
  font-size: 11px;
  color: var(--text-3);
}

.space-card {
  padding: 4px 16px;
}

.space-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid var(--border);
}

.space-row:last-child {
  border-bottom: 0;
}

.space-row .k {
  width: 84px;
  flex: 0 0 auto;
  font-size: 13px;
  color: var(--text-2);
}

.space-row .v {
  flex: 1;
  font-size: 14px;
  font-weight: 500;
  text-align: right;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.space-row .v.muted {
  color: var(--text-3);
  font-weight: 400;
}

.menu-list {
  overflow: hidden;
}

.menu-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 16px;
  border: 0;
  background: none;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 15px;
}

.menu-row:last-child {
  border-bottom: 0;
}

.menu-row:active {
  background: var(--bg-subtle);
}

.menu-ico {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--purple-100);
  color: var(--purple-600);
  flex: 0 0 auto;
}

.menu-ico.rose { background: var(--rose-100); color: var(--rose-600); }

.menu-ico svg {
  width: 19px;
  height: 19px;
}

.menu-row .label {
  flex: 1;
}

.menu-row small {
  display: block;
  font-size: 11px;
  color: var(--text-3);
  margin-top: 2px;
}

/* ---------- 纪念日卡片 ---------- */
.aniv-list {
  padding: 0 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.aniv-card {
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}

.aniv-top {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 8px;
}

.aniv-day {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 600;
  color: var(--gold);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  min-width: 54px;
  text-align: center;
}

.aniv-day small {
  display: block;
  font-family: var(--font-ui);
  font-size: 11px;
  color: var(--text-3);
  font-weight: 400;
  margin-top: 3px;
}

.aniv-top .t h3 {
  font-size: 15px;
  font-weight: 650;
  margin-bottom: 3px;
}

.aniv-top .t p {
  font-size: 12px;
  color: var(--text-3);
}

.aniv-story {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.6;
  padding-top: 10px;
  border-top: 1px dashed var(--border);
}

/* ---------- 100 件事 ---------- */
.wish-progress {
  margin: 0 16px 14px;
  padding: 18px;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(140deg, rgba(255, 253, 249, 0), rgba(243, 198, 192, .14)),
    var(--bg-elev);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
}

.wish-progress .top {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 12px;
}

.wish-progress .top b {
  font-family: var(--font-display);
  font-size: 38px;
  font-weight: 600;
  color: var(--rose-600);
  font-variant-numeric: tabular-nums;
}

[data-theme="dark"] .wish-progress .top b {
  color: var(--rose-300);
}

.wish-progress .top span {
  font-size: 13px;
  color: var(--text-2);
}

.wish-progress .top em {
  font-style: normal;
  font-size: 12px;
  color: var(--text-3);
  margin-left: auto;
}

.bar {
  height: 6px;
  border-radius: 999px;
  background: var(--bg-subtle);
  overflow: hidden;
}

.bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--rose-300), var(--rose-600));
  transition: width .5s var(--ease);
}

.cat-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0 16px 12px;
}

.cat-chips::-webkit-scrollbar {
  display: none;
}

.cat-chip {
  flex: 0 0 auto;
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg-elev);
  font-size: 13px;
  color: var(--text-2);
}

.cat-chip.active {
  background: var(--purple-500);
  border-color: transparent;
  color: #fff;
}

.wish-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  background: var(--bg-elev);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  margin: 0 16px 10px;
  text-align: left;
  width: auto;
}

.wish-check {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  display: grid;
  place-items: center;
  color: #fff;
  flex: 0 0 auto;
  transition: background var(--dur-ui) var(--ease), border-color var(--dur-ui) var(--ease), transform var(--dur-press) var(--ease);
}

.wish-check svg {
  width: 14px;
  height: 14px;
  opacity: 0;
  transition: opacity var(--dur-ui) var(--ease);
}

.wish-item.done .wish-check {
  background: var(--rose-600);
  border-color: transparent;
}

[data-theme="dark"] .wish-item.done .wish-check {
  background: var(--rose-300);
  color: #2a1f22;
}

.wish-item.done .wish-check svg {
  opacity: 1;
}

.wish-info {
  flex: 1;
  min-width: 0;
}

.wish-info b {
  display: block;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 3px;
}

.wish-info small {
  font-size: 11px;
  color: var(--text-3);
}

.wish-item.done .wish-info b {
  color: var(--text-3);
  text-decoration: line-through;
  text-decoration-color: var(--rose-300);
}

/* ---------- 设置 ---------- */
.setting-group {
  margin: 0 16px 14px;
}

.setting-group h3 {
  font-size: 12px;
  color: var(--text-3);
  font-weight: 600;
  letter-spacing: .04em;
  margin: 0 4px 8px;
}

.setting-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}

.setting-row:last-child {
  border-bottom: 0;
}

.setting-row .k {
  flex: 1;
  font-size: 14px;
}

.setting-row small {
  display: block;
  font-size: 11px;
  color: var(--text-3);
  margin-top: 3px;
}

/* ---------- 空状态 ---------- */
.empty {
  text-align: center;
  padding: 34px 24px;
  color: var(--text-3);
}

.empty .art {
  font-size: 34px;
  margin-bottom: 12px;
}

.empty p {
  font-size: 14px;
  line-height: 1.7;
  margin-bottom: 14px;
}

/* ---------- 弹层 / 抽屉 ---------- */
.overlay-root {
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
}

.overlay-root.open {
  pointer-events: auto;
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: var(--overlay);
  opacity: 0;
  transition: opacity .26s var(--ease);
}

.overlay-root.open .sheet-backdrop {
  opacity: 1;
}

.sheet {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 88%;
  overflow-y: auto;
  background: var(--bg-elev);
  border-radius: 28px 28px 0 0;
  padding: 10px 20px calc(20px + env(safe-area-inset-bottom));
  transform: translateY(102%);
  transition: transform .3s var(--ease);
  scrollbar-width: none;
}

.overlay-root.open .sheet {
  transform: translateY(0);
}

.sheet-grabber {
  width: 36px;
  height: 4px;
  border-radius: 4px;
  background: var(--border-strong);
  margin: 4px auto 14px;
}

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

.sheet-head h2 {
  font-size: 18px;
  font-weight: 650;
}

/* ---------- 表单 ---------- */
.field {
  display: block;
  margin-bottom: 14px;
}

.field > span {
  display: block;
  font-size: 12px;
  color: var(--text-2);
  margin-bottom: 7px;
}

.input,
.textarea,
select.input {
  width: 100%;
  height: 46px;
  border: 1px solid var(--border);
  background: var(--bg-subtle);
  border-radius: 12px;
  padding: 0 14px;
  font-size: 16px;
  color: var(--text);
  font-family: var(--font-ui);
  appearance: none;
}

.textarea {
  height: auto;
  min-height: 120px;
  padding: 12px 14px;
  line-height: 1.7;
  resize: vertical;
}

.input:focus,
.textarea:focus {
  outline: none;
  border-color: var(--rose-500);
}

.input:disabled {
  opacity: .7;
}

.hint {
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.6;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.form-actions .btn {
  flex: 1;
}

.unlock-opts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.opt {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 13px;
  border-radius: 12px;
  border: 1px solid var(--border);
  font-size: 14px;
}

.opt input {
  accent-color: var(--rose-600);
}

/* ---------- 弹窗（全屏阅读/看图） ---------- */
.viewer {
  position: absolute;
  inset: 0;
  background: var(--overlay-strong);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  transition: opacity .26s var(--ease);
}

.overlay-root.open .viewer {
  opacity: 1;
}

.viewer-media {
  width: min(100%, 420px);
  aspect-ratio: 4 / 5;
  border-radius: 20px;
  box-shadow: var(--shadow-float);
}

.viewer-info {
  margin-top: 18px;
  color: rgba(255, 255, 255, .92);
  text-align: center;
}

.viewer-info p {
  font-size: 15px;
  margin-bottom: 5px;
}

.viewer-info span {
  font-size: 12px;
  color: rgba(255, 255, 255, .55);
}

.viewer-close {
  position: absolute;
  top: calc(16px + env(safe-area-inset-top));
  right: 18px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  font-size: 22px;
  line-height: 1;
}

/* 读信 */
.reader {
  position: absolute;
  inset: 0;
  background: var(--overlay-strong);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity .26s var(--ease);
}

.overlay-root.open .reader {
  opacity: 1;
}

.letter-paper {
  position: relative;
  width: min(100%, 400px);
  max-height: 86%;
  overflow-y: auto;
  background: var(--bg-paper);
  color: var(--text);
  border-radius: 18px;
  padding: 30px 26px;
  box-shadow: var(--shadow-float);
  animation: letterIn .7s var(--ease);
  scrollbar-width: none;
}

[data-theme="dark"] .letter-paper {
  background: #23222b;
  color: #f2ede6;
}

@keyframes letterIn {
  from { opacity: 0; transform: translateY(26px) rotateX(6deg); }
  to { opacity: 1; transform: translateY(0) rotateX(0); }
}

.letter-paper::before {
  content: '';
  position: absolute;
  top: 18px;
  right: 20px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 36%, #e9a9a2, #b85c55);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .25);
  transform: rotate(-8deg);
}

.letter-paper .meta {
  font-size: 11px;
  color: var(--text-3);
  margin-bottom: 14px;
}

.letter-paper h2 {
  font-family: var(--font-display);
  font-size: 21px;
  font-weight: 600;
  margin-bottom: 16px;
  line-height: 1.4;
}

.letter-paper .body {
  font-family: var(--font-display);
  font-size: 16px;
  line-height: 2;
  white-space: pre-wrap;
}

.letter-paper .foot {
  margin-top: 22px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
  font-size: 11px;
  color: var(--text-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.reader-close {
  position: absolute;
  top: calc(16px + env(safe-area-inset-top));
  left: 18px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, .14);
  color: #fff;
  font-size: 20px;
  line-height: 1;
}

/* 写信 */
.compose {
  position: absolute;
  inset: 0;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  animation: composeIn .28s var(--ease);
}

@keyframes composeIn {
  from { transform: translateX(8%); opacity: .4; }
  to { transform: translateX(0); opacity: 1; }
}

.compose-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(12px + env(safe-area-inset-top)) 16px 12px;
  border-bottom: 1px solid var(--border);
}

.compose-head h2 {
  font-size: 17px;
  font-weight: 650;
  flex: 1;
  text-align: center;
}

.compose-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  scrollbar-width: none;
}

.compose-foot {
  display: flex;
  gap: 10px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
}

.compose-foot .btn {
  flex: 1;
}

/* ---------- 提示 ---------- */
.toast-root {
  position: fixed;
  left: 50%;
  bottom: calc(92px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}

.toast {
  background: rgba(24, 20, 30, .92);
  color: #fff;
  font-size: 13px;
  padding: 10px 16px;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .28);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .26s var(--ease), transform .26s var(--ease);
  max-width: 86vw;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}
