/* E-214–221: Konto A for the existing server controller only. */
#app:has(.auth-server-page){height:auto;min-height:100dvh;overflow-y:auto;overflow-x:hidden;padding:0}
.auth-server-page{display:block;max-width:520px;min-height:100dvh;margin:0 auto;padding:28px 24px max(32px,env(safe-area-inset-bottom));box-sizing:border-box}
.auth-server-brand{display:flex;align-items:center;gap:10px;font:600 17px/1.5 Manrope,system-ui;color:var(--text);padding:0;margin:0 0 34px;border:0;background:transparent}
.auth-server-brand .auth-mark{width:34px;height:34px;border-radius:12px;font-size:24px;box-shadow:none}
.auth-server-page .auth-intro{margin:0 0 28px}
.auth-server-page .auth-intro h1{font-size:29px;line-height:1.3;font-weight:550;letter-spacing:-.7px;margin:0}
.auth-server-page .auth-intro>p{font-size:14px;line-height:1.6;margin:12px 0 0;max-width:none;overflow-wrap:anywhere}
.auth-server-page .auth-card{padding:0;border:0;background:transparent;box-shadow:none;border-radius:0}
.auth-server-page .auth-tabs{margin:0 0 24px;padding:4px;gap:4px;border:0;background:var(--surface);border-radius:16px}
.auth-server-page .auth-tabs>.btn{font-size:14px;line-height:1.5;min-height:48px;border-radius:12px!important;padding:10px 12px}
.auth-server-page .auth-tabs>.btn.primary{background:var(--accent-soft)!important;color:var(--accent-ink)!important}
.auth-server-page .google-button{min-height:52px;border-radius:16px;font-size:15px;line-height:1.5;background:var(--surface);color:var(--text);border:0;padding:12px 16px}
.auth-server-page .google-unavailable{justify-content:flex-start;font-size:13px;line-height:1.5;text-align:left}
.auth-server-page .auth-divider{font-size:12px;margin:18px 0;color:var(--muted)}
.auth-server-page form,.account-server-content form{display:grid;gap:20px;min-width:0}
.auth-server-page .auth-field,.account-server-content .auth-field{margin:0;min-width:0}
.auth-server-page .auth-field>label,.account-server-content .auth-field>label{font-size:14px;font-weight:550;line-height:1.5;margin:0 0 8px}
.auth-server-page .auth-field input,.account-server-content .auth-field input{font-family:'DM Sans',system-ui;font-size:16px;line-height:1.5;min-height:56px;padding:15px 16px;border:0;border-radius:16px;background:var(--surface);color:var(--text);box-shadow:none}
.auth-server-page .auth-input-wrap:has(.password-toggle) input,.account-server-content .auth-input-wrap:has(.password-toggle) input{padding-right:58px}
.auth-server-page .auth-field input::placeholder,.account-server-content .auth-field input::placeholder{font-size:14px;color:var(--muted)}
.auth-server-page .password-toggle,.account-server-content .password-toggle{top:50%;right:4px;transform:translateY(-50%);width:44px!important;min-width:44px!important;height:44px!important;min-height:44px!important;margin:0!important;padding:0!important;box-sizing:border-box;border:0;border-radius:10px;color:var(--muted);background:transparent!important}
.auth-server-page .password-toggle:focus-visible,.account-server-content .password-toggle:focus-visible{outline:2px solid var(--accent-graphic);outline-offset:-2px}
.auth-server-page .auth-field input:focus,.account-server-content .auth-field input:focus{border-color:var(--accent-graphic);box-shadow:none}
.auth-server-page .field-error,.account-server-content .field-error{font-size:13px;line-height:1.5;margin:6px 0 0;color:var(--danger)}
.auth-server-page .field-error:empty,.account-server-content .field-error:empty{display:none}
.auth-server-page .auth-error,.account-server-content .auth-error{font-size:14px;line-height:1.6;padding:14px;border:1px solid var(--danger);border-radius:16px;margin:0;outline:0;background:var(--surface)}
.auth-server-page .auth-error:empty,.account-server-content .auth-error:empty{display:none}
.auth-server-page .auth-notice{font-size:14px;line-height:1.6;padding:14px 16px;border-radius:16px;margin:0 0 20px}
.auth-server-page .auth-submit,.account-server-content .auth-submit{min-height:56px!important;height:auto;font-size:16px!important;line-height:1.5;white-space:normal;overflow-wrap:normal;padding:14px 16px;border-radius:16px!important;box-shadow:none!important}
.auth-server-page .auth-server-recover{display:flex;justify-content:flex-end;margin-top:-12px}
.auth-server-page .auth-help{font-size:14px!important;line-height:1.5;margin:16px 0 0;padding:10px 12px!important;min-height:44px!important;color:var(--accent-ink)!important;background:transparent;white-space:normal;max-width:100%;text-align:center}
.auth-server-page .auth-server-recover .auth-help{margin:0}
.auth-server-page .auth-footnote,.auth-server-page .auth-hint,.account-server-content .auth-hint{font-size:13px;line-height:1.6;margin:0;color:var(--muted);text-align:left}
.auth-server-page .auth-footnote{margin-top:20px}
.auth-server-page .auth-field input[aria-invalid=true],.account-server-content .auth-field input[aria-invalid=true]{border-color:var(--danger)}
.auth-server-page button:focus-visible,.account-server-card button:focus-visible,.account-server-card input:focus-visible,.account-server-card textarea:focus-visible{outline:2px solid var(--accent-graphic);outline-offset:3px}
@media(max-width:359px){.auth-server-page{padding-inline:20px}.auth-server-brand{margin-bottom:28px}}

