:root {
  --bg: #fffaf5;
  --surface: rgba(255, 255, 255, 0.78);
  --surface-strong: #fffdfb;
  --stroke: rgba(123, 75, 54, 0.12);
  --text: #3f2b25;
  --muted: #7b655d;
  --accent: #ff8ba7;
  --accent-deep: #ff5c85;
  --accent-soft: #ffd6df;
  --gold: #ffd98c;
  --shadow: 0 24px 60px rgba(131, 97, 78, 0.14);
  --radius-xl: 32px;
  --radius-lg: 24px;
  --radius-md: 18px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Trebuchet MS", "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 50% -8%, rgba(255, 255, 255, 0.92), transparent 34%),
    radial-gradient(circle at top left, rgba(255, 214, 223, 0.9), transparent 28%),
    radial-gradient(circle at top right, rgba(255, 233, 184, 0.9), transparent 26%),
    linear-gradient(180deg, #fff8f3 0%, #fffdf9 52%, #fff7ef 100%);
  overflow-x: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.22) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.22) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.45), transparent 75%);
}

body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 22%, rgba(255, 92, 133, 0.12), transparent 18%),
    radial-gradient(circle at 82% 18%, rgba(255, 217, 140, 0.15), transparent 18%),
    radial-gradient(circle at 50% 74%, rgba(255, 188, 204, 0.12), transparent 24%);
  opacity: 0.8;
  animation: auraBreath 11s ease-in-out infinite;
}

.ambient-garden {
  position: fixed;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}

.page-shell,
.admin-shell {
  position: relative;
  z-index: 1;
}

.garden-vine {
  position: absolute;
  top: 110px;
  width: 150px;
  height: min(760px, 76vh);
  opacity: 0.86;
  filter: drop-shadow(0 22px 26px rgba(115, 86, 64, 0.12));
  animation: vineSway 8s ease-in-out infinite;
}

.garden-vine::before {
  content: "";
  position: absolute;
  inset: 0 50% 0 auto;
  width: 3px;
  border-radius: 999px;
  background:
    linear-gradient(180deg, transparent, rgba(139, 176, 105, 0.36), transparent),
    repeating-linear-gradient(180deg, rgba(111, 150, 88, 0.35) 0 28px, transparent 28px 60px);
  transform: rotate(5deg);
}

.garden-vine-left {
  left: max(-46px, calc((100vw - 1260px) / 2 - 110px));
}

.garden-vine-right {
  right: max(-46px, calc((100vw - 1260px) / 2 - 110px));
  transform: scaleX(-1);
  animation-name: vineSwayRight;
  animation-delay: -2.4s;
}

.bloom,
.leaf,
.petal,
.firefly {
  position: absolute;
  display: block;
}

.bloom {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #ffd16f 0 22%, transparent 23%),
    radial-gradient(circle at 50% 14%, rgba(255, 151, 180, 0.9) 0 24%, transparent 25%),
    radial-gradient(circle at 86% 50%, rgba(255, 185, 210, 0.88) 0 24%, transparent 25%),
    radial-gradient(circle at 50% 86%, rgba(255, 168, 139, 0.76) 0 24%, transparent 25%),
    radial-gradient(circle at 14% 50%, rgba(255, 205, 219, 0.88) 0 24%, transparent 25%);
  animation: bloomPulse 4.8s ease-in-out infinite;
}

.bloom-one {
  top: 8%;
  left: 54px;
}

.bloom-two {
  top: 38%;
  left: 28px;
  width: 48px;
  height: 48px;
  animation-delay: -1.4s;
}

.bloom-three {
  top: 70%;
  left: 66px;
  width: 34px;
  height: 34px;
  animation-delay: -2.2s;
}

.bloom-four {
  top: 16%;
  left: 52px;
  width: 42px;
  height: 42px;
  animation-delay: -0.8s;
}

.bloom-five {
  top: 48%;
  left: 26px;
  animation-delay: -2.8s;
}

.bloom-six {
  top: 76%;
  left: 70px;
  width: 46px;
  height: 46px;
  animation-delay: -1.8s;
}

