.account-page [hidden] { display: none !important; }
.account-shell { width: min(100% - 40px, 620px); margin: 0 auto; padding: 48px 0 80px; min-height: 75vh; }
.account-heading { margin-bottom: 32px; }
.account-kicker { font-size: .7rem; font-weight: 750; letter-spacing: .14em; text-transform: uppercase; margin: 0 0 .5rem; color: var(--muted); }
.account-heading h1 { font-size: 2.5rem; line-height: 1.15; letter-spacing: -.055em; margin: 0 0 .6rem; }
.account-heading > p:last-child { color: var(--muted); margin: 0; }
.account-section-title { font-size: .75rem; font-weight: 750; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 28px 4px 10px; }
.account-settings-card { background: var(--dk-bg-ffffff, #fff); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.account-setting { width: 100%; min-height: 84px; display: flex; align-items: center; gap: 16px; padding: 18px 20px; background: transparent; border: 0; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.account-setting + .account-setting { border-top: 1px solid var(--line); }
.account-setting:hover:not(:disabled) { background: var(--dk-bg-f5f5f2, #f5f5f2); }
.account-setting:disabled { cursor: default; opacity: .65; }
.account-setting-copy { display: flex; flex: 1; flex-direction: column; gap: 5px; min-width: 0; }
.account-setting-copy strong { font-size: 1rem; }
.account-setting-copy > span { color: var(--muted); font-size: .8rem; line-height: 1.4; overflow-wrap: anywhere; }
.account-count { font-size: .8rem; color: var(--muted); white-space: nowrap; }
.account-setting > span:last-child { font-size: 1.5rem; color: var(--muted); }
.account-hint { color: var(--muted); font-size: .8rem; line-height: 1.65; margin: 12px 4px; }
.account-auth { padding: 22px; }
.account-auth h2 { margin: 0 0 .5rem; font-size: 1.1rem; }
.account-auth p { font-size: .85rem; line-height: 1.6; margin: .5rem 0 1rem; }
.account-email { overflow-wrap: anywhere; }
.account-link-controls { border-top: 1px solid var(--line); margin-top: 18px; padding-top: 12px; }
.account-button { display: inline-flex; align-items: center; justify-content: center; gap: .75rem; min-height: 46px; padding: .75rem 1.1rem; border: 1px solid var(--ink); border-radius: 10px; background: var(--ink); color: var(--dk-inv-ffffff, #fff); font: inherit; font-size: .85rem; font-weight: 650; cursor: pointer; }
.account-button.secondary { background: transparent; color: var(--ink); border-color: var(--line); }
.account-button.provider { width: 100%; background: var(--dk-bg-ffffff, #fff); color: var(--dk-fg-1f1f1f, #1f1f1f); border-color: #747775; }
.account-button svg { width: 20px; height: 20px; flex-shrink: 0; }
.account-button:disabled { cursor: not-allowed; opacity: .5; }
/* Email sign-in: sits under Google in the same card */
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 18px 0 14px !important; color: var(--muted); font-size: .75rem !important; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.auth-modes { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin-bottom: 14px; border-radius: 12px; background: var(--dk-bg-f1f1ee, #f1f1ee); }
.auth-modes button { min-height: 40px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font: inherit; font-size: .82rem; font-weight: 650; cursor: pointer; }
.auth-modes button[aria-selected="true"] { background: var(--dk-bg-ffffff, #fff); color: var(--ink); box-shadow: 0 1px 3px #0000001f; }
.auth-form { display: grid; gap: 14px; }
.auth-field { display: grid; gap: 6px; }
.auth-field label { font-size: .8rem; font-weight: 650; }
.auth-field input { width: 100%; min-height: 46px; padding: 0 14px; border: 1px solid #b9b9b4; border-radius: 10px; background: var(--dk-bg-ffffff, #fff); color: var(--ink); font: inherit; font-size: 1rem; }
.auth-field input:disabled { background: var(--dk-bg-f5f5f2, #f5f5f2); }
.auth-field small { color: var(--muted); font-size: .75rem; line-height: 1.5; }
.auth-password { position: relative; }
.auth-password input { padding-right: 72px; }
.auth-reveal { position: absolute; top: 4px; right: 4px; min-width: 56px; height: 38px; border: 0; border-radius: 8px; background: transparent; color: var(--ink); font: inherit; font-size: .75rem; font-weight: 650; cursor: pointer; }
.auth-submit { width: 100%; }
.auth-consents { display: grid; gap: 8px; min-width: 0; margin: 0; padding: 14px 0 0; border: 0; border-top: 1px solid var(--line); }
.auth-consents legend { padding: 0 0 8px; font-size: .75rem; font-weight: 650; }
.auth-consent { display: flex; align-items: flex-start; gap: 10px; min-height: 44px; padding: 8px 0; font-size: .8rem; line-height: 1.6; cursor: pointer; }
.auth-consent input { flex: 0 0 20px; width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--ink); }
.auth-consent small { color: var(--muted); font-size: .7rem; }
.account-auth .auth-privacy { margin: 0; color: var(--muted); font-size: .75rem; line-height: 1.6; }
.account-auth .auth-status { margin: 0; font-size: .8rem; color: var(--muted); }
.account-auth .auth-status:empty { display: none; }
.account-auth .auth-status.is-error { color: var(--dk-fg-a22e20, #a22e20); }
.auth-links { display: flex; flex-wrap: wrap; gap: 4px 16px; }
.auth-link { min-height: 32px; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; font-size: .8rem; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.auth-link:disabled { opacity: .5; cursor: default; }
#sign-in { scroll-margin-top: 96px; }
#sign-in:focus { outline: none; }
/* Appearance: works signed in or out, stored on this device */
.theme-setting { margin: 0; border: 0; cursor: default; flex-wrap: wrap; }
.theme-setting:hover { background: transparent !important; }
.theme-choices { display: inline-grid; grid-template-columns: repeat(3, auto); gap: 4px; padding: 4px; border-radius: 12px; background: var(--dk-bg-f1f1ee, #f1f1ee); }
.theme-choices label { position: relative; cursor: pointer; }
.theme-choices input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.theme-choices span { display: flex; align-items: center; justify-content: center; min-width: 64px; min-height: 36px; padding: 0 12px; border-radius: 9px; color: var(--muted); font-size: .82rem; font-weight: 650; }
.theme-choices input:checked + span { background: var(--dk-bg-ffffff, #fff); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .18); }
.theme-choices input:focus-visible + span { outline: 3px solid #b24116; outline-offset: 1px; }
.theme-choices input:disabled + span { opacity: .6; }
@media (max-width: 420px) { .theme-setting .theme-choices { width: 100%; grid-template-columns: repeat(3, 1fr); } }
.account-page :focus-visible { outline: 3px solid #b24116; outline-offset: 3px; }
.account-setting:focus-visible { outline-offset: -4px; }
.account-status { font-size: .8rem; color: var(--muted); line-height: 1.6; margin: 12px 4px; }
.account-page .is-error { color: var(--dk-fg-a22e20, #a22e20); }
.account-picker { width: min(560px, calc(100% - 32px)); max-width: none; max-height: min(860px, calc(100dvh - 48px)); padding: 0; border: 1px solid var(--line); border-radius: 20px; background: var(--paper); color: var(--ink); box-shadow: 0 24px 100px #0003; }
.account-picker[open] { display: flex; flex-direction: column; }
.account-picker::backdrop { background: #0007; backdrop-filter: blur(5px); }
.picker-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 24px 24px 12px; }
.picker-head h2 { font-size: 1.8rem; letter-spacing: -.04em; margin: 0; }
.account-close { width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--ink); font-size: 1.7rem; cursor: pointer; flex-shrink: 0; }
.account-close:disabled { opacity: .4; }
.picker-description { font-size: .8rem; line-height: 1.6; color: var(--muted); margin: 0; padding: 0 24px 18px; }
.picker-body { overflow-y: auto; overscroll-behavior: contain; min-height: 0; padding: 0 24px 22px; }
.account-choices { border: 0; padding: 0; margin: 0; min-width: 0; }
.account-choices h3 { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; margin: 22px 0 10px; color: var(--muted); }
.account-choices > h3:first-of-type { margin-top: 16px; }
.account-choice-grid { display: grid; gap: 10px; }
.favourite-choice { position: relative; display: flex; align-items: center; gap: 12px; min-height: 78px; padding: 16px 18px; border-radius: 14px; cursor: pointer; background: var(--favourite-colour, var(--dk-bg-e8e8e5, #e8e8e5)); color: var(--favourite-ink, var(--dk-fg-111111, #111)); }
.favourite-choice:has(input:focus-visible) { outline: 3px solid #b24116; outline-offset: 3px; }
.favourite-choice input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.favourite-choice-copy { display: flex; flex: 1; flex-direction: column; gap: 4px; min-width: 0; }
.favourite-choice strong { font-size: 1rem; line-height: 1.3; overflow-wrap: anywhere; }
.favourite-choice small { font-size: .75rem; line-height: 1.4; }
.favourite-star { font-size: 1.6rem; flex-shrink: 0; }
.favourite-order { font-size: .65rem; font-weight: 750; flex-shrink: 0; }
.account-choices:disabled .favourite-choice { cursor: default; opacity: .65; }
.picker-footer { border-top: 1px solid var(--line); padding: 14px 24px 20px; }
.picker-footer > p { font-size: .75rem; line-height: 1.5; margin: 0 0 12px; }
.picker-actions { display: flex; gap: 12px; justify-content: space-between; }
[data-picker-reload] { width: 100%; margin-top: 10px; }
.account-page:has(.account-picker[open]) { overflow: hidden; }
@media (max-width: 600px) {
  .account-shell { width: calc(100% - 32px); padding-top: 28px; }
  .account-setting { padding: 16px; gap: 10px; }
  .account-picker { width: 100%; max-height: calc(100dvh - 20px); margin: auto 0 0; border-radius: 20px 20px 0 0; }
  .picker-head { padding: 20px 16px 12px; }
  .picker-description { padding: 0 16px 12px; }
  .picker-body { padding: 0 16px 20px; }
  .picker-footer { padding: 12px 16px max(16px, env(safe-area-inset-bottom)); }
  .favourite-choice { padding: 14px; gap: 8px; }
}
