:root {
  --bg: #01060f;
  --bg-2: #031126;
  --line: #0f2d5e;
  --wall: #1a6dff;
  --wall-glow: #8ec8ff;
  --text: #f5f8ff;
  --muted: #8faad1;
  --accent: #ffd84f;
  --accent-2: #36ffb7;
  --danger: #ff4d72;
  --panel: rgba(8, 18, 38, 0.78);
  --sidebar-w: 400px;
  --attract-docked-h: 192px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background: radial-gradient(circle at 20% 20%, #0a1f4a 0%, var(--bg) 55%, #000 100%);
  color: var(--text);
  font-family: 'Trebuchet MS', 'Segoe UI', sans-serif;
}

body.main-screen {
  overflow: hidden;
}

.main-screen #root {
  position: relative;
  width: 100vw;
  height: 100vh;
}

#gameCanvas {
  width: 100%;
  height: 100%;
  display: block;
  transition: filter 220ms ease, transform 220ms ease;
}

body.main-screen.qr-overlay #gameCanvas {
  filter: blur(10px);
  transform: scale(1.02);
}

.hud {
  position: absolute;
  top: 0;
  right: 0;
  width: var(--sidebar-w);
  height: 100vh;
  padding: 28px 14px 28px 14px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  pointer-events: none;
}

body.main-screen.qr-docked .hud {
  padding-bottom: calc(var(--attract-docked-h) + 18px);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  backdrop-filter: blur(6px);
  box-shadow: 0 0 24px rgba(0, 115, 255, 0.25);
}

.panel-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.score-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 10px 12px 8px;
}

.score-table-wrap {
  min-width: 0;
}

.score-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.score-table th:first-child,
.score-table td:first-child {
  width: calc(100% - 56px);
}

.score-table th:last-child,
.score-table td:last-child {
  width: 56px;
}

.score-table th,
.score-table td {
  font-size: 12px;
  padding: 4px 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.score-table th {
  color: var(--muted);
  font-weight: 600;
  letter-spacing: 0.04em;
}

.score-table th:last-child {
  text-align: right;
}

.score-table th:first-child {
  text-align: left;
}

.score-name {
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.score-value {
  font-size: 12px;
  line-height: 1.2;
  font-weight: 700;
  text-align: right;
}

.status-stack {
  display: contents;
}

.timer-card {
  padding: 16px;
  text-align: center;
  order: 1;
  container-type: inline-size;
}

.timer-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, 1.1fr) minmax(0, 1fr);
  gap: clamp(8px, 2.2cqi, 14px);
  align-items: center;
}

.timer-label {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: clamp(10px, 3.2cqi, 13px);
}

.timer-score,
.timer-clock {
  display: grid;
  gap: clamp(2px, 1.2cqi, 6px);
  min-width: 0;
}

.timer-score {
  justify-items: start;
  text-align: left;
}

.timer-clock {
  justify-items: end;
  text-align: right;
}

.timer-value {
  margin-top: 6px;
  font-size: clamp(28px, 15cqi, 64px);
  line-height: 1;
  color: var(--accent);
  text-shadow: 0 0 16px rgba(255, 216, 79, 0.7);
  white-space: nowrap;
}

.visau-hud-mark {
  width: 100%;
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: clamp(2px, 1.2cqi, 6px);
  flex-shrink: 0;
}

.stagegame-mark {
  width: 100%;
  align-self: center;
}

.visau-hud-bars {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 4px;
  justify-self: end;
}

.visau-hud-bars span {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 1px;
  background: var(--bar);
}

.visau-hud-word {
  width: 100%;
  display: block;
  text-align: center;
  white-space: nowrap;
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(16px, 8.4cqi, 34px);
  line-height: 0.9;
  font-weight: 900;
  letter-spacing: clamp(0.01em, 0.12cqi, 0.015em);
  font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
}

.visau-hud-word-game {
  font-size: 0.5em;
  letter-spacing: 0.04em;
  vertical-align: baseline;
}

.visau-hud-word-game-line {
  font-size: clamp(14px, 6.8cqi, 28px);
  letter-spacing: clamp(0.06em, 0.45cqi, 0.12em);
}