.leaf {
  width: 38px;
  height: 20px;
  border-radius: 999px 4px 999px 4px;
  background: linear-gradient(135deg, rgba(130, 190, 103, 0.72), rgba(72, 142, 84, 0.62));
  transform-origin: right center;
  animation: leafFlutter 3.8s ease-in-out infinite;
}

.leaf-one {
  top: 22%;
  left: 72px;
  rotate: -24deg;
}

.leaf-two {
  top: 54%;
  left: 20px;
  rotate: 28deg;
  animation-delay: -1.2s;
}

.leaf-three {
  top: 84%;
  left: 54px;
  rotate: -12deg;
  animation-delay: -2s;
}

.leaf-four {
  top: 30%;
  left: 18px;
  rotate: 28deg;
  animation-delay: -0.6s;
}

.leaf-five {
  top: 62%;
  left: 74px;
  rotate: -24deg;
  animation-delay: -1.8s;
}

.leaf-six {
  top: 88%;
  left: 30px;
  rotate: 18deg;
  animation-delay: -2.6s;
}

.butterfly {
  position: absolute;
  width: 38px;
  height: 32px;
  transform-origin: center;
  filter: drop-shadow(0 10px 14px rgba(104, 66, 55, 0.18));
  animation: butterflyTravel 18s linear infinite;
}

.butterfly::before,
.butterfly::after {
  content: "";
  position: absolute;
  top: 5px;
  width: 18px;
  height: 22px;
  border-radius: 80% 20% 80% 30%;
  background: linear-gradient(135deg, rgba(255, 139, 167, 0.95), rgba(255, 217, 140, 0.9));
  animation: wingBeat 360ms ease-in-out infinite alternate;
}

.butterfly::before {
  left: 0;
  transform-origin: right center;
}

.butterfly::after {
  right: 0;
  transform: scaleX(-1);
  transform-origin: left center;
}

.butterfly span {
  position: absolute;
  top: 9px;
  left: 17px;
  width: 4px;
  height: 18px;
  border-radius: 999px;
  background: rgba(92, 58, 47, 0.58);
}

.butterfly-one {
  top: 160px;
  left: -80px;
}

.butterfly-two {
  top: 58vh;
  right: -80px;
  animation-name: butterflyTravelReverse;
  animation-duration: 22s;
  animation-delay: -7s;
  scale: 0.78;
}

.firefly {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #ffe88a;
  box-shadow: 0 0 18px 6px rgba(255, 232, 138, 0.48);
  animation: fireflyFloat 8s ease-in-out infinite;
}

.firefly-one {
  top: 22%;
  left: 12%;
}

.firefly-two {
  top: 44%;
  right: 13%;
  animation-delay: -2.8s;
}

.firefly-three {
  bottom: 18%;
  left: 50%;
  animation-delay: -5.2s;
}

.petal {
  width: 18px;
  height: 26px;
  border-radius: 80% 20% 80% 20%;
  background: linear-gradient(135deg, rgba(255, 151, 180, 0.58), rgba(255, 255, 255, 0.74));
  animation: petalFall 14s linear infinite;
}

.petal-one {
  top: -40px;
  left: 24%;
}

.petal-two {
  top: -70px;
  left: 66%;
  animation-delay: -4.8s;
  scale: 0.78;
}

.petal-three {
  top: -90px;
  left: 84%;
  animation-delay: -9s;
  scale: 1.08;
}

.page-shell,
.admin-shell {
  width: min(1160px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 56px;
}

.hero,
.admin-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.hero {
  padding: 24px;
  overflow: hidden;
  isolation: isolate;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  pointer-events: none;
  background:
    linear-gradient(110deg, transparent 8%, rgba(255, 255, 255, 0.7) 18%, transparent 30%),
    radial-gradient(circle at 82% 18%, rgba(255, 214, 223, 0.46), transparent 28%);
  opacity: 0.68;
  mix-blend-mode: screen;
  animation: heroShimmer 8s ease-in-out infinite;
  z-index: 0;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -10% -120px auto;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 139, 167, 0.22), transparent 70%);
  filter: blur(10px);
  animation: floatBlob 8s ease-in-out infinite;
}

.hero-orbit {
  position: absolute;
  pointer-events: none;
  border: 1px solid rgba(255, 139, 167, 0.22);
  border-radius: 50%;
  z-index: 0;
}