.auth-server-page input.auth-recovery-input{font-family:ui-monospace,monospace;letter-spacing:.02em}

.auth-google-identity{display:flex;align-items:center;gap:12px;padding:16px;margin-top:20px;border-radius:16px;background:var(--surface);font-size:14px;line-height:1.5;text-align:left}.auth-google-identity>svg{flex:none}.auth-google-identity>span{min-width:0;overflow-wrap:anywhere}.auth-google-identity small{display:block;font-size:12px;line-height:1.5;color:var(--muted);margin-top:3px}

.account-server-overlay{padding:0;background:var(--bg);align-items:stretch;backdrop-filter:none}
.account-server-overlay .account-server-card{width:min(100%,560px);max-height:100%;height:100%;margin:0 auto;padding:0;border:0;border-radius:0;box-shadow:none;background:var(--bg);overflow-y:auto;overflow-x:hidden;overscroll-behavior:contain;scroll-padding-block:88px 24px;overflow-wrap:anywhere}
.account-server-card>header{display:flex;align-items:center;gap:8px;position:sticky;top:0;z-index:2;min-height:68px;margin:0;padding:10px 16px;border-bottom:1px solid var(--line);background:var(--bg)}
.account-server-card>header>h2{flex:1;min-width:0;font-size:20px;line-height:1.4;font-weight:600;letter-spacing:-.4px;margin:0}
.account-server-card>header .btn{display:grid;place-items:center;flex:none;width:48px;min-height:48px;padding:0;background:transparent;border:0;border-radius:16px;color:var(--text)}
.account-server-content{display:grid;gap:24px;padding:24px 24px max(28px,env(safe-area-inset-bottom));min-width:0}
.account-server-content p{margin:0;font-size:14px;line-height:1.6;color:var(--muted)}
.account-server-content .btn{min-height:48px;height:auto;padding:12px 16px;border-radius:16px;font-size:15px;line-height:1.5;white-space:normal;overflow-wrap:normal;word-break:normal;max-width:100%}
.account-server-content .account-actions{display:flex;gap:10px;flex-wrap:wrap}
.account-server-content .account-actions>.btn{flex:1 1 125px;justify-content:center;gap:8px;background:var(--surface);border:1px solid var(--line);color:var(--text);font-size:14px}
.account-server-content .account-check{margin:0;gap:12px;font-size:14px;line-height:1.6}
.account-server-content .account-check>input{width:24px;height:24px;flex:none;margin:0}
.account-recovery-field{margin:0;gap:8px}
.account-recovery-field>span{font-size:14px;line-height:1.5;color:var(--text)}
.account-server-content .recovery-code{background:var(--surface);border:1px solid var(--line);border-radius:16px;padding:16px;font-size:16px;line-height:1.7;color:var(--text);min-height:130px;height:auto;white-space:pre-wrap;overflow-wrap:anywhere;word-break:break-word;resize:vertical}
@media(min-width:620px){.account-server-overlay{padding:24px;background:var(--overlay,#0006)}.account-server-overlay .account-server-card{max-height:calc(100dvh - 48px);height:auto;border:0;border-radius:24px}}
@media(max-width:359px){.account-server-content{padding-inline:20px}.account-server-card>header{padding-inline:12px}}

.account-server-identity{display:flex;align-items:center;gap:16px;padding:8px 0;min-width:0}
.account-server-identity>.account-avatar{width:56px;height:56px;flex:none;margin:0;border-radius:50%;font-size:22px;background:var(--accent-soft);color:var(--accent-ink);border:0}
.account-server-identity>div{min-width:0}
.account-server-identity h3{margin:0 0 4px;text-align:left;font-size:21px;line-height:1.4;font-weight:550;letter-spacing:-.4px;overflow-wrap:anywhere}
.account-server-identity .account-email{text-align:left;font-size:14px;line-height:1.5;overflow-wrap:anywhere}
.account-server-status{display:flex;align-items:center;gap:10px;padding:14px 16px;border-radius:16px;background:var(--accent-soft);color:var(--accent-ink);font-size:13px;line-height:1.5}
.account-server-status>svg{flex:none}
.account-server-group{display:grid;gap:10px;min-width:0}
.account-server-group>h3{margin:0;padding-inline:4px;text-align:left;font-size:13px;font-weight:500;line-height:1.5;color:var(--muted)}
.account-server-rows{border-radius:18px;background:var(--surface);min-width:0}
.account-server-row{display:grid;grid-template-columns:20px minmax(0,1fr) 18px;align-items:center;gap:14px;position:relative;width:100%;min-height:58px;padding:16px;text-align:left;color:var(--text);background:transparent;border:0;border-radius:0;font:inherit}
.account-server-rows>:first-child{border-start-start-radius:18px;border-start-end-radius:18px}
.account-server-rows>:last-child{border-end-start-radius:18px;border-end-end-radius:18px}
.account-server-rows>*+*:before{content:'';position:absolute;top:0;left:50px;right:16px;height:1px;background:var(--line);pointer-events:none}
.account-server-row>svg{color:var(--muted);flex:none}
.account-server-row>span{display:grid;gap:3px;min-width:0}
.account-server-row strong{font-size:14px;font-weight:550;line-height:1.5;overflow-wrap:anywhere}
.account-server-row small{font-size:12px;line-height:1.5;color:var(--muted)}
.account-server-row.is-danger,.account-server-row.is-danger>svg{color:var(--danger)}
.account-server-row:active{background:var(--surface-2)}
.account-server-providers{padding:16px;position:relative}
.account-server-providers>span{font-size:13px;line-height:1.5;color:var(--muted)}
.account-server-providers .account-provider-list{justify-content:flex-start;flex-wrap:wrap;margin:10px 0}
.account-server-providers .account-provider-list>span{border:0;background:var(--control);font-size:13px;line-height:1.5;padding:7px 10px;border-radius:10px}
.account-server-providers>p{font-size:12px;line-height:1.6}

.account-server-delete-note{display:flex;align-items:flex-start;gap:12px;color:var(--danger)}
.account-server-delete-note>svg{flex:none;margin-top:2px}
.account-server-delete-note>p{color:var(--text)}
.account-server-content [data-account-form=delete-account] .auth-submit.primary{background:var(--danger)!important;border-color:var(--danger)!important;color:var(--on-danger)!important}
.account-server-content .account-server-cancel{background:transparent;border:0;color:var(--muted)}
@media(prefers-reduced-motion:reduce){.auth-server-page *, .account-server-card *{animation:none!important;transition:none!important}}

/* Account sheets share the compact centered header used throughout the app. */
.account-server-overlay .account-server-card>header{display:grid;grid-template-columns:48px minmax(0,1fr) 48px;min-height:56px;margin:0;padding:4px 12px;border:0;gap:6px}
.account-server-card>header>h2{grid-column:2;grid-row:1;text-align:center;font-size:18px;line-height:1.4;overflow-wrap:anywhere}
.account-server-card>header>h2:focus-visible{outline:none}
.account-server-card>header .account-server-back{grid-column:1;grid-row:1}
.account-server-card>header .account-server-close{grid-column:3;grid-row:1}
.auth-server-page .auth-field input:focus-visible,.account-server-content .auth-field input:focus-visible{outline:2px solid var(--accent-graphic);outline-offset:2px}
.auth-server-page .auth-field input[aria-invalid=true],.account-server-content .auth-field input[aria-invalid=true]{outline:2px solid var(--danger);outline-offset:2px}
.account-server-content .account-actions>.btn,.account-server-content .recovery-code{border:0}

/* Use the chosen app colour and keep secondary actions comfortably tappable. */
.auth-server-page .auth-submit,.account-server-content .auth-submit{background:var(--accent)!important;color:var(--accent-contrast)!important}
.auth-server-page .auth-help[data-account=local]{display:flex;width:100%;padding:14px 16px!important;background:var(--surface);color:var(--text)!important;border:0}
.auth-server-page .auth-tabs>.btn{min-width:0;white-space:normal;overflow-wrap:normal}
.auth-server-page .auth-server-brand{padding-block:8px;margin-bottom:24px}
.auth-server-brand .rhythm-logo{width:44px;height:38px}
.auth-server-page .google-button>svg{flex:none}

.account-email-consent{display:flex;align-items:flex-start;gap:12px;line-height:1.6;white-space:normal}
.account-email-consent>input{flex:none;width:22px;height:22px;margin-top:3px}
.account-email-consent>span{min-width:0;overflow-wrap:anywhere}
[data-account-screen=email-settings] .account-server-group>p{line-height:1.6}
[data-account-screen=email-settings] .btn{white-space:normal;min-height:44px}

.auth-server-brand>.morrown-auth-brand{display:block;width:104px;height:70px;flex:none;margin:-6px 0}
@media(max-width:359px){.auth-server-brand>.morrown-auth-brand{width:88px;height:64px}}

/* Review revision 2 — profile and contact preferences share the app's grouped rows. */
.account-server-card[data-account-screen="account"] .account-server-content{gap:22px;padding-top:16px}
.account-profile-hero{position:relative;isolation:isolate;padding:21px 19px 14px;background:var(--surface);border:1px solid color-mix(in srgb,var(--line) 70%,transparent);border-radius:25px;overflow:hidden}
.account-profile-hero::before{content:'';position:absolute;z-index:-1;right:-58px;top:-75px;width:190px;height:190px;border:27px solid color-mix(in srgb,var(--accent) 5%,transparent);border-radius:46% 54% 40% 60%;transform:rotate(-22deg)}
.account-profile-hero .account-server-identity{gap:17px;padding:0 0 17px;align-items:center;flex-wrap:wrap}
.account-profile-hero .account-server-identity>div{flex:1 1 max-content;max-width:100%}
.account-profile-photo{position:relative;flex:none;display:grid;place-items:center;border:0;padding:0;background:none;color:inherit;border-radius:50%;cursor:pointer}
.account-profile-hero .account-avatar{display:grid;place-items:center;width:68px;height:68px;min-width:68px;margin:0;border-radius:24px;color:var(--accent-ink);background:color-mix(in srgb,var(--accent) 12%,var(--surface));font-size:28px;font-weight:650;border:1px solid color-mix(in srgb,var(--accent) 15%,transparent);overflow:hidden}
.account-profile-hero .account-avatar img{width:100%;height:100%;object-fit:cover}
.account-photo-edit{position:absolute;right:-5px;bottom:-3px;display:grid;place-items:center;width:26px;height:26px;border:3px solid var(--surface);border-radius:50%;background:var(--accent);color:var(--accent-contrast)}
.account-profile-hero .account-identity-name{display:block}
.account-profile-hero h3{font-size:23px;font-weight:650;letter-spacing:-.6px;margin-bottom:3px}
.account-profile-hero .account-email{font-size:12px;line-height:1.45}
.account-profile-hero [data-profile-plan]{display:inline-flex;margin-top:10px}
.account-profile-hero [data-profile-plan]:empty{display:none}
.account-profile-hero .account-server-status{padding:12px 0 0;border-top:1px solid var(--line);border-radius:0;background:none;color:var(--muted);font-size:11px;gap:6px}
.account-profile-hero .account-server-status>svg{color:var(--success,var(--accent-ink))}
.account-server-card[data-account-screen="account"] .account-server-group>h3{font-size:11px;font-weight:650;letter-spacing:.04em;padding-left:14px}
.account-server-card[data-account-screen="account"] .account-server-rows{border:1px solid color-mix(in srgb,var(--line) 50%,transparent);border-radius:20px;overflow:hidden}
.account-server-card[data-account-screen="account"] .account-server-row{min-height:65px;padding:16px;gap:12px;grid-template-columns:25px minmax(0,1fr) 16px}
.account-server-card[data-account-screen="account"] .account-server-row strong{font-weight:550;font-size:14px}
.account-server-card[data-account-screen="account"] .account-server-row small{font-size:11px}
.account-server-card[data-account-screen="account"] .account-server-row>svg:first-child{width:22px;height:22px;color:var(--accent-ink)}
.account-server-card[data-account-screen="account"] .account-server-row.is-danger>svg:first-child{color:var(--danger)}
.account-server-card[data-account-screen="account"] .account-subscription-row>svg:first-child{width:27px;height:27px;color:var(--accent-ink)}
.account-login-method{display:flex;gap:12px;justify-content:space-between;padding:0 14px;margin-top:-10px;font-size:11px;line-height:1.5;color:var(--muted)}
.account-login-method>span:last-child{color:var(--text);text-align:right}
.account-email-summary{display:flex;align-items:center;gap:13px;padding:20px 16px;border-radius:22px;background:var(--surface);border:1px solid color-mix(in srgb,var(--line) 60%,transparent);min-width:0}
.account-email-symbol{display:grid;place-items:center;flex:none;width:46px;height:46px;border-radius:16px;color:var(--accent-ink);background:var(--accent-soft)}
.account-email-summary>div{display:grid;gap:5px;min-width:0}
.account-email-summary>div>span{font-size:11px;color:var(--muted)}
.account-email-summary strong{font-size:14px;line-height:1.5;font-weight:600;overflow-wrap:anywhere}
.account-email-summary small{display:inline-flex;align-items:center;gap:4px;font-size:11px;color:var(--muted)}
.account-email-summary small.is-verified{color:var(--success,var(--accent-ink))}
.account-email-security{display:grid;gap:10px;padding:0 4px}
.account-email-security>div{display:flex;align-items:center;gap:9px}
.account-email-security h3{margin:0;font-size:14px;font-weight:600;text-align:left}
.account-email-security-symbol{display:grid;place-items:center;color:var(--muted)}
.account-email-security p{font-size:12px;line-height:1.65}
.account-email-security [data-email-status]:empty{display:none}
.account-newsletter-card{padding:20px 17px;border-radius:22px;background:var(--surface);border:1px solid color-mix(in srgb,var(--line) 60%,transparent)}
.account-newsletter-card form{gap:15px}
.account-newsletter-toggle{display:flex;align-items:center;justify-content:space-between;gap:15px;cursor:pointer}
.account-newsletter-toggle>span{display:grid;gap:5px;min-width:0}
.account-newsletter-toggle strong{font-size:15px;line-height:1.4;font-weight:650}
.account-newsletter-toggle small{font-size:12px;line-height:1.4;color:var(--muted)}
.account-newsletter-toggle input{appearance:none;-webkit-appearance:none;position:relative;flex:none;display:block;width:46px!important;height:28px!important;min-height:28px!important;margin:0!important;padding:0!important;border:0!important;border-radius:20px!important;background:var(--control)!important;cursor:pointer;transition:background .2s}
.account-newsletter-toggle input::after{content:'';position:absolute;top:4px;left:4px;width:20px;height:20px;border-radius:50%;background:var(--surface);box-shadow:0 1px 3px #0002;transition:transform .2s}
.account-newsletter-toggle input:checked{background:var(--accent)!important}
.account-newsletter-toggle input:checked::after{transform:translateX(18px);background:var(--accent-contrast)}
.account-newsletter-toggle input:disabled{opacity:.4;cursor:default}
.account-newsletter-card .account-newsletter-state{font-size:11px;color:var(--accent-ink);padding:9px 11px;background:color-mix(in srgb,var(--accent) 6%,var(--surface));border-radius:10px}
.account-newsletter-card .account-newsletter-consent{font-size:12px;line-height:1.65}
.account-newsletter-card .auth-submit{min-height:48px!important;font-size:14px!important;margin-top:2px}
@media(max-width:360px){.account-profile-hero{padding:18px 15px 13px}.account-profile-hero .account-server-identity{gap:12px}.account-profile-hero .account-avatar{width:58px;height:58px;min-width:58px;border-radius:20px}.account-profile-hero h3{font-size:21px}.account-email-summary{padding:16px 13px;gap:10px}.account-email-symbol{width:38px;height:38px}.account-email-summary strong{font-size:13px}}
/* Recording 5.0.56: one clear account entry, readable brand and tighter forms. */
.auth-server-page{padding-top:16px;align-content:start}
.auth-server-page .auth-server-brand{position:relative;justify-content:center;padding:0;margin:0 0 18px;min-height:64px}
.auth-server-brand>.morrown-auth-brand{width:min(60vw,220px);height:77px;margin:0}
.auth-entry-back{position:absolute;left:0;top:50%;transform:translateY(-50%);width:44px;min-width:44px;min-height:44px;padding:10px!important}
.auth-server-page .auth-intro{margin-bottom:16px}
.auth-server-page .auth-intro h1{font-size:26px}
.auth-server-page .auth-tabs{margin-bottom:16px}
.auth-server-page form{gap:16px}
.auth-entry-page{display:flex;flex-direction:column;justify-content:flex-start;max-width:480px;padding-top:24px;gap:8px}
.auth-entry-page .auth-server-brand{margin:0}
.auth-entry-page .morrown-auth-brand{width:min(72vw,290px);height:102px}
.auth-entry-content{display:flex;flex-direction:column;align-items:center;min-width:0}
.morrown-auth-welcome{display:block;width:min(100%,330px);height:clamp(180px,28svh,240px);margin:4px auto 14px}
.auth-entry-content h1{font:600 24px/1.35 Manrope,system-ui;letter-spacing:-.5px;text-align:center;margin:0 0 24px}
.auth-entry-actions{width:100%;max-width:380px}
.auth-entry-page .google-button{min-height:56px;font-size:16px}
.auth-entry-register{width:100%;min-height:52px;white-space:normal;font-size:15px;line-height:1.5;margin-top:8px;color:var(--accent-ink)}
.auth-entry-page .auth-error:not(:empty){margin-top:14px}
@media(max-height:650px){.auth-entry-page{padding-top:12px}.auth-entry-page .morrown-auth-brand{height:78px;width:230px}.morrown-auth-welcome{height:150px}.auth-entry-content h1{margin-bottom:16px}}
