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

:root {
  --cream: #FAF7F2;
  --warm: #F2EDE4;
  --blush: #E8D5C4;
  --rose: #C4856A;
  --deep: #8B5A4A;
  --text: #3D2B1F;
  --muted: #9B8178;
  --gold: #C9A96E;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
}

html, body {
  height: 100%;
  height: 100dvh;
  background: var(--cream);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

.screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.9s ease;
  padding-left: var(--safe-left);
  padding-right: var(--safe-right);
}

.screen.active {
  opacity: 1;
  pointer-events: all;
}

/* SPLASH */
#splash { cursor: pointer; touch-action: manipulation; }

.splash-inner { text-align: center; user-select: none; padding: 0 1.5rem; }

.splash-date {
  font-size: 11px;
  letter-spacing: 0.25em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 2rem;
  opacity: 0;
  animation: fadeUp 1s ease 0.5s forwards;
}

.splash-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(52px, 10vw, 88px);
  font-weight: 300;
  font-style: italic;
  line-height: 1;
  color: var(--text);
  opacity: 0;
  animation: fadeUp 1s ease 0.9s forwards;
}

.splash-line {
  width: 1px;
  height: 60px;
  background: linear-gradient(to bottom, transparent, var(--rose), transparent);
  margin: 2rem auto;
  opacity: 0;
  animation: fadeIn 1s ease 1.5s forwards;
}

.splash-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.25rem;
  opacity: 0;
  animation: fadeUp 1s ease 1.8s forwards;
}

.splash-hint {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--muted);
  text-transform: uppercase;
}

.splash-hint span {
  display: inline-block;
  animation: pulse 2s ease 2.5s infinite;
}

.splash-skip {
  font-family: inherit;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rose);
  background: none;
  border: none;
  padding: 0.35rem 0.5rem;
  cursor: pointer;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}

.splash-skip:hover,
.splash-skip:focus-visible {
  opacity: 1;
  outline: none;
}

/* DAYS */
#days { overflow: hidden; }

.day-counter {
  position: fixed;
  top: calc(1.25rem + var(--safe-top));
  right: calc(1.25rem + var(--safe-right));
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--muted);
  text-transform: uppercase;
  z-index: 10;
  transition: opacity 0.4s;
}

.day-stage {
  width: 100%;
  height: 100%;
  height: 100dvh;
  position: relative;
  overflow: hidden;
}

.day-card {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateX(60px);
  transition: opacity 0.8s ease, transform 0.8s ease;
  padding: calc(3rem + var(--safe-top)) 1.5rem calc(6rem + var(--safe-bottom));
}

.day-card.visible { opacity: 1; pointer-events: auto; transform: translateX(0); }
.day-card.exit { opacity: 0; pointer-events: none; transform: translateX(-60px); }

.day-label {
  font-size: 10px;
  letter-spacing: 0.25em;
  color: var(--rose);
  text-transform: uppercase;
  margin-bottom: 1.25rem;
}

.day-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(22px, 4vw, 30px);
  font-weight: 300;
  font-style: italic;
  color: var(--text);
  text-align: center;
  margin-bottom: 1.5rem;
  line-height: 1.3;
}

.photo-strip-wrap {
  position: relative;
  width: 94vw;
  max-width: 600px;
  min-width: 0;
  flex-shrink: 0;
}

.photo-strip-wrap.can-scroll::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 56px;
  height: 100%;
  pointer-events: none;
  background: linear-gradient(to left, var(--cream) 10%, transparent);
  transition: opacity 0.5s ease;
  z-index: 1;
}

.photo-strip-wrap.hint-dismissed::after,
.photo-strip-wrap.at-end::after {
  opacity: 0;
}

