:root {
  --bg: #070611;
  --panel: rgba(15, 11, 36, 0.82);
  --panel-strong: rgba(25, 15, 57, 0.92);
  --text: #f7f4ff;
  --muted: #b4a8d6;
  --purple: #9b36ff;
  --purple-2: #6821f3;
  --cyan: #00d5ff;
  --hot: #ff3dd8;
  --green: #37ffb4;
  --red: #ff4d6d;
  --warning: #ffc857;
  --orange: #ff9f1c;
  --line: rgba(255, 255, 255, 0.13);
  --shadow: 0 0 44px rgba(147, 45, 255, 0.38);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 15% 10%, rgba(130, 44, 255, 0.24), transparent 35%),
    radial-gradient(circle at 78% 6%, rgba(0, 213, 255, 0.16), transparent 30%),
    radial-gradient(circle at 50% 100%, rgba(255, 61, 216, 0.14), transparent 36%),
    var(--bg);
  overflow-x: hidden;
}

button,
input { font: inherit; }

a { color: inherit; }

.ambient-glow {
  pointer-events: none;
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,0.95), transparent);
  z-index: -1;
}

.glass-panel {
  border: 1px solid var(--line);
  background: linear-gradient(145deg, rgba(20, 13, 49, 0.88), rgba(7, 6, 17, 0.78));
  box-shadow: var(--shadow), inset 0 0 28px rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(16px);
  border-radius: 26px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--cyan);
  text-transform: uppercase;
  letter-spacing: 0.2em;
  font-size: 0.72rem;
  font-weight: 800;
}

h1,
h2,
h3,
p { margin-top: 0; }

h1 {
  margin-bottom: 8px;
  font-size: clamp(2.2rem, 6vw, 5.5rem);
  line-height: 0.9;
  letter-spacing: -0.06em;
}

h2 { margin-bottom: 0; }

.subtitle {
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.5;
}

.admin-layout,
.player-layout {
  width: min(1520px, calc(100% - 36px));
  margin: 0 auto;
  padding: 28px 0 40px;
}

.admin-header,
.player-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 24px;
}

.clock-card,
.player-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.clock-card {
  flex-direction: column;
  align-items: flex-end;
  min-width: 170px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.04);
}

.clock-card span {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.clock-card strong { font-size: 1.5rem; }

.admin-grid {
  display: grid;
  grid-template-columns: minmax(330px, 420px) 1fr;
  gap: 24px;
  align-items: stretch;
}

.control-panel {
  padding: 24px;
}

.panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}

.status-pill,
.connection-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 30px;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.status-pill::before,
.connection-dot::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 14px currentColor;
}

.ready,
.online,
.running { color: var(--green); }
.waiting { color: var(--warning); }
.offline,
.lost { color: var(--red); }
.finished { color: var(--cyan); }

.field-label {
  display: block;
  margin-bottom: 8px;
  color: var(--text);
  font-weight: 800;
}

.file-input,
.settings-row input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(0,0,0,0.24);
  color: var(--text);
  padding: 12px 14px;
  outline: none;
}

.file-input::file-selector-button {
  margin-right: 12px;
  border: 0;
  border-radius: 999px;
  padding: 8px 12px;
  color: white;
  background: linear-gradient(135deg, var(--purple), var(--purple-2));
  font-weight: 900;
  cursor: pointer;
}

.hint,
.start-note,
.empty-state {
  color: var(--muted);
  line-height: 1.45;
}

.settings-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 18px;
}

