.psico-calendar {
    max-width: 686px;
    margin: 0 auto;
    padding: 18px;
    border-radius: 24px;
    font-family: inherit;
    background:
        radial-gradient(circle at top left, rgba(255,255,255,.75), transparent 34%),
        linear-gradient(135deg, #fbf3dd 0%, #f7edcf 45%, #ead6a6 100%);
    box-shadow: 0 18px 46px rgba(70, 50, 18, 0.14);
    border: 1px solid rgba(139, 111, 61, 0.22);
}

.psico-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.psico-calendar-title-wrap {
    text-align: center;
}

.psico-calendar-header h3 {
    margin: 0;
    text-transform: capitalize;
    color: #302615;
    font-size: 24px;
    font-weight: 850;
    line-height: 1.1;
}

.psico-calendar-header button {
    flex: 0 0 auto;
    background: #3d3424;
    color: #fff;
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 999px;
    font-size: 25px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(61, 52, 36, .22);
    transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}

.psico-calendar-header button:hover {
    background: #8b6f3d;
    transform: translateY(-2px) scale(1.04);
    box-shadow: 0 12px 24px rgba(61, 52, 36, .28);
}

.psico-calendar-inner {
    overflow: hidden;
    border-radius: 18px;
    border: 1px solid rgba(139, 111, 61, 0.25);
    background: rgba(255, 250, 240, .82);
}

.psico-calendar-days,
.psico-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}

.psico-calendar-days {
    background: #6f572c;
}

.psico-calendar-days div {
    font-weight: 800;
    text-align: center;
    padding: 10px 5px;
    color: #fffaf0;
    font-size: 11px;
    letter-spacing: .04em;
    text-transform: uppercase;
    border-right: 1px solid rgba(255,255,255,.18);
}

.psico-calendar-days div:last-child {
    border-right: none;
}

.psico-day {
    min-height: 82px;
    border-right: 1px solid #eadfbe;
    border-bottom: 1px solid #eadfbe;
    padding: 7px;
    background: rgba(255, 252, 245, .94);
    position: relative;
    transition: background .2s ease, box-shadow .2s ease;
}

.psico-day:hover {
    background: #fff7e3;
    box-shadow: inset 0 0 0 2px rgba(139,111,61,.08);
}

.psico-day:nth-child(7n) {
    border-right: none;
}

.psico-day-number {
    display: inline-flex;
    width: 23px;
    height: 23px;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 11px;
    color: #3d3424;
    background: #f4ead0;
    border-radius: 50%;
}

.psico-day.has-event {
    background:
        linear-gradient(180deg, rgba(255,255,255,.95), rgba(255,247,227,.96));
}

.psico-day.has-event .psico-day-number {
    color: #fff;
    background: #8b6f3d;
}

.psico-event {
    margin-top: 7px;
    background: linear-gradient(135deg, #8b6f3d, #5d4624);
    color: white;
    padding: 5px 7px;
    border-radius: 8px;
    font-size: 10px;
    cursor: pointer;
    line-height: 1.25;
    font-weight: 700;
    box-shadow: 0 7px 14px rgba(93, 70, 36, .18);
    transition: background .2s ease, transform .2s ease, box-shadow .2s ease;
}

.psico-event:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 18px rgba(93, 70, 36, .24);
}

/* Modal estilizado: ocupa 60% de la pantalla en escritorio */
.psico-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    inset: 0;
    background: rgba(21, 16, 9, 0.74);
    backdrop-filter: blur(6px);
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.psico-modal.is-open {
    display: flex;
}

.psico-modal-content {
    background: #fffaf2;
    width: 42vw;
    max-width: 560px;
    min-width: 320px;
    max-height: 90vh;
    overflow-y: auto;
    border-radius: 28px;
    position: relative;
    text-align: left;
    box-shadow: 0 32px 90px rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(139, 111, 61, 0.28);
    animation: psicoModalIn .25s ease;
}