.hero-orbit::before,
.hero-orbit::after {
  content: "";
  position: absolute;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-deep), var(--gold));
  box-shadow: 0 0 22px rgba(255, 139, 167, 0.48);
}

.hero-orbit-one {
  width: 220px;
  height: 220px;
  top: 38px;
  right: 40%;
  animation: orbitSpin 18s linear infinite;
}

.hero-orbit-one::before {
  top: 28px;
  left: 28px;
}

.hero-orbit-one::after {
  right: 18px;
  bottom: 46px;
  scale: 0.7;
}

.hero-orbit-two {
  width: 360px;
  height: 360px;
  right: -120px;
  bottom: -150px;
  border-color: rgba(255, 217, 140, 0.28);
  animation: orbitSpin 26s linear infinite reverse;
}

.hero-orbit-two::before {
  top: 72px;
  left: 34px;
}

.hero-orbit-two::after {
  right: 52px;
  bottom: 86px;
  scale: 0.82;
}

.topbar,
.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand,
.eyebrow,
.memory-meta,
.admin-memory-meta {
  letter-spacing: 0.03em;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.brand-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--accent-deep), var(--gold));
  box-shadow: 0 0 0 6px rgba(255, 139, 167, 0.16);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 24px;
  align-items: start;
  padding: 22px 0 10px;
  position: relative;
  z-index: 1;
}

.hero-copy {
  padding-top: clamp(24px, 4vw, 54px);
}

.hero-copy h1,
.section-heading h2,
.admin-card h1,
.admin-card h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.05;
}

.hero-copy h1 {
  font-size: clamp(2.8rem, 7vw, 5.5rem);
  max-width: 11ch;
  animation: riseIn 900ms ease both;
}

.hero-text,
.gallery-summary,
.memory-description,
.panel-copy,
.admin-memory-description {
  color: var(--muted);
  line-height: 1.7;
}

.hero-actions,
.topbar {
  margin-top: 24px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  animation: riseIn 1100ms ease both;
}

.anniversary-counter {
  position: relative;
  display: inline-grid;
  gap: 12px;
  margin-top: 20px;
  padding: 16px;
  border-radius: 26px;
  width: min(100%, 440px);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(255, 245, 239, 0.72)),
    radial-gradient(circle at 16% 20%, rgba(255, 92, 133, 0.18), transparent 34%);
  border: 1px solid rgba(123, 75, 54, 0.12);
  box-shadow: 0 18px 42px rgba(255, 139, 167, 0.17);
  backdrop-filter: blur(16px);
  overflow: hidden;
  animation: riseIn 1000ms ease both;
}

.anniversary-counter::before {
  content: "";
  position: absolute;
  width: 120px;
  height: 120px;
  right: -44px;
  top: -54px;
  border-radius: 50%;
  background: rgba(255, 217, 140, 0.26);
  filter: blur(2px);
}

