/* ==========================================================================
   zhu99.cn · 祝你们长长久久
   设计系统：手写 CSS，零依赖，暖色祝福主题，深色优先 + 浅色可切换
   ========================================================================== */

/* ---------- 1. 设计令牌 ---------- */
:root {
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", "Noto Sans CJK SC",
    Roboto, Helvetica, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
    "Liberation Mono", monospace;

  --bg: #100a12;
  --bg-soft: #170f1a;
  --surface: #1c1420;
  --surface-2: #251a2a;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.2);

  --text: #f8eef3;
  --text-soft: #cfbdc7;
  --text-muted: #998694;

  --brand: #ff5f8f;
  --brand-2: #ffa63d;
  --brand-3: #b18cff;
  --brand-soft: rgba(255, 95, 143, 0.15);
  --gradient: linear-gradient(120deg, #ff5f8f 0%, #ff9a62 52%, #ffd166 100%);
  --gradient-cool: linear-gradient(120deg, #b18cff 0%, #7c6cff 100%);

  --ok: #34d399;
  --warn: #fbbf24;
  --danger: #fb7185;

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-full: 999px;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 12px 30px -12px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 30px 70px -30px rgba(0, 0, 0, 0.85);
  --glow: 0 0 0 1px rgba(255, 95, 143, 0.35), 0 18px 50px -18px rgba(255, 95, 143, 0.5);

  --maxw: 1120px;
  --header-h: 64px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html[data-theme="light"] {
  --bg: #fff7f9;
  --bg-soft: #fdeef3;
  --surface: #ffffff;
  --surface-2: #fdf2f5;
  --border: rgba(46, 20, 32, 0.1);
  --border-strong: rgba(46, 20, 32, 0.22);

  --text: #23161d;
  --text-soft: #5b4a53;
  --text-muted: #8a7580;

  --brand-soft: rgba(255, 95, 143, 0.1);
  --shadow-sm: 0 1px 2px rgba(46, 20, 32, 0.06);
  --shadow: 0 12px 30px -14px rgba(46, 20, 32, 0.2);
  --shadow-lg: 0 30px 70px -32px rgba(46, 20, 32, 0.28);
  --glow: 0 0 0 1px rgba(255, 95, 143, 0.28), 0 18px 45px -20px rgba(255, 95, 143, 0.38);
}

/* ---------- 2. 基础 ---------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(55rem 28rem at 8% -10%, rgba(255, 95, 143, 0.22), transparent 62%),
    radial-gradient(42rem 24rem at 95% 2%, rgba(255, 166, 61, 0.16), transparent 62%),
    radial-gradient(40rem 24rem at 48% 108%, rgba(177, 140, 255, 0.14), transparent 62%);
}

html[data-theme="light"] body::before {
  background:
    radial-gradient(55rem 28rem at 8% -10%, rgba(255, 95, 143, 0.16), transparent 62%),
    radial-gradient(42rem 24rem at 95% 2%, rgba(255, 166, 61, 0.16), transparent 62%),
    radial-gradient(40rem 24rem at 48% 108%, rgba(177, 140, 255, 0.12), transparent 62%);
}

img, svg, video, canvas { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
ul, ol { list-style: none; }
::selection { background: rgba(255, 95, 143, 0.35); color: #fff; }

:focus-visible {
  outline: 2px solid var(--brand-2);
  outline-offset: 3px;
  border-radius: 6px;
}

/* ---------- 3. 排版 ---------- */
h1, h2, h3, h4 { line-height: 1.22; font-weight: 700; letter-spacing: -0.02em; }
h1 { font-size: clamp(2rem, 5vw, 3.3rem); }
h2 { font-size: clamp(1.5rem, 3.2vw, 2.15rem); }
h3 { font-size: clamp(1.1rem, 2vw, 1.3rem); }
p { color: var(--text-soft); }
small { font-size: 0.85em; }

code, kbd, pre { font-family: var(--font-mono); font-size: 0.9em; }
code {
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 0.12em 0.42em;
  border-radius: 6px;
  color: var(--text);
}
pre {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  overflow-x: auto;
  line-height: 1.65;
  color: var(--text-soft);
}
pre code { background: none; border: 0; padding: 0; }

.grad {
  background: var(--gradient);
  background-size: 220% 220%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: hue 9s ease infinite;
}

/* ---------- 4. 布局 ---------- */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 22px;
}
.wrap-narrow { max-width: 760px; }
main { flex: 1 0 auto; }
section { padding: clamp(46px, 7vw, 84px) 0; }
.section-tight { padding: clamp(26px, 4vw, 44px) 0; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 30px;
}
.section-head p { margin-top: 8px; max-width: 62ch; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand-2);
  margin-bottom: 12px;
}
.eyebrow::before { content: ""; width: 22px; height: 1px; background: currentColor; opacity: 0.6; }

.divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--border), transparent);
  border: 0;
}

