﻿/* =========================================================
   情侣私密双人网站 · 软甜 ins 风格
   本文件负责颜色、排版、卡片、动画和响应式布局。
   业务逻辑在 app.js，Supabase 配置在 config.js。
   ========================================================= */

:root {
  --cream: #fffaf7;
  --paper: #fffdfb;
  --rose-50: #fff3f3;
  --rose-100: #ffe6ea;
  --rose-200: #f9c9d3;
  --rose-300: #f2a8b9;
  --rose-400: #e88ca3;
  --rose-500: #d86f8e;
  --peach: #ffd9c8;
  --lilac: #e7dcf8;
  --mint: #dcefe6;
  --cocoa: #684c4d;
  --cocoa-soft: #927476;
  --muted: #aa8d8e;
  --line: rgba(114, 72, 78, 0.11);
  --shadow-sm: 0 8px 24px rgba(122, 73, 80, 0.07);
  --shadow-md: 0 18px 52px rgba(122, 73, 80, 0.12);
  --shadow-lg: 0 28px 80px rgba(122, 73, 80, 0.16);
  --sidebar-width: 255px;
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-serif: "Iowan Old Style", "Songti SC", "STSong", "Noto Serif CJK SC", Georgia, serif;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--cream); scroll-behavior: smooth; }
body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--cocoa);
  background:
    radial-gradient(circle at 7% 5%, rgba(255, 225, 221, 0.58), transparent 27%),
    radial-gradient(circle at 96% 14%, rgba(229, 217, 248, 0.48), transparent 30%),
    linear-gradient(145deg, #fffaf7 0%, #fff8f6 48%, #fffdfb 100%);
  font-family: var(--font-sans);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  content: "";
  opacity: 0.36;
  background-image: radial-gradient(rgba(131, 83, 88, 0.1) 0.7px, transparent 0.7px);
  background-size: 18px 18px;
  mask-image: linear-gradient(to bottom, black, transparent 85%);
}
button, input, textarea { font: inherit; }
button { color: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid rgba(232, 140, 163, 0.25);
  outline-offset: 2px;
}
button:disabled { cursor: not-allowed; opacity: 0.58; }
img { display: block; max-width: 100%; }
[hidden] { display: none !important; }
::selection { color: var(--cocoa); background: var(--rose-200); }

/* ---------------- 背景装饰 ---------------- */
.ambient-bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.ambient-blob {
  position: absolute;
  display: block;
  border-radius: 50%;
  filter: blur(2px);
  opacity: 0.58;
  animation: drift 14s ease-in-out infinite alternate;
}
.blob-one { top: 8%; left: -4rem; width: 12rem; height: 12rem; background: rgba(255, 211, 213, 0.42); }
.blob-two { right: -3rem; bottom: 12%; width: 15rem; height: 15rem; background: rgba(224, 211, 249, 0.4); animation-delay: -5s; }
.blob-three { top: 48%; left: 42%; width: 8rem; height: 8rem; background: rgba(218, 239, 228, 0.38); animation-delay: -9s; }
.floating-heart {
  position: absolute;
  color: rgba(232, 140, 163, 0.32);
  font-family: Georgia, serif;
  font-size: 1.6rem;
  animation: float-heart 8s ease-in-out infinite;
}
.heart-one { top: 18%; right: 8%; }
.heart-two { bottom: 9%; left: 7%; animation-delay: -3s; font-size: 2.2rem; }
.heart-three { top: 62%; right: 15%; animation-delay: -6s; font-size: 1rem; }
@keyframes drift { to { transform: translate3d(22px, -18px, 0) scale(1.08); } }
@keyframes float-heart {
  0%, 100% { transform: translateY(0) rotate(-8deg); opacity: 0.55; }
  50% { transform: translateY(-14px) rotate(8deg); opacity: 0.9; }
}

