:root {
  /* 粉紫主色：兰紫 + 玫瑰粉，整体偏暖、偏浪漫 */
  --cream: #fdf7fd;
  --ink: #2c2140;
  --ink-soft: #75688a;
  --sage: #a15fd0;
  --sage-soft: #f4e9fc;
  --rose: #e4699f;
  --rose-soft: #fdeaf5;
  --sand: #f7ecfa;
  --line: #ecdff2;
  --white: #ffffff;
  --grad: linear-gradient(135deg, #b06ad8 0%, #e4699f 100%);
  --grad-soft: linear-gradient(135deg, #f3e7fc 0%, #fde8f4 100%);
  --shadow: 0 8px 24px rgba(150, 90, 180, 0.10);
  --shadow-press: inset 0 3px 10px rgba(90, 40, 120, 0.18);
  --radius: 22px;
  --topbar: 52px;
  --tabs: 58px;
}

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

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--cream);
  color: var(--ink);
  font-family: -apple-system, "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  overscroll-behavior: none;
}

button, input, textarea, select {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button {
  border: none;
  background: none;
  cursor: pointer;
}

#topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: calc(var(--topbar) + env(safe-area-inset-top));
  padding: env(safe-area-inset-top) 12px 0;
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(253, 247, 253, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  z-index: 20;
}

#topbar h1 {
  flex: 1;
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: center;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.iconbtn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 20px;
  color: var(--ink-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}

.iconbtn:active {
  background: var(--sand);
  transform: scale(0.9);
}

.iconbtn { transition: transform 0.08s ease, background-color 0.12s ease; }

.iconbtn[hidden] {
  visibility: hidden;
  display: flex;
}

#view {
  padding: calc(var(--topbar) + env(safe-area-inset-top) + 14px) 16px calc(var(--tabs) + env(safe-area-inset-bottom) + 28px);
  animation: fade 0.22s ease;
  position: relative;
  z-index: 1;
}

@keyframes fade {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: none; }
}

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.22em;
  color: var(--sage);
  text-transform: uppercase;
}

.title {
  font-size: 25px;
  line-height: 1.34;
  font-weight: 600;
  margin: 6px 0 0;
}

.subtitle {
  color: var(--ink-soft);
  font-size: 13.5px;
  margin-top: 8px;
}

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 14px;
  box-shadow: var(--shadow);
}