.highscores {
  padding: 10px 14px;
  order: 3;
  flex: 0 0 auto;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.highscore-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 12px;
  row-gap: 8px;
  padding: 8px 2px 0;
}

.highscore-grid::before {
  content: '';
  position: absolute;
  left: calc(100% / 3);
  top: 18px;
  bottom: 10px;
  width: 1px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.2) 12%, rgba(255, 255, 255, 0.2) 88%, rgba(255, 255, 255, 0) 100%);
  transform: translateX(-50%);
  pointer-events: none;
}

.highscore-grid::after {
  content: '';
  position: absolute;
  left: calc((100% / 3) * 2);
  top: 18px;
  bottom: 10px;
  width: 1px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(255, 255, 255, 0.2) 12%, rgba(255, 255, 255, 0.2) 88%, rgba(255, 255, 255, 0) 100%);
  transform: translateX(-50%);
  pointer-events: none;
}

.highscore-table-wrap {
  min-width: 0;
}

.highscores table,
.highscore-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.highscore-table th,
.highscore-table td {
  padding: 4px 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 12px;
}

.highscore-table th {
  color: var(--muted);
  font-weight: 600;
  text-transform: none;
}

.highscore-table th:first-child {
  text-align: left;
}

.highscore-table td:first-child {
  text-align: left;
}

.highscore-table th:last-child,
.highscore-table td:last-child {
  text-align: right;
}

.highscore-table td.nickname-cell {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.live-panel {
  order: 2;
}

.overlay {
  position: absolute;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.62);
  z-index: 5;
}

.overlay.show {
  display: flex;
}

.stage-overlay {
  background: rgba(0, 0, 0, 0.76);
}

.stage-card {
  width: min(880px, 90vw);
  padding: 34px 38px;
  border-radius: 28px;
  background: linear-gradient(135deg, rgba(5, 13, 32, 0.97) 0%, rgba(3, 6, 20, 0.98) 100%);
  border: 1px solid rgba(96, 153, 255, 0.34);
  box-shadow: 0 0 48px rgba(0, 85, 255, 0.28);
  display: grid;
  gap: 18px;
  justify-items: center;
}

.stage-title {
  text-align: center;
  font-size: clamp(40px, 6vw, 86px);
  line-height: 0.95;
  font-weight: 900;
  letter-spacing: 0.08em;
  color: #f4f7ff;
  text-transform: uppercase;
}

.stage-progress {
  width: min(680px, 100%);
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 10px;
}

.stage-progress span {
  height: 18px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.1);
  transform: scaleX(0.94);
  transform-origin: center;
  transition: opacity 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.stage-progress span.active {
  background: var(--bar);
  border-color: transparent;
  opacity: 1;
  box-shadow: 0 0 18px color-mix(in srgb, var(--bar) 65%, transparent);
  transform: scaleX(1);
}

.stage-progress span.pending {
  opacity: 0.22;
}

.stage-subline {
  min-height: 1.4em;
  text-align: center;
  font-size: clamp(18px, 2.4vw, 38px);
  color: rgba(255, 255, 255, 0.94);
  font-weight: 900;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
}

.ranking-card {
  width: min(1220px, 90vw);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(5, 13, 32, 0.95) 0%, rgba(3, 6, 20, 0.95) 100%);
  border: 1px solid rgba(96, 153, 255, 0.4);
  box-shadow: 0 0 36px rgba(0, 102, 255, 0.35);
  padding: 28px;
}

.attract-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
}

.attract-panel.mode-overlay .attract-grid {
  grid-template-columns: 1.2fr 0.8fr;
  gap: 26px;
  align-items: start;
}

.attract-panel.mode-overlay .attract-copy,
.attract-panel.mode-overlay .qr-box {
  align-self: start;
}

.attract-copy {
  display: grid;
  gap: 12px;
  align-content: start;
  width: min(620px, 100%);
}

.attract-brand-bars {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
}

.attract-brand-bars span {
  width: 100%;
  aspect-ratio: 1 / 1;
  border-radius: 1px;
  background: var(--bar);
}

