:root {
  --paper: #f6f1e9;
  --paper-deep: #efe7dc;
  --card: #fffdf9;
  --ink: #342c29;
  --ink-soft: #71645e;
  --ink-faint: #a49890;
  --line: rgba(72, 56, 49, 0.11);
  --line-strong: rgba(72, 56, 49, 0.2);
  --coral: #df735f;
  --coral-dark: #c85d4a;
  --coral-soft: #f4d2c8;
  --peach: #e9b39f;
  --sage: #87917a;
  --sage-soft: #dfe4d5;
  --cream: #fff8ef;
  --brown: #3b302d;
  --danger: #b94f43;
  --shadow-sm: 0 8px 30px rgba(79, 57, 45, 0.075);
  --shadow-md: 0 18px 55px rgba(79, 57, 45, 0.12);
  --shadow-lg: 0 35px 90px rgba(60, 42, 33, 0.2);
  --radius-xl: 30px;
  --radius-lg: 24px;
  --radius-md: 18px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 86% 0%, rgba(225, 172, 151, 0.16), transparent 25rem),
    radial-gradient(circle at 6% 80%, rgba(152, 164, 133, 0.12), transparent 29rem),
    var(--paper);
  color: var(--ink);
  font-family: "Avenir Next", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  -webkit-font-smoothing: antialiased;
}

body.modal-open {
  overflow: hidden;
}

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

button {
  border: 0;
  cursor: pointer;
}

button,
a,
input,
textarea,
select {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
.polaroid:focus-visible {
  outline: 3px solid rgba(223, 115, 95, 0.32);
  outline-offset: 3px;
}

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

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

h1,
h2,
h3 {
  font-family: "Songti SC", "STSong", "Source Han Serif SC", "Noto Serif CJK SC", Georgia, serif;
  font-weight: 600;
}

.svg-sprite {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.icon {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.ambient {
  position: fixed;
  z-index: -1;
  border: 1px solid rgba(85, 70, 62, 0.07);
  border-radius: 999px;
  pointer-events: none;
}

.ambient-one {
  top: -14rem;
  right: -11rem;
  width: 34rem;
  height: 34rem;
}

.ambient-two {
  bottom: -21rem;
  left: 10rem;
  width: 38rem;
  height: 38rem;
}

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

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  width: 246px;
  flex-direction: column;
  padding: 36px 24px 25px;
  border-right: 1px solid var(--line);
  background: rgba(249, 245, 238, 0.82);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 13px;
  width: max-content;
  margin: 0 0 46px 10px;
  padding: 0;
  background: transparent;
  text-align: left;
}

.brand-mark {
  position: relative;
  width: 35px;
  height: 27px;
}

.brand-mark span {
  position: absolute;
  top: 2px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1.3px solid var(--brown);
}

.brand-mark span:first-child {
  left: 0;
  background: var(--coral-soft);
}

.brand-mark span:last-child {
  right: 0;
  background: var(--sage-soft);
  mix-blend-mode: multiply;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.brand-copy strong {
  font-family: "Songti SC", "STSong", serif;
  font-size: 25px;
  font-weight: 600;
  letter-spacing: 0.16em;
}

.brand-copy small {
  color: var(--ink-faint);
  font-family: Georgia, serif;
  font-size: 7px;
  letter-spacing: 0.15em;
}

.main-nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav-item {
  position: relative;
  display: flex;
  width: 100%;
  align-items: center;
  gap: 13px;
  padding: 13px 15px;
  border-radius: 13px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 14px;
  text-align: left;
  transition: 180ms ease;
}

.nav-item:hover {
  background: rgba(255, 253, 249, 0.75);
  color: var(--ink);
}

.nav-item.active {
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 4px 18px rgba(67, 49, 39, 0.06);
}

.nav-item.active::before {
  position: absolute;
  left: -24px;
  width: 3px;
  height: 22px;
  border-radius: 0 3px 3px 0;
  background: var(--coral);
  content: "";
}

.nav-item .icon {
  width: 18px;
  height: 18px;
}

.nav-count {
  display: grid;
  min-width: 21px;
  height: 21px;
  margin-left: auto;
  padding: 0 5px;
  place-items: center;
  border-radius: 99px;
  background: var(--paper-deep);
  color: var(--ink-soft);
  font-size: 10px;
}

.sidebar-note {
  margin: auto 9px 25px;
  padding: 23px 0 0;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
}

.sidebar-note .icon {
  width: 17px;
  height: 17px;
  margin-bottom: 12px;
  color: var(--coral);
}

.sidebar-note p {
  margin: 0 0 9px;
  font-family: "Songti SC", "STSong", serif;
  font-size: 13px;
  line-height: 1.75;
}

.sidebar-note span {
  color: var(--ink-faint);
  font-size: 9px;
  letter-spacing: 0.04em;
}

.couple-profile {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 13px 10px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: rgba(255, 253, 249, 0.65);
  text-align: left;
  transition: 180ms ease;
}

.couple-profile:hover {
  border-color: var(--line-strong);
  background: var(--card);
}

.mini-avatar {
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 auto;
  place-items: center;
  border: 2px solid var(--card);
  border-radius: 50%;
  font-family: "Songti SC", serif;
  font-size: 12px;
}

.avatar-a {
  background: var(--coral-soft);
  color: #8b4337;
}

.avatar-b {
  margin-left: -8px;
  background: var(--sage-soft);
  color: #4e5942;
}

.profile-copy {
  display: flex;
  min-width: 0;
  flex: 1;
  flex-direction: column;
  gap: 3px;
  padding-left: 9px;
}

.profile-copy strong {
  overflow: hidden;
  font-family: "Songti SC", "STSong", serif;
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.profile-copy small {
  overflow: hidden;
  color: var(--ink-faint);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.couple-profile > .icon {
  width: 15px;
  height: 15px;
  color: var(--ink-faint);
}

.main-content {
  grid-column: 2;
  min-width: 0;
  padding: 0 44px;
}

.topbar {
  position: relative;
  z-index: 10;
  display: flex;
  height: 108px;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  border-bottom: 1px solid var(--line);
}

.greeting-block {
  min-width: 0;
}

.eyebrow {
  display: block;
  color: var(--ink-faint);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 9px;
  letter-spacing: 0.17em;
  line-height: 1.5;
}

.greeting-block h2 {
  margin: 5px 0 0;
  overflow: hidden;
  font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.top-search {
  display: flex;
  width: 210px;
  height: 42px;
  align-items: center;
  gap: 9px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: rgba(255, 253, 249, 0.55);
  transition: 180ms ease;
}

.top-search:focus-within {
  border-color: var(--line-strong);
  background: var(--card);
  box-shadow: 0 4px 18px rgba(67, 49, 39, 0.06);
}

.top-search .icon {
  width: 16px;
  height: 16px;
  color: var(--ink-faint);
}

.top-search input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 11px;
}

.top-search input::placeholder {
  color: var(--ink-faint);
}

.top-search kbd {
  padding: 3px 5px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--paper);
  color: var(--ink-faint);
  font-family: inherit;
  font-size: 8px;
  box-shadow: none;
}

.button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 18px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  transition: 180ms ease;
}

.button .icon {
  width: 16px;
  height: 16px;
}

.button:hover {
  transform: translateY(-1px);
}

.button-dark {
  background: var(--brown);
  color: var(--cream);
  box-shadow: 0 8px 24px rgba(59, 48, 45, 0.16);
}

.button-dark:hover {
  background: #251f1d;
  box-shadow: 0 10px 30px rgba(59, 48, 45, 0.22);
}

.button-ink {
  background: var(--brown);
  color: var(--cream);
}

.button-coral {
  background: var(--coral);
  color: #fff;
  box-shadow: 0 7px 19px rgba(190, 91, 72, 0.23);
}

.button-coral:hover {
  background: var(--coral-dark);
}

.button-outline,
.button-outline-dark {
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--ink);
}

.button-outline:hover {
  background: rgba(255, 253, 249, 0.65);
}

.button-outline-dark {
  border-color: rgba(255, 250, 242, 0.28);
  color: var(--cream);
}

.button-outline-dark:hover {
  background: rgba(255, 255, 255, 0.08);
}

.button-danger {
  background: var(--danger);
  color: #fff;
}

.text-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 0;
  background: transparent;
  color: var(--ink);
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
}

.text-link .icon {
  width: 14px;
  height: 14px;
  transition: transform 180ms ease;
}

.text-link:hover .icon {
  transform: translateX(3px);
}

.mobile-menu {
  display: none;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--card);
}

