:root {
  color-scheme: light;
  --bg: #f3faf7;
  --paper: #ffffff;
  --paper-warm: #eaf6f1;
  --surface: #ffffff;
  --surface-strong: #eef7f3;
  --text: #243733;
  --muted: #526d66;
  --muted-strong: #405a54;
  --line: #d4e7e0;
  --ink: #243733;
  --accent: #4db6a4;
  --accent-dark: #2e8472;
  --accent-soft: #d4efe8;
  --yellow: #ffe6a8;
  --green: #5bbfa8;
  --blue: #a9dde2;
  --brown: #c69a63;
  --danger: #d96076;
  --focus: #176f60;
  --font-serif: "Songti SC", "STSong", "SimSun", "Noto Serif CJK SC", serif;
  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 22px;
  --sketch-border: 1.5px solid var(--line);
  --panel-border: 1.5px solid var(--line);
  --shadow: 0 14px 40px -22px rgba(46, 132, 114, 0.32);
  --soft-shadow: 0 8px 24px -16px rgba(46, 132, 114, 0.28);
  --card-shadow: 0 12px 34px -20px rgba(46, 132, 114, 0.3);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #101a17;
  --paper: #182722;
  --paper-warm: #20342e;
  --surface: #182722;
  --surface-strong: #213630;
  --text: #edf7f3;
  --muted: #b2c9c1;
  --muted-strong: #c9ddd6;
  --line: #36534a;
  --ink: #edf7f3;
  --accent: #65c7b3;
  --accent-dark: #8ee0cf;
  --accent-soft: #24493f;
  --focus: #9bead9;
  --shadow: 0 14px 40px -22px rgba(0, 0, 0, .75);
  --soft-shadow: 0 8px 24px -16px rgba(0, 0, 0, .7);
  --card-shadow: 0 12px 34px -20px rgba(0, 0, 0, .75);
}

:root[data-theme="dark"] body { background: radial-gradient(circle at 12% 10%, rgba(56,112,96,.35),transparent 42%),var(--bg); }
:root[data-theme="dark"] .leaflet-tile-pane { filter: brightness(.62) saturate(.75); }

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 10%, rgba(160, 222, 208, 0.5), transparent 42%),
    radial-gradient(circle at 88% 90%, rgba(184, 226, 200, 0.45), transparent 44%),
    var(--bg);
  color: var(--text);
  font-family:
    Inter, "Microsoft YaHei", "PingFang SC", "Noto Sans CJK SC", Arial,
    sans-serif;
}

main {
  min-height: 100vh;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  min-height: 44px;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 0 20px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  font-weight: 700;
  box-shadow: var(--soft-shadow);
  transition:
    background-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

button:hover {
  background: var(--accent-soft);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

button[aria-selected="true"],
button[aria-pressed="true"],
button[aria-current="page"] {
  border-color: var(--accent-dark);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.activity-badge { display:inline-grid;place-items:center;min-width:22px;height:22px;padding:0 6px;border-radius:999px;background:var(--danger);color:white;font-size:.72rem; }
.mobile-nav button[data-mobile-route="/hub"] { position:relative; }
.mobile-nav-badge { position:absolute;top:3px;right:18%;min-width:18px;height:18px;padding:0 4px;border-radius:999px;background:var(--danger);color:#fff;font-size:.68rem;line-height:18px; }
.theme-quick-field { display:inline-flex;align-items:center;gap:6px;color:var(--muted);font-size:.84rem;font-weight:700; }
.theme-quick-field select { min-height:40px;border:var(--panel-border);border-radius:999px;background:var(--surface);color:var(--text);padding:0 12px; }
.activity-list { display:grid;gap:10px; }
.activity-item { width:100%;height:auto;min-height:64px;border-radius:var(--radius-md);padding:12px 16px;text-align:left;display:grid;gap:4px; }
.activity-item span { color:var(--muted);font-weight:500; }
.activity-item.is-unread { border-color:var(--accent);background:var(--accent-soft); }
.weekly-layout { display:grid;grid-template-columns:minmax(210px,.34fr) minmax(0,1fr);gap:20px; }
.weekly-list { display:grid;align-content:start;gap:8px; }
.weekly-nav-item { width:100%;border-radius:var(--radius-md); }
.weekly-stats { display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:18px 0; }
.weekly-stats span,.weekly-answers section { padding:14px;border:var(--panel-border);border-radius:var(--radius-md);background:var(--surface-strong); }
.weekly-stats strong { display:block;font-size:1.6rem;color:var(--accent-dark); }
.weekly-answers { display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:18px; }
.ai-preview { white-space:pre-wrap;padding:14px;border:var(--panel-border);border-radius:var(--radius-md);background:var(--surface-strong);margin-top:12px; }
.load-more-row { display:flex;justify-content:center;margin-top:20px; }
.map-cluster { display:grid;place-items:center;border-radius:50%;background:var(--accent-dark);color:white;border:3px solid rgba(255,255,255,.8);font-weight:800;box-shadow:var(--shadow); }
.footprint-popup-button { border:0;box-shadow:none;border-radius:0;padding:4px;display:grid;text-align:left; }

@media (max-width: 860px) {
  .weekly-layout,.weekly-answers { grid-template-columns:1fr; }
  .weekly-list { display:flex;overflow:auto; }
  .weekly-nav-item { min-width:180px; }
  .weekly-stats { grid-template-columns:1fr 1fr; }
}

.home-screen {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(22px, 4vw, 42px);
  isolation: isolate;
  overflow: hidden;
  min-height: 100vh;
  padding: clamp(28px, 6vw, 64px);
  background:
    radial-gradient(circle at 18% 14%, rgba(160, 222, 208, 0.55), transparent 46%),
    radial-gradient(circle at 84% 88%, rgba(184, 226, 200, 0.5), transparent 48%),
    linear-gradient(160deg, #f3faf7 0%, #eaf6f1 55%, #e2f2ec 100%);
}

.cover-image {
  position: absolute;
  z-index: 0;
  top: 50%;
  left: 50%;
  display: block;
  max-width: none;
  transform: translate(-50%, -50%);
  transform-origin: center;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.home-photo {
  position: relative;
  width: min(520px, 86vw);
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: clamp(20px, 3vw, 28px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  background: #d4e7e0;
  box-shadow:
    0 26px 60px -22px rgba(46, 132, 114, 0.36),
    0 8px 20px -10px rgba(46, 132, 114, 0.26);
}

.home-cover-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.home-swiper,
.home-swiper .swiper-wrapper,
.home-swiper .swiper-slide {
  height: 100%;
}

.home-slide {
  position: relative;
  background: var(--surface-strong);
}

.home-slide-image {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.home-slide-caption {
  position: absolute;
  left: 16px;
  bottom: 14px;
  right: 16px;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(36, 55, 51, 0.55);
  color: #fff;
  font-size: 0.9rem;
  font-weight: 700;
  backdrop-filter: blur(6px);
  width: fit-content;
  max-width: calc(100% - 32px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-swiper .swiper-pagination-bullet {
  background: #fff;
  opacity: 0.6;
}

.home-swiper .swiper-pagination-bullet-active {
  background: var(--accent);
  opacity: 1;
}

.home-copy {
  position: relative;
  z-index: 4;
  display: grid;
  justify-items: center;
  gap: 14px;
  width: min(560px, 100%);
  color: var(--ink);
  text-align: center;
}

.home-copy .eyebrow {
  width: fit-content;
  margin: 0;
  color: var(--accent-dark);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.32em;
}

.home-copy h1 {
  width: fit-content;
  max-width: 100%;
  margin: 0;
  color: #243733;
  font-size: clamp(2.4rem, 8vw, 4.6rem);
  line-height: 1.04;
  overflow-wrap: anywhere;
}

.opening-line {
  max-width: 460px;
  margin: 0;
  color: #6f8a83;
  font-size: clamp(1.02rem, 2vw, 1.25rem);
  line-height: 1.7;
}

.home-days {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  width: fit-content;
  margin: 2px 0 4px;
  padding: 8px 22px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--accent-soft);
  box-shadow: 0 6px 16px -8px rgba(46, 132, 114, 0.28);
}

.home-days span {
  color: #6f8a83;
  font-size: 0.9rem;
  font-weight: 700;
}

.home-days strong {
  color: var(--accent-dark);
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 900;
  line-height: 1;
}

.home-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 4px;
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
}

.auth-user {
  padding: 8px 14px;
  border: 1.5px solid var(--accent-soft);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.75);
  color: var(--accent-dark);
  font-size: 0.92rem;
  font-weight: 800;
}

.enter-button {
  min-width: 160px;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(135deg, #5bbfa8, #3aa18d);
  color: #fff;
  font-weight: 800;
  box-shadow: 0 12px 26px -12px rgba(58, 161, 141, 0.7);
}

.enter-button:hover {
  background: linear-gradient(135deg, #6cc7b2, #46ad97);
  filter: brightness(1.03);
  transform: translateY(-2px);
}

.light-button {
  border: 1.5px solid var(--accent);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.65);
  color: var(--accent-dark);
  font-weight: 700;
}

.light-button:hover {
  background: #fff;
  transform: translateY(-2px);
}

.weather-panel {
  display: grid;
  gap: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.78);
  padding: clamp(18px, 3vw, 26px);
  box-shadow: var(--card-shadow);
  backdrop-filter: blur(10px);
}

.weather-panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  text-align: left;
}

.weather-panel-head h2 {
  margin: 0 0 8px;
  color: var(--accent-dark);
  font-size: 1.35rem;
}

.weather-panel-head p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.weather-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
}

.weather-card {
  display: grid;
  gap: 14px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.9);
  padding: 16px;
  text-align: left;
  box-shadow: 0 10px 24px -18px rgba(46, 132, 114, 0.4);
}

.weather-card-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
}

.weather-card h3 {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 1.08rem;
}

.weather-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.weather-stale {
  flex: 0 0 auto;
  border-radius: 999px;
  background: #fff3cd;
  color: #8a6500;
  padding: 4px 8px;
  font-size: 0.72rem;
  font-weight: 800;
}

.weather-current {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 12px;
  align-items: baseline;
}

.weather-current strong {
  grid-row: span 2;
  color: var(--accent-dark);
  font-size: 2.4rem;
  line-height: 1;
}

.weather-current span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.weather-days {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.weather-day {
  display: grid;
  gap: 4px;
  border-radius: 14px;
  background: rgba(230, 246, 240, 0.72);
  padding: 9px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.weather-day strong {
  color: var(--accent-dark);
}

.weather-day small {
  color: #7c948d;
}

.weather-hourly {
  overflow-x: auto;
  padding-bottom: 2px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.weather-hourly svg {
  display: block;
  width: 100%;
  min-width: 300px;
  height: 84px;
}

.weather-hourly path {
  fill: none;
  stroke: rgba(111, 138, 131, 0.22);
  stroke-width: 2;
}

.weather-hourly polyline {
  fill: none;
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
}

.weather-hourly-labels {
  display: grid;
  grid-template-columns: repeat(5, minmax(58px, 1fr));
  gap: 6px;
  min-width: 300px;
}

.weather-hourly-labels span {
  display: grid;
  gap: 2px;
}

.weather-hourly-labels small {
  color: #7c948d;
  font-size: 0.72rem;
}

.weather-empty {
  grid-column: 1 / -1;
}

.auth-overlay {
  position: fixed;
  z-index: 90;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(36, 55, 51, 0.35);
  backdrop-filter: blur(10px);
}

.auth-card {
  display: grid;
  gap: 16px;
  width: min(420px, 100%);
  padding: clamp(22px, 4vw, 34px);
  border: var(--panel-border);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
}

.auth-card h2 {
  margin: 0;
  color: var(--accent-dark);
}

.auth-card label,
.password-form label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 800;
}

.auth-card input,
.auth-card select,
.password-form input {
  width: 100%;
  border: var(--sketch-border);
  border-radius: 16px;
  padding: 12px 14px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

.check-row {
  display: flex !important;
  grid-template-columns: none;
  align-items: center;
  gap: 10px;
}

.check-row input {
  width: auto;
}

.auth-actions,
.password-form {
  display: grid;
  gap: 12px;
}

.home-doodle-layer,
.timeline-doodle-layer {
  position: absolute;
  z-index: 3;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.doodle-mark {
  position: absolute;
  display: block;
  opacity: 0.72;
}

.doodle-heart,
.route-heart {
  width: 42px;
  height: 38px;
  transform: rotate(-10deg);
}

.doodle-heart::before,
.doodle-heart::after,
.route-heart::before,
.route-heart::after {
  position: absolute;
  width: 22px;
  height: 34px;
  border: var(--sketch-border);
  border-radius: 22px 22px 0 0;
  background: var(--accent-soft);
  content: "";
}

.doodle-heart::before,
.route-heart::before {
  left: 20px;
  transform: rotate(-45deg);
  transform-origin: 0 100%;
}

.doodle-heart::after,
.route-heart::after {
  left: 0;
  transform: rotate(45deg);
  transform-origin: 100% 100%;
}

.doodle-star,
.route-star {
  width: 38px;
  height: 38px;
  background: var(--yellow);
  clip-path: polygon(
    50% 0,
    61% 36%,
    100% 50%,
    61% 64%,
    50% 100%,
    39% 64%,
    0 50%,
    39% 36%
  );
  filter:
    drop-shadow(3px 0 0 var(--ink))
    drop-shadow(-3px 0 0 var(--ink))
    drop-shadow(0 3px 0 var(--ink))
    drop-shadow(0 -3px 0 var(--ink));
}

.doodle-bone,
.route-bone {
  width: 76px;
  height: 30px;
  border: var(--sketch-border);
  border-radius: 999px;
  background: var(--surface);
  transform: rotate(12deg);
}

.doodle-bone::before,
.doodle-bone::after,
.route-bone::before,
.route-bone::after {
  position: absolute;
  top: -9px;
  width: 28px;
  height: 28px;
  border: var(--sketch-border);
  border-radius: 50%;
  background: var(--paper);
  content: "";
}

.doodle-bone::before,
.route-bone::before {
  left: -12px;
  box-shadow: 0 20px 0 var(--surface), 0 20px 0 4px var(--ink);
}

.doodle-bone::after,
.route-bone::after {
  right: -12px;
  box-shadow: 0 20px 0 var(--surface), 0 20px 0 4px var(--ink);
}

.doodle-paw {
  width: 52px;
  height: 42px;
  border: var(--sketch-border);
  border-radius: 54% 46% 56% 44%;
  background: var(--accent-soft);
  transform: rotate(18deg);
}

.doodle-paw::before {
  position: absolute;
  top: -22px;
  left: -2px;
  width: 14px;
  height: 18px;
  border: var(--sketch-border);
  border-radius: 50%;
  background: var(--paper);
  box-shadow:
    18px -6px 0 var(--paper),
    18px -6px 0 1.5px var(--ink),
    36px 0 0 var(--paper),
    36px 0 0 1.5px var(--ink);
  content: "";
}

.doodle-flower {
  width: 54px;
  height: 54px;
  border: var(--sketch-border);
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--yellow) 0 7px, transparent 8px),
    radial-gradient(circle at 50% 8px, var(--accent-soft) 0 10px, transparent 11px),
    radial-gradient(circle at 50% 46px, var(--accent-soft) 0 10px, transparent 11px),
    radial-gradient(circle at 8px 50%, var(--accent-soft) 0 10px, transparent 11px),
    radial-gradient(circle at 46px 50%, var(--accent-soft) 0 10px, transparent 11px);
  transform: rotate(-14deg);
}

.doodle-heart {
  left: 54%;
  top: 12%;
}

.doodle-star {
  right: 10%;
  top: 16%;
  --float-rotate: 0deg;
  animation: doodle-float 5s ease-in-out infinite;
}

.doodle-bone {
  left: 10%;
  bottom: 13%;
}

.doodle-paw {
  right: 20%;
  bottom: 19%;
  --float-rotate: 18deg;
  animation: doodle-float 6s ease-in-out infinite reverse;
}

.doodle-flower {
  left: 41%;
  bottom: 9%;
}

.timeline-doodle-layer {
  z-index: 1;
  inset: 0 -8px;
}

.route-heart {
  right: 10%;
  top: 168px;
  opacity: 0.24;
  transform: rotate(10deg);
}

.route-bone {
  left: 4%;
  top: 94px;
  opacity: 0.22;
  transform: rotate(-9deg);
}

.route-star {
  right: 34%;
  top: 74px;
  opacity: 0.28;
  transform: rotate(16deg);
}

.settings-screen,
.hub-screen,
.moment-screen,
.photo-wall-screen,
.yearbook-screen,
.anniversary-screen,
.letters-screen,
.whispers-screen,
.plans-screen,
.weather-screen,
.dinner-screen,
.reports-screen,
.easter-screen,
.detail-screen {
  min-height: 100vh;
  background: transparent;
}

.settings-shell,
.detail-shell {
  width: min(760px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.detail-shell {
  width: min(980px, calc(100% - 32px));
}

.settings-form {
  display: grid;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: 20px;
  box-shadow: var(--shadow);
}

.settings-form h2 {
  margin-bottom: 4px;
}

.app-shell {
  position: relative;
  isolation: isolate;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

#appContent {
  min-height: 100vh;
}

.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 26px 0 18px;
}

#appContent > .topbar {
  align-items: center;
  min-height: 92px;
  padding: 34px 20px 24px;
}

#appContent > .topbar h1 {
  width: fit-content;
  max-width: 100%;
  margin: 0;
  color: #3d2a31;
  font-size: clamp(2rem, 6vw, 3.4rem);
  line-height: 1.04;
}

#appContent > .topbar .eyebrow {
  width: fit-content;
  margin: 0 0 6px;
  color: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.28em;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 6vw, 4.8rem);
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 0;
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: 0;
}

h3 {
  margin-bottom: 10px;
  font-size: 1.2rem;
  font-weight: 900;
  line-height: 1.3;
  letter-spacing: 0;
}

label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  padding: 11px 12px;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.start-form {
  width: min(360px, 100%);
}

.inline-fields {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.summary-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 20px 0 26px;
}

.metric {
  min-height: 118px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 18px;
  box-shadow: var(--card-shadow);
}

#appContent .metric:nth-child(1) {
  background: var(--accent-soft);
}

#appContent .metric:nth-child(2) {
  background: var(--paper-warm);
}

