/* ============================================================
   情侣像素小站 · 样式
   配色：奶油纸 / 樱花粉 / 薰衣草紫 / 薄荷绿
   ============================================================ */

:root {
  --ink: #4a3550;
  --ink-2: #6f5b79;
  --ink-3: #9a8aa2;
  --line: #4a3550;
  --paper: #fffaf4;
  --paper-2: #fff3e4;
  --white: #fffdfa;
  --pink: #ff9ec4;
  --pink-deep: #ef6d9f;
  --pink-soft: #ffe4ee;
  --lilac: #c9b4f5;
  --lilac-soft: #efe8ff;
  --mint: #9ee3c6;
  --mint-soft: #e0fbf0;
  --butter: #ffdf8f;
  --butter-soft: #fff5d6;
  --sky: #a7d8ff;
  --sky-soft: #e3f2ff;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 4px 4px 0 rgba(74, 53, 80, 0.16);
  --shadow-lg: 6px 6px 0 rgba(74, 53, 80, 0.18);
  --header-h: 70px;
  --font: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC",
    system-ui, -apple-system, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  background-color: var(--paper);
  background-image:
    radial-gradient(circle at 12% 4%, rgba(255, 228, 238, 0.9), transparent 42%),
    radial-gradient(circle at 88% 0%, rgba(239, 232, 255, 0.9), transparent 40%),
    radial-gradient(circle at 50% 100%, rgba(224, 251, 240, 0.7), transparent 45%),
    repeating-linear-gradient(0deg, rgba(74, 53, 80, 0.028) 0 1px, transparent 1px 26px);
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

body.locked {
  overflow: hidden;
}

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

a {
  color: inherit;
}

button {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

img {
  max-width: 100%;
  display: block;
}

::selection {
  background: var(--pink);
  color: #fff;
}

:focus-visible {
  outline: 3px solid var(--lilac);
  outline-offset: 2px;
}

/* ---------------------------------------------------------- 布局 */

.wrap {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 20px 64px;
}

.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.page-title {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.page-sub {
  color: var(--ink-2);
  font-size: 13px;
  margin-top: 2px;
}

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

/* ---------------------------------------------------------- 顶栏 */

.topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 250, 244, 0.86);
  backdrop-filter: blur(10px) saturate(1.2);
  border-bottom: 3px solid var(--line);
}

.topbar-inner {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  height: var(--header-h);
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex: 0 0 auto;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: var(--pink-soft);
  border: 3px solid var(--line);
  border-radius: 10px;
  box-shadow: 2px 2px 0 rgba(74, 53, 80, 0.2);
}

.brand-name {
  font-weight: 800;
  font-size: 17px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  max-width: 190px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.brand-sub {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: var(--ink-3);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  line-height: 1;
  margin-top: 2px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  overflow-x: auto;
  scrollbar-width: none;
}

.main-nav::-webkit-scrollbar {
  display: none;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border-radius: 999px;
  border: 2px solid transparent;
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--ink-2);
  white-space: nowrap;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.nav-link:hover {
  background: var(--pink-soft);
  color: var(--ink);
}

.nav-link.active {
  background: var(--pink);
  border-color: var(--line);
  color: var(--ink);
  box-shadow: 2px 2px 0 rgba(74, 53, 80, 0.18);
}

.nav-link .ico {
  width: 16px;
  height: 16px;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.icon-btn {
  position: relative;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  background: var(--white);
  border: 3px solid var(--line);
  border-radius: 12px;
  box-shadow: 2px 2px 0 rgba(74, 53, 80, 0.18);
  cursor: pointer;
  padding: 0;
  transition: transform 0.12s, box-shadow 0.12s;
}

.icon-btn:hover {
  background: var(--lilac-soft);
}

.icon-btn:active {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0 rgba(74, 53, 80, 0.18);
}

.icon-btn .ico {
  width: 19px;
  height: 19px;
}

.badge-dot {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 20px;
  height: 20px;
  padding: 0 4px;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  background: var(--pink-deep);
  border: 2px solid var(--line);
  border-radius: 999px;
}

.user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px 4px 4px;
  background: var(--white);
  border: 3px solid var(--line);
  border-radius: 999px;
  box-shadow: 2px 2px 0 rgba(74, 53, 80, 0.18);
  cursor: pointer;
  text-decoration: none;
}

.user-chip:hover {
  background: var(--butter-soft);
}

.user-chip .avatar {
  width: 30px;
  height: 30px;
}

.user-chip .nick {
  font-size: 13px;
  font-weight: 700;
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 手机底部标签栏 */
.tabbar {
  display: none;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  background: rgba(255, 250, 244, 0.96);
  backdrop-filter: blur(12px);
  border-top: 3px solid var(--line);
}

.tabbar-inner {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 2px;
}

.tab {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 0 5px;
  border: 2px solid transparent;
  border-radius: 12px;
  text-decoration: none;
  color: var(--ink-3);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.tab .ico {
  width: 21px;
  height: 21px;
}

.tab.active {
  color: var(--ink);
  background: var(--pink-soft);
  border-color: var(--line);
}

/* ---------------------------------------------------------- 通用组件 */

.card {
  background: var(--white);
  border: 3px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}

.card + .card {
  margin-top: 16px;
}

.card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.card-title .ico {
  width: 18px;
  height: 18px;
}

.card-sub {
  font-size: 12.5px;
  color: var(--ink-3);
  margin-top: 2px;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 26px 0 12px;
}

.section-title {
  font-size: 17px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title::before {
  content: "";
  width: 10px;
  height: 10px;
  background: var(--pink);
  border: 2px solid var(--line);
  border-radius: 3px;
  display: inline-block;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 16px;
  min-height: 40px;
  border: 3px solid var(--line);
  border-radius: 12px;
  background: var(--white);
  box-shadow: 3px 3px 0 rgba(74, 53, 80, 0.2);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.1s, box-shadow 0.1s, background 0.15s;
  user-select: none;
  white-space: nowrap;
}

.btn .ico {
  width: 17px;
  height: 17px;
}

.btn:hover {
  background: var(--paper-2);
}

.btn:active {
  transform: translate(3px, 3px);
  box-shadow: 0 0 0 rgba(74, 53, 80, 0.2);
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--pink);
}

.btn-primary:hover {
  background: #ff8db8;
}

.btn-lilac {
  background: var(--lilac-soft);
}

.btn-lilac:hover {
  background: #e2d7ff;
}

.btn-mint {
  background: var(--mint-soft);
}

.btn-mint:hover {
  background: #cdf5e6;
}

.btn-ghost {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  color: var(--ink-2);
}

.btn-ghost:hover {
  background: var(--pink-soft);
  color: var(--ink);
}

.btn-ghost:active {
  transform: none;
}

.btn-sm {
  padding: 5px 10px;
  min-height: 32px;
  font-size: 12.5px;
  border-width: 2px;
  border-radius: 9px;
  box-shadow: 2px 2px 0 rgba(74, 53, 80, 0.18);
}

.btn-sm .ico {
  width: 14px;
  height: 14px;
}

.btn-block {
  width: 100%;
}

.btn-danger {
  background: #ffe3e3;
  color: #a3264a;
}

.btn-danger:hover {
  background: #ffd3d3;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 9px;
  font-size: 11.5px;
  font-weight: 700;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--paper-2);
  white-space: nowrap;
}

.chip-pink { background: var(--pink-soft); }
.chip-lilac { background: var(--lilac-soft); }
.chip-mint { background: var(--mint-soft); }
.chip-butter { background: var(--butter-soft); }
.chip-sky { background: var(--sky-soft); }

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

.field + .field {
  margin-top: 14px;
}

.field-label {
  font-size: 12.5px;
  font-weight: 800;
  color: var(--ink-2);
  letter-spacing: 0.04em;
}

.field-hint {
  font-size: 11.5px;
  color: var(--ink-3);
  line-height: 1.5;
}

.input,
.textarea,
.select {
  width: 100%;
  padding: 10px 12px;
  border: 3px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--ink);
  font-family: inherit;
  font-size: 14.5px;
  line-height: 1.5;
  box-shadow: inset 2px 2px 0 rgba(74, 53, 80, 0.06);
  transition: border-color 0.15s, background 0.15s;
}

.input:focus,
.textarea:focus,
.select:focus {
  outline: none;
  border-color: var(--pink-deep);
  background: #fff;
}

.textarea {
  resize: vertical;
  min-height: 92px;
}

.select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%),
    linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 18px) 20px, calc(100% - 12px) 20px;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 36px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.form-grid .field + .field {
  margin-top: 0;
}