.views {
  padding: 29px 0 0;
}

.view {
  display: none;
  animation: view-in 460ms var(--ease);
}

.view.active {
  display: block;
}

@keyframes view-in {
  from {
    opacity: 0;
    transform: translateY(9px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hero-card {
  position: relative;
  display: grid;
  min-height: 377px;
  grid-template-columns: minmax(0, 1.05fr) minmax(380px, 0.95fr);
  overflow: hidden;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(120deg, rgba(255, 248, 239, 0.05), transparent 35%),
    linear-gradient(125deg, #edc6b6 0%, #f3ded0 48%, #dedcc9 100%);
  box-shadow: var(--shadow-sm);
}

.hero-card::after {
  position: absolute;
  right: -15%;
  bottom: -45%;
  width: 58%;
  aspect-ratio: 1;
  border: 1px solid rgba(255, 255, 255, 0.27);
  border-radius: 50%;
  content: "";
}

.hero-grain {
  position: absolute;
  inset: 0;
  opacity: 0.16;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.25'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

.hero-copy {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 43px 25px 33px 46px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border-radius: 99px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.pill .icon {
  width: 12px;
  height: 12px;
}

.pill-light {
  border: 1px solid rgba(66, 48, 42, 0.13);
  background: rgba(255, 253, 249, 0.32);
  color: var(--ink);
}

.hero-copy h1 {
  margin: 25px 0 13px;
  font-size: clamp(32px, 3.2vw, 48px);
  font-weight: 500;
  letter-spacing: -0.075em;
  line-height: 1.27;
}

.hero-copy h1 em {
  position: relative;
  color: var(--coral-dark);
  font-style: normal;
}

.hero-copy h1 em::after {
  position: absolute;
  right: 0.2em;
  bottom: -0.08em;
  left: 0.12em;
  height: 7px;
  border-top: 1.5px solid rgba(200, 93, 74, 0.42);
  border-radius: 50%;
  content: "";
  transform: rotate(-1.5deg);
}

.hero-copy > p {
  max-width: 430px;
  margin-bottom: 22px;
  color: rgba(52, 44, 41, 0.67);
  font-family: "Songti SC", "STSong", serif;
  font-size: 12px;
  line-height: 1.85;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 20px;
}

.hero-actions .button {
  min-height: 38px;
  padding: 0 16px;
  font-size: 11px;
}

.hero-small-stats {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: auto;
  padding-top: 25px;
}

.hero-small-stats div:not(.stat-divider) {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.hero-small-stats strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 500;
}

.hero-small-stats span {
  color: var(--ink-soft);
  font-size: 9px;
}

.stat-divider {
  width: 1px;
  height: 20px;
  background: rgba(52, 44, 41, 0.16);
}

.hero-visual {
  position: relative;
  z-index: 1;
  min-height: 377px;
}

.hero-orbit {
  position: absolute;
  border: 1px solid rgba(52, 44, 41, 0.13);
  border-radius: 50%;
}

.orbit-one {
  top: 35px;
  right: 70px;
  width: 310px;
  height: 310px;
}

.orbit-two {
  top: 79px;
  right: 115px;
  width: 220px;
  height: 220px;
  border-style: dashed;
}

.polaroid {
  position: absolute;
  padding: 8px 8px 27px;
  border-radius: 3px;
  background: #fffcf6;
  box-shadow: 0 18px 42px rgba(80, 53, 39, 0.16);
}

.polaroid::after {
  position: absolute;
  top: -8px;
  left: 50%;
  width: 44px;
  height: 17px;
  background: rgba(255, 248, 232, 0.6);
  content: "";
  transform: translateX(-50%) rotate(-2deg);
}

.polaroid-image {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--peach);
}

.polaroid span {
  display: block;
  padding-top: 7px;
  color: #756660;
  font-family: "Songti SC", "STSong", serif;
  font-size: 9px;
  text-align: center;
}

.polaroid-back {
  top: 44px;
  right: 42px;
  z-index: 1;
  width: 164px;
  height: 204px;
  transform: rotate(8deg);
}

.polaroid-front {
  top: 116px;
  left: 33px;
  z-index: 3;
  width: 194px;
  height: 225px;
  transform: rotate(-5.5deg);
}

.art-seaside {
  background:
    radial-gradient(circle at 69% 23%, #fff3c4 0 9%, transparent 10%),
    linear-gradient(174deg, transparent 57%, rgba(255, 243, 219, 0.38) 58% 61%, transparent 62%),
    linear-gradient(174deg, #9bbfc1 0 55%, #e3c1a4 56% 68%, #d7aa8f 69% 100%);
}

.art-seaside::before,
.art-seaside::after {
  position: absolute;
  bottom: 26%;
  background: #4f5853;
  content: "";
}

.art-seaside::before {
  left: 37%;
  width: 7px;
  height: 27px;
  border-radius: 8px 8px 2px 2px;
  box-shadow: 19px 2px 0 -1px #4f5853;
}

.art-seaside::after {
  left: calc(37% - 4px);
  width: 38px;
  height: 7px;
  border-radius: 50% 50% 1px 1px;
  background: #59605b;
  transform: translateY(22px);
}

.art-coffee {
  background:
    linear-gradient(152deg, transparent 0 48%, rgba(255, 252, 235, 0.19) 49% 60%, transparent 61%),
    radial-gradient(ellipse at 87% 85%, #6f7d63 0 8%, transparent 9%),
    radial-gradient(ellipse at 72% 20%, rgba(255, 249, 220, 0.64) 0 13%, transparent 14%),
    linear-gradient(145deg, #b5a982 0 57%, #938661 58% 100%);
}

.art-coffee::before,
.art-coffee::after {
  position: absolute;
  bottom: 29%;
  border-radius: 5px 5px 45% 45%;
  background: #f2e7ce;
  box-shadow: inset 0 0 0 1px rgba(68, 55, 47, 0.14), 0 9px 20px rgba(57, 45, 34, 0.17);
  content: "";
}

.art-coffee::before {
  left: 20%;
  width: 46px;
  height: 35px;
}

.art-coffee::after {
  right: 17%;
  width: 39px;
  height: 29px;
  background: #cf9c7f;
}

.hero-note {
  position: absolute;
  z-index: 4;
  top: 42px;
  left: 4px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 11px 14px;
  border: 1px solid rgba(79, 57, 45, 0.08);
  border-radius: 9px;
  background: #fffaf1;
  color: var(--ink-soft);
  font-family: "Songti SC", "STSong", serif;
  font-size: 10px;
  line-height: 1.45;
  box-shadow: 0 9px 22px rgba(81, 55, 39, 0.11);
  transform: rotate(-4deg);
}

.hero-note .icon {
  width: 18px;
  height: 18px;
  color: var(--coral);
  fill: rgba(223, 115, 95, 0.15);
}

.hero-stamp {
  position: absolute;
  z-index: 5;
  right: 28px;
  bottom: 29px;
  display: flex;
  width: 87px;
  height: 87px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(58, 47, 41, 0.24);
  border-radius: 50%;
  color: var(--ink-soft);
  transform: rotate(10deg);
}

.hero-stamp::before {
  position: absolute;
  inset: 6px;
  border: 1px dashed rgba(58, 47, 41, 0.25);
  border-radius: 50%;
  content: "";
}

.hero-stamp span {
  font-family: Georgia, serif;
  font-size: 6px;
  letter-spacing: 0.18em;
}

.hero-stamp strong {
  margin: 2px 0;
  font-family: Georgia, serif;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: 0.03em;
}

.home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.9fr) minmax(275px, 0.8fr);
  gap: 22px;
  margin-top: 28px;
}

.section-block {
  min-width: 0;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.section-heading h3 {
  margin: 4px 0 0;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.recent-memories {
  display: flex;
  flex-direction: column;
  gap: 11px;
}

.recent-memory {
  position: relative;
  display: grid;
  grid-template-columns: 152px minmax(0, 1fr) auto;
  overflow: hidden;
  align-items: stretch;
  border: 1px solid rgba(80, 61, 51, 0.07);
  border-radius: var(--radius-md);
  background: rgba(255, 253, 249, 0.73);
  cursor: pointer;
  transition: transform 250ms var(--ease), box-shadow 250ms var(--ease), background 180ms ease;
}

.recent-memory:hover {
  background: var(--card);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.memory-media {
  position: relative;
  min-height: 126px;
  overflow: hidden;
  background: var(--paper-deep);
}

.memory-media img,
.memory-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 600ms var(--ease);
}

.recent-memory:hover .memory-media img,
.recent-memory:hover .memory-media video {
  transform: scale(1.035);
}

.memory-media.no-photo {
  background: linear-gradient(140deg, #e8c7b9, #d9dcc9);
}

.memory-media .video-badge {
  position: absolute;
  right: 8px;
  bottom: 8px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px 7px;
  border-radius: 99px;
  background: rgba(50, 43, 40, 0.79);
  color: #fff;
  font-size: 8px;
  backdrop-filter: blur(4px);
}

.video-badge .icon {
  width: 11px;
  height: 11px;
}

.recent-memory-info {
  min-width: 0;
  padding: 19px 19px 16px;
}

.recent-label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  color: var(--ink-faint);
  font-size: 9px;
}

.recent-label span + span::before {
  margin-right: 8px;
  content: "·";
}

.sample-badge {
  display: inline-flex;
  align-items: center;
  min-height: 17px;
  padding: 0 6px;
  border: 1px solid rgba(111, 94, 84, 0.12);
  border-radius: 99px;
  background: rgba(241, 233, 223, 0.8);
  color: var(--ink-faint);
  font-size: 7px;
  line-height: 1;
  white-space: nowrap;
}

.mood-tag {
  color: var(--coral-dark);
}

.recent-memory-info h4 {
  margin: 0 0 6px;
  overflow: hidden;
  font-family: "Songti SC", "STSong", serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.recent-memory-info p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--ink-soft);
  font-family: "Songti SC", "STSong", serif;
  font-size: 10px;
  line-height: 1.7;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.memory-location {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin-top: 10px;
  color: var(--ink-faint);
  font-size: 9px;
}

.memory-location .icon {
  width: 11px;
  height: 11px;
}

.memory-favorite {
  width: 38px;
  height: 38px;
  margin: 15px 13px 0 0;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-faint);
  transition: 180ms ease;
}

.memory-favorite:hover {
  background: #fbece7;
  color: var(--coral);
}

.memory-favorite.active {
  color: var(--coral);
}

.memory-favorite.active .icon {
  fill: rgba(223, 115, 95, 0.2);
}

.home-side {
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.number-card {
  padding: 22px 21px 20px;
  border-radius: var(--radius-lg);
  background: var(--brown);
  color: var(--cream);
  box-shadow: var(--shadow-sm);
}

.number-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.number-card .eyebrow {
  color: rgba(255, 248, 239, 0.42);
}

.number-card-head .icon {
  width: 15px;
  height: 15px;
  color: #f0b8a6;
}

.number-card > p {
  margin: 14px 0 19px;
  color: rgba(255, 248, 239, 0.77);
  font-family: "Songti SC", "STSong", serif;
  font-size: 12px;
  line-height: 1.7;
}

.number-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 8px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 248, 239, 0.11);
}

.number-grid div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.number-grid strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 25px;
  font-weight: 400;
}

.number-grid span {
  color: rgba(255, 248, 239, 0.45);
  font-size: 8px;
}

.next-date-card {
  position: relative;
  flex: 1;
  overflow: hidden;
  padding: 20px 20px 19px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 249, 0.75);
}

.next-date-card::after {
  position: absolute;
  right: -33px;
  bottom: -40px;
  width: 118px;
  height: 118px;
  border: 1px solid rgba(223, 115, 95, 0.14);
  border-radius: 50%;
  content: "";
}

.next-date-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}

.calendar-chip {
  display: flex;
  width: 44px;
  height: 47px;
  flex-direction: column;
  overflow: hidden;
  align-items: center;
  border-radius: 8px;
  background: #f5dfd6;
  color: var(--coral-dark);
}

.calendar-chip span {
  width: 100%;
  padding: 3px 0;
  background: var(--coral);
  color: #fff8ee;
  font-family: Georgia, serif;
  font-size: 6px;
  letter-spacing: 0.1em;
  text-align: center;
}

.calendar-chip strong {
  margin-top: 3px;
  font-family: Georgia, serif;
  font-size: 17px;
  font-weight: 500;
}

.next-date-card h3 {
  margin: 17px 0 7px;
  font-size: 17px;
  font-weight: 600;
}

.next-date-card p {
  min-height: 34px;
  margin-bottom: 13px;
  color: var(--ink-soft);
  font-family: "Songti SC", "STSong", serif;
  font-size: 10px;
  line-height: 1.7;
}

.next-date-card .button {
  position: relative;
  z-index: 2;
  min-height: 34px;
  padding: 0 12px;
  font-size: 9px;
}

.quote-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin: 31px 0 4px;
  padding: 23px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
}

.quote-strip p {
  margin: 0;
  font-family: "Songti SC", "STSong", serif;
  font-size: 12px;
  letter-spacing: 0.03em;
}

.quote-mark {
  color: var(--coral);
  font-family: Georgia, serif;
  font-size: 36px;
  line-height: 0.8;
}

.quote-author {
  color: var(--ink-faint);
  font-size: 8px;
  white-space: nowrap;
}

.page-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 30px;
  padding: 11px 2px 28px;
}

.page-heading h1 {
  margin: 5px 0 8px;
  font-size: 41px;
  font-weight: 500;
  letter-spacing: -0.07em;
}

.page-heading p {
  margin: 0;
  color: var(--ink-soft);
  font-family: "Songti SC", "STSong", serif;
  font-size: 12px;
}

.filter-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 253, 249, 0.55);
}

