.support-dialog {
    width: min(520px, calc(100% - 32px));
    max-height: calc(100dvh - 32px);
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    overflow: auto;
}

@media (min-width: 769px) {
    .support-dialog {
        width: min(680px, calc(100% - 48px));
    }
}

.support-dialog::backdrop {
    background: rgb(0 0 0 / 72%);
}

.support-dialog .support-panel {
    box-sizing: border-box;
    width: 100%;
    max-height: none;
    padding: clamp(16px, 4vw, 24px);
    background: transparent;
    border: 0;
    overflow: visible;
}

.support-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
    padding-bottom: 10px;
    background: var(--section-divider-paint);
    background-position-y: bottom, bottom, bottom 1px;
}

.support-header h2 {
    margin: 0;
    padding: 0;
    background: none;
    color: #fff;
    font-size: 20px;
    text-align: start;
}

.support-close {
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #ddd;
    font-size: 24px;
    cursor: pointer;
}

.support-close:is(:hover, :focus-visible) {
    background: rgb(255 255 255 / 8%);
}

.support-close:focus-visible {
    outline: 2px solid var(--label-red);
    outline-offset: 2px;
}

.support-panel .donation-message {
    margin: 0;
    text-align: start;
    line-height: 1.65;
    word-break: keep-all;
    overflow-wrap: anywhere;
}

.support-panel .donation-methods {
    display: flex;
    flex-flow: row wrap;
    align-items: stretch;
    gap: 8px;
    margin-top: 20px;
}

.support-method {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 116px;
    min-height: 48px;
    padding: 0 12px;
    box-sizing: border-box;
    border: 1px solid #565656;
    border-radius: 0;
    background: #2c2c2c;
    color: #fff;
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
}

.support-method:is(:hover, :focus-visible) { background: #383838; color: #fff; }
.support-method:focus-visible { outline: 2px solid var(--label-red); outline-offset: 2px; }
.support-panel .donation-methods > * { flex: 0 1 136px; }
.support-panel .kakao-pay-button { width: 100%; }
.kakao-pay-button::before {
    content: "";
    width: 32px;
    height: 22px;
    background: #ffeb00 url('../../img/logo/kakaopay-logo.png') center / 25px auto no-repeat;
}

@media (max-width: 480px) {
    .support-panel .donation-methods > * { flex: 1 1 120px; min-width: 0; }
    .support-panel .kakao-pay-button { min-width: 0; }
}

.kakao-modal { max-width: 400px; }
.kakao-qr-container { display: flex; justify-content: center; }
.kakao-qr { width: min(100%, 300px); height: auto; }

.home-support-dialog {
    max-width: 520px;
}

.home-support-dialog.kakao-modal {
    max-width: 400px;
}

.home-support-dialog .donation-message,
.support-qr-help {
    color: rgb(255 255 255 / 76%);
    text-wrap: pretty;
}

.home-support-dialog .support-method {
    white-space: nowrap;
}

@media (max-width: 360px) {
    .home-support-dialog .support-method {
        gap: 6px;
        padding-inline: 8px;
    }
}

.support-qr-help {
    margin: 16px 0 0;
    text-align: center;
    line-height: 1.6;
    word-break: keep-all;
}

@media (prefers-reduced-motion: no-preference) {
    .home-support-dialog[open] .support-panel {
        animation: support-dialog-enter 180ms cubic-bezier(.16, 1, .3, 1);
    }

    .support-method,
    .support-close {
        transition: background-color 150ms ease, scale 120ms ease;
    }

    .support-method:active,
    .support-close:active {
        scale: .97;
    }
}

@keyframes support-dialog-enter {
    from { opacity: 0; translate: 0 8px; }
    to { opacity: 1; translate: 0 0; }
}