.anniversary-label {
  position: relative;
  margin: 0;
  color: #a56b56;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.countdown-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.countdown-grid span {
  display: grid;
  place-items: center;
  gap: 4px;
  min-height: 78px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(123, 75, 54, 0.1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.countdown-grid strong {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.7rem, 4vw, 2.45rem);
  line-height: 0.9;
  color: var(--accent-deep);
}

.countdown-grid small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-copy,
.hero-card,
.love-wall-frame,
.memory-spotlight,
.admin-card {
  min-width: 0;
}

.button,
.admin-link,
.back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  transition: transform 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

.button:hover,
.admin-link:hover,
.back-link:hover,
.delete-button:hover {
  transform: translateY(-2px);
}

.button-primary {
  border: none;
  background: linear-gradient(135deg, var(--accent-deep), #ff9a6c);
  color: white;
  box-shadow: 0 16px 32px rgba(255, 92, 133, 0.28);
}

.button-secondary,
.admin-link,
.back-link {
  color: var(--text);
  border: 1px solid rgba(123, 75, 54, 0.14);
  background: rgba(255, 255, 255, 0.7);
}

.hero-card {
  position: relative;
  min-height: 540px;
  padding: 22px;
  border-radius: var(--radius-xl);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(255, 250, 245, 0.88)),
    radial-gradient(circle at top, rgba(255, 214, 223, 0.6), transparent 34%);
  border: 1px solid rgba(123, 75, 54, 0.12);
  animation: floatCard 6s ease-in-out infinite;
}

.card-sticker {
  position: absolute;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  background: white;
  border: 1px solid rgba(123, 75, 54, 0.1);
  box-shadow: 0 8px 22px rgba(131, 97, 78, 0.12);
  white-space: nowrap;
  max-width: calc(100% - 32px);
  overflow: hidden;
  text-overflow: ellipsis;
  z-index: 2;
}

.sticker-one {
  top: 22px;
  right: 28px;
  transform: rotate(6deg);
}

.sticker-two {
  bottom: 20px;
  right: 24px;
  left: auto;
  transform: rotate(-6deg);
}

.featured-memory {
  display: flex;
  height: 100%;
}

.featured-inner {
  display: grid;
  gap: 16px;
  width: 100%;
  align-content: center;
  animation: fadeScale 500ms ease both;
  padding-bottom: 54px;
}

.featured-media {
  width: 100%;
  aspect-ratio: 4 / 4.3;
  object-fit: cover;
  border-radius: 28px;
  background: #fff1e8;
}

.featured-inner h3 {
  margin: 0;
  font-size: clamp(1.3rem, 2.4vw, 1.9rem);
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.featured-inner .hero-text {
  margin: 0;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
}

.eyebrow {
  margin: 0 0 10px;
  font-size: 0.8rem;
  text-transform: uppercase;
  color: #a56b56;
  font-weight: 700;
}

.section-heading {
  margin: 62px 0 24px;
}

.memory-card,
.admin-memory-item {
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.gallery-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 16px;
}

.gallery-head > * {
  min-width: 0;
}

.love-wall {
  position: relative;
}

.love-wall-frame,
.memory-spotlight {
  position: relative;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid var(--stroke);
  border-radius: 32px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.love-wall-frame {
  min-height: clamp(720px, 78vw, 980px);
  padding: 34px 28px 28px;
  background:
    radial-gradient(circle at 12% 52%, rgba(255, 139, 167, 0.16), transparent 28%),
    radial-gradient(circle at 82% 32%, rgba(255, 217, 140, 0.22), transparent 30%),
    radial-gradient(circle at 50% 25%, rgba(255, 214, 223, 0.46), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(255, 247, 240, 0.88));
}

.love-wall-frame::before,
.love-wall-frame::after {
  content: "";
  position: absolute;
  pointer-events: none;
  border-radius: 999px;
  opacity: 0.68;
}

.love-wall-frame::before {
  width: 220px;
  height: 220px;
  left: 26%;
  top: 18%;
  background: conic-gradient(from 130deg, transparent, rgba(255, 139, 167, 0.16), transparent, rgba(255, 217, 140, 0.14), transparent);
  filter: blur(4px);
  animation: orbitSpin 19s linear infinite;
}

.love-wall-frame::after {
  width: 340px;
  height: 340px;
  right: 4%;
  bottom: 9%;
  border: 1px solid rgba(255, 139, 167, 0.14);
  animation: floatBlob 10s ease-in-out infinite;
}

.heart-progress {
  position: absolute;
  top: 24px;
  left: 24px;
  z-index: 2;
  display: inline-grid;
  gap: 2px;
  padding: 12px 16px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(123, 75, 54, 0.12);
  box-shadow: 0 16px 40px rgba(131, 97, 78, 0.14);
}

.heart-progress span:first-child {
  font-weight: 800;
  color: var(--text);
}

.heart-progress span:last-child {
  font-size: 0.84rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.love-glow {
  position: absolute;
  width: 240px;
  height: 240px;
  border-radius: 999px;
  filter: blur(22px);
  opacity: 0.7;
}

.love-glow-left {
  top: 54px;
  left: -24px;
  background: rgba(255, 176, 198, 0.45);
}

.love-glow-right {
  top: 82px;
  right: -18px;
  background: rgba(255, 220, 154, 0.38);
}

.love-canvas {
  position: relative;
  width: min(100%, 760px);
  aspect-ratio: 1 / 0.9;
  margin: 36px 0 0 24px;
}

.love-canvas::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.3), transparent 28%),
    radial-gradient(circle at 70% 25%, rgba(255, 255, 255, 0.24), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.44), rgba(255, 255, 255, 0.05));
  clip-path: path("M 50 16 C 24 -3, -6 19, 6 49 C 15 71, 34 86, 50 97 C 66 86, 85 71, 94 49 C 106 19, 76 -3, 50 16 Z");
  transform: scale(8.7);
  transform-origin: center;
  opacity: 0.34;
  pointer-events: none;
  filter: drop-shadow(0 35px 65px rgba(255, 145, 175, 0.12));
}

