/* ============================================================
   theme-cosmic.css  –  "Cosmic Love Shrine" visual layer
   ============================================================
   Depends on tokens.css for all values.
   No inline styles – everything via classes.
   ============================================================ */

/* ── Reset ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

/* ── Base ── */
html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--c-bg);
  color: var(--c-text);
  min-height: 100dvh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  line-height: 1.65;
}

/* ── Background layers (gradient + vignette + noise) ── */
body::before,
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

/* Gradient: deep dusk */
body::before {
  background:
    radial-gradient(ellipse 80% 60% at 50% 20%, rgba(45,24,84,0.7) 0%, transparent 70%),
    linear-gradient(180deg,
      #0b0614 0%,
      #130a24 30%,
      #1a0e38 60%,
      #0f0820 100%
    );
}

/* Vignette + subtle noise overlay */
body::after {
  background:
    radial-gradient(ellipse 70% 70% at 50% 50%, transparent 40%, rgba(0,0,0,0.55) 100%);
  /* noise is generated inline via a tiny SVG data-uri */
  background-image:
    radial-gradient(ellipse 70% 70% at 50% 50%, transparent 40%, rgba(0,0,0,0.55) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.9;
}

/* ── Effects canvas sits behind content ── */
#cosmicCanvas {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

/* ── All content above the background ── */
#app {
  position: relative;
  z-index: 2;
}

/* ── Typography ── */
h1, h2, h3 {
  font-family: var(--font-serif);
  font-weight: 400;
  color: var(--c-text-bright);
  line-height: 1.25;
}

a {
  color: var(--c-link);
  text-decoration: none;
  transition: color var(--dur-fast) ease;
}
a:hover { color: var(--c-link-hover); }

/* Handwritten accent class */
.handwritten {
  font-family: var(--font-hand);
  color: var(--c-rose-soft);
  line-height: 1.6;
}

.serif-italic {
  font-family: var(--font-serif);
  font-style: italic;
}

/* ── Layout primitives ── */
.cosmic-container {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 0 var(--sp-5);
}

.cosmic-section {
  padding: var(--sp-8) 0;
}

.cosmic-divider {
  width: 60px;
  height: 1px;
  margin: var(--sp-8) auto;
  background: linear-gradient(90deg, transparent, var(--c-lavender), transparent);
  border: none;
  opacity: 0.5;
}

.cosmic-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: var(--sp-8) var(--sp-5);
}

/* ── Screen system ── */
.screen {
  display: none;
  min-height: 100dvh;
  padding: var(--sp-8) var(--sp-5);
  opacity: 0;
  transition: opacity var(--dur-slow) ease;
}
.screen.active {
  display: flex;
  flex-direction: column;
  opacity: 1;
}

/* ── Landing ── */
#landing {
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.landing-content {
  position: relative;
  z-index: 2;
  max-width: 360px;
}

.landing-name {
  font-family: var(--font-hand);
  font-size: var(--ts-xl);
  color: var(--c-rose-soft);
  margin-bottom: var(--sp-8);
  opacity: 0;
  animation: fadeUp 0.8s 0.3s ease forwards;
}

.landing-lines {
  font-family: var(--font-serif);
  font-size: var(--ts-md);
  line-height: 2.2;
  font-weight: 400;
  margin-bottom: var(--sp-13);
  color: var(--c-text-bright);
}
.landing-lines span {
  display: block;
  opacity: 0;
}
.landing-lines span:nth-child(1) { animation: fadeUp 0.7s 0.6s ease forwards; }
.landing-lines span:nth-child(2) { animation: fadeUp 0.7s 1.0s ease forwards; }
.landing-lines span:nth-child(3) { animation: fadeUp 0.7s 1.4s ease forwards; }

.landing-cta-wrap {
  opacity: 0;
  animation: fadeUp 0.7s 2s ease forwards;
}
.landing-sub {
  font-family: var(--font-hand);
  font-size: var(--ts-md);
  color: var(--c-lavender);
  margin-bottom: var(--sp-8);
  font-style: italic;
}