.card.sage { background: var(--sage-soft); border-color: #d5e3db; }
.card.rose { background: var(--rose-soft); border-color: #f0dcd6; }
.card.sand { background: #fdf8f1; border-color: var(--sand); }

.section-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.copy {
  color: var(--ink-soft);
  font-size: 13.5px;
  white-space: pre-wrap;
  word-break: break-word;
}

.quote {
  font-size: 17px;
  line-height: 1.7;
  color: var(--ink);
}

.muted {
  color: var(--ink-soft);
  font-size: 13px;
}

.tag {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--sand);
  color: #7a5a90;
  font-size: 11px;
  margin-right: 6px;
}

.tag.sage { background: var(--sage-soft); color: #7b3fa8; }
.tag.rose { background: var(--rose-soft); color: #c2447e; }

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

.row.between { justify-content: space-between; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; }
.mt { margin-top: 12px; }
.mt-s { margin-top: 8px; }

.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 14px;
}

.entry {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 14px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.entry:active { background: #f7f1ea; }
.entry { transition: transform 0.08s ease, background-color 0.12s ease; }
.entry:active { transform: scale(0.975); box-shadow: inset 0 3px 10px rgba(0, 0, 0, 0.08); }
.entry .icon { font-size: 20px; }
.entry .name { font-weight: 600; font-size: 14.5px; }
.entry .desc { color: var(--ink-soft); font-size: 12px; line-height: 1.5; }

.btn {
  display: block;
  width: 100%;
  padding: 13px 16px;
  border-radius: 14px;
  background: var(--grad);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  text-align: center;
  margin-top: 12px;
  box-shadow: 0 6px 16px rgba(160, 95, 208, 0.28);
  position: relative;
  overflow: hidden;
}

.btn:active { opacity: 0.86; }
.btn { transition: transform 0.07s ease, box-shadow 0.12s ease, background-color 0.12s ease; }
.btn:active {
  transform: translateY(2px) scale(0.985);
  box-shadow: inset 0 3px 9px rgba(0, 0, 0, 0.22);
  opacity: 0.94;
}

.btn.plain:active, .btn.ghost:active {
  background: rgba(92, 127, 112, 0.16);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.1);
}
.btn[disabled] { opacity: 0.45; }

.btn.ghost {
  background: var(--grad-soft);
  color: var(--sage);
  border: 1px solid transparent;
  box-shadow: none;
}

.btn.plain {
  background: transparent;
  color: var(--ink-soft);
  font-weight: 600;
  border: 1px solid var(--line);
  box-shadow: none;
}

.btn.danger { background: transparent; color: #b0453a; border: 1px solid #e6c3bd; }
.btn.small { padding: 8px 12px; font-size: 13px; width: auto; display: inline-block; }

.field, .textarea {
  width: 100%;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  margin-top: 10px;
  outline: none;
  resize: none;
}

.textarea { min-height: 118px; line-height: 1.7; }
.field:focus, .textarea:focus { border-color: var(--sage); }

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.chip {
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink-soft);
  font-size: 13px;
}

.chip.active {
  background: var(--sage);
  border-color: var(--sage);
  color: #fff;
}

.chip { transition: transform 0.07s ease, background-color 0.12s ease; }
.chip:active { transform: scale(0.94); }

.list-item { transition: background-color 0.12s ease; }
.list-item:active { background: rgba(92, 127, 112, 0.12); }

.list-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.list-item:last-child { border-bottom: none; }

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 600;
  color: #fff;
  background: var(--grad);
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(160, 95, 208, 0.24);
}

.avatar.rose { background: linear-gradient(135deg, #e4699f, #f0a3c4); color: #fff; }
.avatar.sand { background: linear-gradient(135deg, #b06ad8, #8f7ae0); color: #fff; }

.bubble {
  max-width: 88%;
  padding: 12px 14px;
  border-radius: 16px;
  background: #fff;
  border: 1px solid var(--line);
  white-space: pre-wrap;
  word-break: break-word;
  margin-top: 10px;
  font-size: 14.5px;
}

.bubble.me {
  margin-left: auto;
  background: var(--grad);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 16px rgba(160, 95, 208, 0.24);
  border-bottom-right-radius: 6px;
}

.bubble { box-shadow: var(--shadow); border-bottom-left-radius: 6px; }

.bubble .meta {
  display: block;
  margin-top: 8px;
  font-size: 11px;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}

.bubble.me .meta { color: rgba(255,255,255,0.75); }

.composer {
  display: flex;
  gap: 8px;
  align-items: flex-end;
  margin-top: 14px;
  position: sticky;
  bottom: calc(var(--tabs) + env(safe-area-inset-bottom) + 8px);
  background: linear-gradient(to top, var(--cream) 70%, rgba(251,247,242,0));
  padding-top: 10px;
}

.composer .textarea {
  margin-top: 0;
  min-height: 48px;
  max-height: 140px;
  flex: 1;
}

.composer .btn {
  width: auto;
  margin-top: 0;
  padding: 12px 18px;
  flex-shrink: 0;
}

.photos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.photo {
  position: relative;
  padding-top: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: var(--sand);
}

.photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.photo .remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0,0,0,0.5);
  color: #fff;
  font-size: 13px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo.add {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink-soft);
  font-size: 22px;
  border: 1px dashed var(--line);
  background: #fff;
}

.photo.add::after { content: "+"; }

.tabbar-note {
  text-align: center;
  color: #a894b8;
  font-size: 11.5px;
  margin-top: 22px;
}

#tabs {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: calc(var(--tabs) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  display: flex;
  background: rgba(251, 247, 242, 0.97);
  border-top: 1px solid var(--line);
  z-index: 20;
}

#tabs .tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 11px;
  color: #a894b8;
}

#tabs .tab span { font-size: 17px; line-height: 1; }
#tabs .tab span { transition: transform 0.08s ease; }
#tabs .tab:active span { transform: scale(0.84); }
#tabs .tab.active { color: var(--sage); font-weight: 600; }

#viewer {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(14, 18, 17, 0.96);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 20px;
}

#viewer[hidden] { display: none; }

#viewerStage {
  flex: 1;
  width: 100%;
  overflow: auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

#viewerStage img {
  max-width: 100%;
  max-height: 74vh;
  object-fit: contain;
  border-radius: 10px;
}

#viewerStage video {
  max-width: 100%;
  max-height: 74vh;
  border-radius: 10px;
  background: #000;
}

