.cm-calendar-wrap {
    --cm-primary: #8f4b32;
    --cm-accent: #ef2e8f;
    --cm-bg: #f6efea;
    --cm-card: #fff9f5;
    --cm-text: #364657;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
}

.cm-cal-shell {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.cm-hover-card {
    position: fixed;
    z-index: 10010;
    width: min(360px, calc(100vw - 24px));
    background: #fff9f5;
    color: var(--cm-text);
    border: 1px solid #ead9cd;
    border-radius: 0.375rem;
    overflow: hidden;
    box-shadow: 0 14px 38px rgba(95, 57, 37, 0.16);
    pointer-events: none;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.cm-hover-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.cm-hover-card .cm-hover-title {
    color: #8f4b32;
}

.cm-hover-card .cm-hover-description {
    color: #4a5968;
}

.cm-hover-card .cm-hover-meta {
    color: #596979;
}

.cm-hover-card .cm-hover-link {
    pointer-events: auto;
}

.cm-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
}

.cm-modal.is-open {
    display: block;
}

.cm-gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10020;
    display: none;
}

.cm-gallery-lightbox.is-open {
    display: block;
}

.cm-gallery-lightbox-overlay {
    position: absolute;
    inset: 0;
    background: rgba(31, 21, 16, 0.82);
}

.cm-gallery-lightbox-dialog {
    position: relative;
    z-index: 1;
    width: min(1200px, calc(100% - 20px));
    max-height: calc(100vh - 20px);
    margin: 10px auto;
    border-radius: 8px;
    overflow: hidden;
    background: #fff9f5;
    border: 1px solid #e5d6cc;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.cm-gallery-lightbox-close {
    position: absolute;
    right: 10px;
    top: 8px;
    border: 0;
    background: rgba(255, 255, 255, 0.9);
    color: #8f4b32;
    width: 40px;
    height: 40px;
    border-radius: 999px;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}

.cm-gallery-lightbox-image-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.cm-gallery-lightbox-image {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: calc(100vh - 56px);
    object-fit: contain;
    border-radius: 6px;
}

.cm-gallery-item {
    border: 0;
    padding: 0;
    background: transparent;
    cursor: zoom-in;
}

.cm-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(53, 33, 22, 0.38);
}

.cm-modal-dialog {
    position: relative;
    z-index: 1;
    width: min(1500px, calc(100% - 12px));
    max-height: calc(100vh - 20px);
    margin: 10px auto;
    background: var(--cm-card);
    color: var(--cm-text);
    border: 1px solid #ead9cd;
    border-radius: 0.5rem;
    overflow: auto;
    padding: 0;
}

.cm-close {
    position: absolute;
    right: 12px;
    top: 8px;
    border: 0;
    background: transparent;
    color: var(--cm-primary);
    font-size: 38px;
    line-height: 1;
    cursor: pointer;
    z-index: 2;
}

.cm-detail-wrap {
    background: var(--cm-card);
    color: var(--cm-text);
}

.cm-detail-wrap .cm-detail-back {
    border-color: #d9c5b8;
    background: #ffffff;
    color: var(--cm-primary);
}

.cm-detail-wrap .cm-hover-title,
.cm-detail-wrap .cm-hover-description,
.cm-detail-wrap .cm-hover-meta,
.cm-detail-wrap .cm-modal-description,
.cm-detail-wrap p,
.cm-detail-wrap h2,
.cm-detail-wrap h3,
.cm-detail-wrap h4,
.cm-detail-wrap span,
.cm-detail-wrap div {
    color: inherit;
}

.cm-detail-wrap .cm-detail-status.is-open {
    color: #ffffff;
    background: var(--cm-accent);
}

.cm-detail-wrap .cm-detail-status.is-closed {
    color: #ffffff;
    background: #b79082;
}

.cm-detail-status.is-open {
    color: #0f5132;
    background: #d1e7dd;
}

.cm-detail-status.is-closed {
    color: #842029;
    background: #f8d7da;
}

.cm-map-wrap iframe {
    width: 100%;
    height: 420px;
    border: 0;
    border-radius: 0.375rem;
}

.cm-side-btn.is-copied {
    color: #0f5132;
    border-color: #0f5132;
}

.cm-day-list-item {
    color: var(--cm-text);
}

.cm-cal-event-title {
    display: inline;
}

.cm-cal-event-meta {
    display: inline;
}

.cm-day-group-label {
    margin: 10px 0 8px;
    padding: 8px 10px;
    background: #f5ebe4;
    border: 1px solid #e2cdc1;
    border-radius: 6px;
    color: var(--cm-primary);
    font-size: 18px;
    font-weight: 700;
}

.cm-day-list-grid {
    display: grid;
    grid-template-columns: 78px 86px 1fr auto;
    align-items: center;
    gap: 12px;
}

.cm-day-date-badge {
    position: relative;
    width: 74px;
    min-height: 74px;
    background: #f7e4ef;
    color: var(--cm-primary);
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.cm-day-date-badge::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 8px;
    border-radius: 6px 0 0 6px;
    background: var(--cm-day-color, var(--cm-accent));
}

.cm-day-date-num {
    font-size: 26px;
    font-weight: 700;
    line-height: 1;
}

.cm-day-date-month {
    margin-top: 3px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cm-day-thumb {
    width: 76px;
    height: 76px;
    object-fit: cover;
    border-radius: 4px;
}

.cm-day-thumb-empty {
    background: #ebd8cc;
}

.cm-day-main {
    min-width: 0;
}

.cm-day-title {
    font-size: 34px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--cm-primary);
}

.cm-day-time,
.cm-day-summary,
.cm-day-location {
    font-size: 24px;
    line-height: 1.3;
	color: #888888;
    margin-top: 4px;
}

.cm-day-status {
    justify-self: end;
    background: var(--cm-accent);
    color: #fff;
    font-size: 20px;
    font-weight: 700;
    border-radius: 4px;
    padding: 10px 18px;
    white-space: nowrap;
}

.cm-day-status.is-open {
    background: var(--cm-accent);
}

.cm-day-status.is-closed {
    background: #bf9382;
}

@media (max-width: 767px) {
    .cm-hover-card {
        width: calc(100vw - 24px);
        max-height: calc(100vh - 24px);
        overflow-y: auto;
        pointer-events: none;
    }

    .cm-hover-card.is-interactive {
        pointer-events: auto;
        cursor: pointer;
    }

    .cm-cal-event {
        padding: 6px 8px;
        font-size: 10px;
        line-height: 1.25;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }

    .cm-cal-event-title {
        display: block;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .cm-cal-event-meta {
        display: none;
    }

    .cm-modal-dialog {
        width: calc(100% - 12px);
        margin: 6px auto;
        padding: 0;
    }

    .cm-map-wrap iframe {
        height: 280px;
    }

    .cm-day-list-grid {
        grid-template-columns: 104px 1fr;
        gap: 10px;
    }

    .cm-day-date-badge {
        display: none;
    }

    .cm-day-date-num {
        font-size: 18px;
    }

    .cm-day-date-month {
        font-size: 11px;
    }

    .cm-day-thumb {
        width: 104px;
        height: 104px;
    }

    .cm-day-title {
        font-size: 16px;
    }

    .cm-day-group-label {
        font-size: 14px;
        padding: 6px 8px;
    }

    .cm-day-time,
    .cm-day-location {
        font-size: 12px;
        color: #888888;
    }

    .cm-day-summary {
        color: #888888;
        display: -webkit-box;
        overflow: hidden;
        font-size: 12px;
        line-height: 1.3;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
    }

    .cm-day-status {
        display: none;
    }
}
