/* Ranking matrix. Scoped here so the other participant pages keep their layout. */
body.ah-scoreboard-page {
  background: #080b0e;
}
.ah-scoreboard-page main {
  background: #080b0e;
}
.ah-scoreboard-page main > .container { max-width: none; }
.ah-score-screen { position: relative; isolation: isolate; }
.ah-score-screen::before {
  content: '';
  position: absolute;
  z-index: -1;
  inset: -32px;
  background: url('./scoreboard-rear-car.png') center top / cover no-repeat;
  pointer-events: none;
}
.ah-score-screen, .ah-score-screen :is(p, a, span, strong, small, button, input, select, time) {
  font-family: Arial, 'Pretendard', sans-serif !important;
}
.ah-score-overview {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: 210px;
  margin: -32px -32px 30px;
  padding: 72px 32px 30px;
  isolation: isolate;
  overflow: hidden;
  background: transparent;
}
.ah-score-overview::before { display: none; }
.ah-score-caption {
  position: absolute;
  top: 28px;
  right: 32px;
  color: #909aaa;
  font-size: 11px;
  letter-spacing: .13em;
  line-height: 1.6;
}
.ah-score-stats { display: flex; align-items: flex-end; gap: 0; }
.ah-score-stats > div { display: flex; flex-direction: column; gap: 2px; padding: 0 30px; border-left: 1px solid #50586980; }
.ah-score-stats > .ah-score-clock { padding: 0 36px 0 0; border: 0; }
.ah-score-stats strong { color: #f0f3f6; font-size: 30px; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; }
.ah-score-stats span { color: #9299a9; font-size: 13px; letter-spacing: .05em; }
.ah-score-clock strong { font-size: clamp(32px, 3.2vw, 48px); line-height: 1; letter-spacing: .025em; }
.ah-score-stats .ah-score-clock span { color: #d1d5df; font-size: 13px; margin-bottom: 8px; }

#ah-pit.ah-pit--board {
  --ah-solved: #4aa8ff;
  --ah-hinted: #f0be58;
  --ah-empty: #414754;
  --ah-line: #ffffff0c;
  display: block;
  height: auto;
  margin: 0 0 28px;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
#ah-pit.ah-pit--board .ah-pit-heading {
  display: flex;
  position: relative;
  justify-content: space-between;
  align-items: center;
  flex-direction: row;
  gap: 20px;
  margin: 0;
  padding: 0 4px 22px;
  border: 0;
  background: transparent;
  box-shadow: none;
}
#ah-pit.ah-pit--board .ah-pit-heading::before { display: none; }
#ah-pit.ah-pit--board .ah-pit-heading h2 {
  margin: 0;
  color: #f4f5f7;
  font-family: 'Pretendard', Arial, sans-serif !important;
  font-size: clamp(25px, 2.4vw, 38px);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: .015em;
}
#ah-pit.ah-pit--board .ah-board-sub { margin: 8px 0 0; color: #8fa3ba; font-size: 15px; line-height: 1.5; }
#ah-pit.ah-pit--board .ah-board-tools { position: relative; flex-shrink: 0; z-index: 140; }
#ah-pit.ah-pit--board .ah-board-tools > summary {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 10px;
  border: 1px solid #ffffff14;
  border-radius: 6px;
  color: #9aa3b6;
  font-size: 12px;
  cursor: pointer;
  list-style: none;
}
#ah-pit.ah-pit--board .ah-board-tools > summary::-webkit-details-marker { display: none; }
#ah-pit.ah-pit--board .ah-board-tools summary svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; }
#ah-pit.ah-pit--board .ah-board-tools[open] > summary { color: #d6f0ff; border-color: #4aa8ff80; }
#ah-pit.ah-pit--board .ah-pit-controls {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 280px;
  padding: 16px;
  border: 1px solid #333b4a;
  border-radius: 8px;
  background: #10161d;
  box-shadow: 0 16px 40px #0008;
}
#ah-pit.ah-pit--board .ah-pit-controls input, #ah-pit.ah-pit--board .ah-pit-controls select { width: 100%; max-width: none; margin: 0; font-size: 13px; }
#ah-pit.ah-pit--board .ah-pit-status { display: block; margin: 0 0 16px; padding: 12px 16px; border: 1px solid #ffffff14; border-radius: 6px; background: #111620; color: #b0bbcd; font-size: 13px; }
#ah-pit.ah-pit--board[data-state='ready'] .ah-pit-status {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
#ah-pit.ah-pit--board[data-state='error'] .ah-pit-status { color: #edc885; border-color: #edc88530; }
#ah-pit.ah-pit--board .ah-pit-scroll {
  position: relative;
  isolation: isolate;
  max-height: min(780px, 72vh);
  min-height: 0;
  padding: 0 !important;
  overflow: auto;
  overscroll-behavior: contain;
  border: 1px solid #ffffff20;
  border-radius: 9px;
  background: #080b10c9;
  scrollbar-width: thin;
  scrollbar-color: #414b61 #0b0f16;
}
#ah-pit.ah-pit--board .ah-pit-scroll:focus-visible { outline: 2px solid #4aa8ff; outline-offset: 4px; }
#ah-pit.ah-pit--board .ah-pit-scroll:has(#ah-lanes:empty) { display: none; }
#ah-pit.ah-pit--board #ah-lanes {
  display: block;
  height: auto;
  min-width: var(--board-min-width, 1050px);
  --ah-cols: minmax(320px, 1.9fr) var(--track-columns);
}
#ah-pit.ah-pit--board #ah-lanes > .ah-track-head,
#ah-pit.ah-pit--board #ah-lanes > .ah-lane {
  display: grid;
  grid-template-columns: var(--ah-cols);
  gap: 0;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-bottom: 1px solid var(--ah-line);
  border-radius: 0;
  box-shadow: none;
  background: transparent;
}
#ah-pit.ah-pit--board #ah-lanes > .ah-track-head { position: sticky; top: 0; z-index: 30; min-height: 78px; background: #0c1015; }
#ah-pit.ah-pit--board #ah-lanes > .ah-lane { min-height: clamp(43px, 4.6vh, 59px); }
#ah-pit.ah-pit--board #ah-lanes > .ah-lane:last-child { border-bottom: 0; }
#ah-pit.ah-pit--board #ah-lanes > .is-rank-1, #ah-pit.ah-pit--board #ah-lanes > .is-rank-2, #ah-pit.ah-pit--board #ah-lanes > .is-rank-3 { background: #4aa8ff0b; }
#ah-pit.ah-pit--board #ah-lanes > .is-rank-3 { border-bottom-color: #ffffff20; }
#ah-pit.ah-pit--board #ah-lanes > .ah-lane:hover { background: #4aa8ff12; }
#ah-pit.ah-pit--board #ah-lanes > .ah-lane.is-me { background: #4aa8ff1b !important; box-shadow: inset 3px 0 #4aa8ff; }
#ah-pit.ah-pit--board .ah-track-head > div,
#ah-pit.ah-pit--board .ah-lane > div { min-width: 0; height: 100%; border: 0; border-left: 1px solid var(--ah-line); border-radius: 0; }
#ah-pit.ah-pit--board .ah-track-head > .ah-head-account,
#ah-pit.ah-pit--board .ah-lane > .ah-lane-account {
  position: static;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 75px;
  align-items: center;
  justify-content: normal;
  gap: 10px;
  padding: 0 22px 0 14px;
  border-left: 0;
  clip-path: none;
  isolation: auto;
  background: transparent !important;
  box-shadow: none;
  text-align: left;
}
#ah-pit.ah-pit--board .ah-head-account::after, #ah-pit.ah-pit--board .ah-lane-account::after { display: none; }
#ah-pit.ah-pit--board .ah-head-account span { color: #8fa3ba; font-family: inherit; font-size: 12px; font-weight: 500; letter-spacing: .045em; }
#ah-pit.ah-pit--board .ah-head-account span:first-child { text-align: center; }
#ah-pit.ah-pit--board .ah-head-account span:last-child { text-align: right; }
#ah-pit.ah-pit--board .ah-track-head > .ah-head-track {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  padding: 16px 20px;
  background: transparent !important;
  box-shadow: none;
  text-align: left;
}
#ah-pit.ah-pit--board .ah-head-track > div { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
#ah-pit.ah-pit--board .ah-head-track > div > span { color: #e7eaf0; font-size: 14px; font-weight: 600; line-height: 1.25; overflow-wrap: normal; }
#ah-pit.ah-pit--board .ah-head-track small { display: block; margin: 0; color: #8790a4; font-family: inherit; font-size: 10px; letter-spacing: .015em; white-space: nowrap; }
#ah-pit.ah-pit--board .ah-position {
  display: inline-grid;
  place-items: center;
  justify-self: center;
  width: 27px;
  height: 27px;
  margin: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  color: #dce0e9;
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}
#ah-pit.ah-pit--board .is-rank-1 .ah-position { color: #f4d680; border-color: #aa8c3d; background: radial-gradient(at 35% 25%, #a18a3b60, #493b172e); box-shadow: inset 0 0 0 1px #d6bb4b30; }
#ah-pit.ah-pit--board .is-rank-2 .ah-position { color: #e4eaf1; border-color: #8793a8; background: radial-gradient(at 35% 25%, #8e99b04d, #3d455a30); box-shadow: inset 0 0 0 1px #c5ccdc20; }
#ah-pit.ah-pit--board .is-rank-3 .ah-position { color: #e0c2a3; border-color: #9d7956; background: radial-gradient(at 35% 25%, #a078504d, #50351e30); box-shadow: inset 0 0 0 1px #c5a27c20; }
#ah-pit.ah-pit--board .ah-lane-name-cell { min-width: 0; }
#ah-pit.ah-pit--board .ah-lane-account .ah-lane-name { display: block; margin: 0; padding: 0; color: #e3e8ef; font-size: 15px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
#ah-pit.ah-pit--board .ah-lane-name:hover { color: #a8cfff; }
#ah-pit.ah-pit--board .ah-lane-score { color: #e3e8ef; font-size: 15px; font-weight: 500; text-align: right; font-variant-numeric: tabular-nums; }
#ah-pit.ah-pit--board .ah-lane-track {
  display: grid;
  grid-template-columns: repeat(var(--problems), 25px);
  align-items: center;
  justify-content: start;
  align-content: center;
  gap: 0;
  padding: 0 20px;
  background: transparent;
}
#ah-pit.ah-pit--board .ah-sector {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  min-width: 0;
  max-width: none;
  min-height: 34px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
}
#ah-pit.ah-pit--board .ah-sector span { display: none; }
#ah-pit.ah-pit--board .ah-sector i, #ah-pit.ah-pit--board .ah-key {
  display: inline-block;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  box-sizing: border-box;
  border: 0;
  border-radius: 50%;
  background: var(--ah-empty);
  box-shadow: inset 0 1px 2px #ffffff09;
  transform: none;
}
#ah-pit.ah-pit--board .ah-sector.is-solved i, #ah-pit.ah-pit--board .ah-key.solved { background: var(--ah-solved); border: 0; box-shadow: inset 0 1px 2px #ffffff15, 0 0 7px #4aa8ff15; }
#ah-pit.ah-pit--board .ah-sector.is-solved.is-hinted i, #ah-pit.ah-pit--board .ah-key.hinted { background: var(--ah-hinted); border: 0; box-shadow: inset 0 1px 2px #ffffff25, 0 0 7px #f0be5815; }
#ah-pit.ah-pit--board .ah-sector.is-unknown i { background: repeating-linear-gradient(135deg, #5b6477 0 2px, #243140 2px 4px); box-shadow: none; }
#ah-pit.ah-pit--board .ah-sector:hover i { transform: scale(1.15); }
#ah-pit.ah-pit--board .ah-sector:focus-visible { outline: 2px solid #c0dcff; outline-offset: 1px; }
#ah-pit.ah-pit--board .ah-board-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding: 22px 4px 0; }
#ah-pit.ah-pit--board .ah-legend { display: flex; flex-wrap: wrap; gap: 28px; padding: 0; color: #8fa3ba; font-size: 12px; }
#ah-pit.ah-pit--board .ah-legend span { display: inline-flex; align-items: center; gap: 10px; }
#ah-pit.ah-pit--board .ah-board-update { display: inline-flex; align-items: center; gap: 12px; margin: 0; padding: 4px 0; border: 0; background: transparent; color: #8c96ab; font-size: 11px; letter-spacing: .07em; cursor: pointer; }
#ah-pit.ah-pit--board .ah-board-update time { min-width: 56px; font-variant-numeric: tabular-nums; }
#ah-pit.ah-pit--board .ah-board-update i { width: 9px; height: 9px; border-radius: 50%; background: #71cba7; box-shadow: 0 0 8px #71cba730; }
#ah-pit.ah-pit--board[data-state='error'] .ah-board-update i, #ah-pit.ah-pit--board[data-state='partial'] .ah-board-update i { background: #f0be58; box-shadow: none; }
#ah-pit.ah-pit--board[data-state='empty'] .ah-board-update i { background: #788398; box-shadow: none; }
#ah-pit.ah-pit--board[data-state='loading'] .ah-board-update i { background: #4aa8ff; box-shadow: none; }
#ah-pit.ah-pit--board .ah-board-update:hover { color: #d6f0ff; }
#ah-pit.ah-pit--board .ah-pit-pagination { display: flex; justify-content: space-between; gap: 14px; padding: 16px 4px 0; border: 0; background: transparent; color: #929bad; font-size: 12px; }
#ah-pit.ah-pit--board .ah-pit-pagination[hidden] { display: none; }
#ah-pit.ah-pit--board .ah-empty { margin: 0; padding: 34px; color: #9aa5b9; }
.ah-ranking-details { margin-top: 24px; }
.ah-ranking-details > summary { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; color: #a4adbd; cursor: pointer; }
.ah-ranking-details > summary small, .ah-ranking-help { color: #788398; font-size: 11px; font-weight: 400; }
.ah-ranking-help { margin: 12px 0; }

@media (min-width: 1600px) {
  #ah-pit.ah-pit--board .ah-lane-track { grid-template-columns: repeat(var(--problems), minmax(25px, 30px)); }
  #ah-pit.ah-pit--board .ah-sector { width: 100%; }
  #ah-pit.ah-pit--board .ah-sector i, #ah-pit.ah-pit--board .ah-key { width: 18px; height: 18px; }
}
@media (max-width: 991px) {
  .ah-score-overview { margin: -24px -24px 26px; padding: 66px 24px 26px; min-height: 180px; }
  .ah-score-stats > div { padding: 0 20px; }
  .ah-score-stats > .ah-score-clock { padding-right: 26px; }
  .ah-score-stats strong { font-size: 24px; }
  .ah-score-clock strong { font-size: 34px; }
  #ah-pit.ah-pit--board .ah-pit-heading { align-items: flex-start; }
  #ah-pit.ah-pit--board .ah-board-sub { max-width: 460px; font-size: 13px; }
  #ah-pit.ah-pit--board .ah-board-footer { padding-top: 18px; }
  #ah-pit.ah-pit--board .ah-legend { gap: 20px; font-size: 11px; }
}
@media (max-width: 575px) {
  .ah-score-overview { margin: -18px -18px 26px; padding: 62px 18px 22px; min-height: 202px; }
  .ah-score-caption { top: 14px; right: 18px; font-size: 9px; }
  .ah-score-stats { flex-wrap: wrap; width: 100%; row-gap: 20px; }
  .ah-score-stats > .ah-score-clock { width: 100%; padding: 0; }
  .ah-score-stats > div { padding: 0 20px; }
  .ah-score-stats > div:nth-child(2) { padding-left: 0; border-left: 0; }
  .ah-score-stats span { font-size: 10px; }
  .ah-score-clock strong { font-size: 36px; }
  .ah-score-stats .ah-score-clock span { font-size: 11px; margin-bottom: 4px; }
  #ah-pit.ah-pit--board .ah-pit-heading { gap: 12px; padding-bottom: 18px; }
  #ah-pit.ah-pit--board .ah-board-tools > summary { padding: 6px 8px; }
  #ah-pit.ah-pit--board .ah-pit-controls { width: min(280px, 85vw); }
  #ah-pit.ah-pit--board .ah-board-sub { font-size: 12px; }
  #ah-pit.ah-pit--board .ah-pit-scroll { max-height: 65vh; border-radius: 7px; }
  #ah-pit.ah-pit--board .ah-board-footer { gap: 18px; }
  #ah-pit.ah-pit--board .ah-legend { gap: 16px; font-size: 10px; }
  #ah-pit.ah-pit--board .ah-legend span { gap: 7px; }
  #ah-pit.ah-pit--board .ah-key { width: 13px; height: 13px; }
  #ah-pit.ah-pit--board .ah-board-update { margin-left: auto; }
  .ah-ranking-details > summary { flex-direction: column; align-items: flex-start; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  #ah-pit.ah-pit--board .ah-sector i { transition: none; }
}

#ah-pit.ah-pit--board .ah-board-scroll-hint { display: none; }
@media (max-width: 767px) {
  #ah-pit.ah-pit--board .ah-board-scroll-hint { display: block; margin: -4px 4px 12px; color: #7e899f; font-size: 10px; }
}

/* The desktop ranking occupies one viewport: overview, heading, ten rows, legend.
   Row height is allocated from the remaining space, never a fixed minimum. */
@media (min-width: 992px) {
  .ah-app.ah-scoreboard-page main {
    --score-inset: clamp(16px, 2.2vh, 30px);
    padding: var(--score-inset) clamp(20px, 2.2vw, 42px) 0;
    min-height: 0;
  }
  .ah-score-screen {
    display: flex;
    flex-direction: column;
    height: calc(100dvh - var(--score-inset) * 2);
    min-height: 0;
  }
  .ah-score-overview {
    flex: 0 0 22%;
    min-height: 0;
    margin: 0;
    padding: 0 12px clamp(16px, 3vh, 36px);
    overflow: visible;
  }
  .ah-score-caption { top: 0; right: 0; font-size: clamp(9px, 1.1vh, 14px); }
  .ah-score-stats > div { padding-inline: clamp(22px, 2.2vw, 48px); }
  .ah-score-stats > .ah-score-clock { padding-right: clamp(32px, 4vw, 80px); }
  .ah-score-stats strong { font-size: clamp(25px, 3.5vh, 42px); }
  .ah-score-clock strong { font-size: clamp(32px, 4.9vh, 60px); }
  .ah-score-stats span, .ah-score-stats .ah-score-clock span { font-size: clamp(10px, 1.65vh, 19px); }
  #ah-pit.ah-pit--board {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: auto;
    margin: 0;
  }
  #ah-pit.ah-pit--board .ah-pit-heading {
    flex: 0 0 auto;
    padding: 0 12px clamp(12px, 2.3vh, 28px);
  }
  #ah-pit.ah-pit--board .ah-pit-heading h2 {
    font-size: clamp(25px, 4vh, 48px);
    font-family: Arial, 'Pretendard', sans-serif !important;
    letter-spacing: .015em;
  }
  #ah-pit.ah-pit--board .ah-board-sub { margin-top: 6px; font-size: clamp(11px, 1.9vh, 22px); }
  #ah-pit.ah-pit--board .ah-board-tools > summary { border-color: transparent; padding: 6px; }
  #ah-pit.ah-pit--board .ah-pit-scroll {
    flex: 1 1 0;
    min-height: 0;
    max-height: none;
    overflow-x: auto;
    overflow-y: hidden;
    background: #080b10b8;
  }
  #ah-pit.ah-pit--board #ah-lanes {
    display: grid;
    grid-template-rows: clamp(48px, 8vh, 96px) repeat(var(--rows), minmax(0, 1fr));
    gap: 0;
    height: 100%;
    min-width: 0;
    --ah-cols: minmax(230px, 1.9fr) repeat(var(--tracks), minmax(0, 1fr));
  }
  #ah-pit.ah-pit--board #ah-lanes > .ah-track-head,
  #ah-pit.ah-pit--board #ah-lanes > .ah-lane {
    min-height: 0;
    height: auto;
    overflow: hidden;
  }
  #ah-pit.ah-pit--board #ah-lanes > .ah-track-head { background: #0b0f14b0; }
  #ah-pit.ah-pit--board .ah-track-head > .ah-head-account,
  #ah-pit.ah-pit--board .ah-lane > .ah-lane-account {
    grid-template-columns: clamp(28px, 3vw, 54px) minmax(0, 1fr) clamp(54px, 5vw, 94px);
    padding: 0 clamp(10px, 1.3vw, 26px);
    gap: clamp(8px, 1vw, 20px);
  }
  #ah-pit.ah-pit--board .ah-head-account span { font-size: clamp(10px, 1.65vh, 19px); }
  #ah-pit.ah-pit--board .ah-track-head > .ah-head-track {
    gap: clamp(7px, 1.2vw, 24px);
    padding: 0 clamp(8px, 1.3vw, 26px);
  }
  #ah-pit.ah-pit--board .ah-head-track > div > span { font-size: clamp(11px, 1.85vh, 22px); }
  #ah-pit.ah-pit--board .ah-head-track small { font-size: clamp(8px, 1.3vh, 15px); }
  #ah-pit.ah-pit--board .ah-position {
    width: clamp(20px, 2.9vh, 35px);
    height: clamp(20px, 2.9vh, 35px);
    font-size: clamp(12px, 1.9vh, 23px);
  }
  #ah-pit.ah-pit--board .ah-lane-account .ah-lane-name,
  #ah-pit.ah-pit--board .ah-lane-score { font-size: clamp(12px, 1.9vh, 23px); }
  #ah-pit.ah-pit--board .ah-lane-track {
    display: grid;
    grid-template-columns: repeat(var(--problems), minmax(0, 1fr));
    gap: clamp(3px, .5vw, 12px);
    padding: 0 clamp(8px, 1.3vw, 26px);
    border-left-color: #ffffff04;
  }
  #ah-pit.ah-pit--board .ah-sector { width: 100%; min-height: 0; height: 100%; }
  #ah-pit.ah-pit--board .ah-sector i,
  #ah-pit.ah-pit--board .ah-key { width: clamp(12px, 1.85vh, 23px); height: clamp(12px, 1.85vh, 23px); }
  #ah-pit.ah-pit--board .ah-board-footer {
    flex: 0 0 auto;
    flex-wrap: nowrap;
    gap: 12px;
    min-height: clamp(40px, 6vh, 72px);
    padding: clamp(10px, 2vh, 24px) 12px 0;
  }
  #ah-pit.ah-pit--board .ah-legend { gap: clamp(20px, 2.7vw, 56px); font-size: clamp(10px, 1.45vh, 17px); }
  #ah-pit.ah-pit--board .ah-board-update { font-size: clamp(9px, 1.4vh, 16px); }
  #ah-pit.ah-pit--board .ah-pit-pagination { padding: 6px 12px 0; }
  #ah-pit.ah-pit--board .ah-empty { grid-row: 2 / -1; }
  .ah-scoreboard-page .ah-ranking-details { margin-top: 32px; }
}