.love-tile {
  position: absolute;
  width: var(--tile-size, 12.2%);
  aspect-ratio: 1 / 1;
  border: none;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  border-radius: 22px;
  box-shadow: 0 18px 30px rgba(105, 73, 59, 0.14);
  background: #fff1e8;
  transform: translate(-50%, -50%) scale(0.92);
  opacity: 0;
  animation: tileIn 700ms cubic-bezier(0.18, 0.89, 0.32, 1.22) forwards;
  transition:
    transform 220ms ease,
    box-shadow 220ms ease,
    filter 220ms ease,
    rotate 220ms ease;
}

.love-tile:nth-child(odd) {
  border-radius: 28px;
}

.love-tile-empty {
  display: grid;
  place-items: center;
  pointer-events: none;
  border: 1px dashed rgba(161, 130, 121, 0.22);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.68), rgba(247, 232, 230, 0.45)),
    radial-gradient(circle at 50% 30%, rgba(255, 221, 232, 0.34), transparent 60%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.34);
  opacity: 0.74;
  backdrop-filter: blur(2px);
  animation-name: tileIn, emptyPulse;
  animation-duration: 700ms, 4.5s;
  animation-timing-function: cubic-bezier(0.18, 0.89, 0.32, 1.22), ease-in-out;
  animation-fill-mode: forwards, none;
  animation-iteration-count: 1, infinite;
}

.love-tile-placeholder {
  display: grid;
  justify-items: center;
  gap: 8px;
  color: rgba(146, 116, 109, 0.84);
}

.placeholder-heart {
  width: clamp(12px, 1.35vw, 18px);
  height: clamp(12px, 1.35vw, 18px);
  background: rgba(255, 182, 196, 0.4);
  transform: rotate(-45deg);
  border-radius: 6px 0 0 6px;
  position: relative;
}

.placeholder-heart::before,
.placeholder-heart::after {
  content: "";
  position: absolute;
  width: clamp(12px, 1.35vw, 18px);
  height: clamp(12px, 1.35vw, 18px);
  border-radius: 50%;
  background: rgba(255, 182, 196, 0.4);
}

.placeholder-heart::before {
  top: calc(clamp(12px, 1.35vw, 18px) / -2);
  left: 0;
}

.placeholder-heart::after {
  top: 0;
  left: calc(clamp(12px, 1.35vw, 18px) / 2);
}

.placeholder-label {
  font-size: clamp(0.48rem, 0.62vw, 0.68rem);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  text-align: center;
}

.love-tile:hover,
.love-tile:focus-visible,
.love-tile.is-active {
  transform: translate(-50%, -50%) scale(1.08);
  z-index: 3;
  box-shadow: 0 24px 42px rgba(92, 58, 47, 0.22);
  filter: saturate(1.08);
}

.love-tile:focus-visible {
  outline: 3px solid rgba(255, 92, 133, 0.3);
  outline-offset: 2px;
}

.love-tile-media,
.spotlight-media-shell {
  display: block;
  width: 100%;
  height: 100%;
}

.love-tile-media img,
.love-tile-media video,
.spotlight-media-shell img,
.spotlight-media-shell video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.love-tile-overlay {
  position: absolute;
  inset: auto 0 0;
  padding: 28px 12px 10px;
  background: linear-gradient(180deg, transparent, rgba(49, 27, 20, 0.78));
  color: white;
  opacity: 0;
  transition: opacity 180ms ease;
}

.album-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  padding: 6px 8px;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 800;
  color: var(--text);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(123, 75, 54, 0.12);
  box-shadow: 0 8px 18px rgba(92, 58, 47, 0.12);
  backdrop-filter: blur(10px);
}