.settings-row label {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.settings-row-single { grid-template-columns: 1fr; }
.settings-row input { margin-top: 7px; }
.small-hint { font-size: 0.86rem; }

.button-row {
  display: flex;
  gap: 10px;
  margin: 22px 0;
  flex-wrap: wrap;
}

button {
  border: 0;
  cursor: pointer;
  color: var(--text);
  font-weight: 950;
  border-radius: 999px;
  padding: 12px 18px;
  transition: transform 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

button:hover { transform: translateY(-1px); }
button:active { transform: translateY(1px); }
button:disabled { cursor: not-allowed; opacity: 0.5; transform: none; }

.primary-btn {
  background: linear-gradient(135deg, var(--purple), var(--hot));
  box-shadow: 0 0 30px rgba(155, 54, 255, 0.44);
}

.secondary-btn {
  background: linear-gradient(135deg, rgba(0,213,255,0.9), rgba(104,33,243,0.85));
  box-shadow: 0 0 24px rgba(0, 213, 255, 0.18);
}

.ghost-btn {
  border: 1px solid var(--line);
  background: rgba(255,255,255,0.06);
}

.compact {
  padding: 8px 12px;
  font-size: 0.82rem;
}

.start-note {
  display: grid;
  gap: 5px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(255,255,255,0.05);
}

.start-note strong { color: var(--text); }

.open-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

.open-links a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.16);
  text-decoration: none;
  color: var(--text);
  background: rgba(255,255,255,0.055);
  font-weight: 900;
}

.booth-panel {
  position: relative;
  min-height: 540px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 34px;
  background:
    linear-gradient(180deg, rgba(11,8,26,0.76), rgba(7,6,17,0.93)),
    radial-gradient(circle at 50% 0%, rgba(155, 54, 255, 0.32), transparent 38%);
  box-shadow: 0 0 70px rgba(104, 33, 243, 0.28), inset 0 0 50px rgba(155,54,255,0.16);
}

.booth-panel::before {
  content: "";
  position: absolute;
  inset: 18px;
  border: 2px solid rgba(155, 54, 255, 0.28);
  border-radius: 28px;
  box-shadow: inset 0 0 32px rgba(155, 54, 255, 0.22);
}

.booth-topline {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 28px 34px;
  color: var(--muted);
  text-transform: uppercase;
  font-size: 0.76rem;
  letter-spacing: 0.2em;
  font-weight: 900;
}

.booth-topline strong { color: var(--text); }

.booth-stage {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(230px, 1fr) minmax(220px, 0.75fr) minmax(230px, 1fr);
  align-items: center;
  gap: 22px;
  padding: 20px 34px 36px;
  min-height: 440px;
}

.admin-player-card {
  min-height: 330px;
  padding: 24px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 26px;
  background: linear-gradient(160deg, rgba(24,15,60,0.88), rgba(7,6,17,0.74));
  box-shadow: 0 0 34px rgba(155,54,255,0.25), inset 0 0 35px rgba(255,255,255,0.03);
}

.admin-player-card.p2 { box-shadow: 0 0 34px rgba(0,213,255,0.22), inset 0 0 35px rgba(255,255,255,0.03); }

.player-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.small-label {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  font-weight: 900;
}

.player-card-header h3 {
  margin-bottom: 0;
  font-size: 2rem;
}

.key-strip {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin: 30px 0;
}

kbd {
  display: inline-flex;
  width: 54px;
  height: 54px;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.08);
  color: var(--text);
  font-size: 1.2rem;
  font-weight: 950;
  box-shadow: 0 0 24px rgba(155,54,255,0.16);
}

.mini-metrics {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}

.mini-metrics span {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  padding-bottom: 8px;
}

.mini-metrics strong { color: var(--text); }

.progress-track {
  height: 10px;
  margin-top: 24px;
  border-radius: 999px;
  background: rgba(255,255,255,0.09);
  overflow: hidden;
}

.progress-track span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--purple), var(--cyan));
  transition: width 0.22s linear;
}

.screen-state {
  margin: 16px 0 0;
  color: var(--muted);
}

.center-brand {
  display: grid;
  place-items: center;
  gap: 6px;
  min-height: 360px;
  text-align: center;
}

.brand-mark {
  width: min(220px, 18vw);
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  color: transparent;
  -webkit-text-stroke: 5px rgba(255,255,255,0.9);
  font-size: clamp(7rem, 16vw, 13rem);
  font-weight: 1000;
  line-height: 0.85;
  text-shadow: 0 0 34px var(--purple), 0 0 70px rgba(0,213,255,0.25);
}

.center-brand p {
  margin-bottom: 0;
  font-size: 1.6rem;
  font-weight: 950;
  letter-spacing: 0.12em;
}

.center-brand span {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.72rem;
}

