.sg-dialog[open]{box-sizing:border-box;position:fixed;inset:auto auto auto 50%;transform:translateX(-50%);margin:0;width:min(440px,calc(100vw - 24px));height:auto;max-height:calc(100dvh - 24px);padding:22px;border:0;border-radius:16px;color:#17243b;background:#fff;box-shadow:0 20px 80px #101c4040;overflow:auto;overscroll-behavior:contain}
.sg-dialog::backdrop{background:#0e193c80}
.sg-dialog form{display:block;margin:0;min-width:0}
.sg-dialog header{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:0;padding:0;border:0;background:none}
.sg-dialog h2{font-size:20px;line-height:1.4;margin:0;min-width:0}
.sg-dialog button{box-sizing:border-box;width:auto;white-space:normal;line-height:1.4;cursor:pointer}
.sg-dialog .sg-close{flex:0 0 36px;width:36px;height:36px;min-height:36px;padding:0;font-size:25px}
.sg-intro,.sg-body p{font-size:14px;line-height:1.65;color:#4b5c73;overflow-wrap:anywhere}
.sg-field{display:grid;gap:6px;margin:14px 0;font-size:14px;line-height:1.5}
.sg-field input{box-sizing:border-box;display:block;width:100%;min-height:44px;font-size:16px;padding:10px;border:1px solid #b5c4d8;border-radius:8px}
.sg-secret{font-family:monospace;overflow-wrap:anywhere}
.sg-qr{margin:16px 0;text-align:center}
.sg-qr canvas{display:block;width:min(224px,100%);height:auto;margin:0 auto;background:#fff;image-rendering:pixelated}
.sg-qr figcaption{margin-top:8px;font-size:13px;line-height:1.6;color:#4b5c73}
.sg-dialog footer{position:static;display:flex;flex-wrap:wrap;gap:10px;margin:14px 0 0;padding:0;border:0;background:none}
.sg-dialog footer button{flex:1 1 120px;min-height:44px;min-width:0;padding:10px 12px}
.sg-message{color:#9b3030;min-height:22px;margin:10px 0 0;font-size:14px;line-height:1.5;overflow-wrap:anywhere}
.sg-dialog button:focus-visible,.sg-dialog input:focus-visible,.sg-dialog summary:focus-visible{outline:3px solid #6b98ff;outline-offset:2px}
.sg-trust{display:flex;align-items:flex-start;gap:9px;margin:14px 0 4px;line-height:1.5;font-size:14px;cursor:pointer}
.sg-trust input[type=checkbox]{box-sizing:border-box;flex:0 0 18px;width:18px;height:18px;min-height:18px;padding:0;margin:2px 0;accent-color:#3266df}
.sg-body .sg-hint{margin:4px 0 12px;font-size:13px;color:#586a82}
.sg-help{margin:12px 0;font-size:14px;line-height:1.6}
.sg-help summary{cursor:pointer;color:#3266df;min-height:28px}
.sg-captcha{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:12px 0 4px}
.sg-captcha img{display:block;max-width:100%;width:180px;height:60px;object-fit:contain;background:#f2f5fa;border-radius:8px}
.sg-captcha button{min-height:40px;padding:8px 10px}
.sg-devices{margin:8px 0 14px;padding:0;list-style:none}
.sg-devices li{display:flex;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid #e0e7ef}
.sg-devices li>div{flex:1;min-width:0;overflow-wrap:anywhere}
.sg-devices strong{font-size:14px;line-height:1.5}
.sg-devices small{display:block;margin-top:4px;font-size:12px;line-height:1.5;color:#586a82}
.sg-devices button{flex:0 0 auto;min-height:40px;padding:8px 12px}
@media(max-width:520px){.sg-dialog[open]{padding:18px}.sg-dialog footer button{flex-basis:42%}}
.sg-recovery-codes{white-space:pre-wrap;overflow-wrap:anywhere;font-size:13px;line-height:1.8;padding:12px;background:#f3f6fb;border-radius:8px}
.sg-body details>input,.sg-body details>select{box-sizing:border-box;display:block;width:100%;max-width:100%;min-height:44px;margin:10px 0}