#appContent .metric:nth-child(3) {
  background: var(--paper);
}

.metric span {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.metric strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: clamp(1.45rem, 3vw, 2.4rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: 0;
}

.metric.wide {
  grid-column: span 2;
}

.workspace {
  display: grid;
  grid-template-columns: minmax(320px, 420px) minmax(0, 1fr);
  align-items: start;
  gap: 22px;
}

.content-workspace {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 22px;
}

.quiet-panel {
  display: grid;
  gap: 18px;
  padding-top: 12px;
}

.hub-panel {
  display: grid;
  gap: 24px;
}

.hub-group {
  display: grid;
  gap: 12px;
}

.hub-group h3 {
  margin: 0;
  color: var(--accent-dark);
  font-size: 1rem;
}

.hub-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.hub-card {
  display: grid;
  min-height: 138px;
  align-content: start;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 18px;
  text-align: left;
  box-shadow: var(--card-shadow);
}

.hub-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}

.hub-icon {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-dark);
  font-weight: 900;
}

.hub-card strong {
  color: #3d2a31;
  font-size: 1.04rem;
}

.hub-card small {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.55;
}

.anniversary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.primary.compact-button {
  width: auto;
  min-height: 40px;
  padding-inline: 18px;
}

.special-day-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.special-day-card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 18px;
  box-shadow: var(--card-shadow);
}

.special-day-card.type-birthday {
  background: #fff4f6;
}

.special-day-card.type-relationship,
.special-day-card.type-wedding {
  background: #fff8e8;
}

.special-day-card.type-festival {
  background: #f1faf6;
}

.special-day-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 12px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.special-day-card h3 {
  margin: 16px 0 8px;
  overflow-wrap: anywhere;
  font-size: 1.05rem;
}

.special-day-card strong {
  display: block;
  color: var(--accent-dark);
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.15;
}

.anniversary-settings {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}

.anniversary-form {
  display: grid;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 20px;
  box-shadow: var(--card-shadow);
}

.anniversary-date-row {
  align-items: end;
}

.checkbox-field {
  display: flex;
  min-height: 48px;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  padding: 12px 14px;
}

.checkbox-field input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: var(--accent);
}

.anniversary-list {
  display: grid;
  gap: 12px;
}

.anniversary-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 16px 18px;
}

.anniversary-item h3 {
  margin: 0 0 5px;
  overflow-wrap: anywhere;
  font-size: 1.05rem;
}

.anniversary-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.anniversary-item-countdown {
  color: var(--accent-dark);
  white-space: nowrap;
}

.anniversary-item-actions {
  display: flex;
  gap: 8px;
}

.anniversary-item-actions button {
  min-width: 64px;
}

.whispers-layout {
  display: grid;
  grid-template-columns: minmax(280px, 350px) minmax(0, 1fr);
  align-items: start;
  gap: 24px;
}

.whisper-form {
  display: grid;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 20px;
  box-shadow: var(--card-shadow);
}

.whisper-recorder {
  display: grid;
  gap: 10px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: var(--surface-strong);
  padding: 14px;
}

.whisper-recorder-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.whisper-recorder-actions button,
.whisper-audio-picker,
.whisper-form-actions button {
  display: inline-flex;
  width: auto;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 0 14px;
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1;
}

.whisper-recorder-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.whisper-record-status {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

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

.whisper-audio-preview,
.whisper-note-audio {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 42px;
}

.whisper-board {
  min-width: 0;
}

.whisper-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.whisper-filters button {
  min-height: 36px;
  border-radius: 999px;
  padding-inline: 14px;
  background: var(--surface);
  box-shadow: none;
  font-size: 0.86rem;
}

.whisper-filters button.active {
  border-color: var(--accent-dark);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.whisper-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  align-items: start;
  gap: 20px 16px;
}

.whisper-note {
  --note-bg: #eff8f3;
  --note-border: #8fbea8;
  --note-tag: #d6eee2;
  --note-tape: rgba(170, 216, 197, 0.78);
  --note-rotate: 0deg;
  position: relative;
  display: flex;
  min-height: 190px;
  flex-direction: column;
  border: 1.5px solid var(--note-border);
  border-radius: 16px 20px 14px 22px;
  background: var(--note-bg);
  padding: 28px 18px 14px;
  box-shadow: 0 12px 24px -18px rgba(36, 55, 51, 0.45);
  transform: rotate(var(--note-rotate));
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.whisper-note:hover {
  box-shadow: 0 18px 30px -18px rgba(36, 55, 51, 0.5);
  transform: translateY(-4px) rotate(var(--note-rotate));
}

.whisper-note.tilt-0 {
  --note-rotate: -0.6deg;
}

.whisper-note.tilt-1 {
  --note-rotate: 0.8deg;
}

.whisper-note.tilt-2 {
  --note-rotate: -0.2deg;
}

.whisper-note.tag-love {
  --note-bg: #fff0f3;
  --note-border: #e69aaa;
  --note-tag: #ffd6df;
  --note-tape: rgba(245, 180, 194, 0.8);
  border-radius: 22px 14px 22px 14px;
}

.whisper-note.tag-miss {
  --note-bg: #eef7ff;
  --note-border: #91b9d7;
  --note-tag: #d5eaff;
  --note-tape: rgba(170, 207, 235, 0.82);
  border-radius: 14px 24px 16px 20px;
}

.whisper-note.tag-praise {
  --note-bg: #fff8d9;
  --note-border: #d5bc55;
  --note-tag: #ffec9f;
  --note-tape: rgba(239, 211, 100, 0.76);
  border-radius: 18px 18px 8px 22px;
}

.whisper-note.tag-complaint {
  --note-bg: #f4f1ed;
  --note-border: #a59483;
  --note-tag: #e4dbd1;
  --note-tape: rgba(190, 173, 154, 0.76);
  border-radius: 8px 18px 12px 16px;
}

.whisper-note.tag-grievance {
  --note-bg: #f6f2fb;
  --note-border: #b6a2ce;
  --note-tag: #e7dcf3;
  --note-tape: rgba(202, 184, 222, 0.76);
  border-radius: 24px 12px 18px 12px;
}

.whisper-tape {
  position: absolute;
  top: -9px;
  left: 50%;
  width: 70px;
  height: 22px;
  background: var(--note-tape);
  clip-path: polygon(5% 8%, 96% 0, 100% 86%, 2% 100%);
  transform: translateX(-50%) rotate(-2deg);
}

.whisper-note-head,
.whisper-note-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.whisper-note-head strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.whisper-tag {
  flex: 0 0 auto;
  border: 1px solid var(--note-border);
  border-radius: 999px;
  background: var(--note-tag);
  padding: 3px 9px;
  font-size: 0.76rem;
  font-weight: 800;
}

.whisper-note > p {
  flex: 1;
  margin: 20px 0;
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  font-size: 1rem;
  line-height: 1.75;
}

.whisper-note-audio {
  margin: auto 0 14px;
}

.whisper-note-foot time {
  color: var(--muted);
  font-size: 0.78rem;
}

.whisper-note-actions {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 4px;
}

.whisper-edit,
.whisper-delete {
  width: 32px;
  min-height: 32px;
  border-color: transparent;
  background: transparent;
  padding: 0;
  color: var(--muted);
  box-shadow: none;
  font-size: 1.35rem;
  line-height: 1;
}

.whisper-edit {
  width: auto;
  padding: 0 8px;
  font-size: 0.78rem;
  font-weight: 800;
}

.whisper-edit:hover {
  border-color: var(--accent-dark);
  background: rgba(255, 255, 255, 0.55);
  color: var(--accent-dark);
}

.whisper-delete:hover {
  border-color: var(--danger);
  background: rgba(255, 255, 255, 0.55);
  color: var(--danger);
}

.plans-layout {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  align-items: start;
  gap: 24px;
}

.daydayup-shell {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  min-height: 100vh;
}

.daydayup-sidebar {
  display: grid;
  align-content: start;
  gap: 22px;
  min-width: 0;
  overflow-x: hidden;
  border-right: 1px solid var(--line);
  background: var(--surface-strong);
  padding: clamp(18px, 3vw, 30px);
}

.daydayup-main {
  min-width: 0;
  padding: clamp(18px, 4vw, 40px);
}

.daydayup-top-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 26px;
}

.daydayup-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  font-weight: 900;
  line-height: 1;
}

