/* ============================================================
   愿岁幸 · 全局样式
   设计方向：清新柔和 / 温暖治愈 / 校园生日主题
   ============================================================ */

/* ---------- 1. 设计变量 ---------- */
:root {
  --bg: #fff8f2;
  --ink: #574542;
  --ink-soft: #8a7570;
  --ink-mute: #b3a09a;
  --line: #f3e4db;
  --line-soft: #fbf0e9;
  --coral: #ff8f7d;
  --coral-deep: #ef6d5b;
  --peach: #ffb4a2;
  --lav: #c7b6e6;
  --mint: #a8dcc6;
  --sun: #ffd97d;
  --sky: #8fb8e8;
  --card: #ffffff;
  --radius: 20px;
  --radius-sm: 14px;
  --shadow: 0 10px 30px rgba(226, 160, 140, 0.14);
  --shadow-hover: 0 16px 38px rgba(226, 160, 140, 0.2);
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Source Han Sans SC", system-ui, -apple-system, sans-serif;
}

/* ---------- 2. 基础重置 ---------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  color: var(--ink);
  background:
    radial-gradient(900px 620px at 6% -12%, #ffe4d6 0%, transparent 62%),
    radial-gradient(820px 520px at 102% -6%, #ebe2ff 0%, transparent 58%),
    radial-gradient(760px 560px at 52% 112%, #e0f6ed 0%, transparent 62%),
    var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* 静态星点背景，增加治愈感 */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    radial-gradient(rgba(255, 255, 255, 0.95) 1px, transparent 1.6px),
    radial-gradient(rgba(255, 209, 186, 0.85) 1px, transparent 1.6px);
  background-size: 88px 88px, 148px 148px;
  background-position: 0 0, 44px 66px;
  opacity: 0.7;
}

body.modal-open { overflow: hidden; }

h1, h2, h3, p, ul { margin: 0; }

h1 { font-size: 32px; line-height: 1.25; letter-spacing: 1px; }
h2 { font-size: 18px; line-height: 1.35; }
h3 { font-size: 18px; }

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

.hidden { display: none !important; }

/* hidden 属性优先级高于组件自身的 display，避免被 grid/inline-grid 覆盖 */
[hidden] { display: none !important; }

/* ---------- 3. 顶部导航 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 253, 251, 0.8);
  border-bottom: 1px solid rgba(243, 228, 219, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.header-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 13px 24px;
  display: flex;
  align-items: center;
  gap: 26px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  color: inherit;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #ffc0ad, #ff8f7d 55%, #ef6d5b);
  box-shadow: 0 8px 18px rgba(239, 109, 91, 0.3);
  transition: transform 0.3s ease;
}

.brand:hover .brand-mark { transform: rotate(-8deg) scale(1.05); }

.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 19px; letter-spacing: 2px; }
.brand-text small { font-size: 11px; color: var(--ink-mute); letter-spacing: 1px; margin-top: 2px; }

.main-nav {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  flex-wrap: wrap;
}

.main-nav a {
  position: relative;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 14px;
  color: var(--ink-soft);
  text-decoration: none;
  transition: background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.main-nav a:hover { background: #fff1ea; color: var(--coral-deep); }

.main-nav a.active {
  color: var(--coral-deep);
  font-weight: 600;
  background: linear-gradient(135deg, #ffe6dd, #ffd4c8);
  box-shadow: inset 0 0 0 1px rgba(255, 180, 162, 0.35);
}

.nav-badge {
  display: inline-grid;
  place-items: center;
  min-width: 17px;
  height: 17px;
  margin-left: 4px;
  padding: 0 4px;
  border-radius: 9px;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  background: var(--coral-deep);
  vertical-align: 1px;
}

.identity-box {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  font-size: 12px;
  color: var(--ink-mute);
}

.identity-box select {
  appearance: none;
  -webkit-appearance: none;
  max-width: 150px;
  padding: 8px 30px 8px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%23b3a09a' stroke-width='1.6' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 12px center;
  font-size: 13px;
  color: var(--ink);
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.identity-box select:focus { border-color: var(--peach); box-shadow: 0 0 0 3px rgba(255, 180, 162, 0.2); }

/* ---------- 4. 页面与卡片 ---------- */
.container {
  position: relative;
  z-index: 1;
  max-width: 1180px;
  margin: 0 auto;
  padding: 30px 24px 56px;
}

.page { animation: page-in 0.42s ease both; }

@keyframes page-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.card {
  min-width: 0;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.95);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.card-head h2 { letter-spacing: 0.4px; }