.attract-panel {
  position: absolute;
  left: max(24px, calc((100vw - var(--sidebar-w) - min(920px, calc(100vw - var(--sidebar-w) - 112px))) / 2));
  top: max(24px, calc((100vh - 360px) / 2));
  width: min(920px, calc(100vw - var(--sidebar-w) - 112px));
  min-height: 360px;
  padding: 28px;
  border-radius: 24px;
  border: 1px solid rgba(96, 153, 255, 0.4);
  background: linear-gradient(135deg, rgba(5, 13, 32, 0.89) 0%, rgba(3, 6, 20, 0.9) 100%);
  box-shadow: 0 22px 54px rgba(0, 70, 180, 0.3);
  backdrop-filter: blur(10px);
  z-index: 4;
  pointer-events: none;
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  transform-origin: top left;
  transition:
    left 560ms cubic-bezier(0.22, 1, 0.36, 1),
    top 560ms cubic-bezier(0.22, 1, 0.36, 1),
    width 560ms cubic-bezier(0.22, 1, 0.36, 1),
    min-height 560ms cubic-bezier(0.22, 1, 0.36, 1),
    padding 560ms cubic-bezier(0.22, 1, 0.36, 1),
    border-radius 560ms cubic-bezier(0.22, 1, 0.36, 1),
    background 560ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 560ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 260ms ease,
    transform 560ms cubic-bezier(0.22, 1, 0.36, 1);
}

.attract-panel.mode-overlay {
  left: max(24px, calc((100vw - var(--sidebar-w) - min(920px, calc(100vw - var(--sidebar-w) - 112px))) / 2));
  top: max(28px, calc((100vh - 332px) / 2));
  width: min(860px, calc(100vw - var(--sidebar-w) - 128px));
  min-height: 332px;
  padding: 24px;
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(5, 13, 32, 0.89) 0%, rgba(3, 6, 20, 0.9) 100%);
  box-shadow: 0 22px 54px rgba(0, 70, 180, 0.3);
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

.attract-panel.mode-docked {
  left: calc(100vw - var(--sidebar-w) + 14px);
  top: calc(100vh - var(--attract-docked-h) - 28px);
  width: calc(var(--sidebar-w) - 28px);
  min-height: var(--attract-docked-h);
  padding: 14px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(6, 18, 41, 0.9) 0%, rgba(4, 10, 26, 0.92) 100%);
  box-shadow: 0 0 24px rgba(0, 115, 255, 0.25);
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

.attract-panel.mode-hidden {
  left: calc(100vw - var(--sidebar-w) + 14px);
  top: calc(100vh - var(--attract-docked-h) - 6px);
  width: calc(var(--sidebar-w) - 28px);
  min-height: var(--attract-docked-h);
  padding: 14px;
  border-radius: 18px;
  opacity: 0;
  transform: translate3d(0, 18px, 0) scale(0.94);
}

.attract-title {
  margin: 0;
  font-size: clamp(30px, 3.1vw, 76px);
  line-height: 0.92;
  color: rgba(255, 255, 255, 0.94);
  letter-spacing: 0.015em;
  text-transform: uppercase;
  font-weight: 900;
  font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
}

.brand-sub {
  margin-top: 8px;
  color: #dce8ff;
  font-size: clamp(15px, 1.15vw, 24px);
  max-width: 28ch;
  line-height: 1.35;
}

.attract-panel.mode-docked .attract-title {
  font-size: 26px;
}

.attract-panel.mode-docked .brand-sub {
  font-size: 14px;
}

.qr-box {
  border: 1px solid rgba(150, 210, 255, 0.45);
  border-radius: 16px;
  padding: 10px;
  text-align: center;
  background: rgba(255, 255, 255, 0.04);
  width: 156px;
  flex-shrink: 0;
}

.attract-panel.mode-overlay .qr-box {
  width: min(320px, 100%);
  padding: 14px;
}

.qr-box img {
  width: 100%;
  height: auto;
  border-radius: 10px;
  background: #05182f;
}

.ranking-title {
  margin: 0;
  font-size: clamp(36px, 4vw, 64px);
  color: var(--accent-2);
}

.ranking-list {
  margin-top: 18px;
  display: grid;
  gap: 10px;
}