#viewerStage video[hidden] { display: none; }

.live-badge {
  position: absolute;
  left: 4px;
  top: 4px;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  font-size: 10px;
  line-height: 1.6;
}

.photo video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

#viewerZoomLabel {
  color: #e8ded6;
  font-size: 13px;
  min-width: 42px;
  text-align: center;
  align-self: center;
}

.viewer-actions {
  display: flex;
  gap: 10px;
}

.viewer-actions .btn {
  width: auto;
  margin: 0;
  padding: 10px 18px;
}

#viewerHint {
  color: #e8ded6;
  font-size: 14px;
  text-align: center;
  max-width: 80%;
  line-height: 1.7;
}

#viewerHint[hidden] { display: none; }

#toast {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabs) + env(safe-area-inset-bottom) + 24px);
  transform: translateX(-50%);
  background: rgba(35, 48, 44, 0.92);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  z-index: 60;
  max-width: 80%;
  text-align: center;
}

#toast[hidden],
#sheet[hidden] {
  display: none;
}

#sheet {
  position: fixed;
  inset: 0;
  background: rgba(35, 48, 44, 0.4);
  z-index: 50;
  display: flex;
  align-items: flex-end;
  animation: fade 0.2s ease;
}

.sheet-panel {
  width: 100%;
  max-height: 86%;
  overflow-y: auto;
  background: var(--cream);
  border-radius: 22px 22px 0 0;
  padding: 22px 18px calc(28px + env(safe-area-inset-bottom));
  animation: rise 0.24s ease;
}

@keyframes rise {
  from { transform: translateY(40px); }
  to { transform: none; }
}

.switch {
  width: 50px;
  height: 30px;
  border-radius: 999px;
  background: #ded4c7;
  position: relative;
  transition: background 0.18s ease;
  flex-shrink: 0;
}

.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.18s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.18);
}

.switch.on { background: var(--sage); }
.switch.on::after { transform: translateX(20px); }

.kv {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
}

.kv:last-child { border-bottom: none; }
.kv .k { color: var(--ink-soft); flex-shrink: 0; }
.kv .v { text-align: right; word-break: break-all; }

.empty {
  text-align: center;
  color: var(--ink-soft);
  padding: 38px 20px;
  font-size: 14px;
  line-height: 1.8;
}

.spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  vertical-align: -2px;
  margin-right: 6px;
}

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

/* ------------------------- 交互反馈与过渡 ------------------------- */

/* 页面切换：前进从右滑入，返回从左滑入，切标签淡入上浮 */
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to { opacity: 1; transform: none; }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-20px); }
  to { opacity: 1; transform: none; }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

#view.forward { animation: slideInRight 0.26s cubic-bezier(0.22, 0.8, 0.3, 1); }
#view.back { animation: slideInLeft 0.26s cubic-bezier(0.22, 0.8, 0.3, 1); }
#view.tabbed { animation: fadeUp 0.24s cubic-bezier(0.22, 0.8, 0.3, 1); }

/* 列表里的卡片依次浮现，不要一次全冒出来 */
#view.nav > .card,
#view.nav > .entry,
#view.nav > .list-item {
  animation: fadeUp 0.32s cubic-bezier(0.22, 0.8, 0.3, 1) backwards;
}

#view.nav > *:nth-child(1) { animation-delay: 0.01s; }
#view.nav > *:nth-child(2) { animation-delay: 0.04s; }
#view.nav > *:nth-child(3) { animation-delay: 0.07s; }
#view.nav > *:nth-child(4) { animation-delay: 0.1s; }
#view.nav > *:nth-child(5) { animation-delay: 0.13s; }
#view.nav > *:nth-child(6) { animation-delay: 0.16s; }
#view.nav > *:nth-child(7) { animation-delay: 0.19s; }
#view.nav > *:nth-child(8) { animation-delay: 0.22s; }

