/* ==========================================================
   PARA IVANNA — Día de las Madres 2026
   Estilo cálido, elegante, tipo revista de lujo
   ========================================================== */

:root {
  --cream: #FBF7F2;
  --ivory: #F4EDE3;
  --pink-soft: #F4D7D5;
  --pink-blush: #E8B4B8;
  --rose: #B95C50;
  --rose-deep: #8B3A2F;
  --gold: #D4AF37;
  --gold-rose: #C9A96E;
  --gold-light: #E8D4A0;
  --warm-dark: #3D2E2A;
  --warm-darker: #2A1F1B;
  --black-soft: #1A1414;
  --shadow-warm: rgba(61, 46, 42, 0.15);
  --shadow-deep: rgba(26, 20, 20, 0.4);

  --font-display: 'Playfair Display', Georgia, serif;
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-script: 'Italianno', cursive;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--cream);
  color: var(--warm-dark);
  line-height: 1.6;
  overflow-x: hidden;
  min-height: 100vh;
}

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

button { cursor: pointer; font-family: inherit; border: none; background: none; }

/* ==========================================================
   PANTALLAS — sistema de cambio entre PIN, magazine, app
   ========================================================== */
.screen {
  display: none;
  min-height: 100vh;
  width: 100%;
}
.screen.active { display: block; }

/* ==========================================================
   1. PIN GATE
   ========================================================== */
.pin-screen {
  background: linear-gradient(135deg, #1a1414 0%, #2a1f1b 50%, #3d2e2a 100%);
  display: none;
  align-items: center;
  justify-content: center;
  position: fixed;
  inset: 0;
  z-index: 9999;
  overflow-y: auto;
  padding: 2rem 1rem;
}
.pin-screen.active { display: flex; }

.pin-container {
  width: 100%;
  max-width: 380px;
  text-align: center;
  color: var(--cream);
  animation: fadeInUp 0.8s ease;
}

.pin-rose {
  font-size: 3rem;
  margin-bottom: 1rem;
  animation: gentlePulse 3s ease infinite;
}

.pin-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--gold-light);
  margin-bottom: 0.5rem;
}

.pin-subtitle {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  color: var(--pink-blush);
  margin-bottom: 2.5rem;
  font-style: italic;
}

.pin-dots {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

.pin-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid var(--gold-rose);
  background: transparent;
  transition: all 0.3s ease;
}

.pin-dot.filled {
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.6);
  transform: scale(1.1);
}

.pin-dot.error {
  background: var(--rose);
  border-color: var(--rose);
  animation: shake 0.4s;
}

.pin-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.pin-key {
  height: 60px;
  border-radius: 50%;
  border: 1px solid rgba(212, 175, 55, 0.3);
  background: rgba(212, 175, 55, 0.08);
  color: var(--cream);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 400;
  transition: all 0.2s ease;
  -webkit-tap-highlight-color: transparent;
}

.pin-key:not(.pin-key-empty):hover { background: rgba(212, 175, 55, 0.2); transform: translateY(-2px); }
.pin-key:not(.pin-key-empty):active { transform: scale(0.95); background: rgba(212, 175, 55, 0.3); }
.pin-key-empty { visibility: hidden; }
.pin-key-back { font-size: 1.5rem; }

.pin-error {
  color: var(--pink-blush);
  font-family: var(--font-serif);
  font-style: italic;
  min-height: 1.5em;
  margin-top: 0.5rem;
}

.pin-hint {
  color: rgba(232, 212, 160, 0.5);
  font-size: 0.85rem;
  margin-top: 1.5rem;
  letter-spacing: 0.05em;
}

/* Credit con logo Roithink (PIN screen + footer) */
.pin-credit {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2rem;
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(232, 212, 160, 0.55);
  transition: opacity 0.2s, transform 0.2s;
}

.pin-credit:hover {
  opacity: 1;
  color: var(--gold-light);
  transform: translateY(-2px);
}

.pin-credit .credit-logo {
  height: 28px;
  width: auto;
  opacity: 0.85;
  filter: brightness(0) invert(1);
  transition: opacity 0.2s;
}

.pin-credit:hover .credit-logo { opacity: 1; }

.credit-subtitle {
  display: block;
  margin-top: 0.4rem;
  font-family: var(--font-serif);
  font-size: 0.7rem;
  font-style: italic;
  letter-spacing: 0.08em;
  text-transform: none;
  opacity: 0.7;
}

/* Footer credit (sobre fondo oscuro warm) */
.footer-credit {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  margin-top: 2.5rem;
  text-decoration: none;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold-rose);
  opacity: 0.7;
  transition: all 0.2s;
}

.footer-credit:hover {
  opacity: 1;
  color: var(--gold-light);
  transform: translateY(-2px);
}