.daydayup-entry-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 20px 0 0;
  font-size: clamp(1.25rem, 3vw, 1.8rem);
}

.daydayup-entry-tabs {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}

.daydayup-entry-tabs button {
  width: auto;
  min-height: 40px;
  flex: 0 0 auto;
  border-color: transparent;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  padding: 0 4px 8px;
  color: var(--muted);
  font-weight: 800;
}

.daydayup-entry-tabs button.active {
  border-bottom: 3px solid var(--accent);
  color: var(--accent-dark);
}

.daydayup-entry-panels {
  min-width: 0;
}

.daydayup-sidebar .daydayup-entry-panel,
.daydayup-sidebar .plan-form,
.daydayup-sidebar label,
.daydayup-sidebar .form-row {
  min-width: 0;
  max-width: 100%;
}

.daydayup-sidebar .form-row {
  /* 侧栏较窄，日期/时间输入成对横排会切掉“日”字，统一单列给足宽度 */
  grid-template-columns: minmax(0, 1fr);
}

.daydayup-sidebar input,
.daydayup-sidebar select,
.daydayup-sidebar textarea {
  min-width: 0;
  max-width: 100%;
}

.entry-type-picker {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.entry-type-picker label {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 1rem;
}

.entry-type-picker input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
}

.daydayup-main-picker {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin: 58px 0 38px;
}

.daydayup-main-picker input,
.daydayup-main-picker select {
  width: auto;
  min-width: 112px;
  border-color: transparent;
  background: var(--surface-strong);
  padding: 16px 24px;
  font-size: 1.15rem;
  font-weight: 800;
}

.daydayup-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 4px 0 22px;
}

.daydayup-tabs button {
  width: auto;
  min-height: 40px;
  border-radius: 999px;
  padding-inline: 16px;
  background: var(--surface);
  box-shadow: none;
  font-size: 0.9rem;
}

.daydayup-tabs button.active {
  border-color: var(--accent-dark);
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.daydayup-calendar-layout {
  grid-template-columns: minmax(300px, 390px) minmax(0, 1fr);
}

.daydayup-form-stack {
  display: grid;
  gap: 16px;
}

.inline-time-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.plan-form {
  display: grid;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 20px;
  box-shadow: var(--card-shadow);
}

.plan-board {
  min-width: 0;
}

.calendar-board {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 18px;
  box-shadow: var(--card-shadow);
}

.calendar-heading,
.calendar-toolbar {
  display: none;
}

.calendar-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.calendar-toolbar strong {
  margin-inline: auto;
  color: var(--ink);
  font-size: 1.1rem;
}

.day-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 6px;
}

.day-calendar-week {
  color: var(--muted);
  text-align: center;
  font-size: 0.82rem;
  font-weight: 800;
}

.day-calendar-cell {
  min-height: 118px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  padding: 8px;
}

.day-calendar-cell.other-month {
  background: transparent;
  opacity: 0.35;
}

.day-calendar-cell.today {
  border-color: var(--accent);
  background: #fff8fb;
}

.day-calendar-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.day-calendar-head strong {
  color: var(--ink);
  font-size: 1.1rem;
}

.day-calendar-head > span:not(.day-calendar-badges) {
  color: var(--accent-dark);
  font-size: 0.76rem;
  font-weight: 800;
}

.day-calendar-badges {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 3px;
}

.holiday-badge,
.today-badge {
  display: inline-grid;
  flex: 0 0 auto;
  min-width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 4px;
  padding: 0 4px;
  color: #fff;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.holiday-badge.badge-rest {
  background: var(--accent);
}

.holiday-badge.badge-work {
  background: #777;
}

.today-badge {
  min-width: 36px;
  height: 22px;
  border-radius: 7px;
  padding: 0 7px;
  background: var(--accent-dark);
}

.day-calendar-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 3px 5px;
  min-height: 18px;
  margin: -2px 0 5px;
  font-size: 0.68rem;
  line-height: 1.3;
}

.calendar-festival {
  color: #8b4bb8;
  font-weight: 900;
}

.calendar-jieqi {
  color: #008f7a;
  font-weight: 900;
}

.calendar-lunar {
  margin-left: auto;
  color: var(--muted);
  font-weight: 700;
}

.day-calendar-event {
  overflow: hidden;
  border-radius: 6px;
  margin-top: 4px;
  padding: 3px 6px;
  color: var(--text);
  font-size: 0.76rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.day-calendar-event.event-task {
  border-left: 3px solid var(--muted);
  background: #f1f3f5;
}

.day-calendar-event.event-special {
  background: #fff0f3;
  color: var(--accent-dark);
  font-weight: 800;
}

.day-calendar-event.event-travel {
  background: #f2ecff;
  color: #6750a4;
  font-weight: 800;
}

.day-calendar-event.is-done {
  opacity: 0.55;
  text-decoration: line-through;
}

.plan-columns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.plan-column {
  display: grid;
  align-content: start;
  gap: 12px;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-strong);
  padding: 14px;
}

.plan-column h3 {
  margin: 0;
  color: var(--accent-dark);
  font-size: 1rem;
}

.plan-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.plan-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
  padding: 14px;
  box-shadow: var(--card-shadow);
}

.plan-card[draggable="true"] {
  cursor: grab;
}

.plan-card.is-dragging {
  opacity: 0.45;
}

.plan-card.is-drop-target {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(214, 93, 133, 0.18);
}

.plan-card.is-done {
  opacity: 0.68;
}

.plan-card.is-overdue {
  border-color: rgba(177, 77, 91, 0.5);
  box-shadow: 0 10px 24px rgba(177, 77, 91, 0.1);
}

.plan-card-meta,
.plan-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.plan-board-heading-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.plan-filter-field {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  white-space: nowrap;
}

.plan-filter-field select {
  width: auto;
  min-width: 116px;
  padding: 7px 10px;
  font-size: 0.82rem;
}

.plan-card-meta {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
}

.plan-card.is-overdue .plan-card-meta span:nth-child(2) {
  color: var(--danger);
}

.plan-card-progress {
  color: var(--accent-dark);
}

.plan-card-priority {
  border-radius: 999px;
  padding: 3px 8px;
  background: #f1f3f5;
  color: var(--muted);
  font-size: 0.72rem;
}

.plan-card.priority-high .plan-card-priority {
  background: #fff0f3;
  color: var(--danger);
}

.plan-card.priority-medium .plan-card-priority {
  background: #fff7e8;
  color: #a26a00;
}

.plan-card.priority-low .plan-card-priority {
  background: #eef8f5;
  color: #237765;
}

.plan-card-anniversary,
.anniversary-linked-tasks {
  color: var(--accent-dark) !important;
  font-size: 0.86rem;
  font-weight: 800;
}

.plan-card h4 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 1.02rem;
}

.plan-card.is-done h4 {
  text-decoration: line-through;
}

.plan-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
  white-space: pre-wrap;
}

.plan-card-actions button {
  flex: 1;
  min-width: 82px;
}

.plan-card-actions .plan-move-button {
  flex: 0 0 42px;
  min-width: 42px;
  padding-inline: 8px;
  font-size: 1.05rem;
}

.plan-stats {
  margin: 16px 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface-strong);
  padding: 14px;
}

.plan-stats h3 {
  margin: 0;
  color: var(--accent-dark);
  font-size: 1rem;
}

.plan-stats-range {
  display: inline-flex;
  gap: 6px;
}

.plan-stats-range button {
  min-width: 58px;
  padding: 6px 10px;
}

.plan-stats-range button.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.plan-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.plan-stat-card {
  display: grid;
  gap: 3px;
  border-radius: 14px;
  background: var(--surface);
  padding: 12px;
}

.plan-stat-card strong {
  color: var(--ink);
  font-size: 1.5rem;
}

.plan-stat-card span,
.plan-stat-card small {
  color: var(--muted);
}

.subtask-list {
  display: grid;
  gap: 6px;
}

.subtask-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 600;
}

.subtask-item input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.subtask-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.subtask-form button {
  width: auto;
  min-width: 62px;
}

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

.book-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 14px;
  box-shadow: var(--card-shadow);
}

.book-card img,
.book-cover-empty {
  width: 100%;
  aspect-ratio: 3 / 4;
  border: 1px solid var(--line);
  border-radius: 12px;
  object-fit: cover;
  background: var(--surface-strong);
}

.book-cover-empty {
  display: grid;
  place-items: center;
  padding: 16px;
  color: var(--muted);
  text-align: center;
  font-weight: 800;
}

.book-card h3 {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 1.02rem;
}

.book-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.book-rating {
  color: var(--accent-dark);
  font-size: 0.86rem;
  font-weight: 800;
}

.yearbook-panel {
  display: grid;
  gap: 18px;
}

.yearbook-panel .section-heading p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.yearbook-year-field {
  min-width: 132px;
  gap: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.yearbook-year-field select {
  min-height: 44px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--accent-dark);
  font-weight: 900;
}

.yearbook-card-track {
  display: grid;
  gap: 18px;
  width: min(760px, 100%);
  margin: 0 auto;
  scroll-snap-type: y proximity;
}

.yearbook-share-card {
  position: relative;
  display: grid;
  align-content: space-between;
  gap: 20px;
  min-height: min(620px, calc(100vh - 140px));
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(238, 247, 243, 0.86)),
    var(--surface);
  padding: clamp(22px, 5vw, 42px);
  box-shadow: 0 20px 46px -24px rgba(36, 55, 51, 0.36);
  scroll-snap-align: start;
}

.yearbook-hero-card {
  min-height: min(680px, calc(100vh - 120px));
  background:
    linear-gradient(180deg, rgba(36, 55, 51, 0.08), rgba(36, 55, 51, 0.68)),
    linear-gradient(135deg, #3aa18d, #e8b34f);
  background-position: center;
  background-size: cover;
  color: #fff;
}

.yearbook-hero-copy {
  display: grid;
  gap: 12px;
  max-width: 520px;
}

.yearbook-kicker {
  width: fit-content;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--accent-dark);
  padding: 5px 12px;
  font-size: 0.8rem;
  font-weight: 900;
}

.yearbook-hero-card .yearbook-kicker {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  backdrop-filter: blur(8px);
}

.yearbook-share-card h2 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.7rem, 7vw, 3.6rem);
  line-height: 1.04;
}

.yearbook-hero-card h2 {
  color: #fff;
}

.yearbook-share-card p {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.7;
}

.yearbook-hero-card p {
  color: rgba(255, 255, 255, 0.9);
  font-weight: 800;
}

.yearbook-days-badge {
  display: grid;
  gap: 6px;
  width: fit-content;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.18);
  padding: 16px 18px;
  backdrop-filter: blur(10px);
}

.yearbook-days-badge span {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 800;
}

.yearbook-days-badge strong {
  color: #fff;
  font-size: clamp(2rem, 8vw, 4rem);
  line-height: 1;
}

.yearbook-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.yearbook-metric {
  display: grid;
  gap: 8px;
  min-height: 136px;
  border: 1px solid rgba(212, 231, 224, 0.9);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.76);
  padding: 16px;
}

.yearbook-metric span,
.yearbook-metric small {
  color: var(--muted);
  font-weight: 800;
}