.scroll-hint {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.photo-strip-wrap.can-scroll .scroll-hint {
  opacity: 1;
}

.photo-strip-wrap.hint-dismissed .scroll-hint,
.photo-strip-wrap.at-end .scroll-hint {
  opacity: 0;
}

.scroll-hint-arrow {
  display: block;
  font-size: 22px;
  line-height: 1;
  color: var(--rose);
  animation: scrollHintNudge 2s ease-in-out infinite;
}

.photo-strip-wrap.is-peeking .scroll-hint-arrow {
  animation: scrollHintNudge 0.6s ease-in-out 2;
}

@keyframes scrollHintNudge {
  0%, 100% { transform: translateX(0); opacity: 0.45; }
  50% { transform: translateX(7px); opacity: 1; }
}

.photo-strip {
  display: flex;
  gap: 10px;
  overflow-x: scroll;
  overflow-y: hidden;
  width: 100%;
  min-width: 0;
  padding-bottom: 4px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x pan-y;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}

.photo-strip.can-scroll {
  cursor: grab;
}

.photo-strip.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  user-select: none;
}

.photo-strip::-webkit-scrollbar { display: none; }

.photo-thumb {
  flex-shrink: 0;
  scroll-snap-align: start;
  width: clamp(120px, 36vw, 140px);
  height: clamp(150px, 45vw, 175px);
  background: var(--blush);
  border-radius: 2px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.photo-thumb:has(img) {
  cursor: pointer;
}

.photo-thumb:nth-child(2) { background: #E0D4C8; }
.photo-thumb:nth-child(3) { background: #D8CCBF; }
.photo-thumb:nth-child(4) { background: #D0C4B6; }

.photo-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
}

.photo-thumb-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.thumb-icon { font-size: 24px; opacity: 0.35; }

.thumb-hint {
  font-size: 10px;
  color: var(--muted);
  font-style: italic;
  text-align: center;
  padding: 0 8px;
}

.day-caption {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(15px, 3.5vw, 16px);
  font-style: italic;
  color: var(--muted);
  text-align: center;
  margin-top: 1.25rem;
  max-width: 340px;
  line-height: 1.5;
}

/* nav */
.day-nav {
  position: fixed;
  bottom: calc(1.5rem + var(--safe-bottom));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 1.5rem;
  z-index: 10;
}

.day-dots { display: flex; gap: 8px; }

.dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--blush);
  transition: all 0.3s ease;
}

.dot.active {
  background: var(--rose);
  width: 20px;
  border-radius: 2px;
}

.nav-btn {
  background: none;
  border: 1px solid var(--blush);
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--muted);
  font-size: 18px;
  transition: all 0.2s ease;
  touch-action: manipulation;
}

.nav-btn:hover,
.nav-btn:active { border-color: var(--rose); color: var(--rose); }
.nav-btn:disabled { opacity: 0.3; cursor: default; }

/* CHAT */
#ai-moment { justify-content: flex-end; }

.chat-window {
  width: 100%;
  max-width: 480px;
  height: 100%;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  margin: 0 auto;
}

.chat-header {
  padding: calc(2rem + var(--safe-top)) 1.5rem 1.25rem;
  border-bottom: 0.5px solid var(--blush);
  opacity: 0;
  transition: opacity 0.8s ease 0.3s;
  flex-shrink: 0;
}

#ai-moment.active .chat-header { opacity: 1; }

.chat-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.chat-header-name {
  font-weight: 500;
  font-size: 15px;
  color: var(--text);
}

.chat-mode-toggle {
  display: flex;
  gap: 2px;
  padding: 2px;
  background: var(--warm);
  border: 0.5px solid var(--blush);
  border-radius: 999px;
  flex-shrink: 0;
}

.chat-mode-btn {
  font-family: inherit;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  background: transparent;
  border: none;
  border-radius: 999px;
  padding: 0.35rem 0.55rem;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}