.form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 20px;
  flex-wrap: wrap;
}

.form-error {
  display: none;
  padding: 9px 12px;
  margin-top: 12px;
  font-size: 13px;
  font-weight: 700;
  color: #9c2043;
  background: #ffe7ec;
  border: 2px solid #e58ba4;
  border-radius: 10px;
}

.form-error.show {
  display: block;
}

/* ---------------------------------------------------------- 头像 */

.avatar {
  display: block;
  width: 46px;
  height: 46px;
  flex: 0 0 auto;
  border: 3px solid var(--line);
  border-radius: 12px;
  background: var(--pink-soft);
  overflow: hidden;
  box-shadow: 2px 2px 0 rgba(74, 53, 80, 0.16);
}

.avatar svg {
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
}

.avatar-lg {
  width: 96px;
  height: 96px;
  border-radius: 20px;
  border-width: 4px;
  box-shadow: 4px 4px 0 rgba(74, 53, 80, 0.18);
}

.avatar-pick {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.avatar-pick button {
  padding: 4px;
  background: var(--white);
  border: 3px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  line-height: 0;
}

.avatar-pick button[aria-pressed="true"] {
  background: var(--butter);
  box-shadow: 3px 3px 0 rgba(74, 53, 80, 0.2);
}

.avatar-pick .avatar {
  width: 44px;
  height: 44px;
  border: none;
  box-shadow: none;
}

/* ---------------------------------------------------------- 首页 hero */

.hero {
  position: relative;
  overflow: hidden;
  border: 3px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow-lg);
  background:
    radial-gradient(circle at 18% 10%, rgba(255, 255, 255, 0.75), transparent 45%),
    linear-gradient(160deg, #ffe0ec 0%, #f4e6ff 52%, #e3f4ff 100%);
  padding: 30px 24px 26px;
  text-align: center;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    0deg,
    rgba(74, 53, 80, 0.035) 0 2px,
    transparent 2px 6px
  );
}

