.dojo-account { margin: 20px 0 30px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 22px 0; }
.account-guest { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 22px; align-items: center; }
.google-login-banner { padding: 0; width: 100%; border: 1px solid var(--line); background: #fff; border-radius: 10px; overflow: hidden; color: var(--green); cursor: pointer; }
.google-login-banner img { display: block; width: 100%; height: auto; }
.google-login-banner span { display: block; padding: 13px 10px; font-size: 17px; font-weight: 800; line-height: 1.5; }
.google-login-banner:hover span { text-decoration: underline; text-underline-offset: 4px; }
.google-login-banner:disabled { opacity: .65; cursor: progress; }
.account-intro h2 { font-size: 22px; line-height: 1.6; margin: 0 0 9px; }
.account-intro p, .account-status, .profile-status { font-size: 14px; line-height: 1.8; margin: 8px 0; }
.account-intro a, .account-consent a { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.account-origin-note { color: var(--muted); font-size: 13px; }
.account-status:empty, .profile-status:empty, .account-origin-note:empty { display: none; }
.account-retry, .account-logout, .leaderboard-refresh { min-height: 44px; padding: 8px 15px; background: transparent; border: 1px solid var(--green); border-radius: 6px; color: var(--green); cursor: pointer; font-size: 14px; }
.account-member-heading { display: flex; gap: 14px; align-items: center; }
.profile-avatar-preview { display: block; width: 78px; height: 78px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); background: #fff; flex-shrink: 0; }
.student-identity { min-width: 0; flex: 1; }
.student-identity > strong { font-size: 21px; line-height: 1.6; overflow-wrap: anywhere; }
.google-identity { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 12px; color: var(--muted); line-height: 1.6; margin-top: 6px; }
.google-identity img { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.google-identity span { overflow-wrap: anywhere; }
.profile-editor { margin-top: 22px; }
.profile-editor > summary { min-height: 44px; padding: 10px 0; color: var(--green); font-weight: 800; cursor: pointer; }
.profile-editor form { margin-top: 14px; }
.nickname-label { display: block; font-size: 15px; font-weight: 700; margin: 0 0 8px; }
.student-nickname { width: 100%; min-height: 48px; font: inherit; border: 1px solid var(--line); border-radius: 6px; background: #fff; color: var(--ink); padding: 10px 12px; }
.avatar-fieldset { padding: 0; border: 0; margin: 24px 0; min-width: 0; }
.avatar-fieldset legend { font-size: 15px; font-weight: 700; padding: 0; margin-bottom: 12px; }
.avatar-choices { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 9px; }
.avatar-choice { position: relative; cursor: pointer; display: block; min-width: 0; }
.avatar-choice input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.avatar-choice img { width: 100%; height: auto; aspect-ratio: 1; border-radius: 10px; border: 3px solid transparent; background: #fff; display: block; }
.avatar-choice input:checked + img { border-color: var(--green); }
.avatar-choice input:focus-visible + img { outline: 3px solid var(--red); outline-offset: 3px; }
.account-consent { display: flex; align-items: flex-start; gap: 10px; line-height: 1.8; font-size: 14px; margin-bottom: 20px; }
.account-consent input { width: 20px; height: 20px; margin-top: 3px; flex-shrink: 0; accent-color: var(--green); }
.profile-save { min-height: 48px; border: 0; border-radius: 6px; background: var(--green); color: white; font-weight: 800; padding: 12px 22px; cursor: pointer; }
.profile-local-note { font-size: 13px; line-height: 1.8; color: var(--muted); margin-top: 12px; }
.dojo-leaderboard { margin: 30px 0; padding: 24px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.leaderboard-heading { display: flex; align-items: center; gap: 16px; justify-content: space-between; }
.leaderboard-heading h2 { font-size: 24px; margin: 0; line-height: 1.6; }
.leaderboard-pilot { display: block; font-size: 12px; color: var(--muted); font-weight: 500; margin-top: 5px; }
.leaderboard-tabs { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 22px; }
.leaderboard-tabs button { flex: 1 1 120px; min-height: 46px; padding: 10px 12px; border-radius: 6px; border: 1px solid var(--line); background: transparent; color: var(--ink); cursor: pointer; font-weight: 700; }
.leaderboard-tabs button[aria-pressed=true] { background: var(--green); color: #fff; border-color: var(--green); }
.leaderboard-status { font-size: 14px; line-height: 1.85; color: var(--muted); margin: 20px 0 0; }
.leaderboard-status:empty { display: none; }
.leaderboard-list { list-style: none; padding: 0; margin: 20px 0 0; }
.leaderboard-row { display: grid; grid-template-columns: 26px 56px minmax(0, 1fr) auto; gap: 10px 14px; align-items: center; padding: 17px 0; border-bottom: 1px solid var(--line); }
.leaderboard-position { font-size: 19px; color: var(--green); font-weight: 800; text-align: center; }
.leaderboard-avatar { width: 56px; height: 56px; display: block; border-radius: 50%; object-fit: cover; background: #fff; }
.leaderboard-person { min-width: 0; }
.leaderboard-person strong { display: block; font-size: 17px; line-height: 1.5; overflow-wrap: anywhere; }
.leaderboard-belt { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; margin-top: 5px; }
.leaderboard-belt:before { content: ''; width: 20px; height: 6px; background: var(--belt-color); border: 1px solid #76786d; }
.leaderboard-numbers { display: grid; gap: 4px; justify-items: end; white-space: nowrap; }
.leaderboard-numbers strong { font-size: 17px; color: var(--green); }
.leaderboard-numbers span { font-size: 12px; color: var(--muted); }
.leaderboard-rules { font-size: 12px; line-height: 1.8; color: var(--muted); margin: 18px 0 0; }
.dojo-account button:focus-visible, .dojo-leaderboard button:focus-visible, .student-nickname:focus-visible, .account-consent input:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
@media (max-width: 480px) {
  .account-guest { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .google-login-banner { max-width: 330px; justify-self: center; }
  .account-intro h2 { font-size: 20px; }
  .profile-avatar-preview { width: 60px; height: 60px; }
  .student-identity > strong { font-size: 18px; }
  .account-member-heading { gap: 10px; flex-wrap: wrap; }
  .account-logout { margin-left: auto; }
  .avatar-choices { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
  .avatar-choice img { max-height: 110px; width: auto; max-width: 100%; margin: auto; }
  .profile-save { width: 100%; }
  .leaderboard-heading h2 { font-size: 22px; }
  .leaderboard-refresh { padding-inline: 10px; }
  .leaderboard-row { grid-template-columns: 22px 46px minmax(0, 1fr) auto; gap: 8px; }
  .leaderboard-avatar { width: 46px; height: 46px; }
  .leaderboard-person strong, .leaderboard-numbers strong { font-size: 15px; }
}