.center { text-align: center; }
.center .eyebrow { justify-content: center; }
.mt-s { margin-top: 10px; }
.mt-m { margin-top: 20px; }
.mt-l { margin-top: 34px; }

/* ---------- 5. 顶栏 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  border-bottom: 1px solid transparent;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.site-header.is-scrolled {
  border-bottom-color: var(--border);
  background: var(--bg);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
}

.nav { height: var(--header-h); display: flex; align-items: center; gap: 16px; }

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.05rem; flex-shrink: 0; }
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--gradient);
  background-size: 200% 200%;
  animation: hue 9s ease infinite;
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
  box-shadow: var(--shadow-sm);
}
.brand small {
  display: block;
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  line-height: 1;
  text-transform: uppercase;
}

.nav-links { display: flex; align-items: center; gap: 3px; margin-left: auto; }
.nav-links a {
  padding: 8px 13px;
  border-radius: var(--radius-full);
  font-size: 0.91rem;
  color: var(--text-soft);
  transition: color 0.2s, background 0.2s;
  white-space: nowrap;
}
.nav-links a:hover { color: var(--text); background: var(--surface-2); }
.nav-links a[aria-current="page"] {
  color: var(--text);
  background: var(--brand-soft);
  box-shadow: inset 0 0 0 1px rgba(255, 95, 143, 0.3);
}
.nav-actions { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  transition: transform 0.2s var(--ease), border-color 0.2s, background 0.2s;
}
.icon-btn:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.icon-btn svg { width: 18px; height: 18px; }
.nav-toggle { display: none; }

/* ---------- 6. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 12px 22px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--surface);
  font-weight: 600;
  font-size: 0.94rem;
  cursor: pointer;
  transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease),
    border-color 0.22s, opacity 0.2s, background 0.22s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.btn:active { transform: translateY(0); }
.btn svg { width: 17px; height: 17px; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; }

.btn-primary {
  background: var(--gradient);
  background-size: 200% 200%;
  border-color: transparent;
  color: #3a0a1c;
  animation: hue 9s ease infinite;
  box-shadow: 0 10px 30px -12px rgba(255, 95, 143, 0.75);
}
.btn-primary:hover { box-shadow: 0 18px 44px -14px rgba(255, 95, 143, 0.9); }
.btn-ghost { background: transparent; }
.btn-sm { padding: 9px 16px; font-size: 0.86rem; }
.btn-block { width: 100%; }
.btn-icon-only { padding: 12px; }

/* 分段控件 */
.seg {
  display: inline-flex;
  padding: 4px;
  gap: 4px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.seg button {
  border: 0;
  background: transparent;
  padding: 7px 15px;
  border-radius: var(--radius-full);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}
.seg button[aria-pressed="true"] { background: var(--gradient); color: #3a0a1c; }

/* 标签 chip */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 15px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-soft);
  font-size: 0.87rem;
  cursor: pointer;
  transition: transform 0.2s var(--ease), border-color 0.2s, background 0.2s, color 0.2s;
}
.chip:hover { transform: translateY(-2px); border-color: var(--border-strong); color: var(--text); }
.chip[aria-pressed="true"] {
  background: var(--brand-soft);
  border-color: rgba(255, 95, 143, 0.45);
  color: var(--text);
}