.year-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.year-filter {
  padding: 7px 12px;
  border-radius: 99px;
  background: transparent;
  color: var(--ink-soft);
  font-size: 10px;
}

.year-filter:hover {
  background: var(--paper-deep);
}

.year-filter.active {
  background: var(--brown);
  color: var(--cream);
}

.inline-search {
  display: flex;
  min-width: 210px;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border-bottom: 1px solid var(--line-strong);
}

.inline-search .icon {
  width: 14px;
  height: 14px;
  color: var(--ink-faint);
}

.inline-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 10px;
}

.timeline {
  position: relative;
}

.timeline-month-content {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 11px;
}

.timeline::before {
  position: absolute;
  top: 12px;
  bottom: 20px;
  left: 111px;
  width: 1px;
  background: var(--line);
  content: "";
}

.timeline-month {
  position: relative;
  display: grid;
  grid-template-columns: 90px 22px minmax(0, 1fr);
  gap: 0 11px;
  padding-bottom: 27px;
}

.timeline-month-label {
  padding-top: 19px;
  color: var(--ink-faint);
  font-family: Georgia, serif;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-align: right;
}

.timeline-dot {
  z-index: 1;
  width: 9px;
  height: 9px;
  margin: 22px 0 0 6px;
  border: 2px solid var(--paper);
  border-radius: 50%;
  background: var(--coral);
  box-shadow: 0 0 0 1px var(--coral);
}

