@font-face {
  font-family: "Cabinet Grotesk";
  src: url("/cabinet-grotesk-bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light;
  --stage: #0c655a;
  --stage-dark: #074c45;
  --ink: #172a29;
  --muted: #4b5e5b;
  --canvas: #f3f6f3;
  --white: #ffffff;
  --border: #c7d3cf;
  --accent: #0f766e;
  --lime: #cbff70;
  --mint: #def2e7;
  --gold: #ffcf69;
  --red: #a52a37;
  --red-bg: #ffebed;
  --focus: #115e59;
  --radius-control: 8px;
  --radius-panel: 14px;
  --display: "Cabinet Grotesk", system-ui, sans-serif;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  min-width: 0;
  min-height: 100svh;
  background: var(--stage);
  color: var(--white);
  font-size: 16px;
  line-height: 1.55;
  isolation: isolate;
}
body::before, body::after {
  content: "";
  position: fixed;
  z-index: -1;
  pointer-events: none;
}
body::before {
  width: min(52vw, 690px);
  aspect-ratio: 1;
  border: clamp(28px, 5vw, 72px) solid #0a5951;
  border-radius: 50%;
  left: max(-29vw, -380px);
  top: 10vh;
}
body::after {
  width: min(40vw, 530px);
  aspect-ratio: 1;
  background: #0b5a51;
  border-radius: 30px;
  right: max(-24vw, -310px);
  bottom: -24vh;
  transform: rotate(28deg);
}
body[data-admin="true"][data-signed-in="true"],
body[data-phase="lesson1"][data-signed-in="true"] {
  background: var(--canvas);
  color: var(--ink);
}
body[data-admin="true"][data-signed-in="true"]::before,
body[data-admin="true"][data-signed-in="true"]::after,
body[data-phase="lesson1"][data-signed-in="true"]::before,
body[data-phase="lesson1"][data-signed-in="true"]::after { display: none; }

button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .55; }
a { color: var(--focus); }
button, a, input { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 4px; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.12; }
h1 { font-size: clamp(2rem, 4vw, 3.25rem); letter-spacing: -.035em; margin-bottom: 16px; }
h2 { font-size: 1.5rem; letter-spacing: -.02em; margin-bottom: 12px; }
h3 { font-size: 1.25rem; margin-bottom: 12px; }
p { margin-bottom: 16px; color: var(--muted); }
.shell { min-height: 100svh; display: flex; flex-direction: column; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px max(24px, calc((100vw - 1192px) / 2));
  min-height: 76px;
  color: white;
  background: var(--stage-dark);
  border-bottom: 1px solid #2a6e65;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  font: 700 clamp(1.45rem, 2.5vw, 1.9rem)/1 var(--display);
  letter-spacing: -.035em;
  text-decoration: none;
  color: white;
}
.brand-icon {
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  height: 38px;
  background: var(--lime);
  border-radius: 9px;
  color: #16372d;
  font: 700 1.7rem/1 var(--display);
}
.admin-tag {
  font: 500 .8rem/1.2 system-ui, sans-serif;
  letter-spacing: 0;
  color: #e7f5ef;
  border-left: 1px solid #7fb0a6;
  padding-left: 12px;
  margin-left: 2px;
}
.top-right { display: flex; align-items: center; justify-content: flex-end; gap: 16px; font-size: .875rem; min-width: 0; }
.identity { font-weight: 700; overflow: hidden; text-overflow: ellipsis; max-width: 160px; }
.identity:empty { display: none; }
.connection { display: inline-flex; gap: 7px; align-items: center; white-space: nowrap; color: #effaf4; }
.connection::before { content: ""; width: 8px; height: 8px; background: var(--lime); border-radius: 50%; }
.connection.offline { color: #fff0b9; }
.connection.offline::before { background: var(--gold); }
.text-button {
  color: inherit;
  border: 1px solid transparent;
  background: transparent;
  padding: 8px 10px;
  border-radius: var(--radius-control);
  font-size: .875rem;
  font-weight: 500;
  transition: background-color 140ms, border-color 140ms;
}
.topbar .text-button:hover { background: #175d54; border-color: #74a49a; }
.topbar :focus-visible, .footer :focus-visible { outline-color: var(--lime); }

.round-track {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  gap: 6px;
  max-width: 560px;
  width: calc(100% - 48px);
  margin: 24px auto 0;
}
.track-item {
  font-size: .875rem;
  font-weight: 500;
  text-align: center;
  color: #d3ebe4;
  white-space: nowrap;
}
.track-item::before { content: ""; display: block; height: 5px; background: #9bbfb5; border-radius: 4px; margin-bottom: 8px; }
.track-item.current { color: white; font-weight: 700; }
.track-item.current::before { background: var(--lime); }
.track-item.done::before { background: #b7e2c2; }
body[data-admin="true"][data-signed-in="true"] .round-track,
body[data-phase="lesson1"][data-signed-in="true"] .round-track { margin-left: max(24px, calc((100vw - 1192px) / 2)); }
body[data-admin="true"][data-signed-in="true"] .track-item,
body[data-phase="lesson1"][data-signed-in="true"] .track-item { color: var(--muted); }
body[data-admin="true"][data-signed-in="true"] .track-item::before,
body[data-phase="lesson1"][data-signed-in="true"] .track-item::before { background: #82968e; }
body[data-admin="true"][data-signed-in="true"] .track-item.current,
body[data-phase="lesson1"][data-signed-in="true"] .track-item.current { color: var(--focus); }
body[data-admin="true"][data-signed-in="true"] .track-item.current::before,
body[data-phase="lesson1"][data-signed-in="true"] .track-item.current::before,
body[data-admin="true"][data-signed-in="true"] .track-item.done::before,
body[data-phase="lesson1"][data-signed-in="true"] .track-item.done::before { background: var(--accent); }

main {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1;
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 38px 24px 44px;
  min-width: 0;
}
body[data-admin="true"][data-signed-in="true"] main,
body[data-phase="lesson1"][data-signed-in="true"] main { justify-content: flex-start; padding-top: 32px; }
.loading { text-align: center; padding: 30px; }
.panel {
  color: var(--ink);
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius-panel);
  padding: 26px;
  min-width: 0;
}
.single-form { width: 100%; max-width: 420px; margin: 0 auto; animation: enter 200ms ease-out both; }
.form-panel { padding: 34px; border: 0; box-shadow: 0 6px 0 #06493f; }
.form-title { text-align: left; font-size: 2.1rem; letter-spacing: -.035em; margin: 0 0 24px; }
.form-panel > p { margin-bottom: 14px; }
.form-panel .form-hint { margin: 0 0 16px; color: var(--muted); font-size: .875rem; line-height: 1.5; }
.field { margin-bottom: 20px; }
label { display: block; margin-bottom: 7px; font-size: .95rem; font-weight: 700; }
input[type="text"], input[type="password"] {
  width: 100%;
  min-width: 0;
  min-height: 53px;
  padding: 13px 14px;
  background: #f4f7f4;
  color: var(--ink);
  border: 2px solid #728780;
  border-radius: var(--radius-control);
  font-size: 1.075rem;
  transition: background-color 140ms, border-color 140ms;
}
input[type="text"]:focus, input[type="password"]:focus { background: white; border-color: var(--accent); }
input[aria-invalid="true"] { border-color: var(--red); background: var(--red-bg); }
input[type="checkbox"], input[type="range"] { accent-color: var(--accent); }
.show-password { display: flex; align-items: center; gap: 9px; font-weight: 500; font-size: .9rem; margin: 4px 0 22px; color: var(--muted); }
.show-password input { width: 18px; height: 18px; margin: 0; }
.form-error { color: var(--red); font-size: .9rem; font-weight: 500; margin: 0 0 16px; }
.form-error:empty { display: none; }

.button {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  min-height: 50px;
  padding: 12px 22px;
  color: #132a21;
  background: var(--lime);
  border: 1px solid #5f7b55;
  border-radius: var(--radius-control);
  box-shadow: 0 4px 0 #397a45;
  text-decoration: none;
  font: 700 1.13rem/1.25 var(--display);
  transition: background-color 140ms, box-shadow 140ms;
}
.button:not(:disabled):hover { background: #d9ff9d; box-shadow: 0 4px 0 #276d3a; }
.button:not(:disabled):active { box-shadow: 0 1px 0 #276d3a; }
.button.secondary {
  color: var(--focus);
  background: white;
  border: 1px solid #738a81;
  box-shadow: none;
  font-size: 1rem;
  min-height: 44px;
}
.button.secondary:not(:disabled):hover { background: #e8f4eb; box-shadow: none; }
.button.warning { color: #9a2632; background: #ffefef; border-color: #e1a4a9; box-shadow: none; }
.button.warning:not(:disabled):hover { background: #ffdce0; box-shadow: none; }
.full-width { width: 100%; }

.center-screen {
  width: 100%;
  max-width: 640px;
  text-align: center;
  margin: 0 auto;
  padding: 24px 0;
  animation: enter 200ms ease-out both;
}
.center-screen :focus-visible { outline-color: var(--lime); }
.center-screen h1 { font-size: clamp(2.75rem, 6vw, 5rem); margin-bottom: 14px; }
.center-screen > p { color: #e4f6ed; font-size: 1.1rem; margin: 0 0 32px; }
body[data-admin="true"][data-signed-in="true"] .center-screen > p { color: var(--muted); }
body[data-admin="true"][data-signed-in="true"] .center-screen { padding-top: 70px; }
.waiting-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-width: min(240px, 100%);
  max-width: 100%;
  gap: 5px;
  margin: 0 auto;
  padding: 24px 38px 22px;
  background: white;
  border-radius: var(--radius-panel);
  box-shadow: 0 5px 0 #06493f;
  color: var(--ink);
}
.waiting-metric strong { font: 700 clamp(3.75rem, 8vw, 5.5rem)/1 var(--display); font-variant-numeric: tabular-nums; letter-spacing: -.07em; }
.waiting-metric strong small { font-size: .52em; color: var(--muted); letter-spacing: -.04em; }
.waiting-metric > span { color: var(--muted); font-size: .95rem; font-weight: 500; }

.admin-heading, .ranking-intro {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 24px;
}
.admin-heading h1, .ranking-intro h1, .lesson-header h1 { margin: 0; font-size: clamp(2rem, 4vw, 2.75rem); }
.admin-heading p, .ranking-intro p { margin: 8px 0 0; max-width: 64ch; }
.inline-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .875rem;
  font-weight: 500;
  padding: 9px 13px;
  background: var(--mint);
  color: #215247;
  border: 1px solid #b5d3c5;
  border-radius: 6px;
  white-space: nowrap;
}
.admin-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(275px, 1fr); gap: 20px; align-items: start; }
.admin-grid > .panel:first-child { min-height: 340px; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid #d8e1dd; }
.panel-heading h2 { margin: 0; }
.count-badge { padding: 5px 9px; border-radius: 6px; color: #215247; background: var(--mint); font-size: .875rem; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.player-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; margin-top: 20px; }
.player-chip { min-width: 0; display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid #cad7d0; background: #f5f8f5; border-radius: 8px; }
.avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border-radius: 50%;
  background: #c4e8d1;
  color: #214c3f;
  font: 700 1.05rem/1 var(--display);
}
.player-chip:nth-child(3n+2) .avatar { background: #ffe3a2; color: #704b1a; }
.player-chip:nth-child(3n+3) .avatar { background: #f3c9c5; color: #79313a; }
.player-chip.done .avatar { background: var(--accent); color: white; }
.player-chip.done { border-color: #a0c6b5; background: #eef8f1; }
.player-name { color: var(--ink); font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.player-state { font-size: .82rem; color: var(--muted); margin-top: 3px; }
.empty-state { text-align: center; color: var(--muted); min-height: 235px; display: grid; place-items: center; font-size: .95rem; }
.control-panel { background: #e6f1e9; border-color: #b7d0c1; }
.control-panel h3 { color: #284c42; margin-bottom: 10px; }
.big-count { font: 700 clamp(2.6rem, 5vw, 4rem)/1.08 var(--display); letter-spacing: -.06em; font-variant-numeric: tabular-nums; margin: 16px 0 5px; color: #153e32; }
.big-count .name-sub { font: 700 1.4rem/1 var(--display); color: var(--muted); letter-spacing: -.02em; }
.control-panel p { font-size: .875rem; margin: 7px 0 18px; }
.control-panel .button { width: 100%; }
.control-panel .button:not(.secondary):not(.warning) { margin-bottom: 4px; }
.small-divider { border: 0; height: 1px; background: #b7d0c1; margin: 24px 0; }
.room-url { display: block; font-size: .9rem; font-weight: 500; color: #215247; word-break: break-all; margin-bottom: 10px; }
.control-panel .dictionary-status { margin: 21px 0 0; padding-top: 15px; border-top: 1px solid #b7d0c1; }
.dictionary-status strong { color: #215247; }
.progress-wrap { margin: 16px 0 20px; }
.progress-label { display: flex; justify-content: space-between; color: var(--muted); font-size: .875rem; margin-bottom: 7px; font-variant-numeric: tabular-nums; }
.progress-track { display: block; appearance: none; -webkit-appearance: none; width: 100%; height: 12px; border: 0; border-radius: 4px; overflow: hidden; background: #c3d5cb; }
.progress-track::-webkit-progress-bar { background: #c3d5cb; border-radius: 4px; }
.progress-track::-webkit-progress-value { background: var(--accent); border-radius: 4px; }
.progress-track::-moz-progress-bar { background: var(--accent); border-radius: 4px; }

.ranking-shell { min-width: 0; }
.podium {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-areas: "second first third";
  align-items: end;
  max-width: 640px;
  margin: 0 auto 28px;
  padding: 24px 24px 0;
  gap: 8px;
  text-align: center;
  background: var(--stage);
  color: white;
  border-radius: var(--radius-panel);
}
.podium-item { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; min-width: 0; }
.podium-item.place-1 { grid-area: first; }
.podium-item.place-2 { grid-area: second; }
.podium-item.place-3 { grid-area: third; }
.podium-initial { display: grid; place-items: center; width: 44px; height: 44px; font: 700 1.35rem/1 var(--display); border-radius: 50%; background: var(--mint); color: var(--focus); margin-bottom: 7px; }
.place-1 .podium-initial { background: var(--gold); color: #563714; width: 54px; height: 54px; }
.podium-name { font-weight: 700; font-size: .95rem; max-width: 100%; overflow-wrap: anywhere; margin-bottom: 8px; }
.podium-step { width: 100%; display: grid; place-items: center; border-radius: 8px 8px 0 0; background: #d2e7db; color: #215247; min-height: 54px; }
.place-1 .podium-step { min-height: 100px; background: var(--lime); color: #214c3f; }
.place-2 .podium-step { min-height: 74px; background: #b8dfd0; }
.podium-number { font: 700 2rem/1 var(--display); letter-spacing: -.04em; }
.table-wrap { overflow: auto; max-width: 100%; background: white; border: 1px solid var(--border); border-radius: var(--radius-panel); }
table { width: 100%; border-collapse: collapse; text-align: left; table-layout: auto; min-width: 700px; color: var(--ink); }
th, td { padding: 14px 16px; vertical-align: middle; border-bottom: 1px solid #dbe3df; }
th { background: #e9f2eb; color: #34554a; font-size: .775rem; font-weight: 700; white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td { font-size: .95rem; }
.rank-cell { width: 72px; text-align: center; }
.rank { font: 700 1.35rem/1 var(--display); font-variant-numeric: tabular-nums; }
.rank.first { color: var(--focus); }
.name-sub { display: block; color: var(--ink); font-weight: 700; }
td code { display: block; color: #355449; white-space: pre-wrap; overflow-wrap: anywhere; font-size: .875rem; }
.name-cell { max-width: 245px; }
.metric { font-weight: 700; word-break: normal; font-variant-numeric: tabular-nums; }
.metric-sub { font-size: .8rem; color: var(--muted); margin-top: 4px; max-width: 29ch; }
.list-hit { color: var(--red); font-weight: 700; }
.list-clear { color: #286446; font-weight: 500; }
.ranking-footer { display: flex; justify-content: space-between; align-items: flex-start; gap: 20px; padding: 20px 0 12px; }
.ranking-footer p { max-width: 66ch; font-size: .9rem; margin: 0; }
.ranking-footer .button { flex-shrink: 0; }
.details { background: white; color: var(--ink); border: 1px solid var(--border); border-radius: 8px; padding: 13px 16px; }
.details summary { color: var(--focus); cursor: pointer; font-weight: 700; font-size: .9rem; }
.details p { margin: 12px 0 0; line-height: 1.55; font-size: .95rem; max-width: 70ch; }

.lesson-header { max-width: 66ch; margin-bottom: 24px; }
.lesson-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 16px; }
.lesson-card { padding: 26px; }
.lesson-card h2 { font-size: 1.45rem; margin-bottom: 16px; }
.lesson-card p { max-width: 66ch; line-height: 1.65; margin: 0 0 14px; }
.lesson-card p:last-child { margin-bottom: 0; }
.lesson-card:nth-child(3) { grid-column: 1 / -1; background: #edf5ee; }
.example { background: #eaf3ec; color: #215247; padding: 12px 14px; border-radius: 6px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .9rem; overflow-wrap: anywhere; margin: 14px 0; }
.experiment {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 28px;
  align-items: center;
  background: var(--stage);
  color: white;
  border: 0;
  margin-top: 20px;
  padding: 28px;
}
.experiment h2 { font-size: 1.55rem; }
.experiment p, .combo-caption { color: #e4f6ed; }
.range-label { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: .9rem; margin: 20px 0 10px; }
.experiment input[type="range"] { appearance: auto; width: 100%; min-height: 28px; accent-color: var(--lime); cursor: pointer; }
.experiment :focus-visible { outline-color: var(--lime); }
.combo-number { font: 700 clamp(2rem, 5vw, 3.4rem)/1.05 var(--display); color: var(--lime); letter-spacing: -.04em; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.combo-caption { font-size: .9rem; margin-top: 12px; }
.lesson-bottom { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; padding: 24px 0; }
.lesson-bottom p { font-size: .95rem; max-width: 65ch; margin: 0; }
.lesson-bottom .button, .lesson-bottom .inline-stat { flex-shrink: 0; }
.source-link { font-size: .875rem; color: var(--focus); }

.footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 60px;
  padding: 12px max(24px, calc((100vw - 1192px) / 2));
  border-top: 1px solid #578f83;
  color: #e4f6ed;
  font-size: .875rem;
}
.footer .room-leave, .footer .admin-login-button { margin-left: auto; white-space: nowrap; border-color: #a0c2b7; }
.footer .room-leave:hover, .footer .admin-login-button:hover { background: #175d54; }
body[data-admin="true"][data-signed-in="true"] .footer,
body[data-phase="lesson1"][data-signed-in="true"] .footer {
  color: var(--muted);
  border-color: var(--border);
}
body[data-phase="lesson1"][data-signed-in="true"] .footer .room-leave { border-color: #738a81; }
body[data-phase="lesson1"][data-signed-in="true"] .footer .room-leave:hover { background: #e0ede5; }
body[data-phase="lesson1"][data-signed-in="true"] .footer :focus-visible,
body[data-admin="true"][data-signed-in="true"] .footer :focus-visible { outline-color: var(--focus); }
.notice { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #163d32; color: white; padding: 14px 20px; width: max-content; max-width: calc(100% - 40px); border: 1px solid #7cae98; border-radius: 8px; z-index: 9; box-shadow: 0 4px 20px #0002; font-size: .95rem; }
.login-dialog {
  width: min(420px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  overflow: auto;
  margin: auto;
  padding: 28px;
  box-shadow: 0 12px 36px #102b2855;
}
.login-dialog::backdrop { background: #092a266b; }
.dialog-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 24px; }
.dialog-heading h2 { margin: 0; }
.dialog-heading .text-button { color: var(--muted); padding: 8px; }
.dialog-heading .text-button:hover { background: #e5eee7; }
.login-dialog .button { margin-bottom: 4px; }
@keyframes enter { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 820px) {
  .admin-grid { grid-template-columns: minmax(0, 1fr); }
  .admin-grid > .panel:first-child { min-height: 225px; }
  .control-panel { max-width: none; }
  .control-panel .button { max-width: 430px; }
  .empty-state { min-height: 150px; }
  .lesson-grid, .experiment { grid-template-columns: minmax(0, 1fr); }
  .lesson-card:nth-child(3) { grid-column: auto; }
  .lesson-bottom { flex-direction: column; }
  .ranking-footer { flex-direction: column; align-items: stretch; }
  .ranking-footer .button { align-self: flex-end; }
  .table-wrap table, .table-wrap tbody { display: block; min-width: 0; }
  .table-wrap thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .table-wrap tbody tr { display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 8px 10px; padding: 16px; border-bottom: 1px solid #dbe3df; }
  .table-wrap tbody tr:last-child { border-bottom: 0; }
  .table-wrap tbody td { display: block; min-width: 0; padding: 0; border: 0; }
  .table-wrap .rank-cell { grid-column: 1; grid-row: 1; width: auto; text-align: left; padding-top: 3px; }
  .table-wrap .name-cell { grid-column: 2; max-width: none; }
  .table-wrap td[data-label] { grid-column: 2; }
  .table-wrap td[data-label]::before { content: attr(data-label); display: block; font-size: .8rem; font-weight: 700; color: var(--muted); margin-bottom: 3px; }
  .table-wrap td[colspan] { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  .topbar { gap: 10px; padding: 12px 16px; min-height: 64px; flex-wrap: wrap; }
  .brand { font-size: 1.4rem; gap: 6px; }
  .brand-icon { flex-basis: 31px; height: 31px; font-size: 1.3rem; }
  .admin-tag { font-size: .75rem; padding-left: 8px; }
  .top-right { gap: 8px; font-size: .8rem; margin-left: auto; flex-wrap: wrap; }
  .identity { max-width: 85px; }
  body[data-admin="true"][data-signed-in="true"] .top-right { flex-basis: 100%; justify-content: flex-end; }
  .round-track { width: calc(100% - 32px); margin-top: 18px; gap: 4px; }
  .track-item { font-size: .77rem; }
  body[data-admin="true"][data-signed-in="true"] .round-track,
  body[data-phase="lesson1"][data-signed-in="true"] .round-track { margin-left: 16px; }
  main { padding: 30px 16px 36px; }
  .form-panel { padding: 26px; }
  .form-title { font-size: 1.85rem; }
  .panel:not(.form-panel) { padding: 20px; }
  .admin-heading, .ranking-intro { gap: 12px; align-items: flex-start; flex-direction: column; margin-bottom: 20px; }
  .player-grid { grid-template-columns: repeat(auto-fill, minmax(135px, 1fr)); }
  .player-chip { gap: 7px; padding: 10px; }
  .avatar { flex-basis: 30px; width: 30px; height: 30px; }
  th, td { padding: 11px 12px; }
  .podium { padding: 20px 12px 0; }
  .podium-name { font-size: .87rem; }
  .ranking-footer .button { width: 100%; }
  .footer { padding: 12px 16px; gap: 8px; font-size: .75rem; }
  .footer .room-leave, .footer .admin-login-button { font-size: .8rem; padding: 8px; }
  .login-dialog { padding: 22px; }
}
@media (max-height: 800px) and (min-width: 621px) {
  body[data-phase="game1"] main:has(#password-form) { padding-top: 20px; padding-bottom: 10px; }
  #password-form { padding: 25px 32px; }
  #password-form .form-title { margin-bottom: 16px; }
  #password-form .field { margin-bottom: 13px; }
  #password-form .show-password { margin-bottom: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