.leaderboard-panel {
  margin-top: 24px;
  padding: 22px 24px;
}

.leaderboard {
  display: grid;
  gap: 8px;
}

.board-row {
  display: grid;
  grid-template-columns: 56px 1fr 130px 130px;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.05);
  color: var(--muted);
}

.board-row strong { color: var(--text); }

/* Player screen */
.player-layout {
  width: min(1180px, calc(100% - 32px));
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.player-header h1 { font-size: clamp(2.8rem, 8vw, 7.5rem); }

.player-stage {
  flex: 1;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 18px;
}

.hud {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  overflow: hidden;
}

.hud div {
  display: grid;
  gap: 4px;
  padding: 18px 22px;
  background: rgba(255,255,255,0.025);
}

.hud span {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-size: 0.74rem;
  font-weight: 900;
}

.hud strong {
  font-size: clamp(1.6rem, 4vw, 3.4rem);
  line-height: 1;
}

.game-board {
  position: relative;
  min-height: 640px;
  border-radius: 34px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.14);
  background:
    radial-gradient(circle at 50% 0%, rgba(155,54,255,0.28), transparent 34%),
    linear-gradient(180deg, rgba(14,8,33,0.94), rgba(7,6,17,0.97));
  box-shadow: 0 0 65px rgba(155,54,255,0.32), inset 0 0 55px rgba(0,213,255,0.055);
}

.lane-wrapper {
  --target-pad-height: 226px;
  position: absolute;
  inset: 30px 34px 34px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.lane {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.12);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.018)),
    linear-gradient(90deg, rgba(155,54,255,0.12), rgba(0,213,255,0.06));
}

.lane::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, transparent 0 83%, rgba(255,255,255,0.08) 83% 85%, transparent 85%);
  pointer-events: none;
}

.lane.active {
  box-shadow: inset 0 0 42px rgba(0,213,255,0.28), 0 0 34px rgba(0,213,255,0.14);
}

.target-pad {
  pointer-events: none;
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 95px;
  z-index: 1;
  height: var(--target-pad-height, 226px);
  border: 3px solid rgba(55, 255, 180, 0.62);
  border-radius: 24px;
  background:
    linear-gradient(180deg, rgba(55,255,180,0.06), rgba(255,159,28,0.035)),
    radial-gradient(circle at 50% 100%, rgba(55,255,180,0.10), transparent 58%);
  box-shadow: 0 0 30px rgba(55,255,180,0.15), inset 0 0 26px rgba(55,255,180,0.08);
}


.target-pad::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  top: 50%;
  transform: translateY(-50%);
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--green), var(--cyan), transparent);
  box-shadow: 0 0 18px rgba(55,255,180,0.55);
}

.target-pad.judge-good {
  border-color: rgba(55, 255, 180, 0.98);
  background: rgba(55, 255, 180, 0.14);
  box-shadow: 0 0 42px rgba(55,255,180,0.46), inset 0 0 32px rgba(55,255,180,0.20);
}

.target-pad.judge-miss {
  border-color: rgba(255, 77, 109, 0.98);
  background: rgba(255, 77, 109, 0.14);
  box-shadow: 0 0 42px rgba(255,77,109,0.44), inset 0 0 32px rgba(255,77,109,0.18);
}

.lane-key {
  position: absolute;
  left: 50%;
  bottom: 22px;
  z-index: 4;
  transform: translateX(-50%);
  display: grid;
  place-items: center;
  width: 74px;
  height: 74px;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.26);
  background: rgba(255,255,255,0.09);
  color: var(--text);
  font-size: 1.9rem;
  font-weight: 1000;
  box-shadow: 0 0 25px rgba(155,54,255,0.23);
}

.tile {
  position: absolute;
  left: 12%;
  top: 0;
  z-index: 3;
  width: 76%;
  height: 76px;
  border-radius: 20px;
  background: linear-gradient(145deg, var(--purple), var(--hot));
  box-shadow: 0 0 24px rgba(155,54,255,0.58), inset 0 -9px 18px rgba(0,0,0,0.22), inset 0 7px 12px rgba(255,255,255,0.14);
  will-change: transform;
}