.timeline-memory-card {
  display: grid;
  grid-template-columns: 185px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 249, 0.73);
  transition: 240ms var(--ease);
}

.timeline-memory-card:hover {
  background: var(--card);
  box-shadow: var(--shadow-sm);
  transform: translateY(-2px);
}

.timeline-memory-card .memory-media {
  min-height: 155px;
}

.timeline-content {
  min-width: 0;
  padding: 22px 23px;
}

.timeline-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 9px;
  color: var(--ink-faint);
  font-size: 9px;
}

.timeline-meta .memory-location {
  margin: 0;
}

.timeline-content h3 {
  margin-bottom: 7px;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.timeline-content > p {
  display: -webkit-box;
  overflow: hidden;
  margin-bottom: 13px;
  color: var(--ink-soft);
  font-family: "Songti SC", "STSong", serif;
  font-size: 11px;
  line-height: 1.78;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.timeline-footer {
  display: flex;
  align-items: center;
  gap: 13px;
}

.timeline-footer .text-link {
  font-size: 9px;
}

.favorite-button,
.delete-button {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  background: transparent;
  color: var(--ink-faint);
  font-size: 9px;
}

.favorite-button .icon,
.delete-button .icon {
  width: 13px;
  height: 13px;
}

.favorite-button.active {
  color: var(--coral);
}

.favorite-button.active .icon {
  fill: rgba(223, 115, 95, 0.2);
}

.delete-button:hover {
  color: var(--danger);
}

.empty-state {
  display: flex;
  min-height: 280px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 30px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-lg);
  color: var(--ink-soft);
  text-align: center;
}

.empty-state .empty-art {
  display: grid;
  width: 62px;
  height: 62px;
  margin-bottom: 15px;
  place-items: center;
  border-radius: 50%;
  background: var(--coral-soft);
  color: var(--coral-dark);
}

.empty-state .icon {
  width: 25px;
  height: 25px;
}

.empty-state h3 {
  margin-bottom: 5px;
  font-size: 18px;
}

.empty-state p {
  max-width: 320px;
  margin-bottom: 17px;
  font-size: 10px;
  line-height: 1.7;
}

.gallery-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

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

.filter-chip {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 5px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: rgba(255, 253, 249, 0.48);
  color: var(--ink-soft);
  font-size: 10px;
  transition: 180ms ease;
}

.filter-chip:hover {
  border-color: var(--line-strong);
  background: var(--card);
}

.filter-chip.active {
  border-color: var(--brown);
  background: var(--brown);
  color: var(--cream);
}

.filter-chip .icon {
  width: 12px;
  height: 12px;
}

.gallery-count {
  color: var(--ink-faint);
  font-size: 9px;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 226px;
  gap: 11px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: var(--paper-deep);
  cursor: pointer;
  animation: fade-up 420ms var(--ease) both;
}

@keyframes fade-up {
  from {
    opacity: 0;
    transform: translateY(7px);
  }
}

.gallery-item.wide {
  grid-column: span 2;
}

.gallery-item.tall {
  grid-row: span 2;
}

.gallery-item img,
.gallery-item video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 700ms var(--ease), filter 300ms ease;
}

.gallery-item:hover img,
.gallery-item:hover video {
  filter: brightness(0.9);
  transform: scale(1.035);
}

.gallery-item::after {
  position: absolute;
  inset: 40% 0 0;
  background: linear-gradient(transparent, rgba(32, 28, 26, 0.67));
  content: "";
  opacity: 0;
  transition: opacity 220ms ease;
}

.gallery-item:hover::after,
.gallery-item:focus-visible::after,
.gallery-item.has-caption::after {
  opacity: 1;
}

.gallery-caption {
  position: absolute;
  z-index: 2;
  right: 13px;
  bottom: 12px;
  left: 13px;
  color: #fff;
  opacity: 0;
  transition: opacity 220ms ease;
}

.gallery-item:hover .gallery-caption,
.gallery-item:focus-visible .gallery-caption {
  opacity: 1;
}

.gallery-caption h4 {
  margin: 0 0 3px;
  overflow: hidden;
  font-family: "Songti SC", "STSong", serif;
  font-size: 13px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.gallery-caption span {
  font-size: 8px;
  opacity: 0.72;
}

.gallery-heart {
  position: absolute;
  z-index: 3;
  top: 10px;
  right: 10px;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 252, 246, 0.9);
  color: var(--coral);
  backdrop-filter: blur(4px);
}

.gallery-heart .icon {
  width: 13px;
  height: 13px;
  fill: rgba(223, 115, 95, 0.23);
}

.gallery-video-icon {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 50%;
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 50%;
  background: rgba(40, 35, 32, 0.4);
  color: #fff;
  backdrop-filter: blur(6px);
  transform: translate(-50%, -50%);
}

.gallery-video-icon .icon {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.date-overview {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr;
  gap: 12px;
  margin-bottom: 24px;
}

.date-stat {
  position: relative;
  min-height: 162px;
  overflow: hidden;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 249, 0.66);
}

.date-stat.primary {
  background: linear-gradient(135deg, #df735f, #c95e4b);
  color: #fff9f0;
}

.date-stat .eyebrow {
  color: var(--ink-faint);
}

.date-stat.primary .eyebrow {
  color: rgba(255, 249, 240, 0.58);
}

.date-stat strong {
  display: block;
  margin: 15px 0 5px;
  font-family: Georgia, serif;
  font-size: 36px;
  font-weight: 400;
  letter-spacing: -0.04em;
}

.date-stat.primary strong {
  font-size: 46px;
}

.date-stat p {
  margin: 0;
  color: var(--ink-soft);
  font-family: "Songti SC", "STSong", serif;
  font-size: 11px;
  line-height: 1.7;
}

.date-stat.primary p {
  color: rgba(255, 249, 240, 0.72);
}

.date-stat .stat-heart {
  position: absolute;
  right: 17px;
  bottom: 11px;
  width: 66px;
  height: 66px;
  color: rgba(255, 249, 240, 0.13);
  fill: currentColor;
}

.date-stat .date-art {
  position: absolute;
  right: -20px;
  bottom: -26px;
  width: 100px;
  height: 100px;
  border: 1px solid var(--line);
  border-radius: 50%;
}

.dates-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.7fr);
  gap: 22px;
}

.upcoming-panel {
  min-width: 0;
}

.upcoming-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.upcoming-item {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 253, 249, 0.65);
}