.footer-credit .credit-logo {
  height: 30px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.footer-credit:hover .credit-logo { opacity: 1; }

/* ==========================================================
   2. PORTADA ESTILO REVISTA
   ========================================================== */
.magazine-screen {
  background: var(--cream);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 2rem 1rem 4rem;
  min-height: 100vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.magazine-screen.active { display: flex; }
.magazine-screen .magazine-paper { margin: auto 0; }

.magazine-paper {
  background: linear-gradient(180deg, #fffbf5 0%, #f8f0e3 100%);
  border-radius: 4px;
  width: 100%;
  max-width: 480px;
  box-shadow:
    0 30px 60px var(--shadow-deep),
    0 10px 20px var(--shadow-warm),
    inset 0 0 60px rgba(212, 175, 55, 0.05);
  overflow: hidden;
  animation: magazineEntry 1.2s cubic-bezier(0.2, 0.9, 0.3, 1);
  position: relative;
}

.magazine-paper::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(212, 175, 55, 0.08), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.magazine-border {
  border: 2px solid rgba(61, 46, 42, 0.15);
  margin: 1rem;
  padding: 1.5rem 1.25rem 2rem;
  position: relative;
  z-index: 1;
}

.magazine-header { text-align: center; }

.magazine-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(61, 46, 42, 0.2);
  padding-bottom: 0.5rem;
  margin-bottom: 0.75rem;
  font-family: var(--font-sans);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--warm-dark);
  text-transform: uppercase;
}

.magazine-masthead {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(3.5rem, 14vw, 5.5rem);
  letter-spacing: -0.02em;
  line-height: 0.9;
  color: var(--warm-darker);
  margin: 0.25rem 0;
  position: relative;
}

.magazine-masthead::after {
  content: '';
  display: block;
  width: 60%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  margin: 0.5rem auto 0;
}

.magazine-tagline {
  font-family: var(--font-serif);
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  color: var(--rose);
  text-transform: uppercase;
  font-weight: 500;
}

.magazine-photo-area {
  margin: 1.5rem 0;
  position: relative;
  background: var(--ivory);
  border: 1px solid rgba(61, 46, 42, 0.1);
  aspect-ratio: 4 / 5;
  overflow: hidden;
}

.magazine-photo-area img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.05) saturate(0.95);
}

.magazine-stars {
  position: absolute;
  bottom: 0.75rem;
  left: 50%;
  transform: translateX(-50%);
  color: var(--gold);
  letter-spacing: 0.5em;
  font-size: 0.85rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.magazine-headlines { padding: 0.5rem 0; }

.headline-kicker {
  display: inline-block;
  background: var(--rose);
  color: var(--cream);
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.25em;
  padding: 0.25rem 0.6rem;
  margin-right: 0.5rem;
  vertical-align: middle;
}

.magazine-main-headline {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.75rem, 6vw, 2.25rem);
  color: var(--warm-darker);
  line-height: 1.1;
  margin-bottom: 0.75rem;
}

.magazine-deck {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-style: italic;
  color: var(--warm-dark);
  border-left: 2px solid var(--gold);
  padding-left: 0.85rem;
  margin: 1rem 0 1.25rem;
  line-height: 1.5;
}

.magazine-bullets {
  list-style: none;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--warm-dark);
  border-top: 1px solid rgba(61, 46, 42, 0.15);
  border-bottom: 1px solid rgba(61, 46, 42, 0.15);
  padding: 0.75rem 0;
  margin-bottom: 1.5rem;
}

.magazine-bullets li {
  position: relative;
  padding: 0.3rem 0 0.3rem 1.25rem;
  letter-spacing: 0.02em;
}

.magazine-bullets li::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--gold);
  font-weight: bold;
  font-size: 1.2em;
  top: 0.15rem;
}

.magazine-enter-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  padding: 1rem 1.5rem;
  background: var(--warm-darker);
  color: var(--cream);
  font-family: var(--font-display);
  font-size: 1.05rem;
  letter-spacing: 0.05em;
  border-radius: 2px;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.magazine-enter-btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(212, 175, 55, 0.3), transparent);
  transform: translateX(-100%);
  transition: transform 0.6s ease;
}

.magazine-enter-btn:hover { background: var(--rose-deep); }
.magazine-enter-btn:hover::before { transform: translateX(100%); }
.magazine-enter-btn .arrow { transition: transform 0.3s; }
.magazine-enter-btn:hover .arrow { transform: translateX(4px); }

/* ==========================================================
   3. APP PRINCIPAL
   ========================================================== */
#main-app { background: var(--cream); position: relative; }

/* Pétalos cayendo */
.petals {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}
.petal {
  position: absolute;
  top: -20px;
  width: 14px;
  height: 14px;
  background: radial-gradient(circle at 30% 30%, var(--pink-blush), var(--rose) 70%, var(--rose-deep));
  border-radius: 0 100% 0 100%;
  opacity: 0.5;
  animation: petalFall linear infinite;
}

@keyframes petalFall {
  0% { transform: translateY(-20px) rotate(0deg); opacity: 0; }
  10% { opacity: 0.6; }
  100% { transform: translateY(110vh) rotate(540deg); opacity: 0; }
}

/* Navegación flotante */
.floating-nav {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%) translateY(-150%);
  background: rgba(255, 251, 245, 0.92);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(212, 175, 55, 0.3);
  border-radius: 100px;
  padding: 0.5rem 1rem;
  display: flex;
  gap: 0.25rem;
  z-index: 100;
  box-shadow: 0 4px 20px var(--shadow-warm);
  transition: transform 0.4s ease;
  max-width: calc(100% - 2rem);
  overflow-x: auto;
  scrollbar-width: none;
}
.floating-nav::-webkit-scrollbar { display: none; }
.floating-nav.visible { transform: translateX(-50%) translateY(0); }