.tag {
  display: inline-block;
  font-size: 0.74rem;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-muted);
  font-family: var(--font-mono);
}
.tag-row { display: flex; flex-wrap: wrap; gap: 7px; }

/* ---------- 7. 卡片与网格 ---------- */
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: transform 0.28s var(--ease), border-color 0.28s, box-shadow 0.28s;
  overflow: hidden;
  height: 100%;
}
.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 2px;
  background: var(--gradient);
  opacity: 0;
  transition: opacity 0.28s;
}
.card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow-lg); }
.card:hover::before { opacity: 1; }
.card h3 { font-size: 1.08rem; }
.card p { font-size: 0.92rem; }

.card-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand);
  margin-bottom: 4px;
}
.card-icon svg { width: 21px; height: 21px; }

.card-link {
  margin-top: auto;
  padding-top: 10px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--brand);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.card-link::after { content: "→"; transition: transform 0.22s var(--ease); }
.card:hover .card-link::after { transform: translateX(4px); }

.status { display: inline-flex; align-items: center; gap: 7px; font-size: 0.78rem; color: var(--text-muted); font-family: var(--font-mono); }
.status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.16);
}

/* ---------- 8. Hero ---------- */
.hero { padding: clamp(48px, 8vw, 96px) 0 clamp(30px, 5vw, 60px); position: relative; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(26px, 5vw, 60px);
  align-items: center;
}
.hero h1 { margin-bottom: 18px; }
.hero-lead { font-size: clamp(1rem, 1.6vw, 1.14rem); max-width: 56ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.center .hero-actions { justify-content: center; }

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 0.87rem;
  color: var(--text-muted);
}
.hero-meta b { color: var(--text); font-weight: 700; }

/* ---------- 9. 纪念日计数器 ---------- */
.counter-panel {
  position: relative;
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: linear-gradient(160deg, var(--surface-2), var(--surface) 60%);
  padding: clamp(22px, 3vw, 34px);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.counter-panel::after {
  content: "";
  position: absolute;
  inset: -30% -20% auto auto;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255, 95, 143, 0.32), transparent 68%);
  pointer-events: none;
}

.counter-names {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-size: clamp(1.1rem, 2.4vw, 1.5rem);
  font-weight: 700;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.counter-names .amp { color: var(--brand); animation: beat 2.4s ease-in-out infinite; }

.counter-since { text-align: center; font-size: 0.85rem; color: var(--text-muted); font-family: var(--font-mono); }

.counter-main {
  text-align: center;
  margin: 22px 0 6px;
  font-variant-numeric: tabular-nums;
}
.counter-num {
  display: block;
  font-size: clamp(3.4rem, 13vw, 6rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.04em;
  background: var(--gradient);
  background-size: 220% 220%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: hue 9s ease infinite;
}
.counter-label { font-size: 0.92rem; color: var(--text-muted); letter-spacing: 0.08em; }

.counter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 24px;
  text-align: center;
}
.counter-cell {
  padding: 12px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
}
.counter-cell b { display: block; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.counter-cell span { font-size: 0.75rem; color: var(--text-muted); }

/* 进度条 */
.progress-wrap { margin-top: 22px; }
.progress-top {
  display: flex;
  justify-content: space-between;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 8px;
  gap: 10px;
}
.progress {
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--surface-2);
  border: 1px solid var(--border);
  overflow: hidden;
}
.progress i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: var(--radius-full);
  background: var(--gradient);
  background-size: 200% 200%;
  animation: hue 6s ease infinite;
  transition: width 0.8s var(--ease);
}

