/* Scoped candidate: cream paper, deep green and gold from the current child theme. */
.yu-print .yu-legal-sheet {
    position: fixed; inset: auto 0 0; margin: 0 auto; padding: 0;
    width: min(920px, 100%); max-width: 100%; height: auto;
    max-height: 84vh; max-height: min(84dvh, calc(100dvh - env(safe-area-inset-top) - 12px));
    color: #153f35; background: #f6efdf; border: 0; border-top: 3px solid #d5aa55;
    border-radius: 18px 18px 0 0; box-shadow: 0 -12px 50px #0004;
    font: inherit; overflow: hidden;
}
.yu-print .yu-legal-sheet:not([open]) { display: none; }
.yu-print .yu-legal-sheet[open] { display: flex; flex-direction: column; animation: yu-legal-rise 240ms ease-out; }
.yu-legal-sheet::backdrop { background: #071e19b8; }
.yu-print .yu-legal-header {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 22px max(24px, env(safe-area-inset-right)) 18px max(24px, env(safe-area-inset-left));
    flex: 0 0 auto; border-bottom: 1px solid #d5aa5580;
}
.yu-print .yu-legal-header h2 { margin: 0; font-size: clamp(19px, 3vw, 28px); letter-spacing: .04em; }
.yu-print .yu-legal-close {
    flex: 0 0 auto; min-height: 44px; padding: 8px 12px; border: 1px solid #153f35;
    color: #153f35; background: transparent; border-radius: 4px; font: inherit; font-size: 14px; cursor: pointer;
}
.yu-print .yu-legal-body {
    min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
    padding: 24px max(24px, env(safe-area-inset-right)) calc(28px + env(safe-area-inset-bottom)) max(24px, env(safe-area-inset-left));
    font-size: 16px; line-height: 1.85; overflow-wrap: anywhere;
}
.yu-print .yu-legal-body dl { margin: 0; }
.yu-print .yu-legal-body dt { margin-top: 18px; font-weight: 700; }
.yu-print .yu-legal-body dd { margin: 4px 0 0; padding-bottom: 16px; border-bottom: 1px solid #153f3526; }
.yu-print .yu-legal-body a { text-decoration: underline; text-underline-offset: 3px; }
.yu-print .yu-legal-draft { padding: 12px; border: 1px solid #d5aa55; font-size: 14px; }
.yu-print .yu-legal-sheet :focus-visible { outline: 3px solid #153f35; outline-offset: 3px; }
.yu-print .yu-legal-body:focus-visible { outline-offset: -4px; }
@keyframes yu-legal-rise { from { transform: translateY(100%); } to { transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .yu-print .yu-legal-sheet[open] { animation: none; } }
@media (max-width: 480px) { .yu-print .yu-legal-header { gap: 12px; padding: 16px; } .yu-print .yu-legal-close { padding: 8px; } }

/* Progressive enhancement: readable full copy when JS/dialog is unavailable. */
.yu-print .yu-legal-sheet:not([data-yu-enhanced]) { position: static; display: block; width: min(920px, 100%); height: auto; max-height: none; margin: 32px auto; overflow: visible; animation: none; box-sizing: border-box; }
.yu-print .yu-legal-sheet:not([data-yu-enhanced]) .yu-legal-body { overflow: visible; }
.yu-print .yu-legal-sheet:not([data-yu-enhanced]) .yu-legal-close { display: none; }