.nav-link {
  font-family: var(--font-serif);
  font-size: 0.9rem;
  color: var(--warm-dark);
  text-decoration: none;
  padding: 0.4rem 0.85rem;
  border-radius: 100px;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.nav-link:hover { background: var(--gold-rose); color: var(--cream); }

/* ===== HERO ===== */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background:
    radial-gradient(ellipse at top, rgba(244, 215, 213, 0.4), transparent 70%),
    radial-gradient(ellipse at bottom, rgba(212, 175, 55, 0.1), transparent 60%),
    var(--cream);
  padding: 4rem 1.5rem 3rem;
  overflow: hidden;
}

.hero-content {
  text-align: center;
  max-width: 720px;
  position: relative;
  z-index: 2;
  animation: fadeInUp 1.2s ease;
}

.hero-kicker {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--rose);
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}

.hero-name {
  font-family: var(--font-script);
  font-size: clamp(4.5rem, 18vw, 8rem);
  color: var(--warm-darker);
  line-height: 1;
  margin-bottom: 0.5rem;
  background: linear-gradient(135deg, #8B3A2F 0%, #C9A96E 50%, #D4AF37 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: 0 4px 20px rgba(139, 58, 47, 0.15);
}

.hero-tagline {
  font-family: var(--font-display);
  font-size: clamp(1rem, 3.5vw, 1.4rem);
  color: var(--warm-dark);
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 2rem;
  font-weight: 500;
}

.hero-photo-frame {
  position: relative;
  width: clamp(220px, 60vw, 320px);
  aspect-ratio: 1;
  margin: 2rem auto;
  border-radius: 50%;
  overflow: hidden;
  background: var(--ivory);
  box-shadow:
    0 20px 50px var(--shadow-warm),
    0 0 0 8px var(--cream),
    0 0 0 9px var(--gold-rose),
    0 0 0 14px var(--cream),
    0 0 0 15px rgba(212, 175, 55, 0.4);
}

.hero-photo-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-frame-decoration {
  position: absolute;
  inset: -25px;
  border: 1px dashed var(--gold-rose);
  border-radius: 50%;
  pointer-events: none;
  animation: rotate 60s linear infinite;
  opacity: 0.4;
}

.hero-counter {
  margin: 2rem auto 1.5rem;
  font-family: var(--font-serif);
  color: var(--warm-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.counter-label {
  font-style: italic;
  font-size: 1rem;
  letter-spacing: 0.05em;
}

.counter-value {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 5vw, 2.25rem);
  color: var(--rose-deep);
  font-weight: 600;
  letter-spacing: 0.02em;
}

.hero-scroll-hint {
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--gold-rose);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
}

.scroll-arrow {
  font-size: 1.5rem;
  animation: bounce 2s ease infinite;
}

/* ===== SECTION HEADERS COMPARTIDOS ===== */
.section-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3rem;
  padding: 0 1.5rem;
}

.section-eyebrow {
  display: block;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.4em;
  color: var(--rose);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 6vw, 3rem);
  font-weight: 600;
  color: var(--warm-darker);
  line-height: 1.15;
  margin-bottom: 1rem;
}

.section-divider {
  font-family: var(--font-display);
  color: var(--gold);
  letter-spacing: 1em;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.section-subtitle {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.15rem;
  color: var(--warm-dark);
  line-height: 1.5;
  max-width: 540px;
  margin: 0 auto;
}

/* ===== CANCIÓN — PLAYER ===== */
.song-section {
  padding: 5rem 1.5rem;
  background:
    linear-gradient(180deg, var(--cream) 0%, #f8eee0 100%);
  position: relative;
}

.song-player-card {
  max-width: 720px;
  margin: 0 auto 3rem;
  background: var(--warm-darker);
  border-radius: 18px;
  padding: 1.75rem;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.5rem;
  box-shadow: 0 30px 60px var(--shadow-deep);
  position: relative;
  overflow: hidden;
}

.song-player-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 0% 0%, rgba(212, 175, 55, 0.15), transparent 60%);
  pointer-events: none;
}

.song-cover {
  position: relative;
  width: 130px;
  height: 130px;
  border-radius: 50%;
  background: var(--ivory);
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
  overflow: hidden;
  flex-shrink: 0;
}

.song-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 65% 35%;
  border-radius: 50%;
}

.song-cover.playing {
  animation: rotate 8s linear infinite;
}

.song-cover-disc {
  display: none;
}

.song-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: var(--cream);
  position: relative;
  z-index: 1;
}

.song-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.song-artist {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--gold-light);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.player-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.player-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--warm-darker);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.4);
}

.player-btn:hover { transform: scale(1.05); background: var(--gold-light); }
.player-btn:active { transform: scale(0.95); }

.player-progress {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.progress-times {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--gold-light);
  letter-spacing: 0.05em;
}

.progress-bar {
  height: 5px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 100px;
  overflow: hidden;
  cursor: pointer;
}

.progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--gold) 0%, var(--gold-light) 100%);
  border-radius: 100px;
  transition: width 0.1s linear;
}