/* 点击水波：按钮、卡片、列表都有 */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%) scale(0);
  animation: rippleGo 0.55s ease-out forwards;
  pointer-events: none;
}

@keyframes rippleGo {
  to { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}

.btn.plain .ripple,
.btn.ghost .ripple,
.btn.danger .ripple { background: rgba(161, 95, 208, 0.22); }

.chip,
.entry,
.list-item,
.iconbtn { position: relative; overflow: hidden; }

.chip .ripple,
.entry .ripple,
.list-item .ripple,
.iconbtn .ripple { background: rgba(161, 95, 208, 0.18); }

/* 顶部加载条：有网络请求时出现 */
#progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  width: 100%;
  z-index: 80;
  background: linear-gradient(90deg, #b06ad8, #e4699f, #b06ad8);
  background-size: 200% 100%;
  animation: progressSlide 1.1s linear infinite;
}

#progress[hidden] { display: none; }

@keyframes progressSlide {
  to { background-position: -200% 0; }
}

/* 弹层：更柔和的回弹 + 顶部小横条 */
.sheet-panel {
  animation: sheetUp 0.32s cubic-bezier(0.2, 0.9, 0.3, 1.04);
}

@keyframes sheetUp {
  from { transform: translateY(46px); opacity: 0.6; }
  to { transform: none; opacity: 1; }
}

.sheet-panel::before {
  content: "";
  display: block;
  width: 44px;
  height: 4px;
  border-radius: 3px;
  background: var(--line);
  margin: -8px auto 14px;
}

/* 底部标签：选中时出现一个小圆点 */
#tabs .tab { position: relative; }

#tabs .tab::after {
  content: "";
  position: absolute;
  bottom: 6px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--grad);
  opacity: 0;
  transform: scale(0.4);
  transition: opacity 0.22s ease, transform 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.4);
}

#tabs .tab.active::after { opacity: 1; transform: scale(1); }

/* 输入框聚焦时有一点光晕，像主流 App */
.field:focus,
.textarea:focus {
  border-color: var(--sage);
  box-shadow: 0 0 0 3px rgba(161, 95, 208, 0.12);
}

/* 顶部文案卡片用渐变，视觉上更像“封面” */
.card.sage {
  background: var(--grad-soft);
  border-color: transparent;
}

.entry:active { transform: scale(0.97); }
.list-item:active { transform: scale(0.99); }

/* --------------------- 氛围：光斑与星光（来自参考图） --------------------- */

#ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.bokeh {
  position: absolute;
  border-radius: 50%;
  filter: blur(20px);
  opacity: 0.55;
  animation: drift 24s ease-in-out infinite alternate;
}

.sparkle {
  position: absolute;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 8px 2px rgba(255, 255, 255, 0.95);
  animation: twinkle 3.8s ease-in-out infinite;
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(20px, -28px, 0) scale(1.14); }
}

@keyframes twinkle {
  0%, 100% { opacity: 0.12; transform: scale(0.7); }
  50% { opacity: 0.95; transform: scale(1.2); }
}

/* --------------------- 首页封面：发光的心 + 渐变 --------------------- */

.hero {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  padding: 20px 18px 18px;
  color: #fff;
  background: linear-gradient(158deg, #ff9ecd 0%, #d16bd8 46%, #7b4bd6 100%);
  box-shadow: 0 16px 36px rgba(150, 60, 180, 0.32);
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(140px 90px at 18% 12%, rgba(255, 255, 255, 0.5), transparent 70%),
    radial-gradient(120px 120px at 88% 88%, rgba(255, 255, 255, 0.22), transparent 72%);
  pointer-events: none;
}

.hero > * { position: relative; z-index: 1; }

.hero-heart {
  width: 52px;
  height: 48px;
  display: block;
  margin: 2px auto 12px;
  filter: drop-shadow(0 0 14px rgba(255, 255, 255, 0.9));
  animation: heartPulse 3.4s ease-in-out infinite;
}

@keyframes heartPulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.07); }
}

.hero-eyebrow {
  text-align: center;
  font-size: 11px;
  letter-spacing: 0.24em;
  opacity: 0.9;
}

.hero-quote {
  margin-top: 10px;
  font-size: 19px;
  line-height: 1.7;
  font-weight: 600;
  text-align: center;
  text-shadow: 0 2px 10px rgba(120, 40, 140, 0.25);
}

