.mobile-dash-hub {
  display: none;
}

.desktop-board-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0 9px;
}

.desktop-board-tabs button {
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--muted);
  font: inherit;
  font-size: 0.7rem;
  font-weight: 950;
  text-transform: uppercase;
  cursor: pointer;
}

.desktop-board-tabs button:hover,
.desktop-board-tabs button:focus-visible,
.desktop-board-tabs button.active {
  border-color: var(--cyan);
  background: rgba(85, 230, 255, 0.11);
  color: var(--text);
}

#desktop-dash-leaderboard {
  display: grid;
  gap: 5px;
  max-height: 230px;
  margin: 0;
  padding: 0;
  overflow: auto;
  list-style: none;
}

#desktop-dash-leaderboard.hidden {
  display: none;
}

#desktop-dash-leaderboard li {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  min-height: 38px;
  padding: 7px 10px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.06);
}

#desktop-dash-leaderboard li span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#desktop-dash-leaderboard li small {
  color: var(--gold);
  font-weight: 950;
}

.arena-showcase {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  justify-items: stretch;
  width: min(1180px, calc(100vw - 56px));
  gap: 28px;
  margin: 10px 0 16px;
}

.arena-mode-option,
.dash-mode-card {
  width: 100%;
}

.arena-mode-option {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 460px;
  gap: 12px;
  overflow: hidden;
  padding: 28px;
  border-color: rgba(215, 177, 95, 0.42);
  background:
    linear-gradient(rgba(10, 10, 12, 0.84), rgba(10, 10, 12, 0.94)),
    repeating-linear-gradient(90deg, transparent 0 52px, rgba(215, 177, 95, 0.08) 52px 54px);
}

.arena-mode-option .character-card {
  min-height: 0;
  height: 100%;
  padding: 18px;
  border: 0;
  border-radius: 0;
  background:
    radial-gradient(circle at 50% 58%, rgba(85, 230, 255, 0.16), transparent 44%);
  box-shadow: none;
  backdrop-filter: none;
}

.arena-mode-option .enter-arena {
  width: 100%;
  min-height: 62px;
  margin: 0;
}

.arena-card-kicker {
  justify-self: center;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.dash-mode-card {
  position: relative;
  display: grid;
  min-width: 0;
  min-height: 460px;
  align-content: center;
  justify-items: center;
  gap: 10px;
  overflow: hidden;
  padding: 28px;
  border-color: rgba(85, 230, 255, 0.38);
  background:
    linear-gradient(rgba(7, 10, 14, 0.84), rgba(7, 10, 14, 0.94)),
    repeating-linear-gradient(90deg, transparent 0 52px, rgba(85, 230, 255, 0.12) 52px 54px);
  color: var(--text);
  cursor: pointer;
  text-align: center;
}

.release-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  min-height: 38px;
  margin-top: 2px;
  padding: 8px 18px;
  border: 1px solid rgba(85, 230, 255, 0.7);
  border-radius: 4px;
  background: rgba(7, 12, 14, 0.82);
  color: var(--cyan);
  font-size: 0.96rem;
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0;
  text-transform: uppercase;
  box-shadow: 0 0 20px rgba(85, 230, 255, 0.13);
}

.dash-mode-card::before,
.dash-mode-card::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  height: 2px;
  background: var(--cyan);
  opacity: 0.35;
  box-shadow: 0 0 18px rgba(85, 230, 255, 0.8);
}

.dash-mode-card::before {
  top: 24px;
}

.dash-mode-card::after {
  bottom: 24px;
  background: var(--magenta);
  box-shadow: 0 0 18px rgba(255, 94, 168, 0.72);
}

.dash-mode-card:hover,
.dash-mode-card:focus-visible {
  border-color: rgba(85, 230, 255, 0.88);
  background:
    linear-gradient(rgba(8, 14, 18, 0.82), rgba(7, 10, 14, 0.92)),
    repeating-linear-gradient(90deg, transparent 0 52px, rgba(85, 230, 255, 0.18) 52px 54px);
  outline: none;
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.52), 0 0 28px rgba(85, 230, 255, 0.16);
}