.audio-visualizer {
  display: flex;
  gap: 3px;
  align-items: flex-end;
  height: 30px;
  margin-top: 1rem;
  opacity: 0.3;
  transition: opacity 0.3s;
}
.audio-visualizer.playing { opacity: 1; }

.audio-visualizer span {
  flex: 1;
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
  border-radius: 2px;
  height: 30%;
  transition: height 0.15s ease;
}

.audio-visualizer.playing span {
  animation: bounce-bar 1s ease-in-out infinite;
}
.audio-visualizer.playing span:nth-child(1) { animation-delay: 0s; }
.audio-visualizer.playing span:nth-child(2) { animation-delay: 0.1s; }
.audio-visualizer.playing span:nth-child(3) { animation-delay: 0.2s; }
.audio-visualizer.playing span:nth-child(4) { animation-delay: 0.3s; }
.audio-visualizer.playing span:nth-child(5) { animation-delay: 0.4s; }
.audio-visualizer.playing span:nth-child(6) { animation-delay: 0.15s; }
.audio-visualizer.playing span:nth-child(7) { animation-delay: 0.25s; }
.audio-visualizer.playing span:nth-child(8) { animation-delay: 0.35s; }
.audio-visualizer.playing span:nth-child(9) { animation-delay: 0.05s; }
.audio-visualizer.playing span:nth-child(10) { animation-delay: 0.45s; }
.audio-visualizer.playing span:nth-child(n+11) { animation-delay: 0.2s; }

@keyframes bounce-bar {
  0%, 100% { height: 25%; }
  50% { height: 95%; }
}

/* ===== LETRA ===== */
.lyrics-card {
  max-width: 720px;
  margin: 0 auto;
  background: var(--ivory);
  border: 1px solid rgba(61, 46, 42, 0.1);
  border-radius: 8px;
  padding: 2.5rem 2rem;
  text-align: center;
  position: relative;
  box-shadow: 0 10px 30px var(--shadow-warm);
}

.lyrics-card::before, .lyrics-card::after {
  content: '"';
  font-family: var(--font-display);
  font-size: 4rem;
  color: var(--gold);
  position: absolute;
  opacity: 0.3;
}
.lyrics-card::before { top: 10px; left: 20px; }
.lyrics-card::after { bottom: -20px; right: 20px; transform: rotate(180deg); }

.lyrics-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--rose-deep);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.lyrics-decoration {
  color: var(--gold);
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
  letter-spacing: 0.5em;
}

.lyrics-text {
  font-family: var(--font-serif);
  font-size: 1.15rem;
  line-height: 1.9;
  color: var(--warm-dark);
  white-space: pre-wrap;
  word-wrap: break-word;
  font-style: italic;
}

/* ===== GALERÍA LÍNEA DE VIDA ===== */
.gallery-section {
  padding: 5rem 1.5rem;
  background: var(--cream);
}

.gallery-timeline {
  max-width: 900px;
  margin: 0 auto;
  position: relative;
}

.gallery-timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, transparent, var(--gold) 10%, var(--gold) 90%, transparent);
  transform: translateX(-50%);
  z-index: 0;
}

.gallery-item {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 2rem;
  align-items: center;
  margin-bottom: 4rem;
  position: relative;
}

.gallery-item:nth-child(even) { direction: rtl; }
.gallery-item:nth-child(even) > * { direction: ltr; }

.gallery-photo-wrap {
  aspect-ratio: 4 / 5;
  border-radius: 8px;
  overflow: hidden;
  background: var(--ivory);
  box-shadow: 0 15px 40px var(--shadow-warm);
  border: 4px solid var(--cream);
  outline: 1px solid rgba(212, 175, 55, 0.4);
  transform: rotate(-1deg);
  transition: transform 0.4s ease;
}

.gallery-item:nth-child(even) .gallery-photo-wrap { transform: rotate(1deg); }

.gallery-photo-wrap:hover { transform: rotate(0deg) scale(1.02); }

.gallery-photo-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Polaroids — múltiples fotos por capítulo */
.gallery-polaroids {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
  padding: 0.5rem 0;
}

.polaroid {
  background: var(--cream);
  padding: 8px 8px 28px;
  box-shadow: 0 8px 20px var(--shadow-warm);
  transform: rotate(var(--rot, -1deg));
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: zoom-in;
  position: relative;
  display: flex;
  flex-direction: column;
}

.polaroid:hover {
  transform: rotate(0deg) translateY(-6px) scale(1.05);
  box-shadow: 0 20px 40px var(--shadow-warm);
  z-index: 5;
}

.polaroid-photo {
  aspect-ratio: 4 / 5;
  background: var(--ivory);
  overflow: hidden;
}

.polaroid-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: contrast(1.05) saturate(0.95);
}

.polaroid-caption {
  font-family: var(--font-script);
  font-size: 1.15rem;
  text-align: center;
  margin-top: 6px;
  color: var(--rose-deep);
  line-height: 1;
}

.gallery-marker {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--gold);
  border: 4px solid var(--cream);
  box-shadow: 0 0 0 2px var(--gold);
  z-index: 2;
  flex-shrink: 0;
}

.gallery-text {
  padding: 1rem 0;
}

.gallery-epoca {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--rose-deep);
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.gallery-descripcion {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--warm-dark);
  line-height: 1.5;
}

