.runtime-popup-dialog {
    width: calc(100vw - 32px);
    max-width: 560px;
    box-sizing: border-box;
    margin: auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--ink, var(--text, #142033));
    overflow: visible;
}

.runtime-popup-dialog::backdrop {
    background: rgb(8 15 27 / 64%);
    backdrop-filter: blur(9px) saturate(.9);
    -webkit-backdrop-filter: blur(9px) saturate(.9);
    animation: runtime-popup-backdrop-in .26s ease both;
}

.runtime-popup-panel {
    position: relative;
    width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    border: 1px solid color-mix(in srgb, var(--line, #dce5f0) 88%, transparent);
    border-radius: 8px;
    background: var(--surface, #fff);
    box-shadow: 0 34px 100px rgb(7 17 32 / 30%), 0 8px 26px rgb(7 17 32 / 14%);
    animation: runtime-popup-in .42s cubic-bezier(.2, .82, .2, 1) both;
}

.runtime-popup-panel:focus { outline: none; }

.runtime-popup-panel::before {
    position: absolute;
    inset: 0 0 auto;
    height: 3px;
    background: var(--accent, var(--blue, #2878f0));
    content: "";
}

.runtime-popup-header {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
    padding: 32px 60px 22px 30px;
}

.runtime-popup-mark {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid color-mix(in srgb, var(--accent, var(--blue, #2878f0)) 24%, transparent);
    border-radius: 8px;
    background: color-mix(in srgb, var(--accent, var(--blue, #2878f0)) 10%, var(--surface, #fff));
    color: var(--accent, var(--blue, #2878f0));
    font-size: 20px;
    font-weight: 800;
    line-height: 1;
}

.runtime-popup-kicker {
    display: block;
    margin: 1px 0 7px;
    color: var(--accent, var(--blue, #2878f0));
    font-size: 12px;
    font-weight: 750;
    line-height: 1.4;
}

.runtime-popup-panel h2 {
    max-width: 430px;
    margin: 0;
    color: var(--ink, var(--text, #142033));
    font-size: clamp(22px, 3.6vw, 28px);
    font-weight: 760;
    line-height: 1.35;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

.runtime-popup-body {
    margin: 0 30px;
    padding: 20px 22px;
    border: 1px solid color-mix(in srgb, var(--line, #dce5f0) 82%, transparent);
    border-radius: 7px;
    background: color-mix(in srgb, var(--surface, #fff) 94%, var(--ink, #142033));
}

.runtime-popup-body p {
    max-height: min(34vh, 260px);
    margin: 0;
    overflow: auto;
    color: var(--muted, #667085);
    font-size: 14px;
    line-height: 1.85;
    white-space: normal;
    overflow-wrap: anywhere;
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--muted, #667085) 38%, transparent) transparent;
}

.runtime-popup-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 26px;
    padding: 18px 30px 22px;
    border-top: 1px solid color-mix(in srgb, var(--line, #dce5f0) 76%, transparent);
    background: color-mix(in srgb, var(--surface, #fff) 97%, var(--ink, #142033));
}

.runtime-popup-button {
    display: inline-flex;
    min-width: 104px;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    padding: 0 18px;
    border: 1px solid var(--line, #dce5f0);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 720;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition: transform .16s ease, border-color .16s ease, background-color .16s ease, color .16s ease, box-shadow .16s ease;
}

.runtime-popup-button.secondary {
    background: transparent;
    color: var(--muted, #667085);
}

.runtime-popup-button.secondary:hover {
    border-color: color-mix(in srgb, var(--accent, var(--blue, #2878f0)) 42%, var(--line, #dce5f0));
    background: color-mix(in srgb, var(--accent, var(--blue, #2878f0)) 6%, transparent);
    color: var(--ink, var(--text, #142033));
}

.runtime-popup-button.primary {
    border-color: var(--accent, var(--blue, #2878f0));
    background: var(--accent, var(--blue, #2878f0));
    color: #fff;
    box-shadow: 0 8px 20px color-mix(in srgb, var(--accent, var(--blue, #2878f0)) 24%, transparent);
}

.runtime-popup-button.primary::after {
    margin-left: 8px;
    font-size: 17px;
    font-weight: 500;
    line-height: 1;
    content: "›";
}

.runtime-popup-button.primary:hover {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

.runtime-popup-button:active {
    transform: translateY(1px) scale(.985);
}

.runtime-popup-button:focus-visible,
.runtime-popup-x:focus-visible {
    outline: 3px solid color-mix(in srgb, var(--accent, var(--blue, #2878f0)) 30%, transparent);
    outline-offset: 2px;
}

.runtime-popup-x {
    position: absolute;
    z-index: 2;
    top: 16px;
    right: 16px;
    display: grid;
    width: 38px;
    height: 38px;
    padding: 0;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 6px;
    background: transparent;
    color: var(--muted, #667085);
    font-family: Arial, sans-serif;
    font-size: 24px;
    font-weight: 400;
    line-height: 1;
    cursor: pointer;
    transition: border-color .16s ease, background-color .16s ease, color .16s ease, transform .16s ease;
}

.runtime-popup-x:hover {
    border-color: color-mix(in srgb, var(--line, #dce5f0) 90%, transparent);
    background: color-mix(in srgb, var(--ink, #142033) 6%, transparent);
    color: var(--ink, var(--text, #142033));
}

.runtime-popup-x:active {
    transform: scale(.94);
}

.runtime-popup-dialog.is-closing .runtime-popup-panel {
    animation: runtime-popup-out .18s ease both;
}

.runtime-popup-dialog.is-closing::backdrop {
    animation: runtime-popup-backdrop-out .18s ease both;
}

@keyframes runtime-popup-in {
    from { opacity: 0; transform: translateY(22px) scale(.972); }
    to { opacity: 1; transform: none; }
}

@keyframes runtime-popup-out {
    from { opacity: 1; transform: none; }
    to { opacity: 0; transform: translateY(10px) scale(.985); }
}

@keyframes runtime-popup-backdrop-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes runtime-popup-backdrop-out {
    from { opacity: 1; }
    to { opacity: 0; }
}

@media (max-width: 560px) {
    .runtime-popup-dialog {
        width: calc(100vw - 20px);
        max-width: calc(100vw - 20px);
    }

    .runtime-popup-header {
        grid-template-columns: 38px minmax(0, 1fr);
        gap: 13px;
        padding: 27px 50px 19px 18px;
    }

    .runtime-popup-mark {
        width: 38px;
        height: 38px;
        font-size: 18px;
    }

    .runtime-popup-panel h2 {
        font-size: 21px;
    }

    .runtime-popup-body {
        margin-inline: 18px;
        padding: 17px 16px;
    }

    .runtime-popup-body p {
        max-height: min(31vh, 230px);
        font-size: 13px;
        line-height: 1.8;
    }

    .runtime-popup-actions {
        display: grid;
        grid-template-columns: 1fr;
        margin-top: 20px;
        padding: 15px 18px 18px;
    }

    .runtime-popup-button {
        width: 100%;
        min-height: 44px;
    }

    .runtime-popup-button.primary { grid-row: 1; }
    .runtime-popup-button.secondary { grid-row: 2; }

    .runtime-popup-x {
        top: 12px;
        right: 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .runtime-popup-dialog::backdrop,
    .runtime-popup-panel {
        animation-duration: .01ms !important;
    }

    .runtime-popup-button,
    .runtime-popup-x {
        transition-duration: .01ms !important;
    }

    .runtime-popup-button:hover,
    .runtime-popup-button:active,
    .runtime-popup-x:active {
        transform: none;
    }
}