.hero-sub {
  margin-top: 8px;
  text-align: center;
  font-size: 12.5px;
  opacity: 0.88;
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 16px;
}

.hero-actions .btn {
  width: auto;
  margin: 0;
  padding: 9px 18px;
  font-size: 13px;
  background: rgba(255, 255, 255, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: none;
  backdrop-filter: blur(6px);
}

.hero-actions .btn:active { background: rgba(255, 255, 255, 0.34); }

/* --------------------- 开场动画 --------------------- */

#splash {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: calc(env(safe-area-inset-top) + 96px) 26px calc(env(safe-area-inset-bottom) + 62px);
  color: #fff;
  overflow: hidden;
  background: linear-gradient(160deg, #ff9ecd 0%, #d16bd8 46%, #7b4bd6 100%);
  transition: opacity 0.5s ease, transform 0.5s ease;
}

#splash::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(180px 120px at 20% 14%, rgba(255, 255, 255, 0.5), transparent 70%),
    radial-gradient(200px 200px at 86% 86%, rgba(255, 255, 255, 0.22), transparent 72%);
  pointer-events: none;
}

#splash.hide { opacity: 0; transform: scale(1.05); pointer-events: none; }

.splash-main,
.splash-bottom { position: relative; z-index: 1; text-align: center; }

.splash-top { height: 1px; }

.splash-icon {
  width: 96px;
  height: 96px;
  border-radius: 26px;
  box-shadow: 0 18px 44px rgba(80, 20, 110, 0.35), 0 0 34px rgba(255, 255, 255, 0.4);
  animation: splashIcon 0.95s cubic-bezier(0.2, 0.9, 0.3, 1.12) both;
}

@keyframes splashIcon {
  0% { opacity: 0; transform: translateY(22px) scale(0.68); filter: blur(8px); }
  62% { opacity: 1; filter: blur(0); transform: translateY(0) scale(1.04); }
  100% { opacity: 1; transform: none; }
}

.splash-title {
  margin-top: 20px;
  font-size: 27px;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-indent: 0.2em;
  text-shadow: 0 4px 18px rgba(90, 20, 120, 0.35);
  animation: splashTitle 1s 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.12) both;
}

@keyframes splashTitle {
  0% { opacity: 0; transform: translateY(14px); letter-spacing: 0.5em; filter: blur(6px); }
  100% { opacity: 1; transform: none; letter-spacing: 0.2em; filter: blur(0); }
}

.splash-tagline {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
  font-size: 14px;
  letter-spacing: 0.1em;
  opacity: 0.95;
  animation: fade 0.6s 0.9s ease both;
}

.splash-tagline span {
  display: inline-block;
  animation: charBounce 1.7s ease-in-out infinite;
  text-shadow: 0 2px 10px rgba(90, 20, 120, 0.3);
}

@keyframes charBounce {
  0%, 62%, 100% { transform: translateY(0); opacity: 0.82; }
  28% { transform: translateY(-7px); opacity: 1; }
}

.splash-bar {
  width: 100%;
  max-width: 250px;
  height: 4px;
  margin: 0 auto;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.28);
  overflow: hidden;
}

.splash-bar span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, #ffffff, #ffe3f2);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.9);
  animation: splashBar 2.25s cubic-bezier(0.3, 0.8, 0.4, 1) 0.12s forwards;
}

@keyframes splashBar {
  0% { width: 0; }
  100% { width: 100%; }
}

/* --------------------- 重要日：计时器 --------------------- */

.id-card { position: relative; overflow: hidden; }

.id-card::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -40px;
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--grad-soft);
  opacity: 0.85;
  pointer-events: none;
}

.id-card > * { position: relative; z-index: 1; }

.id-timer {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: var(--grad-soft);
}

.id-days {
  display: flex;
  align-items: baseline;
  gap: 4px;
  color: var(--ink);
}

.id-label { font-size: 13px; color: var(--ink-soft); }

.id-num {
  font-size: 34px;
  font-weight: 800;
  line-height: 1.05;
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-variant-numeric: tabular-nums;
}

.id-unit { font-size: 13px; color: var(--ink-soft); }