.yearbook-metric strong {
  color: var(--accent-dark);
  font-size: clamp(1.45rem, 5vw, 2.4rem);
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.yearbook-city-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.yearbook-city-chips span {
  border: 1px solid var(--accent-soft);
  border-radius: 999px;
  background: #fff;
  color: var(--accent-dark);
  padding: 8px 12px;
  font-weight: 900;
}

.yearbook-place-list,
.yearbook-moment-list,
.yearbook-category-bars {
  display: grid;
  gap: 10px;
}

.yearbook-place-row,
.yearbook-moment-row {
  display: grid;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  padding: 13px 14px;
}

.yearbook-place-row {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.yearbook-place-row strong,
.yearbook-moment-row strong {
  overflow-wrap: anywhere;
}

.yearbook-place-row span,
.yearbook-moment-row span,
.yearbook-moment-row small {
  color: var(--muted);
  font-weight: 800;
}

.yearbook-photo-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.yearbook-photo-strip img {
  width: 100%;
  aspect-ratio: 1;
  border-radius: 8px;
  object-fit: cover;
  background: var(--surface-strong);
}

.yearbook-category-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 32px;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.yearbook-category-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(212, 231, 224, 0.7);
}

.yearbook-category-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), #e8b34f);
}

.dinner-panel {
  display: grid;
  gap: 20px;
}

.dinner-panel .section-heading p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.dinner-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: 18px;
  align-items: start;
}

.dinner-wheel-card {
  display: grid;
  gap: 18px;
}

.dinner-wheel {
  position: relative;
  display: grid;
  place-items: center;
  width: min(260px, 72vw);
  aspect-ratio: 1;
  margin: 0 auto;
  border: 10px solid rgba(255, 255, 255, 0.82);
  border-radius: 50%;
  background:
    conic-gradient(
      #d4efe8 0deg 120deg,
      #ffe6a8 120deg 240deg,
      #f8c5cf 240deg 360deg
    );
  box-shadow: 0 22px 58px -30px rgba(36, 55, 51, 0.42);
}

.dinner-wheel::after {
  content: "";
  position: absolute;
  top: -18px;
  width: 0;
  height: 0;
  border-left: 12px solid transparent;
  border-right: 12px solid transparent;
  border-bottom: 22px solid var(--accent-dark);
}

.dinner-wheel span {
  position: absolute;
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.84);
  color: var(--ink);
  font-weight: 900;
  box-shadow: var(--soft-shadow);
}

.dinner-wheel span:nth-child(1) {
  transform: translateY(-72px);
}

.dinner-wheel span:nth-child(2) {
  transform: translate(-62px, 42px);
}

.dinner-wheel span:nth-child(3) {
  transform: translate(62px, 42px);
}

.dinner-wheel.is-spinning {
  animation: dinner-spin 680ms cubic-bezier(0.22, 0.8, 0.25, 1);
}

.dinner-result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.dinner-result-grid.is-special {
  grid-template-columns: 1fr;
}

.dinner-result-grid.is-special .type-soup,
.dinner-result-grid.is-special .type-vegetable,
.dinner-result-grid.is-special .type-meat {
  display: none;
}

.dinner-result-card {
  min-height: 148px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 18px;
  box-shadow: var(--card-shadow);
}

.dinner-result-card.type-soup {
  background: #eef7f3;
}

.dinner-result-card.type-vegetable {
  background: #f5f8e8;
}

.dinner-result-card.type-meat {
  background: #fff1f4;
}

.dinner-result-card.type-special {
  min-height: 190px;
  background:
    linear-gradient(135deg, rgba(255, 230, 168, 0.68), rgba(255, 241, 244, 0.88)),
    var(--surface);
}

.dinner-result-card span {
  display: block;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 800;
}

.dinner-result-card strong {
  display: block;
  color: var(--ink);
  font-size: clamp(1.35rem, 3vw, 2.1rem);
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.dinner-menu-form {
  display: grid;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 18px;
  box-shadow: var(--card-shadow);
}

.dinner-menu-form textarea {
  min-height: 128px;
}

.simple-list,
.manage-list {
  display: grid;
  gap: 12px;
}

.simple-item,
.manage-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 14px 16px;
  box-shadow: var(--card-shadow);
}

.simple-item h3,
.manage-item h3 {
  margin: 0 0 4px;
  overflow-wrap: anywhere;
  font-size: 1rem;
}

.simple-item p,
.manage-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
}

.simple-item-actions,
.manage-item-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.simple-item button,
.manage-item button {
  min-width: 72px;
}

.easter-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  padding: clamp(18px, 4vw, 30px);
  box-shadow: var(--shadow);
}

.easter-panel p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.8;
}

.easter-screen {
  --easter-bg: #f8f3ff;
  --easter-surface: #ffffff;
  --easter-soft: #efe2ff;
  --easter-line: #d9c4f2;
  --easter-ink: #2d2140;
  --easter-muted: #7c6a94;
  --easter-accent: #8f5ad8;
  --easter-accent-dark: #62309a;
  --easter-shadow: 0 18px 42px -26px rgba(98, 48, 154, 0.44);
  background:
    radial-gradient(circle at 12% 16%, rgba(197, 167, 255, 0.38), transparent 38%),
    radial-gradient(circle at 88% 78%, rgba(224, 185, 255, 0.34), transparent 40%),
    linear-gradient(160deg, #fbf8ff 0%, #f4ecff 58%, #eadcff 100%);
  color: var(--easter-ink);
}

.easter-shell {
  width: min(1180px, calc(100% - 32px));
  position: relative;
  isolation: isolate;
}

.easter-entry-veil {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: grid;
  place-items: center;
  pointer-events: none;
  background:
    radial-gradient(circle at center, rgba(255, 255, 255, 0.9), transparent 34%),
    radial-gradient(circle at 50% 45%, rgba(143, 90, 216, 0.3), transparent 44%),
    rgba(45, 33, 64, 0.22);
  opacity: 0;
  backdrop-filter: blur(8px);
}

.easter-entry-card {
  display: grid;
  min-width: min(320px, calc(100vw - 44px));
  justify-items: center;
  gap: 12px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 28px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(239, 226, 255, 0.94));
  padding: 34px 36px;
  color: var(--easter-accent-dark);
  box-shadow: 0 28px 72px -28px rgba(67, 31, 110, 0.58);
  opacity: 0;
  transform: translateY(18px) scale(0.92);
}

.easter-entry-seal {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #7a3dc2, #d49dff);
  color: #ffffff;
  font-size: 1.6rem;
  box-shadow: 0 14px 36px -16px rgba(98, 48, 154, 0.78);
}

.easter-entry-line {
  width: 130px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(98, 48, 154, 0.48), transparent);
}

.easter-entry-card strong {
  font-size: 1.15rem;
  letter-spacing: 0.08em;
}

.easter-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 22px;
  overflow: hidden;
  border: 1px solid rgba(217, 196, 242, 0.86);
  border-radius: 32px;
  background:
    radial-gradient(circle at 12% 22%, rgba(255, 255, 255, 0.92), transparent 30%),
    radial-gradient(circle at 82% 18%, rgba(218, 169, 255, 0.52), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(239, 226, 255, 0.82));
  padding: clamp(22px, 4vw, 34px);
  box-shadow: var(--easter-shadow);
}

.easter-hero::before,
.easter-hero::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
}

.easter-hero::before {
  right: 116px;
  bottom: -90px;
  width: 220px;
  height: 220px;
  background: rgba(143, 90, 216, 0.16);
}

.easter-hero::after {
  top: 24px;
  right: 36%;
  width: 9px;
  height: 9px;
  background: #ffffff;
  box-shadow:
    34px 24px 0 rgba(255, 255, 255, 0.8),
    72px -8px 0 rgba(143, 90, 216, 0.38),
    110px 30px 0 rgba(255, 255, 255, 0.72);
}

.easter-hero-copy,
.easter-hero-actions,
.easter-hero-seal {
  position: relative;
  z-index: 1;
}

.easter-hero-copy {
  display: grid;
  gap: 8px;
}

.easter-hero-kicker {
  margin: 0;
  color: var(--easter-accent-dark);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.easter-hero h1 {
  margin: 0;
  color: var(--easter-ink);
  font-size: clamp(2.2rem, 6vw, 4.8rem);
  line-height: 0.98;
  letter-spacing: -0.06em;
}

.easter-hero-copy p:last-child {
  max-width: 32em;
  margin: 0;
  color: var(--easter-muted);
  font-size: 1rem;
  line-height: 1.8;
}

.easter-hero-seal {
  display: grid;
  width: clamp(82px, 10vw, 112px);
  height: clamp(82px, 10vw, 112px);
  place-items: center;
}

.easter-seal-ring,
.easter-seal-heart {
  grid-area: 1 / 1;
  border-radius: 50%;
}

.easter-seal-ring {
  width: 100%;
  height: 100%;
  border: 1px solid rgba(98, 48, 154, 0.22);
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.78) 0 42%, transparent 43%),
    conic-gradient(from 16deg, #7a3dc2, #d49dff, #8f5ad8, #7a3dc2);
  box-shadow: 0 18px 44px -24px rgba(98, 48, 154, 0.72);
}

.easter-seal-heart {
  display: grid;
  width: 54%;
  height: 54%;
  place-items: center;
  background: #ffffff;
  color: var(--easter-accent-dark);
  font-size: clamp(1.3rem, 3vw, 1.9rem);
}

.easter-hero-actions {
  justify-content: flex-end;
}

.easter-screen.easter-entering .easter-entry-veil {
  animation: easter-veil 1.45s ease both;
}

.easter-screen.easter-entering .easter-entry-card {
  animation: easter-card-unlock 1.15s cubic-bezier(0.2, 0.88, 0.24, 1) both;
}

.easter-screen.easter-entering .easter-hero {
  animation: easter-hero-rise 0.95s cubic-bezier(0.18, 0.84, 0.24, 1) both;
}

.easter-screen.easter-entering .easter-layout {
  animation: easter-layout-reveal 0.95s ease 0.16s both;
}

.easter-screen .section-heading span {
  color: var(--easter-accent-dark);
}

.easter-layout {
  display: grid;
  grid-template-columns: minmax(260px, 340px) minmax(0, 1fr);
  align-items: start;
  gap: 24px;
}

.easter-list-panel,
.easter-letter-form,
.easter-preview-panel {
  border: 1px solid var(--easter-line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.88);
  box-shadow: var(--easter-shadow);
}

.easter-list-panel,
.easter-letter-form,
.easter-preview-panel {
  padding: 20px;
}

.easter-letter-list {
  display: grid;
  gap: 12px;
}

.easter-letter-item {
  width: 100%;
  min-height: auto;
  border-color: var(--easter-line);
  border-radius: 18px;
  background: var(--easter-surface);
  padding: 14px 16px;
  color: var(--easter-ink);
  text-align: left;
  box-shadow: none;
}

.easter-letter-item:hover,
.easter-letter-item.active {
  border-color: var(--easter-accent);
  background: var(--easter-soft);
  transform: translateY(-1px);
}

.easter-letter-item strong {
  display: block;
  margin-bottom: 6px;
  overflow-wrap: anywhere;
}

.easter-letter-item span {
  display: block;
  color: var(--easter-muted);
  font-size: 0.84rem;
  line-height: 1.5;
}

.easter-editor-panel {
  display: grid;
  min-width: 0;
  gap: 20px;
}

.easter-letter-form {
  display: grid;
  gap: 16px;
}

.easter-letter-form.hidden {
  display: none;
}

.easter-read-heading {
  align-items: start;
}

.easter-read-heading > div {
  display: grid;
  gap: 6px;
}

.easter-read-heading h2 {
  margin: 0;
  color: var(--easter-accent-dark);
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.easter-letter-form input,
.easter-letter-form textarea {
  border-color: var(--easter-line);
}

.easter-letter-form textarea {
  min-height: 300px;
  resize: vertical;
  line-height: 1.8;
}

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

.easter-screen .primary {
  border-color: var(--easter-accent-dark);
  background: var(--easter-accent);
}

.easter-screen .ghost:hover {
  background: var(--easter-soft);
}

.easter-preview {
  min-height: 360px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(251, 248, 255, 0.94));
  padding: clamp(18px, 3vw, 28px);
  color: var(--easter-ink);
  line-height: 1.85;
  overflow-wrap: anywhere;
}

.easter-read-actions {
  margin-top: 18px;
}

.easter-preview h1,
.easter-preview h2,
.easter-preview h3 {
  margin: 1.1em 0 0.45em;
  color: var(--easter-accent-dark);
  line-height: 1.35;
}

.easter-preview p,
.easter-preview blockquote,
.easter-preview ul,
.easter-preview ol {
  margin: 0 0 1em;
}

.easter-preview blockquote {
  border-left: 4px solid var(--easter-accent);
  border-radius: 8px;
  background: var(--easter-soft);
  padding: 10px 14px;
  color: var(--easter-muted);
}