.card-head p { margin-top: 4px; font-size: 12.5px; color: var(--ink-mute); }

.chip {
  flex-shrink: 0;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  color: #a5786a;
  background: #fff2ea;
  border: 1px solid #ffe3d5;
}

.count-tag {
  flex-shrink: 0;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--coral-deep);
  background: #fff2ec;
  border: 1px solid #ffded2;
}

.eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2.4px;
  color: var(--coral);
  text-transform: uppercase;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
  padding: 4px 2px;
}

.section-head h1 { margin: 6px 0 6px; font-size: 28px; }
.section-desc { max-width: 620px; font-size: 13.5px; color: var(--ink-soft); }

.section-tip {
  flex-shrink: 0;
  padding: 9px 16px;
  border-radius: 999px;
  font-size: 12.5px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid var(--line);
  box-shadow: 0 6px 16px rgba(226, 160, 140, 0.08);
}

/* ---------- 5. 首页 Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.35fr 0.9fr;
  align-items: center;
  gap: 26px;
  padding: 36px 38px;
  margin-bottom: 22px;
  background: linear-gradient(118deg, rgba(255, 255, 255, 0.95), rgba(255, 245, 239, 0.94));
}

.hero::before {
  content: "";
  position: absolute;
  right: -70px;
  top: -90px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 180, 162, 0.42), transparent 68%);
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  left: 34%;
  bottom: -120px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(199, 182, 230, 0.32), transparent 70%);
  pointer-events: none;
}

.hero-copy { position: relative; z-index: 1; }
.hero-copy h1 { margin: 8px 0 10px; font-size: 36px; letter-spacing: 2px; }
.hero-desc { max-width: 500px; font-size: 14px; color: var(--ink-soft); }

.hero-actions { display: flex; gap: 12px; margin-top: 22px; flex-wrap: wrap; }

.hero-today {
  position: relative;
  z-index: 1;
  min-height: 150px;
  display: flex;
  align-items: center;
  padding: 20px 22px;
  border-radius: 18px;
  background: linear-gradient(155deg, #fffdfb, #fff0e7);
  border: 1px solid #ffe4d8;
  box-shadow: 0 12px 24px rgba(239, 109, 91, 0.1);
}

.today-card { width: 100%; }

.today-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  color: #b06a56;
  background: #ffe9df;
}

.today-name {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--coral-deep);
}

.today-desc { margin-top: 4px; font-size: 12.5px; color: var(--ink-soft); }

.today-avatars { display: flex; gap: 8px; margin-top: 12px; flex-wrap: wrap; }

.today-empty { font-size: 13.5px; color: var(--ink-soft); line-height: 1.8; }
.today-empty strong { color: var(--coral-deep); }

/* ---------- 6. 数据概览 ---------- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 22px;
}

.stat-card {
  position: relative;
  overflow: hidden;
  padding: 18px 20px;
}

.stat-card::after {
  content: "";
  position: absolute;
  right: -26px;
  bottom: -34px;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: var(--stat-tint, #fff0e7);
  opacity: 0.85;
}

.stat-icon { position: relative; z-index: 1; font-size: 20px; }
.stat-value { position: relative; z-index: 1; margin-top: 8px; font-size: 28px; font-weight: 700; letter-spacing: 0.5px; line-height: 1.15; }
.stat-label { position: relative; z-index: 1; margin-top: 2px; font-size: 12.5px; color: var(--ink-mute); }
.stat-note { position: relative; z-index: 1; margin-top: 8px; font-size: 11.5px; color: var(--coral-deep); }

/* ---------- 7. 图表 ---------- */
.chart-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 18px;
  margin-bottom: 22px;
}

.chart-card { padding: 22px 24px 12px; }
.chart { width: 100%; height: 300px; }

.chart-fallback {
  height: 100%;
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 13px;
  color: var(--ink-mute);
  border: 1px dashed var(--line);
  border-radius: 14px;
}

/* ---------- 8. 本月寿星 ---------- */
.birthday-wall { padding: 22px 24px; }