.chat-mode-btn.active {
  background: white;
  color: var(--text);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.chat-mode-btn:focus-visible {
  outline: 2px solid var(--rose);
  outline-offset: 1px;
}

.chat-header-status {
  font-size: 12px;
  color: var(--rose);
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-dot {
  width: 6px;
  height: 6px;
  background: var(--rose);
  border-radius: 50%;
  animation: pulse 2s ease infinite;
}

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;
  overscroll-behavior: contain;
}

.chat-messages::-webkit-scrollbar { width: 0; }

.msg {
  max-width: 78%;
  padding: 0.7rem 1rem;
  font-size: 15px;
  line-height: 1.55;
  border-radius: 18px;
  animation: msgIn 0.3s ease forwards;
}

.msg-from {
  background: var(--warm);
  border: 0.5px solid var(--blush);
  border-radius: 18px 18px 18px 4px;
  color: var(--text);
  align-self: flex-start;
}

.msg-to {
  background: var(--rose);
  color: white;
  border-radius: 18px 18px 4px 18px;
  align-self: flex-end;
}

.msg-cta { align-self: flex-start; max-width: 86%; }

.msg-cta-inner {
  background: var(--warm);
  border: 0.5px solid var(--blush);
  border-radius: 18px 18px 18px 4px;
  padding: 0.7rem 1rem;
  margin-bottom: 8px;
  font-size: 15px;
  color: var(--text);
  line-height: 1.55;
}

.msg-cta-btn {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  background: var(--rose);
  color: white;
  border: none;
  border-radius: 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  letter-spacing: 0.08em;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  touch-action: manipulation;
}

.msg-cta-btn:hover,
.msg-cta-btn:active { background: var(--deep); transform: translateY(-1px); }

.msg-cta-btn-soft {
  display: block;
  width: 100%;
  padding: 0.65rem 1rem;
  background: none;
  color: var(--muted);
  border: 0.5px solid var(--blush);
  border-radius: 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  cursor: pointer;
  text-align: center;
  transition: all 0.2s ease;
  margin-top: 6px;
  touch-action: manipulation;
}

.msg-cta-btn-soft:hover,
.msg-cta-btn-soft:active { border-color: var(--rose); color: var(--rose); }

.typing-bubble {
  background: var(--warm);
  border: 0.5px solid var(--blush);
  border-radius: 18px 18px 18px 4px;
  padding: 0.75rem 1rem;
  align-self: flex-start;
  display: none;
  align-items: center;
  gap: 5px;
  width: fit-content;
}

.typing-bubble.visible { display: flex; }

.typing-dot {
  width: 6px;
  height: 6px;
  background: var(--rose);
  border-radius: 50%;
  animation: typingBounce 1.2s ease infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.15s; }
.typing-dot:nth-child(3) { animation-delay: 0.3s; }

.chat-input-area {
  padding: 1rem 1.25rem calc(1rem + var(--safe-bottom));
  border-top: 0.5px solid var(--blush);
  display: flex;
  gap: 10px;
  align-items: center;
  flex-shrink: 0;
  opacity: 0;
  transition: opacity 0.8s ease 1.2s;
}

#ai-moment.active .chat-input-area { opacity: 1; }

.chat-input {
  flex: 1;
  background: var(--warm);
  border: 0.5px solid var(--blush);
  border-radius: 22px;
  padding: 0.7rem 1.1rem;
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease;
}

.chat-input::placeholder { color: var(--muted); }
.chat-input:focus { border-color: var(--rose); }

.chat-send {
  background: var(--rose);
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.2s ease;
  color: white;
  font-size: 16px;
  touch-action: manipulation;
}

.chat-send:hover,
.chat-send:active { background: var(--deep); transform: scale(1.05); }

.chat-send:disabled { opacity: 0.5; cursor: default; transform: none; }

/* COLLAGE */
#collage-screen {
  overflow-y: auto;
  align-items: flex-start;
  justify-content: flex-start;
  padding: calc(1.5rem + var(--safe-top)) 1.25rem calc(2rem + var(--safe-bottom));
  -webkit-overflow-scrolling: touch;
}

.collage-inner {
  max-width: 640px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem 0 3rem;
}