.easter-preview ul,
.easter-preview ol {
  padding-left: 1.4em;
}

@keyframes easter-veil {
  0% {
    opacity: 0;
  }
  14%,
  62% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

@keyframes easter-card-unlock {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.9);
  }
  22% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  54% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateY(-18px) scale(1.04);
  }
}

@keyframes easter-hero-rise {
  0% {
    opacity: 0;
    transform: translateY(28px) scale(0.98);
    filter: blur(8px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes easter-layout-reveal {
  0% {
    opacity: 0;
    transform: translateY(18px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .easter-screen.easter-entering .easter-entry-veil,
  .easter-screen.easter-entering .easter-entry-card,
  .easter-screen.easter-entering .easter-hero,
  .easter-screen.easter-entering .easter-layout {
    animation: none;
  }
}

.moment-form,
.timeline {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--card-shadow);
}

.moment-form {
  display: grid;
  gap: 16px;
  padding: 20px;
}

.timeline {
  position: relative;
  min-height: 320px;
  overflow: hidden;
  padding: clamp(18px, 3vw, 30px);
}

.timeline::before {
  position: absolute;
  z-index: 0;
  top: 88px;
  bottom: 36px;
  left: clamp(34px, 5vw, 62px);
  border-left: 2px dashed var(--accent);
  opacity: 0.5;
  pointer-events: none;
  content: "";
}

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

.timeline .section-heading {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 100%;
  margin-bottom: 14px;
  color: var(--accent-dark);
  font-size: 1.1rem;
  font-weight: 800;
}

.timeline-heading-copy {
  display: flex;
  align-items: baseline;
  gap: 12px;
}

.timeline-heading-copy h2 {
  margin: 0;
}

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

.timeline-sort button {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  padding: 0 14px;
  color: var(--muted);
  font-weight: 800;
}

.timeline-sort button.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #ffffff;
}

.section-heading span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

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

.image-preview {
  display: grid;
  grid-template-columns: 112px 1fr;
  align-items: center;
  gap: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  padding: 10px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.image-preview img {
  width: 112px;
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  object-fit: cover;
  transform-origin: center;
  background: #fff;
}

.home-live-preview {
  position: relative;
  aspect-ratio: 16 / 10;
  min-height: 280px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #1f2723;
  color: #fff;
  cursor: grab;
  touch-action: none;
}

.home-live-preview.dragging {
  cursor: grabbing;
}

.home-live-preview::after {
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(18, 25, 22, 0.72),
    rgba(18, 25, 22, 0.28)
  );
  content: "";
}

.home-live-copy {
  position: relative;
  z-index: 2;
  display: grid;
  align-content: center;
  height: 100%;
  min-height: 280px;
  max-width: 520px;
  padding: 26px;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.22);
}

.home-live-copy .eyebrow {
  color: #ffd7df;
}

.home-live-copy h3 {
  margin-bottom: 12px;
  font-size: clamp(2rem, 7vw, 4rem);
  line-height: 1;
}

.home-live-copy p:not(.eyebrow) {
  margin-bottom: 18px;
  color: rgba(255, 255, 255, 0.9);
  line-height: 1.7;
}

.home-live-copy strong {
  width: fit-content;
  border-left: 4px solid #ffd7df;
  padding-left: 14px;
  font-size: 2rem;
  line-height: 1;
}

.image-adjuster {
  display: grid;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-strong);
  padding: 12px;
}

.image-adjuster h3 {
  margin-bottom: 0;
  color: var(--text);
  font-size: 0.98rem;
}

.image-adjuster label {
  gap: 6px;
}

.image-adjuster input[type="range"] {
  padding: 0;
}

.primary {
  width: 100%;
}

.upload-progress {
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border: 1.5px solid var(--accent-soft);
  border-radius: var(--radius-md);
  background: rgba(234, 246, 241, 0.78);
}

.upload-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 800;
}

.upload-progress-head strong {
  color: var(--accent-dark);
}

.upload-progress-track {
  overflow: hidden;
  height: 10px;
  border-radius: 999px;
  background: rgba(77, 182, 164, 0.18);
}

.upload-progress-bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), var(--green));
  transition: width 160ms ease;
}

.ghost,
.danger {
  min-height: 38px;
  border: 1.5px solid var(--line);
  background: var(--surface);
  color: var(--text);
}

.ghost:hover {
  background: var(--accent-soft);
}

.danger {
  color: var(--danger);
}

.danger:hover {
  border-color: var(--danger);
  background: #fbe9ec;
}

.hidden {
  display: none !important;
}

.form-message {
  min-height: 20px;
  margin: 0;
  color: var(--green);
  font-size: 0.92rem;
}

.form-message.error {
  color: var(--danger);
}

.moment-list {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 20px;
  padding: 18px 0 8px clamp(50px, 7vw, 84px);
}

.moment-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(140px, 190px) minmax(0, 1fr);
  gap: 16px;
  min-height: 178px;
  overflow: visible;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  padding: 14px;
  cursor: pointer;
  box-shadow: var(--card-shadow);
  transition:
    box-shadow 160ms ease,
    transform 160ms ease,
    border-color 160ms ease;
}

.moment-card:hover,
.moment-card:focus-visible {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  outline: none;
  transform: translateY(-4px);
}

.moment-media {
  aspect-ratio: 4 / 3;
  width: 100%;
  height: auto;
  min-height: 136px;
  align-self: start;
  border: 1px solid var(--line);
  border-radius: 12px;
  background:
    linear-gradient(135deg, var(--accent-soft), var(--paper-warm)),
    var(--surface-strong);
  background-position: center;
  background-size: cover;
}

.moment-media.has-video {
  display: grid;
  grid-auto-flow: column;
  gap: 8px;
  place-items: center;
  place-content: center;
  color: var(--accent-dark);
  font-size: 1.05rem;
  font-weight: 900;
}

.moment-media.has-video::before {
  width: 44px;
  height: 44px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  content: "▶";
  display: inline-grid;
  place-items: center;
  font-size: 1rem;
}

.moment-body {
  position: relative;
  min-width: 0;
  padding: 8px 4px 10px;
}

.moment-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 700;
}

.moment-meta time {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  padding: 4px 12px;
}

.tag {
  border: 1px solid var(--accent-soft);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  padding: 4px 12px;
}

.moment-body h3 {
  position: relative;
  margin-bottom: 8px;
  color: var(--ink);
  font-size: clamp(1.12rem, 2vw, 1.4rem);
}

.location,
.note {
  color: var(--muted);
  line-height: 1.7;
}

.location {
  margin-bottom: 8px;
  font-weight: 700;
}

.note {
  white-space: pre-wrap;
}

.photo-wall {
  display: grid;
  gap: 22px;
}

.photo-category-list {
  display: grid;
  gap: 26px;
}

.photo-category {
  display: grid;
  gap: 12px;
}

.photo-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}

.photo-category-header h3 {
  margin-bottom: 0;
}

.photo-category-header span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}

.photo-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface);
  cursor: pointer;
  box-shadow: var(--card-shadow);
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.photo-card:hover,
.photo-card:focus-visible {
  border-color: var(--accent);
  box-shadow: var(--shadow);
  outline: none;
  transform: translateY(-4px);
}

.photo-card img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--surface-strong);
}

.photo-card-caption {
  display: grid;
  gap: 6px;
  min-height: 98px;
  padding: 12px;
}

.photo-card-caption h4 {
  margin: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 0.98rem;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.photo-card-caption p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.detail-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.detail-image {
  display: block;
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
  background: var(--surface-strong);
}

.detail-content {
  padding: clamp(18px, 4vw, 32px);
}

.detail-note {
  margin-bottom: 0;
  color: var(--text);
  font-size: 1.04rem;
  line-height: 1.9;
  white-space: pre-wrap;
}

.empty-state {
  display: grid;
  min-height: 320px;
  place-items: center;
  border: 2px dashed var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.6);
  color: var(--muted);
  text-align: center;
}

.discovery-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: clamp(18px, 3vw, 28px);
  box-shadow: var(--card-shadow);
}

.discovery-panel .section-heading p {
  margin: 6px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.discovery-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.discovery-manual-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
}

.discovery-form input {
  min-height: 48px;
}

.discovery-manual-form input {
  min-height: 44px;
}

.discovery-form .primary {
  width: auto;
  min-width: 108px;
  padding-inline: 22px;
}

.discovery-manual-form .ghost {
  width: auto;
  min-width: 118px;
  padding-inline: 18px;
}

.discovery-results {
  display: grid;
  gap: 12px;
}

.discovery-results .empty-state {
  min-height: 150px;
}

.discovery-card {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  padding: 16px;
}

.discovery-card h3 {
  margin: 0;
  color: var(--text);
  line-height: 1.45;
}

.discovery-account,
.discovery-snippet {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.discovery-actions,
.discovery-manual-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.discovery-actions .primary,
.discovery-actions .ghost {
  width: auto;
  min-height: 38px;
  padding: 0 14px;
}

.discovery-action-hint {
  align-self: center;
  color: var(--muted);
  font-size: 0.86rem;
}

.discovery-meta {
  display: grid;
  gap: 8px;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.64);
  padding: 12px;
  color: var(--muted);
  font-size: 0.88rem;
}

.discovery-meta span {
  display: block;
}

.discovery-manual-links a {
  color: var(--accent-dark);
  text-decoration: none;
}

.discovery-manual-links a:hover {
  text-decoration: underline;
}

.report-layout {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}

.report-index,
.report-detail {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--card-shadow);
}

.report-index {
  position: sticky;
  top: 18px;
  padding: 18px;
}

.report-filters {
  display: flex;
  gap: 8px;
  margin: 14px 0;
}

.report-filters button {
  min-height: 36px;
  padding: 0 14px;
  box-shadow: none;
}

.report-filters button.active,
.report-list-item.active {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.report-list {
  display: grid;
  gap: 10px;
  max-height: calc(100vh - 250px);
  overflow-y: auto;
}

.report-list-item {
  display: grid;
  gap: 6px;
  min-height: 0;
  border-radius: var(--radius-md);
  padding: 13px;
  text-align: left;
  box-shadow: none;
}

.report-list-item strong {
  line-height: 1.45;
}

.report-list-item small,
.report-list-meta,
.report-list-empty {
  color: var(--muted);
  font-size: 0.82rem;
}

.report-list-empty {
  padding: 24px 8px;
  text-align: center;
}

.report-detail {
  min-height: 520px;
  padding: clamp(20px, 4vw, 38px);
}

.report-detail-header {
  padding-bottom: 22px;
  border-bottom: 1px solid var(--line);
}

.report-detail-header h1 {
  margin: 14px 0 10px;
  font-size: clamp(1.8rem, 5vw, 3rem);
  line-height: 1.15;
}

.report-detail-header p,
.report-analysis p,
.report-overview p {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.8;
}

.report-overview {
  margin: 24px 0;
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  padding: 20px;
}

.report-overview h2,
.report-block h2 {
  margin-bottom: 12px;
  color: var(--accent-dark);
}

.report-block {
  margin-top: 28px;
}

.report-block ul,
.report-block ol {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 22px;
  line-height: 1.7;
}

.report-list-rationale {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.report-analysis {
  margin-top: 12px;
  border-left: 3px solid var(--accent-soft);
  padding: 6px 0 8px 16px;
}

.report-analysis h3 {
  margin-bottom: 6px;
}

.report-inline-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.report-inline-sources a,
.report-sources a {
  color: var(--accent-dark);
  text-decoration: none;
}

.report-inline-sources a {
  border-radius: 999px;
  background: var(--accent-soft);
  padding: 5px 10px;
  font-size: 0.82rem;
}

.report-inline-sources a:hover,
.report-sources a:hover {
  text-decoration: underline;
}

@media (max-width: 760px) {
  .discovery-form,
  .discovery-manual-form {
    grid-template-columns: 1fr;
  }

  .discovery-form .primary,
  .discovery-manual-form .ghost {
    width: 100%;
  }

  .report-layout {
    grid-template-columns: 1fr;
  }

  .report-index {
    position: static;
  }

  .report-list {
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    max-height: none;
  }
}

/* 多图缩略图列表 */
.image-thumbs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
}
.image-thumbs:empty {
  display: none;
}
.image-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-strong);
}
.image-thumb img,
.image-thumb video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.video-thumb-badge {
  position: absolute;
  left: 4px;
  bottom: 4px;
  border-radius: 999px;
  background: rgba(36, 55, 51, 0.72);
  color: #fff;
  padding: 2px 7px;
  font-size: 0.7rem;
  font-weight: 700;
}
.image-thumb-index {
  position: absolute;
  top: 4px;
  left: 4px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(36, 55, 51, 0.72);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  display: grid;
  place-items: center;
}
.image-thumb-actions {
  position: absolute;
  right: 4px;
  bottom: 4px;
  display: flex;
  gap: 4px;
}
.image-thumb-btn {
  min-height: 26px;
  min-width: 26px;
  padding: 0 6px;
  font-size: 0.8rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: none;
}

