/* ============================================================
   恋爱记录 · 样式
   粉嫩甜美：樱花粉 + 奶油白 + 圆角卡片
   ============================================================ */

:root {
  --pink-50: #fff6f9;
  --pink-100: #ffe9f0;
  --pink-200: #ffd6e4;
  --pink-300: #ffbcd3;
  --pink-400: #ff97b9;
  --pink-500: #ff7aa2;
  --rose: #ef5f8b;
  --rose-deep: #d94572;
  --cream: #fffcf9;
  --ink: #4d2f3b;
  --ink-soft: #7a5b67;
  --muted: #ab8a97;
  --line: rgba(239, 95, 139, 0.14);
  --shadow-sm: 0 2px 8px rgba(214, 108, 143, 0.08);
  --shadow: 0 10px 30px -12px rgba(214, 108, 143, 0.35);
  --shadow-lg: 0 24px 60px -24px rgba(190, 70, 110, 0.4);
  --r-lg: 26px;
  --r-md: 18px;
  --r-sm: 12px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}

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

html,
body {
  margin: 0;
  padding: 0;
}

body {
  min-height: 100dvh;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC",
    "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  color: var(--ink);
  background: linear-gradient(170deg, #fff8fb 0%, #ffeef5 38%, #ffe4ee 72%, #fff2f6 100%);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

button {
  font: inherit;
  color: inherit;
  border: 0;
  background: none;
  cursor: pointer;
}

input,
textarea {
  font: inherit;
  color: inherit;
}

.is-hidden {
  display: none !important;
}

/* ------------------------------ 背景装饰 ------------------------------ */

.bg-deco {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  animation: float 18s ease-in-out infinite;
}

.b1 {
  width: 340px;
  height: 340px;
  top: -120px;
  right: -90px;
  background: radial-gradient(circle, #ffc9dc 0%, rgba(255, 201, 220, 0) 70%);
}

.b2 {
  width: 300px;
  height: 300px;
  bottom: -110px;
  left: -80px;
  background: radial-gradient(circle, #ffd9c9 0%, rgba(255, 217, 201, 0) 70%);
  animation-delay: -6s;
}

.b3 {
  width: 260px;
  height: 260px;
  top: 42%;
  left: 55%;
  background: radial-gradient(circle, #e6d5ff 0%, rgba(230, 213, 255, 0) 70%);
  animation-delay: -11s;
}

@keyframes float {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50% { transform: translate3d(-18px, 22px, 0) scale(1.08); }
}

.petals {
  position: absolute;
  inset: 0;
}

.petal {
  position: absolute;
  top: -30px;
  font-size: 14px;
  opacity: 0;
  animation: fall linear infinite;
  will-change: transform, opacity;
}

@keyframes fall {
  0% { transform: translateY(-20px) rotate(0deg); opacity: 0; }
  10% { opacity: 0.75; }
  90% { opacity: 0.5; }
  100% { transform: translateY(105vh) rotate(360deg); opacity: 0; }
}

/* ============================== 登录页 ============================== */

.auth-view {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px 20px calc(28px + var(--safe-b));
  gap: 18px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(20px) saturate(1.3);
  -webkit-backdrop-filter: blur(20px) saturate(1.3);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 30px;
  box-shadow: var(--shadow-lg);
  padding: 28px 22px 24px;
  animation: rise 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.auth-logo {
  font-size: 42px;
  text-align: center;
  line-height: 1;
  animation: beat 1.8s ease-in-out infinite;
}

@keyframes beat {
  0%, 100% { transform: scale(1); }
  14% { transform: scale(1.14); }
  28% { transform: scale(1); }
  42% { transform: scale(1.1); }
}

.auth-title {
  margin: 10px 0 4px;
  text-align: center;
  font-size: 25px;
  letter-spacing: 2px;
  font-weight: 700;
  background: linear-gradient(120deg, var(--rose) 0%, #ff9c6b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.auth-sub {
  margin: 0 0 20px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  letter-spacing: 0.5px;
}

.tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: rgba(255, 214, 228, 0.42);
  border-radius: 999px;
  margin-bottom: 20px;
}

.tab {
  flex: 1;
  padding: 9px 4px;
  border-radius: 999px;
  font-size: 13.5px;
  color: var(--ink-soft);
  transition: 0.25s;
  white-space: nowrap;
}

.tab.is-active {
  background: #fff;
  color: var(--rose-deep);
  font-weight: 600;
  box-shadow: 0 3px 12px rgba(239, 95, 139, 0.16);
}

.pane {
  display: flex;
  flex-direction: column;
  gap: 14px;
  animation: fade 0.3s ease both;
}

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

/* ------------------------------ 表单元素 ------------------------------ */

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.label {
  font-size: 12.5px;
  color: var(--ink-soft);
  padding-left: 4px;
  font-weight: 500;
}

.label i {
  font-style: normal;
  color: var(--muted);
  font-weight: 400;
  font-size: 11.5px;
}

input[type="text"],
input[type="password"],
input[type="date"],
textarea {
  width: 100%;
  padding: 13px 15px;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--line);
  background: rgba(255, 255, 255, 0.85);
  font-size: 15px;
  color: var(--ink);
  outline: none;
  transition: 0.2s;
  -webkit-appearance: none;
  appearance: none;
}

input::placeholder,
textarea::placeholder {
  color: #c5a8b4;
}

input:focus,
textarea:focus {
  border-color: var(--pink-400);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255, 151, 185, 0.16);
}

textarea {
  resize: none;
  line-height: 1.6;
}

input[type="date"] {
  min-height: 48px;
}

/* -------------------------------- 按钮 -------------------------------- */

.btn {
  border-radius: 999px;
  padding: 13px 20px;
  font-size: 15px;
  font-weight: 600;
  transition: transform 0.15s, box-shadow 0.2s, background 0.2s;
  white-space: nowrap;
}

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

.btn-primary {
  color: #fff;
  background: linear-gradient(135deg, #ff8fb2 0%, var(--rose) 55%, #e8567f 100%);
  box-shadow: 0 10px 22px -10px rgba(233, 82, 124, 0.85);
}

.btn-primary:hover {
  box-shadow: 0 12px 26px -8px rgba(233, 82, 124, 0.9);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.9);
  color: var(--rose-deep);
  border: 1.5px solid var(--pink-200);
}

.btn-danger {
  background: rgba(255, 255, 255, 0.9);
  color: #d94848;
  border: 1.5px solid rgba(217, 72, 72, 0.28);
}

.btn-sm {
  padding: 11px 18px;
  font-size: 14px;
}

.btn:disabled {
  opacity: 0.55;
  pointer-events: none;
}

#auth-form .btn-primary {
  margin-top: 6px;
  width: 100%;
  padding: 15px;
}

.form-error {
  min-height: 18px;
  margin: 2px 0 0;
  font-size: 12.5px;
  color: #d94848;
  text-align: center;
}

.hint {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

.auth-foot {
  font-size: 11.5px;
  color: #b79aa5;
  text-align: center;
  margin: 0;
}

/* ============================== 主界面 ============================== */

.main-view {
  position: relative;
  z-index: 1;
  min-height: 100dvh;
  padding-bottom: calc(96px + var(--safe-b));
  animation: fade 0.4s ease both;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px 12px;
  background: linear-gradient(180deg, rgba(255, 246, 249, 0.94), rgba(255, 246, 249, 0.6) 70%, rgba(255, 246, 249, 0));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.brand-mini {
  flex: none;
  font-size: 14.5px;
  font-weight: 800;
  letter-spacing: 1.5px;
  background: linear-gradient(120deg, var(--rose) 0%, #ff9c6b 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.names {
  flex: 1;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 18px;
  color: var(--rose-deep);
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-sm);
  transition: 0.2s;
}

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

.page {
  max-width: 620px;
  margin: 0 auto;
  padding: 4px 16px 0;
  display: flex;
  flex-direction: column;
  gap: 26px;
}

/* ------------------------------- 英雄卡 ------------------------------- */

.hero {
  position: relative;
  border-radius: var(--r-lg);
  padding: 26px 20px 18px;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(145deg, #ffd3e2 0%, #ffb9cf 46%, #ffa3c0 100%);
  box-shadow: 0 22px 44px -20px rgba(232, 86, 127, 0.75), inset 0 1px 0 rgba(255, 255, 255, 0.55);
  color: #7a2c47;
  animation: rise 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.hero::after {
  content: "";
  position: absolute;
  width: 220px;
  height: 220px;
  right: -70px;
  top: -90px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 65%);
}

.hero-face {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.heart {
  position: absolute;
  opacity: 0.5;
  animation: drift 7s ease-in-out infinite;
}

.h1 { left: 8%; top: 22%; font-size: 16px; }
.h2 { right: 11%; top: 16%; font-size: 13px; animation-delay: -2s; }
.h3 { right: 20%; bottom: 16%; font-size: 18px; animation-delay: -4s; }

@keyframes drift {
  0%, 100% { transform: translateY(0) rotate(-6deg); }
  50% { transform: translateY(-12px) rotate(8deg); }
}

.hero-brand {
  position: relative;
  margin: 0 0 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 6px;
  text-indent: 6px;
  opacity: 0.6;
}

.hero-label {
  position: relative;
  margin: 0;
  font-size: 12.5px;
  letter-spacing: 3px;
  opacity: 0.78;
  font-weight: 500;
}

.hero-days {
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 4px;
  margin: 2px 0 0;
}

.hero-days span {
  font-size: clamp(56px, 19vw, 76px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -2px;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 0 rgba(255, 255, 255, 0.5);
}

.hero-days small {
  font-size: 18px;
  font-weight: 600;
  opacity: 0.8;
  padding-bottom: 8px;
}

.hero-since {
  position: relative;
  margin: 0 0 16px;
  font-size: 12.5px;
  opacity: 0.78;
}

.hero-foot {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.hero-chip {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 10px 8px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.5);
  text-align: left;
  min-width: 0;
}

.chip-label {
  font-size: 10.5px;
  opacity: 0.72;
  letter-spacing: 0.5px;
}

.chip-value {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ------------------------------- 区块 ------------------------------- */

.block {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
}

.block-head h2 {
  margin: 0;
  font-size: 15.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.block-head h2::before {
  content: "";
  width: 4px;
  height: 15px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--pink-400), var(--rose));
}

.text-btn {
  font-size: 13px;
  font-weight: 600;
  color: var(--rose-deep);
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--pink-200);
  transition: 0.2s;
}

.text-btn:active {
  transform: scale(0.95);
}

.count {
  font-size: 12px;
  color: var(--muted);
}

/* ------------------------------- 卡片 ------------------------------- */

.cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 15px 14px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.84);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, box-shadow 0.25s ease;
  animation: rise 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--pink-300), var(--rose));
  opacity: 0.9;
}

.card:active {
  transform: scale(0.985);
}

.card-emoji {
  flex: none;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-size: 20px;
  background: linear-gradient(145deg, #fff1f6, #ffe0ea);
  border: 1px solid rgba(255, 255, 255, 0.9);
}

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

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

.card-meta {
  font-size: 11.5px;
  color: var(--muted);
  display: flex;
  gap: 6px;
  align-items: center;
  flex-wrap: wrap;
}

.card-note {
  font-size: 11.5px;
  color: var(--ink-soft);
  margin-top: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  opacity: 0.85;
}

.card-days {
  flex: none;
  text-align: right;
  display: flex;
  align-items: baseline;
  gap: 2px;
  color: var(--rose-deep);
}

.card-days .num {
  font-size: 25px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -1px;
  line-height: 1;
}

.card-days .unit {
  font-size: 11px;
  font-weight: 600;
  opacity: 0.8;
}

.card.is-today {
  background: linear-gradient(120deg, #fff0f5, #ffe3ee);
  border-color: var(--pink-300);
  box-shadow: 0 12px 26px -12px rgba(239, 95, 139, 0.8);
}

.card.is-today .card-days .num {
  font-size: 15px;
  letter-spacing: 0;
}

.card.is-today .card-days .unit {
  display: none;
}

.cards.is-compact .card {
  background: rgba(255, 255, 255, 0.6);
  box-shadow: var(--shadow-sm);
  padding: 12px 13px;
}

.cards.is-compact .card-days .num {
  font-size: 17px;
  color: var(--ink-soft);
  font-weight: 700;
}

.cards.is-compact .card-emoji {
  width: 36px;
  height: 36px;
  font-size: 17px;
  border-radius: 12px;
  opacity: 0.9;
}

.badge {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 600;
  background: rgba(255, 214, 228, 0.7);
  color: var(--rose-deep);
}

.badge.year {
  background: rgba(214, 224, 255, 0.75);
  color: #5b6fbd;
}

/* ------------------------------- 空状态 ------------------------------- */

.empty {
  text-align: center;
  padding: 28px 16px;
  border-radius: var(--r-md);
  border: 1.5px dashed var(--pink-200);
  background: rgba(255, 255, 255, 0.45);
}

.empty-emoji {
  font-size: 30px;
  display: block;
  margin-bottom: 8px;
}

.empty p {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--muted);
}

.empty .btn {
  padding: 10px 18px;
  font-size: 13.5px;
}

.empty-line {
  margin: 0;
  padding: 6px 4px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}

/* ------------------------------- 悬浮按钮 ------------------------------- */

.fab {
  position: fixed;
  right: 20px;
  bottom: calc(24px + var(--safe-b));
  width: 58px;
  height: 58px;
  border-radius: 50%;
  font-size: 28px;
  font-weight: 300;
  line-height: 1;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(140deg, #ff9ab9 0%, var(--rose) 55%, #e04c7a 100%);
  box-shadow: 0 14px 30px -8px rgba(233, 82, 124, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.5);
  transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1);
  z-index: 30;
}

.fab:active {
  transform: scale(0.9) rotate(90deg);
}

/* ============================== 弹层 ============================== */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(90, 40, 60, 0.28);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: fade 0.25s ease both;
}

.sheet {
  position: fixed;
  left: 50%;
  bottom: 0;
  z-index: 50;
  width: 100%;
  max-width: 560px;
  transform: translateX(-50%);
  max-height: 92dvh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 10px 20px calc(22px + var(--safe-b));
  background: linear-gradient(180deg, #fffdfd 0%, #fff6f9 100%);
  border-radius: 28px 28px 0 0;
  box-shadow: 0 -18px 50px -20px rgba(190, 70, 110, 0.5);
  animation: slideUp 0.34s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes slideUp {
  from { transform: translate(-50%, 100%); }
  to { transform: translate(-50%, 0); }
}

.sheet-grab {
  width: 42px;
  height: 4px;
  border-radius: 999px;
  background: var(--pink-200);
  margin: 0 auto 14px;
}

.sheet-title {
  margin: 0 0 16px;
  font-size: 18px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.5px;
}

#event-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

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

.chip {
  padding: 8px 13px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.9);
  border: 1.5px solid var(--line);
  transition: 0.2s;
}

.chip.is-active {
  color: var(--rose-deep);
  font-weight: 600;
  background: #ffeaf1;
  border-color: var(--pink-300);
  box-shadow: 0 4px 12px -6px rgba(239, 95, 139, 0.7);
}

.seg {
  display: flex;
  padding: 4px;
  gap: 4px;
  border-radius: 999px;
  background: rgba(255, 214, 228, 0.42);
}

.seg-btn {
  flex: 1;
  padding: 9px;
  border-radius: 999px;
  font-size: 13.5px;
  color: var(--ink-soft);
  transition: 0.25s;
}

.seg-btn.is-active {
  background: #fff;
  color: var(--rose-deep);
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(239, 95, 139, 0.14);
}

.sheet-actions {
  display: flex;
  gap: 10px;
  margin-top: 6px;
}

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

.sheet-actions .btn-danger {
  flex: 0 0 auto;
  padding: 13px 16px;
}

/* ------------------------------- 设置 ------------------------------- */

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.setting-row.col {
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
}

.setting-label {
  font-size: 14px;
  font-weight: 600;
}

.setting-hint {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 3px;
}

.code-pill {
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 3px;
  color: var(--rose-deep);
  background: #ffe8f0;
  border: 1.5px dashed var(--pink-300);
  font-variant-numeric: tabular-nums;
}

.code-pill:active {
  background: #ffdde9;
}

.settings-form {
  display: flex;
  gap: 10px;
  padding: 12px 0 4px;
}

.settings-form input {
  flex: 1;
}

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

.member {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px 7px 7px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--line);
}

.avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  color: #fff;
  background: linear-gradient(140deg, #ff9ab9, var(--rose));
}

.member.is-me {
  border-color: var(--pink-300);
  background: #fff3f7;
}

.member-empty {
  font-size: 12.5px;
  color: var(--muted);
}

/* ------------------------------- Toast ------------------------------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(100px + var(--safe-b));
  z-index: 90;
  transform: translate(-50%, 20px);
  max-width: 84vw;
  padding: 11px 20px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 500;
  color: #fff;
  background: rgba(77, 47, 59, 0.92);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s, transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  text-align: center;
}

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

/* ------------------------------- 桌面端 ------------------------------- */

@media (min-width: 700px) {
  .page {
    padding-top: 12px;
  }
  .hero {
    padding: 34px 28px 24px;
  }
  .cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
  }
  .cards.is-compact {
    grid-template-columns: 1fr 1fr;
  }
  .empty,
  .empty-line {
    grid-column: 1 / -1;
  }
  .sheet {
    border-radius: 28px;
    bottom: 24px;
    max-height: 86dvh;
  }
  .sheet-grab {
    display: none;
  }
  .sheet-title {
    margin-top: 6px;
  }
  .fab {
    right: calc(50% - 310px);
  }
}

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

/* ============================================================
   时间记录 · 想你计数器 · 点亮日历
   ============================================================ */

/* ------------------------------ 时间记录 ------------------------------ */

.timer-card {
  position: relative;
  padding: 16px 14px 12px;
  border-radius: var(--r-md);
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.92), rgba(255, 240, 246, 0.9));
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.timer-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}