.tile.hold-tile {
  height: var(--hold-height, 220px);
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(145deg, var(--purple), var(--hot));
  box-shadow: 0 0 28px rgba(155,54,255,0.62), inset 0 -12px 22px rgba(0,0,0,0.22), inset 0 8px 14px rgba(255,255,255,0.15);
}

.tile.hold-tile::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(180deg, rgba(255,255,255,0.16), transparent 22%, transparent 78%, rgba(0,0,0,0.18));
  opacity: 0.55;
  pointer-events: none;
}

.hold-fill {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1;
  height: var(--hold-progress, 0%);
  background: linear-gradient(180deg, rgba(55,255,180,0.10), rgba(55,255,180,0.42));
  box-shadow: 0 0 24px rgba(55,255,180,0.28);
  pointer-events: none;
}

.tile.hold-tile.holding {
  box-shadow: 0 0 34px rgba(55,255,180,0.32), 0 0 28px rgba(155,54,255,0.38), inset 0 -12px 22px rgba(0,0,0,0.22), inset 0 8px 14px rgba(255,255,255,0.15);
}

.tile.missed {
  filter: saturate(1.2) drop-shadow(0 0 18px rgba(255,77,109,0.55));
}

.player-two .tile {
  background: linear-gradient(145deg, var(--cyan), var(--purple-2));
  box-shadow: 0 0 26px rgba(0,213,255,0.44), inset 0 -9px 18px rgba(0,0,0,0.22), inset 0 7px 12px rgba(255,255,255,0.14);
}

.player-two .tile.hold-tile {
  background: linear-gradient(145deg, var(--cyan), var(--purple-2));
  box-shadow: 0 0 30px rgba(0,213,255,0.52), inset 0 -12px 22px rgba(0,0,0,0.22), inset 0 8px 14px rgba(255,255,255,0.15);
}

.player-two .tile.hold-tile.holding {
  box-shadow: 0 0 34px rgba(55,255,180,0.30), 0 0 30px rgba(0,213,255,0.36), inset 0 -12px 22px rgba(0,0,0,0.22), inset 0 8px 14px rgba(255,255,255,0.15);
}

.tile.judge-good,
.player-two .tile.judge-good {
  background: linear-gradient(145deg, var(--green), #10d58e);
  box-shadow: 0 0 34px rgba(55,255,180,0.56), inset 0 -9px 18px rgba(0,0,0,0.18), inset 0 7px 12px rgba(255,255,255,0.18);
}

.tile.judge-miss,
.player-two .tile.judge-miss,
.tile.missed,
.player-two .tile.missed {
  background: linear-gradient(145deg, #ff4d6d, #ff1f4f);
  box-shadow: 0 0 34px rgba(255,77,109,0.58), inset 0 -9px 18px rgba(0,0,0,0.22), inset 0 7px 12px rgba(255,255,255,0.16);
}

.tile.hit {
  animation: tileHit 0.18s ease forwards;
}

@keyframes tileHit {
  to { transform: scale(1.25); opacity: 0; }
}

.hit-zone {
  pointer-events: none;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 95px;
  z-index: 2;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--purple), transparent);
  box-shadow: 0 0 24px rgba(0,213,255,0.5);
}

.hit-zone span {
  position: absolute;
  left: 50%;
  top: -10px;
  transform: translateX(-50%);
  width: 20%;
  height: 26px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.055);
}

.countdown-overlay {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  padding: 24px;
  text-align: center;
  background: rgba(7,6,17,0.72);
  backdrop-filter: blur(10px);
}

.countdown-overlay.hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.countdown-overlay h2 {
  margin: 0;
  font-size: clamp(3rem, 12vw, 10rem);
  line-height: 0.9;
  letter-spacing: -0.08em;
  text-shadow: 0 0 36px rgba(155,54,255,0.55);
}

.countdown-overlay p {
  max-width: 620px;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 1.1rem;
}

