:root {
  color-scheme: dark;
  --bg: #060b14;
  --bg-deep: #04070f;
  --surface: rgba(10, 17, 30, 0.78);
  --surface-strong: rgba(9, 15, 28, 0.9);
  --surface-soft: rgba(18, 31, 53, 0.66);
  --line: rgba(117, 232, 255, 0.18);
  --line-strong: rgba(131, 244, 255, 0.34);
  --text: #f3f8ff;
  --muted: #9aa9bc;
  --accent: #77f6ff;
  --accent-2: #7dffb2;
  --accent-3: #ffcb6b;
  --danger: #ff6678;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
  --radius-lg: 28px;
  --radius-md: 20px;
  --radius-sm: 14px;
  --font-ui: "Space Grotesk", "Segoe UI Variable Text", "Segoe UI", sans-serif;
  --font-display: "Orbitron", "Bahnschrift SemiBold", "Arial Narrow", sans-serif;
  --icon-host: url('/assets/ui/icons/host-badge-icon-v1-tight.png');
  --icon-open-slot: url('/assets/ui/icons/open-slot-icon-v1-tight.png');
  --icon-ready: url('/assets/ui/icons/ready-icon-v1-tight.png');
  --icon-not-ready: url('/assets/ui/icons/not-ready-icon-v1-tight.png');
  --icon-copy-success: url('/assets/ui/icons/copy-success-icon-v1-tight.png');
  --icon-beacon: url('/assets/ui/icons/beacon-icon-v1-tight.png');
  --icon-bot: url('/assets/ui/icons/bot-icon-v1-tight.png');
  --icon-hud-time: url('/assets/ui/icons/hud-time-icon-v1-tight.png');
  --icon-hud-alive: url('/assets/ui/icons/hud-alive-icon-v1-tight.png');
  --icon-hud-dash: url('/assets/ui/icons/hud-dash-icon-v1-tight.png');
  --icon-hud-push: url('/assets/ui/icons/hud-push-icon-v1-tight.png');
  --icon-hud-status: url('/assets/ui/icons/hud-status-icon-v1-tight.png');
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body {
  background:
    radial-gradient(circle at 12% 10%, rgba(125, 255, 178, 0.08), transparent 22rem),
    radial-gradient(circle at 88% 12%, rgba(119, 246, 255, 0.1), transparent 26rem),
    linear-gradient(180deg, rgba(3, 7, 15, 0.4), rgba(3, 6, 12, 0.94)),
    var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

body::before {
  background:
    linear-gradient(180deg, rgba(2, 6, 11, 0.76), rgba(2, 5, 10, 0.9)),
    center top / cover no-repeat url('/assets/backgrounds/space-background-final-v2.png');
  content: "";
  filter: blur(5px) saturate(0.72);
  inset: 0;
  opacity: 0.22;
  pointer-events: none;
  position: fixed;
  transform: scale(1.03);
}

body::after {
  background:
    linear-gradient(180deg, rgba(3, 6, 12, 0.28), rgba(3, 6, 12, 0.1)),
    radial-gradient(circle at 20% 22%, rgba(119, 246, 255, 0.05), transparent 16rem),
    radial-gradient(circle at 78% 30%, rgba(125, 255, 178, 0.04), transparent 18rem);
  content: "";
  inset: 0;
  pointer-events: none;
  position: fixed;
}

body:has(#gameScreen:not([hidden])) {
  overflow: hidden;
}

button,
input {
  font: inherit;
}

button {
  background: linear-gradient(180deg, #9afafc, var(--accent));
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  box-shadow: 0 8px 22px rgba(119, 246, 255, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  color: #031017;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  min-height: 2.85rem;
  padding: 0.72rem 1.08rem;
  text-transform: uppercase;
  transition: transform 140ms ease, filter 140ms ease, box-shadow 140ms ease, border-color 140ms ease;
}

button:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.24);
  box-shadow: 0 12px 28px rgba(119, 246, 255, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  filter: brightness(1.04) saturate(1.04);
  transform: translateY(-1px);
}

button:active:not(:disabled) {
  transform: translateY(1px);
}

button:disabled {
  background: rgba(22, 30, 43, 0.76);
  border-color: rgba(154, 169, 188, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  color: rgba(193, 206, 222, 0.42);
  cursor: not-allowed;
  filter: saturate(0.55);
  opacity: 0.72;
}

.button-secondary {
  background: rgba(10, 20, 34, 0.74);
  border-color: rgba(119, 246, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.button-secondary:hover:not(:disabled) {
  background: rgba(13, 27, 45, 0.82);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

.button-secondary.copied {
  background: rgba(125, 255, 178, 0.14);
  border-color: rgba(125, 255, 178, 0.28);
  color: var(--accent-2);
}

#copyRoomCodeButton.copied::before {
  background-image: var(--icon-copy-success);
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  content: "";
  display: inline-block;
  flex: 0 0 auto;
  height: 28px;
  margin-right: 0.35rem;
  vertical-align: middle;
  width: 28px;
}

.danger-button {
  background: linear-gradient(180deg, #ff9aa7, var(--danger));
  box-shadow: 0 10px 28px rgba(255, 102, 120, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  color: #23060c;
}

input {
  background: rgba(5, 11, 21, 0.8);
  border: 1px solid rgba(119, 246, 255, 0.18);
  border-radius: 16px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 0 0 0 rgba(119, 246, 255, 0);
  color: var(--text);
  min-height: 3rem;
  padding: 0.82rem 0.95rem;
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

input::placeholder {
  color: rgba(243, 248, 255, 0.5);
}

input:focus,
button:focus-visible {
  border-color: var(--line-strong);
  box-shadow: 0 0 0 4px rgba(119, 246, 255, 0.11);
  outline: none;
}

.app-shell {
  margin: 0 auto;
  max-width: 1380px;
  min-height: 100vh;
  padding: clamp(0.8rem, 1.7vw, 1.35rem);
  position: relative;
  width: 100%;
  z-index: 1;
}

.config-banner {
  background: rgba(255, 203, 107, 0.12);
  border: 1px solid rgba(255, 203, 107, 0.26);
  border-radius: 16px;
  color: #ffe1a3;
  font-size: 0.9rem;
  margin: 0 0 0.8rem;
  padding: 0.8rem 0.95rem;
}

.config-banner.status-info {
  background: rgba(119, 246, 255, 0.1);
  border-color: rgba(119, 246, 255, 0.24);
  color: #c9f8ff;
}

.config-banner.status-success {
  background: rgba(125, 255, 178, 0.1);
  border-color: rgba(125, 255, 178, 0.22);
  color: #d8ffe8;
}

.config-banner.status-error {
  background: rgba(255, 102, 120, 0.12);
  border-color: rgba(255, 102, 120, 0.26);
  color: #ffd4da;
}

.app-shell:has(#lobbyScreen:not([hidden])) {
  max-width: none;
  padding: 0.8rem 1rem 1rem;
}

.app-shell:has(#gameScreen:not([hidden])) {
  max-width: none;
  padding: 0.3rem;
}

.screen {
  animation: screen-in 220ms ease both;
  display: grid;
  gap: clamp(0.7rem, 1vw, 0.9rem);
}

@keyframes screen-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.panel,
.game-hud,
.game-frame {
  background: linear-gradient(180deg, rgba(13, 22, 38, 0.8), rgba(7, 12, 22, 0.92));
  backdrop-filter: blur(16px);
  border: 1px solid rgba(117, 232, 255, 0.12);
  border-radius: 24px;
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.07);
  overflow: hidden;
  padding: 1rem;
  position: relative;
}

.panel::before,
.game-hud::before {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 42%),
    center / cover no-repeat url('/assets/ui/ui-panels.png');
  content: "";
  inset: 0;
  opacity: 0.035;
  pointer-events: none;
  position: absolute;
}

.panel > *,
.game-hud > * {
  position: relative;
  z-index: 1;
}

.panel h1,
.panel h2,
.panel h3,
.end-panel h2 {
  font-family: var(--font-display);
  letter-spacing: 0.02em;
  margin: 0;
}

.panel h1 {
  font-size: clamp(1.4rem, 2.2vw, 1.9rem);
}

.panel h2 {
  font-size: clamp(1rem, 1.65vw, 1.28rem);
}

.panel h3 {
  font-size: 0.96rem;
}

.panel p,
.panel li,
.panel span {
  line-height: 1.55;
}

.eyebrow {
  color: var(--accent-3);
  font-family: var(--font-display);
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.22em;
  margin: 0;
  text-transform: uppercase;
}

.panel-heading,
.panel-header,
.end-actions {
  align-items: start;
  display: flex;
  gap: 0.9rem;
  justify-content: space-between;
}

.end-actions {
  justify-content: center;
}

.end-actions > button {
  min-width: 12rem;
}

.panel-note,
.brand-subtitle,
.support-note,
.lobby-status {
  color: #c1cede;
  font-size: 0.9rem;
  margin: 0;
}

.menu-screen {
  align-content: start;
  min-height: calc(100vh - 1.4rem);
}

.top-header {
  align-items: center;
  display: grid;
  gap: 0.45rem;
  justify-items: center;
  min-height: 176px;
  overflow: hidden;
  padding: 1rem 1.2rem 1.25rem;
}

.top-header::after {
  display: none;
}

.brand-lockup {
  align-items: center;
  display: grid;
  gap: 0.68rem;
  grid-template-columns: minmax(0, 1fr);
  justify-items: center;
  max-width: 860px;
  width: 100%;
}

.brand-copy {
  display: grid;
  gap: 0.16rem;
  justify-items: center;
  text-align: center;
  position: relative;
  z-index: 1;
}

.brand-title-logo {
  filter: drop-shadow(0 0 14px rgba(119, 246, 255, 0.11));
  height: auto;
  max-width: min(100%, 640px);
  width: clamp(420px, 46vw, 640px);
}

.brand-subtitle {
  font-size: 1rem;
  max-width: 38rem;
  position: relative;
  z-index: 1;
}

.header-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: flex-end;
  position: absolute;
  right: 1.15rem;
  top: 0.9rem;
  z-index: 2;
}

.header-pills span {
  background: rgba(8, 16, 28, 0.28);
  border: 1px solid rgba(119, 246, 255, 0.08);
  border-radius: 999px;
  color: rgba(243, 248, 255, 0.64);
  display: inline-flex;
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  padding: 0.3rem 0.54rem;
  white-space: nowrap;
}

.room-chip,
.player-tag,
.control-chip {
  background: rgba(7, 16, 28, 0.72);
  border: 1px solid rgba(119, 246, 255, 0.16);
  border-radius: 999px;
  color: var(--text);
  display: inline-flex;
  font-size: 0.76rem;
  font-weight: 700;
  padding: 0.42rem 0.78rem;
}

.menu-layout {
  align-items: start;
  display: grid;
  gap: 0.8rem;
  grid-template-areas:
    "actions rooms"
    "support rooms";
  grid-template-columns: minmax(0, 1.12fr) minmax(340px, 0.92fr);
}

.action-panel {
  display: grid;
  gap: 0.65rem;
  grid-area: actions;
}

.action-panel::after {
  background-image: url('/assets/ui/icons/lobby-launch-panel-accent-v1.png');
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  content: "";
  inset: 0;
  opacity: 0.18;
  pointer-events: none;
  position: absolute;
}

.field-card {
  background: linear-gradient(180deg, rgba(12, 23, 38, 0.92), rgba(8, 14, 26, 0.94));
  border: 1px solid rgba(119, 246, 255, 0.1);
  border-radius: var(--radius-md);
  display: grid;
  gap: 0.4rem;
  padding: 0.82rem 0.9rem;
}

.field-label,
.support-label {
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.action-grid {
  display: grid;
  gap: 0.8rem;
  grid-template-columns: minmax(0, 1.08fr) minmax(310px, 0.94fr);
}

.action-card {
  background: linear-gradient(180deg, rgba(11, 21, 36, 0.92), rgba(7, 13, 23, 0.98));
  border: 1px solid rgba(119, 246, 255, 0.1);
  border-radius: var(--radius-md);
  display: grid;
  gap: 0.72rem;
  min-height: 178px;
  padding: 0.9rem;
}

.action-card-primary {
  background:
    radial-gradient(circle at top right, rgba(125, 255, 178, 0.1), transparent 10rem),
    linear-gradient(180deg, rgba(15, 33, 47, 0.98), rgba(7, 17, 28, 0.98));
  border-color: rgba(125, 255, 178, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 18px 36px rgba(3, 10, 18, 0.26);
}

.action-card-secondary {
  background: linear-gradient(180deg, rgba(10, 17, 29, 0.86), rgba(7, 12, 22, 0.94));
  min-width: 0;
  padding: 0.96rem;
}

.action-copy {
  display: grid;
  gap: 0.32rem;
}

.action-copy p:last-child {
  color: #b4c1d2;
  font-size: 0.9rem;
  margin: 0;
}

.action-card-primary button {
  min-height: 3rem;
  width: fit-content;
}

.join-form,
.inline-form {
  display: grid;
  gap: 0.65rem;
  grid-template-columns: minmax(0, 1fr) auto;
}

.join-form {
  align-items: end;
  grid-template-columns: minmax(0, 1fr) auto;
}

.join-form input {
  letter-spacing: 0.08em;
  min-width: 0;
}

.join-form button {
  min-width: 7.8rem;
  padding-inline: 0.9rem;
  white-space: nowrap;
}

.rooms-panel {
  align-self: start;
  display: grid;
  gap: 0.58rem;
  grid-area: rooms;
}

.sound-widget {
  bottom: 18px;
  left: 18px;
  position: fixed;
  width: min(320px, calc(100vw - 24px));
  z-index: 40;
}

.sound-widget-panel {
  background: linear-gradient(180deg, rgba(8, 17, 31, 0.94), rgba(6, 13, 24, 0.96));
  border: 1px solid rgba(119, 246, 255, 0.18);
  border-radius: 18px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34), 0 0 0 1px rgba(119, 246, 255, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  margin-bottom: 0.62rem;
  opacity: 0;
  padding: 0.82rem 0.86rem 0.9rem;
  pointer-events: none;
  transform: translateY(10px) scale(0.98);
  transform-origin: bottom left;
  transition: opacity 180ms ease, transform 180ms ease;
}

.sound-widget.open .sound-widget-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.sound-widget-header {
  display: grid;
  gap: 0.12rem;
  margin-bottom: 0.7rem;
}

.sound-widget-header h2 {
  color: #d7eff8;
  font-size: 0.96rem;
}

.sound-widget-toggle {
  align-items: center;
  background: linear-gradient(180deg, rgba(8, 17, 31, 0.92), rgba(6, 13, 24, 0.96));
  border: 1px solid rgba(119, 246, 255, 0.18);
  border-radius: 999px;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.26), 0 0 0 1px rgba(119, 246, 255, 0.04), inset 0 1px 0 rgba(255, 255, 255, 0.04);
  color: #d7eff8;
  display: inline-flex;
  gap: 0.65rem;
  justify-content: flex-start;
  min-height: 3rem;
  padding: 0.7rem 0.9rem;
  text-transform: uppercase;
  width: 220px;
}

.sound-widget-toggle:hover {
  border-color: rgba(119, 246, 255, 0.3);
}

.sound-widget-icon {
  background-image: url('/assets/ui/icons/sound-widget-icon-v1-tight.png');
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  display: inline-block;
  filter: drop-shadow(0 0 12px rgba(119, 246, 255, 0.18));
  height: 20px;
  width: 20px;
}

.sound-widget-label {
  color: #d7eff8;
  font-family: var(--font-display);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
}

.sound-widget-chevron {
  border-right: 2px solid rgba(119, 246, 255, 0.8);
  border-top: 2px solid rgba(119, 246, 255, 0.8);
  height: 8px;
  margin-left: auto;
  transform: rotate(135deg);
  transition: transform 160ms ease;
  width: 8px;
}

.sound-widget.open .sound-widget-chevron {
  transform: rotate(-45deg);
}

.sound-control-list {
  display: grid;
  gap: 0.58rem;
}

.sound-row {
  align-items: center;
  background: linear-gradient(180deg, rgba(10, 19, 33, 0.82), rgba(8, 14, 26, 0.9));
  border: 1px solid rgba(119, 246, 255, 0.1);
  border-radius: 14px;
  display: grid;
  gap: 0.7rem;
  grid-template-columns: 56px minmax(0, 1fr) 50px;
  padding: 0.62rem 0.74rem;
}

.sound-row-slider {
  grid-template-columns: 56px minmax(0, 1fr) 50px;
}

.sound-label {
  color: #d7eff8;
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sound-slider {
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  height: 22px;
  width: 100%;
}

.sound-slider:focus {
  outline: none;
}

.sound-slider::-webkit-slider-runnable-track {
  background: linear-gradient(90deg, rgba(119, 246, 255, 0.58), rgba(119, 246, 255, 0.1));
  border-radius: 999px;
  height: 6px;
}

.sound-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  background: linear-gradient(180deg, #bff9ff, var(--accent));
  border: 2px solid rgba(3, 16, 23, 0.7);
  border-radius: 999px;
  box-shadow: 0 0 0 4px rgba(119, 246, 255, 0.12);
  height: 18px;
  margin-top: -6px;
  width: 18px;
}

.sound-slider::-moz-range-track {
  background: linear-gradient(90deg, rgba(119, 246, 255, 0.58), rgba(119, 246, 255, 0.1));
  border: 0;
  border-radius: 999px;
  height: 6px;
}

.sound-slider::-moz-range-thumb {
  background: linear-gradient(180deg, #bff9ff, var(--accent));
  border: 2px solid rgba(3, 16, 23, 0.7);
  border-radius: 999px;
  box-shadow: 0 0 0 4px rgba(119, 246, 255, 0.12);
  height: 18px;
  width: 18px;
}

.sound-value {
  color: #d7eff8;
  font-family: var(--font-display);
  font-size: 0.8rem;
  justify-self: end;
}

.sound-toggle-row {
  display: grid;
  gap: 0.52rem;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 0.72rem;
}

.sound-quick-toggle {
  background: rgba(10, 20, 34, 0.88);
  border-color: rgba(119, 246, 255, 0.16);
  color: #d7eff8;
  min-height: 2.6rem;
  padding-inline: 0.7rem;
}

.sound-quick-toggle.active {
  background: linear-gradient(180deg, rgba(119, 246, 255, 0.18), rgba(40, 110, 126, 0.18));
  border-color: rgba(119, 246, 255, 0.28);
  box-shadow: 0 0 0 1px rgba(119, 246, 255, 0.05), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.rooms-panel::after {
  background-image: url('/assets/ui/icons/lobby-open-rooms-panel-accent-v1.png');
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  content: "";
  inset: 0;
  opacity: 0.16;
  pointer-events: none;
  position: absolute;
}

.room-list,
.player-list,
.standings-list {
  display: grid;
  gap: 0.6rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.open-room-card,
.player-list li,
.standings-list li,
.room-list-empty {
  background: linear-gradient(180deg, rgba(7, 15, 26, 0.8), rgba(6, 11, 20, 0.96));
  border: 1px solid rgba(119, 246, 255, 0.1);
  border-radius: var(--radius-md);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.open-room-card {
  align-items: center;
  display: grid;
  gap: 0.7rem;
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 0.85rem 0.9rem;
  transition: border-color 140ms ease, transform 140ms ease, background 140ms ease;
}

.open-room-card:hover {
  background: linear-gradient(180deg, rgba(8, 17, 30, 0.84), rgba(6, 11, 20, 0.98));
  border-color: rgba(119, 246, 255, 0.18);
  transform: translateY(-1px);
}

.room-card-main,
.support-grid,
.support-block,
.player-name-stack {
  display: grid;
  gap: 0.35rem;
}

.room-card-top {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: space-between;
}

.room-code-badge {
  background: rgba(119, 246, 255, 0.1);
  border: 1px solid rgba(119, 246, 255, 0.16);
  border-radius: 999px;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  padding: 0.34rem 0.7rem;
  text-transform: uppercase;
}

.room-card-meta {
  color: #afbdd0;
  font-size: 0.88rem;
  margin: 0;
}

.room-chip-row,
.control-row,
.player-tags,
.lobby-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.room-list-empty {
  align-items: center;
  display: grid;
  gap: 0.72rem;
  justify-items: start;
  min-height: 164px;
  padding: 0.9rem;
}

.empty-rooms-visual {
  background:
    radial-gradient(circle at center, rgba(119, 246, 255, 0.16), transparent 58%),
    radial-gradient(circle at center, rgba(125, 255, 178, 0.08), transparent 74%),
    linear-gradient(180deg, rgba(9, 18, 32, 0.78), rgba(6, 12, 22, 0.96));
  border: 1px solid rgba(119, 246, 255, 0.08);
  border-radius: 16px;
  display: grid;
  height: 128px;
  place-items: center;
  overflow: hidden;
  position: relative;
  width: 100%;
}

.empty-rooms-visual::before {
  background: radial-gradient(circle at center, rgba(119, 246, 255, 0.18), transparent 58%);
  content: "";
  inset: 0;
  position: absolute;
}

.empty-rooms-visual::after {
  background:
    radial-gradient(circle at center, rgba(119, 246, 255, 0.22), transparent 38%),
    linear-gradient(90deg, transparent 0%, rgba(119, 246, 255, 0.12) 50%, transparent 100%);
  border-radius: 999px;
  content: "";
  height: 56px;
  left: 50%;
  opacity: 0.8;
  position: absolute;
  top: 50%;
  transform: translate(-50%, 12px);
  width: 180px;
}

.empty-rooms-art {
  filter: drop-shadow(0 0 42px rgba(119, 246, 255, 0.24));
  height: auto;
  max-height: 108px;
  max-width: 108px;
  object-fit: contain;
  position: relative;
  width: 100%;
  z-index: 1;
}

.empty-state-copy,
.empty-state-actions {
  display: grid;
  gap: 0.4rem;
}

.empty-state-title {
  font-family: var(--font-display);
  font-size: 0.94rem;
}

.room-list-empty p,
.empty-state-hint {
  color: #c1cede;
  font-size: 0.86rem;
  margin: 0;
}

.empty-state-actions {
  align-items: center;
  grid-template-columns: auto minmax(0, 1fr);
}

.empty-state-hint {
  font-size: 0.8rem;
}

.support-panel {
  align-items: center;
  display: grid;
  gap: 0.75rem;
  grid-area: support;
  grid-template-columns: auto minmax(0, 1fr);
  padding-block: 0.68rem;
}

.support-panel::after {
  background-image: url('/assets/ui/icons/lobby-quick-rules-panel-accent-v1.png');
  background-position: center bottom;
  background-repeat: no-repeat;
  background-size: 94% auto;
  content: "";
  inset: 0;
  opacity: 0.2;
  pointer-events: none;
  position: absolute;
}

.support-grid {
  align-items: start;
  display: grid;
  gap: 0.45rem;
  grid-template-columns: repeat(2, auto) minmax(0, 1fr);
}

.support-block {
  background: rgba(7, 16, 28, 0.34);
  border: 1px solid rgba(119, 246, 255, 0.06);
  border-radius: 14px;
  padding: 0.48rem 0.58rem;
}

.control-row {
  gap: 0.42rem;
}

.control-chip {
  color: rgba(243, 248, 255, 0.88);
}

.support-note {
  align-self: center;
  font-size: 0.84rem;
  grid-column: auto;
  padding-top: 0;
}

.lobby-screen {
  align-content: start;
  min-height: 0;
}

.lobby-layout {
  display: grid;
  gap: 1rem;
  grid-template-areas: "info roster";
  grid-template-columns: minmax(360px, 430px) minmax(0, 1fr);
  min-height: 0;
}

.lobby-card {
  display: grid;
  gap: 0.9rem;
}

.lobby-card-info {
  align-self: start;
  grid-area: info;
}

.lobby-room-head {
  display: grid;
  gap: 0.45rem;
}

.lobby-code-row {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.lobby-card-info strong#lobbyRoomCode {
  color: var(--accent);
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 5vw, 3rem);
  letter-spacing: 0.14em;
  line-height: 0.95;
}

.copy-feedback {
  color: var(--accent-2);
  font-size: 0.82rem;
  font-weight: 700;
  margin: 0;
}

.copy-feedback::before {
  background-image: var(--icon-copy-success);
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  content: "";
  display: inline-flex;
  height: 28px;
  margin-right: 0.42rem;
  transform-origin: center;
  width: 28px;
}

.copy-feedback:not([hidden]) {
  animation: copy-feedback-pop 420ms ease;
}

.room-status-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.room-status-pill {
  align-items: center;
  background: rgba(8, 16, 28, 0.56);
  border: 1px solid rgba(119, 246, 255, 0.1);
  border-radius: 999px;
  color: #d0dae8;
  display: inline-flex;
  gap: 0.66rem;
  min-height: 2.5rem;
  padding: 0.42rem 0.94rem;
}

.room-status-pill strong {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 0.96rem;
  line-height: 1;
}

.room-status-pill span:last-child {
  font-size: 0.86rem;
}

.room-status-pill-neutral {
  background: rgba(7, 16, 28, 0.38);
}

.lobby-status-stack {
  display: grid;
  gap: 0.24rem;
}

.tile-label,
.lobby-status {
  align-items: center;
  display: inline-flex;
  gap: 0.45rem;
}

.lobby-status::before {
  background: radial-gradient(circle, rgba(119, 246, 255, 0.95) 0 35%, transparent 36%);
  border: 1px solid rgba(119, 246, 255, 0.2);
  border-radius: 999px;
  content: "";
  flex: 0 0 auto;
  height: 22px;
  width: 22px;
}

.status-indicator {
  display: inline-block;
  flex: 0 0 auto;
  position: relative;
}

.status-indicator-signal {
  background: radial-gradient(circle, rgba(119, 246, 255, 0.95) 0 35%, transparent 36%);
  border: 1px solid rgba(119, 246, 255, 0.2);
  border-radius: 999px;
  height: 12px;
  width: 12px;
}

.status-indicator-signal::after {
  border: 1px solid rgba(119, 246, 255, 0.16);
  border-radius: 999px;
  content: "";
  inset: -4px;
  position: absolute;
}

.status-indicator-squad {
  background:
    radial-gradient(circle at 25% 50%, rgba(119, 246, 255, 0.9) 0 26%, transparent 27%),
    radial-gradient(circle at 72% 34%, rgba(125, 255, 178, 0.86) 0 22%, transparent 23%),
    radial-gradient(circle at 72% 68%, rgba(255, 203, 107, 0.82) 0 20%, transparent 21%);
  height: 24px;
  width: 26px;
}

.status-indicator-beacon {
  background-image: var(--icon-beacon);
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  height: 24px;
  width: 24px;
}

.lobby-start-hint,
.empty-slot-copy {
  color: #d0dae8;
  font-size: 0.84rem;
  margin: 0;
}

.lobby-action-section {
  background: rgba(7, 15, 26, 0.34);
  border: 1px solid rgba(119, 246, 255, 0.08);
  border-radius: 18px;
  display: grid;
  gap: 0.46rem;
  padding: 0.68rem 0.76rem;
}

.section-copy {
  display: grid;
  gap: 0.12rem;
}

.section-copy h2 {
  font-size: 1rem;
}

.control-helper-text {
  color: #d0dae8;
  font-size: 0.78rem;
  margin: 0;
}

.host-primary-row button:disabled,
.host-secondary-row button:disabled {
  border-color: rgba(154, 169, 188, 0.08);
  color: rgba(193, 206, 222, 0.34);
  filter: grayscale(0.2);
}

.personal-action-row,
.host-primary-row,
.lobby-leave-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.host-primary-row button {
  min-height: 3rem;
  width: 100%;
}

.host-controls-panel {
  background: linear-gradient(180deg, rgba(8, 16, 28, 0.42), rgba(7, 14, 24, 0.34));
}

.host-controls-panel .section-copy {
  gap: 0.16rem;
}

.host-controls-panel #hostControlsHint {
  color: #d7e3f0;
  font-size: 0.82rem;
}

.host-secondary-row {
  display: grid;
  gap: 0.52rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.host-secondary-row button {
  min-width: 0;
  width: 100%;
}

.host-secondary-row button:nth-child(3) {
  grid-column: 1 / -1;
}

.host-controls-panel .control-helper-text {
  background: rgba(8, 16, 28, 0.44);
  border: 1px solid rgba(119, 246, 255, 0.08);
  border-radius: 14px;
  padding: 0.5rem 0.58rem;
}

.host-primary-row button:not(:disabled) {
  box-shadow: 0 10px 24px rgba(119, 246, 255, 0.16), inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.host-secondary-row button:not(:disabled) {
  background: rgba(10, 20, 34, 0.82);
}

.host-secondary-row button:disabled {
  background: rgba(18, 26, 38, 0.72);
  border-color: rgba(154, 169, 188, 0.08);
  color: rgba(193, 206, 222, 0.32);
  cursor: not-allowed;
  text-shadow: none;
}

.host-secondary-row button:disabled:hover {
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transform: none;
}

.host-controls-panel[hidden] {
  display: none !important;
}

.lobby-leave-row {
  padding-top: 0.15rem;
}

.lobby-card-roster {
  align-content: start;
  display: grid;
  gap: 0.5rem;
  grid-area: roster;
  min-height: 0;
  grid-template-rows: auto auto minmax(0, 1fr);
}

.lobby-card-roster .panel-header {
  margin-bottom: -0.1rem;
}

.lobby-status {
  max-width: 30rem;
}

.roster-count-badge {
  background: rgba(8, 16, 28, 0.52);
  border: 1px solid rgba(119, 246, 255, 0.1);
  border-radius: 999px;
  color: rgba(243, 248, 255, 0.84);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.42rem 0.72rem;
  white-space: nowrap;
}

.roster-status-bar {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 0.36rem;
  margin-bottom: 0.1rem;
}

.status-chip {
  align-items: center;
  background: rgba(8, 16, 28, 0.56);
  border: 1px solid rgba(119, 246, 255, 0.12);
  border-radius: 999px;
  color: #d7e3f0;
  display: inline-flex;
  font-size: 0.84rem;
  font-weight: 700;
  gap: 0.56rem;
  line-height: 1;
  min-height: 2.3rem;
  padding: 0.4rem 0.92rem;
  white-space: nowrap;
}

.status-chip::before {
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  content: "";
  display: inline-block;
  flex: 0 0 auto;
  height: 24px;
  width: 24px;
}

.status-chip-neutral::before {
  background-image: var(--icon-beacon);
}

.status-chip-neutral {
  background: rgba(8, 16, 28, 0.56);
  border-color: rgba(119, 246, 255, 0.1);
  color: #d0dae8;
}

.status-chip-live {
  background: rgba(125, 255, 178, 0.08);
  border-color: rgba(125, 255, 178, 0.2);
  color: var(--accent-2);
}

.status-chip-live::before {
  background-image: var(--icon-beacon);
}

.status-chip-warning {
  background: rgba(255, 203, 107, 0.08);
  border-color: rgba(255, 203, 107, 0.2);
  color: rgba(255, 203, 107, 0.92);
}

.status-chip-warning::before {
  background-image: var(--icon-not-ready);
}

.status-chip-success {
  background: rgba(125, 255, 178, 0.08);
  border-color: rgba(125, 255, 178, 0.2);
  color: var(--accent-2);
}

.status-chip-success::before {
  background-image: var(--icon-ready);
}

.player-list.player-roster-grid {
  align-content: start;
  display: grid;
  gap: 1rem;
  grid-auto-rows: minmax(120px, 1fr);
  grid-template-columns: repeat(2, minmax(0, 1fr));
  min-height: 100%;
}

.player-slot-card,
.standings-list li {
  padding: 1rem 1.04rem;
}

.player-slot-card {
  background: linear-gradient(180deg, rgba(8, 17, 30, 0.78), rgba(6, 11, 20, 0.96));
  border: 1px solid rgba(119, 246, 255, 0.1);
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  min-height: 120px;
  overflow: hidden;
  position: relative;
  transition: border-color 140ms ease, transform 140ms ease, background 140ms ease;
}

.player-slot-human {
  border-color: rgba(119, 246, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 8px 18px rgba(4, 10, 20, 0.14);
}

.player-slot-card::before {
  background: linear-gradient(90deg, rgba(119, 246, 255, 0.12), rgba(119, 246, 255, 0));
  content: "";
  height: 1px;
  left: 0.92rem;
  position: absolute;
  right: 0.92rem;
  top: 0;
}

.player-slot-card:hover {
  background: linear-gradient(180deg, rgba(10, 20, 35, 0.82), rgba(6, 11, 20, 0.98));
  border-color: rgba(119, 246, 255, 0.16);
  transform: translateY(-1px);
}

.player-slot-bot {
  background: linear-gradient(180deg, rgba(8, 15, 25, 0.62), rgba(5, 10, 18, 0.9));
  border-color: rgba(255, 203, 107, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
  opacity: 0.92;
}

.player-slot-main {
  align-items: center;
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  min-height: 100%;
  position: relative;
}

.player-slot-main::after {
  background: linear-gradient(180deg, rgba(119, 246, 255, 0.05), rgba(119, 246, 255, 0));
  content: "";
  height: 60%;
  position: absolute;
  right: 9rem;
  top: 20%;
  width: 1px;
}

.player-slot-human .player-slot-main::after,
.empty-slot-card .player-slot-main::after,
.player-slot-bot .player-slot-main::after {
  display: none;
}

.player-avatar-shell {
  align-items: center;
  background: rgba(9, 18, 31, 0.72);
  border: 1px solid rgba(119, 246, 255, 0.1);
  border-radius: 16px;
  display: inline-flex;
  flex: 0 0 auto;
  height: 60px;
  justify-content: center;
  position: relative;
  width: 60px;
}

.player-avatar-dot {
  background: radial-gradient(circle at 35% 35%, color-mix(in srgb, var(--player-accent) 28%, #fff), var(--player-accent));
  border-radius: 999px;
  box-shadow: 0 0 18px color-mix(in srgb, var(--player-accent) 34%, transparent);
  height: 20px;
  width: 20px;
}

.player-avatar-empty {
  background: rgba(154, 169, 188, 0.26);
  box-shadow: none;
}

.player-avatar-shell-bot {
  background: rgba(16, 16, 20, 0.56);
  border-color: rgba(255, 203, 107, 0.12);
  opacity: 0.9;
}

.player-avatar-shell-empty {
  animation: idle-slot-pulse 2.4s ease-in-out infinite;
}

.slot-glyph {
  display: inline-block;
  pointer-events: none;
  position: absolute;
}

.slot-glyph-player {
  border: 1px solid rgba(243, 248, 255, 0.18);
  border-radius: 999px;
  height: 34px;
  opacity: 0.5;
  width: 34px;
}

.slot-glyph-bot {
  background-image: var(--icon-bot);
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  height: 40px;
  width: 40px;
}

.slot-glyph-empty {
  background-image: var(--icon-open-slot);
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  height: 38px;
  position: absolute;
  width: 38px;
}

.player-name-stack strong {
  font-size: 1.12rem;
}

.player-name-stack {
  flex: 1 1 auto;
  min-width: 0;
}

.player-tag {
  color: var(--muted);
  gap: 0.38rem;
  padding-block: 0.44rem;
  padding-inline: 0.9rem;
}

.tag-icon {
  display: inline-block;
  flex: 0 0 auto;
  height: 10px;
  position: relative;
  width: 10px;
}

.tag-icon-host {
  background-image: var(--icon-host);
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  height: 30px;
  width: 30px;
}

.tag-icon-bot {
  background-image: var(--icon-bot);
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  height: 30px;
  width: 30px;
}

.tag-icon-you {
  border: 1px solid rgba(119, 246, 255, 0.42);
  border-radius: 999px;
  height: 18px;
  width: 18px;
}

.tag-icon-you::after {
  background: rgba(119, 246, 255, 0.88);
  border-radius: 999px;
  content: "";
  height: 4px;
  left: 50%;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 4px;
}

.player-tag-host {
  background: rgba(125, 255, 178, 0.12);
  border-color: rgba(125, 255, 178, 0.22);
  color: var(--accent-2);
}

.player-tag-bot {
  background: rgba(255, 203, 107, 0.12);
  border-color: rgba(255, 203, 107, 0.22);
  color: var(--accent-3);
}

.player-tag-you {
  background: rgba(119, 246, 255, 0.1);
  border-color: rgba(119, 246, 255, 0.2);
  color: var(--accent);
}

.empty-slot-card {
  background: linear-gradient(180deg, rgba(7, 14, 24, 0.56), rgba(5, 10, 18, 0.82));
  animation: idle-slot-pulse 2.6s ease-in-out infinite;
}

.empty-slot-card strong {
  color: rgba(243, 248, 255, 0.72);
}

.ready-pill {
  align-items: center;
  border: 1px solid rgba(154, 169, 188, 0.2);
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  font-family: var(--font-display);
  font-size: 0.88rem;
  gap: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 0.52rem 1.08rem 0.52rem 0.82rem;
  text-transform: uppercase;
  white-space: nowrap;
}

@media (min-width: 1500px) {
  .lobby-layout {
    grid-template-columns: minmax(380px, 450px) minmax(0, 1fr);
  }

  .player-list.player-roster-grid {
    grid-template-columns: repeat(2, minmax(360px, 1fr));
  }
}

.ready-pill-dot {
  align-items: center;
  background: rgba(10, 20, 34, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  display: inline-flex;
  flex: 0 0 auto;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 78%;
  height: 24px;
  justify-content: center;
  width: 24px;
}

.ready-pill.ready {
  background: rgba(125, 255, 178, 0.14);
  border-color: rgba(125, 255, 178, 0.42);
  color: var(--accent-2);
  animation: ready-pill-pulse 1.8s ease-in-out infinite;
}

.ready-pill.ready .ready-pill-dot {
  background-color: transparent;
  background-image: var(--icon-ready);
  box-shadow: 0 0 10px rgba(125, 255, 178, 0.34);
}

.ready-pill.not-ready {
  background: rgba(255, 203, 107, 0.08);
  border-color: rgba(255, 203, 107, 0.26);
  color: rgba(255, 203, 107, 0.88);
  min-width: 178px;
  justify-content: center;
}

.ready-pill.not-ready .ready-pill-dot {
  background-color: rgba(44, 30, 10, 0.82);
  background-image: var(--icon-not-ready);
}

.ready-pill.waiting .ready-pill-dot {
  background-color: rgba(9, 26, 36, 0.82);
  background-image: var(--icon-open-slot);
}

.ready-pill.waiting {
  background: rgba(119, 246, 255, 0.08);
  border-color: rgba(119, 246, 255, 0.2);
  color: rgba(193, 206, 222, 0.92);
  min-width: 128px;
  justify-content: center;
}

.ready-pill-bot.ready {
  animation: none;
  background: rgba(255, 203, 107, 0.08);
  border-color: rgba(255, 203, 107, 0.18);
  color: rgba(255, 203, 107, 0.78);
}

.ready-pill-bot.ready .ready-pill-dot {
  background: rgba(44, 30, 10, 0.82);
  box-shadow: none;
}

@keyframes ready-pill-pulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(125, 255, 178, 0.08);
  }

  50% {
    box-shadow: 0 0 0 6px rgba(125, 255, 178, 0.03);
  }
}

@keyframes copy-feedback-pop {
  0% {
    opacity: 0;
    transform: translateY(4px);
  }

  60% {
    opacity: 1;
    transform: translateY(-1px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes idle-slot-pulse {
  0%,
  100% {
    border-color: rgba(119, 246, 255, 0.08);
  }

  50% {
    border-color: rgba(119, 246, 255, 0.16);
  }
}

.game-screen {
  --stage-width: min(calc(100vw - 2rem), calc((100svh - 5.9rem) * 16 / 9));
  align-content: start;
  display: grid;
  gap: 0.35rem;
  grid-template-rows: auto auto;
  justify-items: center;
  min-height: calc(100svh - 0.5rem);
  padding: 0.25rem;
}

.game-hud {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.9fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.1fr);
  max-width: none;
  padding: 0.42rem;
  position: static;
  width: var(--stage-width);
  z-index: 2;
}

.game-hud span {
  background: rgba(3, 8, 16, 0.78);
  border: 1px solid rgba(119, 246, 255, 0.12);
  border-radius: 14px;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  min-width: 0;
  overflow: hidden;
  padding: 0.68rem 0.78rem 0.68rem 3.55rem;
  position: relative;
  text-transform: uppercase;
}

.game-hud strong {
  color: var(--text);
  display: block;
  font-family: var(--font-ui);
  font-size: clamp(1.08rem, 2vw, 1.42rem);
  font-weight: 700;
  margin-top: 0.12rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-hud span::before {
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  content: "";
  height: 34px;
  left: 0.86rem;
  opacity: 0.96;
  position: absolute;
  top: 0.48rem;
  width: 34px;
}

.game-hud span:nth-child(1)::before {
  background-image: var(--icon-hud-time);
}

.game-hud span:nth-child(2)::before {
  background-image: var(--icon-hud-alive);
}

.game-hud span:nth-child(3)::before {
  background-image: var(--icon-hud-dash);
}

.game-hud span:nth-child(4)::before {
  background-image: var(--icon-hud-push);
}

.game-hud span:nth-child(5)::before {
  background-image: var(--icon-hud-status);
}

.game-frame {
  aspect-ratio: 16 / 9;
  max-height: calc(100svh - 5.9rem);
  max-width: none;
  min-height: 320px;
  padding: 0.18rem;
  position: relative;
  width: var(--stage-width);
}

.phaser-game {
  height: 100%;
  overflow: hidden;
  width: 100%;
}

.phaser-game canvas {
  border: 1px solid rgba(119, 246, 255, 0.22);
  border-radius: 22px;
  box-shadow: 0 14px 42px rgba(0, 0, 0, 0.28), 0 0 18px rgba(119, 246, 255, 0.06);
  display: block;
}

.end-screen {
  min-height: 100vh;
  place-content: center;
}

.end-panel {
  display: grid;
  gap: 1rem;
  justify-items: center;
  text-align: center;
}

.end-panel h2 {
  color: var(--accent-2);
  font-size: clamp(2rem, 7vw, 5rem);
  text-shadow: 0 0 30px rgba(125, 255, 178, 0.2);
}

.sr-only {
  border: 0;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  margin: -1px;
  overflow: hidden;
  padding: 0;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

[hidden] {
  display: none !important;
}

@media (max-width: 1024px) {
  .menu-layout,
  .lobby-layout {
    grid-template-areas:
      "actions"
      "rooms"
      "sound"
      "support";
    grid-template-columns: 1fr;
  }

  .lobby-layout {
    grid-template-areas:
      "info"
      "roster";
  }

  .top-header,
  .brand-lockup,
  .panel-header,
  .panel-heading,
  .open-room-card,
  .player-card-main {
    align-items: start;
  }

  .top-header,
  .brand-lockup {
    grid-template-columns: 1fr;
  }

  .top-header,
  .panel-header,
  .panel-heading,
  .open-room-card {
    display: grid;
  }

  .header-pills {
    justify-content: flex-start;
    position: static;
  }

  .top-header::after {
    bottom: 2px;
    opacity: 0.34;
    width: min(82%, 860px);
  }

  .support-panel {
    grid-template-columns: 1fr;
  }

  .support-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .support-note {
    grid-column: 1 / -1;
  }

  .empty-state-actions {
    grid-template-columns: 1fr;
  }

  .player-list.player-roster-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 1200px) {
  .app-shell:has(#lobbyScreen:not([hidden])) {
    padding-inline: 1.1rem;
  }
}

@media (max-width: 780px) {
  .app-shell {
    padding: 0.85rem;
  }

  .action-grid,
  .inline-form,
  .join-form,
  .game-hud,
  .support-grid {
    grid-template-columns: 1fr;
  }

  .sound-row {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .sound-value {
    justify-self: start;
  }

  .top-header::after {
    display: none;
  }

  .open-room-card {
    grid-template-columns: 1fr;
  }

  .lobby-controls > button,
  .open-room-card > button {
    width: 100%;
  }

  .game-screen {
    --stage-width: min(calc(100vw - 1rem), calc((100svh - 8.8rem) * 16 / 9));
    min-height: 100svh;
    padding: 0.4rem;
  }

  .game-hud {
    width: var(--stage-width);
  }

  .game-frame {
    max-height: calc(100svh - 8.8rem);
    width: var(--stage-width);
  }
}