.hero-deco {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.hero-deco .pix {
  position: absolute;
  opacity: 0.9;
  animation: floaty 6s ease-in-out infinite;
}

.hero-deco .p1 { top: 18px; left: 8%; animation-delay: -1s; }
.hero-deco .p2 { top: 44px; right: 10%; animation-delay: -2.6s; }
.hero-deco .p3 { bottom: 24px; left: 16%; animation-delay: -4s; }
.hero-deco .p4 { bottom: 40px; right: 14%; animation-delay: -3.2s; }
.hero-deco .p5 { top: 30%; left: 4%; animation-delay: -0.6s; }
.hero-deco .p6 { top: 22%; right: 4%; animation-delay: -5s; }

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

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

.pair {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 12px;
}

.pair-heart {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  animation: beat 2.2s ease-in-out infinite;
}

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

.hero h1 {
  font-size: clamp(24px, 4.4vw, 34px);
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.3;
}

.hero h1 .amp {
  color: var(--pink-deep);
  padding: 0 4px;
}

.hero-motto {
  margin-top: 6px;
  font-size: 13.5px;
  color: var(--ink-2);
  font-weight: 600;
  max-width: 36em;
  margin-left: auto;
  margin-right: auto;
}

.days-block {
  margin: 16px auto 4px;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  padding: 6px 22px 10px;
  background: rgba(255, 255, 255, 0.62);
  border: 3px solid var(--line);
  border-radius: 18px;
  box-shadow: 3px 3px 0 rgba(74, 53, 80, 0.16);
}

.days-num {
  font-size: clamp(44px, 8vw, 66px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  text-shadow: 3px 3px 0 rgba(255, 157, 194, 0.55);
}

.days-unit {
  font-size: 16px;
  font-weight: 800;
  color: var(--ink-2);
}

.hero-since {
  font-size: 12.5px;
  color: var(--ink-2);
  font-weight: 600;
}

.hero-since b {
  color: var(--ink);
}

/* 首页区块 */

.home-grid {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  gap: 16px;
  align-items: start;
  margin-top: 16px;
}

.home-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}

.home-col .card + .card {
  margin-top: 0;
}

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

.stat {
  background: var(--white);
  border: 3px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  padding: 12px 8px;
  text-align: center;
}

.stat b {
  display: block;
  font-size: 24px;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}

.stat span {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-3);
}

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

.countdown {
  position: relative;
  display: block;
  padding: 14px 14px 12px;
  background: var(--white);
  border: 3px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  text-decoration: none;
  overflow: hidden;
}

.countdown::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 6px;
  background: var(--pink);
}

.countdown.c-birthday::before { background: var(--butter); }
.countdown.c-other::before { background: var(--mint); }