.dash-card-kicker {
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.dash-mode-card > strong {
  font-size: clamp(2.6rem, 5vw, 4.5rem);
  font-weight: 950;
  line-height: 1;
  text-transform: uppercase;
}

.dash-card-copy {
  max-width: 360px;
  color: var(--muted);
  font-size: 0.94rem;
  font-weight: 750;
  line-height: 1.45;
}

.dash-card-score {
  display: inline-flex;
  gap: 7px;
  align-items: baseline;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.dash-card-score b {
  color: var(--cyan);
  font-size: 1.08rem;
}

.player-name-message {
  display: none;
  max-width: 360px;
  min-height: 20px;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 850;
  line-height: 1.35;
  text-align: center;
}

.player-name-message.visible {
  display: block;
}

.player-name-message.is-error {
  color: #ff837c;
}

.player-name-message.is-success {
  color: #9cff7a;
}

.designation-panel .player-name-message {
  grid-column: 1 / -1;
  justify-self: start;
  text-align: left;
}

.mobile-name-field {
  display: grid;
  gap: 6px;
  width: min(300px, 100%);
  text-align: left;
}

.mobile-name-field span {
  color: var(--gold);
  font-size: 0.7rem;
  font-weight: 950;
  text-transform: uppercase;
}

.mobile-name-field input {
  width: 100%;
  min-height: 48px;
  border: 1px solid rgba(85, 230, 255, 0.46);
  border-radius: 4px;
  background: rgba(2, 6, 9, 0.82);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  font-weight: 850;
  padding: 10px 12px;
}

[data-player-name-input].is-locked {
  cursor: not-allowed;
  color: #d9d6ce;
  border-color: rgba(255, 211, 110, 0.42);
  background:
    linear-gradient(90deg, rgba(255, 211, 110, 0.07), transparent 38%),
    rgba(15, 17, 22, 0.92);
  opacity: 0.78;
}

.mobile-name-field input:focus {
  border-color: var(--cyan);
  outline: 2px solid rgba(85, 230, 255, 0.18);
}

.dash-card-action {
  min-width: 160px;
  margin-top: 4px;
  padding: 12px 18px;
  border: 1px solid rgba(85, 230, 255, 0.62);
  border-radius: 5px;
  background: rgba(85, 230, 255, 0.12);
  color: var(--text);
  font-size: 0.88rem;
  font-weight: 950;
  text-transform: uppercase;
}

.dash-mark {
  position: relative;
  display: block;
  width: 150px;
  height: 72px;
}

.dash-mark-orb {
  position: absolute;
  top: 10px;
  left: 50%;
  width: 52px;
  height: 52px;
  transform: translateX(-50%);
  border: 3px solid rgba(247, 242, 232, 0.9);
  border-radius: 50%;
  background:
    repeating-linear-gradient(112deg, var(--magenta) 0 7px, transparent 7px 15px),
    var(--cyan);
  box-shadow: inset -10px -9px 18px rgba(0, 0, 0, 0.35), 0 0 22px rgba(85, 230, 255, 0.58);
}

.dash-mark-wing {
  position: absolute;
  top: 24px;
  width: 54px;
  height: 24px;
}

.dash-mark-wing::before,
.dash-mark-wing::after {
  content: "";
  position: absolute;
  width: 48px;
  height: 3px;
  border-radius: 2px;
  background: var(--cyan);
  box-shadow: 0 0 13px rgba(85, 230, 255, 0.78);
}

.dash-mark-wing::before {
  top: 2px;
}

.dash-mark-wing::after {
  top: 16px;
  width: 36px;
}

.dash-mark-wing-left {
  left: 2px;
}

.dash-mark-wing-left::before,
.dash-mark-wing-left::after {
  right: 0;
  transform: rotate(12deg);
  transform-origin: right center;
}

.dash-mark-wing-right {
  right: 2px;
}

.dash-mark-wing-right::before,
.dash-mark-wing-right::after {
  left: 0;
  transform: rotate(-12deg);
  transform-origin: left center;
}

.dash-mark-small {
  width: 74px;
  height: 36px;
  transform: scale(0.48);
  transform-origin: left center;
  margin-right: -34px;
}

.dash-game {
  position: fixed;
  inset: 0;
  z-index: 60;
  overflow: hidden;
  background: #05070b;
  touch-action: none;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
}

.dash-game * {
  -webkit-user-select: none !important;
  user-select: none !important;
  -webkit-touch-callout: none !important;
  -webkit-tap-highlight-color: transparent;
}

#dash-canvas {
  width: 100%;
  height: 100%;
  display: block;
  background: #05070b;
}

.dash-blank-screen {
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: #000;
  cursor: none;
}

body.dash-blank-active {
  overflow: hidden;
}

.dash-hud {
  pointer-events: none;
  position: absolute;
  top: 16px;
  left: 50%;
  z-index: 4;
  display: grid;
  grid-template-columns: minmax(130px, 1fr) repeat(4, auto) 70px;
  gap: 14px;
  align-items: center;
  width: min(980px, calc(100vw - 32px));
  min-height: 76px;
  transform: translateX(-50%);
  padding: 10px 12px 10px 18px;
  border: 1px solid rgba(85, 230, 255, 0.35);
  border-radius: 6px;
  background: rgba(5, 7, 11, 0.82);
  box-shadow: 0 18px 52px rgba(0, 0, 0, 0.46);
  backdrop-filter: blur(12px);
}

.dash-hud-brand {
  display: flex;
  align-items: center;
  min-width: 0;
}

.dash-hud-brand > strong {
  font-size: 1.35rem;
  font-weight: 950;
  text-transform: uppercase;
}

.dash-stat,
.dash-breaks,
.dash-multiplier {
  display: grid;
  gap: 3px;
  min-width: 92px;
}

.dash-stat small,
.dash-breaks small,
.dash-multiplier small {
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 900;
  text-transform: uppercase;
}

.dash-stat strong {
  color: var(--text);
  font-size: 1.35rem;
  font-variant-numeric: tabular-nums;
  line-height: 1;
  white-space: nowrap;
}

.dash-multiplier {
  position: relative;
  align-content: center;
  min-width: 84px;
  padding-bottom: 5px;
}

.dash-multiplier strong {
  color: rgba(184, 176, 166, 0.64);
  font-size: 1.12rem;
  font-weight: 950;
  transition: color 160ms ease, text-shadow 160ms ease, transform 160ms ease;
}

.dash-multiplier > i {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  overflow: hidden;
  border-radius: 2px;
  background: rgba(184, 176, 166, 0.15);
}

.dash-multiplier > i::after {
  content: '';
  display: block;
  width: var(--dash-multiplier-progress, 0%);
  height: 100%;
  background: #55e6ff;
  box-shadow: 0 0 10px #55e6ff;
  transition: width 90ms linear;
}

.dash-multiplier.is-active strong {
  color: #55e6ff;
  text-shadow: 0 0 14px rgba(85, 230, 255, 0.72);
  transform: scale(1.08);
}

.dash-multiplier.is-triple strong {
  color: #ffd36e;
  text-shadow: 0 0 16px rgba(255, 211, 110, 0.8);
}

.dash-multiplier.is-triple > i::after {
  background: #ffd36e;
  box-shadow: 0 0 10px #ffd36e;
}

.dash-breaks span {
  display: flex;
  gap: 6px;
}

.dash-breaks i {
  width: 18px;
  height: 18px;
  border: 2px solid var(--gold);
  transform: rotate(45deg);
  background: rgba(215, 177, 95, 0.28);
  box-shadow: 0 0 12px rgba(215, 177, 95, 0.44);
}

.dash-breaks i.used {
  border-color: rgba(184, 176, 166, 0.28);
  background: transparent;
  box-shadow: none;
}

.dash-exit {
  pointer-events: auto;
  width: 64px;
  height: 44px;
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.dash-exit:hover,
.dash-exit:focus-visible {
  border-color: var(--cyan);
  outline: none;
}

.dash-launch-status {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 4;
  display: grid;
  justify-items: center;
  min-width: 240px;
  transform: translate(-50%, -50%);
  color: var(--text);
  text-align: center;
  text-shadow: 0 4px 18px #000;
  transition: transform 180ms ease, filter 180ms ease;
}

.dash-launch-status strong {
  margin: 7px 0;
  font-size: clamp(4.5rem, 14vw, 9rem);
  font-weight: 950;
  line-height: 0.9;
}

.dash-launch-status.is-charging {
  filter: drop-shadow(0 0 18px rgba(85, 230, 255, 0.64));
}

.dash-launch-status.is-firing {
  transform: translate(-50%, -50%) scale(1.12);
  filter: drop-shadow(0 0 26px rgba(255, 211, 110, 0.78));
}

.dash-launch-flash {
  pointer-events: none;
  position: absolute;
  inset: 0;
  z-index: 3;
  opacity: 0;
  background:
    radial-gradient(circle at 50% 58%, rgba(255, 255, 255, 0.9), rgba(85, 230, 255, 0.36) 18%, transparent 54%);
  mix-blend-mode: screen;
}

.dash-break-flash,
.dash-ammo-flash,
.dash-multiplier-flash {
  position: absolute;
  top: 25%;
  left: 50%;
  z-index: 4;
  transform: translateX(-50%);
  padding: 10px 18px;
  border: 1px solid currentColor;
  border-radius: 5px;
  background: rgba(5, 7, 11, 0.8);
  font-size: 0.82rem;
  font-weight: 950;
  text-transform: uppercase;
  animation: dash-notice 0.7s ease-out both;
}

.dash-break-flash {
  color: var(--gold);
}

.dash-ammo-flash {
  color: #9cff7a;
}

.dash-multiplier-flash {
  color: #55e6ff;
  font-size: 1.05rem;
  box-shadow: 0 0 24px rgba(85, 230, 255, 0.18);
}

.dash-multiplier-flash.is-triple {
  color: #ffd36e;
  box-shadow: 0 0 28px rgba(255, 211, 110, 0.22);
}

.dash-result {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 6;
  display: grid;
  justify-items: stretch;
  gap: 14px;
  width: min(420px, calc(100vw - 32px));
  transform: translate(-50%, -50%);
  padding: 28px;
  background: rgba(10, 11, 15, 0.94);
  text-align: center;
}

.dash-result p {
  margin: 0;
  color: var(--magenta);
  font-size: 0.76rem;
  font-weight: 950;
  text-transform: uppercase;
}

.dash-result h2 {
  font-size: 2rem;
}

.dash-result-score {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.dash-result-score span {
  display: grid;
  gap: 4px;
  padding: 13px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 5px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.dash-result-score strong {
  color: var(--cyan);
  font-size: 1.7rem;
}

.dash-controls {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 4;
  width: min(720px, calc(100vw - 28px));
  transform: translateX(-50%);
  padding: 10px 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 5px;
  background: rgba(5, 7, 11, 0.72);
  color: rgba(247, 242, 232, 0.76);
  font-size: 0.78rem;
  font-weight: 850;
  text-align: center;
}

.dash-controls kbd {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 24px;
  margin: 0 3px;
  border: 1px solid rgba(85, 230, 255, 0.44);
  border-radius: 3px;
  background: rgba(85, 230, 255, 0.1);
  color: var(--cyan);
  font: inherit;
}

.dash-controls-touch {
  display: none;
}

@keyframes dash-notice {
  0% { opacity: 0; transform: translate(-50%, 10px) scale(0.95); }
  22% { opacity: 1; transform: translate(-50%, 0) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -12px) scale(1); }
}

@media (min-width: 761px) {
  .arena-showcase {
    width: min(1180px, calc(100vw - 56px));
    gap: 28px;
  }

  .arena-mode-option,
  .dash-mode-card {
    height: clamp(460px, 51vh, 540px);
    min-height: 460px;
  }

  .arena-mode-option .character-card {
    min-height: 0;
  }

  .front-bottom {
    margin-top: 24px;
  }
}

@media (max-width: 760px), (hover: none) and (pointer: coarse) {
  .settings-button {
    top: 10px;
    left: 10px;
    min-width: 96px;
    min-height: 40px;
    padding: 8px 10px;
    font-size: 0.72rem;
  }

  .menu {
    display: block;
    padding: 68px 14px 22px;
    background: rgba(0, 0, 0, 0.42);
  }

  .menu > .brand-block,
  .menu > .arena-showcase,
  .menu > .front-bottom,
  .menu > .craft-arena-section {
    display: none !important;
  }

  .menu > .public-footer {
    display: grid;
    width: min(460px, 100%);
    margin: 18px auto 0;
    padding: 16px 4px 8px;
  }

  .menu > .public-footer nav {
    gap: 4px;
  }

  .menu > .public-footer a {
    padding: 7px 8px;
    font-size: 0.72rem;
  }

  .mobile-dash-hub {
    display: grid;
    grid-template-rows: auto minmax(132px, auto) minmax(360px, 1fr);
    gap: 18px;
    width: min(460px, 100%);
    min-height: calc(100dvh - 96px);
    margin: 0 auto;
  }

  .mobile-hub-brand {
    display: grid;
    justify-items: end;
    gap: 7px;
    min-height: 42px;
    padding-right: 4px;
  }

  .mobile-hub-brand span {
    font-size: clamp(1.55rem, 8vw, 2.15rem);
    font-weight: 950;
    line-height: 1;
  }

  .mobile-hub-brand sup {
    font-size: 0.4em;
  }

  .mobile-hub-brand > div {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    align-items: center;
    justify-content: flex-end;
  }

  .mobile-hub-brand small {
    color: var(--gold);
    font-size: 0.66rem;
    font-weight: 950;
    text-transform: uppercase;
  }

  .mobile-release-badge {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 4px 7px;
    border: 1px solid rgba(85, 230, 255, 0.58);
    border-radius: 3px;
    background: rgba(7, 12, 14, 0.78);
    color: var(--cyan);
    font-size: 0.6rem;
    font-weight: 950;
    line-height: 1;
    text-transform: uppercase;
  }

  .mobile-board-card {
    overflow: hidden;
    border-color: rgba(215, 177, 95, 0.52);
    background: rgba(11, 12, 15, 0.9);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.38);
  }

  .mobile-board-toggle {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 12px;
    align-items: center;
    width: 100%;
    min-height: 132px;
    padding: 24px;
    border: 0;
    background: transparent;
    color: var(--text);
    cursor: pointer;
    text-align: left;
  }

  .mobile-board-toggle span {
    display: grid;
    gap: 5px;
  }

  .mobile-board-toggle small {
    color: var(--gold);
    font-size: 0.68rem;
    font-weight: 900;
    text-transform: uppercase;
  }

  .mobile-board-toggle strong {
    font-size: clamp(1.65rem, 8vw, 2.15rem);
    font-weight: 950;
  }

  .mobile-board-toggle i {
    width: 16px;
    height: 16px;
    border-right: 2px solid var(--gold);
    border-bottom: 2px solid var(--gold);
    transform: rotate(45deg);
    transition: transform 160ms ease;
  }

  .mobile-board-toggle[aria-expanded="true"] i {
    transform: rotate(225deg);
  }

  .mobile-leaderboards {
    padding: 0 14px 16px;
  }

  .mobile-board-tabs {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
    margin-bottom: 10px;
  }

  .mobile-board-tabs button {
    min-height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
  }

  .mobile-board-tabs button.active {
    border-color: var(--cyan);
    color: var(--text);
    background: rgba(85, 230, 255, 0.1);
  }

  .mobile-board-list {
    display: grid;
    gap: 5px;
    max-height: 240px;
    margin: 0;
    overflow: auto;
    padding: 0;
    list-style: none;
  }

  .mobile-board-list li {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr) auto;
    gap: 8px;
    align-items: center;
    min-height: 38px;
    padding: 7px 9px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.06);
    font-size: 0.8rem;
  }

  .mobile-board-list li span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-board-list li small {
    color: var(--gold);
    font-weight: 900;
  }

  .dash-mode-card-mobile {
    min-height: 360px;
    height: auto;
    padding: 34px 22px;
    cursor: default;
  }

  .dash-mode-card-mobile > strong {
    font-size: clamp(3rem, 16vw, 4.6rem);
  }

  .dash-mode-card-mobile:hover,
  .dash-mode-card-mobile:focus-within {
    border-color: rgba(85, 230, 255, 0.72);
  }

  .mobile-dash-play {
    width: min(280px, 100%);
    min-height: 60px;
    margin-top: 8px;
    border-color: rgba(215, 177, 95, 0.88);
    background: linear-gradient(180deg, #f4d270, #d9aa3f);
    color: #0d0d0f;
    font-size: 1rem;
    font-weight: 950;
    text-transform: uppercase;
    box-shadow: 0 12px 30px rgba(215, 177, 95, 0.22);
  }

  .dash-hud {
    top: 8px;
    grid-template-areas:
      "score best exit"
      "brand multiplier breaks";
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px;
    grid-template-rows: auto auto;
    gap: 6px 8px;
    width: calc(100vw - 16px);
    min-height: 104px;
    padding: 8px;
  }

  .dash-hud-brand {
    grid-area: brand;
  }

  .dash-stat-score {
    grid-area: score;
  }

  .dash-stat-best {
    grid-area: best;
  }

  .dash-multiplier {
    grid-area: multiplier;
  }

  .dash-breaks {
    grid-area: breaks;
  }

  .dash-exit {
    grid-area: exit;
    align-self: center;
  }

  .dash-hud-brand .dash-mark {
    display: none;
  }

  .dash-hud-brand > strong {
    font-size: 1rem;
  }

  .dash-stat,
  .dash-breaks,
  .dash-multiplier {
    min-width: 0;
  }

  .dash-stat {
    gap: 4px;
    min-height: 42px;
    padding: 6px 9px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
  }

  .dash-stat small,
  .dash-breaks small,
  .dash-multiplier small {
    font-size: 0.52rem;
  }

  .dash-stat strong {
    font-size: 1.08rem;
  }

  .dash-multiplier strong {
    font-size: 0.94rem;
  }

  .dash-breaks span {
    gap: 3px;
  }

  .dash-breaks i {
    width: 9px;
    height: 9px;
    border-width: 1px;
  }

  .dash-exit {
    width: 42px;
    height: 38px;
    padding: 0;
    font-size: 0.58rem;
  }

  .dash-controls {
    bottom: 8px;
    padding: 8px 10px;
    font-size: 0.7rem;
  }

  .dash-controls-touch {
    display: inline;
  }

  .dash-controls-keyboard {
    display: none;
  }
}

@media (max-width: 420px) {
  .dash-hud-brand > strong {
    font-size: 0.82rem;
  }

  .dash-exit {
    width: 36px;
    font-size: 0.5rem;
  }
}

/* Keep the complete desktop lobby visible in shorter, non-fullscreen windows. */
@media (min-width: 761px) and (max-height: 950px) {
  .desktop-board-tabs {
    gap: 4px;
    margin-bottom: 4px;
  }

  .desktop-board-tabs button {
    min-height: 26px;
    font-size: 0.6rem;
  }

  #desktop-dash-leaderboard {
    gap: 3px;
    max-height: 52px;
  }

  #desktop-dash-leaderboard li {
    min-height: 27px;
    padding: 4px 7px;
    font-size: 0.68rem;
  }

  .menu {
    gap: 7px;
    padding: 6px 12px 8px;
  }

  .brand-block {
    gap: 7px;
    padding: 0;
  }

  .screen-instruction {
    gap: 5px;
    padding: 5px 9px;
    font-size: 0.68rem;
  }

  .screen-instruction kbd {
    min-width: 22px;
    height: 20px;
    padding: 0 5px;
    font-size: 0.62rem;
  }

  h1 {
    font-size: clamp(3rem, 5vw, 4.8rem);
    line-height: 1;
  }

  .menu-tagline {
    font-size: 0.74rem;
    line-height: 1.15;
  }

  .release-badge {
    min-height: 27px;
    margin-top: 0;
    padding: 5px 12px;
    font-size: 0.7rem;
  }

  .arena-showcase {
    width: min(1080px, calc(100vw - 48px));
    gap: 16px;
    margin: 2px 0 3px;
  }

  .arena-mode-option,
  .dash-mode-card {
    height: 278px;
    min-height: 278px;
    padding: 12px 16px;
  }

  .arena-mode-option {
    gap: 6px;
  }

  .arena-mode-option .character-card {
    min-height: 88px;
    padding: 7px;
  }

  .showcase-label {
    top: 8px;
    left: 10px;
    font-size: 0.66rem;
  }

  .customize-toggle {
    top: 7px;
    right: 9px;
    min-height: 28px;
    padding: 5px 8px;
    font-size: 0.62rem;
  }

  .menu-character {
    width: 116px;
    height: 112px;
    transform: scale(0.78);
  }

  .arena-mode-option .enter-arena {
    min-height: 42px;
    font-size: 0.86rem;
  }

  .private-duel-controls {
    gap: 4px;
    padding: 6px 8px;
  }

  .private-duel-heading strong {
    font-size: 0.74rem;
  }

  .private-duel-heading span,
  #private-duel-message {
    font-size: 0.64rem;
  }

  .private-duel-actions {
    gap: 5px;
  }

  .private-duel-actions button,
  .private-code-entry input {
    min-height: 32px;
    font-size: 0.68rem;
  }

  .dash-mode-card {
    gap: 5px;
  }

  .dash-mode-card::before {
    top: 12px;
  }

  .dash-mode-card::after {
    bottom: 12px;
  }

  .dash-card-kicker {
    font-size: 0.62rem;
  }

  .dash-mode-card > strong {
    font-size: 3rem;
  }

  .dash-card-copy {
    font-size: 0.7rem;
    line-height: 1.2;
  }

  .dash-card-score {
    margin-top: 0;
    font-size: 0.62rem;
  }

  .dash-card-score b {
    font-size: 0.9rem;
  }

  .dash-card-action {
    min-width: 130px;
    margin-top: 0;
    padding: 8px 14px;
    font-size: 0.7rem;
  }

  .player-name-message {
    min-height: 12px;
    font-size: 0.58rem;
    line-height: 1.1;
  }

  .front-bottom {
    gap: 14px;
    margin-top: 3px;
    padding-top: 7px;
  }

  .front-bottom > * + * {
    padding-left: 14px;
  }

  form.panel,
  .leaderboard {
    min-height: 116px;
    max-height: 132px;
    padding: 10px 12px;
  }

  form.panel {
    gap: 8px;
  }

  .leaderboard-head {
    margin-bottom: 5px;
  }

  .leaderboard-head h2 {
    font-size: 1.18rem;
  }

  .leaderboard-head span,
  .designation-panel label,
  .weapon-choice legend {
    font-size: 0.64rem;
  }

  #leaderboard-list {
    gap: 3px;
    max-height: 76px;
  }

  #leaderboard-list li {
    min-height: 27px;
    padding: 4px 7px;
    font-size: 0.68rem;
  }

  #leaderboard-list small {
    font-size: 0.62rem;
  }

  input#player-name {
    height: 34px;
    padding: 0 10px;
    font-size: 0.72rem;
  }

  .weapon-choice {
    gap: 6px;
  }

  .weapon-choice label {
    min-height: 34px;
    padding: 4px;
    font-size: 0.68rem;
  }

  .craft-arena-feature {
    grid-template-columns: minmax(190px, 0.36fr) minmax(0, 1fr);
    gap: 14px;
    margin: 3px auto 0;
    padding: 9px 12px;
  }

  .craft-arena-feature .craft-arena-heading {
    padding-right: 12px;
  }

  .craft-arena-feature .craft-arena-heading span {
    font-size: 1.08rem;
  }

  .craft-arena-feature .craft-arena-heading small {
    margin-top: 3px;
    font-size: 0.62rem;
  }

  .craft-arena-feature .arena-selection-rule {
    max-width: 280px;
    margin: 3px 0 0;
    font-size: 0.6rem;
    line-height: 1.15;
  }

  .craft-arena-feature .craft-arena-section {
    gap: 6px;
    padding: 5px 0;
  }

  .craft-arena-controls {
    grid-template-columns: minmax(180px, 0.68fr) minmax(0, 1.32fr);
    gap: 8px;
  }

  .craft-arena-feature .craft-arena-section select,
  .craft-arena-feature select,
  .craft-arena-feature .craft-arena-button,
  .craft-arena-feature .craft-arena-actions .secondary {
    height: 38px;
    min-height: 38px;
    font-size: 0.72rem;
  }

  .craft-arena-feature .craft-arena-actions .icon-command {
    width: 38px;
    height: 38px;
  }

  .craft-arena-actions {
    grid-template-columns: minmax(0, 1fr) 38px;
    gap: 6px;
  }

  .public-footer {
    gap: 3px;
    padding: 3px 8px 5px;
  }

  .public-footer a {
    padding: 3px 7px;
    font-size: 0.62rem;
  }

  .public-footer small {
    font-size: 0.58rem;
  }
}