.id-clock {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--rose);
  font-variant-numeric: tabular-nums;
  animation: clockPulse 2s ease-in-out infinite;
}

@keyframes clockPulse {
  0%, 100% { opacity: 0.72; }
  50% { opacity: 1; }
}

/* 日期、时间选择器跟着主题走 */
input[type="date"],
input[type="time"] {
  color-scheme: light;
  appearance: none;
  -webkit-appearance: none;
  min-height: 46px;
}

/* --------------------- 恋爱纪念日：整屏页面 --------------------- */

.love-page {
  position: fixed;
  inset: 0;
  z-index: 60;
  overflow-y: auto;
  background: linear-gradient(170deg, #ffeaf4 0%, #f6e6ff 55%, #eadcff 100%);
  background-size: cover;
  background-position: center;
  animation: fadeUp 0.32s cubic-bezier(0.22, 0.8, 0.3, 1);
}

.love-inner {
  min-height: 100%;
  padding: calc(env(safe-area-inset-top) + 30px) 20px calc(env(safe-area-inset-bottom) + 40px);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.love-top { font-size: 17px; color: #463a58; letter-spacing: 0.06em; }

.love-stage {
  position: relative;
  width: 100%;
  max-width: 430px;
  margin-top: 14px;
}

.love-heart {
  width: 100%;
  display: block;
  opacity: 0.96;
  transform-origin: 50% 52%;
  animation: loveBeat 2.8s ease-in-out infinite;
}

@keyframes loveBeat {
  0%, 100% {
    transform: scale(1);
    filter: drop-shadow(0 18px 42px rgba(180, 120, 220, 0.22));
  }
  42% {
    transform: scale(1.04);
    filter: drop-shadow(0 24px 58px rgba(205, 120, 235, 0.38));
  }
  58% {
    transform: scale(1.015);
    filter: drop-shadow(0 20px 48px rgba(190, 120, 225, 0.3));
  }
}

.love-timer {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

.love-row { display: flex; align-items: baseline; gap: 3px; }

.love-num {
  font-size: 40px;
  font-weight: 800;
  line-height: 1.05;
  color: #221b2e;
  font-variant-numeric: tabular-nums;
}

.love-unit { font-size: 15px; font-weight: 700; color: #221b2e; }

.love-side {
  position: absolute;
  top: 33%;
  width: 33%;
  text-align: center;
}

.love-side.left { left: 0; }
.love-side.right { right: 0; }

.love-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 20px rgba(150, 100, 190, 0.24);
  display: block;
  margin: 0 auto;
}

.love-name {
  margin-top: 8px;
  font-size: 15px;
  font-weight: 700;
  color: #221b2e;
  text-shadow: 0 1px 6px rgba(255, 255, 255, 0.9);
}

.love-date {
  margin-top: 26px;
  font-size: 16px;
  color: #3b3348;
  text-shadow: 0 1px 6px rgba(255, 255, 255, 0.9);
}

.love-badge {
  position: relative;
  margin-top: 20px;
  padding: 9px 26px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #fff;
  background: linear-gradient(135deg, #ff9ecd 0%, #c77ae0 60%, #a86fe4 100%);
  box-shadow: 0 10px 24px rgba(200, 110, 200, 0.32), inset 0 1px 0 rgba(255, 255, 255, 0.6);
  animation: heartPulse 3.6s ease-in-out infinite;
}

.love-bg-btn {
  position: fixed;
  right: 20px;
  bottom: calc(env(safe-area-inset-bottom) + 26px);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #fff;
  color: #8b5fd0;
  font-size: 20px;
  box-shadow: 0 12px 26px rgba(140, 90, 180, 0.28);
  display: flex;
  align-items: center;
  justify-content: center;
}

.love-bg-btn:active { transform: scale(0.92); }

.love-back {
  position: fixed;
  left: 16px;
  top: calc(env(safe-area-inset-top) + 14px);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.86);
  color: #6b4a8f;
  font-size: 24px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 18px rgba(140, 90, 180, 0.22);
  z-index: 3;
}

.love-back:active { transform: scale(0.9); }

.love-mini {
  background: linear-gradient(150deg, #ffd7ea 0%, #f0d8ff 60%, #e3d3ff 100%);
  border-color: transparent;
}

/* 恋爱纪念日整屏沉浸：没有顶部标题栏，也没有底部标签栏 */
body.immersive #topbar,
body.immersive #tabs {
  display: none;
}

body.immersive #view {
  padding-top: calc(env(safe-area-inset-top) + 8px);
  padding-bottom: calc(env(safe-area-inset-bottom) + 8px);
}

body.immersive #progress { top: 0; }


.love-avatar-row {
  display: flex;
  gap: 12px;
  margin-top: 10px;
}

.love-avatar-pick {
  flex: 1;
  border: 1px dashed var(--line);
  border-radius: 16px;
  padding: 12px;
  text-align: center;
  background: #fff;
  color: var(--ink-soft);
  font-size: 13px;
}

.love-avatar-pick img {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  margin: 0 auto 6px;
}

.love-bg-pick {
  display: block;
  width: 100%;
  margin-top: 8px;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: 16px;
  background: #fff;
  color: var(--ink-soft);
  font-size: 13px;
  text-align: center;
}

.love-bg-pick img {
  width: 100%;
  max-height: 150px;
  object-fit: cover;
  border-radius: 12px;
  display: block;
}

/* 经验条：经验就是在一起的天数 */
.love-xp {
  width: 100%;
  max-width: 320px;
  margin-top: 22px;
}

.love-xp-head {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #4c3f60;
  margin-bottom: 7px;
  letter-spacing: 0.04em;
}

.love-xp-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
  box-shadow: inset 0 2px 6px rgba(120, 80, 160, 0.18);
  overflow: hidden;
}

.love-xp-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #ff9ecd 0%, #d98cf0 55%, #a982f2 100%);
  box-shadow: 0 0 12px rgba(200, 110, 220, 0.6);
  transition: width 0.6s cubic-bezier(0.22, 0.8, 0.3, 1);
}

.love-xp-text {
  margin-top: 8px;
  font-size: 12.5px;
  color: #5b4d70;
  text-align: center;
}


/* --------------------- 升级动画（游戏式反馈） --------------------- */

#levelup {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.4s ease;
}

