:root {
  color-scheme: light;
  --bg: #f3faf7;
  --paper: #ffffff;
  --paper-warm: #eaf6f1;
  --surface: #ffffff;
  --surface-strong: #eef7f3;
  --text: #243733;
  --muted: #6f8a83;
  --line: #d4e7e0;
  --ink: #243733;
  --accent: #4db6a4;
  --accent-dark: #2e8472;
  --accent-soft: #d4efe8;
  --yellow: #ffe6a8;
  --green: #5bbfa8;
  --blue: #a9dde2;
  --brown: #c69a63;
  --danger: #d96076;
  --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);
}

* {
  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:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

.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);
}

.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,
.moment-screen,
.photo-wall-screen,
.anniversary-screen,
.letters-screen,
.whispers-screen,
.plans-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;
}

.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 {
  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-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-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-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.is-done {
  opacity: 0.68;
}

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

.plan-card-meta {
  color: var(--muted);
  font-size: 0.8rem;
  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;
}

.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;
}

.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 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;
}

.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;
  top: 88px;
  bottom: 36px;
  left: clamp(34px, 5vw, 62px);
  border-left: 2px dashed var(--accent);
  opacity: 0.5;
  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: fit-content;
  max-width: 100%;
  margin-bottom: 14px;
  color: var(--accent-dark);
  font-size: 1.1rem;
  font-weight: 800;
}

.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));
  }
}

@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,
  .plans-layout {
    grid-template-columns: 1fr;
  }

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

  #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) {
  .home-screen {
    padding: 24px 14px clamp(120px, 22vw, 160px);
  }

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

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

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

  .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;
  }

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

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

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

  .timeline {
    padding: 16px;
  }

  .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;
  }

  .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;
  }
}
