/* Account controls and their two personal timers share a single aligned header. */
.site-shell > .profile-panel {
  grid-template-columns: minmax(195px,228px) 40px minmax(235px,1fr) 138px auto;
  grid-template-areas: "account edit setup language manage" "timers timers identity identity refresh";
  align-items:start;
  gap:12px;
  padding:14px 0;
}
#account-quick-switch {
  display:grid;
  grid-template-columns:auto minmax(0,1fr);
  grid-template-areas:"label name" "buttons buttons";
  align-items:baseline;
  gap:6px 10px;
}
.account-switch-label { grid-area:label; font-size:11px; line-height:16px; }
.account-current-name { grid-area:name; text-align:right; color:#dbc6a1; font-size:11px; line-height:16px; }
.account-switch-buttons { grid-area:buttons; gap:5px; }
.account-mode-button,.account-alt-select { height:40px; min-height:40px; font-size:13px; }
.account-alt-select { flex:0 1 65px; font-size:11px; }
.site-shell > .profile-panel > #edit-current-profile { align-self:end; width:40px; height:40px; }
.site-shell > .profile-panel > .language-control,
.profile-quick-formation { gap:6px; }
.profile-quick-formation > label,
.site-shell > .profile-panel > .language-control > span { font-size:11px; line-height:16px; }
.quick-formation-controls { grid-template-columns:minmax(0,1fr) 40px 40px; }
.profile-panel #quick-formation-select,
.profile-panel #language-select { height:40px; min-height:40px; font-size:13px; }
.profile-panel #language-select { width:100%; max-width:none; min-width:0; }
.site-shell > .profile-panel > .profile-management { align-self:end; }
.site-shell > .profile-panel .profile-management > summary { min-height:40px; display:flex; align-items:center; font-size:12px; }
.site-shell > .profile-panel > #account-timers {
  grid-area:timers;
  position:static;
  z-index:auto;
  min-width:0;
  padding:0;
  background:none;
  backdrop-filter:none;
}
#account-timers .account-timers-chips {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:7px;
  margin:0;
}
#account-timers .account-timer-chip {
  display:grid;
  grid-template-columns:20px minmax(0,1fr) 11px;
  grid-template-rows:auto auto;
  align-content:center;
  min-width:0;
  width:100%;
  min-height:65px;
  gap:3px 6px;
  padding:8px;
}
#account-timers .account-timer-chip > svg { grid-column:1; grid-row:1 / span 2; width:20px; height:25px; }
#account-timers .account-timer-label { grid-column:2; grid-row:1; gap:2px; }
#account-timers .account-timer-label > strong { font-size:11px; line-height:1.25; }
#account-timers .account-timer-label > small { font-size:10px; }
#account-timers .account-timer-value { grid-column:2 / -1; grid-row:2; margin:0; justify-self:start; font-size:12px; letter-spacing:0; line-height:1.25; }
#account-timers .account-timer-pencil { grid-column:3; grid-row:1; margin:0; font-size:11px; align-self:start; }
.site-shell > .profile-panel > .profile-identity-summary,
.site-shell > .profile-panel > .profile-identity-summary.has-player-data { align-self:center; justify-content:flex-start; gap:7px 12px; }
.profile-identity-summary .profile-completion-link { flex:1 1 155px; width:auto; max-width:180px; margin-left:0; }
.profile-identity-summary .profile-completion-heading { font-size:10px; }
.profile-identity-summary .profile-identity-facts { gap:5px 12px; }
.profile-identity-summary .profile-identity-badges { gap:5px; }
.profile-identity-summary .profile-badge { width:24px; height:24px; }
.profile-identity-summary .profile-badge img { width:23px; height:23px; }
.site-shell > .profile-panel > .profile-data-refresh { align-self:center; max-width:190px; width:100%; gap:2px 6px; }
#profile-data-refresh #refresh-profile-data { width:30px; height:30px; padding:7px; }
#profile-data-refresh .profile-data-mode { font-size:9px; }
#profile-data-refresh #profile-data-updated,
#profile-data-refresh #profile-data-checked { font-size:10px; line-height:1.5; }
#profile-refresh-status { max-width:100%; font-size:10px; line-height:1.4; }

/* The emerald title itself is the accessible fold control. */
.commander-overview-heading > div { min-width:0; }
.commander-overview-heading h2 { padding:0; background:none; filter:none; }
.commander-overview-heading .commander-collapse-toggle {
  display:inline-flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  min-height:42px;
  max-width:100%;
  margin:0;
  padding:10px 31px;
  border:0;
  border-radius:0;
  background:url('/game-ui/emerald-title.svg') center / 100% 100% no-repeat;
  color:#fff0c7;
  font:650 17px/1.3 var(--sans);
  text-shadow:0 2px 2px #09170d;
  cursor:pointer;
}
.commander-overview-heading .commander-collapse-toggle:hover { background-color:transparent; filter:brightness(1.16); color:#fff7df; }
.commander-collapse-toggle:focus-visible { outline:2px solid #f0d496; outline-offset:3px; }
.commander-collapse-chevron { display:inline-block; color:#e7d49c; font-size:17px; line-height:1; transform:rotate(0); transition:transform 160ms ease; }
.commander-overview.is-collapsed .commander-collapse-chevron { transform:rotate(-90deg); }
.commander-overview.is-collapsed .commander-overview-heading { border-bottom:0; border-radius:5px; padding-block:8px; }
.commander-overview.is-collapsed .commander-overview-heading p { margin-top:3px; }
#quick-commanders-body[hidden] { display:none; }

@media(max-width:1000px) {
  .site-shell > .profile-panel {
    grid-template-columns:minmax(180px,228px) 40px minmax(0,1fr) auto;
    grid-template-areas:"account edit language manage" "timers timers setup setup" "identity identity identity refresh";
  }
  .site-shell > .profile-panel > .language-control { width:145px; justify-self:end; }
  .site-shell > .profile-panel > .profile-management { align-self:end; }
  .site-shell > .profile-panel > .profile-quick-formation { align-self:center; }
  .profile-identity-summary .profile-completion-link { max-width:200px; }
}
@media(max-width:680px) {
  .site-shell > .profile-panel {
    grid-template-columns:minmax(0,1fr) auto;
    grid-template-areas:"account edit" "timers timers" "setup setup" "language manage" "identity identity" "refresh refresh";
    gap:11px 9px;
    padding-top:11px;
  }
  .site-shell > .profile-panel > .language-control { display:grid; grid-column:1; justify-self:start; width:145px; }
  .site-shell > .profile-panel > .language-control > span { display:none; }
  .site-shell > .profile-panel > .profile-management { grid-column:2; justify-self:end; }
  .site-shell > .profile-panel .profile-management > summary { white-space:nowrap; }
  .site-shell > .profile-panel > .profile-identity-summary,
  .site-shell > .profile-panel > .profile-identity-summary.has-player-data { gap:8px 12px; padding-top:2px; }
  .profile-identity-summary .profile-completion-link { max-width:100%; }
  .site-shell > .profile-panel > .profile-data-refresh { justify-self:start; width:auto; max-width:100%; }
  #profile-refresh-status { grid-column:2; }
  #account-timers .account-timer-chip { min-height:61px; }
  .commander-overview-heading .commander-collapse-toggle { font-size:16px; gap:10px; padding:10px 24px; }
}
@media(prefers-reduced-motion:reduce){.commander-collapse-chevron{transition:none}}
