/* ── Shared modal ─────────────────────────────────────────────────────────── */
.modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(20, 10, 20, 0.5);
  backdrop-filter: blur(6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.modal.open { opacity: 1; pointer-events: all; }

.modal-inner {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--border-soft);
  border-radius: 20px;
  box-shadow: 0 26px 60px var(--shadow);
  width: 100%;
  max-width: 440px;
  max-height: calc(100vh - 60px);
  overflow-y: auto;
  padding: 32px 28px;
  text-align: center;
  transform: scale(0.9);
  transition: transform 0.35s cubic-bezier(.34,1.56,.64,1);
}
.modal.open .modal-inner { transform: scale(1); }

.modal-title {
  font-size: 22px;
  font-style: italic;
  color: var(--accent-strong);
  margin-bottom: 18px;
}
.modal-close {
  margin-top: 22px;
  background: none;
  border: 1px solid var(--accent);
  color: var(--accent);
  padding: 8px 22px;
  border-radius: 30px;
  font-family: inherit;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease;
}
.modal-close:hover { background: var(--accent); color: var(--on-accent); }

/* ── Card action icon buttons (💍 📖 📸) ──────────────────────────────────── */
.extra-actions {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  opacity: 0;
  transition: opacity 1s ease;
}
.extra-actions.show { opacity: 1; }
.extra-btn {
  background: var(--surface-glass-2);
  border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent);
  color: var(--accent-strong);
  font-family: inherit;
  font-size: 12.5px;
  padding: 7px 13px;
  border-radius: 30px;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease, border-color 0.2s ease;
}
.extra-btn:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
}

/* ── Wedding letter (locked / unlocked) ───────────────────────────────────── */
.wl-locked-icon { font-size: 46px; margin-bottom: 10px; }
.wl-locked-text { font-size: 16px; color: var(--accent); font-style: italic; }
.wl-countdown {
  margin-top: 14px;
  font-size: 15px;
  color: var(--text-muted);
}
.wl-countdown b { color: var(--accent-strong); font-size: 22px; }
.wl-body {
  font-size: 17px;
  line-height: 1.8;
  white-space: pre-wrap;
  text-align: left;
  color: var(--ink);
}

/* ── Our Story — full-screen storyline page ───────────────────────────────── */
.story-screen {
  position: fixed;
  inset: 0;
  z-index: 150;
  background: var(--bg-gradient);
  overflow-y: auto;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.5s ease;
}
.story-screen.open { opacity: 1; pointer-events: all; }

.story-back {
  position: fixed;
  top: 16px; left: 16px;
  z-index: 2;
  background: var(--surface-glass);
  backdrop-filter: blur(6px);
  border: 1px solid var(--border-soft);
  color: var(--accent);
  font-family: inherit;
  font-size: 14px;
  padding: 8px 16px;
  border-radius: 30px;
  cursor: pointer;
  transition: background 0.2s ease;
}
.story-back:hover { background: color-mix(in srgb, var(--accent) 12%, transparent); }

.story-wrap {
  max-width: 560px;
  margin: 0 auto;
  padding: 78px 24px 60px;
}
.story-heading {
  text-align: center;
  font-size: 34px;
  font-style: italic;
  color: var(--accent-strong);
  margin-bottom: 6px;
}
.story-subhead {
  text-align: center;
  font-size: 15px;
  font-style: italic;
  color: var(--accent);
  margin-bottom: 40px;
}
.story-foot {
  text-align: center;
  font-size: 15px;
  font-style: italic;
  color: var(--text-muted);
  margin-top: 8px;
}

.timeline {
  text-align: left;
  padding-left: 6px;
  margin-top: 4px;
}
.tl-item {
  position: relative;
  padding: 0 0 30px 36px;
  margin-left: 8px;
  border-left: 2px solid color-mix(in srgb, var(--accent) 35%, transparent);
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.tl-item.in { opacity: 1; transform: translateY(0); }
.tl-item:last-child { border-left-color: transparent; padding-bottom: 0; }

/* future dream milestone (our first home) */
.tl-item.dream { border-left-style: dashed; }
.tl-item.dream .tl-dot {
  border-style: dashed;
  background: var(--surface);
}
.tl-item.dream .tl-title { opacity: 0.95; }
.tl-dot {
  position: absolute;
  left: -13px; top: 0;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--accent);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
}
.tl-date { font-size: 12px; letter-spacing: 0.4px; color: var(--accent); text-transform: uppercase; }
.tl-title { font-size: 17px; font-style: italic; color: var(--accent-strong); margin: 2px 0 4px; }
.tl-text { font-size: 14px; line-height: 1.6; color: var(--ink); opacity: 0.9; }
.tl-item.forever .tl-dot { background: var(--accent); color: var(--on-accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent); }

/* stamped / official milestone (Ministry approval) */
.tl-item.stamp .tl-dot {
  border: 2px solid var(--border-soft);
  background: color-mix(in srgb, var(--border-soft) 30%, var(--surface));
  transform: rotate(-8deg);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--border-soft) 40%, transparent);
}
.tl-item.stamp .tl-date { color: var(--accent-strong); font-weight: bold; }
.tl-item.stamp .tl-title { font-weight: bold; }

/* ── Photo gallery ────────────────────────────────────────────────────────── */
.gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 4px;
}
.gallery img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 12px;
  cursor: pointer;
  border: 1px solid var(--border-soft);
  transition: transform 0.2s ease;
}
.gallery img:hover { transform: scale(1.03); }
.gallery-empty {
  font-size: 15px;
  font-style: italic;
  color: var(--text-muted);
  padding: 24px 8px;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(10, 5, 10, 0.85);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.lightbox.open { opacity: 1; pointer-events: all; }
.lightbox img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

/* ── Wedding-day takeover ─────────────────────────────────────────────────── */
.takeover {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  background: var(--bg-gradient);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.8s ease;
}
.takeover.show { opacity: 1; pointer-events: all; }
.takeover-ring { font-size: 64px; margin-bottom: 8px; animation: heartbeat 1.3s ease-in-out infinite; }
.takeover-title {
  font-size: 34px;
  font-style: italic;
  color: var(--accent-strong);
  margin-bottom: 12px;
}
.takeover-sub {
  font-size: 18px;
  color: var(--accent);
  max-width: 420px;
  line-height: 1.7;
  margin-bottom: 28px;
}
.takeover-btn {
  background: var(--accent);
  color: var(--on-accent);
  border: none;
  padding: 13px 32px;
  border-radius: 40px;
  font-family: inherit;
  font-size: 17px;
  font-style: italic;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.15s ease;
}
.takeover-btn:hover { background: var(--accent-strong); transform: translateY(-1px); }

@media (max-width: 480px) {
  .takeover-title { font-size: 27px; }
  .modal-inner { padding: 26px 20px; }
}