/* ===== MOSAIC WALL ===== */
.mosaic-section {
  padding: 5rem 1.5rem;
  background:
    linear-gradient(180deg, var(--cream) 0%, #f5e9d6 100%);
}

.mosaic-grid {
  max-width: 1200px;
  margin: 0 auto;
  column-count: 4;
  column-gap: 0.85rem;
}

@media (max-width: 1024px) { .mosaic-grid { column-count: 3; } }
@media (max-width: 720px)  { .mosaic-grid { column-count: 2; } }
@media (max-width: 420px)  { .mosaic-grid { column-count: 2; column-gap: 0.5rem; } }

.mosaic-item {
  break-inside: avoid;
  margin-bottom: 0.85rem;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 6px 18px var(--shadow-warm);
  cursor: zoom-in;
  transition: all 0.3s ease;
  background: var(--ivory);
  opacity: 0;
  animation: fadeInUp 0.6s ease forwards;
  position: relative;
}

.mosaic-item:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 14px 30px var(--shadow-warm);
}

.mosaic-item img {
  width: 100%;
  height: auto;
  display: block;
  filter: contrast(1.02) saturate(1.05);
}

.mosaic-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.15), transparent 40%);
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.mosaic-item:hover::after { opacity: 1; }

/* ===== LIGHTBOX ===== */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(15, 10, 10, 0.95);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  animation: fadeIn 0.25s ease;
}

.lightbox.active { display: flex; }

.lightbox-content {
  max-width: 92vw;
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

#lightbox-img {
  max-width: 92vw;
  max-height: 78vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.6);
  background: #1a1414;
  animation: scaleIn 0.3s cubic-bezier(0.2, 0.9, 0.3, 1);
}

.lightbox-caption {
  color: var(--cream);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1rem;
  text-align: center;
  letter-spacing: 0.05em;
  opacity: 0.85;
  max-width: 600px;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: fixed;
  background: rgba(255, 255, 255, 0.1);
  color: var(--cream);
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 2001;
  line-height: 1;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.2);
  transform: scale(1.05);
}

.lightbox-close { top: 1rem; right: 1rem; }
.lightbox-prev { left: 1rem; top: 50%; transform: translateY(-50%); font-size: 2.5rem; }
.lightbox-next { right: 1rem; top: 50%; transform: translateY(-50%); font-size: 2.5rem; }
.lightbox-prev:hover { transform: translateY(-50%) scale(1.05); }
.lightbox-next:hover { transform: translateY(-50%) scale(1.05); }

@media (max-width: 720px) {
  .lightbox-prev { left: 0.4rem; }
  .lightbox-next { right: 0.4rem; }
}

/* ===== COMUNIDAD: fotos subidas por visitantes ===== */
.comunidad-section {
  padding: 5rem 1.5rem;
  background:
    linear-gradient(180deg, #f5e9d6 0%, var(--ivory) 50%, var(--cream) 100%);
  position: relative;
}

.comunidad-actions {
  text-align: center;
  margin-bottom: 2.5rem;
}

.comunidad-grid {
  max-width: 1200px;
  margin: 0 auto;
  column-count: 4;
  column-gap: 0.85rem;
  min-height: 200px;
}

@media (max-width: 1024px) { .comunidad-grid { column-count: 3; } }
@media (max-width: 720px)  { .comunidad-grid { column-count: 2; } }
@media (max-width: 420px)  { .comunidad-grid { column-count: 2; column-gap: 0.5rem; } }

.comunidad-item {
  position: relative;
}

.comunidad-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.75rem 0.85rem 0.6rem;
  background: linear-gradient(to top, rgba(0,0,0,0.75) 0%, rgba(0,0,0,0.45) 60%, transparent 100%);
  color: var(--cream);
  font-family: var(--font-serif);
  font-size: 0.85rem;
  font-style: italic;
  line-height: 1.3;
  opacity: 0;
  transition: opacity 0.3s;
  pointer-events: none;
}

.comunidad-item:hover .comunidad-caption { opacity: 1; }

@media (max-width: 720px) {
  .comunidad-caption { opacity: 1; font-size: 0.75rem; padding: 0.5rem 0.6rem 0.4rem; }
}

/* ===== SALUDOS ===== */
.greetings-section {
  padding: 5rem 1.5rem;
  background:
    linear-gradient(180deg, var(--cream) 0%, var(--pink-soft) 100%);
  position: relative;
}

.greetings-actions {
  text-align: center;
  margin-bottom: 3rem;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  border-radius: 100px;
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px var(--shadow-warm);
}

.cta-btn-primary {
  background: linear-gradient(135deg, var(--rose) 0%, var(--rose-deep) 100%);
  color: var(--cream);
}

.cta-btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 35px rgba(139, 58, 47, 0.35); }
.cta-btn-primary:active { transform: translateY(0); }

.cta-btn-block { width: 100%; justify-content: center; }

.greetings-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.greeting-card {
  background: var(--cream);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 30px var(--shadow-warm);
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(212, 175, 55, 0.2);
  animation: fadeInUp 0.6s ease both;
}

.greeting-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 45px var(--shadow-warm);
}

.greeting-card-photo {
  aspect-ratio: 4 / 3;
  background: var(--ivory);
  overflow: hidden;
  position: relative;
}

