:root {
    /* Paleta modo claro */
    --fondo: #f4f6fb;
    --fondo-tarjeta: #ffffff;
    --texto: #1a1f36;
    --texto-suave: #5a6178;
    --azul-noche: #1e2a4a;
    --azul-noche-claro: #2f3f6b;
    --acento: #ff8c5a;
    --acento-suave: #ffe0cf;
    --borde: #dde2ee;
}

@media (prefers-color-scheme: dark) {
    :root {
        --fondo: #10131f;
        --fondo-tarjeta: #1a1f36;
        --texto: #f4f6fb;
        --texto-suave: #a8adc4;
        --azul-noche: #2f3f6b;
        --azul-noche-claro: #3d4f85;
        --acento: #ff9d6c;
        --acento-suave: #3a2a24;
        --borde: #2a3050;
    }
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: var(--fondo);
    color: var(--texto);
    transition: background 0.3s ease, color 0.3s ease;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.contenido-principal {
    flex: 1;
}

.contenedor-calendario {
    max-width: 700px;
    margin: 0 auto;
    padding: 24px 16px 60px;
}

h1 {
    font-size: 1.8rem;
    color: var(--azul-noche);
    text-align: center;
    margin-bottom: 4px;
}

@media (prefers-color-scheme: dark) {
    h1 { color: var(--texto); }
}

h2 {
    text-align: center;
    color: var(--acento);
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 24px;
    text-transform: capitalize;
}

.calendario {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.calendario thead th {
    color: var(--texto-suave);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    padding-bottom: 10px;
    letter-spacing: 0.03em;
}

.dia-abrev {
    display: none;
}

@media (max-width: 480px) {
    .dia-completo {
        display: none;
    }

    .dia-abrev {
        display: inline;
    }
}

.calendario td {
    height: 72px;
    vertical-align: top;
    padding: 6px;
    border: 1px solid var(--borde);
    border-radius: 8px;
    position: relative;
}

.dia-vacio {
    background: transparent;
    border: none !important;
}

.dia-con-citas {
    background: var(--fondo-tarjeta);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.numero-dia {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--texto);
}

.mini-cita {
    margin-top: 4px;
    font-size: 0.65rem;
    background: var(--acento-suave);
    color: var(--acento);
    border-radius: 6px;
    padding: 2px 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mini-cita-emoji {
    display: none;
}

@media (max-width: 480px) {
    .mini-cita {
        text-overflow: clip;
    }

    .mini-cita-texto {
        display: none;
    }

    .mini-cita-emoji {
        display: inline;
        font-size: 0.9rem;
    }
}

.modal-fondo {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 100;
}

.modal-fondo.activo {
    display: flex;
}

.modal-caja {
    background: var(--fondo-tarjeta);
    border-radius: 16px;
    padding: 24px;
    width: 100%;
    max-width: 380px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: aparecer 0.2s ease;
}

@keyframes aparecer {
    from { opacity: 0; transform: translateY(10px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-cerrar {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--texto-suave);
    cursor: pointer;
    line-height: 1;
}

.modal-caja h3 {
    margin-top: 0;
    color: var(--azul-noche);
}

@media (prefers-color-scheme: dark) {
    .modal-caja h3 { color: var(--texto); }
}

.modal-caja label {
    display: block;
    font-size: 0.8rem;
    color: var(--texto-suave);
    margin-top: 14px;
    margin-bottom: 4px;
}

.modal-caja input,
.modal-caja select,
.modal-caja textarea {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--borde);
    background: var(--fondo);
    color: var(--texto);
    font-family: inherit;
    font-size: 0.9rem;
}

.boton-agendar {
    width: 100%;
    margin-top: 20px;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: var(--acento);
    color: #1a1f36;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.boton-agendar:active {
    transform: scale(0.97);
}

@media (hover: hover) {
    .boton-agendar:hover {
        opacity: 0.9;
    }
}


.nav-mes {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 24px;
}

.nav-mes h2 {
    margin: 0;
    min-width: 160px;
    text-align: center;
}

.boton-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--fondo-tarjeta);
    border: 1px solid var(--borde);
    color: var(--texto);
    text-decoration: none;
    font-size: 1.1rem;
    transition: transform 0.15s ease, background 0.15s ease;
}

.boton-nav:active {
    transform: scale(0.9);
}

@media (hover: hover) {
    .boton-nav:hover {
        background: var(--acento-suave);
        color: var(--acento);
    }
}

.contenedor-inicio {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    padding: 24px;
    text-align: center;
}

.mensaje-lindo {
    font-size: 1.4rem;
    color: var(--texto);
    max-width: 480px;
    line-height: 1.5;
}

.boton-ir-calendario {
    padding: 12px 28px;
    border-radius: 24px;
    background: var(--acento);
    color: #1a1f36;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.boton-ir-calendario:active {
    transform: scale(0.96);
}

@media (hover: hover) {
    .boton-ir-calendario:hover {
        opacity: 0.9;
    }
}

.carrusel-contenedor {
    width: 92%;
    max-width: 1600px;
    margin: 20px auto 40px;
    position: relative;
}

.carrusel-pista {
    display: flex;
    border-radius: 14px;
    transition: transform 0.4s ease;
}

.carrusel-viewport {
    overflow: hidden;
    border-radius: 14px;
}

.card-recuerdo {
    flex: 0 0 100%;
    display: flex;
    height: 640px;
    background: var(--fondo-tarjeta);
    border: 1px solid var(--borde);
    border-radius: 14px;
    overflow: hidden;
    text-align: left;
}

.card-imagen {
    width: 70%;
    height: 640px;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
}

.card-contenido {
    width: 30%;
    padding: 20px 18px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;
}

.card-texto {
    margin: 0 0 8px;
    color: var(--texto);
    font-size: 1.05rem;
    font-weight: 600;
}

.card-descripcion {
    margin: 0;
    color: var(--texto-suave);
    font-size: 0.85rem;
    line-height: 1.5;
}

.carrusel-flecha {
    position: absolute;
    top: 50%;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(26, 31, 54, 0.55);
    color: #ffffff;
    cursor: pointer;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.15s ease, background 0.15s ease;
    transform: translateY(-50%);
    z-index: 10;
}

.carrusel-flecha-izq {
    left: 12px;
}

.carrusel-flecha-der {
    right: 12px;
}

.carrusel-mensajes .carrusel-flecha-der {
    right: calc(30% + 12px);
}

.carrusel-flecha:active {
    transform: scale(0.9);
}

@media (hover: hover) {
    .carrusel-flecha:hover {
        background: rgba(26, 31, 54, 0.8);
    }
}

.carrusel-puntos {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 16px;
}

.carrusel-puntos {
    display: flex;
    gap: 8px;
}

.punto {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--borde);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.2s ease;
}

.punto.activo {
    background: var(--acento);
    transform: scale(1.3);
}

#lista-citas-dia {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
}

