body.payment-notice-open { overflow: hidden; }

.payment-notice {
    box-sizing: border-box;
    width: min(42rem, calc(100% - 2rem));
    max-height: 90vh;
    max-height: 90dvh;
    margin: auto;
    padding: clamp(1rem, 4vw, 2rem);
    border: 1px solid var(--border-color);
    border-radius: var(--radius);
    background: var(--surface);
    color: var(--text-color);
    box-shadow: var(--shadow);
    overflow-y: auto;
    overscroll-behavior: contain;
    line-height: 1.7;
}

.payment-notice::backdrop { background: rgba(0, 0, 0, 0.65); }
.payment-notice h2 { margin-top: 0; font-size: 1.45rem; line-height: 1.4; }
.payment-notice h2:focus { outline: none; }
.payment-notice p { margin: 1rem 0; }
.payment-notice form { margin-top: 1.5rem; }
.payment-notice-preference { display: flex; align-items: center; gap: 0.65rem; cursor: pointer; }
.payment-notice-preference input { width: 1.2rem; height: 1.2rem; flex-shrink: 0; accent-color: var(--primary-color); }
.payment-notice button,
.payment-notice-reopen {
    padding: 0.65rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--accent-text);
    background: var(--soft-surface);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}
.payment-notice button { display: block; margin: 1rem 0 0 auto; }
.payment-notice :is(a, button, input):focus-visible,
.payment-notice-reopen:focus-visible { outline: 3px solid var(--orange-400); outline-offset: 3px; }
.payment-notice a { overflow-wrap: anywhere; }

@media print {
    .payment-notice,
    .payment-notice-reopen { display: none !important; }
    body.payment-notice-open { overflow: visible; }
}