/* Imagen de fondo borrosa para fotos verticales */
.card-photo-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(18px) brightness(0.85);
  transform: scale(1.15);
  z-index: 0;
}

/* Imagen de frente — completa sin recortar */
.card-photo-fg {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 1;
}

.greeting-card-no-photo {
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, var(--pink-soft), var(--gold-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-script);
  color: var(--rose-deep);
  font-size: 4rem;
}

.greeting-audio-badge {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  background: linear-gradient(135deg, var(--gold) 0%, var(--rose) 100%);
  color: var(--cream);
  padding: 0.55rem 0.95rem 0.55rem 0.5rem;
  border-radius: 100px;
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  box-shadow: 0 6px 18px rgba(139, 58, 47, 0.45), 0 0 0 2px var(--cream);
  animation: audioBadgePulse 2.2s ease-in-out infinite;
  z-index: 3;
}

.greeting-audio-badge::before {
  content: '▶';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: var(--cream);
  color: var(--rose-deep);
  border-radius: 50%;
  font-size: 0.7rem;
  padding-left: 2px;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

@keyframes audioBadgePulse {
  0%, 100% {
    box-shadow: 0 6px 18px rgba(139, 58, 47, 0.45), 0 0 0 2px var(--cream);
  }
  50% {
    box-shadow: 0 8px 24px rgba(139, 58, 47, 0.7), 0 0 0 2px var(--cream), 0 0 0 7px rgba(212, 175, 55, 0.3);
  }
}

.greeting-card-body {
  padding: 1.25rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.greeting-card-name {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--warm-darker);
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.greeting-card-relacion {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 0.85rem;
  color: var(--rose);
  margin-bottom: 0.75rem;
  letter-spacing: 0.03em;
}

.greeting-card-mensaje {
  font-family: var(--font-serif);
  font-size: 1rem;
  color: var(--warm-dark);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.greeting-card-fecha {
  margin-top: 0.75rem;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--gold-rose);
  letter-spacing: 0.05em;
}

/* Audio CTA al final de la card (ya no sobre la foto) */
.greeting-card-audio-cta {
  margin-top: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.6rem 0.9rem;
  background: linear-gradient(135deg, var(--gold) 0%, var(--rose) 100%);
  color: var(--cream);
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border-radius: 100px;
  box-shadow: 0 4px 12px rgba(139, 58, 47, 0.35);
  animation: audioBadgePulse 2.2s ease-in-out infinite;
}

.greeting-card-audio-cta::before {
  content: '▶';
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  background: var(--cream);
  color: var(--rose-deep);
  border-radius: 50%;
  font-size: 0.7rem;
  padding-left: 2px;
  flex-shrink: 0;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15);
}

.greetings-loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1rem;
  color: var(--warm-dark);
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--pink-soft);
  border-top-color: var(--rose);
  border-radius: 50%;
  margin: 0 auto 1rem;
  animation: rotate 0.8s linear infinite;
}

.greetings-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1rem;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--warm-dark);
}

/* ===== 100 RAZONES ===== */
.reasons-section {
  padding: 5rem 1.5rem;
  background:
    linear-gradient(180deg, var(--pink-soft) 0%, var(--cream) 100%);
}

.reasons-counter {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.5rem;
  font-family: var(--font-display);
}

.counter-num {
  font-size: clamp(3rem, 10vw, 5rem);
  color: var(--rose-deep);
  font-weight: 700;
  background: linear-gradient(135deg, var(--rose-deep) 0%, var(--gold) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.counter-text {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--warm-dark);
}

.reasons-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.reason-card {
  background: var(--cream);
  border: 1px solid var(--gold-light);
  border-radius: 8px;
  padding: 1.25rem 1.25rem 1.25rem 3.5rem;
  position: relative;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1rem;
  color: var(--warm-dark);
  line-height: 1.5;
  box-shadow: 0 4px 12px var(--shadow-warm);
  transition: all 0.3s ease;
  opacity: 0;
  transform: translateY(20px);
}

.reason-card.visible { opacity: 1; transform: translateY(0); transition: all 0.6s ease; }

.reason-card:hover {
  background: var(--ivory);
  transform: translateY(-2px);
  box-shadow: 0 10px 25px var(--shadow-warm);
}

.reason-number {
  position: absolute;
  top: 1rem;
  left: 1rem;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold);
  font-style: normal;
  line-height: 1;
}

/* ===== CIERRE ===== */
.closing-section {
  padding: 5rem 1.5rem 4rem;
  text-align: center;
  background: var(--warm-darker);
  color: var(--cream);
  position: relative;
  overflow: hidden;
}

.closing-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(212, 175, 55, 0.15), transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(185, 92, 80, 0.2), transparent 50%);
  pointer-events: none;
}

.closing-content { position: relative; max-width: 720px; margin: 0 auto; }

.closing-rose {
  font-size: 3rem;
  margin-bottom: 1rem;
  animation: gentlePulse 3s ease infinite;
}

.closing-title {
  font-family: var(--font-script);
  font-size: clamp(3rem, 9vw, 5rem);
  background: linear-gradient(135deg, var(--gold-light), var(--gold), var(--pink-blush));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 1rem;
  line-height: 1;
}