.feedback {
  position: absolute;
  left: 50%;
  top: 22%;
  z-index: 8;
  transform: translate(-50%, -50%);
  color: var(--orange);
  font-size: clamp(2rem, 7vw, 6rem);
  font-weight: 1000;
  letter-spacing: -0.06em;
  text-shadow: 0 0 35px rgba(255,159,28,0.7);
  animation: feedback 0.55s ease forwards;
  pointer-events: none;
}

.feedback.good {
  color: var(--green);
  text-shadow: 0 0 35px rgba(55,255,180,0.7);
}

.feedback.miss {
  color: var(--red);
  text-shadow: 0 0 35px rgba(255,77,109,0.72);
}

.feedback.warn {
  color: var(--orange);
  text-shadow: 0 0 35px rgba(255,159,28,0.7);
}

@keyframes feedback {
  0% { opacity: 0; transform: translate(-50%, -30%) scale(0.8); }
  20% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -78%) scale(1.08); }
}

@media (max-width: 1000px) {
  .admin-header,
  .player-header { flex-direction: column; }
  .clock-card,
  .player-actions { align-items: flex-start; justify-content: flex-start; }
  .admin-grid { grid-template-columns: 1fr; }
  .booth-stage { grid-template-columns: 1fr; }
  .center-brand { min-height: 170px; }
  .brand-mark { width: 150px; }
  .hud { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 650px) {
  .admin-layout,
  .player-layout { width: min(100% - 20px, 1180px); padding-top: 14px; }
  .settings-row,
  .open-links,
  .board-row { grid-template-columns: 1fr; }
  .lane-wrapper { inset: 18px 14px 20px; gap: 8px; }
  .lane-key { width: 54px; height: 54px; border-radius: 18px; font-size: 1.35rem; }
  .target-pad { left: 5%; right: 5%; border-radius: 18px; }
  .tile { height: 62px; border-radius: 16px; }
  .tile.hold-tile { border-radius: 16px; }
  .game-board { min-height: 560px; }
  .hud div { padding: 14px; }
}

/* WebSocket / Node edition additions */
.clock-card small {
  color: var(--muted);
  font-weight: 800;
}

.three-links { grid-template-columns: repeat(3, 1fr); }

.center-brand #clientSummary,
.center-brand #duoSummary {
  display: block;
}

.duo-layout {
  width: min(1880px, calc(100% - 30px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 22px 0 32px;
}

.duo-header h1 {
  font-size: clamp(2.4rem, 6vw, 6.2rem);
}

.duo-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  align-items: stretch;
}

.duo-player {
  min-width: 0;
}

.duo-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.duo-title-row h2 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 3.2rem);
  letter-spacing: -0.045em;
}

.key-strip.small {
  margin: 0;
  gap: 7px;
}

.key-strip.small kbd {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  font-size: 1rem;
}

.compact-hud {
  grid-template-columns: repeat(4, 1fr);
  margin-bottom: 12px;
}

.compact-hud div {
  padding: 12px 14px;
}

.compact-hud strong {
  font-size: clamp(1.1rem, 2.2vw, 2.1rem);
}

.compact-board {
  min-height: calc(100vh - 240px);
  border-radius: 28px;
}

.compact-board .lane-wrapper {
  inset: 24px 24px 28px;
  gap: 10px;
}

.compact-board .lane-key {
  width: 58px;
  height: 58px;
  border-radius: 18px;
  font-size: 1.35rem;
}

.compact-board .tile:not(.hold-tile) {
  height: 66px;
  border-radius: 17px;
}

.compact-board .tile.hold-tile {
  height: var(--hold-height, 220px);
  border-radius: 18px;
}

.player-two .game-board {
  box-shadow: 0 0 65px rgba(0,213,255,0.22), inset 0 0 55px rgba(155,54,255,0.055);
}

.status-pill.connected,
.connection-dot.connected {
  color: var(--green);
}

.status-pill.error,
.connection-dot.error {
  color: var(--red);
}

@media (max-width: 1100px) {
  .duo-grid { grid-template-columns: 1fr; }
  .compact-board { min-height: 620px; }
}

@media (max-width: 650px) {
  .three-links { grid-template-columns: 1fr; }
  .compact-hud { grid-template-columns: repeat(2, 1fr); }
  .duo-title-row { align-items: flex-start; flex-direction: column; }
}