.upcoming-date {
  display: flex;
  width: 49px;
  height: 54px;
  flex-direction: column;
  overflow: hidden;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  background: var(--paper-deep);
}

.upcoming-date strong {
  font-family: Georgia, serif;
  font-size: 18px;
  font-weight: 500;
}

.upcoming-date span {
  color: var(--ink-faint);
  font-family: Georgia, serif;
  font-size: 7px;
  letter-spacing: 0.08em;
}

.upcoming-copy {
  min-width: 0;
}

.upcoming-copy h4 {
  margin: 0 0 4px;
  overflow: hidden;
  font-family: "Songti SC", "STSong", serif;
  font-size: 14px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.upcoming-copy p {
  overflow: hidden;
  margin: 0;
  color: var(--ink-faint);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.days-away {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 9px;
  white-space: nowrap;
}

.days-away strong {
  color: var(--coral-dark);
  font-family: Georgia, serif;
  font-size: 18px;
  font-weight: 500;
}

.delete-date {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border-radius: 50%;
  background: transparent;
  color: var(--ink-faint);
  opacity: 0;
  transition: 180ms ease;
}

.upcoming-item:hover .delete-date {
  opacity: 1;
}

.delete-date:hover {
  background: #f8e4dc;
  color: var(--danger);
}

.delete-date .icon {
  width: 13px;
  height: 13px;
}

.date-idea-panel {
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--sage);
  color: #fffaf1;
}

.date-idea-art {
  position: relative;
  height: 145px;
  overflow: hidden;
  background: linear-gradient(#b7c1ae, #d6d8bd);
}

.date-idea-art .sun {
  position: absolute;
  top: 27px;
  right: 27%;
  width: 41px;
  height: 41px;
  border-radius: 50%;
  background: #f3d9ab;
  box-shadow: 0 0 30px rgba(243, 217, 171, 0.55);
}

.date-idea-art .hill {
  position: absolute;
  border-radius: 50% 50% 0 0;
  transform: rotate(-3deg);
}

.date-idea-art .hill-a {
  right: -30px;
  bottom: -48px;
  width: 85%;
  height: 115px;
  background: #7e8d75;
}

.date-idea-art .hill-b {
  bottom: -55px;
  left: -55px;
  width: 83%;
  height: 120px;
  background: #6e7e66;
  transform: rotate(5deg);
}

.tiny-couple {
  position: absolute;
  z-index: 2;
  bottom: 35px;
  left: 50%;
  color: rgba(255, 249, 237, 0.8);
  font-family: Georgia, serif;
  font-size: 28px;
  transform: rotate(-8deg);
}

.date-idea-body {
  padding: 25px 24px 24px;
}

.date-idea-body .eyebrow {
  color: rgba(255, 250, 241, 0.54);
}

.date-idea-body h3 {
  margin: 7px 0 10px;
  font-size: 20px;
}

.date-idea-body p {
  min-height: 61px;
  margin-bottom: 16px;
  color: rgba(255, 250, 241, 0.72);
  font-family: "Songti SC", "STSong", serif;
  font-size: 11px;
  line-height: 1.85;
}

.app-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 39px;
  padding: 22px 2px 29px;
  border-top: 1px solid var(--line);
  color: var(--ink-faint);
  font-size: 8px;
  letter-spacing: 0.04em;
}

.mobile-nav,
.nav-scrim {
  display: none;
}

.access-gate {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(380px, 0.9fr);
  overflow: auto;
  background: var(--paper);
}

.access-gate[hidden] {
  display: none;
}

.access-gate-art {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(circle at 72% 21%, rgba(255, 241, 210, 0.7), transparent 18%),
    linear-gradient(143deg, #e7baa9 0%, #e9cbbd 45%, #d9dcc8 100%);
}

.access-gate-art::after {
  position: absolute;
  right: -180px;
  bottom: -310px;
  width: 650px;
  height: 650px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 50%;
  content: "";
}

.gate-orbit {
  position: absolute;
  border: 1px solid rgba(63, 48, 42, 0.16);
  border-radius: 50%;
}

.gate-orbit-a {
  top: 7%;
  left: 16%;
  width: 440px;
  height: 440px;
}

.gate-orbit-b {
  top: 16%;
  left: 25%;
  width: 300px;
  height: 300px;
  border-style: dashed;
}

.gate-card {
  position: absolute;
  display: grid;
  place-items: center;
  background: #fffaf1;
  box-shadow: 0 28px 70px rgba(78, 52, 39, 0.17);
  font-family: "Songti SC", "STSong", serif;
}

.gate-card-a {
  top: 28%;
  left: 25%;
  width: 205px;
  height: 255px;
  border: 10px solid #fffaf1;
  outline: 1px solid rgba(73, 54, 45, 0.09);
  background:
    radial-gradient(circle at 62% 35%, #f3d6a9 0 12%, transparent 13%),
    linear-gradient(164deg, transparent 53%, #87937b 54% 72%, #6d7a68 73%),
    #b8c3b1;
  color: rgba(255, 250, 241, 0.82);
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
  transform: rotate(-7deg);
}

.gate-card-b {
  top: 16%;
  left: 51%;
  width: 178px;
  height: 214px;
  grid-template-rows: auto auto;
  gap: 13px;
  border-width: 9px 9px 30px;
  border-style: solid;
  border-color: #fffaf1;
  color: var(--coral-dark);
  transform: rotate(8deg);
}

.gate-card-b .icon {
  width: 49px;
  height: 49px;
  fill: rgba(223, 115, 95, 0.13);
}

.gate-card-b span {
  font-family: Georgia, serif;
  font-size: 9px;
  letter-spacing: 0.16em;
  line-height: 1.6;
  text-align: center;
}

.access-gate-copy {
  display: flex;
  width: min(390px, calc(100% - 70px));
  align-self: center;
  justify-self: center;
  flex-direction: column;
  padding: 45px 0;
}

.gate-brand {
  width: max-content;
  margin-bottom: 55px;
}

.access-gate-copy h1 {
  margin: 8px 0 16px;
  font-size: clamp(40px, 5vw, 58px);
  font-weight: 500;
  letter-spacing: -0.08em;
  line-height: 1.25;
}

.access-gate-copy > p {
  margin-bottom: 27px;
  color: var(--ink-soft);
  font-family: "Songti SC", "STSong", serif;
  font-size: 12px;
  line-height: 1.8;
}

.gate-password {
  display: flex;
  height: 50px;
  align-items: center;
  gap: 10px;
  margin-bottom: 13px;
  padding: 0 15px;
  border: 1px solid var(--line-strong);
  border-radius: 14px;
  background: var(--card);
  transition: 180ms ease;
}

.gate-password:focus-within {
  border-color: rgba(223, 115, 95, 0.48);
  box-shadow: 0 0 0 4px rgba(223, 115, 95, 0.08);
}

.gate-password .icon {
  width: 17px;
  height: 17px;
  color: var(--ink-faint);
}

.gate-password input {
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 12px;
}

.access-gate-copy > .button {
  width: 100%;
  min-height: 49px;
  margin-top: 2px;
}

.access-gate-copy > .button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.gate-error {
  display: none;
  margin-top: 9px;
  color: var(--danger);
  font-size: 9px;
}

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

.gate-note {
  margin-top: 17px;
  color: var(--ink-faint);
  font-size: 8px;
  text-align: center;
}

.modal-layer,
.confirm-layer {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-layer.open,
.confirm-layer.open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(43, 34, 31, 0.48);
  backdrop-filter: blur(7px);
  animation: fade-in 220ms ease both;
}

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

.modal {
  position: relative;
  z-index: 1;
  width: min(720px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 27px 30px 30px;
  border-radius: 24px;
  background: var(--card);
  box-shadow: var(--shadow-lg);
  animation: modal-in 380ms var(--ease) both;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 20px;
}

.modal-header h2 {
  margin: 4px 0 0;
  font-size: 27px;
  font-weight: 500;
  letter-spacing: -0.05em;
}

.icon-button {
  display: grid;
  width: 37px;
  height: 37px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink-soft);
  transition: 180ms ease;
}

.icon-button:hover {
  background: var(--paper-deep);
  color: var(--ink);
  transform: rotate(4deg);
}

.icon-button .icon {
  width: 17px;
  height: 17px;
}

.upload-zone {
  display: flex;
  min-height: 124px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 18px;
  border: 1px dashed rgba(91, 69, 58, 0.26);
  border-radius: 16px;
  background:
    linear-gradient(rgba(255, 253, 249, 0.58), rgba(255, 253, 249, 0.58)),
    repeating-linear-gradient(45deg, #f5ede3 0 8px, #f8f2e9 8px 16px);
  cursor: pointer;
  text-align: center;
  transition: 180ms ease;
}

.upload-zone:hover,
.upload-zone.dragover {
  border-color: var(--coral);
  background: #fff7f2;
}

.upload-zone input {
  display: none;
}

.upload-icon {
  display: grid;
  width: 38px;
  height: 38px;
  margin-bottom: 9px;
  place-items: center;
  border-radius: 50%;
  background: var(--coral-soft);
  color: var(--coral-dark);
}

.upload-icon .icon {
  width: 18px;
  height: 18px;
}

.upload-zone strong {
  margin-bottom: 3px;
  font-family: "Songti SC", "STSong", serif;
  font-size: 13px;
  font-weight: 600;
}

.upload-zone > span:not(.upload-icon) {
  color: var(--ink-soft);
  font-size: 9px;
}

.upload-zone small {
  margin-top: 6px;
  color: var(--ink-faint);
  font-size: 8px;
}

.upload-previews {
  display: none;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.upload-previews.has-files {
  display: grid;
}

.upload-preview {
  position: relative;
  overflow: hidden;
  aspect-ratio: 1;
  border-radius: 10px;
  background: var(--paper-deep);
}

.upload-preview img,
.upload-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.upload-preview .preview-type {
  position: absolute;
  bottom: 5px;
  left: 5px;
  display: grid;
  width: 19px;
  height: 19px;
  place-items: center;
  border-radius: 50%;
  background: rgba(46, 38, 34, 0.66);
  color: #fff;
}

.upload-preview .preview-type .icon {
  width: 10px;
  height: 10px;
}

.remove-preview {
  position: absolute;
  top: 4px;
  right: 4px;
  display: grid;
  width: 19px;
  height: 19px;
  place-items: center;
  border-radius: 50%;
  background: rgba(46, 38, 34, 0.72);
  color: #fff;
}

.remove-preview .icon {
  width: 10px;
  height: 10px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-top: 18px;
}

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

.field-wide {
  grid-column: 1 / -1;
}

.field > span:first-child {
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 600;
}

.field b {
  color: var(--coral);
  font-weight: 500;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: 0;
  background: #fbf8f3;
  font-size: 11px;
  transition: 160ms ease;
}

.field input,
.field select {
  height: 41px;
  padding: 0 12px;
}

.field textarea {
  min-height: 82px;
  padding: 11px 12px;
  line-height: 1.7;
  resize: vertical;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: rgba(223, 115, 95, 0.48);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(223, 115, 95, 0.08);
}

.field input::placeholder,
.field textarea::placeholder {
  color: #b4a9a2;
}

.select-wrap {
  position: relative;
}

.select-wrap select {
  appearance: none;
}

.select-wrap::after {
  position: absolute;
  top: 13px;
  right: 14px;
  color: var(--ink-faint);
  content: "⌄";
  pointer-events: none;
}

.mood-options {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.mood-options label {
  cursor: pointer;
}

.mood-options input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.mood-options span {
  display: inline-flex;
  min-height: 31px;
  align-items: center;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: #fbf8f3;
  color: var(--ink-soft);
  font-size: 9px;
  transition: 160ms ease;
}

.mood-options input:checked + span {
  border-color: rgba(223, 115, 95, 0.36);
  background: #faeae4;
  color: var(--coral-dark);
}

.mood-options input:focus-visible + span {
  outline: 2px solid rgba(223, 115, 95, 0.32);
  outline-offset: 2px;
}

.modal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-top: 22px;
  padding-top: 19px;
  border-top: 1px solid var(--line);
}

.modal-footer-right {
  justify-content: flex-end;
}

.favorite-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 10px;
  cursor: pointer;
}

.favorite-toggle input {
  position: absolute;
  opacity: 0;
}

.toggle-heart {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper);
  color: var(--ink-faint);
  transition: 180ms ease;
}

.toggle-heart .icon {
  width: 14px;
  height: 14px;
}

.favorite-toggle input:checked + .toggle-heart {
  border-color: #f3c7bd;
  background: #fbe9e4;
  color: var(--coral);
}

.favorite-toggle input:checked + .toggle-heart .icon {
  fill: rgba(223, 115, 95, 0.25);
}

.small-modal {
  width: min(540px, 100%);
}

.settings-modal {
  width: min(660px, 100%);
}

.device-panel {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 21px;
  padding: 17px 18px;
  border: 1px solid rgba(135, 145, 122, 0.28);
  border-radius: 14px;
  background: linear-gradient(120deg, rgba(223, 228, 213, 0.82), rgba(255, 251, 243, 0.9));
}

.device-panel[hidden] {
  display: none;
}

.device-icon {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: var(--sage);
  color: #fffaf1;
}

.device-icon .icon {
  width: 19px;
  height: 19px;
}

.device-copy {
  min-width: 0;
  flex: 1;
}

.device-copy strong {
  display: block;
  margin: 3px 0 5px;
  font-family: "Songti SC", "STSong", serif;
  font-size: 13px;
}

.device-copy p {
  margin: 0 0 5px;
  color: var(--ink-soft);
  font-size: 8px;
}

.device-copy code {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  padding: 5px 8px;
  border-radius: 6px;
  background: rgba(255, 253, 249, 0.75);
  color: #59634f;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.device-copy small {
  display: block;
  margin-top: 5px;
  color: var(--ink-faint);
  font-size: 8px;
}

.device-panel > .button {
  min-height: 34px;
  flex: 0 0 auto;
  padding: 0 12px;
  font-size: 8px;
}

.storage-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-top: 21px;
  padding: 17px 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #f7f1e8;
}

.storage-panel strong {
  display: block;
  margin: 4px 0;
  font-family: "Songti SC", "STSong", serif;
  font-size: 12px;
}

.storage-panel p {
  margin: 0;
  color: var(--ink-faint);
  font-size: 8px;
  line-height: 1.6;
}

.storage-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 7px;
}

.storage-actions .button {
  min-height: 34px;
  padding: 0 11px;
  font-size: 8px;
}

.file-button {
  cursor: pointer;
}

.file-button input {
  display: none;
}

.danger-link {
  padding: 6px;
  background: transparent;
  color: var(--danger);
  font-size: 9px;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: rgba(28, 24, 22, 0.93);
  color: #fff;
  backdrop-filter: blur(10px);
}

.lightbox.open {
  display: flex;
  animation: fade-in 200ms ease both;
}

.lightbox-stage {
  display: flex;
  width: min(78vw, 1000px);
  height: min(72vh, 720px);
  align-items: center;
  justify-content: center;
}

.lightbox-stage > img,
.lightbox-stage > video {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  object-fit: contain;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.lightbox-close {
  position: absolute;
  z-index: 3;
  top: 24px;
  right: 28px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: grid;
  width: 45px;
  height: 45px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.09);
  color: #fff;
  transform: translateY(-50%);
  transition: 180ms ease;
}

.lightbox-nav:hover {
  background: rgba(255, 255, 255, 0.17);
}

.lightbox-prev {
  left: 25px;
}

.lightbox-next {
  right: 25px;
}

.lightbox-prev .icon {
  transform: rotate(180deg);
}

.lightbox-caption {
  position: absolute;
  right: 80px;
  bottom: 23px;
  left: 80px;
  text-align: center;
}

.lightbox-caption > span {
  color: rgba(255, 255, 255, 0.52);
  font-size: 9px;
}

.lightbox-caption h3 {
  margin: 5px 0 3px;
  font-size: 19px;
  font-weight: 500;
}

.lightbox-caption p {
  max-width: 600px;
  overflow: hidden;
  margin: 0 auto;
  color: rgba(255, 255, 255, 0.55);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.confirm-layer {
  z-index: 140;
}

.confirm-card {
  position: relative;
  z-index: 1;
  width: min(380px, 100%);
  padding: 30px;
  border-radius: 22px;
  background: var(--card);
  box-shadow: var(--shadow-lg);
  text-align: center;
  animation: modal-in 300ms var(--ease) both;
}

.confirm-icon {
  display: grid;
  width: 46px;
  height: 46px;
  margin: 0 auto 13px;
  place-items: center;
  border-radius: 50%;
  background: #f8e4dc;
  color: var(--danger);
}

.confirm-card h3 {
  margin-bottom: 8px;
  font-size: 21px;
}

.confirm-card p {
  margin-bottom: 20px;
  color: var(--ink-soft);
  font-family: "Songti SC", "STSong", serif;
  font-size: 11px;
  line-height: 1.7;
}

.confirm-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.confirm-actions .button {
  min-width: 108px;
}

.toast {
  position: fixed;
  z-index: 200;
  right: 28px;
  bottom: 25px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px 12px 13px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 99px;
  background: rgba(49, 41, 37, 0.95);
  color: var(--cream);
  font-size: 11px;
  box-shadow: 0 15px 45px rgba(46, 35, 30, 0.25);
  opacity: 0;
  pointer-events: none;
  transform: translateY(14px);
  transition: 280ms var(--ease);
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast-icon {
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border-radius: 50%;
  background: var(--coral);
}

.toast-icon .icon {
  width: 12px;
  height: 12px;
  fill: rgba(255, 255, 255, 0.24);
}

@media (max-width: 1180px) {
  .main-content {
    padding: 0 30px;
  }

  .hero-card {
    grid-template-columns: minmax(0, 1.05fr) minmax(330px, 0.85fr);
  }

  .hero-copy {
    padding-left: 36px;
  }

  .hero-note {
    left: -15px;
  }

  .home-grid {
    grid-template-columns: minmax(0, 1.55fr) minmax(255px, 0.7fr);
  }

  .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-auto-rows: 220px;
  }

  .top-search {
    width: 172px;
  }

  .top-search kbd {
    display: none;
  }
}

@media (max-width: 980px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    width: 230px;
    transform: translateX(-100%);
    transition: transform 320ms var(--ease);
  }

  .sidebar.open {
    transform: translateX(0);
    box-shadow: 20px 0 60px rgba(57, 42, 34, 0.16);
  }

  .nav-scrim {
    position: fixed;
    inset: 0;
    z-index: 19;
    background: rgba(46, 37, 33, 0.35);
    backdrop-filter: blur(2px);
  }

  .nav-scrim.open {
    display: block;
  }

  .main-content {
    padding: 0 25px;
  }

  .topbar {
    height: 86px;
  }

  .mobile-menu {
    display: grid;
  }

  .greeting-block {
    flex: 1;
  }

  .top-search {
    width: 42px;
    padding: 0 12px;
    border-radius: 50%;
  }

  .top-search input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
  }

  .top-search:focus-within,
  .top-search.expanded {
    position: absolute;
    right: 173px;
    width: 250px;
    border-radius: 99px;
  }

  .top-search:focus-within input,
  .top-search.expanded input {
    position: static;
    opacity: 1;
    pointer-events: auto;
  }

  .hero-card {
    grid-template-columns: 1.1fr 0.9fr;
  }

  .hero-copy h1 {
    font-size: 37px;
  }

  .hero-visual {
    transform: scale(0.86);
    transform-origin: center right;
  }

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

  .home-side {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .date-overview {
    grid-template-columns: 1.2fr 1fr 1fr;
  }

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

  .date-idea-panel {
    display: grid;
    grid-template-columns: 0.7fr 1fr;
  }

  .date-idea-art {
    height: 100%;
    min-height: 210px;
  }

  .mobile-nav {
    position: fixed;
    z-index: 30;
    right: 16px;
    bottom: 13px;
    left: 16px;
    display: grid;
    height: 66px;
    grid-template-columns: repeat(5, 1fr);
    align-items: center;
    padding: 7px 11px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 22px;
    background: rgba(255, 253, 249, 0.92);
    box-shadow: 0 15px 45px rgba(60, 44, 34, 0.16);
    backdrop-filter: blur(14px);
  }

  .mobile-nav button {
    display: flex;
    height: 48px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    border-radius: 12px;
    background: transparent;
    color: var(--ink-faint);
    font-size: 8px;
  }

  .mobile-nav button .icon {
    width: 18px;
    height: 18px;
  }

  .mobile-nav button.active {
    color: var(--coral-dark);
  }

  .mobile-nav .mobile-add {
    display: flex;
    background: transparent;
  }

  .mobile-add > span {
    display: grid;
    width: 47px;
    height: 47px;
    margin-top: -26px;
    place-items: center;
    border: 4px solid var(--paper);
    border-radius: 50%;
    background: var(--coral);
    color: #fff;
    box-shadow: 0 8px 22px rgba(201, 91, 71, 0.32);
  }

  .mobile-add > span .icon {
    width: 20px;
    height: 20px;
  }

  .app-footer {
    padding-bottom: 95px;
  }
}

@media (max-width: 760px) {
  .access-gate {
    display: block;
    padding: 25px 0;
    background:
      radial-gradient(circle at 80% 2%, rgba(231, 186, 169, 0.42), transparent 22rem),
      var(--paper);
  }

  .access-gate-art {
    min-height: 236px;
    margin: 0 16px;
    border-radius: 27px;
  }

  .gate-orbit-a {
    top: -80px;
    left: 50%;
    width: 320px;
    height: 320px;
    transform: translateX(-50%);
  }

  .gate-orbit-b {
    top: -23px;
    left: 50%;
    width: 220px;
    height: 220px;
    transform: translateX(-50%);
  }

  .gate-card-a {
    top: 60px;
    left: 15%;
    width: 124px;
    height: 155px;
    border-width: 7px;
    font-size: 8px;
  }

  .gate-card-b {
    top: 33px;
    left: 52%;
    width: 108px;
    height: 126px;
    border-width: 6px 6px 20px;
  }

  .gate-card-b .icon {
    width: 30px;
    height: 30px;
  }

  .gate-card-b span {
    font-size: 6px;
  }

  .access-gate-copy {
    width: auto;
    padding: 27px 27px 4px;
  }

  .gate-brand {
    display: none;
  }

  .access-gate-copy h1 {
    font-size: 38px;
  }

  .access-gate-copy > p {
    margin-bottom: 21px;
  }

  .main-content {
    padding: 0 16px;
  }

  .topbar {
    gap: 10px;
  }

  .greeting-block .eyebrow {
    display: none;
  }

  .greeting-block h2 {
    margin: 0;
    font-size: 14px;
  }

  .top-actions .button {
    display: none;
  }

  .top-search {
    display: none;
  }

  .hero-card {
    display: block;
    min-height: 0;
  }

  .hero-copy {
    padding: 28px 23px 25px;
  }

  .hero-copy h1 {
    margin-top: 20px;
    font-size: clamp(31px, 9.5vw, 42px);
  }

  .hero-copy > p {
    max-width: 92%;
    margin-bottom: 19px;
  }

  .hero-small-stats {
    padding-top: 21px;
  }

  .hero-visual {
    min-height: 264px;
    transform: none;
  }

  .orbit-one {
    top: -2px;
    right: 50%;
    width: 275px;
    height: 275px;
    transform: translateX(50%);
  }

  .orbit-two {
    top: 42px;
    right: 50%;
    width: 190px;
    height: 190px;
    transform: translateX(50%);
  }

  .polaroid-back {
    top: 17px;
    right: 35px;
    width: 125px;
    height: 159px;
  }

  .polaroid-front {
    top: 72px;
    left: 31px;
    width: 142px;
    height: 176px;
  }

  .polaroid span {
    padding-top: 5px;
    font-size: 7px;
  }

  .hero-note {
    top: 7px;
    left: 24px;
  }

  .hero-stamp {
    right: 24px;
    bottom: 16px;
    width: 67px;
    height: 67px;
  }

  .hero-stamp strong {
    font-size: 15px;
  }

  .home-side {
    grid-template-columns: 1fr;
  }

  .recent-memory {
    grid-template-columns: 119px minmax(0, 1fr);
  }

  .memory-media {
    min-height: 119px;
  }

  .recent-memory-info {
    padding: 15px 14px 13px;
  }

  .recent-memory-info h4 {
    font-size: 14px;
  }

  .recent-memory-info p {
    -webkit-line-clamp: 2;
  }

  .memory-favorite {
    position: absolute;
    right: 3px;
    bottom: 3px;
    margin: 0;
  }

  .quote-strip {
    flex-wrap: wrap;
    gap: 7px;
    padding: 20px 8px;
  }

  .quote-strip p {
    flex: 1;
    min-width: 260px;
    font-size: 11px;
    text-align: center;
  }

  .quote-mark {
    display: none;
  }

  .quote-author {
    flex-basis: 100%;
    text-align: center;
  }

  .page-heading {
    align-items: flex-start;
    padding-top: 6px;
  }

  .page-heading h1 {
    font-size: 32px;
  }

  .page-heading p {
    max-width: 220px;
    font-size: 10px;
    line-height: 1.7;
  }

  .page-heading > .button {
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
    padding: 0;
    border-radius: 50%;
    font-size: 0;
  }

  .page-heading > .button .icon {
    width: 17px;
    height: 17px;
  }

  .filter-bar {
    display: block;
    padding: 10px;
  }

  .inline-search {
    min-width: 0;
    margin-top: 8px;
  }

  .timeline::before {
    display: none;
  }

  .timeline-month {
    display: block;
  }

  .timeline-month-label {
    padding: 0 0 9px 4px;
    text-align: left;
  }

  .timeline-dot {
    display: none;
  }

  .timeline-memory-card {
    grid-template-columns: 116px minmax(0, 1fr);
  }

  .timeline-memory-card .memory-media {
    min-height: 166px;
  }

  .timeline-content {
    padding: 15px 13px;
  }

  .timeline-content h3 {
    font-size: 16px;
  }

  .timeline-content > p {
    font-size: 10px;
    -webkit-line-clamp: 2;
  }

  .timeline-footer {
    flex-wrap: wrap;
    gap: 3px 9px;
  }

  .gallery-toolbar {
    display: block;
  }

  .gallery-count {
    display: none;
  }

  .filter-chips {
    gap: 5px;
  }

  .filter-chip {
    min-height: 31px;
    padding: 0 11px;
    font-size: 9px;
  }

  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-auto-rows: 174px;
    gap: 7px;
  }

  .gallery-item.wide {
    grid-column: span 1;
  }

  .gallery-item.tall {
    grid-row: span 1;
  }

  .gallery-item:nth-child(5n + 1) {
    grid-column: span 2;
    grid-row: span 1;
  }

  .gallery-caption {
    opacity: 1;
  }

  .date-overview {
    grid-template-columns: 1fr 1fr;
  }

  .date-stat.primary {
    grid-column: 1 / -1;
  }

  .date-stat {
    min-height: 139px;
    padding: 18px;
  }

  .date-stat strong,
  .date-stat.primary strong {
    margin-top: 11px;
    font-size: 32px;
  }

  .upcoming-item {
    grid-template-columns: 46px minmax(0, 1fr) auto;
    gap: 11px;
    padding: 12px;
  }

  .upcoming-date {
    width: 44px;
    height: 49px;
  }

  .delete-date {
    display: none;
  }

  .days-away {
    gap: 2px;
  }

  .days-away span {
    display: none;
  }

  .date-idea-panel {
    display: block;
  }

  .date-idea-art {
    height: 140px;
    min-height: 0;
  }

  .modal-layer {
    align-items: flex-end;
    padding: 0;
  }

  .modal {
    width: 100%;
    max-height: 92vh;
    padding: 23px 19px calc(20px + env(safe-area-inset-bottom));
    border-radius: 24px 24px 0 0;
  }

  .modal-header {
    margin-bottom: 16px;
  }

  .modal-header h2 {
    font-size: 23px;
  }

  .upload-zone {
    min-height: 111px;
  }

  .upload-previews {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

  .modal-footer {
    flex-wrap: wrap;
  }

  .modal-footer > .button {
    flex: 1;
  }

  .favorite-toggle {
    width: 100%;
  }

  .storage-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .device-panel {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .device-panel > .button {
    width: 100%;
  }

  .storage-actions {
    width: 100%;
  }

  .storage-actions > * {
    flex: 1;
  }

  .lightbox-stage {
    width: calc(100vw - 26px);
    height: 69vh;
  }

  .lightbox-caption {
    right: 20px;
    bottom: 20px;
    left: 20px;
  }

  .lightbox-nav {
    top: auto;
    bottom: 98px;
    width: 39px;
    height: 39px;
    transform: none;
  }

  .lightbox-prev {
    left: 18px;
  }

  .lightbox-next {
    right: 18px;
  }

  .lightbox-close {
    top: 18px;
    right: 18px;
  }

  .toast {
    right: 18px;
    bottom: 91px;
    left: 18px;
    justify-content: center;
  }
}

@media (max-width: 390px) {
  .main-content {
    padding: 0 12px;
  }

  .hero-copy {
    padding: 24px 18px 22px;
  }

  .hero-actions {
    gap: 12px;
  }

  .hero-actions .button {
    padding: 0 13px;
  }

  .polaroid-front {
    left: 19px;
  }

  .polaroid-back {
    right: 21px;
  }

  .hero-note {
    left: 11px;
  }

  .section-heading h3 {
    font-size: 19px;
  }

  .recent-memory {
    grid-template-columns: 105px minmax(0, 1fr);
  }

  .timeline-memory-card {
    grid-template-columns: 102px minmax(0, 1fr);
  }

  .timeline-meta .mood-tag {
    display: none;
  }

  .page-heading p {
    max-width: 190px;
  }
}

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