.closing-message {
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-style: italic;
  line-height: 1.7;
  color: var(--cream);
  margin-bottom: 2rem;
  opacity: 0.95;
}

.closing-signature {
  font-family: var(--font-script);
  font-size: 2rem;
  color: var(--gold-light);
  margin-bottom: 0.5rem;
}

.closing-date {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold-rose);
}

/* ==========================================================
   MODALES
   ========================================================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 20, 20, 0.85);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
  overflow-y: auto;
}

.modal-overlay.active {
  display: flex;
  animation: fadeIn 0.3s ease;
}

.modal-content {
  background: var(--cream);
  border-radius: 16px;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  padding: 2rem 1.75rem;
  position: relative;
  box-shadow: 0 30px 80px var(--shadow-deep);
  animation: scaleIn 0.4s cubic-bezier(0.2, 0.9, 0.3, 1);
  margin: auto;
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--ivory);
  color: var(--warm-dark);
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 2;
}
.modal-close:hover { background: var(--rose); color: var(--cream); }

.modal-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--warm-darker);
  margin-bottom: 0.4rem;
  padding-right: 2rem;
}

.modal-subtitle {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--warm-dark);
  margin-bottom: 1.5rem;
  font-size: 1rem;
}

.greeting-form { display: flex; flex-direction: column; gap: 1rem; }

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-field > span {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--warm-dark);
  letter-spacing: 0.02em;
}

.form-field input[type="text"],
.form-field select,
.form-field textarea {
  font-family: var(--font-serif);
  font-size: 1rem;
  padding: 0.7rem 0.85rem;
  background: var(--cream);
  border: 1px solid rgba(61, 46, 42, 0.2);
  border-radius: 8px;
  color: var(--warm-dark);
  transition: all 0.2s;
  width: 100%;
}

.form-field input[type="text"]:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--rose);
  box-shadow: 0 0 0 3px rgba(185, 92, 80, 0.15);
}

.form-field textarea { resize: vertical; min-height: 100px; }

.form-field input[type="file"] {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  color: var(--warm-dark);
}

/* Botón custom de selección de archivo (móvil-friendly, label nativo) */
.file-pick-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: 100%;
  min-height: 64px;
  padding: 1rem 1.25rem;
  background: var(--ivory);
  border: 2px dashed var(--gold-rose);
  border-radius: 10px;
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 500;
  color: var(--warm-dark);
  cursor: pointer;
  transition: all 0.2s;
  -webkit-tap-highlight-color: rgba(212, 175, 55, 0.2);
  position: relative;
  user-select: none;
}

/* Input file "invisible" pero ocupando toda el área del label.
   En iOS Chrome/Safari el tap debe ir DIRECTO al <input type="file">
   para que el sistema abra el selector nativo (galería + cámara + archivos). */
.file-pick-btn { position: relative; overflow: hidden; }

.visually-hidden-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  font-size: 0;
  -webkit-appearance: none;
  appearance: none;
  z-index: 2;
}

.file-pick-btn:hover, .file-pick-btn:active {
  background: var(--pink-soft);
  border-color: var(--rose);
  color: var(--rose-deep);
}

.file-pick-icon { font-size: 1.5rem; line-height: 1; }
.file-pick-text { line-height: 1.2; }

/* Preview del archivo seleccionado */
.file-preview {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-top: 0.6rem;
  padding: 0.6rem;
  background: var(--cream);
  border: 1px solid var(--gold-rose);
  border-radius: 10px;
  position: relative;
}

.file-preview img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: 6px;
  flex-shrink: 0;
  background: var(--ivory);
}

.file-preview-icon {
  width: 60px;
  height: 60px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--pink-soft), var(--gold-light));
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
}

.file-preview-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  font-family: var(--font-sans);
  font-size: 0.85rem;
}

.file-preview-info strong {
  color: var(--warm-darker);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.file-preview-info span {
  color: var(--gold-rose);
  font-size: 0.75rem;
}

.file-preview-remove {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--rose);
  color: var(--cream);
  font-size: 1.25rem;
  font-weight: bold;
  flex-shrink: 0;
  transition: all 0.2s;
}

.file-preview-remove:hover { background: var(--rose-deep); transform: scale(1.05); }

.form-hint {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--gold-rose);
  letter-spacing: 0.02em;
}

.form-status {
  font-family: var(--font-serif);
  font-style: italic;
  text-align: center;
  min-height: 1.5em;
}
.form-status.success { color: #2d6e3e; }
.form-status.error { color: var(--rose-deep); }

/* Tabs grabar / subir */
.audio-input-tabs {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  border-bottom: 1px solid rgba(61, 46, 42, 0.15);
}

.audio-tab {
  font-family: var(--font-sans);
  font-size: 0.9rem;
  padding: 0.5rem 0.85rem;
  color: var(--warm-dark);
  background: transparent;
  border-bottom: 2px solid transparent;
  border-radius: 6px 6px 0 0;
  margin-bottom: -1px;
  transition: all 0.2s;
}

.audio-tab:hover { background: rgba(212, 175, 55, 0.08); }

.audio-tab.active {
  color: var(--rose-deep);
  border-bottom-color: var(--gold);
  font-weight: 600;
}

/* Grabador */
.recorder {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  align-items: stretch;
  background: var(--ivory);
  padding: 1rem;
  border-radius: 10px;
  border: 1px solid rgba(212, 175, 55, 0.25);
}

.record-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.85rem 1.25rem;
  background: var(--warm-darker);
  color: var(--cream);
  border-radius: 100px;
  font-family: var(--font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: all 0.2s;
  position: relative;
}

.record-btn:hover { background: var(--rose-deep); }

.record-btn.recording {
  background: var(--rose);
  animation: recordPulse 1.4s ease-in-out infinite;
}

.record-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--rose);
  border: 2px solid var(--cream);
  flex-shrink: 0;
}