.wall-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.wall-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 16px;
  background: linear-gradient(150deg, #fffaf6, #fff6ef);
  border: 1px solid #fbe9de;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.wall-item:hover { transform: translateY(-2px); box-shadow: 0 10px 20px rgba(226, 160, 140, 0.14); }

.wall-date {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.15;
  color: #b06a56;
  background: #ffe8dd;
  text-align: center;
}

.wall-date.is-today { color: #fff; background: linear-gradient(135deg, #ff9d8a, #ef6d5b); box-shadow: 0 6px 14px rgba(239, 109, 91, 0.3); }

.wall-name { font-size: 14px; font-weight: 600; }
.wall-meta { margin-top: 2px; font-size: 11.5px; color: var(--ink-mute); }

.empty-state {
  padding: 30px 20px;
  text-align: center;
  font-size: 13px;
  color: var(--ink-mute);
  border: 1px dashed var(--line);
  border-radius: 16px;
  background: rgba(255, 251, 247, 0.6);
}

.empty-state .empty-emoji { display: block; font-size: 24px; margin-bottom: 6px; }

/* ---------- 9. 表单 ---------- */
.profile-layout,
.square-layout {
  display: grid;
  grid-template-columns: 370px 1fr;
  gap: 18px;
  align-items: start;
}

.form-card { padding: 24px; }
.form-card h2 { margin-bottom: 18px; }

.field { margin-bottom: 17px; }

.field label {
  display: block;
  margin-bottom: 7px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
}

.field label em { font-style: normal; color: var(--coral); }

.field input[type="text"],
.field input[type="date"],
.field select,
.field textarea {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fffdfb;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.field textarea { resize: vertical; min-height: 120px; line-height: 1.7; }

.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--peach);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(255, 180, 162, 0.18);
}

.field input::placeholder,
.field textarea::placeholder { color: #cbb8b1; }

.field-hint { margin-top: 6px; font-size: 11.5px; color: var(--ink-mute); }

.field-meta { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.field-meta .field-hint { flex: 1; }
.field-meta span { flex-shrink: 0; font-size: 11.5px; color: var(--ink-mute); }

.radio-group { display: flex; gap: 8px; flex-wrap: wrap; }

.radio-pill { position: relative; cursor: pointer; }
.radio-pill input { position: absolute; opacity: 0; pointer-events: none; }

.radio-pill span {
  display: inline-block;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--ink-soft);
  background: #fff;
  border: 1px solid var(--line);
  transition: all 0.2s ease;
}

.radio-pill input:checked + span {
  color: var(--coral-deep);
  background: linear-gradient(135deg, #ffe8df, #ffd9cc);
  border-color: #ffcbb9;
  font-weight: 600;
}

.radio-pill input:focus-visible + span { box-shadow: 0 0 0 3px rgba(255, 180, 162, 0.3); }

.switch-row {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 13px 14px;
  margin-bottom: 16px;
  border-radius: 14px;
  background: #fff8f4;
  border: 1px solid var(--line-soft);
  cursor: pointer;
}

.switch-row input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--coral-deep);
  cursor: pointer;
  flex-shrink: 0;
}

.switch-text { display: flex; flex-direction: column; font-size: 13px; font-weight: 600; }
.switch-text small { margin-top: 2px; font-size: 11.5px; font-weight: 400; color: var(--ink-mute); line-height: 1.5; }

.form-error {
  margin: -2px 0 14px;
  padding: 10px 13px;
  border-radius: 11px;
  font-size: 12.5px;
  color: #c05242;
  background: #fff0ed;
  border: 1px solid #ffd3ca;
}

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

/* ---------- 10. 按钮 ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 22px;
  border: 0;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
  white-space: nowrap;
}

.btn:active { transform: translateY(1px) scale(0.99); }

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #ffa48f, #ef6d5b);
  box-shadow: 0 10px 22px rgba(239, 109, 91, 0.26);
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 26px rgba(239, 109, 91, 0.32); }

.btn-ghost {
  color: var(--ink-soft);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 4px 12px rgba(226, 160, 140, 0.08);
}

.btn-ghost:hover { background: #fff8f3; border-color: #ffd9c9; color: var(--coral-deep); }

.btn-block { width: 100%; }

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

.link-btn {
  padding: 0;
  border: 0;
  background: none;
  font-size: 12.5px;
  color: var(--coral-deep);
  cursor: pointer;
  transition: color 0.18s ease, opacity 0.18s ease;
}

.link-btn:hover { opacity: 0.72; text-decoration: underline; }
.link-btn.danger { color: #b96a5e; }
.link-btn + .link-btn { margin-left: 12px; }

/* ---------- 11. 表格 ---------- */
.table-wrap { overflow-x: auto; }

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  min-width: 480px;
}

.data-table th {
  padding: 10px 12px;
  text-align: left;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--ink-mute);
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}

.data-table td {
  padding: 12px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
}

