:root {
  color-scheme: light;
  background: #e7f1ff;
  color: #142c4c;
  font: 16px/1.45 system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; overflow: hidden; }
.shell { position: fixed; inset: 0; isolation: isolate; -webkit-user-select: none; user-select: none; }
.shell :is(input, textarea) { -webkit-user-select: text; user-select: text; }
.masthead {
  position: absolute; z-index: 2;
  top: max(12px, env(safe-area-inset-top)); left: max(14px, env(safe-area-inset-left));
  padding: 5px 12px; border-radius: 10px; background: #eaf4ffed; pointer-events: none;
}
.masthead-title { display: flex; align-items: center; gap: 12px; }
h1 { margin: 0; font-size: clamp(1.02rem, 2.6vw, 1.6rem); letter-spacing: -.06em; }
#connection { color: #355576; font-size: .75rem; }
.ranking-panel {
  position: absolute; z-index: 2; top: max(12px, env(safe-area-inset-top));
  right: max(14px, env(safe-area-inset-right)); width: min(250px, 82vw);
  display: grid; grid-template-columns: minmax(0, 1fr); justify-items: end; gap: 4px; pointer-events: none;
}
.leaderboard {
  grid-area: 1 / 1; width: 100%; max-width: 100%; pointer-events: auto;
  padding: 9px 7px; border-radius: 12px; background: rgb(0 0 0 / 56%); color: rgb(255 255 255 / 84%);
  text-shadow: 0 1px 2px rgb(0 0 0 / 70%);
}
.leaderboard summary { padding-inline-end: 6.1rem; font-weight: 700; cursor: pointer; }
.leaderboard-scroll { overflow: auto; max-height: min(50dvh, 420px); overscroll-behavior: contain; }
.leaderboard table { width: 100%; border-collapse: collapse; font-size: .8rem; }
.leaderboard th, .leaderboard td { padding: 6px 3px; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.leaderboard th { border-bottom: 1px solid #ffffff59; }
.leaderboard th:first-child, .leaderboard td:first-child { text-align: left; white-space: normal; overflow-wrap: anywhere; }
.leaderboard tr[data-self] { background: #d8942838; color: rgb(255 242 178 / 90%); }
.leaderboard .rank-below-cutoff { border-top: 1px solid #ffffff59; }
.arena { position: absolute; inset: 0; overflow: hidden; background: #d7d0c1; }
canvas { display: block; width: 100%; height: 100%; }
#pool { touch-action: none; }
#pool:focus-visible { outline-offset: -4px; }
.pool-labels { position: absolute; inset: 0; pointer-events: none; }
.graphics-error { position: absolute; inset: auto 1rem 1rem; text-align: center; }
.pool-info { position: absolute; top: 43px; left: 0; }
.pool-label {
  white-space: nowrap; padding: 6px 11px;
  border-radius: 6px; background: #173d73; color: white; font-size: .8rem; font-weight: 700;
}
.pool-label span { color: #b8dbff; padding: 0 2px; }
#level-help-open {
  display: block; margin-top: 2px; padding: 3px 9px; pointer-events: auto;
  border-radius: 6px; font-size: .75rem; font-weight: 500;
}
#welcome {
  position: absolute; inset: 0; display: grid; place-items: center; padding: 24px;
  background: radial-gradient(ellipse at center, #081d35b8 0%, #0c294f72 48%, #0c294f30 100%);
  color: #fff; text-align: center;
}
#welcome-grades { position: absolute; inset: 0; pointer-events: none; }
.welcome-content, .welcome-footer, #welcome-motion { z-index: 1; }
.welcome-content { position: relative; display: grid; justify-items: center; gap: clamp(20px, 5vw, 36px); }
#welcome-title {
  font-size: clamp(2.75rem, 9vw, 6.5rem); font-weight: 800; line-height: 1.04;
  letter-spacing: -.075em; text-shadow: 0 3px 18px #071a33;
}
#welcome-title sup {
  margin-inline-start: .35em; font-size: .24em; letter-spacing: 0; white-space: nowrap;
}
#welcome-title span {
  display: block; margin-bottom: .45em; font-size: .40em; font-weight: 600; letter-spacing: -.045em; color: #aff3ff;
}
#welcome-start {
  min-height: 52px; padding: 10px 35px; border-radius: 999px; color: #102945; background: #a7efff;
  font-size: 1.06rem; box-shadow: 0 8px 27px #061b3b80;
}
#welcome-start:hover { background: #d3f8ff; }
.welcome-actions { position: relative; }
.welcome-keys {
  --key-travel: clamp(90px, 36vw, 145px);
  position: absolute; inset-block-start: calc(100% + 16px); inset-inline-start: 50%; translate: -50%;
  width: min(320px, calc(100vw - 42px)); height: 44px; overflow: hidden;
  display: flex; justify-content: center; align-items: center; gap: 10px; pointer-events: none;
}
.welcome-keys kbd {
  display: grid; place-items: center; width: 32px; height: 32px; padding: 0;
  border: 1px solid #ddf9ffb8; border-radius: 8px;
  background: #0d304ee0; color: #f0fcff; font: 700 1.2rem/1 system-ui, sans-serif;
}
.welcome-keys kbd:nth-child(n + 3) { display: none; }
@media (prefers-reduced-motion: no-preference) {
  .welcome-keys::before {
    content: ""; position: absolute; left: 50%; translate: -50%;
    width: 38px; height: 38px; border: 1px solid #aff3ff9c; border-radius: 10px;
  }
  .welcome-keys kbd:nth-child(n) {
    display: grid; position: absolute; left: 50%;
    animation: welcome-key-flow 4.8s linear infinite;
  }
  .welcome-keys kbd:nth-child(2) { animation-delay: -1.2s; }
  .welcome-keys kbd:nth-child(3) { animation-delay: -2.4s; }
  .welcome-keys kbd:nth-child(4) { animation-delay: -3.6s; }
  #welcome[data-paused] .welcome-keys kbd { animation-play-state: paused; }
}
@keyframes welcome-key-flow {
  from { translate: calc(-50% - var(--key-travel)); opacity: 0; }
  12%, 88% { opacity: 1; }
  44%, 56% { scale: 1; background: #0d304ee0; color: #f0fcff; }
  50% { scale: .82; background: #aff3ff; color: #102945; }
  to { translate: calc(-50% + var(--key-travel)); opacity: 0; }
}
#welcome :focus-visible { outline-color: #fff; outline-offset: 4px; }
.welcome-footer {
  position: absolute; left: max(12px, env(safe-area-inset-left));
  right: max(12px, env(safe-area-inset-right)); bottom: max(12px, env(safe-area-inset-bottom));
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px;
  font-size: .75rem;
}
.welcome-footer p, .welcome-secondary { color: #e6e6e6; line-height: 1.5; }
.welcome-footer p, .welcome-secondary::before { background: rgb(52 52 52 / 78%); border-radius: 8px; }
.welcome-footer p {
  display: flex; align-items: center; gap: .25em;
  margin: 0; padding: 3px 9px;
}
.welcome-footer a { color: inherit; text-underline-offset: 2px; }
.welcome-secondary {
  min-height: 44px;
  padding: 3px 11px;
  position: relative; isolation: isolate; background: transparent;
  font-size: .75rem; font-weight: 500;
}
.welcome-secondary::before {
  content: ""; position: absolute; z-index: -1; pointer-events: none;
  inset: 50% 0 auto; height: calc(1.5em + 6px); transform: translateY(-50%);
}
#language-picker {
  position: absolute; z-index: 1;
  top: max(12px, env(safe-area-inset-top));
  left: max(12px, env(safe-area-inset-left));
  display: flex; gap: 4px;
}
#language-picker button { min-width: 44px; }
#welcome-motion {
  position: absolute; top: max(12px, env(safe-area-inset-top));
  right: max(12px, env(safe-area-inset-right));
}
.overlay { position: absolute; inset: 0; display: grid; place-items: safe center; overflow-y: auto; padding: 18px; background: #142c4c3b; }
form {
  display: grid; gap: 9px; width: min(100%, 310px); padding: 25px;
  background: #eef6ff; border-radius: 18px; box-shadow: 0 16px 45px #183d7038;
}
h2 { margin: 0 0 6px; font-size: 1.35rem; }
label { font-size: .84rem; font-weight: 700; }
input, button { font: inherit; border-radius: 8px; padding: 10px 12px; }
input { min-width: 0; border: 1px solid #7896b6; background: white; color: inherit; }
.entry-controls { display: grid; gap: 5px; margin: 2px 0 5px; color: #254b73; font-size: 1rem; }
#debug-start { display: grid; gap: 5px; }
#debug-level { padding: 8px; border: 1px solid #7896b6; border-radius: 8px; background: white; color: inherit; font: inherit; }
#level-briefing {
  width: min(390px, calc(100% - 32px)); padding: 24px; border: 0; border-radius: 16px;
  background: #eaf8ff; color: #14374d; box-shadow: 0 16px 45px #123f6038;
}
#level-briefing::backdrop { background: #123f6065; }
#join h2, #level-briefing h2 { font-size: clamp(1.4rem, 5vw, 1.8rem); }
#level-briefing p { margin: 12px 0; font-size: 1.1rem; }
#briefing-start { width: 100%; margin-top: 7px; background: #176495; color: white; }
.avatar-options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; border: 0; padding: 0; margin: 0 0 5px; }
.avatar-options legend { padding: 0; margin-bottom: 5px; font-size: .84rem; font-weight: 700; }
.avatar-options label {
  display: flex; align-items: center; gap: 6px; min-height: 42px;
  padding: 6px 8px; border: 1px solid #7896b6; border-radius: 8px; cursor: pointer;
}
.avatar-options label:has(:checked) { border-color: #1d5596; background: #d9eaff; }
.avatar-options input { margin: 0; accent-color: #1d5596; }
button { border: 0; color: white; background: #1d5596; font-weight: 700; cursor: pointer; }
button:disabled { opacity: .65; }
:focus-visible { outline: 3px solid #205bad; outline-offset: 2px; }
#error { color: #952f27; margin: 0; font-size: .85rem; }
.game-dock {
  display: grid; gap: 6px; position: absolute; z-index: 2;
  bottom: max(10px, env(safe-area-inset-bottom)); left: 50%; translate: -50% 0;
  width: min(600px, calc(100% - 20px)); pointer-events: none;
}
.game-dock form, .game-dock button { pointer-events: auto; }
#stroke-tutorial, #turn-tutorial {
  position: absolute; bottom: calc(100% + 12px); left: 50%; translate: -50% 0;
  display: grid; grid-template-columns: repeat(2, 56px); justify-content: center; gap: 6px;
}
#stroke-tutorial[data-breath-lane] { grid-template-columns: 56px 72px 56px; }
#stroke-tutorial[data-breath-lane] [data-key="ArrowLeft"] { grid-area: 2 / 1; }
#stroke-tutorial[data-breath-lane] [data-key="ArrowRight"] { grid-area: 2 / 3; }
#stroke-tutorial #breath-tutorial-button { grid-area: 2 / 2; font-size: 1rem; }
#turn-tutorial { grid-template-columns: 80px; }
#stroke-tutorial-instruction, #turn-tutorial-instruction {
  grid-column: 1 / -1; margin: 0; text-align: center; white-space: nowrap;
  font-size: .85rem; font-weight: 650; color: white; text-shadow: 0 1px 4px #092741, 0 1px 2px #092741;
}
:is(#stroke-tutorial, #turn-tutorial) button {
  min-height: 48px; border: 2px solid #ffffff50; border-radius: 12px;
  background: #0b294c65; color: white; font-size: 1.7rem; touch-action: none;
}
:is(#stroke-tutorial, #turn-tutorial) button[data-next] { background: #1c608cd9; border-color: #ffdf88; }
:is(#stroke-tutorial, #turn-tutorial) button:hover { box-shadow: 0 0 0 2px #ffffffb0; }
:is(#stroke-tutorial, #turn-tutorial) button:active { background: #134770; }
:is(#stroke-tutorial, #turn-tutorial) button:focus-visible { outline-color: #ffdf88; }

.controls {
  display: grid; grid-template-columns: 105px minmax(0, 1fr) 105px;
  gap: 14px; padding: 8px 12px; background: #eef6ffe8; border-radius: 14px;
}
.stat { display: grid; align-content: center; text-align: center; }
.stat span { color: #355576; font-size: .82rem; }
.stat strong { font-size: clamp(1.15rem, 3vw, 1.65rem); font-variant-numeric: tabular-nums; }
.rhythm-heading, .keys { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
#feedback { color: #8d351b; font-size: .83rem; }
#turn-tutorial button { font-size: 1rem; }
#touch-keys { display: none; }
#touch-keys button {
  min-height: clamp(4rem, 13dvh, 5.35rem);
  touch-action: none; user-select: none; padding: 5px 2px;
  background: rgb(255 255 255 / 79%); color: #173d73; font-size: 1.18rem;
  border: 1px solid rgb(255 255 255 / 48%); border-radius: 12px;
}
#touch-keys button[data-key^="Arrow"] { font-size: 2rem; }
#touch-keys button:active { background: #fff; }
#rhythm-result {
  position: absolute; bottom: 55%; left: 50%; translate: -50%;
  display: flex; align-items: center; gap: 9px; pointer-events: none; white-space: nowrap;
}
#judgment { color: #fff5de; font-size: clamp(1.3rem, 4vw, 2.1rem); text-shadow: 0 2px 4px #632900, 0 0 12px #ff9500; }
#judgment { background: #762e0de6; color: #fff1db; padding: 4px 10px; border-radius: 8px; }
#judgment:empty { display: none; }
#status-form {
  justify-self: center; width: min(100%, 360px); padding: 0;
  background: transparent; box-shadow: none;
}
.status-message-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
#status-result { color: #355576; font-size: .82rem; }
#status-result:empty { display: none; }
#breath-gauge {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}
.keys { margin-top: 6px; }
.keys { font-size: .76rem; flex-wrap: wrap; }
kbd { padding: 1px 4px; border: 1px solid #a0b8d2; border-radius: 4px; }
#hint {
  grid-row: 2; max-width: 100%; margin: 0; padding: 5px 8px;
  border-radius: 6px; background: rgb(12 36 70 / 68%); color: #fff; font-size: .82rem;
  text-shadow: 0 1px 3px #142b50; text-align: right; overflow-wrap: anywhere;
}
@media (max-width: 560px) {
  .controls { grid-template-columns: 64px minmax(0, 1fr) 64px; gap: 6px; }
  .rhythm-heading { flex-wrap: wrap; font-size: .86rem; }
}
@media (max-width: 740px), (any-pointer: coarse) {
  .masthead {
    top: env(safe-area-inset-top, 0px); left: env(safe-area-inset-left, 0px);
    padding: 0; border-radius: 0 0 7px 0; overflow: hidden;
  }
  .masthead-title { padding: 3px 7px; gap: 6px; }
  .masthead h1 { font-size: .82rem; font-weight: 500; letter-spacing: -.025em; }
  #connection { font-size: .65rem; }
  .pool-info { position: static; }
  .pool-label { padding: 3px 7px; border-radius: 0; font-size: .68rem; font-weight: 400; }
  .pool-label strong { font-weight: 500; }
  .ranking-panel {
    top: env(safe-area-inset-top, 0px); right: env(safe-area-inset-right, 0px);
    width: min(190px, 56vw);
  }
  #hint { font-size: .72rem; }
  .leaderboard { padding: 4px; border-radius: 0 0 0 8px; font-size: .72rem; }
  .leaderboard table { font-size: .68rem; }
  .leaderboard summary, .leaderboard th, .leaderboard td { font-weight: 400; }
  .leaderboard th, .leaderboard td { padding: 3px 2px; }
  .game-dock {
    left: max(6px, env(safe-area-inset-left)); right: max(6px, env(safe-area-inset-right));
    bottom: max(4px, env(safe-area-inset-bottom)); width: auto; max-width: 600px;
    margin-inline: auto; translate: none;
  }
  #touch-keys { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
  .keys { display: none; }
}

#avatar-preview { height: clamp(120px, 24svh, 185px); border-radius: 12px; background: #e3efec; }
#level-briefing { max-height: calc(100dvh - 32px); overflow: auto; }
#level-briefing:modal { overscroll-behavior: contain; }
#level-briefing::backdrop { overflow: hidden; overscroll-behavior: contain; }
#briefing-instructions { display: grid; gap: 9px; margin: 16px 0; }
.briefing-topic { padding: 9px 11px; border-radius: 9px; background: #d9f0ff; }
.briefing-topic h3 { margin: 0; font-size: 1rem; }
#level-briefing .briefing-topic p { margin: 4px 0 0; font-size: .94rem; }
#level-briefing[data-level="2"] #dolphin-instructions,
#level-briefing[data-level="3"] #flip-instructions,
#level-briefing[data-level="4"] #breath-instructions,
#level-briefing[data-level="5"] #loping-instructions { padding: 12px; background: #c0e6fc; }
#level-briefing[data-level="2"] #dolphin-instructions h3,
#level-briefing[data-level="3"] #flip-instructions h3,
#level-briefing[data-level="4"] #breath-instructions h3,
#level-briefing[data-level="5"] #loping-instructions h3 {
  font-size: clamp(1.45rem, 1.15rem + 1.25vw, 1.85rem);
}
#level-briefing[data-level="1"] .entry-controls {
  font-size: clamp(1.25rem, 1rem + 1.25vw, 1.65rem); font-weight: 700;
}

#race-date { max-width: 100%; }
#race-clock { font-variant-numeric: tabular-nums; }

#race-start-signal {
  position: absolute; z-index: 2; inset: 50% auto auto 50%; translate: -50% -50%;
  padding: .22em .48em; border-radius: .2em; background: rgb(15 40 57 / 74%);
  color: #fff; font-size: clamp(1.65rem, 8vw, 4.25rem); font-weight: 800;
  text-align: center; white-space: nowrap; pointer-events: none;
}

.technique-topic { padding: 12px; background: #c0e6fc; }
@media (max-width: 740px), (any-pointer: coarse) {
  #touch-keys[data-stroke="breaststroke"], #touch-keys[data-stroke="butterfly"] {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
  #touch-keys[data-stroke="butterfly"] [data-key="ArrowRight"] { order: 1; }
  #touch-keys[data-stroke="butterfly"] [data-key="Space"],
  #touch-keys[data-stroke="butterfly"] [data-key="KeyZ"] { order: 2; }
}

#stroke-practice { position: relative; margin: 10px 0; }
#practice-avatar { display: block; width: 100%; height: clamp(6rem, 16dvh, 9rem); border-radius: 10px;
  background: linear-gradient(#caf2ff 42%, #61b9d0 43%, #92dce7 49%, #65b9d1 80%);
}
#practice-grade { position: absolute; top: 7px; right: 10px; color: #143751; font-weight: 800; }
#practice-grade[data-perfect] { color: #763500; }
#practice-keys { display: flex; gap: 6px; margin-top: 6px; }
#practice-keys button { flex: 1; min-height: 42px; touch-action: none; user-select: none; }

#profile-badge { display: flex; align-items: center; gap: 5px; padding: 3px 5px; }
#profile-avatar { width: 42px; height: 42px; border: 1px solid #83b3de; border-radius: 50%; background: #cfe7ff; }
#exit-pool { pointer-events: auto; min-height: 32px; padding: 3px 8px; font-size: .72rem; white-space: nowrap; }
#profile-medals { display: flex; gap: 4px; color: #173d73; }
.profile-medal { display: grid; justify-items: center; font-size: .65rem; line-height: 1.2; }
.profile-medal span:first-child { font-size: 1.15rem; }
#overall-open {
  grid-area: 1 / 1; align-self: start; z-index: 1; margin: 8px 7px 0 0;
  pointer-events: auto; background: transparent; color: rgb(255 255 255 / 84%);
  text-shadow: 0 1px 2px rgb(0 0 0 / 70%); font-size: .7rem; line-height: 1.45; padding: 0 3px; white-space: nowrap;
}
#leaderboard[hidden] + #race-board[hidden] + #overall-open { display: none; }
@media (max-width: 740px), (any-pointer: coarse) {
  #overall-open { margin: 4px 4px 0 0; }
}
#overall-ranking { width: min(540px, calc(100% - 24px)); padding: 16px; border: 0; border-radius: 14px;
  background: #eef6ff; color: #142c4c;
}
#level-help {
  width: min(440px, calc(100% - 24px)); max-height: calc(100dvh - 24px); overflow: auto;
  padding: 16px; border: 0; border-radius: 14px; background: #eef6ff; color: #142c4c;
}
#overall-ranking:modal { overscroll-behavior: contain; }
#overall-ranking::backdrop, #level-help::backdrop { background: #173d7370; }
#overall-ranking::backdrop { overflow: hidden; overscroll-behavior: contain; }
#level-help form { display: block; width: auto; padding: 0; background: none; box-shadow: none; }
#help-level { display: block; width: 100%; margin-top: 4px; padding: 5px; font: inherit; color: inherit; }
#level-guide { margin: 12px 0 0; padding-inline-start: 20px; }
#level-guide li + li { margin-top: 7px; }
.overall-title { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 8px; }
.overall-title h2 { margin: 0; }
#overall-ranking h3 { margin: 12px 0 4px; font-size: 1rem; }
#medley-result { margin: 4px 0 8px; color: #244a78; font-size: .9rem; font-weight: 700; }
#restart-medley { margin-top: 9px; padding: 7px 12px; }
#medley-countdown { margin: 5px 0 0; color: #244a78; font-size: .85rem; }
#medley-countdown-seconds { font-variant-numeric: tabular-nums; font-weight: 700; }
#overall-ranking .leaderboard-scroll { max-height: min(28dvh, 240px); }
.overall-title button { padding: 5px 8px; }
#overall-ranking table { width: 100%; border-collapse: collapse; font-size: clamp(.72rem, 2.2vw, .9rem); font-variant-numeric: tabular-nums; }
#hall-of-fame-rows tr[data-self] { background: #ffe368; color: #392900; font-weight: 700; }
#overall-ranking th, #overall-ranking td { text-align: right; padding: 5px 3px; border-bottom: 1px solid #c0d7ef; }
#overall-ranking :is(th, td):first-child { text-align: left; overflow-wrap: anywhere; }
@media (min-width: 741px) and (pointer: fine) {
  .masthead:has(#profile-badge:not([hidden])) .pool-info { top: 94px; }
}

#touch-keys:is([data-stroke="backstroke"], [data-stroke="breaststroke"], [data-stroke="butterfly"]) button {
  touch-action: none;
  user-select: none;
}
@media (max-width: 740px), (any-pointer: coarse) {
  .pool-label { max-width: min(43vw, 200px); white-space: normal; }
}


.timing-legend { display: flex; flex-wrap: wrap; gap: 4px 13px; color: #163d63; font-size: .82rem; }
.timing-legend span, .timing-chord { display: inline-flex; align-items: center; gap: 5px; }
.timing-chord { border: 1px solid #608bb2; border-radius: 6px; padding: 2px 4px; }
#briefing-instructions kbd[data-press] {
  display: inline-flex; flex-direction: column; align-items: center; gap: 2px;
  min-width: 1.7em; line-height: 1; padding: 3px 4px; vertical-align: middle;
}
#briefing-instructions [data-press]::after {
  content: ''; display: block; height: 4px; border-radius: 2px; background: #216399;
}
#briefing-instructions [data-press="tap"]::after { width: 4px; }
#briefing-instructions [data-press="hold"]::after { width: 13px; }

@media (max-width: 740px), (any-pointer: coarse) {
  #practice-keys button { background: #fff; color: #173d73; }
}

.admin-page {
  min-height: 100dvh; overflow: auto;
  color: #143454;
  background: linear-gradient(135deg, #edf7ff, #e2f3f7);
}
.admin-shell { width: min(960px, calc(100% - 32px)); margin: clamp(24px, 9vh, 90px) auto; }
.admin-heading { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 12px; }
.admin-heading p { margin: 0 0 3px; color: #365d7a; font-weight: 600; }
.admin-heading h1 { font-size: clamp(2.1rem, 6vw, 3.4rem); line-height: 1.12; }
.admin-heading a { color: #205990; font-size: .9rem; text-underline-offset: 3px; }
.admin-metrics {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 14px; margin: 28px 0 12px;
}
.admin-metrics > div {
  padding: 19px 20px; border: 1px solid #a6c9dd; border-radius: 14px; background: #fff;
  box-shadow: 0 5px 20px #1c567b0a;
}
.admin-metrics dt { font-weight: 700; }
.admin-metrics dd:not(.admin-metric-note) {
  margin: 5px 0 2px; color: #143c68; font-size: clamp(1.65rem, 4vw, 2.3rem);
  font-weight: 750; font-variant-numeric: tabular-nums;
}
.admin-metric-note, .admin-updated { color: #486178; font-size: .84rem; }
.admin-metric-note { margin: 0; }
.admin-updated time { margin-inline-start: 5px; font-variant-numeric: tabular-nums; }
#admin-error { color: #952f27; font-size: .9rem; }

.admin-capacity-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.admin-capacity-form input { width: 10ch; padding: 6px; font: inherit; }
.admin-capacity-form button { padding: 6px 12px; font: inherit; }
#admin-capacity-status:empty { display: none; }