.record-btn.recording .record-dot {
  background: #fff;
  animation: recordBlink 1s ease-in-out infinite;
}

@keyframes recordPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(185, 92, 80, 0.5); }
  50% { box-shadow: 0 0 0 12px rgba(185, 92, 80, 0); }
}

@keyframes recordBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.record-status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--font-sans);
  font-size: 0.85rem;
}

#record-timer {
  font-family: 'Menlo', 'Monaco', monospace;
  font-weight: 600;
  font-size: 1rem;
  color: var(--warm-darker);
}

#record-state {
  font-style: italic;
  color: var(--gold-rose);
  font-size: 0.85rem;
}

#record-preview {
  width: 100%;
  margin-top: 0.25rem;
}

.record-clear {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  color: var(--rose-deep);
  text-decoration: underline;
  background: transparent;
  align-self: flex-start;
  padding: 0.25rem 0;
}

.record-clear:hover { color: var(--rose); }

/* Modal de ver saludo */
.modal-view #greeting-view-content { padding: 0.5rem 0; }

.view-photo {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 12px;
  margin-bottom: 1.25rem;
  background: var(--ivory);
}

/* Wrap con blur para fotos verticales en el modal */
.view-photo-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 1.25rem;
  background: var(--ivory);
}

.view-photo-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(22px) brightness(0.85);
  transform: scale(1.18);
  z-index: 0;
}

.view-photo-fg {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 1;
}

.view-name {
  font-family: var(--font-display);
  font-size: 1.5rem;
  color: var(--warm-darker);
  margin-bottom: 0.25rem;
  padding-right: 2rem;
}

.view-relacion {
  font-family: var(--font-serif);
  font-style: italic;
  color: var(--rose);
  margin-bottom: 1rem;
}

.view-mensaje {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--warm-dark);
  line-height: 1.6;
  white-space: pre-wrap;
  margin-bottom: 1.25rem;
  border-left: 3px solid var(--gold);
  padding-left: 1rem;
}

.view-audio {
  width: 100%;
  margin-bottom: 1rem;
}

/* Bloque de audio en modal — claramente separado del texto */
.view-audio-block {
  margin-top: 1.5rem;
  padding: 1rem;
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.08), rgba(185, 92, 80, 0.08));
  border-radius: 12px;
  border: 1px solid rgba(212, 175, 55, 0.2);
}

.view-audio-label {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--rose-deep);
  letter-spacing: 0.05em;
  margin-bottom: 0.6rem;
  text-align: center;
}

/* ==========================================================
   CONFETTI CANVAS
   ========================================================== */
.confetti-canvas {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10000;
  display: none;
}
.confetti-canvas.active { display: block; }

/* ==========================================================
   ANIMACIONES
   ========================================================== */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.92); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes magazineEntry {
  from { opacity: 0; transform: translateY(40px) rotateX(20deg) scale(0.95); }
  to { opacity: 1; transform: translateY(0) rotateX(0) scale(1); }
}
@keyframes rotate { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes gentlePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}
@keyframes bounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

/* ==========================================================
   RESPONSIVE
   ========================================================== */
@media (max-width: 720px) {
  .gallery-timeline::before { left: 18px; }
  .gallery-item {
    grid-template-columns: 36px 1fr;
    gap: 1rem;
    direction: ltr !important;
  }
  .gallery-item:nth-child(even) > * { direction: ltr; }
  .gallery-item > .gallery-text {
    grid-column: 2;
    grid-row: 2;
  }
  .gallery-item > .gallery-photo-wrap,
  .gallery-item > .gallery-polaroids {
    grid-column: 2;
    grid-row: 1;
  }
  .gallery-marker { grid-column: 1; grid-row: 1 / -1; align-self: start; margin-top: 1rem; }
  .gallery-polaroids { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 0.6rem; }

  .song-player-card {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .song-cover { margin: 0 auto; }
  .player-controls { justify-content: center; }
  .audio-visualizer { justify-content: center; }

  .modal-content { padding: 1.5rem 1.25rem; }
  .modal-title { font-size: 1.4rem; }

  .floating-nav {
    top: auto;
    bottom: 1rem;
    transform: translateX(-50%) translateY(150%);
  }
  .floating-nav.visible { transform: translateX(-50%) translateY(0); }
}

@media (max-width: 420px) {
  .pin-key { height: 56px; font-size: 1.3rem; }
  .magazine-border { padding: 1rem 0.85rem 1.5rem; }
  .magazine-meta { font-size: 0.65rem; }
  .greetings-grid { grid-template-columns: 1fr; }
}

/* Print / accessibility */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