/* 里程碑 */
.milestone-list { display: grid; gap: 10px; }
.milestone {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: transform 0.25s var(--ease), border-color 0.25s, box-shadow 0.25s;
}
.milestone:hover { transform: translateX(4px); border-color: var(--border-strong); box-shadow: var(--shadow); }
.milestone .m-days {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--brand-2);
  text-align: right;
}
.milestone .m-title { font-weight: 600; font-size: 0.96rem; }
.milestone .m-date { font-size: 0.8rem; color: var(--text-muted); font-family: var(--font-mono); }
.milestone .m-count {
  font-size: 0.82rem;
  color: var(--text-muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.milestone.is-done { opacity: 0.62; }
.milestone.is-done .m-days { color: var(--ok); }
.milestone.is-next {
  border-color: rgba(255, 95, 143, 0.5);
  background: linear-gradient(120deg, var(--brand-soft), var(--surface) 70%);
  box-shadow: var(--glow);
}
.milestone.is-next .m-count { color: var(--brand); font-weight: 700; }

/* ---------- 10. 表单 ---------- */
.form { display: grid; gap: 16px; }
.form-row { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.field { display: grid; gap: 7px; }
.field > label { font-size: 0.87rem; font-weight: 600; color: var(--text-soft); }
.field .hint { font-size: 0.79rem; color: var(--text-muted); }

/* 必填标记（目前只用在祝福卡的「对方邮箱」上） */
.label-req {
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--brand);
  background: var(--brand-soft);
  border: 1px solid rgba(255, 95, 143, 0.35);
}
.field.invalid .input,
.field.invalid .textarea { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(251, 113, 133, 0.14); }

.input, .textarea, .select {
  width: 100%;
  padding: 12px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  font-size: 0.95rem;
}
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft);
  background: var(--surface);
}
.textarea { min-height: 108px; resize: vertical; line-height: 1.65; }
.select { appearance: none; cursor: pointer; }
.input[type="date"] { font-family: var(--font-mono); }

.field-foot { display: flex; justify-content: space-between; gap: 12px; font-size: 0.78rem; color: var(--text-muted); }
.counter-chars.over { color: var(--danger); font-weight: 700; }

.form-msg {
  padding: 12px 16px;
  border-radius: var(--radius);
  font-size: 0.88rem;
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.form-msg.ok { border-color: rgba(52, 211, 153, 0.45); background: rgba(52, 211, 153, 0.1); color: var(--text); }
.form-msg.err { border-color: rgba(251, 113, 133, 0.5); background: rgba(251, 113, 133, 0.1); color: var(--text); }
.form-msg[hidden] { display: none; }

/* ---------- 11. 祝福墙 ---------- */
.wish-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}
.wish-stats { display: flex; gap: 18px; flex-wrap: wrap; font-size: 0.86rem; color: var(--text-muted); }
.wish-stats b { color: var(--text); font-variant-numeric: tabular-nums; }

.wish-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); }

.wish-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: transform 0.28s var(--ease), border-color 0.28s, box-shadow 0.28s;
  overflow: hidden;
  break-inside: avoid;
}
.wish-card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow-lg); }
.wish-card .quote {
  position: absolute;
  top: 6px;
  right: 16px;
  font-size: 3.4rem;
  line-height: 1;
  color: var(--brand);
  opacity: 0.14;
  pointer-events: none;
  font-family: Georgia, serif;
}
.wish-head { display: flex; align-items: center; gap: 11px; }
.wish-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.92rem;
  color: #3a0a1c;
  background: var(--gradient);
  flex-shrink: 0;
}
.wish-name { font-weight: 600; font-size: 0.95rem; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.wish-time { font-size: 0.76rem; color: var(--text-muted); font-family: var(--font-mono); }
.wish-text { font-size: 0.96rem; color: var(--text-soft); white-space: pre-wrap; word-break: break-word; }
.wish-emoji { font-size: 1.15rem; }
.wish-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; }