/* ── Buttons ── */
.btn {
  display: inline-block;
  font-family: var(--font-sans);
  font-weight: 500;
  font-size: var(--ts-base);
  padding: 14px 36px;
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  transition: all var(--dur-normal) var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}

.btn-primary {
  background: linear-gradient(135deg, var(--c-rose), var(--c-coral));
  color: var(--c-white);
  box-shadow: var(--shadow-glow-rose);
}
.btn-primary:hover {
  box-shadow: 0 0 30px rgba(255,107,138,0.5);
}
.btn-primary:active { transform: scale(0.97); }

.btn-secondary {
  background: transparent;
  color: var(--c-stardust);
  border: 1.5px solid var(--c-lavender);
}
.btn-secondary:hover {
  border-color: var(--c-text-bright);
  color: var(--c-text-bright);
}

.btn-small { font-size: var(--ts-sm); padding: 10px 24px; }

.btn-glow {
  background: linear-gradient(135deg, var(--c-rose), var(--c-rose-deep));
  color: var(--c-white);
  box-shadow: var(--shadow-glow-rose);
}

/* ── Map screen ── */
#map-screen { padding-top: var(--sp-5); }

.map-header {
  text-align: center;
  margin-bottom: var(--sp-8);
}
.map-header h2 {
  font-size: var(--ts-xl);
  margin-bottom: var(--sp-2);
}

/* Progress bar */
.progress-bar-wrap {
  width: 100%;
  max-width: 280px;
  margin: var(--sp-3) auto 0;
  height: 3px;
  background: rgba(184,169,212,0.15);
  border-radius: var(--radius-pill);
  overflow: hidden;
}
.progress-bar-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--c-rose), var(--c-gold));
  border-radius: var(--radius-pill);
  transition: width var(--dur-slow) ease;
}
.progress-text {
  font-size: var(--ts-xs);
  color: var(--c-lavender);
  margin-top: var(--sp-2);
  font-weight: 300;
}

/* ── Chapter list (replaces cards) ── */
.chapter-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 460px;
  margin: 0 auto;
  padding-bottom: var(--sp-8);
}

.chapter-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-5) var(--sp-3);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--dur-fast) ease, opacity var(--dur-fast) ease;
  -webkit-tap-highlight-color: transparent;
  position: relative;
}
.chapter-row:hover {
  background: rgba(184,169,212,0.08);
}
.chapter-row:active {
  background: rgba(184,169,212,0.12);
}

.chapter-row .ch-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--ts-md);
  border-radius: var(--radius-sm);
  background: rgba(184,169,212,0.06);
}

.chapter-row .ch-body {
  flex: 1;
  min-width: 0;
}

.chapter-row .ch-title {
  font-family: var(--font-serif);
  font-size: var(--ts-base);
  font-weight: 400;
  color: var(--c-text-bright);
  margin-bottom: 2px;
  line-height: 1.3;
}

.chapter-row .ch-subtitle {
  font-size: var(--ts-sm);
  color: var(--c-lavender);
  font-weight: 300;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chapter-row .ch-status {
  flex-shrink: 0;
  font-size: var(--ts-sm);
  color: var(--c-success);
  opacity: 0;
  transition: opacity var(--dur-normal) ease;
}

/* States */
.chapter-row[data-explored="true"] .ch-status {
  opacity: 1;
}
.chapter-row[data-explored="true"] .ch-title {
  text-shadow: 0 0 12px rgba(107,255,184,0.15);
}

.chapter-row[data-locked="true"] {
  opacity: 0.35;
  cursor: default;
  pointer-events: none;
}
.chapter-row[data-locked="true"] .ch-icon {
  filter: grayscale(0.5);
}

.chapter-row.unlocking {
  animation: rowUnlock 1s ease;
}
@keyframes rowUnlock {
  0%  { background: rgba(255,107,138,0.15); }
  100%{ background: transparent; }
}

/* Letter row special */
.chapter-row.letter-row {
  margin-top: var(--sp-5);
  padding-top: var(--sp-5);
  border-top: 1px solid rgba(184,169,212,0.1);
}
.chapter-row.letter-row .ch-icon {
  background: rgba(255,213,107,0.1);
}

/* ── Memory screen ── */
#memory-screen { padding-top: var(--sp-5); }

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--ts-sm);
  color: var(--c-lavender);
  cursor: pointer;
  margin-bottom: var(--sp-5);
  background: none;
  border: none;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
  transition: color var(--dur-fast) ease;
}
.back-btn:hover { color: var(--c-text-bright); }

