/* Account views share the quiz's blue scene, type, controls and flat list rhythm. */
.auth-controls{gap:10px}
.account-entry[hidden]{display:none!important}
body:has(.account-dialog[open])>header,
body:has(.account-dialog[open])>main,
body:has(.account-dialog[open])>footer{visibility:hidden}
body:has(.account-dialog[open]) .rankino-scene{opacity:.28}
.account-dialog{
  --account-muted:#c7ddff;
  --account-line:var(--line);
  position:fixed;inset:0;width:100%;height:100dvh;max-width:none;max-height:none;
  margin:0;padding:0;border:0;border-radius:0;background:transparent;color:var(--ink);
  color-scheme:dark;overflow:hidden;
  font:500 14px/1.6 SnapshotSans,"Hiragino Kaku Gothic ProN","Yu Gothic",sans-serif;
}
.account-dialog::backdrop{background:#051c6826}
.account-shell{
  display:flex;flex-direction:column;width:min(100%,760px);height:100%;margin:auto;
  padding:env(safe-area-inset-top) 28px env(safe-area-inset-bottom);
}
.account-header{display:flex;align-items:center;justify-content:space-between;gap:20px;min-height:72px;flex-shrink:0}
.account-wordmark{object-fit:contain;filter:brightness(0) invert(1)}
.account-heading{padding:20px 0 26px;flex-shrink:0}
.account-heading h2{margin:12px 0 0;font:700 clamp(30px,7.7vw,44px)/1.25 SnapshotSans,sans-serif;letter-spacing:-.065em}
.account-eyebrow{display:flex;align-items:center;gap:8px;color:#c7e7ff;font:600 10px/1.4 RankinoDisplay,sans-serif;letter-spacing:.14em}
.account-eyebrow>span{width:6px;height:6px;border-radius:50%;background:#bdf5d5;box-shadow:0 0 12px #bdf5d550}
.account-button{
  position:relative;display:inline-flex;align-items:center;justify-content:center;gap:9px;
  min-height:48px;padding:11px 16px;overflow:hidden;border:1px solid #ffffff65;border-radius:18px;
  background:#ffffff12;color:#fff;font:700 13px/1.5 RankinoDisplay,SnapshotSans,sans-serif;
  white-space:nowrap;transition:transform 240ms cubic-bezier(.16,1,.3,1),background 240ms,border-color 240ms,box-shadow 240ms;
}
.account-button svg{width:18px;height:18px;flex-shrink:0;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.account-button:hover{background:#ffffff20;border-color:#ffffffaa;transform:translateY(-2px)}
.account-button:active{transform:scale(.985)}
.account-button:focus-visible,
.account-dialog input:focus-visible,
.account-dialog select:focus-visible,
.account-tabs button:focus-visible,
.account-question summary:focus-visible{outline:3px solid #a7e3ff;outline-offset:4px}
.account-button:disabled,.account-tabs button:disabled{opacity:.55;cursor:wait;transform:none}
.account-button-primary{border-color:#fff;background:#fff;color:#173ec1;box-shadow:0 12px 35px #00144322}
.account-button-primary:after{content:"";position:absolute;inset:-1px;background:linear-gradient(115deg,transparent 25%,#b9e6ff55 50%,transparent 75%);transform:translateX(-110%);transition:transform .6s cubic-bezier(.16,1,.3,1);pointer-events:none}
.account-button-primary:hover{background:#eff6ff;border-color:#fff;box-shadow:0 16px 44px #00144332}
.account-button-primary:hover:after{transform:translateX(110%)}
.account-button-text{border-color:transparent;background:transparent;color:var(--account-muted);box-shadow:none;padding-inline:10px}
.account-button-text:hover{border-color:transparent;background:#ffffff0c;color:#fff}
.account-close{width:44px;height:44px;min-height:44px;padding:0;border-color:#ffffff38;border-radius:50%;background:#ffffff08}
.account-close svg{width:20px;height:20px}
.account-tabs{display:grid;grid-template-columns:repeat(3,1fr);gap:3px;padding:3px;border:1px solid #ffffff2b;border-radius:12px;background:#031a593d;flex-shrink:0}
.account-tabs button{min-height:40px;padding:8px 12px;border:0;border-radius:9px;background:transparent;color:#d7e7ff;font:700 14px/1.4 SnapshotSans,sans-serif;transition:background 160ms,color 160ms}
.account-tabs button[aria-selected="true"]{background:#fff;color:#1842bd;box-shadow:0 2px 8px #00104422}
.account-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;min-height:56px;color:var(--account-muted);font-size:12px;flex-shrink:0}
.account-toolbar>span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.account-refresh{min-height:40px;padding:8px 0 8px 12px;border-color:transparent;background:transparent;color:var(--account-muted);font-size:12px}
.account-refresh:hover{background:transparent;border-color:transparent;color:#fff;transform:none}
.account-refresh svg{width:15px;height:15px}
.account-notice{margin:0 0 16px;padding:11px 14px;max-height:90px;overflow:auto;border:1px solid #9fe9ff50;border-radius:12px;background:#96e4ff18;color:#e2f6ff;font-size:12px;flex-shrink:0}
.account-notice-error{border-color:#ffb4c955;background:#cf2f6326;color:#ffd4df}
.account-notice[hidden]{display:none}
.account-panel{min-height:0;flex:1;overflow:auto;overscroll-behavior:contain;overflow-anchor:none;padding:6px 4px 32px 0;scrollbar-width:thin;scrollbar-color:#b4eaff40 transparent}
.account-panel::-webkit-scrollbar{width:3px}
.account-panel::-webkit-scrollbar-thumb{background:#b4eaff40;border-radius:3px}
.account-panel:focus-visible{outline:2px solid #a7e3ff;outline-offset:-2px}
.account-panel h3{margin:0;font:700 18px/1.4 SnapshotSans,sans-serif;letter-spacing:-.03em}
.account-panel p{margin:0}
.account-section-heading{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:18px}
.account-section-heading p{font-size:12px;line-height:1.6;color:var(--account-muted);margin-top:6px}
.account-count{display:inline-block;margin-left:8px;color:var(--account-muted);font:500 12px RankinoDisplay,SnapshotSans,sans-serif;letter-spacing:0;white-space:nowrap}
.account-list{list-style:none;margin:0;padding:0}
.account-card{min-width:0;padding:22px 0;border:0;border-bottom:1px solid var(--account-line);border-radius:0;background:transparent;box-shadow:none}
.account-card:first-child{padding-top:8px}
.account-history-card{display:flex;align-items:center;justify-content:space-between;gap:16px}
.account-exam{font:700 12px/1.5 RankinoDisplay,SnapshotSans,sans-serif;color:#c7e7ff;letter-spacing:.02em}
.account-date{font-size:11px;color:var(--account-muted);margin-top:6px!important}
.account-card-caption{font-size:13px;margin-top:9px!important;color:#e5eeff}
.account-history-score{display:grid;justify-items:end;gap:8px}
.account-history-score>strong{font:700 38px/1.1 RankinoDisplay,sans-serif;letter-spacing:-.065em;font-variant-numeric:tabular-nums}
.account-history-score small,.account-detail-hero small{font:500 14px SnapshotSans,sans-serif;letter-spacing:0;margin-left:4px;color:var(--account-muted)}
.account-history-score .account-button{min-height:36px;padding:6px 12px;font-size:12px;border-color:#ffffff38;border-radius:12px}
.account-history-filter{display:flex;align-items:center;gap:14px;margin:20px 0}
.account-history-filter label{font-size:12px;color:var(--account-muted)}
.account-history-filter select{min-width:0;min-height:44px;padding:10px 36px 10px 14px;border:1px solid #ffffff65;border-radius:12px;background:#051c684d;color:#fff;font:600 14px/1.4 RankinoDisplay,SnapshotSans,sans-serif}
.account-history-filter option{background:#102e85;color:#fff}
.account-history-filter select:disabled{opacity:.55;cursor:wait}
.account-performance{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px;margin:24px 0 16px;padding:0 0 24px;border-bottom:1px solid var(--account-line)}
.account-performance>div{min-width:0}
.account-performance dt{font-size:12px;color:var(--account-muted);margin-bottom:10px}
.account-performance dd{margin:0;font:700 clamp(32px,7vw,52px)/1.1 RankinoDisplay,sans-serif;letter-spacing:-.06em;font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.account-performance small{margin-left:4px;font:500 12px SnapshotSans,sans-serif;color:var(--account-muted);letter-spacing:0}
.account-performance-note{margin-bottom:28px!important;color:var(--account-muted);font-size:11px;line-height:1.8}
.account-section-heading h3{overflow-wrap:anywhere}
.account-empty{padding:44px 6px 24px;text-align:center}
.account-empty strong{display:block;font:700 24px/1.5 SnapshotSans,sans-serif;letter-spacing:-.045em;margin-bottom:12px}
.account-empty p{max-width:340px;margin:auto;font-size:13px;color:var(--account-muted);line-height:1.9}
.account-empty+.account-button{display:flex;width:min(100%,340px);margin:0 auto 24px;min-height:48px}
.account-loading{padding:60px 0;text-align:center;color:var(--account-muted)}
.account-detail-back{margin-bottom:18px}
.account-detail-back .account-button{border-color:transparent;background:transparent;color:var(--account-muted);padding-left:0}
.account-detail-hero{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:12px 0 30px;border-bottom:1px solid var(--account-line);margin-bottom:30px}
.account-detail-hero h3{font-size:24px;margin:8px 0}
.account-detail-hero p{font-size:12px;color:var(--account-muted)}
.account-detail-hero>strong{font:700 clamp(48px,12vw,72px)/1 RankinoDisplay,sans-serif;letter-spacing:-.075em}
.account-fields{margin-bottom:32px}
.account-fields h3{margin-bottom:18px}
.account-field{margin-top:16px}
.account-field>div{display:flex;justify-content:space-between;gap:12px;font-size:13px;margin-bottom:8px}
.account-field strong{font:600 13px RankinoDisplay,sans-serif;color:var(--account-muted)}
.account-field progress{display:block;width:100%;height:5px;appearance:none;border:0;border-radius:5px;overflow:hidden;background:#ffffff1a;color:#a7e3ff}
.account-field progress::-webkit-progress-bar{background:#ffffff1a}
.account-field progress::-webkit-progress-value{background:#a7e3ff;border-radius:5px}
.account-field progress::-moz-progress-bar{background:#a7e3ff;border-radius:5px}
.account-question-list{display:grid;gap:10px}
.account-question{border:1px solid #ffffff35;border-radius:14px;background:#ffffff0c;padding:16px}
.account-question summary{display:flex;align-items:center;gap:10px;font-size:13px;cursor:pointer;list-style:none;min-height:28px}
.account-question summary::-webkit-details-marker{display:none}
.account-question summary::after{content:'＋';margin-left:auto;color:#c7e7ff}
.account-question[open] summary::after{content:'−'}
.account-answer-tag{padding:3px 7px;border-radius:6px;background:#cf2f6326;color:#ffd4df;font-size:11px;font-weight:700;flex-shrink:0}
.account-answer-tag.is-correct{background:#96e4ff18;color:#c7f2ff}
.account-question-text{margin-top:20px!important;font-size:16px;font-weight:600;line-height:1.8;white-space:pre-line;overflow-wrap:anywhere}
.account-answer-options{padding:0;list-style:none;display:grid;gap:8px;margin:18px 0}
.account-answer-options li{display:flex;align-items:flex-start;gap:10px;background:#051c684d;padding:11px 14px;border:1px solid #ffffff2e;border-radius:12px;font-size:14px;overflow-wrap:anywhere}
.account-answer-options li>span{font-family:RankinoDisplay,sans-serif;font-weight:700;color:#c7ddff}
.account-answer-options li.is-correct{background:#96e4ff18;border-color:#9fe9ff70}
.account-answer-options li.is-selected:not(.is-correct){background:#cf2f6311;border-color:#ffb4c955}
.account-answer-options b{display:inline-block;margin-left:7px;font-size:11px;font-weight:700;color:#b4eaff}
.account-answer-options .is-selected:not(.is-correct) b{color:#ffd4df}
.account-explanation{padding-top:18px;border-top:1px solid var(--account-line);font-size:15px;line-height:1.85;white-space:pre-line;overflow-wrap:anywhere}
.account-source{display:inline-block;margin-top:14px;color:#b4eaff;font-size:13px;text-underline-offset:3px}
.account-connect{display:grid;gap:24px;padding-bottom:28px;border-bottom:1px solid var(--account-line)}
.account-code-card h3,.account-form>label{font:700 13px/1.5 SnapshotSans,sans-serif;letter-spacing:0}
.account-code-card>p{color:var(--account-muted);font-size:12px;margin-top:6px}
.account-code-row{display:flex;align-items:center;gap:12px;margin-top:12px}
.account-code-row input{width:0;flex:1;min-width:0;min-height:44px;padding:0;background:transparent;border:0;border-radius:4px;color:#fff;font:500 clamp(12px,3.5vw,17px)/1.4 SnapshotMono,monospace;letter-spacing:.025em;text-overflow:clip}
.account-copy{width:44px;height:44px;min-height:44px;padding:0;border-color:#ffffff38;border-radius:12px}
.account-copy svg{width:19px;height:19px}
.account-form>label{display:block;margin-bottom:12px}
.account-form>div{display:flex;gap:10px}
.account-form input{width:0;flex:1;min-width:0;min-height:48px;padding:11px 14px;border:1px solid #ffffff35;border-radius:18px;background:#051c684d;color:#fff;font:500 16px/1.4 RankinoDisplay,SnapshotSans,sans-serif}
.account-form input::placeholder{font:500 13px SnapshotSans,sans-serif;color:#c7ddff}
.account-section{margin-top:28px}
.account-section>h3{margin-bottom:16px}
.account-section>h3>span{font:500 12px RankinoDisplay,SnapshotSans,sans-serif;color:var(--account-muted);margin-left:8px}
.account-person{display:flex;align-items:center;gap:14px}
.account-avatar{display:grid;place-items:center;width:44px;height:44px;border-radius:50%;border:1px solid #d9efff30;background:#b9e4ff24;color:#d9f2ff;font-weight:700;font-size:17px;flex-shrink:0}
.account-person-name{flex:1;min-width:0;overflow-wrap:anywhere}
.account-person-name strong,.account-friend .account-person-name{font:600 18px/1.4 RankinoDisplay,SnapshotSans,sans-serif;letter-spacing:-.025em}
.account-person-name>span{display:block;font-size:12px;color:var(--account-muted);margin-top:4px}
.account-card-actions{display:flex;gap:10px;flex-wrap:wrap}
.account-friend-actions{display:grid;gap:12px;margin:16px 0 0 58px;min-width:0}
.account-friend-actions .account-challenge{margin:0;padding:0}
.account-challenge{display:flex;gap:10px;margin-top:16px;padding-left:58px}
.account-challenge select{flex:1;min-width:0;min-height:48px;border:1px solid #ffffff35;border-radius:18px;padding:10px 32px 10px 14px;background:#051c684d;color:#fff;font:600 16px/1.4 RankinoDisplay,SnapshotSans,sans-serif}
.account-challenge option{background:#102e85;color:#fff}
.account-remove-confirm{margin:14px 0 0 58px}
.account-remove-confirm p{font-size:13px;margin-bottom:12px}
.account-remove-confirm .account-button{margin-right:8px}
.account-battle{padding-block:28px}
.account-battle-heading{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}
.account-battle h3{font-size:26px;letter-spacing:-.045em;overflow-wrap:anywhere}
.account-battle-state{display:inline-flex;align-items:center;gap:6px;font-size:11px;color:#d7e7ff;font-weight:600;white-space:nowrap}
.account-battle-state:before{content:"";width:5px;height:5px;border-radius:50%;background:#b4eaff}
.account-battle-state.is-completed{color:#c7f2ff}
.account-battle-state.is-completed:before{background:#b4eaff}
.account-battle .account-card-actions{margin-top:22px}
.account-battle .account-card-actions .account-button-primary{min-width:180px}
.account-battle-wait{margin-top:18px!important;font-size:13px;color:var(--account-muted);line-height:1.8}
.account-battle-scores{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:24px;margin-top:26px;padding:0}
.account-battle-scores>div{min-width:0}
.account-battle-scores>div:last-child{text-align:right}
.account-battle-scores>div>span{display:block;font-size:13px;color:var(--account-muted);overflow-wrap:anywhere;margin-bottom:10px}
.account-battle-scores strong{display:block;font:700 clamp(48px,13vw,76px)/1.05 RankinoDisplay,sans-serif;letter-spacing:-.075em;font-variant-numeric:tabular-nums;white-space:nowrap}
.account-battle-scores small{font:500 12px SnapshotSans,sans-serif;letter-spacing:0;color:var(--account-muted)}
.account-battle-scores>span{font:500 12px RankinoDisplay,sans-serif;letter-spacing:.1em;color:#c7ddff}
.account-footnote{font-size:12px;line-height:1.8;color:var(--account-muted);margin-top:24px!important}
.account-load-more{display:flex;width:100%;margin-top:22px}
.account-sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.account-save-status{display:flex;justify-content:center;align-items:center;gap:8px;flex-wrap:wrap;min-height:20px;font-size:10px;color:#d6e5ff;line-height:1.6;text-align:center}
.account-save-status button{border:0;border-bottom:1px solid #9bbdfa;background:transparent;color:#fff;padding:1px 0;font-size:10px;font-weight:700;line-height:1.6}
.account-save-status button:focus-visible{outline:2px solid white;outline-offset:2px}
.battle-quiz-label{margin:0;text-align:center;font-size:11px;color:#d6e5ff;line-height:1.5}
@keyframes account-enter{from{opacity:0;transform:translateY(14px)}to{opacity:1;transform:translateY(0)}}
.account-dialog[open] .account-heading{animation:account-enter 420ms cubic-bezier(.16,1,.3,1) both}
.account-panel>*,.account-notice:not([hidden]){animation:account-enter 420ms cubic-bezier(.16,1,.3,1) both}
@media(min-width:700px){
  .account-connect{grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:36px;align-items:end}
  .account-code-row input{font-size:12px}
  .account-friend{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:24px;align-items:center}
  .account-challenge{margin:0;padding:0}
  .account-friend-actions{margin:0}
  .account-challenge select{min-width:120px}
  .account-remove-confirm{grid-column:1/-1;margin:0 0 0 58px}
}
@media(max-width:480px){
  .account-shell{padding-inline:max(24px,env(safe-area-inset-left)) max(24px,env(safe-area-inset-right))}
  .account-header{min-height:64px}
  .account-heading{padding:16px 0 22px}
  .account-toolbar{min-height:52px}
  .account-section-heading{align-items:flex-start}
  .account-section-heading>p{font-size:11px}
  .account-section-heading>.account-button{font-size:11px;padding-inline:10px;min-height:40px}
  .account-challenge{padding-left:0}
  .account-friend-actions{margin-left:0}
  .account-challenge .account-button{padding-inline:14px;font-size:12px}
  .account-person.account-card{flex-wrap:wrap}
  .account-person.account-card .account-card-actions{width:100%;padding-left:58px}
  .account-person.account-card>.account-button{margin-left:58px}
  .account-battle-scores{gap:14px}
  .auth-controls{gap:8px}
  .account-entry{font-size:11px;padding-inline:10px}
}
@media(max-width:350px){
  .account-shell{padding-inline:max(20px,env(safe-area-inset-left)) max(20px,env(safe-area-inset-right))}
  .account-wordmark{width:108px;height:36px}
  .account-heading h2{font-size:28px}
  .account-performance{gap:10px}
  .account-performance dt{font-size:11px}
  .account-person{gap:10px}
  .account-challenge{gap:8px}
  .account-challenge select{padding-left:10px}
  .account-challenge .account-button{padding-inline:10px;gap:6px}
  .account-challenge .account-button svg{width:16px}
  .account-form input{padding-inline:10px}
  .account-form .account-button{padding-inline:12px}
  .account-battle h3{font-size:23px}
  .account-battle-scores strong{font-size:44px}
  .account-battle-scores small{font-size:11px}
  .account-battle-scores>span{font-size:10px}
  .account-section-heading>p{max-width:160px;text-align:right}
}
@media(max-height:650px){
  .account-header{min-height:54px}
  .account-heading{padding:8px 0 16px}
  .account-heading h2{font-size:28px;margin-top:8px}
  .account-tabs button{min-height:36px}
  .account-toolbar{min-height:46px}
  .account-panel{padding-top:4px;padding-bottom:24px}
  .account-connect{gap:20px;padding-bottom:22px}
  .account-section{margin-top:22px}
  .account-empty{padding-top:28px}
  .account-save-status,.account-save-status button{font-size:9px}
}
@media(orientation:landscape) and (max-height:500px){
  .account-heading{display:none}
  .account-header{min-height:48px}
  .account-toolbar{min-height:40px}
}
@media(prefers-reduced-motion:reduce){
  .account-dialog *, .account-dialog *:after{animation:none!important;transition:none!important}
  .account-button:hover,.account-button:active{transform:none}
}