.like-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text-soft);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s var(--ease), background 0.2s, color 0.2s, border-color 0.2s;
  font-variant-numeric: tabular-nums;
}
.like-btn:hover { transform: translateY(-2px); border-color: rgba(255, 95, 143, 0.5); color: var(--brand); }
.like-btn.liked { background: var(--brand-soft); border-color: rgba(255, 95, 143, 0.5); color: var(--brand); }
.like-btn.pop { animation: pop 0.42s var(--ease); }

.badge-local {
  font-size: 0.68rem;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  background: rgba(251, 191, 36, 0.16);
  color: var(--warn);
  border: 1px solid rgba(251, 191, 36, 0.35);
  font-family: var(--font-mono);
}

.wish-empty {
  grid-column: 1 / -1;
  padding: 34px 24px;
  text-align: center;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
  font-size: 0.93rem;
}
.skeleton {
  height: 132px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(100deg, var(--surface) 30%, var(--surface-2) 50%, var(--surface) 70%);
  background-size: 220% 100%;
  animation: shimmer 1.5s linear infinite;
}

/* ---------- 12. 祝福语库 ---------- */
.word-display {
  position: relative;
  padding: clamp(28px, 5vw, 52px);
  border-radius: var(--radius-xl);
  border: 1px solid var(--border);
  background: linear-gradient(150deg, var(--surface-2), var(--surface) 65%);
  text-align: center;
  box-shadow: var(--shadow);
  overflow: hidden;
}
.word-display::before {
  content: "“";
  position: absolute;
  top: -18px;
  left: 18px;
  font-size: 8rem;
  font-family: Georgia, serif;
  color: var(--brand);
  opacity: 0.13;
  line-height: 1;
}
.word-text {
  font-size: clamp(1.2rem, 3.4vw, 1.9rem);
  font-weight: 700;
  line-height: 1.5;
  letter-spacing: -0.01em;
  min-height: 3em;
  display: grid;
  place-items: center;
}
.word-text.flip { animation: fadeUp 0.5s var(--ease); }
.word-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 26px; }
.word-cats { display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; }

.word-list { display: grid; gap: 10px; }
.word-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: transform 0.22s var(--ease), border-color 0.22s;
}
.word-item:hover { transform: translateX(4px); border-color: var(--border-strong); }
.word-item p { flex: 1; font-size: 0.94rem; color: var(--text); }
.word-item .fav { background: none; border: 0; cursor: pointer; font-size: 1.1rem; opacity: 0.4; transition: opacity 0.2s, transform 0.2s; }
.word-item .fav:hover { opacity: 1; transform: scale(1.15); }
.word-item .fav.on { opacity: 1; }

/* ---------- 13. 祝福卡生成器 ---------- */
.card-studio {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
  gap: clamp(22px, 4vw, 44px);
  align-items: start;
}

.greeting-card {
  position: relative;
  aspect-ratio: 3 / 4;
  border-radius: var(--radius-xl);
  padding: clamp(22px, 3.5vw, 40px);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--gradient);
  background-size: 200% 200%;
  animation: hue 12s ease infinite;
  color: #fff;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  text-align: center;
}
.greeting-card::before,
.greeting-card::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  pointer-events: none;
}
.greeting-card::before { width: 200px; height: 200px; top: -70px; right: -60px; }
.greeting-card::after { width: 150px; height: 150px; bottom: -60px; left: -50px; }
.greeting-card .gc-top { position: relative; font-size: 0.8rem; letter-spacing: 0.3em; text-transform: uppercase; opacity: 0.9; }
.greeting-card .gc-mid { position: relative; display: grid; gap: 10px; }
.greeting-card .gc-names {
  font-size: clamp(1.5rem, 5vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.18);
}
.greeting-card .gc-days { font-size: clamp(2.6rem, 11vw, 4.2rem); font-weight: 800; line-height: 1; letter-spacing: -0.04em; }
.greeting-card .gc-days-label { font-size: 0.85rem; opacity: 0.92; letter-spacing: 0.14em; }
.greeting-card .gc-msg { position: relative; font-size: clamp(0.92rem, 2.4vw, 1.08rem); line-height: 1.7; opacity: 0.97; }
.greeting-card .gc-foot { position: relative; font-size: 0.78rem; opacity: 0.9; font-family: var(--font-mono); letter-spacing: 0.08em; }

