#account-controls { position:fixed; top:12px; right:12px; z-index:100; }
#account-button { border:1px solid #c9d7bf; border-radius:24px; background:#163c2d; color:#fff; padding:10px 18px; cursor:pointer; font:inherit; }
#auth-dialog { margin:auto; max-height:calc(100dvh - 32px); overflow-y:auto; box-sizing:border-box; width:min(420px,calc(100% - 32px)); padding:28px; border:1px solid #c9d7bf; border-radius:16px; background:#faf9f3; color:#163c2d; font:16px/1.5 system-ui,sans-serif; }
#auth-dialog::backdrop { background:#071b14aa; }
#auth-close { float:right; border:0; background:none; font-size:28px; cursor:pointer; }
#auth-google { width:100%; padding:12px 20px; background:white; color:#1f1f1f; border:1px solid #747775; border-radius:24px; font:500 14px/20px system-ui,sans-serif; cursor:pointer; }
#auth-google:hover { background:#f0f4f0; }
#auth-google:disabled { opacity:.55; cursor:not-allowed; }
#auth-dialog button:focus-visible, #account-button:focus-visible { outline:3px solid #558e73; outline-offset:3px; }
#auth-dialog small { display:block; color:#526254; }

@media (min-width: 761px) {
    #account-controls { top:32px; right:32px; }
}

/* Give account access its own row on phones so it cannot cover the hole map.
   It scrolls with the start screen instead of floating over page content. */
@media (max-width: 760px) {
    body:has(#start-screen.hidden) #account-controls { display:none; }
    #account-controls {
        position: relative;
        top: auto;
        right: auto;
        display: block;
        width: max-content;
        min-height: 44px;
        margin: 12px clamp(18px, 4vw, 40px) 0 auto;
    }
    #start-screen > #account-controls + #start-hero {
        padding-top: 20px;
    }
}

#account-button.account-avatar { width:44px; height:44px; padding:0; border-radius:50%; font-weight:600; font-size:18px; }
#account-menu { position:absolute; right:0; top:calc(100% + 8px); min-width:144px; padding:6px; border:1px solid #c9d7bf; border-radius:12px; background:#faf9f3; box-shadow:0 6px 24px #071b1426; }
#account-menu[hidden] { display:none; }
#account-sign-out { width:100%; border:0; border-radius:7px; padding:11px 14px; text-align:left; background:transparent; color:#163c2d; font:inherit; cursor:pointer; }
#account-sign-out:hover { background:#e8eee4; }
#account-sign-out:focus-visible { outline:3px solid #558e73; outline-offset:-3px; }

.auth-divider { display:flex; align-items:center; gap:12px; margin:20px 0; color:#657566; font-size:13px; }
.auth-divider::before, .auth-divider::after { content:''; flex:1; height:1px; background:#d8dfd1; }
#auth-dialog form[hidden] { display:none; }
#auth-dialog label { display:block; margin-bottom:6px; font-weight:600; font-size:14px; }
#auth-dialog input { box-sizing:border-box; width:100%; min-height:46px; padding:11px 12px; border:1px solid #a5b5a3; border-radius:9px; background:#fff; color:#163c2d; font:inherit; }
#auth-dialog input:focus-visible { outline:3px solid #558e73; outline-offset:2px; }
#auth-dialog form > button { width:100%; margin-top:12px; min-height:46px; padding:11px 16px; border:0; border-radius:9px; background:#163c2d; color:#faf9f3; font:600 15px/1.4 system-ui,sans-serif; cursor:pointer; }
#auth-dialog form button:disabled { opacity:.55; cursor:not-allowed; }
#auth-code { letter-spacing:.25em; font-size:22px !important; }
#auth-code-destination { overflow-wrap:anywhere; font-size:14px; }
.auth-email-actions { display:flex; justify-content:space-between; gap:12px; margin-top:10px; }
.auth-email-actions button { border:0; padding:8px 0; background:transparent; color:#27533a; font:inherit; font-size:13px; cursor:pointer; }
#auth-status { font-size:14px; overflow-wrap:anywhere; }

#auth-dialog > p { margin:12px 0; }
#auth-dialog h2 { margin:0 32px 8px 0; font-size:26px; }