.memory-category-title {
  font-family: var(--font-serif);
  font-size: var(--ts-lg);
  font-weight: 400;
  margin-bottom: var(--sp-8);
  color: var(--c-text-bright);
}

/* Memory list – simple rows, not cards */
.memory-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 460px;
  padding-bottom: var(--sp-8);
}

.memory-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background var(--dur-fast) ease;
  -webkit-tap-highlight-color: transparent;
  overflow: hidden;
  background: var(--c-surface);
}
.memory-item:hover {
  background: rgba(184,169,212,0.12);
}
.memory-item:active {
  transform: scale(0.99);
}

.memory-item-thumb {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  object-fit: cover;
  display: block;
}

.memory-item-placeholder {
  flex-shrink: 0;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--ts-lg);
  border-radius: var(--radius-sm);
  background: rgba(184,169,212,0.08);
}

.memory-item-body {
  flex: 1;
  min-width: 0;
  padding: var(--sp-1) 0;
}

.memory-item-title {
  font-family: var(--font-serif);
  font-size: var(--ts-base);
  color: var(--c-text-bright);
  margin-bottom: 2px;
}
.memory-item-tease {
  font-size: var(--ts-sm);
  color: var(--c-lavender);
  font-weight: 300;
  font-style: italic;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.memory-item-explored {
  font-size: var(--ts-xs);
  color: var(--c-success);
  margin-top: 4px;
  opacity: 0;
}
.memory-item-explored.show { opacity: 1; }

/* ── Detail screen ── */
#detail-screen { padding-top: var(--sp-5); }

.detail-photo {
  width: calc(100% + var(--sp-5) * 2);
  margin: calc(var(--sp-2) * -1) calc(var(--sp-5) * -1) var(--sp-8);
  max-height: 320px;
  object-fit: cover;
  display: block;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
}

.detail-emoji-hero {
  font-size: var(--ts-3xl);
  text-align: center;
  margin-bottom: var(--sp-5);
}

.detail-title {
  font-family: var(--font-serif);
  font-size: var(--ts-lg);
  font-weight: 400;
  margin-bottom: var(--sp-5);
  line-height: 1.3;
  color: var(--c-text-bright);
}

.detail-text {
  font-size: var(--ts-base);
  line-height: 1.8;
  margin-bottom: var(--sp-8);
  color: var(--c-text);
}
.detail-text p { margin-bottom: var(--sp-5); }

.detail-reflection {
  font-family: var(--font-hand);
  font-size: var(--ts-md);
  color: var(--c-rose-soft);
  line-height: 1.6;
  padding: var(--sp-5);
  border-left: 3px solid var(--c-gold);
  margin: var(--sp-8) 0;
  background: rgba(255,213,107,0.04);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.detail-extra-photos {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3);
  margin: var(--sp-5) 0;
}
.detail-extra-photos img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

/* ── Song section ── */
.song-section {
  margin: var(--sp-8) 0;
  padding: var(--sp-5);
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(230,80,180,0.08), rgba(255,107,138,0.06));
  border: 1px solid rgba(255,107,138,0.12);
}
.song-label {
  font-family: var(--font-hand);
  font-size: var(--ts-md);
  color: var(--c-rose-soft);
  margin-bottom: var(--sp-3);
  text-align: center;
}
.song-embed {
  border-radius: var(--radius-md);
  width: 100%;
  margin-bottom: var(--sp-5);
}
.dance-btn {
  display: block;
  width: 100%;
  background: linear-gradient(135deg, #e050b4, var(--c-rose), #ff8c6b);
  color: var(--c-white);
  box-shadow: 0 0 20px rgba(230,80,180,0.3);
  font-size: var(--ts-base);
  font-weight: 600;
  letter-spacing: 0.5px;
  padding: 14px 24px;
  border-radius: var(--radius-pill);
  border: none;
  cursor: pointer;
  transition: all var(--dur-normal) var(--ease-out);
}
.dance-btn:hover {
  box-shadow: 0 0 35px rgba(230,80,180,0.5);
  transform: translateY(-2px);
}
.dance-btn:active {
  transform: scale(0.97);
}
.dance-btn:disabled {
  opacity: 0.7;
  cursor: default;
  transform: none;
  animation: dancePulse 1s ease infinite;
}

/* ── Dance mode active effects ── */
.dance-active {
  position: relative;
}

/* Pulsing pink glow overlay */
.dance-active::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
  background: radial-gradient(ellipse 80% 60% at 50% 50%, rgba(230,80,180,0.12), transparent 70%);
  animation: pulseGlow 2s ease-in-out infinite;
}