.collage-eyebrow {
  font-size: 10px;
  letter-spacing: 0.25em;
  color: var(--rose);
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 0.75rem;
  opacity: 0;
  transition: opacity 0.8s ease 0.2s;
}

#collage-screen.active .collage-eyebrow { opacity: 1; }

.collage-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(28px, 6vw, 38px);
  font-weight: 300;
  font-style: italic;
  color: var(--text);
  text-align: center;
  margin-bottom: 1.75rem;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.8s ease 0.4s, transform 0.8s ease 0.4s;
}

#collage-screen.active .collage-title {
  opacity: 1;
  transform: translateY(0);
}

.collage-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  opacity: 0;
  transition: opacity 0.8s ease 0.7s;
}

#collage-screen.active .collage-grid { opacity: 1; }

.collage-item {
  aspect-ratio: 1;
  border-radius: 2px;
  overflow: hidden;
  background: var(--blush);
  cursor: pointer;
  opacity: 0;
  animation: collageIn 0.5s ease forwards;
}

.collage-item--wide {
  grid-column: span 2;
  aspect-ratio: 2 / 1;
}

.collage-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  -webkit-user-drag: none;
  user-select: none;
}

.collage-continue {
  margin: 2.5rem auto 0;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.8s ease 1.2s;
  background: none;
  border: none;
  color: var(--muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  touch-action: manipulation;
  padding: 0.5rem 0;
}

#collage-screen.active .collage-continue { opacity: 1; }
.collage-continue:hover,
.collage-continue:active { color: var(--rose); }
.collage-continue:hover .lc-line { width: 60px; }

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

@media (max-width: 380px) {
  .collage-grid {
    grid-template-columns: repeat(2, 1fr);
  }

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

}

/* LETTER */
#letter-screen {
  overflow-y: auto;
  align-items: flex-start;
  justify-content: flex-start;
  padding: calc(1.5rem + var(--safe-top)) 1.5rem calc(2rem + var(--safe-bottom));
  -webkit-overflow-scrolling: touch;
}

.letter-inner {
  max-width: 540px;
  width: 100%;
  margin: 0 auto;
  padding: 2rem 0 4rem;
}

.letter-top {
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--muted);
  text-transform: uppercase;
  margin-bottom: 3rem;
  opacity: 0;
  transition: opacity 1s ease 0.2s;
}

#letter-screen.active .letter-top { opacity: 1; }

.letter-salutation {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(24px, 5vw, 28px);
  font-weight: 300;
  font-style: italic;
  color: var(--text);
  margin-bottom: 2rem;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.8s ease 0.6s, transform 0.8s ease 0.6s;
}

#letter-screen.active .letter-salutation { opacity: 1; transform: translateY(0); }

.letter-body {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(18px, 4.5vw, 20px);
  font-weight: 300;
  line-height: 1.9;
  color: var(--text);
  opacity: 0;
  transform: translateY(16px);
  white-space: pre-line;
  transition: opacity 0.8s ease 1s, transform 0.8s ease 1s;
}

#letter-screen.active .letter-body { opacity: 1; transform: translateY(0); }

.letter-sign {
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  font-style: italic;
  color: var(--rose);
  margin-top: 2.5rem;
  opacity: 0;
  transition: opacity 0.8s ease 1.6s;
}

#letter-screen.active .letter-sign { opacity: 1; }

.letter-continue {
  margin-top: 3rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.8s ease 2.4s;
  background: none;
  border: none;
  color: var(--muted);
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  touch-action: manipulation;
  padding: 0.5rem 0;
}

#letter-screen.active .letter-continue { opacity: 1; }
.letter-continue:hover,
.letter-continue:active { color: var(--rose); }

.lc-line {
  width: 40px;
  height: 1px;
  background: currentColor;
  transition: width 0.3s ease;
}

.letter-continue:hover .lc-line { width: 60px; }

/* DINNER */
#dinner-screen {
  background: var(--text);
  color: var(--cream);
  text-align: center;
  padding: calc(2rem + var(--safe-top)) 1.5rem calc(2rem + var(--safe-bottom));
}