.ranking-row {
  display: grid;
  grid-template-columns: 70px 1fr 120px;
  align-items: center;
  padding: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.rank-pos {
  font-size: 28px;
  color: var(--muted);
}

.rank-name {
  font-size: 26px;
}

.rank-score {
  text-align: right;
  font-size: 36px;
  color: var(--accent);
}

.status-line {
  margin-top: 14px;
  color: var(--muted);
  font-size: clamp(11px, 4.2cqi, 17px);
  line-height: 1.2;
}

.connection-dot {
  position: absolute;
  left: 18px;
  bottom: 18px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--danger);
  box-shadow: 0 0 10px rgba(255, 77, 114, 0.8);
}

.connection-dot.online {
  background: var(--accent-2);
  box-shadow: 0 0 10px rgba(54, 255, 183, 0.85);
}

body.controller-screen,
body.admin-screen {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 14px;
}

body.controller-screen {
  align-items: stretch;
  padding: 14px 14px calc(20px + env(safe-area-inset-bottom));
}

body.admin-screen {
  align-items: center;
}

.controller-shell,
.admin-shell {
  width: min(520px, 100%);
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 0 30px rgba(0, 119, 255, 0.2);
  overflow: hidden;
}

.admin-shell {
  width: min(1040px, calc(100vw - 28px));
}

.controller-shell {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 28px - env(safe-area-inset-bottom));
}

.controller-top-brand {
  padding: 12px 16px 0;
}

.controller-top-bars {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  justify-content: space-between;
  gap: 8px;
}

.controller-top-bars span {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  height: auto;
  max-width: 26px;
  justify-self: center;
  border-radius: 1px;
  background: var(--bar);
}

.screen-title {
  margin: 0;
  padding: 18px;
  font-size: 24px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--accent);
  border-bottom: 1px solid var(--line);
}

.block {
  padding: 16px;
}

.input,
.button,
.number {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  padding: 12px;
  font-size: 18px;
}

.input:focus,
.number:focus {
  outline: none;
  border-color: var(--accent);
}

.button {
  margin-top: 12px;
  cursor: pointer;
  background: linear-gradient(135deg, #ffec80 0%, #ffc52f 100%);
  color: #1f1300;
  font-weight: 700;
  border: none;
}

.button.secondary {
  background: linear-gradient(135deg, #8ddaff 0%, #3aa9ff 100%);
  color: #001626;
}

.button.danger {
  background: linear-gradient(135deg, #ff8ba4 0%, #ff5279 100%);
  color: #2a0011;
}

.helper {
  margin-top: 10px;
  color: var(--muted);
  font-size: 14px;
}

#controllerPlay {
  display: none;
}

#controllerPlay.show {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.jog-shell {
  margin-top: auto;
  padding-top: 24px;
  display: grid;
  justify-items: center;
  gap: 14px;
}

.visau-game-lockup {
  width: 100%;
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 2px 0 6px;
}

.visau-mark-bars {
  width: 100%;
  display: flex;
  gap: clamp(7px, 1.8vw, 16px);
  align-items: center;
}

.visau-mark-bars span {
  flex: 1 1 0;
  height: clamp(16px, 4vw, 28px);
  border-radius: 1px;
  background: var(--bar);
}

.visau-mark-bars span.bar-wide {
  flex-grow: 1.34;
}

.visau-game-title {
  width: 100%;
  text-align: center;
  color: #f2f2f2;
  font-size: clamp(24px, 7vw, 42px);
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
}

.visau-game-subtitle {
  width: 100%;
  text-align: center;
  color: var(--accent);
  font-size: clamp(18px, 5vw, 28px);
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0.48em;
  text-transform: uppercase;
  font-family: Impact, Haettenschweiler, 'Arial Narrow Bold', sans-serif;
  padding-left: 0.48em;
}

.jog-dial {
  position: relative;
  width: min(74vw, 320px);
  aspect-ratio: 1;
  border-radius: 50%;
  touch-action: none;
  user-select: none;
}

.jog-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 35%, rgba(255, 255, 255, 0.14), transparent 42%),
    radial-gradient(circle at 50% 50%, rgba(7, 18, 40, 0.9) 0%, rgba(4, 11, 26, 0.95) 62%, rgba(2, 6, 15, 0.98) 100%);
  border: 1px solid rgba(120, 185, 255, 0.34);
  box-shadow:
    inset 0 0 36px rgba(110, 190, 255, 0.16),
    0 0 34px rgba(0, 92, 255, 0.26);
}

