html{scrollbar-gutter:stable}
:root{--site-footer-height:5rem;--site-footer-space:var(--site-footer-measured-space,calc(var(--site-footer-height) + env(safe-area-inset-bottom,0px)))}
body.has-site-footer{padding-bottom:var(--site-footer-space)}
body.login-body.has-site-footer{padding-bottom:calc(24px + var(--site-footer-space))}
.site-footer{position:fixed;inset:auto 0 0;z-index:1000;width:100%;height:auto;min-height:calc(var(--site-footer-height) + env(safe-area-inset-bottom,0px));margin:0;padding:12px max(16px,env(safe-area-inset-right,0px)) calc(12px + env(safe-area-inset-bottom,0px)) max(16px,env(safe-area-inset-left,0px));display:flex;flex-direction:row;align-items:center;justify-content:space-between;gap:12px 24px;border-top:1px solid var(--border,var(--line,#293241));background:var(--bg,#0c1017);box-shadow:0 -6px 24px #0003;color:var(--text,#edf1fa)}
.footer-brand{font-size:16px;font-weight:700;letter-spacing:1px;white-space:nowrap}
.footer-brand span{font-size:inherit;font-weight:inherit;letter-spacing:inherit;color:inherit}
.site-footer .footer-note{margin:0;color:var(--muted,#98a5b8);font-size:11px}
.site-footer .footer-links{display:flex;flex-wrap:wrap;max-width:100%;align-items:center;gap:10px;font-size:12px}
.site-footer .footer-button{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:10px 16px;border:1px solid var(--border,var(--line,#293241));border-radius:8px;color:inherit;white-space:nowrap}
.site-footer .footer-button:hover{border-color:var(--accent,var(--purple,#89a9ff));color:var(--accent,var(--purple,#89a9ff))}
.legal-dialog{position:fixed;inset:16px 0 calc(var(--site-footer-space) + 16px);margin:auto;width:min(800px,calc(100% - 32px));max-width:none;height:fit-content;max-height:calc(100dvh - var(--site-footer-space) - 32px);padding:0;overflow:hidden;border:1px solid var(--border,var(--line,#293241));border-radius:14px;background:var(--panel,var(--surface,#141a24));color:var(--text,#edf1fa);box-shadow:0 16px 64px #0008}
.legal-dialog[open]{display:flex;flex-direction:column}
.legal-dialog::backdrop{background:#0009;bottom:var(--site-footer-space)}
.legal-dialog-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 20px;border-bottom:1px solid var(--border,var(--line,#293241));flex-shrink:0}
.legal-dialog-header h2{margin:0;font-size:16px;line-height:1.4;letter-spacing:0}
.legal-dialog-close,.legal-retry{font:inherit;color:inherit;background:transparent;border:1px solid var(--border,var(--line,#293241));border-radius:8px;min-height:44px;padding:10px 16px;cursor:pointer}
.legal-dialog-close:hover,.legal-retry:hover{border-color:var(--accent,var(--purple,#89a9ff))}
.legal-dialog-body{padding:24px;overflow-y:auto;overscroll-behavior:contain;min-height:0;scrollbar-gutter:stable}
.legal-page{max-width:900px}
.legal-content{font-size:14px;line-height:1.7;overflow-wrap:anywhere}
.legal-content h1{font-size:clamp(24px,4vw,34px);line-height:1.25;letter-spacing:-.5px;margin:0 0 12px}
.legal-content h2{font-size:18px;line-height:1.4;letter-spacing:0;margin:28px 0 10px}
.legal-content p{margin:0 0 16px}
.legal-content .legal-updated{font-size:12px;color:var(--muted,#98a5b8)}
.legal-content a{text-decoration:underline;text-underline-offset:3px;color:var(--accent,var(--purple,#89a9ff))}
body.legal-panel-open{overflow:hidden}
@media(max-width:600px){:root{--site-footer-height:7rem}.site-footer{flex-wrap:wrap;gap:6px 12px}.footer-brand{font-size:14px}.site-footer .footer-links{gap:8px}.site-footer .footer-button{padding:10px 12px}.site-footer .footer-note{order:3;width:100%;text-align:center}.legal-dialog-header{padding:12px 16px}.legal-dialog-body{padding:20px 16px}}
