:root {
    --bg-color: #fcf9f2;
    --primary-color: #671F2F;
    --accent-color: #E48E1A;
    --text-color: #605756;
    --green-color: #4F5330;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Lato', sans-serif;
}

body {
    background-color: #e0e0e0;
    font-family: var(--font-body);
    color: var(--text-color);
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100dvh;
}

/* Contenedor que simula un móvil */
.app-container {
    width: 100%;
    max-width: 414px;
    height: 100dvh;
    max-height: 896px;
    background-color: var(--bg-color);
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

@media (min-width: 415px) {
    .app-container {
        height: 90vh;
        border-radius: 30px;
    }
}

.view-section {
    flex: 1;
    overflow: hidden;
    position: relative;
}

/* Envoltura con scroll; las decoraciones de esquina quedan fuera y no se mueven con el contenido */
.view-scroll {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    padding-bottom: 70px;
}

.view-scroll::-webkit-scrollbar { display: none; }
.view-scroll { -ms-overflow-style: none; scrollbar-width: none; }

.btn-primary-custom {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}
.btn-primary-custom:hover {
    background-color: #5a1d24;
    border-color: #5a1d24;
    color: white;
}

.parent-title {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-size: 1.2rem;
    font-style: italic;
}
.parent-name { font-size: 0.95rem; color: #444; }

.date-header { font-size: 0.9rem; letter-spacing: 2px; }
.names-header { font-family: var(--font-heading); letter-spacing: 1px; }

/* Decoración bendición de padres */
.parents-ornament i {
    color: var(--accent-color);
    font-size: 1.2rem;
}
.ornament-line {
    width: 40px;
    height: 1px;
    background-color: var(--accent-color);
    opacity: 0.5;
}

/* Nombre de invitado (RSVP) */
.guest-name {
    font-family: var(--font-heading);
    font-style: italic;
    color: var(--accent-color);
    font-size: 1.1rem;
}

/* Botón de confirmación más grande */
.btn-rsvp {
    font-size: 1.05rem;
    padding: 14px 20px;
}

/* Mapa embebido */
.map-embed iframe {
    display: block;
}

/* Paleta de colores vestimenta */
.color-swatch {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}
.color-swatch.swatch-white {
    border: 2px solid var(--accent-color);
    position: relative;
}
.color-swatch.swatch-white::after {
    content: '';
    position: absolute;
    top: 50%; left: 8%;
    width: 84%; height: 3px;
    background: var(--accent-color);
    transform: translateY(-50%) rotate(-45deg);
}
.dresscode-note {
    color: var(--accent-color);
    font-size: 1rem;
    font-weight: 700;
    border: 2px solid var(--accent-color);
    border-radius: 30px;
    padding: 8px 20px;
    display: inline-flex;
}
.dresscode-note i { color: var(--accent-color); }

#view-dresscode .story-main-title { font-size: 2.3rem; }
#view-dresscode .story-subtitle { font-size: 1.05rem; }

/* Fotos de mascotas */
.pet-img {
    width: 150px;
    height: 150px;
    border: 2px solid var(--accent-color);
}
.pet-name {
    font-size: 0.85rem;
    color: var(--text-color);
}

/* Navegación Inferior */
.bottom-nav {
    position: absolute;
    bottom: 0; width: 100%;
    height: 60px;
    z-index: 10;
}
.nav-item {
    color: #999;
    font-size: 1.2rem;
    position: relative;
    transition: color 0.3s;
    text-decoration: none;
}
.nav-item.active { color: #5F6541; }
.nav-item.active::after {
    content: '';
    position: absolute;
    bottom: -8px; left: 50%;
    transform: translateX(-50%);
    width: 20px; height: 3px;
    background-color: #5F6541;
    border-radius: 2px;
}

/* Títulos y subtítulos */
.story-main-title {
    font-family: var(--font-heading);
    font-style: italic;
    color: var(--primary-color);
    font-size: 2rem;
    line-height: 1.2;
}

.story-subtitle {
    color: #555;
    font-size: 0.95rem;
    margin-top: 0.5rem;
}

.story-section-title {
    font-family: var(--font-heading);
    font-style: italic;
    color: var(--accent-color);
    font-size: 1.4rem;
}

/* Galería de fotos de la historia */
.photo-grid {
    flex: 1;
}

/* Vista 2: textos pegados arriba, mayor espacio para las fotos */
#view-story .splash-content {
    margin: 0;
}
#view-story .polaroid img {
    height: 100px;
}

/* Polaroid foto style */
.polaroid {
    background: #fff;
    padding: 8px 8px 26px 8px;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.15);
    transform: rotate(-1deg);
    transition: transform 0.2s;
}
.polaroid:nth-child(even) {
    transform: rotate(1.5deg);
}
.polaroid:hover {
    transform: scale(1.03) rotate(0deg);
    z-index: 5;
}
.polaroid img {
    display: block;
    width: 100%;
    height: 80px;
    object-fit: cover;
}
.polaroid-caption {
    font-family: var(--font-heading);
    font-style: italic;
    font-size: 0.65rem;
    text-align: center;
    color: #555;
    margin: 4px 0 0 0;
    line-height: 1.2;
}