/* ---------------- 通用元素 ---------------- */
.hidden, [hidden] { display: none !important; }
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}
.eyebrow {
  margin: 0 0 0.6rem;
  color: var(--rose-500);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  line-height: 1.4;
}
.card-kicker { color: var(--muted); font-size: 0.67rem; font-weight: 800; letter-spacing: 0.16em; text-transform: uppercase; }
.brand-mark {
  display: inline-grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid rgba(232, 140, 163, 0.27);
  border-radius: 16px;
  color: var(--rose-500);
  background: linear-gradient(145deg, #fff, var(--rose-100));
  box-shadow: 0 10px 25px rgba(226, 132, 153, 0.14);
  font-family: Georgia, serif;
  font-size: 1.65rem;
}
.brand-mark.small { width: 40px; height: 40px; border-radius: 13px; font-size: 1.35rem; }
.brand-mark.tiny { width: 31px; height: 31px; border-radius: 10px; font-size: 1rem; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 46px;
  padding: 0.72rem 1.15rem;
  border: 0;
  border-radius: 15px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 800;
  transition: transform 180ms ease, box-shadow 180ms ease, background-color 180ms ease;
}
.button:hover { transform: translateY(-2px); }
.button:active { transform: translateY(0); }
.button-primary { color: #fff; background: linear-gradient(135deg, var(--rose-400), var(--rose-500)); box-shadow: 0 12px 28px rgba(216, 111, 142, 0.24); }
.button-primary:hover { box-shadow: 0 16px 34px rgba(216, 111, 142, 0.31); }
.button-wide { width: 100%; min-height: 52px; border-radius: 17px; }
.text-button, .icon-button { border: 0; background: transparent; cursor: pointer; }
.text-button { display: inline-flex; align-items: center; gap: 0.38rem; padding: 0.35rem 0; color: var(--cocoa-soft); font-size: 0.82rem; font-weight: 700; transition: color 180ms ease; }
.text-button:hover { color: var(--rose-500); }
.text-button.subtle { color: var(--muted); font-size: 0.78rem; }
.icon-button { display: inline-grid; width: 38px; height: 38px; place-items: center; border-radius: 12px; color: var(--cocoa-soft); font-size: 1.1rem; transition: background-color 180ms ease, color 180ms ease; }
.icon-button:hover { color: var(--rose-500); background: var(--rose-50); }
.soft-card { border: 1px solid rgba(255,255,255,.86); border-radius: 32px; background: rgba(255,253,251,.88); box-shadow: var(--shadow-md); backdrop-filter: blur(18px); }
.round-heart { display: inline-grid; width: 42px; height: 42px; flex: 0 0 42px; place-items: center; border-radius: 50%; color: var(--rose-500); background: var(--rose-100); font-family: Georgia, serif; font-size: 1.3rem; }
.section-sticker { display: inline-grid; width: 64px; height: 64px; place-items: center; border: 1px solid rgba(255,255,255,.9); border-radius: 22px; color: var(--rose-500); background: linear-gradient(145deg,#fff,var(--rose-100)); box-shadow: var(--shadow-sm); font-family: Georgia, serif; font-size: 2rem; transform: rotate(6deg); }
.field-label { display: flex; align-items: center; justify-content: space-between; margin: .85rem 0 .42rem; color: var(--cocoa); font-size: .79rem; font-weight: 800; }
.field-label span { color: var(--muted); font-size: .72rem; font-weight: 500; }
input, textarea { width: 100%; border: 1px solid rgba(114,72,78,.13); border-radius: 15px; color: var(--cocoa); background: rgba(255,255,255,.82); transition: border-color 180ms ease, box-shadow 180ms ease, background-color 180ms ease; }
input { height: 50px; padding: 0 1rem; }
textarea { min-height: 94px; padding: .85rem 1rem; resize: vertical; line-height: 1.6; }
input::placeholder, textarea::placeholder { color: #c2aaad; }
input:focus, textarea:focus { border-color: rgba(232,140,163,.65); outline: 0; background: #fff; box-shadow: 0 0 0 4px rgba(249,201,211,.22); }
.form-row + .form-row { margin-top: .15rem; }
.form-message { margin: .85rem 0; padding: .7rem .85rem; border-radius: 12px; color: #a34f60; background: #fff0f2; font-size: .8rem; line-height: 1.55; }
.form-message.success { color: #4b8069; background: #edf9f2; }

/* ---------------- 登录页 ---------------- */
.login-view { display: grid; min-height: 100vh; padding: 28px; place-items: center; }
.login-card {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) 1px minmax(340px, .95fr);
  width: min(980px, 100%);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.92);
  border-radius: 40px;
  background: rgba(255,253,251,.86);
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(24px);
}
.login-copy {
  position: relative;
  display: flex;
  min-height: 565px;
  flex-direction: column;
  justify-content: center;
  padding: 4rem;
  background:
    radial-gradient(circle at 88% 15%, rgba(255,255,255,.75) 0 8%, transparent 8.4%),
    radial-gradient(circle at 100% 100%, rgba(255,213,216,.78), transparent 43%),
    linear-gradient(155deg,#fff7f7 0%,#ffe8eb 56%,#f5e6f6 100%);
}
.login-copy::after { position: absolute; right: -26px; bottom: 38px; width: 118px; height: 118px; border: 1px solid rgba(255,255,255,.8); border-radius: 38% 62% 56% 44%; content: ""; background: rgba(255,255,255,.27); transform: rotate(-21deg); }
.login-copy h1 { position: relative; margin: 1.05rem 0 1rem; color: var(--cocoa); font-family: var(--font-serif); font-size: clamp(2.55rem,5vw,4.25rem); font-weight: 600; letter-spacing: -.07em; line-height: 1.08; }
.login-copy h1 span { color: var(--rose-500); }
.login-intro { position: relative; max-width: 340px; margin: 0; color: var(--cocoa-soft); font-size: .91rem; line-height: 1.9; }
.login-divider { width: 1px; height: 100%; background: linear-gradient(transparent,var(--line) 15%,var(--line) 85%,transparent); }
.login-panel { display: flex; flex-direction: column; justify-content: center; padding: 4rem; }
.login-panel-heading { display: flex; align-items: center; gap: .85rem; margin-bottom: 1.55rem; }
.login-panel-heading h2 { margin: 0; font-size: 1.2rem; letter-spacing: -.02em; }
.login-panel-heading p { margin: .2rem 0 0; color: var(--muted); font-size: .76rem; }
.mini-heart { display: inline-grid; width: 42px; height: 42px; place-items: center; border-radius: 14px; color: #fff; background: var(--rose-400); box-shadow: 0 9px 20px rgba(216,111,142,.23); font-family: Georgia,serif; }
.input-shell { position: relative; }
.input-shell input { padding-left: 2.75rem; }
.input-icon { position: absolute; top: 50%; left: 1rem; color: var(--rose-400); font-size: .9rem; transform: translateY(-50%); }
.icon-button.inside-input { position: absolute; top: 6px; right: 6px; width: 38px; height: 38px; color: var(--muted); font-size: .69rem; }
.login-footnote { margin: 1.3rem 0 0; color: var(--muted); font-size: .7rem; line-height: 1.75; }

/* ---------------- 主应用布局 ---------------- */
.app-view { min-height: 100vh; }
.sidebar {
  position: fixed;
  top: 22px;
  bottom: 22px;
  left: 22px;
  z-index: 20;
  display: flex;
  width: var(--sidebar-width);
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 1.35rem 1rem 1.1rem;
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 30px;
  background: rgba(255,253,251,.8);
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(22px);
}
.sidebar-top,.sidebar-bottom { position: relative; z-index: 1; }
.brand-lockup { display: flex; align-items: center; gap: .7rem; padding: .1rem .35rem 1.35rem; }
.brand-lockup strong { display: block; max-width: 145px; overflow: hidden; font-size: .87rem; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.brand-lockup small { display: block; margin-top: .12rem; color: var(--muted); font-size: .6rem; letter-spacing: .08em; text-transform: uppercase; }
.profile-card { display: flex; align-items: center; gap: .72rem; margin-bottom: 1.35rem; padding: .85rem; border: 1px solid rgba(232,140,163,.13); border-radius: 20px; background: linear-gradient(135deg,rgba(255,244,244,.9),rgba(248,241,255,.72)); }
.profile-avatars { display: flex; flex: 0 0 auto; }
.profile-avatars span { display: inline-grid; width: 31px; height: 31px; place-items: center; border: 2px solid #fff; border-radius: 50%; color: var(--cocoa); background: var(--peach); font-size: .78rem; }
.profile-avatars span + span { margin-left: -9px; background: var(--lilac); }
.profile-card small,.profile-card strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-card small { color: var(--muted); font-size: .64rem; }
.profile-card strong { margin-top: .05rem; font-size: .78rem; }
.main-nav { display: grid; gap: .35rem; }
.nav-item { display: flex; align-items: center; gap: .68rem; width: 100%; min-height: 45px; padding: .55rem .72rem; border: 0; border-radius: 14px; color: var(--cocoa-soft); background: transparent; cursor: pointer; font-size: .8rem; font-weight: 700; text-align: left; transition: color 180ms ease,background-color 180ms ease,transform 180ms ease; }
.nav-item:hover { color: var(--cocoa); background: rgba(255,238,240,.7); transform: translateX(2px); }
.nav-item.is-active { color: var(--rose-500); background: linear-gradient(90deg,rgba(255,226,231,.94),rgba(255,244,243,.58)); }
.nav-icon { display: inline-grid; width: 25px; height: 25px; place-items: center; border-radius: 9px; color: currentColor; background: rgba(255,255,255,.66); font-size: .95rem; }
.sidebar-bottom { padding: 0 .35rem; }
.sidebar-bottom p { margin: .45rem 0 0; color: var(--muted); font-size: .64rem; }
.app-main { min-height: 100vh; margin-left: calc(var(--sidebar-width) + 44px); }
.mobile-header { display: none; }
.page-content { width: min(1160px,calc(100% - 64px)); margin: 0 auto; padding: 40px 0 56px; }
.page-section { display: none; animation: page-in 380ms ease both; }
.page-section.is-active { display: block; }
@keyframes page-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* ---------------- 首页封面 ---------------- */
.hero-card {
  position: relative;
  display: grid;
  min-height: 410px;
  grid-template-columns: minmax(0,1.08fr) minmax(340px,.92fr);
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 38px;
  background:
    radial-gradient(circle at 92% 10%, rgba(255,255,255,.75) 0 9%, transparent 9.2%),
    linear-gradient(130deg,#fff4f3 0%,#ffe8ec 48%,#e9ddf8 100%);
  box-shadow: var(--shadow-lg);
}
.hero-copy { position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: center; padding: clamp(2.4rem,5vw,4.6rem); }
.hero-copy h1 { margin: 0; color: var(--cocoa); font-family: var(--font-serif); font-size: clamp(2.5rem,5.2vw,4.7rem); font-weight: 600; letter-spacing: -.08em; line-height: 1.08; }
.hero-copy h1 span { color: var(--rose-500); }
.hero-subtitle { max-width: 420px; margin: 1.1rem 0 1.6rem; color: var(--cocoa-soft); font-size: .92rem; }
.day-counter { display: inline-flex; align-items: baseline; gap: .5rem; align-self: flex-start; padding: .45rem .85rem .4rem 1rem; border: 1px solid rgba(255,255,255,.78); border-radius: 15px; background: rgba(255,255,255,.5); }
.counter-number { color: var(--rose-500); font-family: var(--font-serif); font-size: 2.05rem; font-weight: 700; line-height: 1; }
.counter-label { color: var(--cocoa-soft); font-size: .73rem; font-weight: 800; }
.hero-meta { display: flex; flex-wrap: wrap; gap: .6rem 1.3rem; margin-top: 1.55rem; color: var(--cocoa-soft); font-size: .73rem; }
.hero-meta strong { color: var(--cocoa); }
.hero-art { position: relative; min-height: 340px; overflow: hidden; background: linear-gradient(180deg,transparent 0 58%,rgba(223,190,207,.32) 58% 60%,transparent 60%); }
.art-sun { position: absolute; top: 54px; right: 74px; width: 94px; height: 94px; border-radius: 50%; background: rgba(255,219,166,.76); box-shadow: 0 0 0 17px rgba(255,239,203,.31); }
.art-cloud { position: absolute; height: 35px; border-radius: 50px; background: rgba(255,255,255,.74); }
.art-cloud::before,.art-cloud::after { position: absolute; bottom: 0; border-radius: 50%; content: ""; background: inherit; }
.art-cloud::before { left: 22px; width: 41px; height: 41px; }
.art-cloud::after { right: 16px; width: 52px; height: 52px; }
.cloud-a { top: 166px; left: 34px; width: 110px; }
.cloud-b { top: 92px; right: 34px; width: 76px; transform: scale(.74); }
.polaroid { position: absolute; display: flex; width: 128px; height: 155px; flex-direction: column; align-items: center; justify-content: center; border: 8px solid rgba(255,255,255,.88); border-bottom-width: 30px; border-radius: 9px; color: var(--cocoa); background: linear-gradient(145deg,var(--peach),#f8b9aa); box-shadow: 0 18px 35px rgba(116,73,87,.16); font-family: Georgia,serif; }
.polaroid span { font-size: 2.4rem; }
.polaroid small { position: absolute; bottom: -24px; color: var(--muted); font-family: var(--font-sans); font-size: .58rem; letter-spacing: .12em; text-transform: uppercase; }
.polaroid-one { top: 128px; left: 12%; transform: rotate(-13deg); }
.polaroid-two { right: 14%; bottom: 45px; background: linear-gradient(145deg,var(--lilac),#c7aee9); transform: rotate(11deg); }
.art-ground { position: absolute; bottom: -58px; left: -10%; width: 130%; height: 150px; border-radius: 50% 50% 0 0; background: rgba(244,206,213,.52); transform: rotate(-2deg); }
.home-grid { display: grid; grid-template-columns: minmax(0,.86fr) minmax(0,1.14fr); gap: 1rem; margin-top: 1rem; }
.quote-card,.snapshot-card { min-height: 190px; padding: 1.7rem; }
.quote-card { display: flex; flex-direction: column; justify-content: space-between; background: linear-gradient(145deg,rgba(255,255,255,.9),rgba(255,239,241,.85)); }
.quote-card blockquote { margin: 1rem 0 .7rem; color: var(--cocoa); font-family: var(--font-serif); font-size: clamp(1.25rem,2.3vw,1.8rem); line-height: 1.45; }
.quote-card p { margin: 0; color: var(--muted); font-size: .72rem; }
.card-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.card-heading h2 { margin: .22rem 0 0; font-size: 1.2rem; letter-spacing: -.03em; }
.card-heading.compact { margin-bottom: .2rem; }
.stats-row { display: grid; grid-template-columns: repeat(3,1fr); gap: .5rem; margin-top: 1.35rem; }
.stats-row div { padding: .8rem .55rem; border-radius: 17px; background: rgba(255,245,243,.92); text-align: center; }
.stats-row strong,.stats-row span { display: block; }
.stats-row strong { color: var(--rose-500); font-family: var(--font-serif); font-size: 1.65rem; line-height: 1.2; }
.stats-row span { margin-top: .18rem; color: var(--muted); font-size: .65rem; }
.quick-links { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; margin-top: 1rem; }
.quick-link { display: flex; align-items: center; gap: .72rem; min-width: 0; padding: 1rem; border: 1px solid rgba(255,255,255,.9); border-radius: 21px; color: var(--cocoa); background: rgba(255,253,251,.86); box-shadow: var(--shadow-sm); cursor: pointer; text-align: left; transition: transform 180ms ease,box-shadow 180ms ease; }
.quick-link:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.quick-link-icon { display: inline-grid; width: 42px; height: 42px; flex: 0 0 42px; place-items: center; border-radius: 14px; font-size: 1.2rem; }
.quick-link-icon.peach { background: var(--peach); }
.quick-link-icon.lilac { background: var(--lilac); }
.quick-link-icon.mint { background: var(--mint); }
.quick-link span:nth-child(2) { min-width: 0; flex: 1; }
.quick-link strong,.quick-link small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.quick-link strong { font-size: .83rem; }
.quick-link small { margin-top: .1rem; color: var(--muted); font-size: .66rem; }
.quick-link b { color: var(--rose-400); font-size: 1rem; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 1.5rem; margin: 0 0 1.7rem; padding: .3rem .25rem; }
.section-heading h1 { margin: 0; color: var(--cocoa); font-family: var(--font-serif); font-size: clamp(2rem,4vw,3.3rem); font-weight: 600; letter-spacing: -.07em; line-height: 1.1; }
.section-heading > div > p:last-child { max-width: 580px; margin: .55rem 0 0; color: var(--cocoa-soft); font-size: .84rem; }

/* ---------------- 时间轴 ---------------- */
.timeline-list { position: relative; max-width: 880px; margin: 0 auto; padding: .4rem 0 2rem; }
.timeline-list::before { position: absolute; top: 22px; bottom: 22px; left: 50%; width: 1px; content: ""; background: linear-gradient(var(--rose-200),rgba(216,111,142,.1)); }
.timeline-item { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 54px; margin: 0 0 1.1rem; }
.timeline-item:nth-child(odd) .timeline-card { grid-column: 1; text-align: right; }
.timeline-item:nth-child(even) .timeline-card { grid-column: 2; }
.timeline-dot { position: absolute; top: 25px; left: 50%; z-index: 2; display: grid; width: 37px; height: 37px; place-items: center; border: 6px solid var(--cream); border-radius: 50%; color: #fff; background: var(--rose-400); box-shadow: 0 0 0 1px var(--rose-200); font-family: Georgia,serif; font-size: .66rem; transform: translateX(-50%); }
.timeline-card { position: relative; padding: 1.35rem 1.4rem; border: 1px solid rgba(255,255,255,.9); border-radius: 22px; background: rgba(255,253,251,.91); box-shadow: var(--shadow-sm); }
.timeline-item:nth-child(odd) .timeline-card::after,.timeline-item:nth-child(even) .timeline-card::after { position: absolute; top: 32px; width: 16px; height: 16px; border: 1px solid rgba(255,255,255,.9); content: ""; background: var(--paper); transform: rotate(45deg); }
.timeline-item:nth-child(odd) .timeline-card::after { right: -8px; border-left: 0; border-bottom: 0; }
.timeline-item:nth-child(even) .timeline-card::after { left: -8px; border-top: 0; border-right: 0; }
.timeline-date { display: block; color: var(--rose-500); font-size: .7rem; font-weight: 800; letter-spacing: .08em; }
.timeline-card h2 { margin: .35rem 0 .4rem; font-family: var(--font-serif); font-size: 1.35rem; letter-spacing: -.04em; }
.timeline-card p { margin: 0; color: var(--cocoa-soft); font-size: .81rem; }
.timeline-tag { display: inline-block; margin-top: .82rem; padding: .2rem .55rem; border-radius: 999px; color: var(--cocoa-soft); background: var(--rose-50); font-size: .63rem; }

/* ---------------- 心愿清单 ---------------- */
.wish-layout { display: grid; grid-template-columns: minmax(0,.86fr) minmax(0,1.14fr); gap: 1rem; margin-bottom: 1.8rem; }
.wish-progress-card,.wish-form-card { padding: 1.6rem; }
.wish-progress-card { display: flex; align-items: center; gap: 1.4rem; background: linear-gradient(140deg,rgba(255,250,248,.95),rgba(255,235,238,.84)); }
.wish-progress-card h2 { margin: .3rem 0; font-size: 1.2rem; letter-spacing: -.03em; }
.wish-progress-card p { margin: 0; color: var(--muted); font-size: .76rem; }
.progress-ring-wrap { flex: 0 0 auto; }
.progress-ring { display: grid; width: 112px; height: 112px; place-items: center; border-radius: 50%; background: conic-gradient(var(--rose-400) 0deg,var(--rose-100) 0deg); transition: background 300ms ease; }
.progress-ring > div { display: grid; width: 88px; height: 88px; place-items: center; align-content: center; border-radius: 50%; background: #fffaf9; }
.progress-ring strong,.progress-ring small { display: block; line-height: 1.2; }
.progress-ring strong { color: var(--rose-500); font-family: var(--font-serif); font-size: 1.45rem; }
.progress-ring small { margin-top: .15rem; color: var(--muted); font-size: .58rem; }
.wish-form-card form { margin-top: 1.05rem; }
.wish-form-card .button { margin-top: 1rem; }
.list-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 1.7rem 0 .85rem; padding: 0 .25rem; }
.list-heading h2 { margin: 0; font-size: 1.1rem; letter-spacing: -.03em; }
.list-heading > span { color: var(--muted); font-size: .74rem; }
.wish-list { display: grid; gap: .72rem; }
.wish-item { display: flex; align-items: flex-start; gap: .9rem; padding: 1.1rem 1.2rem; border: 1px solid rgba(255,255,255,.9); border-radius: 21px; background: rgba(255,253,251,.89); box-shadow: var(--shadow-sm); transition: opacity 180ms ease,transform 180ms ease; }
.wish-item:hover { transform: translateY(-2px); }
.wish-item.is-done { opacity: .66; }
.wish-check { display: inline-grid; width: 27px; height: 27px; flex: 0 0 27px; place-items: center; margin-top: .12rem; border: 1.5px solid var(--rose-200); border-radius: 9px; color: transparent; background: rgba(255,255,255,.7); cursor: pointer; font-size: .85rem; transition: color 180ms ease,background-color 180ms ease,border-color 180ms ease,transform 180ms ease; }
.wish-check:hover { border-color: var(--rose-400); transform: scale(1.06); }
.wish-item.is-done .wish-check { border-color: var(--rose-400); color: #fff; background: var(--rose-400); }
.wish-body { min-width: 0; flex: 1; }
.wish-body h3 { margin: 0; font-size: .94rem; font-weight: 800; overflow-wrap: anywhere; }
.wish-item.is-done .wish-body h3 { text-decoration: line-through; text-decoration-color: var(--rose-300); }
.wish-body p { margin: .25rem 0 0; color: var(--cocoa-soft); font-size: .77rem; overflow-wrap: anywhere; white-space: pre-wrap; }
.wish-meta { display: flex; flex-wrap: wrap; gap: .35rem .8rem; margin-top: .6rem; color: var(--muted); font-size: .65rem; }
.wish-delete,.message-delete { flex: 0 0 auto; width: 30px; height: 30px; border: 0; border-radius: 10px; color: #c19fa4; background: transparent; cursor: pointer; font-size: .9rem; }
.wish-delete:hover,.message-delete:hover { color: #b65b70; background: #fff0f2; }

/* ---------------- 留言板 ---------------- */
.message-composer { padding: 1.35rem; }
.composer-heading { display: flex; align-items: center; gap: .75rem; margin-bottom: .75rem; }
.avatar-dot { display: inline-grid; width: 38px; height: 38px; place-items: center; border-radius: 13px; color: var(--rose-500); background: var(--rose-100); font-family: Georgia,serif; font-size: 1.1rem; }
.composer-heading strong,.composer-heading small { display: block; }
.composer-heading strong { font-size: .88rem; }
.composer-heading small { margin-top: .08rem; color: var(--muted); font-size: .65rem; }
.composer-footer { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-top: .7rem; }
.composer-footer > span { color: var(--muted); font-size: .67rem; }
.message-list { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .85rem; }
.message-card { position: relative; display: flex; min-height: 165px; flex-direction: column; padding: 1.25rem; border: 1px solid rgba(255,255,255,.9); border-radius: 22px; background: rgba(255,253,251,.9); box-shadow: var(--shadow-sm); }
.message-card::before { position: absolute; top: 1.25rem; right: 1.35rem; color: var(--rose-200); content: "“"; font-family: Georgia,serif; font-size: 3rem; line-height: .7; }
.message-card.is-mine { background: linear-gradient(140deg,rgba(255,250,250,.97),rgba(255,238,241,.8)); }
.message-author { display: flex; align-items: center; gap: .52rem; color: var(--cocoa); font-size: .76rem; font-weight: 800; }
.message-author .avatar-mini { display: inline-grid; width: 29px; height: 29px; place-items: center; border-radius: 10px; background: var(--lilac); font-size: .78rem; }
.message-card p { margin: 1rem 0 1.2rem; color: var(--cocoa-soft); font-size: .86rem; line-height: 1.85; overflow-wrap: anywhere; white-space: pre-wrap; }
.message-footer { display: flex; align-items: center; justify-content: space-between; gap: .5rem; margin-top: auto; color: var(--muted); font-size: .64rem; }

/* ---------------- 相册 ---------------- */
.album-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: .9rem; }
.album-card { position: relative; display: block; min-width: 0; overflow: hidden; padding: 0; border: 0; border-radius: 23px; background: transparent; cursor: pointer; text-align: left; }
.album-photo { position: relative; display: grid; min-height: 230px; overflow: hidden; place-items: center; border-radius: 23px; background: linear-gradient(145deg,var(--c1,#ffd9c8),var(--c2,#f9c9d3)); }
.album-photo::after { position: absolute; inset: 0; content: ""; background: linear-gradient(to top,rgba(95,61,66,.46),transparent 52%); opacity: .8; transition: opacity 220ms ease; }
.album-card:hover .album-photo::after,.album-card:focus-visible .album-photo::after { opacity: 1; }
.album-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 500ms ease; }
.album-card:hover .album-photo img { transform: scale(1.05); }
.album-symbol { position: relative; z-index: 1; color: rgba(255,255,255,.78); font-family: Georgia,serif; font-size: 3.4rem; text-shadow: 0 7px 18px rgba(96,58,64,.14); }
.album-caption { position: absolute; right: 1rem; bottom: 1rem; left: 1rem; z-index: 2; color: #fff; }
.album-caption strong,.album-caption small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.album-caption strong { font-size: .85rem; }
.album-caption small { margin-top: .1rem; color: rgba(255,255,255,.8); font-size: .66rem; }

/* ---------------- 在线照片上传 ---------------- */
.photo-upload-card {
  padding: 1.45rem;
  background: linear-gradient(140deg, rgba(255,253,251,.96), rgba(255,241,243,.82));
}
.photo-upload-intro {
  margin: .35rem 0 0;
  color: var(--muted);
  font-size: .72rem;
}
.photo-picker-row { margin-top: 1.15rem; }
.photo-picker {
  display: flex;
  align-items: center;
  gap: .85rem;
  min-height: 78px;
  padding: .9rem 1rem;
  border: 1px dashed rgba(216,111,142,.34);
  border-radius: 20px;
  color: var(--cocoa);
  background: rgba(255,255,255,.64);
  cursor: pointer;
  transition: border-color 180ms ease, background-color 180ms ease, transform 180ms ease;
}
.photo-picker:hover {
  border-color: var(--rose-400);
  background: #fff;
  transform: translateY(-1px);
}
.photo-picker-icon {
  display: inline-grid;
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  place-items: center;
  border-radius: 15px;
  color: var(--rose-500);
  background: var(--rose-100);
  font-size: 1.2rem;
}
.photo-picker strong,.photo-picker small { display: block; }
.photo-picker strong { font-size: .84rem; }
.photo-picker small { margin-top: .14rem; color: var(--muted); font-size: .67rem; }
.photo-preview {
  position: relative;
  width: min(320px,100%);
  margin-top: .85rem;
  overflow: hidden;
  border: 6px solid #fff;
  border-radius: 20px;
  background: var(--rose-50);
  box-shadow: var(--shadow-sm);
}
.photo-preview img { width: 100%; max-height: 260px; object-fit: cover; }
.photo-form-grid {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(180px,.42fr);
  gap: .85rem;
}
.photo-submit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: .9rem;
}
.photo-submit-row p { margin: 0; color: var(--muted); font-size: .68rem; }
.uploaded-album-card { overflow: visible; }
.uploaded-album-card .album-open {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 23px;
  color: inherit;
  background: transparent;
  cursor: pointer;
  text-align: left;
}
.album-delete {
  position: absolute;
  top: .7rem;
  right: .7rem;
  z-index: 4;
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(255,255,255,.7);
  border-radius: 12px;
  color: #fff;
  background: rgba(90,56,62,.36);
  box-shadow: 0 7px 18px rgba(66,42,47,.13);
  cursor: pointer;
  font-size: .9rem;
  backdrop-filter: blur(8px);
  transition: background-color 180ms ease, transform 180ms ease;
}
.album-delete:hover { background: rgba(182,77,99,.82); transform: scale(1.04); }

/* ---------------- 心情打卡 ---------------- */.mood-card { padding: 1.55rem; }
.mood-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.mood-card-top h2 { margin: .28rem 0 0; font-size: 1.25rem; letter-spacing: -.03em; }
.mood-card-top p { margin: .35rem 0 0; color: var(--muted); font-size: .76rem; }
.status-badge { display: inline-flex; align-items: center; padding: .34rem .68rem; border-radius: 999px; color: var(--muted); background: var(--rose-50); font-size: .66rem; font-weight: 700; white-space: nowrap; }
.status-badge.is-done { color: #4b8069; background: var(--mint); }
.mood-options { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: .65rem; margin: 1.3rem 0 1.1rem; }
.mood-option { display: grid; min-height: 86px; place-items: center; align-content: center; gap: .18rem; padding: .6rem .3rem; border: 1px solid var(--line); border-radius: 18px; color: var(--cocoa-soft); background: rgba(255,255,255,.7); cursor: pointer; transition: border-color 180ms ease,background-color 180ms ease,transform 180ms ease,box-shadow 180ms ease; }
.mood-option:hover { transform: translateY(-2px); border-color: var(--rose-200); }
.mood-option.is-selected { border-color: var(--rose-300); color: var(--cocoa); background: var(--rose-50); box-shadow: 0 9px 20px rgba(216,111,142,.11); }
.mood-option span { font-size: 1.55rem; }
.mood-option small { font-size: .66rem; font-weight: 700; }
.mood-note-row { margin-top: .2rem; }
.mood-history { display: grid; grid-template-columns: repeat(7,minmax(0,1fr)); gap: .6rem; }
.mood-day-card { min-height: 105px; padding: .72rem .45rem; border: 1px solid rgba(255,255,255,.9); border-radius: 17px; background: rgba(255,253,251,.83); box-shadow: var(--shadow-sm); text-align: center; }
.mood-day-card time,.mood-day-card strong,.mood-day-card small { display: block; }
.mood-day-card time { color: var(--muted); font-size: .62rem; }
.mood-day-card strong { margin: .31rem 0 .15rem; font-size: 1.35rem; }
.mood-day-card small { overflow: hidden; color: var(--cocoa-soft); font-size: .59rem; text-overflow: ellipsis; white-space: nowrap; }
.mood-day-card.is-empty { opacity: .58; background: rgba(255,253,251,.5); }

/* ---------------- 空状态、加载、提示 ---------------- */
.empty-state { padding: 2.6rem 1.3rem; border: 1px dashed rgba(216,111,142,.23); border-radius: 23px; color: var(--muted); background: rgba(255,253,251,.56); text-align: center; }
.empty-state strong { display: block; margin-bottom: .3rem; color: var(--cocoa-soft); font-size: .94rem; }
.empty-state p { margin: 0; font-size: .75rem; }
.loading-state { padding: 2.4rem 1rem; color: var(--muted); font-size: .8rem; text-align: center; }
.skeleton { height: 92px; border-radius: 21px; background: linear-gradient(90deg,rgba(255,242,242,.65),rgba(255,255,255,.95),rgba(255,242,242,.65)); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 80; max-width: min(360px,calc(100vw - 32px)); padding: .83rem 1rem; border: 1px solid rgba(255,255,255,.9); border-radius: 15px; color: var(--cocoa); background: rgba(255,253,251,.94); box-shadow: var(--shadow-md); font-size: .8rem; animation: toast-in 250ms ease both; }
.toast.is-error { color: #9f4b5e; background: #fff4f5; }
.toast.is-success { color: #4b8069; background: #f0fbf5; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* ---------------- 相册灯箱 ---------------- */
.modal { position: fixed; inset: 0; z-index: 70; display: grid; padding: 1.25rem; place-items: center; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(70,48,51,.36); backdrop-filter: blur(7px); }
.modal-card { position: relative; z-index: 1; display: grid; width: min(820px,100%); max-height: min(720px,calc(100vh - 2.5rem)); grid-template-columns: minmax(0,1.1fr) minmax(260px,.9fr); overflow: hidden; border: 1px solid rgba(255,255,255,.95); border-radius: 28px; background: var(--paper); box-shadow: var(--shadow-lg); animation: modal-in 250ms ease both; }
@keyframes modal-in { from { opacity: 0; transform: scale(.97) translateY(8px); } to { opacity: 1; transform: scale(1) translateY(0); } }
.modal-close { position: absolute; top: .7rem; right: .7rem; z-index: 2; color: #fff; background: rgba(68,45,48,.3); }
.modal-close:hover { color: #fff; background: rgba(68,45,48,.55); }
.modal-visual { min-height: 490px; background: linear-gradient(145deg,var(--c1,#ffd9c8),var(--c2,#f9c9d3)); }
.modal-visual img { width: 100%; height: 100%; min-height: inherit; object-fit: cover; }
.modal-visual .album-symbol { display: grid; height: 100%; min-height: inherit; place-items: center; font-size: 5rem; }
.modal-copy { display: flex; flex-direction: column; justify-content: flex-end; padding: 2.2rem 1.8rem 2rem; }
.modal-copy h2 { margin: .1rem 0 .5rem; font-family: var(--font-serif); font-size: 1.7rem; letter-spacing: -.05em; }
.modal-copy p:last-child { margin: 0; color: var(--cocoa-soft); font-size: .81rem; line-height: 1.8; }

/* ---------------- 响应式：平板与小桌面 ---------------- */
.bottom-nav { display: none; }
@media (max-width: 1080px) {
  :root { --sidebar-width: 220px; }
  .sidebar { left: 16px; }
  .app-main { margin-left: calc(var(--sidebar-width) + 32px); }
  .page-content { width: min(calc(100% - 42px),980px); }
  .hero-card { grid-template-columns: minmax(0,1fr) minmax(280px,.78fr); }
  .hero-copy { padding: 2.5rem; }
  .hero-art { min-height: 310px; }
  .polaroid-one { left: 3%; }
  .polaroid-two { right: 5%; }
  .message-list { grid-template-columns: 1fr; }
}

/* ---------------- 响应式：手机和平板竖屏 ---------------- */
@media (max-width: 790px) {
  body { padding-bottom: env(safe-area-inset-bottom); }
  .login-view { padding: 16px; }
  .login-card { display: block; border-radius: 30px; }
  .login-copy { min-height: auto; padding: 2.4rem 1.6rem 2rem; }
  .login-copy h1 { font-size: clamp(2.3rem,10vw,3.6rem); }
  .login-intro { font-size: .82rem; }
  .login-divider { width: auto; height: 1px; margin: 0 1.6rem; background: linear-gradient(90deg,transparent,var(--line) 15%,var(--line) 85%,transparent); }
  .login-panel { padding: 2rem 1.6rem 2.4rem; }
  .sidebar { display: none; }
  .app-main { margin-left: 0; padding-bottom: 74px; }
  .mobile-header { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; padding: .72rem 1rem; border-bottom: 1px solid rgba(255,255,255,.8); background: rgba(255,250,247,.78); backdrop-filter: blur(18px); }
  .mobile-brand,.mobile-header-actions { display: flex; align-items: center; gap: .65rem; }
  .mobile-brand strong { max-width: 150px; overflow: hidden; font-size: .83rem; text-overflow: ellipsis; white-space: nowrap; }
  .user-chip { display: inline-flex; max-width: 90px; overflow: hidden; align-items: center; padding: .3rem .55rem; border-radius: 999px; color: var(--rose-500); background: var(--rose-100); font-size: .68rem; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
  .page-content { width: min(calc(100% - 28px),680px); padding: 1rem 0 2rem; }
  .section-heading { align-items: center; margin-bottom: 1.1rem; }
  .section-heading h1 { font-size: clamp(1.85rem,9vw,2.65rem); }
  .section-heading > div > p:last-child { font-size: .76rem; }
  .section-sticker { width: 48px; height: 48px; border-radius: 17px; font-size: 1.45rem; }
  .hero-card { display: block; min-height: 0; border-radius: 28px; }
  .hero-copy { padding: 2rem 1.4rem 1.35rem; }
  .hero-copy h1 { font-size: clamp(2.25rem,11.5vw,3.5rem); }
  .hero-art { min-height: 245px; }
  .art-sun { top: 34px; right: 44px; width: 70px; height: 70px; }
  .cloud-a { top: 132px; left: 7%; }
  .cloud-b { top: 70px; right: 8%; }
  .polaroid { width: 104px; height: 128px; border-width: 6px; border-bottom-width: 25px; }
  .polaroid span { font-size: 1.8rem; }
  .polaroid-one { top: 98px; }
  .polaroid-two { bottom: 22px; }
  .home-grid,.quick-links,.wish-layout { grid-template-columns: 1fr; }
  .quote-card,.snapshot-card { min-height: auto; padding: 1.3rem; }
  .quote-card blockquote { margin-top: .7rem; }
  .quick-links { gap: .66rem; }
  .quick-link { padding: .8rem; }
  .timeline-list::before { left: 17px; }
  .timeline-item { display: block; margin-left: 0; padding-left: 3.2rem; }
  .timeline-item:nth-child(odd) .timeline-card,.timeline-item:nth-child(even) .timeline-card { grid-column: auto; text-align: left; }
  .timeline-dot { top: 20px; left: 17px; width: 31px; height: 31px; border-width: 5px; font-size: .55rem; transform: translateX(-50%); }
  .timeline-item:nth-child(odd) .timeline-card::after,.timeline-item:nth-child(even) .timeline-card::after { top: 27px; left: -7px; right: auto; border: 0; border-bottom: 1px solid rgba(255,255,255,.9); border-left: 1px solid rgba(255,255,255,.9); }
  .wish-progress-card { align-items: flex-start; }
  .progress-ring { width: 94px; height: 94px; }
  .progress-ring > div { width: 74px; height: 74px; }
  .progress-ring strong { font-size: 1.2rem; }
  .album-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: .62rem; }
  .album-photo { min-height: 205px; border-radius: 19px; }
  .photo-form-grid { grid-template-columns: 1fr; gap: .1rem; }
  .photo-submit-row { align-items: flex-end; }
  .photo-submit-row p { max-width: 210px; }
  .mood-options { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .mood-history { grid-template-columns: repeat(4,minmax(0,1fr)); }
  .modal-card { display: block; overflow-y: auto; }
  .modal-visual { min-height: 310px; }
  .modal-copy { padding: 1.4rem; }
  .bottom-nav { position: fixed; right: 10px; bottom: max(10px,env(safe-area-inset-bottom)); left: 10px; z-index: 40; display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); padding: .38rem .28rem; border: 1px solid rgba(255,255,255,.9); border-radius: 21px; background: rgba(255,253,251,.9); box-shadow: 0 14px 40px rgba(122,73,80,.16); backdrop-filter: blur(20px); }
  .bottom-nav-item { display: grid; min-width: 0; min-height: 48px; place-items: center; align-content: center; gap: .03rem; padding: .25rem; border: 0; border-radius: 14px; color: var(--muted); background: transparent; cursor: pointer; }
  .bottom-nav-item span { font-size: 1.05rem; line-height: 1.15; }
  .bottom-nav-item small { overflow: hidden; max-width: 100%; font-size: .58rem; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
  .bottom-nav-item.is-active { color: var(--rose-500); background: var(--rose-50); }
  .toast { right: 16px; bottom: 84px; }
}

@media (max-width: 420px) {
  .login-copy,.login-panel { padding-right: 1.25rem; padding-left: 1.25rem; }
  .page-content { width: min(calc(100% - 22px),420px); }
  .hero-copy { padding-right: 1.15rem; padding-left: 1.15rem; }
  .hero-art { min-height: 225px; }
  .polaroid { width: 91px; height: 112px; }
  .polaroid-one { left: 6%; }
  .polaroid-two { right: 6%; }
  .wish-progress-card { display: block; }
  .progress-ring-wrap { margin-bottom: 1rem; }
  .progress-ring { width: 102px; height: 102px; }
  .progress-ring > div { width: 80px; height: 80px; }
  .album-photo { min-height: 170px; }
  .mood-card { padding: 1.15rem; }
  .mood-card-top { display: block; }
  .status-badge { margin-top: .65rem; }
  .mood-options { gap: .46rem; }
  .mood-option { min-height: 78px; }
  .mood-history { gap: .45rem; }
  .mood-day-card { min-height: 98px; }
  .composer-footer { align-items: flex-end; }
  .composer-footer > span { display: none; }
  .composer-footer .button { flex: 1; }
}

@media (prefers-reduced-motion: reduce) {
  *,*::before,*::after {
    scroll-behavior: auto !important;
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}