/* Photo sway */
.dance-active .detail-photo {
  animation: sway 3s ease-in-out infinite;
  transform-origin: center center;
}
.dance-active .detail-extra-photos img {
  animation: sway 3s ease-in-out infinite;
  transform-origin: center center;
}
.dance-active .detail-extra-photos img:nth-child(2) {
  animation-delay: 0.4s;
}
.dance-active .detail-extra-photos img:nth-child(3) {
  animation-delay: 0.8s;
}

/* Song section glow when dancing */
.dance-active .song-section {
  border-color: rgba(230,80,180,0.35);
  box-shadow: 0 0 30px rgba(230,80,180,0.15);
  animation: dancePulse 2s ease-in-out infinite;
}

@keyframes sway {
  0%, 100% { transform: rotate(-1.5deg) scale(1.01); }
  50%      { transform: rotate(1.5deg) scale(1.02); }
}

@keyframes pulseGlow {
  0%, 100% { opacity: 0.4; }
  50%      { opacity: 1; }
}

@keyframes dancePulse {
  0%, 100% { box-shadow: 0 0 20px rgba(230,80,180,0.2); }
  50%      { box-shadow: 0 0 40px rgba(230,80,180,0.45); }
}

/* ── Deeper content ── */
.deeper-content {
  display: none;
  margin-top: var(--sp-8);
  padding-top: var(--sp-8);
  border-top: 1px solid rgba(184,169,212,0.1);
}
.deeper-content.revealed {
  display: block;
  animation: fadeUp var(--dur-slow) ease;
}

/* ── Video ── */
.video-container {
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  margin: var(--sp-5) 0;
  background: #000;
}
.video-container video { width: 100%; display: block; }
.video-label {
  font-family: var(--font-hand);
  font-size: var(--ts-base);
  color: var(--c-rose-soft);
  text-align: center;
  margin-top: var(--sp-2);
}

/* ── Letter screen ── */
#letter-screen {
  padding: var(--sp-13) var(--sp-5) var(--sp-34);
}
.letter-header {
  text-align: center;
  margin-bottom: var(--sp-13);
}
.letter-header h2 {
  font-size: var(--ts-xl);
  margin-bottom: var(--sp-2);
}
.letter-header .sub {
  font-family: var(--font-hand);
  font-size: var(--ts-base);
  color: var(--c-rose-soft);
}

.letter-body {
  max-width: 480px;
  margin: 0 auto;
}
.letter-body p,
.letter-body .letter-sign {
  font-size: var(--ts-base);
  line-height: 1.8;
  margin-bottom: var(--sp-5);
  opacity: 0;
  transform: translateY(12px);
  transition: all 0.7s ease;
}
.letter-body p.visible,
.letter-body .letter-sign.visible {
  opacity: 1;
  transform: translateY(0);
}
.letter-body .emphasis {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--ts-md);
  padding: var(--sp-5) 0 var(--sp-5) var(--sp-5);
  border-left: 3px solid var(--c-gold);
  margin: var(--sp-8) 0;
  color: var(--c-text-bright);
}
.letter-body .handwritten {
  font-family: var(--font-hand);
  font-size: var(--ts-md);
  color: var(--c-rose-soft);
  line-height: 1.7;
}

