.legal-page { min-height: 100svh; }
.legal-shell { position: relative; z-index: 1; max-width: 980px; margin: 0 auto; padding: 0 24px 64px; }
.legal-navigation { position: sticky; top: 0; z-index: 2; padding: max(12px, env(safe-area-inset-top)) 0 12px; background: rgba(255,255,255,.96); border-bottom: 1px solid #e5e9f2; backdrop-filter: blur(12px); }
.legal-back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 10px 16px; border: 1px solid #dce3f3; border-radius: 24px; background: #fff; color: #3155b8; font: inherit; font-size: 14px; font-weight: 650; text-decoration: none; cursor: pointer; }
.legal-back:hover { background: #f2f5ff; }
.legal-back:focus-visible, .legal-reader a:focus-visible, .legal-reader summary:focus-visible { outline: 3px solid #4264e9; outline-offset: 3px; }
.legal-reader { color: #32445f; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; font-size: 16px; line-height: 1.75; overflow-wrap: anywhere; }
.legal-reader .legal-header { padding: 40px 0 28px; }
.legal-reader .legal-brand { display: flex; align-items: center; gap: 12px; margin-bottom: 24px; color: #06377f; font-size: 21px; font-weight: 750; letter-spacing: -.5px; }
.legal-reader .legal-brand img { width: 44px; height: 44px; object-fit: contain; }
.legal-reader .legal-kicker { margin: 0 0 10px; color: #6552b6; font-size: 12px; font-weight: 750; letter-spacing: 1.6px; text-transform: uppercase; }
.legal-reader .legal-title { max-width: 720px; margin: 0 0 18px; color: #06377f; font-size: clamp(30px, 6vw, 44px); line-height: 1.12; font-weight: 750; letter-spacing: -1px; }
.legal-reader .legal-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.legal-reader .legal-meta span { padding: 5px 12px; border-radius: 20px; background: #f1effa; color: #5d4397; font-size: 12px; font-weight: 600; }
.legal-reader .legal-index { margin: 0 0 28px; padding: 18px 22px; border: 1px solid #e3e6f1; border-radius: 18px; background: #f8f9fd; }
.legal-reader .legal-index summary { color: #06377f; font-weight: 700; cursor: pointer; }
.legal-reader .legal-index nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 24px; margin-top: 18px; }
.legal-reader a { color: #3155b8; text-underline-offset: 3px; }
.legal-reader .legal-index a { font-size: 14px; line-height: 1.5; }
.legal-reader .legal-section { margin: 0 0 20px; padding: 26px 28px; border: 1px solid #eee1d9; border-radius: 18px; background: #fff; scroll-margin-top: 88px; }
.legal-reader h2 { margin: 0 0 18px; color: #06377f; font-size: 22px; line-height: 1.35; letter-spacing: -.3px; }
.legal-reader h3 { margin: 26px 0 12px; color: #6040a2; font-size: 18px; line-height: 1.4; }
.legal-reader p { margin: 0 0 14px; }
.legal-reader ul, .legal-reader ol { margin: 0 0 18px; padding-left: 24px; }
.legal-reader li { margin-bottom: 8px; }
.legal-reader .legal-section > :last-child { margin-bottom: 0; }
.legal-reader .legal-footer { padding: 24px 0; border-top: 1px solid #e3e6f1; color: #637087; font-size: 14px; }
.legal-reader .legal-footer strong { color: #06377f; }
.legal-reader .legal-note { padding: 16px 18px; border-radius: 12px; background: #f5f3fc; color: #5d477d; }
html.registration-reading { overflow: hidden; }
.registration-legal-dialog { width: min(960px, calc(100% - 32px)); height: min(900px, 92vh); height: min(900px, 92dvh); max-width: none; max-height: none; margin: auto; padding: 0; border: 1px solid #e3e6f1; border-radius: 24px; background: #fff; color: #32445f; box-shadow: 0 24px 70px #15295233; }
.registration-legal-dialog::backdrop { background: #101c3b88; backdrop-filter: blur(5px); }
.registration-legal-dialog[open] { display: flex; flex-direction: column; }
.registration-legal-toolbar { flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 24px; border-bottom: 1px solid #e3e6f1; background: #fff; }
.registration-legal-toolbar h2 { margin: 0; color: #06377f; font-size: 15px; font-weight: 650; }
.registration-legal-content { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0 32px 24px; background: radial-gradient(ellipse at top right, #edf4ff 0%, transparent 48%) #fff; }
.registration-legal-content .legal-section { scroll-margin-top: 20px; }
.registration-legal-status { padding: 40px 0; color: #637087; font-size: 16px; line-height: 1.6; }
.registration-legal-status button { margin-top: 16px; }
@media (max-width: 600px) {
    .legal-shell { padding: 0 16px 36px; }
    .legal-reader { font-size: 15px; line-height: 1.75; }
    .legal-reader .legal-header { padding: 28px 0 22px; }
    .legal-reader .legal-brand { margin-bottom: 22px; font-size: 20px; }
    .legal-reader .legal-section { padding: 22px 18px; border-radius: 16px; }
    .legal-reader h2 { font-size: 20px; }
    .legal-reader .legal-index { padding: 16px 18px; }
    .legal-reader .legal-index nav { grid-template-columns: 1fr; }
    .registration-legal-dialog { width: 100%; height: 100vh; height: 100dvh; border: 0; border-radius: 0; }
    .registration-legal-toolbar { padding: max(10px, env(safe-area-inset-top)) 16px 10px; }
    .registration-legal-toolbar h2 { display: none; }
    .registration-legal-content { padding: 0 16px max(20px, env(safe-area-inset-bottom)); }
}