.item-cita-menu {
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.15s ease;
}

@media (hover: hover) {
    .item-cita-menu:hover {
        background: var(--acento-suave);
    }
}

.boton-eliminar {
    width: 100%;
    margin-top: 10px;
    padding: 12px;
    border: 1px solid var(--borde);
    border-radius: 10px;
    background: transparent;
    color: var(--texto-suave);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

@media (hover: hover) {
    .boton-eliminar:hover {
        background: #ff5a5a22;
        color: #ff5a5a;
        border-color: #ff5a5a;
    }
}

.enlace-salir {
    display: inline-block;
    margin-top: 8px;
    padding: 6px 14px;
    border: 1px solid var(--borde);
    border-radius: 20px;
    color: var(--texto-suave);
    font-size: 0.75rem;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

@media (hover: hover) {
    .enlace-salir:hover {
        background: #ff5a5a22;
        color: #ff5a5a;
        border-color: #ff5a5a;
    }
}

.navbar {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    background: var(--fondo-tarjeta);
    border-bottom: 1px solid var(--borde);
}

.navbar-link {
    text-decoration: none;
    color: var(--texto);
    font-weight: 600;
    font-size: 0.9rem;
    padding: 8px 14px;
    border-radius: 20px;
    transition: background 0.15s ease, color 0.15s ease;
}

@media (hover: hover) {
    .navbar-link:hover {
        background: var(--acento-suave);
        color: var(--acento);
    }
}

.form-salir {
    margin-left: auto;
}

.navbar-salir {
    background: none;
    border: none;
    font: inherit;
    cursor: pointer;
    color: var(--texto-suave);
}

@media (hover: hover) {
    .navbar-salir:hover {
        background: #ff5a5a22;
        color: #ff5a5a;
    }
}

.contenedor-notas {
    padding: 24px 16px 60px;
    text-align: center;
}

.btn-nueva-nota {
    display: inline-block;
    margin-bottom: 20px;
    padding: 10px 20px;
    border-radius: 20px;
    background: var(--acento);
    color: #1a1f36;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: opacity 0.15s ease;
}

@media (hover: hover) {
    .btn-nueva-nota:hover {
        opacity: 0.9;
    }
}

.nota-autor {
    margin: 0 0 8px;
    font-size: 0.75rem;
    color: var(--texto-suave);
}

.nota-contenido {
    margin: 0 0 10px;
    color: var(--texto);
    line-height: 1.5;
}

.nota-acciones {
    display: flex;
    gap: 14px;
}

.nota-acciones a {
    font-size: 0.8rem;
    color: var(--texto-suave);
    text-decoration: none;
}

@media (hover: hover) {
    .nota-acciones a:hover {
        color: var(--acento);
    }
}

.form-nota {
    max-width: 500px;
    margin: 0 auto;
    padding: 24px 16px 60px;
}

.form-nota p {
    margin-bottom: 14px;
}

.form-nota label {
    display: block;
    font-size: 0.8rem;
    color: var(--texto-suave);
    margin-bottom: 4px;
}

.form-nota input,
.form-nota textarea {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--borde);
    background: var(--fondo);
    color: var(--texto);
    font-family: inherit;
    font-size: 0.9rem;
}

.form-nota button {
    margin-top: 6px;
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    background: var(--acento);
    color: #1a1f36;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: opacity 0.15s ease;
}

@media (hover: hover) {
    .form-nota button:hover {
        opacity: 0.9;
    }
}

.seccion-inicio {
    max-width: 500px;
    margin: 40px auto 0;
    padding: 0 16px;
    text-align: center;
}

.seccion-inicio h2 {
    margin-bottom: 6px;
}

.seccion-descripcion {
    color: var(--texto-suave);
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.preview-tarjeta {
    background: var(--fondo-tarjeta);
    border: 1px solid var(--borde);
    border-radius: 14px;
    padding: 16px;
    margin-bottom: 16px;
    text-align: left;
}

.preview-plan {
    font-size: 0.8rem;
    color: var(--acento);
    margin: 0 0 4px;
}

.preview-titulo {
    font-weight: 600;
    margin: 0 0 4px;
}

.preview-fecha {
    font-size: 0.85rem;
    color: var(--texto-suave);
    margin: 0;
}

.preview-contenido {
    font-size: 0.9rem;
    color: var(--texto);
    margin: 0;
    line-height: 1.5;
}

.preview-vacio {
    color: var(--texto-suave);
    font-size: 0.9rem;
    font-style: italic;
    margin-bottom: 16px;
}

.btn-seccion {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 20px;
    margin-top: 16px;
    background: var(--acento);
    color: #1a1f36;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: opacity 0.15s ease;
}

@media (hover: hover) {
    .btn-seccion:hover {
        opacity: 0.9;
    }
}

.calendario-mini {
    border-collapse: separate;
    border-spacing: 4px 0;
}

.calendario-mini td {
    border-radius: 12px;
}

.celda-dia-link {
    display: block;
    text-decoration: inherit;
    color: inherit;
}

.dia-hoy {
    outline: 2px solid var(--acento);
    outline-offset: -2px;
}

.navbar-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.footer-sitio {
    margin-top: 60px;
    padding: 24px 24px 32px;
    border-top: 1px solid var(--borde);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
}

.footer-logo {
    width: 64px;
    height: 64px;
    object-fit: contain;
    flex-shrink: 0;
}

.footer-divisor {
    width: 1px;
    align-self: stretch;
    background: var(--borde);
    opacity: 0.4;
}

.footer-texto {
    max-width: 480px;
    text-align: center;
}

.footer-frase {
    font-size: 0.85rem;
    color: var(--texto-suave);
    line-height: 1.5;
    margin: 0 0 8px;
}

.footer-firma {
    font-size: 0.8rem;
    color: var(--texto-suave);
    margin: 0;
}

.notas-intro {
    max-width: 700px;
    margin: 0 auto 20px;
    text-align: center;
}

.nota {
    flex: 0 0 100%;
    display: flex;
    height: 640px;
    background: var(--fondo-tarjeta);
    border: 1px solid var(--borde);
    border-radius: 14px;
    overflow: hidden;
    text-align: left;
}

.nota-texto {
    width: 70%;
    padding: 24px 24px 24px 56px;
    overflow-y: auto;
}

.nota-sin-imagen .nota-texto {
    width: 100%;
    padding-right: 56px;
}

.nota-imagen {
    width: 30%;
    height: 100%;
    object-fit: cover;
    display: block;
    flex-shrink: 0;
    margin: 0;
    max-width: none;
    border-radius: 0;
}

#modal-bienvenida-fondo {
    background: rgba(0, 0, 0, 0.93);
}

#modal-bienvenida-fondo .modal-caja {
    max-width: 560px;
}