.dinner-inner { max-width: 480px; width: 100%; }

.dinner-eyebrow {
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 2rem;
  opacity: 0;
  transition: opacity 0.8s ease 0.3s;
}

#dinner-screen.active .dinner-eyebrow { opacity: 1; }

.dinner-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(38px, 7vw, 60px);
  font-weight: 300;
  font-style: italic;
  line-height: 1.1;
  color: var(--cream);
  margin-bottom: 1rem;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s ease 0.7s, transform 0.8s ease 0.7s;
}

#dinner-screen.active .dinner-title { opacity: 1; transform: translateY(0); }

.dinner-divider {
  width: 40px;
  height: 1px;
  background: var(--gold);
  margin: 1.5rem auto;
  opacity: 0;
  transition: opacity 0.8s ease 1.1s;
}

#dinner-screen.active .dinner-divider { opacity: 1; }

.dinner-details {
  opacity: 0;
  transition: opacity 0.8s ease 1.3s;
}

#dinner-screen.active .dinner-details { opacity: 1; }

.dinner-restaurant {
  font-family: 'Cormorant Garamond', serif;
  font-size: 22px;
  font-style: italic;
  color: var(--blush);
  margin-bottom: 0.4rem;
}

.dinner-time {
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--muted);
  text-transform: uppercase;
}

.dinner-btns {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-top: 3rem;
  opacity: 0;
  transition: opacity 0.8s ease 1.8s;
  flex-wrap: wrap;
}

#dinner-screen.active .dinner-btns { opacity: 1; }

.dinner-btn {
  padding: 0.9rem 2rem;
  border-radius: 2px;
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.25s ease;
  border: 1px solid transparent;
  touch-action: manipulation;
  min-width: 140px;
}

.dinner-btn-primary {
  background: var(--rose);
  color: white;
  border-color: var(--rose);
}

.dinner-btn-primary:hover,
.dinner-btn-primary:active {
  background: var(--deep);
  border-color: var(--deep);
  transform: translateY(-2px);
}

.dinner-btn-secondary {
  background: transparent;
  color: var(--blush);
  border-color: rgba(255, 255, 255, 0.15);
}

.dinner-btn-secondary:hover,
.dinner-btn-secondary:active {
  border-color: var(--blush);
  transform: translateY(-2px);
}

.dinner-accepted {
  display: none;
  font-family: 'Cormorant Garamond', serif;
  font-size: 24px;
  font-style: italic;
  color: var(--gold);
  margin-top: 2rem;
}

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

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

@keyframes typingBounce {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-5px); }
}

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

@keyframes confettiFall {
  0% { transform: translateY(-20px) rotate(0deg); opacity: 1; }
  100% { transform: translateY(100vh) rotate(720deg); opacity: 0; }
}

/* PHOTO MODAL */
.photo-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(1.5rem + var(--safe-top)) 1.25rem calc(1.5rem + var(--safe-bottom));
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.photo-modal.open {
  opacity: 1;
  pointer-events: all;
}

.photo-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(61, 43, 31, 0.88);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.photo-modal-img {
  position: relative;
  z-index: 1;
  max-width: min(92vw, 720px);
  max-height: 82dvh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 3px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  transform: scale(0.96);
  transition: transform 0.35s ease;
}

.photo-modal.open .photo-modal-img {
  transform: scale(1);
}

.photo-modal-close {
  position: absolute;
  top: calc(1rem + var(--safe-top));
  right: calc(1rem + var(--safe-right));
  z-index: 2;
  width: 40px;
  height: 40px;
  border: 0.5px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: var(--cream);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
  transition: background 0.2s ease;
}

.photo-modal-close:hover,
.photo-modal-close:active {
  background: rgba(255, 255, 255, 0.16);
}

@media (max-width: 380px) {
  .day-nav { gap: 1rem; }
  .nav-btn { width: 44px; height: 44px; }
}