.jog-core {
  position: absolute;
  inset: 24%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255, 235, 151, 0.32), rgba(255, 196, 47, 0.1) 48%, rgba(255, 196, 47, 0.02) 100%);
  border: 1px solid rgba(255, 216, 79, 0.28);
  box-shadow: inset 0 0 20px rgba(255, 216, 79, 0.14);
}

.jog-axis {
  position: absolute;
  left: 50%;
  top: 50%;
  background: linear-gradient(180deg, transparent, rgba(101, 168, 255, 0.26), transparent);
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.jog-axis-v {
  width: 2px;
  height: 82%;
}

.jog-axis-h {
  width: 82%;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(101, 168, 255, 0.26), transparent);
}

.jog-label {
  position: absolute;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(143, 170, 209, 0.88);
  transition: color 140ms ease, text-shadow 140ms ease, transform 140ms ease;
  pointer-events: none;
}

.jog-label.active {
  color: #ffe07d;
  text-shadow: 0 0 12px rgba(255, 216, 79, 0.6);
}

.jog-label-up {
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
}

.jog-label-right {
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
}

.jog-label-down {
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
}

.jog-label-left {
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
}

.jog-label-up.active,
.jog-label-down.active {
  transform: translateX(-50%) scale(1.06);
}

.jog-label-left.active,
.jog-label-right.active {
  transform: translateY(-50%) scale(1.06);
}

.jog-thumb {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 34%;
  aspect-ratio: 1;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.92), rgba(183, 219, 255, 0.86) 22%, rgba(78, 146, 255, 0.62) 58%, rgba(28, 69, 144, 0.92) 100%);
  border: 1px solid rgba(220, 241, 255, 0.68);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.34),
    inset 0 -10px 18px rgba(0, 20, 64, 0.28),
    inset 0 6px 14px rgba(255, 255, 255, 0.18);
  transition: transform 90ms ease-out;
  pointer-events: none;
}

.player-pill {
  margin-top: 10px;
  display: inline-block;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  font-size: 14px;
}

.status-text {
  margin-top: 8px;
  color: var(--muted);
  min-height: 22px;
}

.network-hint {
  margin-top: 10px;
  min-height: 2.8em;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(7, 18, 40, 0.5);
  border: 1px solid rgba(111, 217, 255, 0.18);
  font-size: 12px;
  line-height: 1.4;
  color: #6fd9ff;
  word-break: break-word;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}

.admin-section {
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 12px;
}

.admin-section:last-child {
  grid-column: 1 / -1;
}

.admin-label {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.players-list {
  margin-top: 8px;
  display: grid;
  gap: 6px;
}

.players-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
  padding: 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.04);
}

.hidden {
  display: none;
}

@media (max-width: 920px) {
  .attract-panel,
  .attract-panel.mode-overlay,
  .attract-panel.mode-docked,
  .attract-panel.mode-hidden {
    left: 16px;
    top: auto;
    bottom: 16px;
    width: calc(100vw - 32px);
    min-height: 0;
  }

  .attract-grid {
    grid-template-columns: 1fr;
  }

  .score-grid {
    grid-template-columns: 1fr;
  }

  .highscore-grid {
    grid-template-columns: 1fr;
  }

  .highscore-grid::before {
    display: none;
  }

  .highscore-grid::after {
    display: none;
  }

  .qr-box {
    width: 100%;
  }

  .timer-head {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .visau-hud-mark {
    justify-items: center;
    width: min(220px, 70%);
  }

  .visau-hud-word {
    text-align: center;
  }

  .admin-shell {
    width: min(720px, calc(100vw - 20px));
  }

  .admin-grid {
    grid-template-columns: 1fr;
  }

  .admin-section:last-child {
    grid-column: auto;
  }
}

@media (max-width: 560px) {
  .screen-title {
    font-size: 20px;
  }

  body.controller-screen {
    padding-left: 10px;
    padding-right: 10px;
  }

  .jog-dial {
    width: min(82vw, 300px);
  }
}
