.jmaxml-alert-root {
    position: sticky;
    top: 0;
    z-index: 10000;
    width: 100%;
    color: #1f2933;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid rgba(15, 23, 42, 0.12);
    box-shadow: 0 12px 34px rgba(15, 23, 42, 0.14);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

.jmaxml-alert-root.is-scrollable:not(.is-at-scroll-end)::after {
    content: '下に続きます・スクロールできます';
    position: absolute;
    left: 50%;
    bottom: 5px;
    z-index: 2;
    transform: translateX(-50%);
    padding: 3px 10px;
    color: #334155;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(15, 23, 42, 0.16);
    border-radius: 999px;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.16);
    font-size: 0.72rem;
    font-weight: 800;
    line-height: 1.35;
    pointer-events: none;
    white-space: nowrap;
}

.jmaxml-alert-root[hidden],
.jmaxml-alert-wrap[hidden],
.jmaxml-alert-reopen[hidden] {
    display: none !important;
}

.jmaxml-alert-root.is-collapsed {
    background: transparent;
    border-bottom: 0;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.jmaxml-alert-wrap {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: start;
    gap: 12px;
    width: min(calc(100% - 28px), 1120px);
    max-height: 50vh;
    max-height: 50dvh;
    margin: 0 auto;
    padding: 10px 0;
}

.jmaxml-alert-mark {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 30px;
    min-width: 30px;
    height: 30px;
    min-height: 30px;
    margin-top: 2px;
    border-radius: 999px;
    color: #fff;
    font-size: 0;
    font-weight: 800;
    line-height: 1;
    visibility: visible;
    opacity: 1;
    background: #ff2800;
    box-shadow: 0 8px 18px rgba(255, 40, 0, 0.22);
}

.jmaxml-alert-mark::before {
    content: '!';
    font-size: 0.92rem;
    font-weight: 800;
    line-height: 1;
}

.jmaxml-alert-main {
    box-sizing: border-box;
    min-width: 0;
    max-height: calc(50vh - 20px);
    max-height: calc(50dvh - 20px);
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
    -webkit-overflow-scrolling: touch;
}

.jmaxml-alert-root.is-scrollable .jmaxml-alert-main {
    padding-bottom: 34px;
}

.jmaxml-alert-heading {
    margin: 0 0 4px;
    color: #475569;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.08em;
}

.jmaxml-alert-list {
    display: grid;
    gap: 5px;
}

.jmaxml-alert-line {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 8px;
    margin: 0;
    color: #111827;
    font-size: clamp(0.88rem, 1.7vw, 0.98rem);
    font-weight: 650;
    line-height: 1.55;
}

.jmaxml-alert-label {
    display: inline-flex;
    align-items: center;
    min-height: 1.8em;
    padding: 0 8px;
    color: var(--jmaxml-alert-text-color, #fff);
    background: var(--jmaxml-alert-color, #ff2800);
    border-radius: 7px;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.jmaxml-alert-body {
    white-space: pre-line;
    overflow-wrap: anywhere;
}

.jmaxml-alert-close {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    margin: 0;
    padding: 0;
    color: #475569;
    font: inherit;
    font-size: 1.25rem;
    line-height: 1;
    background: rgba(15, 23, 42, 0.06);
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.jmaxml-alert-close:hover,
.jmaxml-alert-close:focus-visible {
    color: #111827;
    background: rgba(15, 23, 42, 0.12);
    outline: none;
    transform: translateY(-1px);
}

.jmaxml-alert-reopen {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: fit-content;
    max-width: calc(100% - 28px);
    margin: 8px auto;
    padding: 8px 13px;
    color: #111827;
    font: inherit;
    font-size: 0.9rem;
    font-weight: 800;
    line-height: 1.35;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(15, 23, 42, 0.14);
    border-radius: 999px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.16);
    cursor: pointer;
    transition: background 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}

.jmaxml-alert-reopen:hover,
.jmaxml-alert-reopen:focus-visible {
    background: #fff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.2);
    outline: none;
    transform: translateY(-1px);
}

.jmaxml-alert-reopen-mark {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 24px;
    height: 24px;
    border-radius: 999px;
    color: #fff;
    font-size: 0.8rem;
    font-weight: 800;
    line-height: 1;
    background: #ff2800;
    box-shadow: 0 6px 14px rgba(255, 40, 0, 0.2);
}

.jmaxml-alert-notice {
    margin: 0 0 10px;
    padding: 6px 10px;
    border-radius: 6px;
    background: rgba(255,255,255,0.15);
    font-size: 12px;
    line-height: 1.5;
}

.jmaxml-alert-link {
    color: inherit;
    font-weight: 700;
    text-decoration: underline;
}

.jmaxml-alert-link:hover {
    opacity: 0.85;
}

@media (max-width: 640px) {
    .jmaxml-alert-wrap {
        width: min(calc(100% - 20px), 1120px);
        grid-template-columns: auto minmax(0, 1fr) auto;
        gap: 8px;
        padding: 9px 0;
    }

    .jmaxml-alert-main {
        max-height: calc(50vh - 18px);
        max-height: calc(50dvh - 18px);
    }

    .jmaxml-alert-mark {
        display: grid;
        width: 26px;
        min-width: 26px;
        height: 26px;
        min-height: 26px;
        margin-top: 1px;
        visibility: visible;
        opacity: 1;
    }

    .jmaxml-alert-mark::before {
        font-size: 0.82rem;
    }

    .jmaxml-alert-heading {
        font-size: 0.72rem;
    }

    .jmaxml-alert-line {
        display: grid;
        gap: 4px;
    }

    .jmaxml-alert-label {
        width: fit-content;
    }

    .jmaxml-alert-close {
        width: 30px;
        height: 30px;
        font-size: 1.15rem;
    }

    .jmaxml-alert-reopen {
        max-width: calc(100% - 20px);
        margin: 7px auto;
        padding: 7px 11px;
        font-size: 0.84rem;
    }

    .jmaxml-alert-root.is-scrollable:not(.is-at-scroll-end)::after {
        bottom: 4px;
        font-size: 0.68rem;
    }
}