@keyframes psicoModalIn {
    from {
        opacity: 0;
        transform: translateY(18px) scale(.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

#psico-close {
    position: absolute;
    right: 18px;
    top: 18px;
    z-index: 3;
    width: 42px;
    height: 42px;
    border: none;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: #3d3424;
    font-size: 30px;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(0, 0, 0, 0.18);
    transition: transform .2s ease, background .2s ease;
}

#psico-close:hover {
    background: #ffffff;
    transform: rotate(90deg);
}

.psico-modal-image-wrap {
    width: 360px;
    height: 360px;
    max-width: calc(100% - 56px);
    margin: 28px auto 0;
    border-radius: 24px;
    overflow: hidden;
    background: linear-gradient(135deg, #d8c18a, #8b6f3d);
    display: none;
    box-shadow: 0 18px 38px rgba(61, 52, 36, .18);
}

.psico-modal-image-wrap.has-image {
    display: block;
}

.psico-modal-content img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.psico-modal-body {
    padding: 26px 30px 32px;
}

.psico-modal-label {
    display: inline-block;
    background: #efe2bf;
    color: #6b5229;
    font-size: 12px;
    line-height: 1;
    letter-spacing: .08em;
    text-transform: uppercase;
    font-weight: 800;
    padding: 8px 11px;
    border-radius: 999px;
    margin-bottom: 12px;
}

#psico-modal-title {
    margin: 0 0 14px;
    color: #2e2619;
    font-size: 29px;
    font-weight: 850;
    line-height: 1.15;
}

.psico-modal-date-box {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f7edcf;
    border: 1px solid #e4d3a8;
    color: #4b3b1f;
    padding: 12px 14px;
    border-radius: 16px;
    font-size: 15px;
    font-weight: 700;
    margin: 0 0 20px;
    text-transform: capitalize;
}

.psico-date-icon {
    display: inline-flex;
    width: 32px;
    height: 32px;
    align-items: center;
    justify-content: center;
    background: #fffaf2;
    border-radius: 50%;
}

.psico-modal-description {
    background: #ffffff;
    border: 1px solid #eee2c7;
    border-radius: 20px;
    padding: 17px 19px;
}

.psico-modal-description h4 {
    margin: 0 0 8px;
    color: #6b5229;
    font-size: 14px;
    font-weight: 850;
    text-transform: uppercase;
    letter-spacing: .05em;
}

#psico-modal-desc {
    margin: 0;
    color: #4b4437;
    font-size: 16px;
    line-height: 1.65;
}

@media (max-width: 768px) {
    .psico-calendar {
        max-width: 100%;
        padding: 12px;
        border-radius: 20px;
    }

    .psico-calendar-header {
        gap: 10px;
    }

    .psico-calendar-header h3 {
        font-size: 20px;
    }

    .psico-calendar-header button {
        width: 36px;
        height: 36px;
        font-size: 24px;
    }

    .psico-calendar-days div {
        padding: 9px 3px;
        font-size: 10px;
    }

    .psico-day {
        min-height: 72px;
        padding: 5px;
    }

    .psico-day-number {
        width: 22px;
        height: 22px;
        font-size: 10px;
    }

    .psico-event {
        font-size: 9px;
        padding: 5px;
        border-radius: 7px;
    }

    .psico-modal {
        padding: 16px;
    }

    .psico-modal-content {
        width: 100%;
        max-width: 100%;
        max-height: 92vh;
        border-radius: 22px;
    }

    .psico-modal-image-wrap {
        width: calc(100% - 32px);
        height: auto;
        aspect-ratio: 1 / 1;
        max-width: calc(100% - 32px);
        margin-top: 16px;
        border-radius: 18px;
    }

    .psico-modal-body {
        padding: 22px 20px 24px;
    }

    #psico-modal-title {
        font-size: 24px;
    }
}