/* ===== Vista Splash / Secciones ===== */
.splash-bg {
    background-color: #fdfaf3;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

.splash-floral-tr {
    position: absolute;
    top: 0; right: 0;
    width: 160px; height: 160px;
    background: radial-gradient(ellipse at top right, rgba(180,80,50,0.15) 0%, transparent 70%);
    pointer-events: none;
}

.splash-floral-bl {
    position: absolute;
    bottom: 60px; left: 0;
    width: 160px; height: 160px;
    background: radial-gradient(ellipse at bottom left, rgba(180,80,50,0.15) 0%, transparent 70%);
    pointer-events: none;
}

/* Fondo floral de Vista 1, ajustado al tamaño de la sección */
#view-splash.splash-bg {
    background-image: url('../img/flor.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.splash-floral-right-real {
    position: absolute;
    top: 0; right: 0;
    width: 90px; height: 100%;
    /*background-image: url('img/flor-2.png');*/
    background-size: cover;
    background-position: center;
    opacity: 0.85;
    -webkit-mask-image: linear-gradient(to left, black 0%, transparent 85%);
    mask-image: linear-gradient(to left, black 0%, transparent 85%);
    pointer-events: none;
    z-index: 1;
}

/* Botón de música */
.music-btn-wrapper {
    position: absolute;
    top: 16px; right: 16px;
    z-index: 20;
}

.music-btn {
    background: rgba(255,255,255,0.85);
    border: none;
    border-radius: 20px;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--primary-color);
    font-size: 0.85rem;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: background 0.2s;
}
.music-btn:hover {
    background: rgba(255,255,255,1);
}

/* Header fijo en la parte superior de cada sección */
.section-header {
    z-index: 5;
    padding: 24px 20px 0 20px;
    width: 100%;
}

/* Contenido centrado de las secciones */
.splash-content {
    z-index: 5;
    padding: 10px 20px 20px 20px;
    margin: auto 0;
    width: 100%;
}

#view-splash.splash-bg .splash-content {
    padding-top: 75px;
}

.splash-label {
    color: #888;
    font-size: 0.95rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 400;
}

.splash-name-bride {
    font-family: var(--font-heading);
    font-style: italic;
    font-size: 3.5rem;
    color: var(--primary-color);
    line-height: 1.1;
    margin: 0;
}
.splash-and {
    font-family: var(--font-heading);
    font-style: italic;
    font-size: 2.5rem;
    color: var(--accent-color);
    margin: 0;
}
.splash-name-groom {
    font-family: var(--font-heading);
    font-style: italic;
    font-size: 3.5rem;
    color: var(--primary-color);
    line-height: 1.1;
    margin: 0;
}
.splash-date {
    font-size: 1.2rem;
    color: #555;
    font-weight: 600;
    letter-spacing: 2px;
}

/* Tarjeta de cuenta regresiva */
.countdown-card {
    background: white;
    border: 2px solid var(--accent-color);
    border-radius: 12px;
    padding: 14px 30px;
    display: inline-block;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    position: relative;
}

/* Ramitas decorativas en las esquinas del countdown */
.countdown-card::before,
.countdown-card::after {
    content: '❧';
    position: absolute;
    color: var(--accent-color);
    font-size: 1.2rem;
    opacity: 0.6;
}
.countdown-card::before { top: -10px; left: 8px; }
.countdown-card::after  { top: -10px; right: 8px; transform: scaleX(-1); }

.countdown-number {
    font-size: 4rem;
    font-weight: 900;
    color: var(--accent-color);
    line-height: 1;
}

.countdown-label {
    font-size: 0.75rem;
    letter-spacing: 3px;
    color: #888;
    text-transform: uppercase;
    font-weight: 600;
}

/* Animación pulso del countdown */
@keyframes pulseDays {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.05); }
    100% { transform: scale(1); }
}
.countdown-number.pulse {
    animation: pulseDays 1.5s infinite;
}

.ring {
    color: var(--accent-color);
}

.note-download {
    font-size: 0.85rem;
    color: #555;
    text-align: center;
}