.auth-methods { display: grid; gap: 10px; width: 100%; } .auth-methods a { text-decoration: none; } .auth-methods .auth-alternative { justify-self: center; padding: 4px 8px; color: #dcebd7; font-size: .92rem; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; } .auth-current-session { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; margin: 4px auto 0; color: #dcebd7; font-size: .9rem; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.auth-methods a { text-decoration: none; }
.auth-account-method { display: grid; gap: 7px; padding-top: 10px; border-top: 1px solid #dce4de; }
.auth-account-method > span { font-size: .75rem; font-weight: 700; }
.auth-account-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.auth-account-actions a { flex: 1; margin: 0; text-align: center; }
.profile-control { position: relative; }
.profile-button { position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid #a6c6b4; border-radius: 50%; overflow: hidden; cursor: pointer; background: #e4eee7; color: #17251f; }
.profile-avatar { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.profile-initials { font-size: 15px; font-weight: 800; }
.profile-menu { position: absolute; top: calc(100% + 8px); right: 0; z-index: 100; display: grid; gap: 8px; width: min(320px, calc(100vw - 50px)); padding: 18px; border: 1px solid #dce4de; border-radius: 16px; background: #fff; color: #17251f; box-shadow: 0 14px 40px #17251f24; text-align: left; overflow-wrap: anywhere; }
.profile-menu > span { font-size: .8rem; }
.profile-menu a { display: block; border-radius: 8px; padding: 9px; background: #eef4ef; color: #17251f; text-decoration: none; font-size: .8rem; font-weight: 600; }
.profile-menu a:focus-visible, .profile-button:focus-visible, .auth-methods a:focus-visible { outline: 3px solid #79a951; outline-offset: 3px; }
.profile-menu.hidden, .profile-avatar.hidden, .profile-initials.hidden { display: none; }
.profile-context { display: grid; gap: 9px; padding: 12px 0; border-block: 1px solid #dce4de; font-size: .8rem; }
.profile-context p { margin: 0; color: #52675b; font-size: .75rem; line-height: 1.5; }
.profile-context .profile-context-status:not(:empty) { padding: 9px; border-radius: 8px; background: #edf4e8; color: #243c2a; }
.profile-personas { display: grid; gap: 8px; }
.profile-personas button { min-height: 44px; padding: 9px 11px; border: 1px solid #b4c9bc; border-radius: 9px; background: #f3f7f2; color: #17251f; font: inherit; font-weight: 650; text-align: left; cursor: pointer; }
.profile-personas button[aria-pressed="true"] { border-color: #6d9550; background: #e7f2dd; color: #29421e; }
.profile-personas button:disabled { cursor: default; }
.profile-context[aria-busy="true"] button { opacity: .65; }
.profile-personas button:focus-visible, .profile-menu a:focus-visible { outline: 3px solid #79a951; outline-offset: 3px; }
.profile-menu a[aria-disabled="true"] { opacity: .55; cursor: wait; }
.profile-menu { max-height: min(78vh, 660px); overflow-y: auto; overscroll-behavior: contain; }
.auth-account-actions a { min-height: 44px; display: flex; align-items: center; justify-content: center; }
@media (max-width: 480px) {
  /* The profile button can sit near the left edge: anchor this small-screen
     dialog to the viewport, not to its narrow account-control parent. */
  .profile-menu { position: fixed; top: calc(80px + env(safe-area-inset-top)); left: max(16px, env(safe-area-inset-left)); right: max(16px, env(safe-area-inset-right)); width: auto; min-width: 0; max-width: none; box-sizing: border-box; max-height: calc(100vh - 96px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); max-height: calc(100dvh - 96px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); padding: 15px; }
  .auth-account-actions { display: grid; grid-template-columns: 1fr; }
}

/* Compact Google-style account cards for the profile dialog. */
.auth-profile-list { display: grid; gap: 6px; padding: 10px 0; border-block: 1px solid #dce4de; }
.auth-profile-list > strong { font-size: .8rem; }
.auth-profile-card { display: grid; grid-template-columns: 32px 1fr auto; align-items: center; gap: 9px; min-height: 42px; padding: 6px 8px; border-radius: 10px; color: #17251f; text-decoration: none; }
.auth-profile-card:hover, .auth-profile-card:focus-visible { background: #eef4ef; outline: none; }
.auth-profile-card.current { background: #e7f2dd; }
.auth-profile-card > span:nth-child(2) { display: grid; gap: 1px; min-width: 0; }
.auth-profile-card strong { font-size: .78rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth-profile-card small { color: #52675b; font-size: .7rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.auth-profile-avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #d9ebce; color: #29421e; font-size: .7rem; font-weight: 800; overflow: hidden; }
.auth-profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.auth-profile-card > b { color: #3f7b4e; font-size: .85rem; }

/* Unified account control: photos and initials share the same framed avatar. */
.profile-button { width: 46px; height: 46px; border: 2px solid #a6c6b4; box-shadow: 0 1px 2px #17251f18; }
.profile-avatar { inset: 3px; width: calc(100% - 6px); height: calc(100% - 6px); border-radius: 50%; background: #dcebd7; }
.profile-initials { position: absolute; inset: 3px; display: grid; place-items: center; border-radius: 50%; background: #dcebd7; color: #244b35; font-size: 14px; font-weight: 850; }
.auth-profile-row { display: flex; align-items: stretch; gap: 7px; }
.auth-profile-row .auth-profile-card { flex: 1; min-width: 0; }
.auth-profile-remove { display: grid; place-items: center; flex: none; width: 44px; min-height: 44px; padding: 0; border: 1px solid #d9c3bf; border-radius: 10px; background: #fff8f6; color: #9a4238; font: inherit; font-size: 22px; line-height: 1; cursor: pointer; }
.auth-profile-remove:hover, .auth-profile-remove:focus-visible { border-color: #b95b4e; background: #fff0ec; }
.auth-profile-remove:focus-visible { outline: 3px solid #79a951; outline-offset: 2px; }
.auth-profile-remove:disabled { opacity: .55; cursor: wait; }
.auth-profile-removal-status:not(:empty) { margin: 0; padding: 9px; border-radius: 8px; background: #edf4e8; color: #243c2a; font-size: .78rem; font-weight: 650; }


/* One stable identity treatment for every saved user: photos and initial fallbacks share the same frame. */
.session-bar { min-height: 62px; padding: 9px 12px 9px 18px; }
.session-bar > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* The launcher owns an absolutely positioned menu; never clip it inside the session bar. */
.session-bar > span.cheaply-launcher { min-width: 0; overflow: visible; flex: 0 0 auto; }
.session-actions { min-height: 46px; }
.profile-button { box-sizing: border-box; width: 48px; height: 48px; padding: 0; border: 1px solid #a6c6b4; background: #e4eee7; box-shadow: 0 1px 2px #17251f18; }
.profile-button .profile-avatar, .profile-button .profile-initials { position: absolute; inset: 3px; width: calc(100% - 6px); height: calc(100% - 6px); box-sizing: border-box; border-radius: 50%; }
.profile-button .profile-avatar { display: block; object-fit: cover; background: #dcebd7; }
.profile-button .profile-initials { display: grid; place-items: center; background: #dcebd7; color: #244b35; font-size: 14px; font-weight: 850; }
.profile-button .profile-avatar.hidden, .profile-button .profile-initials.hidden { display: none; }
.auth-profile-card { min-height: 46px; border: 1px solid transparent; }
.auth-profile-card.current { border-color: #bdd6ab; }
.auth-profile-avatar { flex: none; border: 1px solid #a6c6b4; background: #dcebd7; }
.auth-profile-remove { width: 46px; min-height: 46px; border-radius: 12px; }