#levelup.hide {
  opacity: 0;
}

.lv-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 42%, rgba(255, 170, 220, 0.45), rgba(58, 18, 78, 0.82));
}

.lv-stage {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 130px;
}

.lv-heart {
  width: 118px;
  height: 108px;
  filter: drop-shadow(0 0 24px rgba(255, 190, 240, 0.85));
  animation: lvHeart 0.95s cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
}

@keyframes lvHeart {
  0% { transform: scale(0.35); opacity: 0; }
  58% { transform: scale(1.14); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

.lv-particle {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  opacity: 0;
  animation: lvFly 1.5s ease-out forwards;
}

@keyframes lvFly {
  0% { transform: translate(0, 0) scale(0.4); opacity: 0; }
  22% { opacity: 1; }
  100% { transform: translate(var(--tx), var(--ty)) scale(1); opacity: 0; }
}

.lv-card {
  position: relative;
  z-index: 3;
  margin-top: 18px;
  text-align: center;
  color: #fff;
  padding: 0 24px;
  animation: lvCard 0.7s 0.16s cubic-bezier(0.2, 0.9, 0.3, 1.15) both;
}

@keyframes lvCard {
  from { opacity: 0; transform: translateY(22px) scale(0.9); }
  to { opacity: 1; transform: none; }
}

.lv-eyebrow {
  font-size: 12px;
  letter-spacing: 0.34em;
  opacity: 0.85;
}

.lv-badge {
  display: inline-block;
  margin-top: 14px;
  padding: 12px 34px;
  border-radius: 999px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #5a2b7a;
  background: linear-gradient(135deg, #ffe0ef 0%, #e9b6ff 55%, #c79bff 100%);
  box-shadow: 0 16px 38px rgba(120, 40, 160, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.85);
  animation: lvPulse 1.8s ease-in-out infinite;
}

@keyframes lvPulse {
  50% { transform: scale(1.05); box-shadow: 0 20px 48px rgba(160, 60, 200, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.9); }
}

.lv-sub {
  margin-top: 14px;
  font-size: 14px;
  opacity: 0.92;
}

.lv-ok {
  width: auto;
  margin: 22px auto 0;
  padding: 11px 30px;
}