.timer-unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 8px 2px;
  border-radius: 14px;
  background: rgba(255, 236, 243, 0.75);
}

.timer-unit b {
  font-size: clamp(19px, 5.6vw, 24px);
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--rose-deep);
  font-variant-numeric: tabular-nums;
  line-height: 1.1;
}

.timer-unit span {
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 1px;
}

.timer-foot {
  margin: 10px 2px 0;
  font-size: 11.5px;
  color: var(--muted);
  text-align: center;
}

/* ---------------------------- 想你计数器 ---------------------------- */

.miss-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px 16px;
  border-radius: var(--r-md);
  background: linear-gradient(140deg, #fff2f7 0%, #ffe6f0 100%);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
}

.miss-btn {
  flex: none;
  width: 84px;
  height: 84px;
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  color: #fff;
  background: linear-gradient(145deg, #ff9dbb 0%, var(--rose) 55%, #e04c7a 100%);
  box-shadow: 0 12px 26px -10px rgba(233, 82, 124, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  transition: transform 0.16s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.2s;
}

.miss-btn:active,
.miss-btn.is-tap {
  transform: scale(0.9);
}

.miss-btn:disabled {
  background: linear-gradient(145deg, #f3d7e0, #e9c6d4);
  box-shadow: none;
  color: #fff;
}

.miss-heart {
  font-size: 22px;
  line-height: 1;
  animation: beat 1.9s ease-in-out infinite;
}

.miss-btn-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.miss-btn:disabled .miss-heart {
  animation: none;
  opacity: 0.8;
}

.miss-side {
  flex: 1;
  min-width: 0;
}

.miss-line {
  margin: 0 0 5px;
  font-size: 14px;
  color: var(--ink);
  line-height: 1.45;
}

.miss-line b {
  font-weight: 700;
}

.miss-num {
  font-size: 20px;
  color: var(--rose-deep);
  font-variant-numeric: tabular-nums;
  padding: 0 2px;
}

.miss-sub {
  margin: 0;
  font-size: 11.5px;
  color: var(--muted);
  line-height: 1.5;
}

.burst-heart {
  position: fixed;
  z-index: 80;
  font-size: 16px;
  pointer-events: none;
  animation: burst 1.1s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes burst {
  0% { transform: translateY(0) scale(0.6); opacity: 0; }
  25% { opacity: 1; }
  100% { transform: translateY(-90px) scale(1.15) rotate(12deg); opacity: 0; }
}

/* ---------------------------- 点亮日历 ---------------------------- */

.lit-card {
  padding: 12px 10px 10px;
  border-radius: var(--r-md);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
}

.lit-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 8px;
}

.lit-head b {
  font-size: 14px;
  letter-spacing: 1px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.lit-nav {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 16px;
  line-height: 1;
  color: var(--rose-deep);
  background: rgba(255, 236, 243, 0.9);
  border: 1px solid var(--pink-200);
  transition: 0.2s;
}

.lit-nav:active {
  transform: scale(0.9);
}

.lit-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px 6px;
}

.lit-month {
  min-width: 0;
}

.lit-mname {
  font-size: 9.5px;
  color: var(--muted);
  text-align: center;
  margin-bottom: 2px;
  letter-spacing: 0.5px;
}

.lit-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  margin-bottom: 2px;
}

.lit-week i {
  font-size: 7.5px;
  font-style: normal;
  color: #c9aab6;
  text-align: center;
  line-height: 1.2;
}

.lit-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1.5px;
}

.lit-cell {
  aspect-ratio: 1 / 1;
  border-radius: 2.5px;
  background: rgba(255, 214, 228, 0.22);
  display: grid;
  place-items: center;
  font-size: 6.5px;
  color: transparent;
  transition: background 0.3s;
}

.lit-cell.is-blank {
  background: transparent;
}

.lit-cell.is-half {
  background: #ffcbdd;
}

.lit-cell.is-full {
  background: linear-gradient(140deg, #ff8fb2, #e8567f);
  box-shadow: 0 0 6px rgba(233, 82, 124, 0.45);
}

.lit-cell.is-today {
  outline: 1.5px solid var(--rose-deep);
  outline-offset: 0.5px;
  font-size: 6.5px;
  color: #fff;
  font-weight: 700;
}

.lit-cell.is-full.is-today {
  color: #fff;
}

.lit-legend {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin-top: 12px;
  font-size: 10px;
  color: var(--muted);
}

.lit-legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.lit-dot {
  width: 9px;
  height: 9px;
  border-radius: 2.5px;
  background: rgba(255, 214, 228, 0.35);
}

.lit-dot.is-half {
  background: #ffcbdd;
}

.lit-dot.is-full {
  background: linear-gradient(140deg, #ff8fb2, #e8567f);
}

.lit-tip {
  margin: 10px 4px 2px;
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  line-height: 1.5;
}

@media (min-width: 520px) {
  .lit-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .lit-week i {
    font-size: 8.5px;
  }
  .lit-mname {
    font-size: 10.5px;
  }
}

@media (min-width: 700px) {
  .lit-grid {
    grid-template-columns: repeat(6, 1fr);
    gap: 10px;
  }
  .timer-grid {
    gap: 10px;
  }
  .miss-btn {
    width: 92px;
    height: 92px;
  }
}

/* ------------------------------ 随机情话 ------------------------------ */

.quote-card {
  position: relative;
  padding: 18px 20px 14px;
  border-radius: var(--r-md);
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.92), rgba(255, 243, 248, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.quote-card::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -50px;
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 194, 214, 0.5), rgba(255, 194, 214, 0) 65%);
  pointer-events: none;
}

.quote-mark {
  position: absolute;
  left: 14px;
  top: 2px;
  font-size: 44px;
  line-height: 1;
  color: var(--pink-300);
  font-family: Georgia, "Times New Roman", serif;
  pointer-events: none;
}

.quote-text {
  position: relative;
  margin: 6px 0 10px;
  padding-left: 22px;
  font-size: 15px;
  line-height: 1.85;
  color: var(--ink);
  letter-spacing: 0.3px;
  min-height: 2.6em;
}

.quote-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-left: 22px;
}

.quote-sign {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.5px;
}

.quote-refresh {
  flex: none;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  color: var(--rose-deep);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--pink-200);
  transition: 0.18s;
}

.quote-refresh:active {
  transform: scale(0.94);
  background: #ffe9f0;
}

.quote-card.is-swap .quote-text {
  animation: quoteIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes quoteIn {
  from { opacity: 0; transform: translateY(6px); filter: blur(2px); }
  to { opacity: 1; transform: none; filter: none; }
}