.love-tile:hover .love-tile-overlay,
.love-tile:focus-visible .love-tile-overlay,
.love-tile.is-active .love-tile-overlay {
  opacity: 1;
}

.love-tile-title {
  display: block;
  font-weight: 700;
  font-size: 0.82rem;
  line-height: 1.3;
}

.memory-spotlight {
  position: absolute;
  top: 104px;
  right: 26px;
  width: min(300px, calc(100% - 40px));
  padding: 18px;
  display: grid;
  align-content: start;
  gap: 14px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  box-shadow:
    0 26px 50px rgba(118, 85, 70, 0.16),
    0 0 0 1px rgba(255, 255, 255, 0.35) inset;
  z-index: 4;
  animation: floatSpotlight 6s ease-in-out infinite;
}

.memory-spotlight .eyebrow,
.spotlight-copy .memory-title,
.spotlight-copy .memory-description,
.spotlight-note {
  overflow-wrap: anywhere;
}

.spotlight-card {
  min-height: 100%;
  min-width: 0;
}

.spotlight-inner {
  display: grid;
  gap: 16px;
  animation: fadeScale 260ms ease both;
}

.spotlight-media-shell {
  aspect-ratio: 1 / 1.08;
  overflow: hidden;
  border-radius: 26px;
  background: linear-gradient(135deg, #fff0ea, #fffaf2);
}

.spotlight-copy {
  padding: 4px 4px 0;
  min-width: 0;
}

.album-controls {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
}

.album-controls button {
  border: 1px solid rgba(123, 75, 54, 0.12);
  border-radius: 999px;
  min-height: 36px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--text);
  font-weight: 800;
  cursor: pointer;
}

.album-controls span {
  text-align: center;
  color: var(--muted);
  font-weight: 800;
  font-size: 0.86rem;
}

.spotlight-copy .memory-title {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.spotlight-copy .memory-description {
  margin-bottom: 0;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 7;
}

.spotlight-empty {
  padding: 8px 4px 4px;
}

.spotlight-empty h3 {
  margin: 0 0 10px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.5rem, 2.5vw, 2rem);
}

.spotlight-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.memory-card {
  overflow: hidden;
}

.media-shell {
  aspect-ratio: 4 / 4.8;
  background: linear-gradient(135deg, #fff0ea, #fffaf2);
}

.media-shell img,
.media-shell video,
.admin-memory-preview img,
.admin-memory-preview video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.memory-copy {
  padding: 18px;
}

.memory-meta,
.admin-memory-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #a0776a;
  font-size: 0.82rem;
  text-transform: uppercase;
}