.card-preview-wrap { position: sticky; top: calc(var(--header-h) + 20px); }

/* ---------- 14. 提示条 ---------- */
.toast-stack {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 90;
  display: grid;
  gap: 10px;
  justify-items: center;
  pointer-events: none;
  width: min(92vw, 460px);
}
.toast {
  padding: 12px 20px;
  border-radius: var(--radius-full);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  box-shadow: var(--shadow-lg);
  font-size: 0.89rem;
  font-weight: 500;
  animation: fadeUp 0.34s var(--ease);
  text-align: center;
}
.toast.ok { border-color: rgba(52, 211, 153, 0.5); }
.toast.err { border-color: rgba(251, 113, 133, 0.55); }

/* ---------- 15. 赞助页 ---------- */
.sponsor-hero { text-align: center; padding: clamp(44px, 7vw, 80px) 0 20px; }
.sponsor-hero .hero-lead { margin-inline: auto; }
.heart { display: inline-block; color: var(--brand); animation: beat 1.8s ease-in-out infinite; }

.cost-list { display: grid; gap: 12px; margin-top: 20px; }
.cost-row { display: flex; align-items: baseline; gap: 12px; font-size: 0.94rem; }
.cost-row .dots { flex: 1; border-bottom: 1px dashed var(--border-strong); transform: translateY(-4px); }
.cost-row b { font-family: var(--font-mono); font-weight: 600; }