/* 地图选点 */
.location-picker {
  display: grid;
  gap: 10px;
}
.location-picker-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.location-picker-title {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}
.location-row {
  display: flex;
  gap: 8px;
}
.location-row input {
  width: auto;
  min-width: 200px;
}
.location-map {
  height: 280px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  z-index: 0;
}

/* 详情页 Swiper */
.detail-swiper {
  width: 100%;
}
.detail-swiper .swiper-slide {
  background: var(--surface-strong);
}
.detail-slide {
  position: relative;
}
.detail-slide img,
.detail-slide video {
  display: block;
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
}

.detail-slide video {
  background: #000;
}
.detail-download-link {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  padding-inline: 16px;
  text-decoration: none;
}
.detail-swiper .swiper-button-next,
.detail-swiper .swiper-button-prev {
  color: var(--accent-dark);
}
.detail-swiper .swiper-pagination-bullet-active {
  background: var(--accent);
}

/* 足迹地图 */
.map-screen {
  min-height: 100vh;
  background: transparent;
}
.footprint-map {
  height: min(72vh, 640px);
  width: 100%;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--card-shadow);
  z-index: 0;
}
.footprint-popup {
  display: grid;
  gap: 4px;
  min-width: 160px;
}
.footprint-popup-img {
  width: 100%;
  max-height: 120px;
  object-fit: cover;
  border-radius: 8px;
}
.footprint-popup strong {
  color: var(--ink);
}
.footprint-popup span {
  color: var(--muted);
  font-size: 0.82rem;
}

.character-stage {
  --character-x: 0px;
  --character-y: 0px;
  --character-scale: 1;
  position: fixed;
  right: clamp(14px, 4vw, 42px);
  bottom: 14px;
  z-index: 30;
  display: grid;
  justify-items: center;
  pointer-events: none;
  transform: translate3d(var(--character-x), var(--character-y), 0)
    scale(var(--character-scale));
  transition:
    right 180ms ease,
    bottom 180ms ease,
    transform 180ms ease;
}

.character-stage.is-dragging {
  transition: none;
}

body[data-view="home"] .character-stage,
body[data-view="timeline"] .character-stage {
  --character-scale: 1.12;
  right: clamp(18px, 5vw, 72px);
  bottom: clamp(12px, 4vw, 34px);
  transform-origin: 100% 100%;
}

.character-bubble {
  position: relative;
  max-width: min(260px, calc(100vw - 28px));
  margin-bottom: 8px;
  border: var(--sketch-border);
  border-radius: 14px 18px 18px 10px;
  background: rgba(255, 253, 246, 0.96);
  color: var(--text);
  padding: 10px 12px;
  box-shadow: none;
  font-size: 0.9rem;
  line-height: 1.55;
  text-align: center;
}

.character-bubble::after {
  position: absolute;
  right: 38px;
  bottom: -8px;
  width: 14px;
  height: 14px;
  border-right: var(--sketch-border);
  border-bottom: var(--sketch-border);
  background: rgba(255, 253, 246, 0.96);
  content: "";
  transform: rotate(45deg);
}

.character-pair {
  position: relative;
  width: 260px;
  height: 180px;
  min-height: 180px;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  overflow: visible;
  pointer-events: auto;
  cursor: grab;
  touch-action: none;
}

.character-stage.is-dragging .character-pair {
  cursor: grabbing;
}

.character-pair:hover,
.character-pair:focus-visible {
  background: transparent;
  outline: none;
}

.character-pair:focus-visible {
  filter: drop-shadow(0 0 0.35rem rgba(190, 52, 85, 0.5));
}

.mini-person {
  position: absolute;
  bottom: 0;
  width: 108px;
  height: 162px;
  transform-origin: 50% 100%;
}

.person-left {
  left: 24px;
  z-index: 1;
}

.person-right {
  right: 24px;
  z-index: 2;
}

.person-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: bottom center;
  filter: drop-shadow(0 10px 10px rgba(31, 39, 35, 0.14));
  pointer-events: none;
  transform-origin: 50% 100%;
  user-select: none;
  -webkit-user-drag: none;
}

.character-stage[data-action="idle"] .person-image,
.character-stage[data-action="wave"] .person-image {
  animation: image-breathe 2.8s ease-in-out infinite;
}

.character-stage[data-action="walk"] .person-left .person-image {
  animation: image-step-left 0.8s ease-in-out infinite;
}

.character-stage[data-action="walk"] .person-right .person-image {
  animation: image-step-right 0.8s ease-in-out infinite;
}

.character-stage[data-action="photo"] .person-image {
  animation: image-breathe 2.4s ease-in-out infinite;
}

.character-stage[data-action="heart"] .person-image {
  animation: image-heart-pulse 1.6s ease-in-out infinite;
}

.character-stage[data-action="gift"] .person-image {
  animation: image-gift-lift 1.5s ease-in-out infinite;
}

.character-stage[data-action="hug"] .person-left {
  transform: translateX(8px);
}

.character-stage[data-action="hug"] .person-right {
  transform: translateX(-8px);
}

.character-stage[data-action="hug"] .person-image {
  animation: image-hug-sway 1.7s ease-in-out infinite;
}

@keyframes image-breathe {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-2px) scale(1.015);
  }
}

@keyframes image-step-left {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

@keyframes image-step-right {
  0%,
  100% {
    transform: translateY(-4px);
  }
  50% {
    transform: translateY(0);
  }
}

@keyframes image-heart-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.045);
  }
}

@keyframes image-gift-lift {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-5px);
  }
}

@keyframes image-hug-sway {
  0%,
  100% {
    transform: rotate(-1deg);
  }
  50% {
    transform: rotate(1deg);
  }
}

@keyframes doodle-float {
  0%,
  100% {
    transform: translateY(0) rotate(var(--float-rotate, 0deg));
  }
  50% {
    transform: translateY(-8px) rotate(var(--float-rotate, 0deg));
  }
}

@keyframes dinner-spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(720deg);
  }
}

@media (max-width: 860px) {
  .home-screen {
    padding-bottom: clamp(120px, 18vw, 170px);
  }

  .daydayup-shell {
    grid-template-columns: 1fr;
  }

  .daydayup-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .daydayup-main {
    padding: 18px;
  }

  .daydayup-main-picker {
    justify-content: flex-start;
    margin: 18px 0 22px;
  }

  .topbar,
  .workspace,
  .content-workspace,
  .whispers-layout,
  .dinner-layout,
  .easter-layout,
  .plans-layout {
    grid-template-columns: 1fr;
  }

  .topbar {
    display: grid;
    align-items: stretch;
  }

  .easter-hero {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .easter-hero-seal {
    position: absolute;
    top: 18px;
    right: 18px;
    width: 76px;
    height: 76px;
    opacity: 0.78;
  }

  .easter-hero-actions {
    justify-content: flex-start;
  }

  #appContent > .topbar {
    min-height: auto;
    padding-inline: 4px;
  }

  #appContent > .topbar::after {
    display: none;
  }

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

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

  .special-day-grid {
    grid-template-columns: 1fr 1fr;
  }

  .metric.wide {
    grid-column: span 2;
  }

  .moment-form {
    position: static;
  }

  body[data-view="home"] .character-stage,
  body[data-view="timeline"] .character-stage {
    --character-scale: 0.9;
  }
}

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

@media (max-width: 620px) {
  .home-screen {
    padding: 24px 14px clamp(120px, 22vw, 160px);
  }

  .home-copy h1 {
    font-size: clamp(2.4rem, 18vw, 4.8rem);
  }

  .weather-panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .weather-grid,
  .weather-days {
    grid-template-columns: 1fr;
  }

  .app-shell {
    width: min(100% - 20px, 1180px);
    padding-top: 14px;
  }

  .summary-grid,
  .form-row,
  .inline-fields,
  .image-preview,
  .photo-grid,
  .yearbook-metric-grid,
  .yearbook-photo-strip,
  .plan-columns {
    grid-template-columns: 1fr;
  }

  .yearbook-share-card {
    min-height: auto;
    padding: 20px;
  }

  .yearbook-category-row {
    grid-template-columns: 56px minmax(0, 1fr) 28px;
  }

  .day-calendar {
    gap: 4px;
  }

  .day-calendar-cell {
    min-height: 92px;
    padding: 5px;
  }

  .day-calendar-head {
    flex-wrap: wrap;
    gap: 4px;
  }

  .day-calendar-head strong {
    font-size: 0.95rem;
  }

  .today-badge,
  .holiday-badge {
    font-size: 0.6rem;
  }

  .today-badge {
    min-width: 0;
    height: 18px;
    padding: 0 5px;
  }

  .day-calendar-event {
    padding-inline: 4px;
    font-size: 0.68rem;
  }

  .subtask-form,
  .simple-item,
  .manage-item {
    grid-template-columns: 1fr;
  }

  .simple-item-actions,
  .manage-item-actions {
    justify-content: flex-start;
  }

  .metric.wide {
    grid-column: auto;
  }

  .moment-media {
    width: 100%;
    height: 190px;
    min-height: 190px;
  }

  .moment-list {
    padding-left: 34px;
  }

  .timeline {
    padding: 16px;
  }

  .timeline .section-heading {
    align-items: flex-start;
  }

  .timeline-heading-copy,
  .timeline-sort {
    width: 100%;
  }

  .timeline-sort button {
    flex: 1;
  }

  .timeline::before {
    left: 24px;
  }

  .moment-card {
    grid-template-columns: 1fr;
    gap: 12px;
    min-height: 0;
  }

  .moment-card::before {
    left: -32px;
  }

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

  .special-day-grid,
  .anniversary-item {
    grid-template-columns: 1fr;
  }

  .anniversary-item-countdown {
    white-space: normal;
  }

  .anniversary-item-actions button {
    flex: 1;
  }

  .easter-editor-actions button {
    flex: 1;
  }

  .easter-hero-actions button {
    flex: 1;
  }

  .whisper-list {
    grid-template-columns: 1fr;
  }

  .whisper-note.tilt-0,
  .whisper-note.tilt-1,
  .whisper-note.tilt-2 {
    --note-rotate: 0deg;
  }

  .character-stage {
    --character-scale: 0.78;
    right: 6px;
    bottom: 8px;
    transform-origin: 100% 100%;
  }

  body[data-view="home"] .character-stage,
  body[data-view="timeline"] .character-stage {
    --character-scale: 0.72;
    right: 4px;
    bottom: 6px;
  }

  .character-pair {
    width: 260px;
    height: 180px;
    min-height: 180px;
  }

  .character-bubble {
    max-width: min(230px, calc(100vw - 20px));
  }

  .doodle-heart,
  .doodle-bone,
  .doodle-flower,
  .route-bone,
  .route-star {
    display: none;
  }

  #appContent::before {
    inset-inline: -6px;
  }
}

/* 备份区 */
.backup-section {
  margin-top: 20px;
}
.backup-hint {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.6;
}
.backup-subtitle {
  margin: 16px 0 8px;
  color: var(--ink);
  font-size: 1rem;
}
.backup-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.storage-section {
  margin-top: 20px;
}
.storage-card {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.storage-card div {
  border: 1px solid rgba(71, 174, 148, 0.22);
  border-radius: 18px;
  padding: 14px 16px;
  background: rgba(255, 255, 255, 0.78);
}
.storage-card span {
  display: block;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 0.85rem;
}
.storage-card strong {
  color: var(--ink);
  font-size: 1.05rem;
}
.storage-section.is-warn .storage-card div {
  border-color: rgba(245, 158, 11, 0.36);
}
.storage-section.is-blocked .storage-card div {
  border-color: rgba(239, 68, 68, 0.36);
}
@media (max-width: 640px) {
  .storage-card {
    grid-template-columns: 1fr;
  }
}

/* 那年今天 */
.memory-today {
  margin: 4px 0 18px;
  padding: 18px 20px;
  background: var(--surface-strong);
  border: var(--panel-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--soft-shadow);
}
.memory-today-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
}
.memory-today-head h2 {
  margin: 0;
  font-size: 1.15rem;
}
.memory-today-head span {
  color: var(--muted);
  font-size: 0.88rem;
}
.memory-today-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}
.memory-today-card {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: var(--surface);
  border: var(--sketch-border);
  border-radius: var(--radius-md);
  box-shadow: var(--card-shadow);
  cursor: pointer;
  transition: transform 0.18s ease;
}
.memory-today-card:hover,
.memory-today-card:focus-visible {
  transform: translateY(-2px);
  outline: none;
  border-color: var(--accent);
}
.memory-today-media {
  flex: 0 0 72px;
  height: 72px;
  border-radius: var(--radius-sm);
  background-size: cover;
  background-position: center;
  background-color: var(--paper-warm);
}
.memory-today-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.memory-today-ago {
  color: var(--accent-dark);
  font-size: 0.82rem;
}
.memory-today-body h3 {
  margin: 0;
  font-size: 1rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.memory-today-body p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
@media (max-width: 540px) {
  .memory-today-list {
    grid-template-columns: 1fr;
  }
}

/* Private daily home, search, connectivity, and mobile navigation */
.network-banner {
  position: fixed;
  z-index: 1200;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(92vw, 720px);
  padding: 0.7rem 1rem;
  border-radius: 0 0 14px 14px;
  background: #6f4d27;
  color: #fffaf1;
  text-align: center;
  box-shadow: 0 8px 24px rgba(42, 31, 18, 0.2);
}

.today-shell {
  max-width: 1180px;
}

.today-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.today-hero {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  margin: 0 0 1rem;
  border-radius: clamp(16px, 2vw, 22px);
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.6);
  background: #d4e7e0;
  box-shadow: 0 18px 40px -22px rgba(46, 132, 114, 0.35);
}

