:root {
  --bg: #eef1ed;
  --surface: #fffefa;
  --surface-soft: #e3ebe5;
  --ink: #111915;
  --muted: #66716b;
  --line: #ccd5cf;
  --green: #075d49;
  --green-dark: #0b3328;
  --yellow: #e7f36a;
  --coral: #ff6b56;
  --blue: #4779bd;
  --danger: #b7443a;
  --shadow: 0 18px 48px rgba(21, 34, 29, 0.12);
  --radius: 6px;
  --content: 1280px;
}

* { box-sizing: border-box; }
html { color-scheme: light; scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  letter-spacing: 0;
  line-height: 1.55;
}
button, input, textarea, select { color: inherit; font: inherit; letter-spacing: 0; }
button, select { cursor: pointer; }
button:disabled { cursor: wait; opacity: 0.58; }
img { display: block; max-width: 100%; }
a { color: inherit; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 3px solid rgba(74, 118, 168, 0.45);
  outline-offset: 2px;
}

.kicker, .section-eyebrow {
  margin: 0 0 7px;
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.kicker--light { color: var(--yellow); }
.muted { color: var(--muted); }

.brand-mark {
  display: grid;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  place-items: center;
  border-radius: 6px;
  background: var(--yellow);
  color: var(--ink);
  font-weight: 800;
}

.login-view {
  display: grid;
  min-height: 100svh;
  grid-template-columns: minmax(0, 1.2fr) minmax(390px, 0.8fr);
  background: var(--surface);
}
.login-visual {
  position: relative;
  display: flex;
  min-height: 100svh;
  align-items: flex-end;
  overflow: hidden;
  background: #1d2923 url("/static/login-visual.webp") center/cover no-repeat;
}
.login-visual::after {
  position: absolute;
  inset: 0;
  background: rgba(10, 26, 19, 0.42);
  content: "";
}
.login-visual__copy {
  position: relative;
  z-index: 1;
  max-width: 680px;
  padding: 9vw 7vw;
  color: white;
}
.login-visual h1 { margin: 0; font-size: clamp(42px, 5vw, 76px); line-height: 1.06; }
.login-visual h1 span, .login-visual h1 strong { display: block; }
.login-visual h1 strong { color: var(--yellow); }
.login-visual p { max-width: 520px; margin: 20px 0 0; color: rgba(255, 255, 255, 0.82); font-size: 18px; }
.login-panel { display: grid; min-height: 100svh; place-items: center; padding: 48px; }
.login-box { width: min(100%, 390px); }
.login-box .brand-mark { margin-bottom: 34px; }
.login-box h2 { margin: 0; font-size: 30px; }
.login-box > .muted { margin: 8px 0 28px; }

.form-stack { display: grid; gap: 10px; }
.form-stack label, .form-field { color: #35423c; font-size: 13px; font-weight: 700; }
.input-with-icon { position: relative; }
.input-with-icon svg { position: absolute; top: 50%; left: 15px; width: 18px; transform: translateY(-50%); color: var(--muted); }
.input-with-icon input { padding-left: 44px; }
input, textarea, select {
  width: 100%;
  min-height: 46px;
  border: 1px solid #cbd5ce;
  border-radius: var(--radius);
  background: white;
  padding: 11px 13px;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
textarea { min-height: 92px; resize: vertical; }
input:hover, textarea:hover, select:hover { border-color: #a8b6ad; }
input:focus, textarea:focus, select:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(21, 92, 69, 0.12); outline: 0; }
.form-error { min-height: 22px; margin: 0; color: var(--danger); font-size: 13px; }

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 9px 15px;
  background: transparent;
  font-weight: 750;
  white-space: nowrap;
}
.button svg { width: 17px; height: 17px; }
.button--primary { background: var(--green); color: white; }
.button--primary:hover { background: var(--green-dark); }
.button--secondary { border-color: var(--green); color: var(--green); background: white; }
.button--secondary:hover { background: var(--surface-soft); }
.button--ghost { border-color: var(--line); background: white; }
.button--ghost:hover { background: #f3f5f3; }
.button--danger { border-color: #e5bcb7; color: var(--danger); }
.button--wide { width: 100%; }
.button--left { margin-right: auto; }
.button--small { min-height: 34px; padding: 6px 10px; font-size: 13px; }

.icon-button {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}
.icon-button:hover { background: var(--surface-soft); }
.icon-button svg { width: 19px; height: 19px; }
.icon-button--small { width: 34px; height: 34px; flex-basis: 34px; }
.icon-button--small svg { width: 16px; height: 16px; }

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid #bbc6bf;
  background: rgba(238, 241, 237, 0.96);
  backdrop-filter: blur(12px);
}
.topbar__inner {
  display: flex;
  width: min(calc(100% - 48px), var(--content));
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  margin: auto;
}
.brand { display: flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 16px; }
.brand small { color: var(--muted); font-size: 11px; }
.brand-heart { display: inline; color: var(--coral); font-size: 15px; }

.workspace { width: min(calc(100% - 48px), var(--content)); margin: 0 auto; padding: 24px 0 80px; }
.overview {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px 40px;
  overflow: hidden;
  border: 1px solid #0b3328;
  border-radius: 6px;
  background: var(--ink);
  padding: 30px 32px 0;
  color: white;
}
.overview::after {
  position: absolute;
  top: 0;
  right: 30%;
  width: 12px;
  height: 42px;
  background: var(--coral);
  content: "";
}
.overview .kicker { color: var(--yellow); }
.overview__copy h1 { display: flex; flex-wrap: wrap; max-width: 760px; margin: 0; font-size: 51px; line-height: 1.05; }
.overview__copy h1 span, .overview__copy h1 strong { display: block; }
.overview__copy h1 strong { color: var(--coral); font-weight: 850; }
.overview__copy > p:last-child { max-width: 660px; margin: 13px 0 0; color: #b8c3bd; }
.overview__add { align-self: center; min-width: 140px; border-color: var(--yellow); background: var(--yellow); color: var(--ink); }
.overview__add:hover { background: white; color: var(--ink); }
.progress-block { grid-column: 1 / -1; padding-top: 2px; }
.progress-block__top { display: flex; justify-content: space-between; margin-bottom: 8px; color: #a9b5af; font-size: 12px; }
.progress-block__top strong { color: white; font-size: 15px; }
.progress-track { height: 5px; overflow: hidden; border-radius: 0; background: #33413b; }
.progress-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--coral); transition: width 350ms ease; }
.stats-row { display: grid; grid-column: 1 / -1; grid-template-columns: repeat(4, 1fr); margin: 0 -32px; border-top: 1px solid #34423c; background: #17211d; }
.stats-row div { padding: 15px 32px 17px; }
.stats-row div + div { border-left: 1px solid #34423c; }
.stats-row dt { color: #96a39c; font-size: 11px; }
.stats-row dd { margin: 0; color: white; font-size: 25px; font-weight: 800; }

.planner-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 42px; padding-top: 28px; }
.work-area { min-width: 0; }
.view-tabs { display: flex; width: 100%; gap: 24px; border-bottom: 1px solid var(--line); }
.view-tab {
  display: inline-flex;
  min-height: 39px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  background: transparent;
  padding: 8px 1px 11px;
  color: var(--muted);
  font-weight: 700;
}
.view-tab svg { width: 17px; }
.view-tab.is-active { border-bottom-color: var(--coral); background: transparent; color: var(--ink); }
.content-section { padding-top: 23px; }
.section-heading { display: flex; min-height: 66px; align-items: end; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); padding-bottom: 15px; }
.section-heading h2 { margin: 0; font-size: 27px; }
.section-controls { display: flex; align-items: center; gap: 9px; }
.section-controls select { width: 128px; min-height: 42px; }
.search-control { position: relative; display: block; }
.search-control svg { position: absolute; top: 50%; left: 13px; width: 17px; transform: translateY(-50%); color: var(--muted); }
.search-control input { width: 180px; min-height: 42px; padding-left: 39px; }

.items-list { display: grid; }
.plan-row {
  --category-color: var(--blue);
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
}
.plan-row--美食 { --category-color: var(--coral); }
.plan-row--旅行 { --category-color: var(--green); }
.plan-row--体验 { --category-color: var(--yellow); }
.plan-row--学习 { --category-color: var(--blue); }
.plan-row__status { display: grid; width: 38px; height: 38px; place-items: center; border: 1px solid var(--line); border-radius: 50%; background: white; color: var(--category-color); }
.plan-row__status:hover { border-color: var(--green); background: var(--surface-soft); }
.plan-row__status svg { width: 20px; }
.plan-row__body { min-width: 0; }
.plan-row__top { display: flex; min-height: 34px; align-items: center; justify-content: space-between; gap: 12px; }
.plan-row__labels, .plan-row__actions, .plan-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.category-label, .priority-label {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 11px;
  font-weight: 750;
}
.category-label { background: var(--surface-soft); color: var(--green-dark); }
.priority-label { color: var(--muted); }
.priority-label--1 { color: #765f15; background: #fff5cf; }
.priority-label--2 { color: #9b382f; background: #fde7e4; }
.plan-row h3 { margin: 5px 0 3px; font-size: 19px; line-height: 1.35; }
.plan-row__body > p { margin: 0; color: var(--muted); }
.item-link { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 4px; color: var(--blue); }
.item-link:hover { background: #e8eef5; }
.item-link svg { width: 16px; }
.plan-meta { margin-top: 11px; color: #4e5e56; font-size: 12px; }
.plan-meta span { display: inline-flex; align-items: center; gap: 5px; }
.plan-meta svg { width: 14px; }
.prep-list { display: flex; flex-wrap: wrap; gap: 7px 14px; margin-top: 10px; color: var(--muted); font-size: 12px; }
.prep-list span { display: inline-flex; align-items: center; gap: 4px; }
.prep-list svg { width: 13px; color: var(--green); }

.empty-state { display: grid; grid-template-columns: 152px minmax(0, 1fr) auto; align-items: center; gap: 24px; margin-top: 24px; border: 1px solid var(--line); border-left: 5px solid var(--yellow); border-radius: var(--radius); background: var(--surface); padding: 14px; }
.empty-state img { width: 152px; height: 96px; border-radius: 3px; object-fit: cover; }
.empty-state h3 { margin: 0; font-size: 18px; }
.empty-state p { margin: 3px 0 0; color: var(--muted); }

.companion-rail { display: flex; flex-direction: column; gap: 0; border-left: 1px solid var(--line); }
.days-panel, .rail-section { padding: 0 0 24px 26px; }
.rail-section { border-top: 1px solid var(--line); padding-top: 24px; }
.days-panel { display: flex; align-items: end; justify-content: space-between; gap: 12px; border-top: 5px solid var(--yellow); background: #f8f8df; padding-top: 17px; padding-right: 18px; padding-bottom: 18px; }
.days-panel h2 { margin: 0; font-size: 18px; line-height: 1.4; }
.days-panel h2 span { white-space: nowrap; }
.flip-counter { display: flex; align-items: end; gap: 6px; }
.flip-counter strong {
  display: inline-flex;
  min-width: 76px;
  min-height: 58px;
  align-items: center;
  justify-content: center;
  border: 1px solid #0c372a;
  border-radius: 5px;
  background: var(--ink);
  color: white;
  font-variant-numeric: tabular-nums;
  font-size: 30px;
  line-height: 1;
  box-shadow: inset 0 -1px 0 rgba(255,255,255,0.18);
}
.flip-counter span { margin-bottom: 4px; color: var(--muted); font-size: 12px; }
.rail-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.rail-heading h2 { margin: 0; font-size: 16px; }
.rail-heading > svg { width: 17px; color: var(--muted); }
.upcoming-list, .anniversary-list, .anniversary-settings-list { display: grid; }
.upcoming-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 16px;
  align-items: center;
  gap: 10px;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  padding: 11px 0;
  text-align: left;
}
.upcoming-item:hover strong { color: var(--green); }
.upcoming-item__date { font-size: 12px; font-weight: 750; }
.upcoming-item strong, .upcoming-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upcoming-item small { color: var(--muted); font-size: 11px; }
.upcoming-item svg { width: 15px; color: var(--muted); }
.anniversary-item { display: grid; grid-template-columns: 54px minmax(0, 1fr); align-items: center; gap: 10px; border-bottom: 1px solid var(--line); padding: 10px 0; }
.anniversary-item__day { display: grid; min-height: 34px; place-items: center; border-radius: 4px; background: #fff2bd; color: #70590e; font-size: 12px; font-weight: 800; }
.anniversary-item strong, .anniversary-item small { display: block; }
.anniversary-item strong { font-size: 13px; }
.anniversary-item small { color: var(--muted); font-size: 11px; }
.rail-empty { margin: 8px 0; color: var(--muted); font-size: 13px; }

.memory-count { color: var(--muted); font-size: 13px; }
.memory-count strong { color: var(--ink); font-size: 24px; }
.photo-wall { display: grid; grid-auto-rows: 120px; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 22px; }
.photo-tile { position: relative; overflow: hidden; min-width: 0; border: 0; border-radius: 4px; background: #dce3de; padding: 0; }
.photo-tile--1, .photo-tile--4 { grid-column: span 2; grid-row: span 2; }
.photo-tile img { width: 100%; height: 100%; object-fit: cover; transition: transform 220ms ease; }
.photo-tile:hover img { transform: scale(1.025); }
.photo-tile span { position: absolute; right: 8px; bottom: 8px; left: 8px; overflow: hidden; color: white; font-size: 12px; font-weight: 700; text-align: left; text-shadow: 0 1px 5px rgba(0,0,0,0.75); text-overflow: ellipsis; white-space: nowrap; }
.memory-timeline { margin-top: 28px; }
.memory-entry { display: grid; grid-template-columns: 116px 28px minmax(0, 1fr); gap: 0 14px; }
.memory-entry time { padding-top: 20px; color: var(--muted); font-size: 12px; text-align: right; }
.memory-entry__marker { position: relative; display: flex; justify-content: center; }
.memory-entry__marker::before { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line); content: ""; }
.memory-entry__marker svg { z-index: 1; width: 22px; height: 22px; margin-top: 19px; border-radius: 50%; background: var(--coral); padding: 4px; color: white; }
.memory-entry__body { border-bottom: 1px solid var(--line); padding: 18px 0 22px; }
.memory-entry__body h3 { margin: 7px 0 3px; font-size: 19px; }
.memory-entry__body p { margin: 0; color: var(--muted); }
.memory-entry__footer { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; color: var(--muted); font-size: 12px; }

.modal {
  width: min(calc(100% - 28px), 720px);
  max-height: min(90svh, 860px);
  overflow: visible;
  border: 0;
  border-radius: 8px;
  background: transparent;
  padding: 0;
}
.modal::backdrop { background: rgba(15, 27, 21, 0.68); backdrop-filter: blur(4px); }
.modal__panel { max-height: min(90svh, 860px); overflow: auto; border-radius: 8px; background: white; padding: 28px; box-shadow: var(--shadow); }
.modal__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); margin-bottom: 22px; padding-bottom: 18px; }
.modal__header h2 { margin: 0; font-size: 24px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-field { display: grid; align-content: start; gap: 7px; }
.form-field--wide { grid-column: 1 / -1; }
.modal__actions, .settings-actions { display: flex; align-items: center; justify-content: flex-end; gap: 9px; margin-top: 22px; }
.completion-title { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; border-left: 4px solid var(--coral); background: #f6f8f6; padding: 13px 15px; }
.completion-title svg { width: 20px; color: var(--coral); }
.upload-zone { display: grid; min-height: 112px; place-items: center; align-content: center; gap: 3px; border: 1px dashed #9eada4; border-radius: var(--radius); background: #f7f9f7; color: var(--muted); text-align: center; cursor: pointer; }
.upload-zone:hover { border-color: var(--green); background: var(--surface-soft); }
.upload-zone svg { width: 24px; color: var(--green); }
.upload-zone strong { color: var(--ink); }
.upload-zone span { font-size: 12px; }
.upload-zone input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.photo-preview { display: grid; grid-template-columns: repeat(5, 1fr); gap: 7px; }
.photo-preview img { width: 100%; aspect-ratio: 1; border-radius: 4px; object-fit: cover; }
.settings-panel { padding-bottom: 22px; }
.settings-divider { height: 1px; margin: 26px 0; background: var(--line); }
.settings-section-heading h3 { margin: 0; font-size: 19px; }
.anniversary-form { display: grid; grid-template-columns: 1fr 180px auto; align-items: end; gap: 10px; margin-top: 15px; }
.anniversary-form .button { min-height: 46px; }
.anniversary-settings-list { margin-top: 12px; border-top: 1px solid var(--line); }
.anniversary-setting { display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding: 10px 0; }
.anniversary-setting strong, .anniversary-setting small { display: block; }
.anniversary-setting small { color: var(--muted); font-size: 12px; }
.privacy-note { display: flex; gap: 8px; margin-top: 24px; color: var(--muted); font-size: 12px; }
.privacy-note svg { width: 17px; color: var(--green); }

.lightbox { width: 100vw; max-width: none; height: 100svh; max-height: none; border: 0; background: rgba(8, 14, 11, 0.94); padding: 50px; }
.lightbox::backdrop { background: rgba(8, 14, 11, 0.94); }
.lightbox img { width: 100%; height: calc(100% - 60px); object-fit: contain; }
.lightbox__close { position: fixed; top: 18px; right: 18px; background: rgba(255,255,255,0.94); }
.lightbox__caption { display: flex; justify-content: center; gap: 16px; color: white; }
.lightbox__caption span { color: rgba(255,255,255,0.66); }
.toast { position: fixed; z-index: 100; top: 18px; left: 50%; transform: translate(-50%, -18px); border-radius: 5px; background: var(--ink); padding: 11px 17px; color: white; opacity: 0; pointer-events: none; transition: opacity 180ms ease, transform 180ms ease; }
.toast.is-visible { transform: translate(-50%, 0); opacity: 1; }
.mobile-nav { display: none; }

@media (max-width: 1000px) {
  .workspace, .topbar__inner { width: min(calc(100% - 36px), var(--content)); }
  .planner-layout { grid-template-columns: minmax(0, 1fr); }
  .companion-rail { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); border-left: 0; }
  .days-panel, .rail-section { border-top: 0; padding: 24px 20px 0; }
  .days-panel { padding-left: 18px; }
  .rail-section { border-left: 1px solid var(--line); }
}

@media (max-width: 760px) {
  body.is-authenticated { padding-bottom: calc(78px + env(safe-area-inset-bottom)); }
  .login-view { grid-template-columns: 1fr; background: var(--surface); }
  .login-visual { min-height: 41svh; align-items: flex-end; }
  .login-visual__copy { padding: 34px 24px; }
  .login-visual h1 { font-size: 40px; }
  .login-visual p { margin-top: 10px; font-size: 15px; }
  .login-panel { min-height: 59svh; align-items: start; padding: 30px 22px; }
  .login-box .brand-mark { margin-bottom: 22px; }
  .login-box h2 { font-size: 26px; }
  .topbar__inner, .workspace { width: calc(100% - 28px); }
  .topbar__inner { min-height: 62px; }
  .brand-mark { width: 36px; height: 36px; flex-basis: 36px; }
  .workspace { padding: 22px 0 28px; }
  .overview { grid-template-columns: minmax(0, 1fr) auto; gap: 17px 12px; padding: 24px 20px 0; }
  .overview::after { right: 24px; height: 28px; }
  .overview__copy h1 { display: block; font-size: 34px; }
  .overview__copy > p:last-child { display: none; }
  .overview__add { width: 44px; min-width: 44px; height: 44px; padding: 0; font-size: 0; }
  .overview__add svg { width: 21px; height: 21px; }
  .stats-row { grid-template-columns: repeat(4, 1fr); margin: 0 -20px; }
  .stats-row div { padding: 13px 12px 15px; }
  .stats-row div + div { padding-left: 12px; }
  .stats-row dd { font-size: 21px; }
  .planner-layout { gap: 28px; padding-top: 22px; }
  .view-tabs { display: grid; width: 100%; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; }
  .view-tab { padding: 7px 8px; }
  .content-section { padding-top: 21px; }
  .section-heading { display: grid; align-items: start; }
  .section-heading h2 { font-size: 21px; }
  .section-controls { width: 100%; }
  .search-control { flex: 1; }
  .search-control input { width: 100%; }
  .section-controls select { width: 118px; }
  .plan-row { grid-template-columns: 36px minmax(0, 1fr); gap: 10px; padding: 17px 0; }
  .plan-row__status { width: 34px; height: 34px; }
  .plan-row h3 { font-size: 18px; }
  .plan-row__top { align-items: start; }
  .empty-state { grid-template-columns: 84px minmax(0, 1fr); gap: 13px; padding: 13px; }
  .empty-state img { width: 84px; height: 76px; }
  .empty-state .button { grid-column: 1 / -1; }
  .companion-rail { grid-template-columns: 1fr; }
  .days-panel, .rail-section { border-left: 0; border-top: 1px solid var(--line); padding: 20px 0; }
  .days-panel { order: 3; }
  .photo-wall { grid-auto-rows: 100px; grid-template-columns: repeat(3, 1fr); }
  .photo-tile--1, .photo-tile--4 { grid-column: span 2; }
  .memory-entry { grid-template-columns: 70px 22px minmax(0, 1fr); gap: 0 8px; }
  .memory-entry time { font-size: 10px; }
  .memory-entry__footer { align-items: flex-start; gap: 8px; }
  .modal { width: calc(100% - 18px); max-height: 94svh; }
  .modal__panel { max-height: 94svh; border-radius: 7px; padding: 20px 16px; }
  .form-grid { grid-template-columns: 1fr; gap: 13px; }
  .form-field--wide { grid-column: auto; }
  .modal__actions { position: sticky; bottom: -20px; margin-right: -16px; margin-left: -16px; border-top: 1px solid var(--line); background: white; padding: 12px 16px 4px; }
  .button--left { margin-right: 0; }
  .anniversary-form { grid-template-columns: 1fr; }
  .photo-preview { grid-template-columns: repeat(4, 1fr); }
  .lightbox { padding: 48px 12px 20px; }
  .mobile-nav {
    position: fixed;
    z-index: 40;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    height: calc(66px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgba(255,255,255,0.98);
    padding: 5px 7px env(safe-area-inset-bottom);
  }
  .mobile-nav button { display: grid; min-width: 0; place-items: center; gap: 1px; border: 0; background: transparent; color: var(--muted); font-size: 10px; }
  .mobile-nav button svg { width: 20px; height: 20px; }
  .mobile-nav button.is-active { color: var(--green); }
  .mobile-nav .mobile-nav__add { width: 46px; height: 46px; align-self: center; justify-self: center; border-radius: 50%; background: var(--green); color: white; }
  .mobile-nav__add span { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}