.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr { transition: background 0.18s ease; }
.data-table tbody tr:hover { background: #fffaf6; }
.data-table tr.is-current { background: #fff6f0; }

.col-actions { text-align: right; }
.table-actions { text-align: right; white-space: nowrap; }

.member-name { display: flex; align-items: center; gap: 8px; font-weight: 600; }

.avatar {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0;
}

.tag {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  vertical-align: 1px;
}

.tag-current { color: #b06a56; background: #ffe8dd; }

.muted { color: var(--ink-mute); }

/* ---------- 12. 祝福卡片 ---------- */
.blessing-list { display: flex; flex-direction: column; gap: 12px; }

.member-card { padding: 22px 24px; }

.wall-card { padding: 24px; }
.wall-card .blessing-list { max-height: 640px; overflow-y: auto; padding-right: 4px; }

.blessing-item {
  position: relative;
  padding: 15px 17px 14px;
  border-radius: 16px;
  background: linear-gradient(158deg, #fffdfb, #fff7f1);
  border: 1px solid #fbe9de;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.blessing-item:hover { transform: translateY(-1px); box-shadow: 0 10px 22px rgba(226, 160, 140, 0.12); }
.blessing-item.is-unread { border-color: #ffcdbe; background: linear-gradient(158deg, #fff9f5, #fff0e8); }

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

.blessing-from { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.blessing-to { font-size: 11.5px; color: var(--ink-mute); }
.blessing-time { flex-shrink: 0; font-size: 11px; color: var(--ink-mute); }
.blessing-content { font-size: 14px; line-height: 1.8; word-break: break-word; }
.blessing-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; }

.tag-anon { color: #7d6a9e; background: #f0e9fb; }
.tag-name { color: #4f8a74; background: #e6f6ee; }
.tag-unread { color: #fff; background: var(--coral); }

.blessing-actions { display: flex; gap: 12px; }

.inbox-list { gap: 14px; }

.inbox-card { padding: 20px 22px; }

/* 我的祝福里的统计 */
.stat-grid-inbox { grid-template-columns: repeat(3, 1fr); }

/* ---------- 13. 审核日志 ---------- */
.audit-card { padding: 22px 24px; }

.audit-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.segmented {
  display: inline-flex;
  padding: 4px;
  gap: 3px;
  border-radius: 999px;
  background: #fff6f0;
  border: 1px solid var(--line-soft);
}

.segmented button {
  padding: 6px 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-size: 12.5px;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.18s ease;
}

.segmented button.active {
  color: var(--coral-deep);
  font-weight: 600;
  background: #fff;
  box-shadow: 0 3px 10px rgba(226, 160, 140, 0.16);
}

.audit-stats { font-size: 12px; color: var(--ink-mute); }

.audit-table { min-width: 760px; }
.audit-table .col-content { max-width: 320px; }

.audit-content-cell {
  max-width: 320px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink-soft);
}

.status-pill {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.status-blocked { color: #b0402f; background: #ffe9e4; }
.status-passed { color: #3f8068; background: #e4f5ed; }

.hit-words { font-size: 12px; color: #b0402f; }

/* ---------- 14. 弹窗通用 ---------- */
.modal-mask {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(87, 69, 66, 0.34);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-mask.is-open { opacity: 1; visibility: visible; pointer-events: auto; }

.birthday-card {
  position: relative;
  width: min(520px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  padding: 38px 34px 28px;
  text-align: center;
  border-radius: 28px;
  background:
    radial-gradient(600px 260px at 50% -10%, rgba(255, 217, 125, 0.28), transparent 70%),
    linear-gradient(165deg, #fffdfb, #fff3ea 58%, #ffe9df);
  box-shadow:
    0 30px 70px rgba(198, 108, 90, 0.28),
    inset 0 0 0 1px rgba(255, 255, 255, 0.9);
}

/* 生日弹窗专属遮罩：暖粉半透明 + 更强背景模糊 */
#birthday-modal {
  background: rgba(255, 201, 184, 0.42);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: opacity 0.3s ease, visibility 0.3s ease, background 0.3s ease, backdrop-filter 0.3s ease;
}

.modal-mask.is-open .birthday-card {
  animation: bd-card-in 0.55s cubic-bezier(0.2, 0.9, 0.3, 1.15) both;
}

/* 关闭：反向缩小淡出 */
.modal-mask.is-open .birthday-card.is-leaving {
  animation: bd-card-out 0.3s cubic-bezier(0.4, 0, 0.6, 1) forwards;
}

#birthday-modal.is-leaving {
  opacity: 0;
  background: rgba(255, 201, 184, 0);
  backdrop-filter: blur(0);
  -webkit-backdrop-filter: blur(0);
}

@keyframes bd-card-in {
  0% { opacity: 0; transform: translateY(24px) scale(0.88); }
  62% { opacity: 1; transform: translateY(-4px) scale(1.015); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes bd-card-out {
  0% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(12px) scale(0.9); }
}

@keyframes modal-pop {
  0% { opacity: 0; transform: translateY(24px) scale(0.92); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

.bd-glow {
  position: absolute;
  top: -60px;
  left: 50%;
  width: 260px;
  height: 200px;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(255, 200, 160, 0.5), transparent 70%);
  pointer-events: none;
}

.bd-cake { position: relative; font-size: 52px; line-height: 1; animation: soft-float 3.2s ease-in-out infinite; }

@keyframes soft-float {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-7px) rotate(2deg); }
}

.birthday-card h2 { position: relative; margin: 14px 0 6px; font-size: 26px; letter-spacing: 1px; }
.birthday-card h2 span { color: var(--coral-deep); }
.bd-sub { position: relative; font-size: 12.5px; color: var(--ink-soft); }

.bd-blessing-list {
  position: relative;
  list-style: none;
  padding: 0;
  margin: 20px 0 22px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  text-align: left;
}

.bd-blessing-list li {
  position: relative;
  padding: 11px 14px 11px 38px;
  border-radius: 13px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 12px rgba(226, 160, 140, 0.1);
  animation: star-fade 0.7s cubic-bezier(0.2, 0.7, 0.3, 1) both;
}

.bd-blessing-list li::before {
  content: "✦";
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 12px;
  color: var(--sun);
  text-shadow: 0 0 8px rgba(255, 217, 125, 0.8);
}

@keyframes star-fade {
  0% { opacity: 0; transform: translateY(12px) scale(0.97); filter: blur(3px); }
  60% { opacity: 1; filter: blur(0); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* 内容按顺序入场：标题 → 副标题 → 逐条祝福 → 按钮 → 底部小字 */
#bd-title,
.bd-sub,
.bd-blessing-list,
.bd-actions,
.bd-footnote {
  position: relative;
  z-index: 1;
}

.modal-mask.is-open #bd-title { animation: bd-rise 0.5s 0.16s cubic-bezier(0.2, 0.8, 0.3, 1) both; }
.modal-mask.is-open .bd-sub { animation: bd-rise 0.5s 0.24s cubic-bezier(0.2, 0.8, 0.3, 1) both; }
.modal-mask.is-open .bd-actions { animation: bd-rise 0.5s 1s cubic-bezier(0.2, 0.8, 0.3, 1) both; }
.modal-mask.is-open .bd-footnote { animation: bd-rise 0.5s 1.1s cubic-bezier(0.2, 0.8, 0.3, 1) both; }

@keyframes bd-rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 角落缓慢浮动的星星点缀，低透明度，不遮挡文字 */
.bd-spark {
  position: absolute;
  z-index: 0;
  width: 10px;
  height: 10px;
  pointer-events: none;
  color: var(--sun);
  opacity: 0.4;
  animation: spark-drift 6s ease-in-out infinite;
}

.bd-spark::before { content: "✦"; font-size: 10px; }

.bd-spark-1 { top: 66px; left: 34px; animation-delay: 0.2s; }
.bd-spark-2 { top: 24px; right: 76px; animation-delay: 1.1s; animation-duration: 7.5s; }
.bd-spark-3 { top: 42%; left: 18px; animation-delay: 2.2s; animation-duration: 8s; }
.bd-spark-4 { bottom: 92px; right: 26px; animation-delay: 0.7s; animation-duration: 6.8s; }
.bd-spark-5 { bottom: 26px; left: 42%; animation-delay: 1.8s; animation-duration: 9s; }
.bd-spark-6 { top: 30%; right: 30px; animation-delay: 2.8s; animation-duration: 7.2s; }

@keyframes spark-drift {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); opacity: 0.22; }
  50% { transform: translate3d(5px, -9px, 0) rotate(14deg); opacity: 0.62; }
}

/* 弹窗按钮：悬停上浮 + 柔和阴影，点击轻微收缩 */
.birthday-card .btn { transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease; }
.birthday-card .btn:hover { transform: translateY(-3px); }
.birthday-card .btn-primary:hover { box-shadow: 0 14px 28px rgba(239, 109, 91, 0.34); }
.birthday-card .btn:active { transform: translateY(0) scale(0.97); }

.bd-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.bd-footnote { margin-top: 16px; font-size: 11px; color: var(--ink-mute); letter-spacing: 0.5px; }

.modal-close {
  position: absolute;
  top: 14px;
  right: 16px;
  z-index: 2;
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.7);
  color: var(--ink-soft);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
}

.modal-close:hover { background: #fff; transform: rotate(90deg); }

.dialog-card {
  width: min(390px, 100%);
  padding: 28px 26px 22px;
  text-align: center;
  border-radius: 24px;
  background: #fffdfb;
  box-shadow: 0 26px 60px rgba(120, 90, 82, 0.26);
}

.modal-mask.is-open .dialog-card { animation: modal-pop 0.38s cubic-bezier(0.2, 0.9, 0.3, 1.1) both; }

.dialog-icon { font-size: 30px; line-height: 1; margin-bottom: 10px; }
.dialog-card h3 { margin-bottom: 8px; font-size: 18px; }
.dialog-card p { font-size: 13.5px; color: var(--ink-soft); line-height: 1.8; word-break: break-word; }
.dialog-actions { display: flex; gap: 10px; justify-content: center; margin-top: 20px; }

/* ---------- 15. 彩带与气球 ---------- */
#confetti-canvas {
  position: fixed;
  inset: 0;
  z-index: 102;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.balloon-layer {
  position: fixed;
  inset: 0;
  z-index: 101;
  overflow: hidden;
  pointer-events: none;
}

.balloon {
  position: absolute;
  bottom: -140px;
  animation: balloon-rise linear forwards;
  will-change: transform;
}

.balloon-body {
  position: relative;
  display: block;
  width: var(--size, 34px);
  height: calc(var(--size, 34px) * 1.18);
  border-radius: 50% 50% 48% 48%;
  background:
    radial-gradient(circle at 32% 26%, rgba(255, 255, 255, 0.85), transparent 42%),
    var(--color, #ffb4a2);
  box-shadow: inset -5px -7px 12px rgba(120, 70, 60, 0.12);
  animation: balloon-sway 2.8s ease-in-out infinite alternate;
}

.balloon-body::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 1px;
  height: 46px;
  background: linear-gradient(to bottom, rgba(150, 115, 105, 0.42), rgba(150, 115, 105, 0));
  transform: translateX(-50%);
}

.balloon-body::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -4px;
  width: 8px;
  height: 6px;
  border-radius: 50%;
  background: var(--color, #ffb4a2);
  transform: translateX(-50%);
}

@keyframes balloon-rise {
  0% { transform: translate3d(0, 0, 0); opacity: 0; }
  8% { opacity: 1; }
  100% { transform: translate3d(0, calc(-100vh - 260px), 0); opacity: 0.9; }
}

@keyframes balloon-sway {
  from { transform: translateX(-9px) rotate(-4deg); }
  to { transform: translateX(9px) rotate(4deg); }
}

/* ---------- 16. Toast ---------- */
.toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  z-index: 200;
  padding: 11px 22px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  background: rgba(87, 69, 66, 0.92);
  box-shadow: 0 12px 30px rgba(87, 69, 66, 0.26);
  transform: translate(-50%, 20px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 17. 页脚 ---------- */
.site-footer {
  position: relative;
  z-index: 1;
  padding: 26px 24px 34px;
  text-align: center;
  font-size: 12px;
  color: var(--ink-mute);
  border-top: 1px solid rgba(243, 228, 219, 0.8);
  background: rgba(255, 253, 251, 0.55);
}

.site-footer p:first-child { font-size: 13px; letter-spacing: 2px; color: var(--ink-soft); }
.footer-meta { margin-top: 5px; font-size: 11px; }

/* ---------- 18. 滚动条 ---------- */
.blessing-list::-webkit-scrollbar,
.table-wrap::-webkit-scrollbar,
.birthday-card::-webkit-scrollbar { width: 6px; height: 6px; }

.blessing-list::-webkit-scrollbar-thumb,
.table-wrap::-webkit-scrollbar-thumb,
.birthday-card::-webkit-scrollbar-thumb { border-radius: 3px; background: #f0d8cc; }

/* ---------- 19. 响应式 ---------- */
@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; padding: 30px; }
  .hero-today { min-height: auto; }
  .wall-list { grid-template-columns: repeat(2, 1fr); }
  .profile-layout, .square-layout { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .header-inner { flex-wrap: wrap; gap: 12px 18px; }
  .main-nav { order: 3; width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; }
  .identity-box { margin-left: auto; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
  .chart-grid { grid-template-columns: 1fr; }
  .section-head { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 560px) {
  .container { padding: 20px 14px 42px; }
  .header-inner { padding: 11px 14px; }
  .brand-text small { display: none; }
  .hero { padding: 24px 20px; }
  .hero-copy h1 { font-size: 27px; }
  h1 { font-size: 25px; }
  .stat-grid, .stat-grid-inbox { grid-template-columns: 1fr 1fr; gap: 10px; }
  .wall-list { grid-template-columns: 1fr; }
  .form-card, .wall-card, .audit-card, .chart-card, .birthday-wall, .member-card { padding: 18px; }
  .chart { height: 250px; }
  .birthday-card { padding: 32px 20px 24px; }
  .birthday-card h2 { font-size: 22px; }
  .bd-actions .btn { flex: 1; }
  .identity-box > label { display: none; }
  .identity-box select { max-width: 118px; }
}

/* ---------- 20. 无障碍：尊重系统减弱动效设置 ---------- */
@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;
  }
}

/* ============================================================
   21. 启动占位
   ============================================================ */
.boot-screen {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-content: center;
  gap: 14px;
  text-align: center;
  background: var(--bg);
  color: var(--ink-mute);
  font-size: 13px;
}

.boot-mark {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  margin: 0 auto;
  border-radius: 18px;
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #ffc0ad, #ff8f7d 55%, #ef6d5b);
  box-shadow: 0 12px 26px rgba(239, 109, 91, 0.3);
  animation: soft-float 2.6s ease-in-out infinite;
}

/* ============================================================
   22. 登录 / 注册 / 配置引导
   ============================================================ */
.auth-wrap {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 38px 20px;
}

.auth-card {
  width: min(470px, 100%);
  padding: 34px 34px 26px;
  background: linear-gradient(165deg, rgba(255, 255, 255, 0.97), rgba(255, 248, 243, 0.95));
  animation: page-in 0.45s ease both;
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 24px;
}

.auth-mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #ffc0ad, #ff8f7d 55%, #ef6d5b);
  box-shadow: 0 8px 18px rgba(239, 109, 91, 0.28);
}

.auth-brand div { display: flex; flex-direction: column; line-height: 1.25; }
.auth-brand strong { font-size: 20px; letter-spacing: 2px; }
.auth-brand small { font-size: 11px; color: var(--ink-mute); letter-spacing: 1px; }

.auth-card h1 { margin: 6px 0 10px; font-size: 24px; letter-spacing: 1px; }
.auth-desc { font-size: 13px; color: var(--ink-soft); line-height: 1.8; }

.auth-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  margin-bottom: 20px;
  border-radius: 999px;
  background: #fff5ef;
  border: 1px solid var(--line-soft);
}

.auth-tabs button {
  flex: 1;
  padding: 9px 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-size: 13.5px;
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.2s ease;
}

.auth-tabs button.active {
  color: var(--coral-deep);
  font-weight: 600;
  background: #fff;
  box-shadow: 0 4px 12px rgba(226, 160, 140, 0.16);
}

.auth-form .field { margin-bottom: 14px; }

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.auth-foot {
  margin-top: 14px;
  text-align: center;
  font-size: 12.5px;
  color: var(--ink-mute);
}

.auth-note {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed var(--line);
  text-align: center;
  font-size: 11px;
  color: var(--ink-mute);
}

.auth-note code,
.auth-card code {
  padding: 1px 5px;
  border-radius: 5px;
  background: #fff2ec;
  color: #a5786a;
  font-size: 11.5px;
}

.guide-steps {
  margin: 18px 0 0;
  padding-left: 20px;
  font-size: 13px;
  color: var(--ink-soft);
  line-height: 2;
}

.guide-steps a { color: var(--coral-deep); }

/* ============================================================
   23. 顶部用户信息
   ============================================================ */
.user-box {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.user-box .avatar {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  font-size: 14px;
}

.user-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  max-width: 108px;
}

.user-meta strong {
  font-size: 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-meta small {
  font-size: 10.5px;
  color: var(--ink-mute);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ============================================================
   24. 成员搜索与只读标识
   ============================================================ */
.member-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.member-toolbar input,
.search-row input {
  flex: 1;
  min-width: 0;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fffdfb;
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.member-toolbar input:focus,
.search-row input:focus {
  border-color: var(--peach);
  box-shadow: 0 0 0 3px rgba(255, 180, 162, 0.18);
}

.search-hint { flex-shrink: 0; font-size: 11.5px; color: var(--ink-mute); }

.tag-readonly {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  color: var(--ink-mute);
  background: #f4efec;
}

.tag-owner {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 10.5px;
  color: #4f8a74;
  background: #e6f6ee;
}

/* ============================================================
   25. 发送方式切换
   ============================================================ */
.scope-switch {
  display: flex;
  width: 100%;
}

.scope-switch button { flex: 1; }

/* ============================================================
   26. 好友
   ============================================================ */
.friends-top {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
  align-items: start;
}

.friend-search-card,
.pending-card { padding: 22px 24px; }

.search-row { display: flex; gap: 8px; margin-bottom: 14px; }

.search-result { display: flex; flex-direction: column; gap: 8px; }

.search-user {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 13px;
  background: #fffaf6;
  border: 1px solid var(--line-soft);
}

.search-user .user-info { flex: 1; min-width: 0; }
.search-user .user-info strong { display: block; font-size: 13px; }
.search-user .user-info small { font-size: 11px; color: var(--ink-mute); }

.request-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin-bottom: 8px;
  border-radius: 13px;
  background: #fffaf6;
  border: 1px solid var(--line-soft);
}

.request-item .user-info { flex: 1; min-width: 0; }
.request-item .user-info strong { display: block; font-size: 13px; }
.request-item .user-info small { font-size: 11px; color: var(--ink-mute); }

.request-actions { display: flex; gap: 8px; flex-shrink: 0; }

.request-actions .btn { padding: 6px 13px; font-size: 12px; }

.sub-title {
  margin: 18px 0 10px;
  font-size: 13px;
  color: var(--ink-soft);
}

.friends-card { padding: 22px 24px; }

.friend-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.friend-card {
  padding: 16px;
  border-radius: 16px;
  background: linear-gradient(155deg, #fffdfb, #fff6ef);
  border: 1px solid #fbe9de;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.friend-card:hover { transform: translateY(-2px); box-shadow: 0 10px 22px rgba(226, 160, 140, 0.14); }

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

.friend-card-head .avatar { width: 38px; height: 38px; border-radius: 12px; font-size: 15px; }

.friend-name { font-size: 14px; font-weight: 600; }
.friend-realname { font-size: 11px; color: var(--ink-mute); }

.friend-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin-bottom: 12px;
  font-size: 11.5px;
  color: var(--ink-soft);
}

.friend-actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* ============================================================
   27. 资料设置与备注弹窗
   ============================================================ */
.profile-dialog {
  width: min(440px, 100%);
  text-align: left;
  padding: 30px 28px 24px;
}

.profile-dialog h3 { text-align: center; }

.dialog-sub {
  margin-bottom: 14px;
  font-size: 12px;
  color: var(--ink-mute);
  line-height: 1.7;
  text-align: center;
}

.profile-dialog .dialog-actions { margin-top: 6px; }
.profile-dialog .modal-close { top: 12px; right: 14px; }

#remark-modal .dialog-card { text-align: left; }
#remark-modal .dialog-sub { text-align: left; }

/* ============================================================
   28. 加载与空状态
   ============================================================ */
.loading-box {
  padding: 26px 18px;
  text-align: center;
  font-size: 12.5px;
  color: var(--ink-mute);
  border: 1px dashed var(--line);
  border-radius: 16px;
  background: rgba(255, 251, 247, 0.6);
}

.mini-loading {
  padding: 14px 10px;
  font-size: 12px;
  color: var(--ink-mute);
  text-align: center;
}

/* ============================================================
   29. 响应式补充
   ============================================================ */
@media (max-width: 1180px) {
  .header-inner { gap: 16px; }
  .main-nav a { padding: 8px 11px; }
  .user-meta { display: none; }
}

@media (max-width: 1024px) {
  .friends-top { grid-template-columns: 1fr; }
  .friend-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 860px) {
  .user-box { margin-left: auto; }
  .user-box .btn { padding: 7px 12px; font-size: 12px; }
}

@media (max-width: 560px) {
  .auth-card { padding: 26px 20px 20px; }
  .field-row { grid-template-columns: 1fr; }
  .friend-grid { grid-template-columns: 1fr; }
  .friend-search-card, .pending-card, .friends-card { padding: 18px; }
  .user-box .avatar { display: none; }
  .user-box .btn { padding: 6px 10px; }
  .member-toolbar { flex-wrap: wrap; }
  .search-hint { width: 100%; }
}