.agenda-widget {
    width: 100%;
    max-width: 100%;
    font-family: inherit;
    box-sizing: border-box;
}

.agenda-widget *,
.agenda-widget *::before,
.agenda-widget *::after {
    box-sizing: border-box;
}

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

.agenda-header h2 {
    margin: 0;
    font-size: clamp(22px, 3vw, 28px);
    line-height: 1.2;
    font-weight: 700;
}

.agenda-more {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 0 20px;
    border-radius: 11px;
    background: #246bff;
    color: #fff !important;
    text-decoration: none !important;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
}

.agenda-list {
    display: grid;
    gap: 14px;
}

.agenda-card {
    cursor: pointer;
    display: flex;
    width: 100%;
    min-width: 0;
    gap: 12px;
    padding: 8px;
    border: 1px solid #e7e7e7;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,.06);
    overflow: hidden;
}

.agenda-thumb {
    flex: 0 0 125px;
    width: 125px;
    height: 175px;
    display: block;
    overflow: hidden;
    border-radius: 10px;
    background: #eef3f8;
}

.agenda-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.agenda-no-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #777;
    font-weight: 700;
    font-size: 13px;
}

.agenda-content {
    flex: 1 1 auto;
    min-width: 0;
    padding: 7px 4px 4px 0;
}

.agenda-content h3 {
    margin: 0;
    font-size: clamp(16px, 2vw, 19px);
    line-height: 1.4;
    font-weight: 700;
}

.agenda-content h3 a {
    color: #333;
    text-decoration: none;
}

.agenda-divider {
    border-top: 1px dotted #aaa;
    margin: 12px 0;
}

.agenda-meta {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    min-width: 0;
    color: #555;
    font-size: 13px;
    line-height: 1.45;
}

.agenda-meta > span:last-child {
    overflow-wrap: anywhere;
}

.agenda-icon {
    flex: 0 0 auto;
    color: #f5a400;
    font-size: 13px;
    line-height: 1.4;
}

.agenda-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
}

.agenda-empty {
    padding: 25px;
    text-align: center;
    border: 1px dashed #ccc;
    border-radius: 10px;
    color: #777;
}

@media (max-width: 600px) {
    .agenda-header {
        margin-bottom: 12px;
    }

    .agenda-more {
        min-height: 38px;
        padding: 0 14px;
        font-size: 13px;
    }

    .agenda-card {
        gap: 9px;
        padding: 7px;
        border-radius: 11px;
    }

    .agenda-thumb {
        flex-basis: 110px;
        width: 110px;
        height: 155px;
    }

    .agenda-content {
        padding-top: 4px;
    }

    .agenda-content h3 {
        font-size: 16px;
    }

    .agenda-divider {
        margin: 9px 0;
    }

    .agenda-meta {
        font-size: 12px;
        gap: 6px;
    }

    .agenda-meta-row {
        display: grid;
        grid-template-columns: 1fr;
        gap: 5px;
    }
}

@media (max-width: 380px) {
    .agenda-thumb {
        flex-basis: 95px;
        width: 95px;
        height: 138px;
    }

    .agenda-content h3 {
        font-size: 15px;
    }

    .agenda-more {
        padding: 0 11px;
    }
}

/* ============ Pop up detail agenda ============ */

html.agenda-modal-lock { overflow: hidden; }

.agenda-detail-src { display: none !important; }

.agenda-modal[hidden] { display: none !important; }

.agenda-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(17, 24, 39, .45);
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
    opacity: 0;
    transition: opacity .18s ease;
    font-family: inherit;
    box-sizing: border-box;
}

.agenda-modal.is-open { opacity: 1; }

.agenda-modal *,
.agenda-modal *::before,
.agenda-modal *::after { box-sizing: border-box; }

.agenda-modal__dialog {
    width: 100%;
    max-width: 650px;
    max-height: calc(100vh - 40px);
    max-height: calc(100dvh - 40px);
    overflow-y: auto;
    padding: 40px;
    border-radius: 16px;
    background: #fff;
    color: #222;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
    transform: translateY(8px);
    transition: transform .18s ease;
    outline: none;
}

.agenda-modal.is-open .agenda-modal__dialog { transform: none; }

.agenda-modal__badge {
    display: inline-block;
    padding: 4px 9px;
    border-radius: 5px;
    background: #eeeeee;
    color: #246bff;
    font-size: 12px;
    line-height: 1.4;
}

.agenda-modal .agenda-modal__title {
    margin: 14px 0 12px;
    padding: 0;
    color: #246bff;
    font-size: clamp(19px, 2.6vw, 22px);
    font-weight: 500;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.agenda-modal__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 24px;
}

.agenda-modal__item {
    display: grid;
    grid-template-columns: 18px 1fr;
    column-gap: 8px;
    row-gap: 2px;
    align-items: start;
    min-width: 0;
}

.agenda-modal__item--place { margin-top: 22px; }

.agenda-modal__icon {
    grid-row: 1;
    grid-column: 1;
    width: 16px;
    height: 16px;
    margin-top: 2px;
    color: #f5a400;
}

.agenda-modal__label {
    grid-row: 1;
    grid-column: 2;
    font-size: 14px;
    font-weight: 600;
    color: #222;
    line-height: 1.5;
}

.agenda-modal__value {
    grid-row: 2;
    grid-column: 2;
    font-size: 14px;
    color: #222;
    line-height: 1.5;
    overflow-wrap: anywhere;
}

.agenda-modal__section { margin-top: 22px; }

.agenda-modal__subhead {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #444;
}

.agenda-modal__icon--info {
    margin: 0;
    color: #246bff;
    width: 16px;
    height: 16px;
}

.agenda-modal__detail {
    margin-top: 14px;
    color: #777;
    font-size: 14px;
    line-height: 1.75;
    overflow-wrap: anywhere;
}

.agenda-modal__detail > *:first-child { margin-top: 0; }
.agenda-modal__detail > *:last-child { margin-bottom: 0; }
.agenda-modal__detail p { margin: 0 0 10px; }
.agenda-modal__detail img,
.agenda-modal__detail iframe,
.agenda-modal__detail video { max-width: 100%; height: auto; }
.agenda-modal__detail a { color: #246bff; }

.agenda-modal__actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px 20px;
    margin-top: 28px;
}

.agenda-modal .agenda-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 18px;
    border: 2px solid #246bff;
    border-radius: 10px;
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}

.agenda-modal .agenda-btn[hidden] { display: none !important; }
.agenda-modal .agenda-btn svg { width: 16px; height: 16px; }

.agenda-modal .agenda-btn--ghost,
.agenda-modal .agenda-btn--ghost:focus {
    background: #fff;
    color: #246bff;
}
.agenda-modal .agenda-btn--ghost:hover {
    background: #eaf1ff;
    color: #246bff;
}

.agenda-modal .agenda-btn--solid,
.agenda-modal .agenda-btn--solid:focus,
.agenda-modal .agenda-btn--solid:visited {
    background: #246bff;
    color: #fff;
}
.agenda-modal .agenda-btn--solid:hover {
    background: #1b57d6;
    border-color: #1b57d6;
    color: #fff;
}

.agenda-modal .agenda-btn:focus-visible {
    outline: 3px solid rgba(36, 107, 255, .35);
    outline-offset: 2px;
}

@media (max-width: 600px) {
    .agenda-modal { padding: 14px; }
    .agenda-modal__dialog { padding: 24px 20px; border-radius: 14px; }
    .agenda-modal__grid { grid-template-columns: 1fr; }
    .agenda-modal__actions .agenda-btn { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
    .agenda-modal,
    .agenda-modal__dialog { transition: none; }
}
