.aioperator-popup {
    width: 720px;
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    margin: auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: #3d3d3d;
    overflow: visible;
}

.aioperator-popup::backdrop {
    background: rgba(0, 0, 0, 0.6);
}

.aioperator-popup__surface {
    position: relative;
    max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px);
    margin: 0;
    overflow: auto;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.24);
}

dialog a:hover {
    opacity: 1;
}

.aioperator-popup__title {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    border: 0;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.aioperator-popup picture,
.aioperator-popup img {
    display: block;
    background: #f1f0ee;
}

.aioperator-popup img {
    width: 100%;
    height: auto;
}

.aioperator-popup__close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 1;
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(61, 61, 61, 0.18);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.96);
    color: #3d3d3d;
    font: 400 28px/1 Arial, sans-serif;
    cursor: pointer;
}

.aioperator-popup__close:hover {
    background: #fff;
}

/* フォーカス表示 */
/* .aioperator-popup__close:focus-visible {
    outline: 3px solid #0051af;
    outline-offset: 3px;
} */

.aioperator-popup--fallback[open] {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    max-width: none;
    max-height: none;
    margin: 0;
    padding: 16px;
    border: 0;
    background: rgba(0, 0, 0, 0.6);
    overflow: auto;
}

.aioperator-popup--fallback .aioperator-popup__surface {
    width: 100%;
    max-width: 960px;
}

@media (max-width: 767px) {
    .aioperator-popup {
        max-height: 90%;
        width: auto;
        aspect-ratio: 1 / 2;
    }

    .aioperator-popup img {
        width: auto;
        max-width: 100%;
        max-height: 100%;
        margin: 0 auto;
    }
}