/* Desktop header polish (one-screen board):
   - the overview sizes to its content, with a tighter title-to-stats gap;
   - TIME LEFT / TEAMS / CHALLENGES all put the label on top and share one number size
     and baseline;
   - the EVSE strip and the filter share the row right above the table. Without a strip
     the filter floats just above the table's top-right corner, so no empty row appears;
   - the team column is wider so names aren't cut to "TEST Team...". */
.ah-score-stats > div:not(.ah-score-clock) { flex-direction: column-reverse; }
@media (min-width: 992px) {
  body.ah-app .ah-score-screen .ah-score-overview { flex: 0 0 auto; gap: clamp(10px, 1.6vh, 18px); padding-bottom: clamp(14px, 2.2vh, 26px); }
  body.ah-app .ah-score-screen .ah-score-stats { align-items: flex-end; }
  body.ah-app .ah-score-screen .ah-score-stats > div { gap: 0; }
  body.ah-app .ah-score-screen .ah-score-stats strong,
  body.ah-app .ah-score-screen .ah-score-stats .ah-score-clock strong { font-size: clamp(30px, 4.4vh, 50px); line-height: 1; }
  body.ah-app .ah-score-screen .ah-score-overview .ah-score-stats > div > span { margin: 0 0 clamp(6px, 1vh, 10px); line-height: 1.2; }

  body.ah-app .ah-score-screen #ah-pit.ah-pit--board { position: relative; }
  body.ah-app .ah-score-screen #ah-pit.ah-pit--board .ah-pit-heading {
    position: static;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 0 0 clamp(16px, 2.4vh, 20px);
  }
  /* The filter floats above the table's top-right corner. */
  body.ah-app .ah-score-screen #ah-pit.ah-pit--board .ah-pit-heading {
    position: absolute;
    right: 0;
    bottom: 100%;
    z-index: 140;
    padding: 0 0 6px;
  }

  body.ah-app .ah-score-screen #ah-pit.ah-pit--board #ah-lanes {
    --ah-cols: clamp(290px, 24%, 400px) var(--track-fit, repeat(var(--tracks), minmax(0, 1fr)));
  }
  body.ah-app .ah-score-screen #ah-pit.ah-pit--board #ah-lanes :is(.ah-head-account, .ah-lane-account) {
    grid-template-columns: 30px minmax(0, 1fr) 58px;
    gap: 10px;
  }
}

/* 순위만 보일 때(문제 목록을 못 읽음): 트랙 스크롤 안내·풀이 범례는 뜻이 없어 숨긴다 */
#ah-pit.ah-pit--ranking-only .ah-board-scroll-hint,
#ah-pit.ah-pit--ranking-only .ah-legend { display: none; }