.nota-imagen-grilla {
    width: 30%;
    height: 100%;
    flex-shrink: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 1fr;
    gap: 2px;
    overflow-y: auto;
}

.nota-imagen-item-contenedor {
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.nota-imagen-grilla-item {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.nota-imagen-hover {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    opacity: 0;
    transition: opacity 0.15s ease;
}

@media (hover: hover) {
    .nota-imagen-item-contenedor:hover .nota-imagen-hover {
        opacity: 1;
    }
}

.lightbox-imagen {
    max-width: 85vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
}

.fotos-actuales {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 16px;
}

.foto-actual {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 0.75rem;
    color: var(--texto-suave);
}

.foto-actual img {
    width: 90px;
    height: 90px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--borde);
}

.nota-imagen-grilla > .nota-imagen-item-contenedor:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

.card-imagen-grilla {
    width: 70%;
    height: 100%;
    flex-shrink: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 1fr;
    gap: 2px;
    overflow-y: auto;
}

.card-imagen-grilla > .card-imagen-item-contenedor:last-child:nth-child(odd) {
    grid-column: 1 / -1;
}

.card-imagen-item-contenedor {
    position: relative;
    cursor: pointer;
    overflow: hidden;
}

.card-imagen-item {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card-imagen-hover {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    opacity: 0;
    transition: opacity 0.15s ease;
}

@media (hover: hover) {
    .card-imagen-item-contenedor:hover .card-imagen-hover {
        opacity: 1;
    }
}
@media (max-width: 700px) {
    .card-recuerdo {
        flex-direction: column;
        height: auto;
    }

    .card-imagen {
        width: 100%;
        height: 240px;
    }

    .card-imagen-grilla {
        width: 100%;
        height: 240px;
    }

    .card-contenido {
        width: 100%;
        padding: 16px;
    }

    .carrusel-mensajes .carrusel-flecha-der {
        right: 12px;
    }

    .nota {
        flex-direction: column;
        height: auto;
    }

    .nota-texto {
        width: 100%;
    }

    .nota-sin-imagen .nota-texto {
        width: 100%;
    }

    .nota-imagen-grilla {
        width: 100%;
        height: 240px;
    }
}

.chocolate-trigger {
    cursor: pointer;
    text-decoration: none;
    color: inherit;
}

.modal-chocolate-caja {
    background: #fdf6ec;
    color: #1a1f36;
}

.modal-chocolate-caja h3 {
    color: #6b4226;
}

.modal-chocolate-caja .modal-cerrar {
    color: #6b4226;
}

.chocolate-imagen {
    display: block;
    width: 100%;
    max-width: 260px;
    margin: 12px auto;
    border-radius: 12px;
}