.letter-sign {
  margin-top: var(--sp-13);
  text-align: right;
}
.letter-sign .name {
  font-family: var(--font-hand);
  font-size: var(--ts-xl);
  color: var(--c-text-bright);
}
.letter-sign .ps {
  font-size: var(--ts-sm);
  color: var(--c-lavender);
  margin-top: var(--sp-5);
  font-style: italic;
  line-height: 1.6;
}

.letter-easter-egg {
  display: block;
  margin: var(--sp-21) auto 0;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--c-gold), var(--c-coral));
  border: none;
  cursor: pointer;
  opacity: 0;
  animation: fadeUp 1s 2s ease forwards;
  transition: transform var(--dur-normal) ease, box-shadow var(--dur-normal) ease;
  box-shadow: var(--shadow-glow-gold);
  font-size: 1.3rem;
  line-height: 48px;
  text-align: center;
}
.letter-easter-egg:active {
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(255,213,107,0.5);
}

/* ── Modal ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(11,6,20,0.75);
  z-index: 100;
  justify-content: center;
  align-items: center;
  padding: var(--sp-5);
  backdrop-filter: blur(8px);
}
.modal-overlay.show {
  display: flex;
  animation: fadeIn 0.3s ease;
}
.modal-content {
  background: var(--c-deep);
  border: 1px solid rgba(184,169,212,0.15);
  border-radius: var(--radius-lg);
  padding: var(--sp-8) var(--sp-5);
  max-width: 380px;
  width: 100%;
  text-align: center;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.4s ease;
}
.modal-content h3 {
  font-size: var(--ts-lg);
  margin-bottom: var(--sp-5);
}
.modal-content p {
  font-size: var(--ts-sm);
  line-height: 1.7;
  margin-bottom: var(--sp-5);
  color: var(--c-lavender);
}
.modal-content .handwritten {
  font-family: var(--font-hand);
  font-size: var(--ts-md);
  color: var(--c-rose-soft);
}
.modal-close {
  margin-top: var(--sp-5);
  background: none;
  border: 1.5px solid var(--c-lavender);
  border-radius: var(--radius-pill);
  padding: var(--sp-2) var(--sp-5);
  font-family: inherit;
  font-size: var(--ts-sm);
  color: var(--c-stardust);
  cursor: pointer;
  transition: border-color var(--dur-fast) ease;
}
.modal-close:hover { border-color: var(--c-text-bright); }

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: var(--sp-8);
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: var(--c-deep);
  border: 1px solid rgba(184,169,212,0.2);
  color: var(--c-stardust);
  padding: var(--sp-3) var(--sp-5);
  border-radius: var(--radius-pill);
  font-size: var(--ts-sm);
  z-index: 90;
  box-shadow: var(--shadow-md);
  transition: transform 0.4s var(--ease-bounce);
  white-space: nowrap;
}
.toast.show {
  transform: translateX(-50%) translateY(0);
}

/* ── Confirm gate ── */
.confirm-gate {
  text-align: center;
  padding: var(--sp-21) var(--sp-5);
}
.confirm-gate h3 {
  font-size: var(--ts-lg);
  margin-bottom: var(--sp-3);
}
.confirm-gate p {
  font-size: var(--ts-sm);
  color: var(--c-lavender);
  margin-bottom: var(--sp-8);
  line-height: 1.6;
}
.confirm-buttons {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  align-items: center;
}

/* ── Cosmic toggle ── */
.cosmic-toggle-wrap {
  position: fixed;
  bottom: var(--sp-5);
  right: var(--sp-5);
  z-index: 50;
}
.cosmic-toggle {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  background: var(--c-surface-dim);
  border: 1px solid rgba(184,169,212,0.15);
  border-radius: var(--radius-pill);
  padding: var(--sp-2) var(--sp-3);
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: var(--ts-xs);
  color: var(--c-lavender);
  transition: border-color var(--dur-fast) ease;
  -webkit-tap-highlight-color: transparent;
}
.cosmic-toggle:hover { border-color: var(--c-lavender); }