.today-hero-image {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
}

.today-hero-caption {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 14px;
  color: #fff;
  font-size: 0.95rem;
  line-height: 1.4;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.55);
}

.today-hero-caption:empty {
  display: none;
}

.today-card {
  min-height: 210px;
  padding: 1.25rem;
  border: 1px solid rgba(47, 125, 109, 0.14);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: 0 16px 42px rgba(31, 58, 51, 0.08);
}

.today-card-wide {
  grid-column: 1 / -1;
}

.today-card h2 {
  margin: 0.25rem 0 1rem;
}

.today-kicker {
  color: #2f7d6d;
  font-size: 0.74rem;
  font-weight: 750;
  letter-spacing: 0.12em;
}

.today-memory-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 0.8rem;
}

.today-memory-item {
  display: grid;
  min-height: 150px;
  align-content: end;
  padding: 1rem;
  overflow: hidden;
  border: 0;
  border-radius: 18px;
  background-color: #e9f2ee;
  background-position: center;
  background-size: cover;
  color: #fff;
  cursor: pointer;
  text-align: left;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

.today-memory-item span,
.today-memory-item strong {
  position: relative;
}

.today-list {
  display: grid;
  gap: 0.6rem;
}

.today-list-item {
  padding: 0.75rem;
  border-radius: 14px;
  background: #f5f8f6;
}

.today-empty {
  color: #6f7b76;
}

.today-quick-actions,
.memory-search-actions,
.memory-search-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.memory-search {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: minmax(220px, 2fr) repeat(4, minmax(110px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.2rem;
  padding: 1rem;
  border-radius: 20px;
  background: var(--surface);
}

.memory-search label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.8rem;
  color: #52635d;
}

.memory-search input[type="search"],
.memory-search select {
  width: 100%;
}

.memory-search-checks,
.memory-search-actions {
  grid-column: 1 / -1;
  align-items: center;
}

.memory-search-checks label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.timeline-more {
  display: block;
  margin: 1rem auto 0;
}

.mobile-nav {
  display: none;
}

body.is-offline [data-requires-online="true"] {
  opacity: 0.5;
  pointer-events: none;
}

@media (max-width: 860px) {
  body.has-mobile-nav {
    padding-bottom: 78px;
  }

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

  .today-card-wide {
    grid-column: auto;
  }

  .memory-search {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .memory-search-query,
  .memory-search-checks,
  .memory-search-actions {
    grid-column: 1 / -1;
  }

  .mobile-nav:not(.hidden) {
    position: fixed;
    z-index: 1100;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    align-items: end;
    min-height: 68px;
    padding: 0.45rem max(0.35rem, env(safe-area-inset-right)) calc(0.45rem + env(safe-area-inset-bottom)) max(0.35rem, env(safe-area-inset-left));
    border-top: 1px solid rgba(47, 125, 109, 0.15);
    background: rgba(255, 252, 247, 0.96);
    box-shadow: 0 -8px 28px rgba(29, 54, 47, 0.12);
    backdrop-filter: blur(14px);
  }

  .mobile-nav button {
    min-height: 46px;
    padding: 0.4rem 0.15rem;
    border: 0;
    background: transparent;
    color: #52635d;
    font-size: 0.76rem;
  }

  .mobile-nav button.active {
    color: #2f7d6d;
    font-weight: 750;
  }

  .mobile-nav .mobile-nav-add {
    width: 52px;
    min-height: 52px;
    margin: -16px auto 0;
    border-radius: 50%;
    background: #2f7d6d;
    color: white;
    font-size: 1.55rem;
    box-shadow: 0 8px 20px rgba(47, 125, 109, 0.28);
  }
}

@media (max-width: 560px) {
  .memory-search {
    grid-template-columns: 1fr;
  }

  .memory-search > * {
    grid-column: 1;
  }
}

/* Phase 1: mint photo-album structure and responsive interaction surfaces */
:where(a, button, input, select, textarea, [tabindex]):not([tabindex="-1"]):focus-visible {
  outline: 3px solid var(--focus) !important;
  outline-offset: 3px !important;
}

.topbar-title {
  min-width: 0;
  margin-right: auto;
}

.mobile-topbar-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  padding-inline: 14px;
}

.mobile-topbar-back::after {
  content: "返回功能中心";
  font-size: 0.86rem;
}

.mobile-topbar-more,
.plans-mobile-header,
.plans-primary-actions,
.plan-entry-close,
.plan-week-agenda,
.memory-search-filter-toggle,
.memory-search-drawer-head,
#memorySearchApply {
  display: none;
}

.today-screen h1,
.today-card h2,
.today-memory-item strong,
.memory-today-card h3,
.moment-card h3,
.photo-category-header h3,
.photo-card-caption h4,
.home-copy h1 {
  font-family: var(--font-serif);
}

.today-hero {
  max-height: 460px;
  height: clamp(280px, 38vw, 460px);
  aspect-ratio: auto;
  cursor: pointer;
  isolation: isolate;
}

.today-hero::after {
  position: absolute;
  z-index: 1;
  inset: 38% 0 0;
  content: "";
  background: linear-gradient(180deg, transparent, rgba(14, 35, 30, 0.78));
  pointer-events: none;
}

.today-hero-image {
  transition: transform 260ms ease;
}

.today-hero:hover .today-hero-image {
  transform: scale(1.015);
}

.today-hero:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.today-hero-caption {
  z-index: 2;
  max-width: 72ch;
  font-family: var(--font-serif);
  font-size: clamp(1rem, 2vw, 1.28rem);
  font-weight: 700;
}

.today-card {
  border-color: var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: var(--card-shadow);
}

.today-task-group {
  display: grid;
  gap: 8px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.today-task-group:first-of-type {
  padding-top: 0;
  border-top: 0;
}

.today-task-group h3 {
  margin: 0;
  color: var(--muted-strong);
  font-family: inherit;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

.today-task-group-alert h3 {
  color: var(--danger);
}

.today-task-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  padding: 10px 12px;
}

.today-task-item.is-overdue {
  border-color: rgba(217, 96, 118, 0.42);
  background: #fff7f8;
}

.today-task-copy {
  min-width: 0;
}

.today-task-copy strong,
.today-task-copy small {
  display: block;
}

.today-task-copy small {
  margin-top: 3px;
  color: var(--muted);
}

.today-task-actions,
.today-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.today-task-actions button,
.today-card-actions button,
.today-card-action {
  min-height: 36px;
  padding-inline: 12px;
  font-size: 0.82rem;
}

.today-task-group .today-list-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
}

.today-task-toggle {
  width: 38px;
  min-height: 38px;
  border-radius: 50%;
  padding: 0;
  box-shadow: none;
  font-size: 1.1rem;
}

.today-task-open {
  display: grid;
  min-width: 0;
  min-height: 40px;
  justify-items: start;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 4px 6px;
  background: transparent;
  box-shadow: none;
  text-align: left;
}

.today-task-open span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.76rem;
}

.today-list-item.is-done .today-task-open strong {
  opacity: 0.65;
  text-decoration: line-through;
}

.today-empty {
  color: var(--muted);
  line-height: 1.65;
}

.today-empty-compact {
  display: grid;
  justify-items: start;
  gap: 10px;
}

.today-empty-compact p {
  margin: 0;
}

.memory-search {
  z-index: 3;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--soft-shadow);
}

.memory-search-primary {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  align-items: end;
  gap: 10px;
}

.memory-search-primary button {
  min-width: 88px;
}

.memory-search-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.memory-search-result-count {
  color: var(--muted-strong);
  font-size: 0.9rem;
  font-weight: 800;
}

.memory-search-chips {
  display: flex;
  flex: 1;
  flex-wrap: wrap;
  gap: 6px;
}

.memory-search-chips:empty {
  display: none;
}

.memory-filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 32px;
  border-color: #b8d8cf;
  padding-inline: 10px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  box-shadow: none;
  font-size: 0.78rem;
}

.memory-search-drawer {
  display: grid;
  gap: 12px;
  border-top: 1px solid var(--line);
  padding-top: 14px;
}

.memory-search-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.memory-search input[type="search"],
.memory-search select {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  padding: 10px 12px;
  color: var(--text);
  font-size: 1rem;
}

.memory-search-checks input {
  width: 18px;
  height: 18px;
  accent-color: var(--accent-dark);
}

.filter-count {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 999px;
  background: var(--accent-dark);
  color: #fff;
  font-size: 0.7rem;
}

.plan-entry-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.plans-mobile-header h1 {
  margin: 2px 0 0;
  font-family: var(--font-serif);
  font-size: 1.55rem;
}

.plan-mobile-view-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, minmax(76px, 1fr));
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  padding: 3px;
}

.plan-mobile-view-switch button {
  min-height: 38px;
  border: 0;
  padding-inline: 14px;
  background: transparent;
  box-shadow: none;
  font-size: 0.86rem;
}

.plan-mobile-view-switch button.active,
.plan-mobile-view-switch button[aria-pressed="true"] {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.plan-week-agenda {
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 16px;
  box-shadow: var(--card-shadow);
}

.plan-week-agenda-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.plan-week-day,
.plan-week-item {
  border-radius: var(--radius-md);
  background: var(--surface-strong);
  padding: 10px 12px;
}

.plan-week-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.plan-week-item time {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.plan-week-open {
  display: grid;
  min-width: 0;
  min-height: 40px;
  justify-items: start;
  border: 0;
  border-radius: var(--radius-sm);
  padding: 5px 8px;
  background: transparent;
  box-shadow: none;
  text-align: left;
}

.plan-week-open span {
  color: var(--muted);
  font-size: 0.76rem;
}

.plan-week-item.is-done .plan-week-open strong {
  opacity: 0.65;
  text-decoration: line-through;
}

.plan-week-day {
  display: grid;
  grid-template-columns: minmax(64px, auto) minmax(0, 1fr);
  gap: 12px;
}

.plan-week-day > strong {
  color: var(--accent-dark);
}

.plan-card-assignee,
.plan-card-audit {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

.plan-card-assignee {
  width: fit-content;
  border-radius: 999px;
  background: var(--accent-soft);
  padding: 3px 8px;
  color: var(--accent-dark);
  font-weight: 800;
}

.plan-card-anniversary:is(button, a),
.anniversary-linked-tasks :is(button, a) {
  min-height: 34px;
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  color: var(--accent-dark);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.deep-link-highlight {
  outline: 3px solid rgba(46, 132, 114, 0.62) !important;
  outline-offset: 4px;
  animation: deep-link-pulse 1.8s ease-out;
}

@keyframes deep-link-pulse {
  0%,
  50% {
    box-shadow: 0 0 0 8px rgba(77, 182, 164, 0.2);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(77, 182, 164, 0);
  }
}

.loading-skeleton,
.skeleton-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  background: #e5f1ed;
  color: transparent !important;
}

.loading-skeleton::after,
.skeleton-card::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.72) 46%, transparent 72%);
  transform: translateX(-100%);
  animation: skeleton-sweep 1.25s ease-in-out infinite;
}

.skeleton-card {
  min-height: 128px;
  border: 1px solid var(--line);
}

.timeline-skeleton {
  display: grid;
  gap: 14px;
}

.timeline-skeleton span {
  position: relative;
  min-height: 168px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: #e5f1ed;
}