.pay-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: transform 0.28s var(--ease), border-color 0.28s, box-shadow 0.28s;
}
.pay-card:hover { transform: translateY(-4px); border-color: var(--border-strong); box-shadow: var(--shadow-lg); }
.pay-card .pay-head { display: flex; align-items: center; gap: 12px; }
.pay-logo { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; font-weight: 800; color: #fff; font-size: 0.8rem; flex-shrink: 0; }
.pay-logo.alipay { background: linear-gradient(135deg, #1677ff, #0ea5e9); }
.pay-logo.wechat { background: linear-gradient(135deg, #07c160, #059669); }
.pay-logo.afdian { background: linear-gradient(135deg, #946ce6, #c084fc); }
.pay-logo.github { background: linear-gradient(135deg, #3f3f46, #18181b); }
.pay-logo.paypal { background: linear-gradient(135deg, #003087, #009cde); }

.qr-box {
  position: relative;
  border-radius: var(--radius);
  border: 1px dashed var(--border-strong);
  background: var(--surface-2);
  padding: 16px;
  display: grid;
  gap: 12px;
  justify-items: center;
  text-align: center;
}
.qr-box img { width: 100%; max-width: 210px; border-radius: 12px; background: #fff; padding: 8px; }
.qr-box .qr-link {
  display: block;
  width: 100%;
  max-width: 210px;
  border-radius: 12px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.qr-box .qr-link:hover,
.qr-box .qr-link:focus-visible { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0, 0, 0, 0.3); }
.qr-box .qr-hint { font-size: 0.8rem; color: var(--text-muted); }

.tier-grid { display: grid; gap: 18px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tier {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 26px 24px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: transform 0.3s var(--ease), border-color 0.3s, box-shadow 0.3s;
}
.tier:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.tier.featured {
  border-color: rgba(255, 95, 143, 0.55);
  background: linear-gradient(165deg, var(--brand-soft), var(--surface) 62%);
  box-shadow: var(--glow);
}
.tier .badge {
  position: absolute;
  top: -11px;
  right: 22px;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: var(--gradient);
  color: #3a0a1c;
  letter-spacing: 0.04em;
}
.tier .price { font-size: 2rem; font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.tier .price small { font-size: 0.85rem; font-weight: 500; color: var(--text-muted); margin-left: 6px; }
.tier ul { display: grid; gap: 9px; font-size: 0.91rem; color: var(--text-soft); }
.tier ul li { display: flex; gap: 9px; }
.tier ul li::before { content: "✓"; color: var(--ok); font-weight: 700; flex-shrink: 0; }

.wall { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.wall-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--surface);
  transition: transform 0.25s var(--ease), border-color 0.25s;
}
.wall-item:hover { transform: translateY(-3px); border-color: var(--border-strong); }
.wall-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.9rem;
  color: #3a0a1c;
  flex-shrink: 0;
  background: var(--gradient);
}
.wall-item .name { font-weight: 600; font-size: 0.94rem; }
.wall-item .msg { font-size: 0.82rem; color: var(--text-muted); }
.wall-empty {
  padding: 26px;
  text-align: center;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-size: 0.92rem;
}

.copy-field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 8px 8px 16px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border);
  background: var(--surface-2);
  font-family: var(--font-mono);
  font-size: 0.86rem;
}
.copy-field span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copy-btn {
  border: 0;
  background: var(--brand-soft);
  color: var(--brand);
  border-radius: var(--radius-full);
  padding: 7px 14px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}
.copy-btn:hover { background: var(--brand); color: #fff; }
.copy-btn.done { background: var(--ok); color: #052e1c; }

.faq { display: grid; gap: 10px; }
.faq details {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 4px 20px;
  transition: border-color 0.25s, background 0.25s;
}
.faq details[open] { border-color: var(--border-strong); background: var(--surface-2); }
.faq summary {
  cursor: pointer;
  padding: 14px 0;
  font-weight: 600;
  font-size: 0.96rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.3rem; color: var(--brand); transition: transform 0.25s var(--ease); flex-shrink: 0; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .faq-body { padding: 0 0 16px; font-size: 0.93rem; }

.note {
  border-left: 3px solid var(--warn);
  background: rgba(251, 191, 36, 0.09);
  background: color-mix(in srgb, var(--warn) 8%, transparent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 14px 18px;
  font-size: 0.9rem;
  color: var(--text-soft);
}

/* ---------- 16. CTA 横幅 ---------- */
.cta-band {
  position: relative;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(140deg, var(--surface-2), var(--surface));
  padding: clamp(26px, 4vw, 42px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 26px;
  align-items: center;
  overflow: hidden;
}
.cta-band::before {
  content: "";
  position: absolute;
  inset: auto -8% -60% 40%;
  height: 220px;
  background: radial-gradient(circle, rgba(255, 95, 143, 0.26), transparent 70%);
  pointer-events: none;
}

/* ---------- 17. 关于页 / 时间线 ---------- */
.timeline { display: grid; }
.timeline-item { position: relative; padding: 0 0 26px 28px; border-left: 1px solid var(--border); }
.timeline-item:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline-item::before {
  content: "";
  position: absolute;
  left: -5px;
  top: 7px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--brand);
  box-shadow: 0 0 0 4px var(--brand-soft);
}
.timeline-item time { font-family: var(--font-mono); font-size: 0.8rem; color: var(--brand-2); }
.timeline-item h3 { font-size: 1.02rem; margin: 4px 0; }
.timeline-item p { font-size: 0.9rem; }

.tick-list { margin-top: 14px; display: grid; gap: 10px; }
.tick-list li { display: flex; gap: 10px; font-size: 0.92rem; color: var(--text-soft); }
.tick-list li::before { content: "▹"; color: var(--brand); flex-shrink: 0; }

/* ---------- 18. 页脚 ---------- */
.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  background: color-mix(in srgb, var(--bg-soft) 70%, transparent);
  padding: 44px 0 28px;
}
.footer-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr)); gap: 28px; }
.footer-grid h4 {
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 14px;
  font-weight: 600;
}
.footer-grid ul { display: grid; gap: 9px; }
.footer-grid a { font-size: 0.9rem; color: var(--text-soft); transition: color 0.2s; }
.footer-grid a:hover { color: var(--brand); }
.footer-bottom {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  justify-content: space-between;
  align-items: center;
  font-size: 0.83rem;
  color: var(--text-muted);
}
.footer-bottom .edge-info { font-family: var(--font-mono); font-size: 0.78rem; }

/* ---------- 19. 浮动元素 ---------- */
.to-top {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 50;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 0.28s var(--ease), transform 0.28s var(--ease);
}
.to-top.show { opacity: 1; pointer-events: auto; transform: none; }

.donate-fab {
  position: fixed;
  right: 22px;
  bottom: 74px;
  z-index: 50;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: var(--radius-full);
  background: var(--gradient);
  color: #3a0a1c;
  font-weight: 700;
  font-size: 0.87rem;
  box-shadow: 0 16px 36px -14px rgba(255, 95, 143, 0.8);
  transition: transform 0.25s var(--ease);
}
.donate-fab:hover { transform: translateY(-3px) scale(1.03); }

/* ---------- 20. 404 / 空态 ---------- */
.center-page { min-height: 60vh; display: grid; place-content: center; text-align: center; gap: 18px; padding: 60px 0; }
.glitch {
  font-size: clamp(3.6rem, 15vw, 8rem);
  font-weight: 800;
  line-height: 1;
  background: var(--gradient);
  background-size: 220% 220%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: hue 8s ease infinite;
}

/* ---------- 21. 动效 ---------- */
[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
  transition-delay: var(--delay, 0ms);
}
[data-reveal].in { opacity: 1; transform: none; }

@keyframes hue { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
@keyframes beat { 0%, 100% { transform: scale(1); } 14% { transform: scale(1.22); } 28% { transform: scale(1); } 42% { transform: scale(1.16); } 56% { transform: scale(1); } }
@keyframes pop { 0% { transform: scale(1); } 40% { transform: scale(1.16); } 100% { transform: scale(1); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -20% 0; } }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* 飘心装饰 */
.float-heart {
  position: absolute;
  font-size: 1rem;
  opacity: 0.5;
  animation: floaty 4s ease-in-out infinite;
  pointer-events: none;
}

/* ---------- 22. 响应式 ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .grid-4, .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tier-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cta-band { grid-template-columns: 1fr; }
  .card-studio { grid-template-columns: 1fr; }
  .card-preview-wrap { position: static; }
}

@media (max-width: 760px) {
  .nav-toggle { display: grid; }
  .nav-links {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 14px 18px 20px;
    background: var(--bg);
    background: color-mix(in srgb, var(--bg) 97%, transparent);
    border-bottom: 1px solid var(--border);
    backdrop-filter: blur(14px);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.24s var(--ease), transform 0.24s var(--ease);
    max-height: calc(100vh - var(--header-h));
    overflow-y: auto;
  }
  .nav-links.open { opacity: 1; transform: none; pointer-events: auto; }
  .nav-links a { padding: 12px 14px; font-size: 0.98rem; }

  .grid-2, .grid-3, .grid-4, .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .counter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .milestone { grid-template-columns: 56px minmax(0, 1fr); row-gap: 2px; }
  .milestone .m-count { grid-column: 2; }
  .donate-fab { right: 16px; bottom: 68px; padding: 10px 15px; font-size: 0.83rem; }
  .to-top { right: 16px; }
  .wish-toolbar { flex-direction: column; align-items: stretch; }
}

@media (max-width: 420px) {
  .counter-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- 23. 可访问性 / 打印 ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] { opacity: 1; transform: none; }
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 12px 18px;
  background: var(--brand);
  color: #fff;
  border-radius: 0 0 12px 0;
}
.skip-link:focus { left: 0; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

@media print {
  .site-header, .site-footer, .to-top, .donate-fab, .toast-stack { display: none; }
  body { background: #fff; color: #000; }
  body::before { display: none; }
}