@media (min-width: 761px) and (max-height: 760px) {
  .desktop-board-tabs {
    margin-bottom: 2px;
  }

  .desktop-board-tabs button {
    min-height: 22px;
    font-size: 0.56rem;
  }

  #desktop-dash-leaderboard {
    max-height: 30px;
  }

  .menu {
    align-content: center;
    gap: 4px;
    padding-top: 4px;
    padding-bottom: 4px;
  }

  .brand-block {
    gap: 3px;
  }

  .screen-instruction {
    padding: 3px 8px;
    font-size: 0.62rem;
  }

  h1 {
    font-size: clamp(2.65rem, 4.5vw, 4rem);
  }

  .menu-tagline {
    font-size: 0.66rem;
  }

  .release-badge {
    min-height: 23px;
    padding: 3px 10px;
    font-size: 0.62rem;
  }

  .arena-showcase {
    gap: 12px;
    margin: 0;
  }

  .arena-mode-option,
  .dash-mode-card {
    height: 222px;
    min-height: 222px;
    padding: 8px 12px;
  }

  .arena-mode-option .character-card {
    min-height: 62px;
    padding: 3px;
  }

  .menu-character {
    width: 102px;
    height: 98px;
    transform: scale(0.66);
  }

  .arena-mode-option .enter-arena {
    min-height: 34px;
    font-size: 0.72rem;
  }

  .private-duel-controls {
    padding: 4px 6px;
  }

  .private-duel-actions button,
  .private-code-entry input {
    min-height: 28px;
    font-size: 0.64rem;
  }

  #private-duel-message {
    min-height: 0;
    line-height: 1;
  }

  .dash-mark {
    height: 48px;
    margin: -8px 0;
    transform: scale(0.7);
  }

  .dash-mode-card > strong {
    font-size: 2.45rem;
  }

  .dash-card-copy {
    font-size: 0.62rem;
  }

  .dash-card-action {
    padding: 6px 12px;
  }

  .front-bottom {
    margin-top: 0;
    padding-top: 4px;
  }

  form.panel,
  .leaderboard {
    min-height: 98px;
    max-height: 106px;
    padding: 7px 10px;
  }

  form.panel {
    gap: 5px;
  }

  .leaderboard-head {
    margin-bottom: 2px;
  }

  .leaderboard-head h2 {
    font-size: 1rem;
  }

  #leaderboard-list {
    max-height: 58px;
  }

  input#player-name,
  .weapon-choice label {
    height: 28px;
    min-height: 28px;
  }

  .craft-arena-feature {
    gap: 10px;
    margin-top: 0;
    padding: 6px 10px;
  }

  .craft-arena-feature .craft-arena-heading span {
    font-size: 0.92rem;
  }

  .craft-arena-feature .arena-selection-rule {
    max-width: 260px;
    margin-top: 2px;
    font-size: 0.54rem;
  }

  .craft-arena-feature .craft-arena-section select,
  .craft-arena-feature select,
  .craft-arena-feature .craft-arena-button,
  .craft-arena-feature .craft-arena-actions .secondary,
  .craft-arena-feature .craft-arena-actions .icon-command {
    height: 32px;
    min-height: 32px;
  }

  .public-footer {
    padding: 1px 6px 2px;
  }

  .public-footer a {
    padding: 2px 6px;
    font-size: 0.56rem;
  }

  .public-footer small {
    font-size: 0.52rem;
  }
}