.timeline-skeleton span::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.72) 46%, transparent 72%);
  transform: translateX(-100%);
  animation: skeleton-sweep 1.25s ease-in-out infinite;
}

.skeleton-line {
  display: block;
  width: 78%;
  min-height: 14px;
  border-radius: 999px;
  background: #d5e8e2;
}

.skeleton-line.is-short {
  width: 46%;
}

@keyframes skeleton-sweep {
  to {
    transform: translateX(100%);
  }
}

.empty-state.is-compact,
.empty-state-compact {
  min-height: 0;
  padding: 16px;
  text-align: left;
}

.empty-state.is-page {
  display: grid;
  min-height: min(48vh, 420px);
  place-items: center;
  align-content: center;
  gap: 12px;
  text-align: center;
}

.empty-state .empty-state-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.site-toast-region {
  position: fixed;
  z-index: 1800;
  right: max(18px, env(safe-area-inset-right));
  bottom: max(18px, env(safe-area-inset-bottom));
  display: grid;
  width: min(380px, calc(100vw - 32px));
  gap: 8px;
  pointer-events: none;
}

.site-toast {
  border: 1px solid rgba(255, 255, 255, 0.52);
  border-radius: var(--radius-md);
  background: rgba(36, 55, 51, 0.94);
  padding: 12px 14px;
  color: #fff;
  box-shadow: var(--shadow);
  line-height: 1.45;
  pointer-events: auto;
}

.site-toast.is-error {
  background: rgba(143, 47, 65, 0.96);
}

@media (max-width: 860px) {
  .today-screen .topbar,
  #appContent > .topbar {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 14px 0 12px;
  }

  .today-screen .topbar-title,
  #appContent > .topbar .topbar-title {
    margin: 0;
  }

  .today-screen .topbar h1,
  #appContent > .topbar h1 {
    overflow: hidden;
    margin: 0;
    font-size: clamp(1.28rem, 6vw, 1.75rem);
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .today-screen .topbar .eyebrow,
  #appContent > .topbar .eyebrow {
    margin-bottom: 3px;
    font-size: 0.66rem;
  }

  .mobile-topbar-back,
  .mobile-topbar-more {
    display: inline-grid;
    min-width: 44px;
    min-height: 44px;
    place-items: center;
    padding: 0 10px;
    box-shadow: none;
  }

  .mobile-topbar-back {
    font-size: 1.65rem;
    line-height: 1;
  }

  .mobile-topbar-back::after {
    content: none;
  }

  .mobile-topbar-more {
    font-size: 0.78rem;
  }

  .today-screen .topbar-actions,
  #appContent > .topbar .topbar-actions,
  #plansTopActions {
    position: absolute;
    z-index: 40;
    top: calc(100% - 4px);
    right: 0;
    display: none;
    width: min(250px, calc(100vw - 32px));
    gap: 6px;
    border: 1px solid var(--line);
    border-radius: var(--radius-md);
    background: rgba(255, 255, 255, 0.98);
    padding: 8px;
    box-shadow: var(--shadow);
  }

  .today-screen .topbar-actions.is-open,
  #appContent > .topbar .topbar-actions.is-open,
  #plansTopActions.is-open {
    display: grid;
  }

  .today-screen .topbar-actions button,
  #appContent > .topbar .topbar-actions button,
  #plansTopActions button {
    width: 100%;
    justify-content: flex-start;
    box-shadow: none;
  }

  body[data-view="timeline"] #appContent .summary-grid,
  body[data-view="timeline"] #appContent .memory-today {
    display: none !important;
  }

  .today-hero {
    height: min(62vw, 260px);
    min-height: 200px;
    max-height: 260px;
  }

  .today-hero-caption {
    right: 14px;
    bottom: 12px;
    left: 14px;
  }

  .today-card {
    min-height: 0;
    padding: 18px;
  }

  .today-memory-list {
    display: grid;
    grid-auto-columns: minmax(220px, 82vw);
    grid-auto-flow: column;
    grid-template-columns: none;
    overflow-x: auto;
    padding-bottom: 5px;
    scroll-snap-type: x proximity;
  }

  .today-memory-item {
    scroll-snap-align: start;
  }

  .memory-search {
    gap: 10px;
    margin-bottom: 14px;
    padding: 12px;
  }

  .memory-search-primary {
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 7px;
  }

  .memory-search-query > span {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    white-space: nowrap;
  }

  .memory-search-primary button {
    min-width: 0;
    padding-inline: 12px;
  }

  .memory-search-filter-toggle,
  .memory-search-drawer-head,
  #memorySearchApply {
    display: flex;
  }

  .memory-search-drawer-head {
    align-items: center;
    justify-content: space-between;
  }

  .memory-search-drawer-head h2 {
    margin: 3px 0 0;
    font-family: var(--font-serif);
  }

  .memory-search-drawer {
    position: fixed;
    z-index: 1500;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    max-height: min(82vh, 720px);
    overflow-y: auto;
    border: 1px solid var(--line);
    border-radius: 24px 24px 0 0;
    background: var(--surface);
    padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
    box-shadow: 0 -18px 48px rgba(27, 68, 59, 0.22);
    transform: translateY(105%);
    transition: transform 220ms ease;
    visibility: hidden;
  }

  .memory-search-drawer.is-open {
    transform: translateY(0);
    visibility: visible;
  }

  .memory-search-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .memory-search-actions {
    position: sticky;
    bottom: 0;
    justify-content: flex-end;
    border-top: 1px solid var(--line);
    background: var(--surface);
    padding-top: 12px;
  }

  body.search-filters-open,
  body.plan-entry-drawer-open {
    overflow: hidden;
  }

  body.search-filters-open .memory-search {
    z-index: 1700;
  }

  .plans-screen {
    min-height: 100vh;
  }

  .daydayup-shell {
    display: block;
  }

  .daydayup-main {
    position: relative;
    min-height: 100vh;
    padding: 12px 14px calc(92px + env(safe-area-inset-bottom));
  }

  .plans-mobile-header {
    position: relative;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
  }

  .daydayup-top-actions {
    margin: 0;
  }

  #plansTopActions {
    top: 66px;
    right: 14px;
  }

  .plans-primary-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
  }

  .plan-entry-open {
    min-width: 92px;
  }

  .daydayup-sidebar {
    position: fixed;
    z-index: 1600;
    inset: 0;
    display: grid;
    align-content: start;
    overflow-y: auto;
    border: 0;
    background: var(--bg);
    padding: 18px 16px calc(28px + env(safe-area-inset-bottom));
    transform: translateY(105%);
    transition: transform 240ms ease;
    visibility: hidden;
  }

  .daydayup-sidebar.is-open {
    transform: translateY(0);
    visibility: visible;
  }

  .plan-entry-close {
    display: inline-grid;
  }

  .daydayup-brand {
    font-size: 1.45rem;
  }

  .daydayup-entry-title {
    margin-top: 4px;
  }

  .plan-week-agenda {
    display: block;
    margin-bottom: 14px;
  }

  #plansScreen:not([data-mobile-plan-view="month"]) .daydayup-panel[data-panel="calendar"],
  #plansScreen:not([data-mobile-plan-view="month"]) .daydayup-main-picker {
    display: none;
  }

  #plansScreen[data-mobile-plan-view="month"] .plan-week-agenda {
    display: none;
  }

  #plansScreen[data-mobile-plan-view="month"] .daydayup-main-picker {
    display: flex;
  }

  .daydayup-main-picker {
    gap: 8px;
    margin: 12px 0;
  }

  .daydayup-main-picker input,
  .daydayup-main-picker select {
    min-width: 0;
    flex: 1;
    padding: 12px;
  }

  .daydayup-tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    margin-bottom: 14px;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .daydayup-tabs::-webkit-scrollbar {
    display: none;
  }

  .daydayup-tabs button {
    flex: 0 0 auto;
  }

  .calendar-board {
    overflow-x: auto;
    padding: 12px;
  }

  .day-calendar {
    min-width: 700px;
  }

  .plan-board > .section-heading {
    align-items: flex-start;
  }

  .plan-board-heading-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .plan-board-heading-actions > #planStatus {
    grid-column: 1 / -1;
  }

  .plan-filter-field {
    display: grid;
    white-space: normal;
  }

  .plan-filter-field select {
    width: 100%;
    min-width: 0;
  }

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

  .plan-card[draggable="true"] {
    cursor: default;
  }

  .site-toast-region {
    right: 12px;
    bottom: calc(82px + env(safe-area-inset-bottom));
    left: 12px;
    width: auto;
  }

  .mobile-nav:not(.hidden) {
    align-items: stretch;
    min-height: 74px;
    background: rgba(248, 253, 251, 0.97);
  }

  .mobile-nav button {
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 3px;
    border-radius: 14px;
    line-height: 1.05;
    box-shadow: none;
  }

  .mobile-nav-icon {
    font-size: 1.08rem;
    font-weight: 900;
  }

  .mobile-nav button.active,
  .mobile-nav button[aria-current="page"] {
    background: var(--accent-soft);
    color: var(--accent-dark);
  }

  .mobile-nav .mobile-nav-add {
    display: grid;
    width: auto;
    min-width: 66px;
    min-height: 58px;
    margin: -18px 3px 0;
    border-radius: 18px;
    padding: 5px 4px 6px;
    font-size: 0.68rem;
    line-height: 1.1;
  }

  .mobile-nav-add-icon {
    font-size: 1.42rem;
    line-height: 1;
  }
}

@media (max-width: 420px) {
  .memory-search-primary {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .memory-search-query {
    grid-column: 1 / -1;
  }

  .memory-search-submit,
  .memory-search-filter-toggle {
    width: 100%;
  }

  .memory-search-fields,
  .plan-board-heading-actions {
    grid-template-columns: 1fr;
  }

  .plan-board-heading-actions > #planStatus {
    grid-column: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  button:hover,
  .today-hero:hover .today-hero-image,
  .memory-today-card:hover {
    transform: none !important;
  }
}

/* Shared memory contributions and lightweight replies */
.detail-collaboration {
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
  padding: 1.25rem;
  border: 1px solid rgba(47, 125, 109, 0.14);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.86);
}

.moment-reactions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.moment-reactions button,
.whisper-response-actions button {
  padding: 0.55rem 0.8rem;
  border: 1px solid rgba(47, 125, 109, 0.2);
  border-radius: 999px;
  background: #f6faf8;
  color: #365c52;
  cursor: pointer;
}

.moment-reactions button.active,
.whisper-response-actions button.active {
  border-color: #2f7d6d;
  background: #dcefe7;
  color: #1f6656;
  font-weight: 750;
}

.moment-contributions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.moment-contribution {
  min-height: 130px;
  padding: 1rem;
  border-radius: 18px;
  background: #f7f3eb;
}

.moment-contribution h3 {
  margin: 0 0 0.55rem;
  font-size: 1rem;
}

.moment-contribution time,
.moment-revision-meta {
  color: #718079;
  font-size: 0.78rem;
}

.moment-contribution-form label {
  display: grid;
  gap: 0.45rem;
}

.moment-contribution-form textarea {
  width: 100%;
}

.moment-history {
  display: grid;
  gap: 0.65rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(47, 125, 109, 0.14);
}

.moment-revision {
  padding: 0.8rem;
  border-radius: 14px;
  background: #f6f8f7;
}

.moment-revision p {
  margin: 0.35rem 0 0;
  white-space: pre-wrap;
}

.whisper-responses {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.8rem;
  padding-top: 0.7rem;
  border-top: 1px dashed rgba(78, 79, 73, 0.18);
}

.whisper-response {
  padding: 0.6rem 0.75rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.6);
}

.whisper-response-form {
  display: grid;
  gap: 0.55rem;
}

.whisper-response-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.whisper-response-form textarea {
  width: 100%;
  min-height: 72px;
}

@media (max-width: 680px) {
  .moment-contributions {
    grid-template-columns: 1fr;
  }
}

.yearbook-highlights-card .yearbook-city-chips {
  margin-bottom: 1rem;
}

@media print {
  body * {
    visibility: hidden !important;
  }

  #yearbookScreen,
  #yearbookScreen * {
    visibility: visible !important;
  }

  #yearbookScreen {
    position: absolute;
    inset: 0;
    display: block !important;
    background: white;
  }

  #yearbookScreen .topbar-actions,
  #yearbookExportMessage,
  .mobile-nav,
  .character-stage {
    display: none !important;
  }

  .yearbook-card-track {
    display: block;
  }

  .yearbook-share-card {
    break-inside: avoid;
    margin: 0 0 12mm;
    box-shadow: none;
  }

  body.yearbook-print-light .yearbook-private-card,
  body.yearbook-print-light .yearbook-place-list {
    display: none !important;
  }
}