.countdown .cd-name {
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.countdown .cd-num {
  margin-top: 2px;
  font-size: 30px;
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.countdown .cd-num small {
  font-size: 12px;
  font-weight: 700;
  color: var(--ink-3);
  margin-left: 3px;
}

.countdown .cd-date {
  font-size: 11.5px;
  color: var(--ink-3);
  font-weight: 600;
}

.countdown.today {
  background: var(--butter-soft);
}

.countdown.today .cd-num {
  color: var(--pink-deep);
}

.photo-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.photo-strip a {
  position: relative;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  border: 3px solid var(--line);
  border-radius: 12px;
  background: var(--pink-soft);
  box-shadow: 2px 2px 0 rgba(74, 53, 80, 0.15);
}

.photo-strip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s;
}

.photo-strip a:hover img {
  transform: scale(1.06);
}

.memory-brief {
  padding: 14px;
  background: var(--butter-soft);
  border: 2px dashed rgba(74, 53, 80, 0.35);
  border-radius: 12px;
}

.memory-brief h4 {
  font-size: 15px;
  font-weight: 800;
}

.memory-brief p {
  margin-top: 4px;
  font-size: 13px;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.letter-peek {
  display: block;
  padding: 14px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background:
    repeating-linear-gradient(0deg, transparent 0 22px, rgba(74, 53, 80, 0.07) 22px 23px),
    #fffdf7;
  text-decoration: none;
  transition: transform 0.15s;
}

.letter-peek:hover {
  transform: translateY(-2px);
}

.letter-peek b {
  font-size: 14px;
}

.letter-peek p {
  margin-top: 3px;
  font-size: 12.5px;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.quick {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 12px;
  background: var(--white);
  border: 3px solid var(--line);
  border-radius: 12px;
  box-shadow: 3px 3px 0 rgba(74, 53, 80, 0.16);
  cursor: pointer;
  text-align: left;
  transition: transform 0.1s, box-shadow 0.1s;
}

.quick:active {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0;
}

.quick .ico {
  width: 20px;
  height: 20px;
  margin-bottom: 2px;
}

.quick b {
  font-size: 13px;
}

.quick span {
  font-size: 11px;
  color: var(--ink-3);
}

/* ---------------------------------------------------------- 照片墙 */

.photo-grid {
  columns: 3;
  column-gap: 16px;
}

.polaroid {
  break-inside: avoid;
  position: relative;
  margin: 0 0 16px;
  padding: 10px 10px 12px;
  background: #fff;
  border: 3px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform 0.18s, box-shadow 0.18s;
}

.polaroid:nth-child(3n + 1) { transform: rotate(-0.7deg); }
.polaroid:nth-child(3n + 2) { transform: rotate(0.6deg); }
.polaroid:nth-child(3n) { transform: rotate(-0.2deg); }

.polaroid:hover {
  transform: translateY(-4px) rotate(0deg);
  box-shadow: var(--shadow-lg);
  z-index: 2;
}

.polaroid img {
  width: 100%;
  height: auto;
  border: 2px solid rgba(74, 53, 80, 0.25);
  border-radius: 4px;
  background: var(--pink-soft);
}

.polaroid-cap {
  padding: 8px 4px 0;
}

.polaroid-cap b {
  display: block;
  font-size: 13.5px;
  font-weight: 800;
  line-height: 1.4;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.polaroid-cap span {
  font-size: 11.5px;
  color: var(--ink-3);
}

.polaroid::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 50%;
  z-index: 2;
  transform: translateX(-50%) rotate(-2deg);
  width: 56px;
  height: 15px;
  border-radius: 2px;
  background: rgba(255, 223, 143, 0.9);
  border-left: 1px dashed rgba(74, 53, 80, 0.25);
  border-right: 1px dashed rgba(74, 53, 80, 0.25);
}

.photo-upload-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.upload-hint {
  font-size: 12px;
  color: var(--ink-3);
}

.dropzone {
  margin-top: 14px;
  padding: 22px;
  border: 3px dashed rgba(74, 53, 80, 0.4);
  border-radius: 14px;
  background: var(--pink-soft);
  text-align: center;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.dropzone.drag {
  background: var(--butter-soft);
  border-color: var(--pink-deep);
}

.dropzone b {
  display: block;
  font-size: 14px;
}

.dropzone span {
  font-size: 12px;
  color: var(--ink-2);
}

/* 灯箱 */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(40, 26, 46, 0.72);
  backdrop-filter: blur(6px);
}

.lightbox-inner {
  width: min(980px, 100%);
  max-height: calc(100vh - 36px);
  overflow: auto;
  background: var(--paper);
  border: 3px solid var(--line);
  border-radius: 18px;
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.25);
}

.lightbox-body {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
}

.lightbox-img {
  background: #241a29;
  display: grid;
  place-items: center;
  min-height: 240px;
}

.lightbox-img img {
  max-height: 72vh;
  width: auto;
  margin: 0 auto;
  object-fit: contain;
}

.lightbox-side {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lightbox-side h3 {
  font-size: 19px;
  font-weight: 800;
  line-height: 1.4;
}

.lightbox-story {
  font-size: 13.5px;
  color: var(--ink-2);
  white-space: pre-wrap;
  flex: 1;
  min-height: 60px;
}

.lightbox-foot {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: 10px;
  border-top: 2px dashed rgba(74, 53, 80, 0.2);
}

.lightbox-close {
  position: absolute;
  top: 14px;
  right: 16px;
}

/* ---------------------------------------------------------- 时间轴 */

.timeline {
  position: relative;
  padding-left: 26px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 7px;
  top: 6px;
  bottom: 6px;
  width: 4px;
  border-radius: 4px;
  background: repeating-linear-gradient(
    180deg,
    var(--lilac) 0 10px,
    transparent 10px 16px
  );
}

.tl-item {
  position: relative;
  margin-bottom: 16px;
}

.tl-item::before {
  content: "";
  position: absolute;
  left: -26px;
  top: 18px;
  width: 16px;
  height: 16px;
  background: var(--pink);
  border: 3px solid var(--line);
  border-radius: 5px;
  transform: rotate(45deg);
}

.tl-item:nth-child(3n + 2)::before { background: var(--lilac); }
.tl-item:nth-child(3n)::before { background: var(--mint); }

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

.tl-head {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tl-date {
  font-size: 11.5px;
  font-weight: 800;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.tl-card h3 {
  margin-top: 4px;
  font-size: 16px;
  font-weight: 800;
}

.tl-card p {
  margin-top: 4px;
  font-size: 13.5px;
  color: var(--ink-2);
  white-space: pre-wrap;
}

.tl-actions {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.tl-year {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 22px 0 12px -26px;
  padding: 3px 12px;
  font-size: 13px;
  font-weight: 800;
  background: var(--ink);
  color: var(--paper);
  border-radius: 999px;
  letter-spacing: 0.08em;
}

.tl-year:first-child {
  margin-top: 0;
}

.filter-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.filter-chip {
  padding: 5px 12px;
  font-size: 12.5px;
  font-weight: 700;
  background: var(--white);
  border: 2px solid var(--line);
  border-radius: 999px;
  cursor: pointer;
}

.filter-chip[aria-pressed="true"] {
  background: var(--pink);
  box-shadow: 2px 2px 0 rgba(74, 53, 80, 0.18);
}

/* ---------------------------------------------------------- 纪念日 */

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

.date-card {
  position: relative;
  padding: 18px;
  background: var(--white);
  border: 3px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.date-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 7px;
  background: var(--pink);
}

.date-card.t-birthday::before { background: var(--butter); }
.date-card.t-other::before { background: var(--mint); }

.date-card.today {
  background: var(--pink-soft);
}

.date-card .dc-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.date-card h3 {
  font-size: 16px;
  font-weight: 800;
  margin-top: 6px;
}

.date-card .dc-days {
  font-size: 34px;
  font-weight: 800;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  margin-top: 6px;
}

.date-card .dc-days small {
  font-size: 13px;
  color: var(--ink-3);
  font-weight: 700;
  margin-left: 3px;
}

.date-card .dc-meta {
  font-size: 12px;
  color: var(--ink-3);
  margin-top: 2px;
}

.date-card .dc-note {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 2px dashed rgba(74, 53, 80, 0.18);
  font-size: 12.5px;
  color: var(--ink-2);
}

/* ---------------------------------------------------------- 游戏 */

.game-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.game-card {
  position: relative;
  padding: 20px;
  border: 3px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.game-card.quiz {
  background: linear-gradient(150deg, #ffe3ee, #fff6ef);
}

.game-card.test {
  background: linear-gradient(150deg, #efe8ff, #e6f7ff);
}

.game-card h3 {
  font-size: 19px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

.game-card p {
  font-size: 13px;
  color: var(--ink-2);
  flex: 1;
}

.game-emoji {
  font-size: 30px;
  line-height: 1;
}

.quiz-shell {
  max-width: 640px;
  margin: 0 auto;
}

.quiz-progress {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
}

.quiz-progress i {
  flex: 1;
  height: 8px;
  background: rgba(74, 53, 80, 0.12);
  border-radius: 3px;
}

.quiz-progress i.on {
  background: var(--pink);
}

.quiz-progress i.cur {
  background: var(--pink-deep);
}

.quiz-q {
  font-size: 19px;
  font-weight: 800;
  line-height: 1.5;
  margin-bottom: 16px;
}

.opt {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 13px 15px;
  margin-bottom: 10px;
  text-align: left;
  background: var(--white);
  border: 3px solid var(--line);
  border-radius: 13px;
  box-shadow: 3px 3px 0 rgba(74, 53, 80, 0.15);
  cursor: pointer;
  font-size: 14.5px;
  font-weight: 600;
  transition: transform 0.1s, background 0.15s, box-shadow 0.1s;
}

.opt:hover {
  background: var(--pink-soft);
}

.opt:active {
  transform: translate(2px, 2px);
  box-shadow: 0 0 0;
}

.opt[aria-pressed="true"] {
  background: var(--pink);
  box-shadow: 3px 3px 0 rgba(74, 53, 80, 0.25);
}

.opt .key {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 800;
  background: var(--paper-2);
  border: 2px solid var(--line);
  border-radius: 7px;
}

.opt[aria-pressed="true"] .key {
  background: #fff;
}

.score-ring {
  --pct: 70;
  width: 132px;
  height: 132px;
  margin: 0 auto 12px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--pink-deep) calc(var(--pct) * 1%), rgba(74, 53, 80, 0.1) 0);
  border: 3px solid var(--line);
  position: relative;
}

.score-ring::before {
  content: "";
  position: absolute;
  inset: 9px;
  background: var(--white);
  border-radius: 50%;
}

.score-ring div {
  position: relative;
  z-index: 1;
  text-align: center;
  line-height: 1.1;
}

.score-ring b {
  position: relative;
  z-index: 1;
  font-size: 44px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.score-ring span {
  display: block;
  font-size: 11px;
  color: var(--ink-3);
  font-weight: 700;
}

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

.reveal-item {
  padding: 12px 14px;
  border: 2px solid rgba(74, 53, 80, 0.22);
  border-radius: 12px;
  background: var(--paper);
}

.reveal-item.same {
  background: var(--mint-soft);
  border-color: rgba(74, 53, 80, 0.4);
}

.reveal-item .rq {
  font-size: 13.5px;
  font-weight: 700;
}

.reveal-item .ra {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 6px;
  font-size: 12px;
}

.reveal-item .ra span {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  border: 1px solid rgba(74, 53, 80, 0.2);
}

.result-hero {
  text-align: center;
  padding: 8px 0 4px;
}

.result-hero .type-name {
  font-size: 26px;
  font-weight: 800;
}

.result-hero .type-tag {
  color: var(--ink-2);
  font-size: 13px;
  margin-top: 2px;
}

.result-hero .type-desc {
  margin: 14px auto 0;
  max-width: 40em;
  font-size: 14px;
  text-align: left;
  background: var(--white);
  border: 2px dashed rgba(74, 53, 80, 0.3);
  border-radius: 12px;
  padding: 14px;
}

.type-strengths {
  display: flex;
  gap: 8px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 12px;
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.history-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--white);
  border: 2px solid rgba(74, 53, 80, 0.25);
  border-radius: 12px;
  font-size: 13px;
}

.history-item b {
  font-weight: 800;
}

.history-item .date {
  margin-left: auto;
  font-size: 11.5px;
  color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------- 情书 */

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

.letter-card {
  position: relative;
  padding: 18px;
  background:
    repeating-linear-gradient(0deg, transparent 0 25px, rgba(74, 53, 80, 0.06) 25px 26px),
    #fffdf7;
  border: 3px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform 0.15s;
}

.letter-card:hover {
  transform: translateY(-3px) rotate(-0.4deg);
}

.letter-card.unread {
  background:
    repeating-linear-gradient(0deg, transparent 0 25px, rgba(74, 53, 80, 0.06) 25px 26px),
    var(--pink-soft);
}

.letter-card h3 {
  font-size: 15.5px;
  font-weight: 800;
}

.letter-card p {
  font-size: 12.5px;
  color: var(--ink-2);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
}

.letter-card .lc-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--ink-3);
}

.letter-paper {
  background:
    repeating-linear-gradient(0deg, transparent 0 30px, rgba(74, 53, 80, 0.08) 30px 31px),
    #fffdf7;
  border: 2px solid rgba(74, 53, 80, 0.25);
  border-radius: 10px;
  padding: 18px;
  font-size: 14.5px;
  line-height: 31px;
  white-space: pre-wrap;
  min-height: 160px;
}

.letter-sign {
  margin-top: 16px;
  text-align: right;
  font-size: 13px;
  color: var(--ink-2);
}

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

.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}

.settings-grid .card + .card {
  margin-top: 0;
}

.setting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 2px dashed rgba(74, 53, 80, 0.16);
}

.setting-row:last-child {
  border-bottom: none;
}

.setting-row b {
  font-size: 13.5px;
  display: block;
}

.setting-row span {
  font-size: 11.5px;
  color: var(--ink-3);
}

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

/* ---------------------------------------------------------- 登录 / 注册 */

.auth-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  place-items: center;
  padding: 28px 18px 48px;
  position: relative;
  overflow: hidden;
}

.auth-deco {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.auth-deco .pix {
  position: absolute;
  opacity: 0.55;
  animation: floaty 9s ease-in-out infinite;
}

.auth-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 430px;
  padding: 28px 26px 24px;
  background: var(--white);
  border: 3px solid var(--line);
  border-radius: 22px;
  box-shadow: 8px 8px 0 rgba(74, 53, 80, 0.18);
}

.auth-brand {
  text-align: center;
  margin-bottom: 20px;
}

.auth-brand .mark {
  width: 62px;
  height: 62px;
  margin: 0 auto 10px;
  display: grid;
  place-items: center;
  background: var(--pink-soft);
  border: 3px solid var(--line);
  border-radius: 18px;
  box-shadow: 4px 4px 0 rgba(74, 53, 80, 0.16);
  animation: beat 3s ease-in-out infinite;
}

.auth-brand h1 {
  font-size: 23px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.auth-brand p {
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--ink-3);
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  margin-bottom: 18px;
  background: var(--paper-2);
  border: 2px solid var(--line);
  border-radius: 12px;
}

.auth-tab {
  padding: 7px;
  border: 2px solid transparent;
  border-radius: 8px;
  background: transparent;
  font-size: 13.5px;
  font-weight: 800;
  color: var(--ink-2);
  cursor: pointer;
}

.auth-tab[aria-selected="true"] {
  background: var(--white);
  border-color: var(--line);
  color: var(--ink);
  box-shadow: 2px 2px 0 rgba(74, 53, 80, 0.15);
}

.auth-note {
  margin-top: 14px;
  font-size: 11.5px;
  line-height: 1.6;
  color: var(--ink-3);
  text-align: center;
}

.auth-note b {
  color: var(--ink-2);
}

/* ---------------------------------------------------------- 弹窗 / 提示 */

.modal-root {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(40, 26, 46, 0.55);
  backdrop-filter: blur(4px);
  animation: fade-in 0.14s ease-out;
}

.modal-card {
  width: min(560px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  background: var(--paper);
  border: 3px solid var(--line);
  border-radius: 18px;
  box-shadow: 8px 8px 0 rgba(0, 0, 0, 0.22);
  animation: pop-in 0.16s ease-out;
}

.modal-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  background: var(--paper);
  border-bottom: 3px solid var(--line);
}

.modal-head h3 {
  font-size: 17px;
  font-weight: 800;
}

.modal-body {
  padding: 18px;
}

.modal-foot {
  position: sticky;
  bottom: 0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 18px;
  background: var(--paper);
  border-top: 2px dashed rgba(74, 53, 80, 0.25);
  flex-wrap: wrap;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pop-in {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.toast-root {
  position: fixed;
  left: 50%;
  bottom: calc(24px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}

.toast {
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  background: var(--white);
  border: 3px solid var(--line);
  border-radius: 12px;
  box-shadow: 4px 4px 0 rgba(74, 53, 80, 0.2);
  animation: toast-in 0.18s ease-out;
  max-width: min(88vw, 420px);
}

.toast.err {
  background: #ffe3e8;
}

.toast.ok {
  background: var(--mint-soft);
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

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

.empty {
  padding: 34px 18px;
  text-align: center;
  border: 3px dashed rgba(74, 53, 80, 0.28);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.55);
}

.empty .pix {
  margin: 0 auto 10px;
  opacity: 0.75;
}

.empty b {
  display: block;
  font-size: 15px;
  font-weight: 800;
}

.empty p {
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--ink-3);
}

.empty .btn {
  margin-top: 14px;
}

/* 加载 */
.loading {
  padding: 48px 20px;
  text-align: center;
  color: var(--ink-3);
  font-size: 13px;
  font-weight: 700;
}

.dots::after {
  content: "";
  animation: dots 1.2s steps(4, end) infinite;
}

@keyframes dots {
  0% { content: ""; }
  25% { content: "·"; }
  50% { content: "··"; }
  75% { content: "···"; }
}

/* 工具栏 */
.muted { color: var(--ink-3); }
.small { font-size: 12px; }
.mt-0 { margin-top: 0; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.right { margin-left: auto; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.hidden { display: none !important; }
.spin {
  width: 14px;
  height: 14px;
  border: 3px solid rgba(74, 53, 80, 0.2);
  border-top-color: var(--ink);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

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

/* ---------------------------------------------------------- 响应式 */

@media (max-width: 900px) {
  .home-grid,
  .settings-grid,
  .game-grid {
    grid-template-columns: 1fr;
  }

  .photo-grid {
    columns: 2;
  }

  .lightbox-body {
    grid-template-columns: 1fr;
  }

  .lightbox-img img {
    max-height: 46vh;
  }
}

@media (max-width: 820px) {
  :root {
    --header-h: 60px;
  }

  .main-nav {
    display: none;
  }

  .tabbar {
    display: block;
  }

  .topbar-inner {
    padding: 0 14px;
    gap: 10px;
  }

  .brand-sub {
    display: none;
  }

  .brand-name {
    max-width: 46vw;
    font-size: 15.5px;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
  }

  .user-chip .nick {
    display: none;
  }

  .user-chip {
    padding: 3px;
  }

  .user-chip .avatar {
    width: 28px;
    height: 28px;
  }

  .icon-btn {
    width: 36px;
    height: 36px;
    border-width: 2px;
  }

  .wrap {
    padding: 16px 14px 108px;
  }

  .hero {
    padding: 22px 14px 20px;
    border-radius: 18px;
  }

  .page-title {
    font-size: 22px;
  }

  .stats-row {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
  }

  .stat {
    padding: 9px 4px;
  }

  .stat b {
    font-size: 19px;
  }

  .stat span {
    font-size: 10.5px;
  }

  .countdown-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .countdown {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
  }

  .countdown .cd-num {
    margin: 0;
    font-size: 24px;
    min-width: 78px;
  }

  .countdown .cd-date {
    margin-left: auto;
    text-align: right;
  }

  .countdown-row .countdown:nth-child(n + 3) {
    display: none;
  }

  .countdown-row.more .countdown:nth-child(n + 3) {
    display: flex;
  }

  .photo-grid {
    columns: 2;
    column-gap: 10px;
  }

  .polaroid {
    margin-bottom: 10px;
    padding: 7px 7px 9px;
  }

  .photo-strip {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .modal-card {
    max-height: calc(100vh - 24px);
  }

  .modal-body {
    padding: 14px;
  }

  .timeline {
    padding-left: 20px;
  }

  .tl-item::before {
    left: -20px;
    width: 13px;
    height: 13px;
  }

  .tl-year {
    margin-left: -20px;
  }

  .lightbox {
    padding: 0;
    place-items: stretch;
  }

  .lightbox-inner {
    border-radius: 0;
    border: none;
    max-height: 100vh;
    width: 100%;
  }

  .lightbox-body {
    min-height: 100vh;
  }

  .lightbox-img {
    max-height: 52vh;
  }
}

@media (max-width: 380px) {
  .tab {
    font-size: 9px;
  }

  .tab .ico {
    width: 19px;
    height: 19px;
  }

  .days-num {
    font-size: 40px;
  }
}

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

/* 打印：把页面变成一页回忆 */
@media print {
  .topbar,
  .tabbar,
  .page-actions,
  .toast-root {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .card,
  .date-card,
  .polaroid {
    box-shadow: none;
    break-inside: avoid;
  }
}

/* ---------------------------------------------------------- 视图补充 */

.ico {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  vertical-align: -3px;
}

.center { text-align: center; }

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

@media (max-width: 620px) {
  .form-row { grid-template-columns: 1fr; }
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--ink-2);
  margin: 4px 0 12px;
  cursor: pointer;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
  accent-color: var(--pink-deep);
  flex: 0 0 auto;
}

.banner-card {
  background: linear-gradient(135deg, var(--pink-soft), var(--paper));
  border-style: dashed;
}

.avatar-xs {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.save-state {
  color: var(--ink-3);
  font-weight: 700;
}

.save-state.ok { color: #2f8a68; }
.save-state.err { color: #c0395a; }

.letter-title {
  font-size: 19px;
  font-weight: 800;
  margin: 10px 0 12px;
}

.letter-body {
  white-space: pre-wrap;
  word-break: break-word;
}

.letter-textarea { min-height: 220px; }

.modal-card.modal-letter { width: min(680px, 100%); }

@media print {
  .tabbar,
  .main-nav,
  .btn,
  .icon-btn,
  .tl-actions {
    display: none !important;
  }
}
