.account-nav{display:flex;align-items:center;gap:8px;margin-left:12px;flex-shrink:0}.account-nav a{font:600 13px system-ui;text-decoration:none;color:#dcecf9;padding:9px 12px;border:1px solid #34526c;border-radius:9px;white-space:nowrap}.account-nav a:last-child{background:#163c50;border-color:#40748c}.account-nav a:hover{background:#24526a}.account-nav .account-nav-user{max-width:180px;overflow:hidden;text-overflow:ellipsis}.account-shell{max-width:660px;margin:35px auto 80px;padding:0 20px;color:#e7eff7;font-family:system-ui,sans-serif}.account-back,.account-link,.account-footer a{color:#8cd7e9}.account-heading{margin:32px 0 22px}.account-eyebrow{font-size:11px;font-weight:700;letter-spacing:.18em;color:#8cd7e9}.account-heading h1{font-size:clamp(30px,6vw,44px);margin:8px 0;letter-spacing:-.04em}.account-heading p,.account-card p{color:#adbdce;line-height:1.65}.account-card{padding:28px;margin:18px 0;border:1px solid #2d4358;border-radius:16px;background:#101e2c;box-shadow:0 12px 35px #0002}.account-card h2{font-size:21px;margin:0 0 10px}.account-card form{display:grid;gap:11px}.account-card label{font-size:14px;font-weight:600;margin-top:10px}.account-card input:not([type=checkbox]){box-sizing:border-box;width:100%;padding:13px 14px;border:1px solid #3a536b;border-radius:9px;background:#0a1521;color:#fff;font:16px system-ui}.account-card input:focus{outline:2px solid #8cd7e9;outline-offset:2px}.account-check{display:flex;gap:10px;align-items:center;line-height:1.5}.account-check input{width:17px;height:17px}.account-primary,.account-secondary,.account-danger{display:inline-block;border:1px solid transparent;border-radius:9px;padding:12px 18px;font:600 14px system-ui;text-align:center;text-decoration:none;cursor:pointer}.account-primary{background:#89d7e3;color:#09202b;margin-top:9px}.account-primary:hover{background:#b0e8f0}.account-secondary{background:#1b3043;color:#deecf8;border-color:#3b536b}.account-danger{background:#432630;color:#ffd6d6;border-color:#8b4654}.account-card button:disabled{opacity:.55;cursor:wait}.account-link{display:block;margin-top:20px;font-size:14px}.account-note{font-size:13px;margin:6px 0}.account-badge{display:inline-block;font-size:11px;letter-spacing:.1em;border:1px solid #477c88;border-radius:20px;padding:5px 10px;color:#a1dee8;margin-bottom:20px}.account-status{padding:12px 15px;background:#183347;border-radius:9px;line-height:1.5}.account-status:empty{display:none}.account-status[data-error=true]{background:#442731;color:#ffdddd}.account-identity{display:flex;gap:16px;align-items:center;flex-wrap:wrap}.account-identity h2{overflow-wrap:anywhere}.account-identity p{margin:0;font-size:13px}.account-avatar{display:grid;place-items:center;width:48px;height:48px;flex-shrink:0;background:#254e62;color:#b9eff5;border-radius:50%;font-weight:700}.account-footer{text-align:center;font-size:13px;color:#adbdce}.account-shell [hidden]{display:none!important}body:has(.account-shell){background:#09131e}header.navbar:has(.account-nav){flex-wrap:wrap;gap:8px}header.navbar>.account-nav{margin-left:auto}header.navbar>.elo-global-menu{margin-left:auto}header.navbar>.elo-global-menu+.account-nav{margin-left:4px}@media(max-width:560px){.account-card{padding:20px}.account-shell{padding:0 14px}.account-nav{gap:5px}.account-nav a{font-size:12px;padding:8px}.account-nav .account-nav-user{max-width:120px}.account-identity .account-secondary{width:100%}}
body.elo-subpage header.navbar:has(.account-nav){flex-wrap:wrap!important;height:auto!important;gap:8px!important}header.navbar:has(.account-nav){min-height:82px;padding-top:10px;padding-bottom:10px}@media(max-width:560px){header.navbar:has(.account-nav)>.brand{flex:0 0 100%;margin-bottom:4px}header.navbar:has(.account-nav)>.elo-global-menu{margin-left:auto}header.navbar:has(.account-nav)>.account-nav{margin-left:auto}header.navbar:has(.account-nav)>.elo-global-menu+.account-nav{margin-left:0}header.navbar:has(.account-nav) .elo-global-menu summary{min-width:0;max-width:180px;font-size:12px!important;padding:9px!important}}

/* Mobile: account actions belong at the top of the EloFlow chess menu.
   Desktop keeps its existing separate header account links. */
.elo-mobile-account-links{display:none}
@media(max-width:1099px){
 header.navbar>.account-nav{display:none!important}
 header.navbar:has(.account-nav)>.brand{flex:1 1 auto!important;margin:0!important;min-width:0!important}
 header.navbar:has(.account-nav)>.elo-global-menu,
 header.navbar:has(.account-nav)>.mobile-chess-menu{margin-left:auto!important}
 .elo-mobile-account-links{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;margin:0 0 8px;padding:0 0 10px;border-bottom:1px solid #315b75}
 .elo-mobile-account-links a{display:flex!important;align-items:center;justify-content:center;min-width:0;overflow:hidden;text-overflow:ellipsis;padding:11px 8px!important;background:#153e56!important;border:1px solid #397e9b!important;border-radius:9px!important;color:#e5faff!important;font:700 13px system-ui,sans-serif!important;text-decoration:none!important;text-align:center;white-space:nowrap}
 .elo-mobile-account-links a:last-child{background:#207b9b!important;border-color:#67d8e9!important;color:white!important}
 .elo-mobile-account-links a:hover,.elo-mobile-account-links a:focus-visible{background:#286d8a!important;outline:2px solid #75e4f5;outline-offset:1px}
 .elo-mobile-account-links:has(.elo-mobile-account-user){grid-template-columns:minmax(0,1fr)}
 .elo-mobile-account-links .elo-mobile-account-user{overflow-wrap:anywhere;white-space:normal}
}
@media(max-width:700px){
 body:not(.elo-subpage)>header.navbar:has(.account-nav){display:flex!important;flex-wrap:nowrap!important;align-items:center!important;justify-content:space-between!important;min-height:72px!important}
 body:not(.elo-subpage)>header.navbar:has(.account-nav)>.brand{flex:1 1 auto!important;max-width:calc(100% - 95px)!important}
 body:not(.elo-subpage)>header.navbar:has(.account-nav)>.mobile-chess-menu{flex:0 0 auto!important}
}

/* Recovery codes must remain legible on narrow phone screens. */
#recovery-codes-text{white-space:pre-wrap;overflow-wrap:anywhere;user-select:text;max-width:100%;padding:12px;border:1px solid #315b75;border-radius:9px;background:#0b1d2a;line-height:1.7}
#recovery-codes-output button{margin:4px 6px 4px 0}
#recovery-login-panel{margin:18px 0}
#recovery-login-panel summary{cursor:pointer;font-weight:700}

/* One-time cross-device login. The code is readable from a few feet away. */
.qr-login-box{margin-top:16px;padding:18px;border:1px solid #3b536b;border-radius:12px;background:#0b1927;text-align:center}
.qr-login-image{display:flex;justify-content:center;margin:16px auto}
.qr-login-image svg{display:block;max-width:100%;height:auto;border:8px solid #fff;border-radius:8px}
.qr-login-code{font:700 22px ui-monospace,SFMono-Regular,Consolas,monospace;letter-spacing:.12em;color:#b9eff5}
#qr-login-phone .account-primary{width:100%}

/* A scanned QR link is a dedicated approval screen, not the account dashboard. */
.qr-approval-view .account-heading,
.qr-approval-view .account-back,
.qr-approval-view #registration-panel,
.qr-approval-view #login-panel,
.qr-approval-view #profile-panel,
.qr-approval-view #passkey-profile-panel,
.qr-approval-view #recovery-login-panel,
.qr-approval-view #passwordless-migration-panel {display:none!important}
.qr-approval-view .account-shell{max-width:560px;margin-inline:auto}
.qr-approval-view #qr-login-phone:not([hidden]){display:block}
.qr-approval-view #qr-login-phone{text-align:center}
.qr-approval-view #qr-phone-code{display:block;margin:16px auto;font-size:clamp(24px,7vw,34px)}

.qr-approval-view .account-shell > section:not(#qr-login-phone){display:none!important}

/* Readable, separate account settings groups without changing existing forms. */
.account-section-title{border-left:3px solid #55b5d1;padding:3px 0 3px 16px;margin:30px 0 12px}
.account-section-title h2{margin:0 0 5px;color:#c8f2ff;font-size:19px}
.account-section-title p{margin:0;color:#a9c7d8;font-size:13px;line-height:1.5}
.account-section-title+.account-card{margin-top:10px}
.account-card>p:not(.account-note){max-width:64ch}
@media(max-width:600px){.account-card{padding:20px 17px}}

.account-settings-group{border:1px solid #315d77;border-radius:15px;background:#0e2335;margin:18px 0;padding:0 14px}
.account-settings-group>summary{list-style:none;cursor:pointer;padding:19px 10px;font-weight:800;font-size:18px;color:#d8f6ff;display:flex;align-items:center;justify-content:space-between;gap:10px}
.account-settings-group>summary::-webkit-details-marker{display:none}
.account-settings-group>summary:after{content:'+';font-weight:800;font-size:24px;color:#7fe0f2}
.account-settings-group[open]>summary:after{content:'−'}
.account-settings-group>summary:focus-visible{outline:2px solid #7fe0f2;outline-offset:1px;border-radius:8px}
.account-settings-group>.account-section-intro{font-size:13px;color:#a5c5d6;margin:0 10px 12px}
.account-settings-group .account-card{margin:10px 0 16px;padding:22px}
@media(max-width:600px){.account-settings-group{padding:0 9px}.account-settings-group .account-card{padding:18px 13px}}

/* Account profile photo */
.account-avatar.has-photo{background-size:cover;background-position:center;color:transparent}.profile-photo-settings input[type=file]{display:block;max-width:100%;margin:12px 0}.profile-photo-actions{display:flex;flex-wrap:wrap;gap:10px}.profile-photo-actions button{padding:10px 14px}

/* Clickable avatar replaces the separate photo upload box. */
.account-avatar-button{border:2px solid #65cde2;cursor:pointer;font:700 15px system-ui;position:relative;overflow:hidden}.account-avatar-button:hover,.account-avatar-button:focus-visible{outline:3px solid #91e6f5;outline-offset:3px}.account-avatar-button:after{content:'✎';position:absolute;right:0;bottom:0;background:#113449;color:white;border-radius:50%;font-size:12px;width:19px;height:19px;display:grid;place-items:center}.profile-photo-settings input[type=file]{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}.profile-photo-settings #profile-photo-save{display:none}

.account-subheading{font-size:16px;color:#b6e9f4;border-bottom:1px solid #315d77;padding:14px 8px 9px;margin:22px 0 10px}.account-identity .account-avatar-button{padding:0;min-width:48px;min-height:48px}

/* Avatar editing lives only in the avatar dialog, never in account settings. */
.profile-photo-dialog{background:#10283a;color:#e6f6ff;border:1px solid #65b9d4;border-radius:16px;max-width:min(90vw,440px);width:100%;padding:24px;box-shadow:0 20px 70px #0009}
.profile-photo-dialog::backdrop{background:#000a}
.profile-photo-dialog h2{margin:0 0 12px}
.profile-photo-dialog p{color:#b4d4e2}
.profile-photo-dialog input[type=file]{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
.profile-photo-dialog .profile-photo-actions{margin:18px 0}
.profile-photo-dialog button{background:#1b4258;color:#e6f6ff;border:1px solid #5686a1;border-radius:9px;cursor:pointer;padding:11px 14px}
.profile-photo-dialog button:hover{background:#245875}

/* Current page indication is consistent on every mobile navigation menu. */
.mobile-chess-menu nav a[aria-current="page"],.elo-global-menu nav a[aria-current="page"]{background:#247da5!important;border-color:#74e8ff!important;border-left:5px solid #8cf2ff!important;color:#fff!important;box-shadow:inset 3px 0 #8cf2ff!important;font-weight:800!important}

/* 184: The tool links use the same framed tiles as Log in / Sign up. */
@media(max-width:1099px){
 header.navbar .mobile-chess-menu nav > a,
 body.elo-subpage header.navbar .elo-global-menu nav > a{
  display:block!important;
  padding:11px 13px!important;
  margin:0!important;
  background:#153e56!important;
  border:1px solid #397e9b!important;
  border-radius:9px!important;
  color:#e5faff!important;
  text-decoration:none!important;
  font:700 13px system-ui,sans-serif!important;
  box-shadow:none!important;
 }
 header.navbar .mobile-chess-menu nav > a:hover,
 header.navbar .mobile-chess-menu nav > a:focus-visible,
 body.elo-subpage header.navbar .elo-global-menu nav > a:hover,
 body.elo-subpage header.navbar .elo-global-menu nav > a:focus-visible{
  background:#20526b!important;
  border-color:#4d91a9!important;
 }
}
/* Subtle active state on every screen size, without the neon glow. */
header.navbar .mobile-chess-menu nav > a[aria-current="page"],
header.navbar .mobile-chess-menu nav > a.elo-menu-active,
body.elo-subpage header.navbar .elo-global-menu nav > a[aria-current="page"],
body.elo-subpage header.navbar .elo-global-menu nav > a.elo-menu-active{
 background:#1b526b!important;
 border:1px solid #498ba3!important;
 border-radius:9px!important;
 color:#e6f6ff!important;
 font-weight:700!important;
 box-shadow:none!important;
}

/* 185: Keep a visible, moderate active highlight on the homepage menu too. */
header.navbar .mobile-chess-menu nav > a[aria-current="page"],
header.navbar .mobile-chess-menu nav > a.elo-menu-active{
 background:#246784!important;
 border:1px solid #66afc6!important;
 border-left:3px solid #82c9da!important;
 color:#f2fbff!important;
 font-weight:800!important;
 box-shadow:none!important;
}

/* 186: Same active tile on Home and all tool pages.
   Placed last to override the earlier generic tool-link tile rule. */
@media(max-width:1099px){
 header.navbar .mobile-chess-menu nav > a[aria-current="page"],
 header.navbar .mobile-chess-menu nav > a.elo-menu-active,
 body.elo-subpage header.navbar .elo-global-menu nav > a[aria-current="page"],
 body.elo-subpage header.navbar .elo-global-menu nav > a.elo-menu-active{
  background:#246784!important;
  border:1px solid #66afc6!important;
  border-left:3px solid #82c9da!important;
  border-radius:9px!important;
  color:#f2fbff!important;
  font-weight:800!important;
  box-shadow:none!important;
 }
}