.cosmic-toggle-switch {
  width: 28px;
  height: 16px;
  border-radius: var(--radius-pill);
  background: rgba(184,169,212,0.2);
  position: relative;
  transition: background var(--dur-normal) ease;
}
.cosmic-toggle-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--c-lavender);
  transition: transform var(--dur-normal) var(--ease-out);
}
.cosmic-toggle.active .cosmic-toggle-switch {
  background: var(--c-rose);
}
.cosmic-toggle.active .cosmic-toggle-switch::after {
  transform: translateX(12px);
  background: var(--c-white);
}

/* ── Lightbox ── */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(11,6,20,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  justify-content: center;
  align-items: center;
  padding: var(--sp-5);
  cursor: zoom-out;
  -webkit-tap-highlight-color: transparent;
}
.lightbox.show {
  display: flex;
  animation: fadeIn 0.25s ease;
}
.lightbox img {
  max-width: 100%;
  max-height: 90vh;
  max-height: 90dvh;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  animation: lightboxZoom 0.3s var(--ease-out);
  user-select: none;
  -webkit-user-select: none;
}
@keyframes lightboxZoom {
  from { transform: scale(0.85); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}
.lightbox-close {
  position: absolute;
  top: var(--sp-5);
  right: var(--sp-5);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(184,169,212,0.15);
  border: 1px solid rgba(184,169,212,0.25);
  color: var(--c-stardust);
  font-size: var(--ts-xl);
  line-height: 38px;
  text-align: center;
  cursor: pointer;
  transition: background var(--dur-fast) ease;
  -webkit-tap-highlight-color: transparent;
}
.lightbox-close:hover {
  background: rgba(184,169,212,0.25);
}

/* Make photos look tappable on touch devices */
@media (hover: none) and (pointer: coarse) {
  .detail-photo,
  .detail-extra-photos img {
    cursor: zoom-in;
  }
}

/* ── Garden Gift (Easter Egg) ── */
.gift-overlay {
  position: fixed;
  inset: 0;
  z-index: 300;
  background: radial-gradient(ellipse 80% 70% at 50% 50%, rgba(45,24,84,0.92), rgba(11,6,20,0.96));
  display: flex;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.6s ease;
  transition: opacity 1s ease;
}
.gift-overlay.fade-out {
  opacity: 0;
  pointer-events: none;
}

.gift-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.gift-card {
  position: relative;
  z-index: 2;
  background: var(--c-deep);
  border: 1px solid rgba(255,213,107,0.2);
  border-radius: var(--radius-lg);
  padding: var(--sp-8) var(--sp-5);
  max-width: 380px;
  width: calc(100% - var(--sp-8));
  text-align: center;
  box-shadow: 0 0 60px rgba(255,213,107,0.12), var(--shadow-lg);
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  transition: opacity 0.8s ease, transform 0.8s var(--ease-out);
}
.gift-card.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.gift-card h3 {
  font-size: var(--ts-lg);
  margin-bottom: var(--sp-5);
  color: var(--c-text-bright);
}
.gift-card p {
  font-size: var(--ts-sm);
  line-height: 1.7;
  margin-bottom: var(--sp-5);
  color: var(--c-lavender);
}
.gift-card .handwritten {
  font-family: var(--font-hand);
  font-size: var(--ts-md);
  color: var(--c-rose-soft);
}
.gift-close {
  margin-top: var(--sp-3);
}

/* ── Animations ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slideUp {
  from { transform: translateY(40px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* ── Responsive ── */
@media (min-width: 600px) {
  .screen { padding: var(--sp-13) var(--sp-8); }
  .landing-lines { font-size: var(--ts-lg); }
  .detail-photo {
    width: calc(100% + var(--sp-8) * 2);
    margin-left: calc(var(--sp-8) * -1);
    margin-right: calc(var(--sp-8) * -1);
  }
}

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