/* Give the sphere color controls their own layout space on short desktop viewports. */
@media (min-width: 761px) {
  .arena-mode-option.customizer-open {
    height: auto;
    min-height: 460px;
    overflow: visible;
  }

  .arena-mode-option.customizer-open .character-card {
    display: grid;
    align-items: stretch;
    min-height: 190px;
    height: auto;
    overflow: visible;
    padding: 48px 12px 12px;
  }

  .arena-mode-option.customizer-open .menu-character {
    display: none;
  }

  .arena-mode-option.customizer-open .customize-panel {
    position: relative;
    inset: auto;
    z-index: 4;
    width: 100%;
    max-width: none;
    max-height: min(220px, calc(100dvh - 130px));
    overflow-x: hidden;
    overflow-y: auto;
  }
}

@media (min-width: 761px) and (max-height: 950px) {
  .arena-mode-option.customizer-open {
    min-height: 360px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dash-mode-card *,
  .dash-game * {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Keep gameplay instructions and public links comfortably readable. */
@media (min-width: 761px) {
  .dash-controls {
    bottom: 20px;
    width: min(980px, calc(100vw - 40px));
    padding: 13px 18px;
    font-size: 1rem;
    line-height: 1.65;
  }

  .dash-controls kbd {
    min-width: 32px;
    height: 30px;
    margin: 0 4px;
  }

  .public-footer a {
    padding: 8px 12px;
    font-size: 0.96rem;
  }

  .public-footer small {
    font-size: 0.86rem;
  }
}

@media (min-width: 761px) and (max-height: 760px) {
  .dash-controls {
    bottom: 10px;
    padding: 10px 14px;
    font-size: 0.9rem;
  }

  .public-footer a {
    padding: 5px 9px;
    font-size: 0.84rem;
  }

  .public-footer small {
    font-size: 0.76rem;
  }
}

@media (max-width: 760px), (hover: none) and (pointer: coarse) {
  .menu > .public-footer a {
    padding: 8px 9px;
    font-size: 0.82rem;
  }

  .menu > .public-footer small {
    font-size: 0.76rem;
  }
}