.admin-body {
  background:
    radial-gradient(circle at top, rgba(255, 214, 223, 0.8), transparent 30%),
    linear-gradient(180deg, #fff7f0 0%, #fffdf9 100%);
}

.admin-shell {
  max-width: 980px;
  padding-top: 28px;
}

.admin-card {
  padding: 28px;
  margin-top: 18px;
}

.admin-card.narrow {
  max-width: 520px;
  margin: 40px auto 0;
}

.stack-form,
.admin-panel {
  display: grid;
  gap: 16px;
}

.form-actions,
.admin-memory-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.stack-form label {
  display: grid;
  gap: 8px;
  font-weight: 700;
}

.stack-form input,
.stack-form textarea {
  width: 100%;
  border: 1px solid rgba(123, 75, 54, 0.14);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  padding: 14px 16px;
  font: inherit;
  color: var(--text);
}

.checkbox-row {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.checkbox-row input {
  width: 18px;
  height: 18px;
}

.form-message {
  min-height: 24px;
  margin: 0;
  color: #9a5b47;
}

.hidden {
  display: none;
}

.admin-gallery {
  display: grid;
  gap: 14px;
}

.admin-memory-item {
  display: grid;
  grid-template-columns: 160px 1fr auto;
  gap: 16px;
  padding: 14px;
  align-items: center;
}

.admin-memory-actions {
  justify-content: flex-end;
}

.admin-memory-preview {
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  overflow: hidden;
  background: #fff1e8;
}

.delete-button {
  border: none;
  border-radius: 999px;
  min-height: 42px;
  padding: 0 16px;
  font-weight: 700;
  background: #3f2b25;
  color: white;
  cursor: pointer;
}

.edit-button {
  border: 1px solid rgba(123, 75, 54, 0.14);
  border-radius: 999px;
  min-height: 42px;
  padding: 0 16px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.85);
  color: var(--text);
  cursor: pointer;
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeScale {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes floatBlob {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-18px);
  }
}

@keyframes floatCard {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

@keyframes tileIn {
  from {
    opacity: 0;
    transform: translate(-50%, -42%) scale(0.78);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.92);
  }
}

@keyframes floatSpotlight {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes auraBreath {
  0%,
  100% {
    opacity: 0.62;
    transform: scale(1);
  }
  50% {
    opacity: 0.92;
    transform: scale(1.04);
  }
}

@keyframes heroShimmer {
  0%,
  100% {
    transform: translateX(-8%);
    opacity: 0.48;
  }
  50% {
    transform: translateX(8%);
    opacity: 0.78;
  }
}

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

@keyframes vineSway {
  0%,
  100% {
    transform: translateY(0) rotate(-1deg);
  }
  50% {
    transform: translateY(-12px) rotate(2deg);
  }
}

@keyframes vineSwayRight {
  0%,
  100% {
    transform: scaleX(-1) translateY(0) rotate(-1deg);
  }
  50% {
    transform: scaleX(-1) translateY(-12px) rotate(2deg);
  }
}

@keyframes bloomPulse {
  0%,
  100% {
    transform: scale(1) rotate(0deg);
  }
  50% {
    transform: scale(1.08) rotate(5deg);
  }
}

@keyframes leafFlutter {
  0%,
  100% {
    transform: rotate(0deg) scale(1);
  }
  50% {
    transform: rotate(8deg) scale(1.06);
  }
}

@keyframes wingBeat {
  from {
    transform: rotateY(0deg) rotate(2deg);
  }
  to {
    transform: rotateY(56deg) rotate(-7deg);
  }
}

@keyframes butterflyTravel {
  0% {
    transform: translate3d(-8vw, 0, 0) rotate(8deg);
  }
  28% {
    transform: translate3d(34vw, 70px, 0) rotate(-8deg);
  }
  58% {
    transform: translate3d(72vw, -18px, 0) rotate(12deg);
  }
  100% {
    transform: translate3d(112vw, 86px, 0) rotate(-4deg);
  }
}

@keyframes butterflyTravelReverse {
  0% {
    transform: translate3d(8vw, 0, 0) rotate(-10deg) scaleX(-1);
  }
  35% {
    transform: translate3d(-36vw, -76px, 0) rotate(8deg) scaleX(-1);
  }
  70% {
    transform: translate3d(-74vw, 38px, 0) rotate(-12deg) scaleX(-1);
  }
  100% {
    transform: translate3d(-112vw, -40px, 0) rotate(4deg) scaleX(-1);
  }
}

@keyframes fireflyFloat {
  0%,
  100% {
    opacity: 0.25;
    transform: translate3d(0, 0, 0) scale(0.8);
  }
  35% {
    opacity: 0.9;
    transform: translate3d(34px, -38px, 0) scale(1.1);
  }
  70% {
    opacity: 0.45;
    transform: translate3d(-24px, -12px, 0) scale(0.92);
  }
}

@keyframes petalFall {
  0% {
    transform: translate3d(0, -10vh, 0) rotate(0deg);
    opacity: 0;
  }
  12% {
    opacity: 0.72;
  }
  55% {
    transform: translate3d(42px, 52vh, 0) rotate(210deg);
  }
  100% {
    transform: translate3d(-22px, 108vh, 0) rotate(410deg);
    opacity: 0;
  }
}

@keyframes emptyPulse {
  0%,
  100% {
    filter: saturate(1);
  }
  50% {
    filter: saturate(1.18) brightness(1.03);
  }
}

@media (max-width: 1100px) {
  .garden-vine {
    opacity: 0.42;
    scale: 0.86;
  }

  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .hero-copy h1 {
    max-width: 9ch;
  }

  .hero-copy {
    padding-top: 8px;
  }

  .hero-card {
    min-height: auto;
  }

  .love-wall-frame {
    min-height: auto;
    padding-bottom: 24px;
  }

  .love-canvas {
    width: calc(100% - 320px);
    margin: 28px 0 0 0;
  }

  .memory-spotlight {
    top: 96px;
    right: 18px;
    width: 286px;
  }
}

@media (max-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .hero-copy h1 {
    max-width: 100%;
  }

  .hero-copy {
    padding-top: 0;
  }

  .hero-card {
    min-height: 420px;
  }

  .gallery-head {
    align-items: start;
    flex-direction: column;
  }

  .love-wall-frame {
    min-height: 700px;
  }

  .love-canvas {
    width: calc(100% - 290px);
    margin-left: 0;
    padding-right: 0;
  }

  .memory-spotlight {
    top: 120px;
    right: 18px;
    width: 272px;
  }

  .admin-memory-item {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .ambient-garden {
    opacity: 0.72;
  }

  .garden-vine {
    top: 180px;
    width: 104px;
    height: 420px;
    opacity: 0.28;
  }

  .garden-vine-left {
    left: -58px;
  }

  .garden-vine-right {
    right: -58px;
  }

  .butterfly {
    scale: 0.72;
  }

  .butterfly-two,
  .firefly-three,
  .petal-three,
  .hero-orbit-one {
    display: none;
  }

  .page-shell,
  .admin-shell {
    width: min(100% - 20px, 1160px);
    padding-top: 16px;
  }

  .hero,
  .admin-card {
    padding: 18px;
  }

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

  .hero-copy h1 {
    font-size: clamp(2.2rem, 12vw, 3.8rem);
  }

  .hero-actions {
    flex-direction: column;
  }

  .anniversary-counter {
    width: 100%;
    padding: 14px;
  }

  .countdown-grid {
    gap: 6px;
  }

  .countdown-grid span {
    min-height: 66px;
    border-radius: 16px;
  }

  .love-wall-frame {
    min-height: auto;
    padding: 16px;
  }

  .heart-progress {
    position: relative;
    top: auto;
    left: auto;
    margin-bottom: 14px;
  }

  .love-canvas {
    aspect-ratio: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    padding-right: 0;
    margin: 0;
    width: 100%;
  }

  .love-canvas::before {
    display: none;
  }

  .love-tile {
    position: relative;
    width: 100%;
    left: auto !important;
    top: auto !important;
    rotate: 0deg !important;
    transform: none;
    opacity: 1;
    aspect-ratio: 1 / 1.15;
    animation: none;
    margin: 0;
  }

  .love-tile-empty {
    animation: emptyPulse 4.5s ease-in-out infinite;
  }

  .love-tile:hover,
  .love-tile:focus-visible,
  .love-tile.is-active {
    transform: translateY(-4px);
  }

  .love-tile-overlay {
    opacity: 1;
    padding: 20px 10px 10px;
  }

  .love-tile-title {
    font-size: 0.74rem;
  }

  .love-tile-empty {
    pointer-events: none;
  }

  .memory-spotlight {
    position: relative;
    top: auto;
    right: auto;
    width: 100%;
    margin-top: 18px;
    animation: none;
  }

  .spotlight-media-shell {
    aspect-ratio: 4 / 3.8;
  }

  .admin-memory-actions,
  .form-actions {
    flex-direction: column;
  }

  .button,
  .admin-link,
  .back-link,
  .delete-button,
  .edit-button {
    width: 100%;
  }
}

@media (max-width: 420px) {
  .page-shell,
  .admin-shell {
    width: calc(100% - 12px);
    padding-bottom: 32px;
  }

  .hero,
  .admin-card,
  .love-wall-frame,
  .memory-spotlight {
    border-radius: 24px;
  }

  .card-sticker {
    font-size: 0.72rem;
    padding: 8px 12px;
  }

  .heart-progress {
    padding: 10px 12px;
  }

  .heart-progress span:first-child {
    font-size: 0.95rem;
  }

  .heart-progress span:last-child,
  .eyebrow,
  .memory-meta,
  .admin-memory-meta {
    font-size: 0.72rem;
  }

  .love-canvas {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .love-tile {
    aspect-ratio: 1 / 0.95;
    border-radius: 20px;
  }

  .placeholder-label {
    font-size: 0.58rem;
  }
}

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

  .ambient-garden,
  .hero-orbit {
    display: none;
  }
}
