:root {
  color-scheme: dark;
  --bg: #08090d;
  --panel: rgba(11, 13, 17, 0.9);
  --line: rgba(255, 239, 186, 0.18);
  --text: #f6f2ea;
  --muted: #b6b2a9;
  --gold: #f6c15a;
  --mint: #7df5cf;
  --coral: #ff786f;
  --sky: #70b8ff;
  --violet: #b093ff;
  --hot: #ff68c8;
  --arcade-font: "Lucida Console", "Courier New", monospace;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  min-height: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    radial-gradient(circle at 20% 18%, rgba(246, 193, 90, 0.2), transparent 24rem),
    radial-gradient(circle at 82% 12%, rgba(255, 104, 200, 0.14), transparent 21rem),
    radial-gradient(circle at 70% 86%, rgba(125, 245, 207, 0.12), transparent 24rem),
    linear-gradient(140deg, #08090d 0%, #141019 47%, #091311 100%);
  background-size: 12px 12px, 12px 12px, auto, auto, auto, auto;
  color: var(--text);
  font-family: var(--arcade-font);
  image-rendering: pixelated;
}

body:not(.sl-mode) {
  min-height: 100dvh;
}

button {
  color: inherit;
  font: inherit;
}

.game-shell {
  position: relative;
  width: min(1460px, 100%);
  height: 100vh;
  height: 100dvh;
  min-height: 620px;
  margin: 0 auto;
  padding: 18px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 14px;
}

.topbar,
.controls,
.store-panel {
  border: 2px solid var(--line);
  background: var(--panel);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(10px);
}

.topbar {
  min-height: 96px;
  border-radius: 0;
  padding: 18px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.eyebrow {
  margin: 0 0 3px;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(36px, 6vw, 72px);
  line-height: 0.88;
  letter-spacing: 0;
  text-shadow:
    0 3px 0 #000,
    0 0 24px rgba(246, 193, 90, 0.42);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(96px, 1fr));
  gap: 10px;
  min-width: min(460px, 54vw);
}

.stats div {
  min-height: 58px;
  border: 2px solid var(--line);
  border-radius: 0;
  padding: 9px 12px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.03) 50%, rgba(0, 0, 0, 0.04) 50%),
    rgba(255, 255, 255, 0.055);
  background-size: 100% 6px;
}

.stats span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.stats strong {
  display: block;
  margin-top: 2px;
  font-size: 24px;
  line-height: 1;
}

.stage-wrap {
  position: relative;
  min-height: 0;
  border-radius: 0;
  overflow: hidden;
  border: 2px solid rgba(255, 239, 186, 0.22);
  background: #0b1116;
  box-shadow:
    inset 0 0 0 4px rgba(0, 0, 0, 0.35),
    inset 0 0 55px rgba(125, 245, 207, 0.08),
    0 25px 90px rgba(0, 0, 0, 0.42);
}

.stage-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255, 255, 255, 0.045) 50%, rgba(0, 0, 0, 0.04) 50%),
    radial-gradient(circle at 50% 50%, transparent 45%, rgba(0, 0, 0, 0.28));
  background-size: 100% 4px, auto;
  mix-blend-mode: overlay;
}

#game {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 0;
  cursor: grab;
  touch-action: none;
  image-rendering: pixelated;
  user-select: none;
}

#game:active {
  cursor: grabbing;
}

#game:focus {
  outline: none;
}

body.controls-locked .stage-wrap {
  border-color: rgba(125, 245, 207, 0.55);
}

.power-meter {
  position: absolute;
  left: 16px;
  bottom: 16px;
  width: min(260px, calc(100% - 32px));
  height: 10px;
  border-radius: 0;
  border: 2px solid rgba(255, 239, 186, 0.28);
  background: rgba(3, 7, 10, 0.7);
  overflow: hidden;
}

.power-meter div {
  width: 0%;
  height: 100%;
  background: linear-gradient(90deg, var(--mint), var(--gold), var(--coral));
  transition: width 80ms linear;
}

.toast {
  position: absolute;
  right: 16px;
  bottom: 16px;
  max-width: min(390px, calc(100% - 32px));
  min-height: 38px;
  border-radius: 0;
  padding: 10px 13px;
  background: rgba(5, 7, 11, 0.74);
  border: 2px solid rgba(255, 239, 186, 0.22);
  color: #fff7df;
  font-size: 14px;
  font-weight: 700;
}

.hidden {
  display: none !important;
}

.game-over {
  position: absolute;
  inset: 50% auto auto 50%;
  width: min(430px, calc(100% - 36px));
  transform: translate(-50%, -50%);
  border: 2px solid rgba(255, 239, 186, 0.38);
  background:
    linear-gradient(rgba(255, 255, 255, 0.05) 50%, transparent 50%),
    rgba(7, 9, 12, 0.9);
  background-size: 100% 6px;
  padding: 22px;
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.35), 0 20px 70px rgba(0, 0, 0, 0.5);
  z-index: 2;
}

.start-menu {
  position: absolute;
  inset: 50% auto auto 50%;
  width: min(470px, calc(100% - 36px));
  transform: translate(-50%, -50%);
  border: 2px solid rgba(255, 239, 186, 0.42);
  background:
    linear-gradient(rgba(255, 255, 255, 0.05) 50%, rgba(0, 0, 0, 0.02) 50%),
    rgba(7, 9, 12, 0.9);
  background-size: 100% 6px;
  padding: 22px;
  box-shadow:
    inset 0 0 0 4px rgba(0, 0, 0, 0.45),
    0 20px 70px rgba(0, 0, 0, 0.52);
  z-index: 3;
}

.start-menu h2 {
  margin: 0;
  font-size: 54px;
  line-height: 0.92;
  text-shadow: 0 4px 0 #000, 0 0 24px rgba(246, 193, 90, 0.28);
}

.menu-status {
  margin: 12px 0;
  color: #fff7df;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.3;
}

.menu-scoreline {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin: 0 0 16px;
}

.menu-scoreline span {
  min-height: 34px;
  border: 2px solid rgba(255, 239, 186, 0.2);
  padding: 8px;
  background: rgba(255, 255, 255, 0.055);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.game-over h2,
.store-panel h2,
.launcher-panel h2,
.store-item h3 {
  margin: 0;
  letter-spacing: 0;
}

.game-over h2 {
  font-size: 44px;
  line-height: 0.95;
  text-shadow: 0 3px 0 #000;
}

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

.result-grid div {
  border: 2px solid rgba(255, 239, 186, 0.22);
  padding: 10px;
  background: rgba(255, 255, 255, 0.06);
}

.result-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.result-grid strong {
  display: block;
  margin-top: 3px;
  font-size: 25px;
}

.controls {
  border-radius: 0;
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.store-panel,
.launcher-panel {
  position: fixed;
  left: 18px;
  right: 18px;
  bottom: 104px;
  margin: 0 auto;
  width: min(1424px, calc(100% - 36px));
  z-index: 3;
  border-radius: 0;
  max-height: min(72vh, 640px);
  overflow: auto;
  padding: 16px;
}

.launcher-panel {
  max-height: min(54vh, 430px);
}

.pixel-menu {
  border-color: rgba(255, 239, 186, 0.45);
  background:
    linear-gradient(rgba(255, 255, 255, 0.045) 50%, rgba(0, 0, 0, 0.04) 50%),
    linear-gradient(135deg, rgba(8, 12, 20, 0.96), rgba(14, 18, 30, 0.94));
  background-size: 100% 6px, auto;
  box-shadow:
    inset 0 0 0 4px rgba(0, 0, 0, 0.55),
    inset 0 -8px 0 rgba(0, 0, 0, 0.2),
    0 22px 80px rgba(0, 0, 0, 0.56);
}

.store-head,
.launcher-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  border-bottom: 2px dashed rgba(255, 239, 186, 0.2);
  padding-bottom: 12px;
}

.store-balance {
  min-width: 118px;
  border: 2px solid rgba(246, 193, 90, 0.45);
  padding: 8px 10px;
  background: rgba(246, 193, 90, 0.12);
  text-align: center;
}

.store-balance span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.store-balance strong {
  display: block;
  margin-top: 3px;
  color: #fff2b6;
  font-size: 22px;
  line-height: 1;
  text-shadow: 0 2px 0 #000;
}

.store-section-title {
  margin: 13px 0 8px;
  color: var(--mint);
  font-size: 13px;
  font-weight: 900;
  text-transform: uppercase;
  text-shadow: 0 2px 0 #000;
}

.store-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.store-item {
  min-height: 116px;
  border: 2px solid rgba(255, 239, 186, 0.2);
  padding: 10px;
  display: grid;
  grid-template-columns: 58px 1fr;
  gap: 9px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 50%, transparent 50%),
    rgba(255, 255, 255, 0.055);
  background-size: 100% 6px;
  box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.2);
}

.store-copy {
  min-width: 0;
}

.store-item h3 {
  font-size: 15px;
  line-height: 1.05;
  text-transform: uppercase;
  text-shadow: 0 2px 0 #000;
}

.store-item p {
  margin: 5px 0 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.25;
}

.store-item.locked {
  opacity: 0.62;
}

.store-item.unlocked {
  border-color: rgba(125, 245, 207, 0.5);
  background:
    linear-gradient(rgba(255, 255, 255, 0.04) 50%, transparent 50%),
    rgba(125, 245, 207, 0.1);
  background-size: 100% 6px;
}

.store-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255, 239, 186, 0.22);
  background: linear-gradient(135deg, rgba(246, 193, 90, 0.2), rgba(255, 104, 200, 0.16));
  color: #fff2b6;
  font-weight: 900;
  text-shadow: 0 2px 0 #000;
}

.store-icon--tank {
  background: linear-gradient(135deg, rgba(66, 165, 255, 0.28), rgba(125, 245, 207, 0.18));
}

.store-icon--boost {
  background: linear-gradient(135deg, rgba(125, 245, 207, 0.28), rgba(246, 193, 90, 0.2));
}

.store-icon--super {
  background: linear-gradient(135deg, rgba(255, 104, 200, 0.28), rgba(255, 82, 103, 0.2));
}

.store-icon--chaos {
  background: linear-gradient(135deg, rgba(176, 147, 255, 0.28), rgba(246, 193, 90, 0.18));
}

.store-sprite {
  overflow: hidden;
  background: rgba(0, 0, 0, 0.28);
}

.store-sprite img {
  max-width: 74px;
  max-height: 62px;
  object-fit: contain;
  image-rendering: pixelated;
}

.buy-btn {
  grid-column: 1 / -1;
  height: 38px;
  border: 2px solid rgba(125, 245, 207, 0.35);
  border-radius: 0;
  background: rgba(125, 245, 207, 0.15);
  cursor: pointer;
  font-weight: 900;
  text-transform: uppercase;
  text-shadow: 0 1px 0 #000;
}

.buy-btn:disabled {
  cursor: default;
  opacity: 0.5;
}

.store-item.unlocked .buy-btn {
  border-color: rgba(246, 193, 90, 0.42);
  background: rgba(246, 193, 90, 0.12);
  color: #fff2b6;
}

.roster {
  display: grid;
  grid-template-columns: repeat(5, minmax(104px, 1fr));
  gap: 10px;
  width: 100%;
}

.launcher-btn {
  min-width: 210px;
  min-height: 58px;
  border: 2px solid rgba(246, 193, 90, 0.48);
  border-radius: 0;
  padding: 7px 12px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.045) 50%, transparent 50%),
    rgba(246, 193, 90, 0.13);
  background-size: 100% 6px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  box-shadow: inset 0 -4px 0 rgba(246, 193, 90, 0.18);
}

.launcher-btn small {
  display: block;
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.launcher-btn strong {
  display: block;
  margin-top: 4px;
  font-size: 20px;
  line-height: 1;
  text-shadow: 0 2px 0 #000;
}

.time-switch {
  display: grid;
  grid-template-columns: repeat(2, 76px);
  gap: 8px;
}

.time-btn {
  height: 48px;
  border: 2px solid rgba(255, 239, 186, 0.22);
  border-radius: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.045) 50%, transparent 50%),
    rgba(255, 255, 255, 0.06);
  background-size: 100% 6px;
  cursor: pointer;
  font-weight: 900;
}

.time-btn.active {
  border-color: rgba(125, 245, 207, 0.85);
  color: #fffbe8;
  box-shadow: inset 0 -4px 0 rgba(125, 245, 207, 0.22), 0 0 20px rgba(125, 245, 207, 0.12);
}

.pilot {
  min-height: 64px;
  border: 2px solid var(--line);
  border-radius: 0;
  background:
    linear-gradient(rgba(255, 255, 255, 0.045) 50%, transparent 50%),
    rgba(255, 255, 255, 0.06);
  background-size: 100% 6px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  padding: 8px 11px;
  cursor: pointer;
  font-weight: 800;
}

.pilot.active {
  border-color: rgba(246, 193, 90, 0.9);
  background: rgba(246, 193, 90, 0.14);
  box-shadow: inset 0 -4px 0 rgba(246, 193, 90, 0.22), 0 0 22px rgba(246, 193, 90, 0.14);
}

.pilot.locked {
  opacity: 0.48;
  filter: grayscale(0.75);
}

.pilot.locked .avatar::after {
  content: "$";
  position: absolute;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(246, 193, 90, 0.75);
  background: rgba(8, 9, 13, 0.88);
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
  transform: translate(18px, -12px);
}

.avatar {
  position: relative;
  width: 48px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  overflow: hidden;
}

.avatar img {
  max-width: 58px;
  max-height: 50px;
  object-fit: contain;
  image-rendering: pixelated;
}

.modal-actions,
.actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.modal-actions {
  justify-content: stretch;
}

.icon-btn,
.boost-btn,
.pixel-btn {
  height: 48px;
  border: 2px solid rgba(255, 239, 186, 0.25);
  border-radius: 0;
  background: rgba(255, 255, 255, 0.08);
  cursor: pointer;
  font-weight: 900;
}

.pixel-btn {
  min-width: 92px;
  padding: 0 14px;
}

.pixel-btn.primary {
  flex: 1;
  background: rgba(246, 193, 90, 0.18);
  border-color: rgba(246, 193, 90, 0.6);
}

.icon-btn {
  width: 52px;
  display: grid;
  place-items: center;
}

.icon-btn svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.boost-btn {
  min-width: 112px;
  padding: 0 18px;
  background: linear-gradient(135deg, rgba(125, 245, 207, 0.98), rgba(246, 193, 90, 0.98), rgba(255, 104, 200, 0.9));
  color: #101114;
  box-shadow: 0 0 24px rgba(125, 245, 207, 0.16);
}

.boost-btn:disabled {
  cursor: default;
  opacity: 0.45;
}

body.is-playing .launcher-btn,
body.is-playing .time-switch,
body.is-playing #storeBtn {
  display: none;
}

body.is-playing .controls {
  justify-content: flex-end;
}

body.sl-mode {
  overflow: hidden;
  background: #05070b;
}

body.sl-mode .game-shell {
  width: 100vw;
  height: 100vh;
  min-height: 0;
  padding: 0;
  display: block;
}

body.sl-mode .stage-wrap {
  width: 100vw;
  height: 100vh;
  border: 0;
  box-shadow: none;
}

body.sl-mode .topbar {
  position: fixed;
  top: 10px;
  left: 10px;
  right: 10px;
  z-index: 4;
  min-height: 0;
  padding: 8px 10px;
  border-color: rgba(255, 239, 186, 0.3);
  background: rgba(5, 7, 11, 0.72);
}

body.sl-mode .topbar > div:first-child {
  display: none;
}

body.sl-mode .stats {
  width: 100%;
  min-width: 0;
  grid-template-columns: repeat(3, 1fr);
}

body.sl-mode .stats div {
  min-height: 42px;
  padding: 6px 8px;
}

body.sl-mode .stats strong {
  font-size: 20px;
}

body.sl-mode .controls {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 4;
  padding: 8px;
  background: rgba(5, 7, 11, 0.76);
  border-color: rgba(255, 239, 186, 0.3);
}

body.sl-mode .roster {
  grid-template-columns: repeat(10, minmax(74px, 1fr));
  width: 100%;
  gap: 6px;
}

body.sl-mode .pilot {
  min-height: 50px;
  padding: 5px;
  justify-content: center;
}

body.sl-mode .pilot > span:last-child {
  display: none;
}

body.sl-mode .avatar {
  width: 56px;
  height: 42px;
}

body.sl-mode .time-switch {
  grid-template-columns: repeat(2, 58px);
}

body.sl-mode .time-btn,
body.sl-mode .icon-btn,
body.sl-mode .boost-btn,
body.sl-mode .pixel-btn {
  height: 44px;
}

body.sl-mode .pixel-btn {
  min-width: 76px;
  padding: 0 9px;
}

body.sl-mode .boost-btn {
  min-width: 92px;
  padding: 0 10px;
}

body.sl-mode .toast {
  top: 72px;
  right: 10px;
  bottom: auto;
  max-width: 360px;
  background: rgba(5, 7, 11, 0.62);
}

body.sl-mode .power-meter {
  left: 10px;
  bottom: 86px;
}

body.sl-mode .store-panel {
  top: 72px;
  bottom: 72px;
}

body.sl-mode .launcher-panel {
  top: 72px;
  bottom: 72px;
  max-height: none;
}

body.sl-mode .start-menu {
  width: min(390px, calc(100% - 28px));
  padding: 16px;
}

body.sl-mode .start-menu h2 {
  font-size: 42px;
}

body.sl-mode .menu-status {
  font-size: 12px;
}

.game-shell:fullscreen {
  width: 100vw;
  height: 100vh;
  min-height: 0;
  padding: 0;
  display: block;
  background: #05070b;
}

.game-shell:fullscreen .stage-wrap {
  width: 100vw;
  height: 100vh;
  border: 0;
  box-shadow: none;
}

.game-shell:fullscreen .topbar {
  position: fixed;
  top: 10px;
  left: 10px;
  right: 10px;
  z-index: 4;
  min-height: 0;
  padding: 8px 10px;
  border-color: rgba(255, 239, 186, 0.3);
  background: rgba(5, 7, 11, 0.72);
}

.game-shell:fullscreen .topbar > div:first-child {
  display: none;
}

.game-shell:fullscreen .stats {
  width: 100%;
  min-width: 0;
  grid-template-columns: repeat(3, 1fr);
}

.game-shell:fullscreen .stats div {
  min-height: 42px;
  padding: 6px 8px;
}

.game-shell:fullscreen .stats strong {
  font-size: 20px;
}

.game-shell:fullscreen .controls {
  position: fixed;
  left: 10px;
  right: 10px;
  bottom: 10px;
  z-index: 4;
  padding: 8px;
  background: rgba(5, 7, 11, 0.76);
  border-color: rgba(255, 239, 186, 0.3);
}

.game-shell:fullscreen .roster {
  grid-template-columns: repeat(10, minmax(54px, 1fr));
  width: 100%;
  gap: 6px;
}

.game-shell:fullscreen .pilot {
  min-height: 50px;
  padding: 5px;
  justify-content: center;
}

.game-shell:fullscreen .pilot > span:last-child {
  display: none;
}

.game-shell:fullscreen .avatar {
  width: 56px;
  height: 42px;
}

.game-shell:fullscreen .time-switch {
  grid-template-columns: repeat(2, 58px);
}

.game-shell:fullscreen .time-btn,
.game-shell:fullscreen .icon-btn,
.game-shell:fullscreen .boost-btn,
.game-shell:fullscreen .pixel-btn {
  height: 44px;
}

.game-shell:fullscreen .pixel-btn {
  min-width: 76px;
  padding: 0 9px;
}

.game-shell:fullscreen .boost-btn {
  min-width: 92px;
  padding: 0 10px;
}

.game-shell:fullscreen .toast {
  top: 72px;
  right: 10px;
  bottom: auto;
  max-width: 360px;
  background: rgba(5, 7, 11, 0.62);
}

.game-shell:fullscreen .power-meter {
  left: 10px;
  bottom: 86px;
}

.game-shell:fullscreen .store-panel,
.game-shell:fullscreen .launcher-panel {
  top: 72px;
  bottom: 72px;
  max-height: none;
}

@media (max-width: 760px) {
  .game-shell {
    height: auto;
    min-height: 100dvh;
    padding: 8px;
    gap: 8px;
    grid-template-rows: auto minmax(360px, 58dvh) auto;
  }

  .topbar {
    min-height: 0;
    padding: 10px;
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  h1 {
    font-size: 34px;
  }

  .stats {
    width: 100%;
    min-width: 0;
    grid-template-columns: repeat(3, 1fr);
  }

  .stats strong {
    font-size: 16px;
  }

  .stats span {
    font-size: 10px;
  }

  .stats div {
    min-height: 46px;
    padding: 7px;
  }

  .stage-wrap {
    min-height: 360px;
  }

  .controls {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    align-items: stretch;
    gap: 8px;
    padding: 8px;
  }

  .launcher-btn {
    min-width: 0;
    min-height: 50px;
    width: 100%;
  }

  .launcher-btn strong {
    font-size: 17px;
  }

  .roster {
    grid-template-columns: repeat(5, minmax(58px, 1fr));
    gap: 6px;
  }

  .pilot {
    min-width: 0;
    min-height: 54px;
    justify-content: center;
    padding: 5px;
  }

  .pilot > span:last-child {
    display: none;
  }

  .avatar {
    width: 48px;
    height: 40px;
  }

  .actions {
    grid-column: 1 / -1;
    justify-content: stretch;
  }

  .actions > * {
    flex: 1;
  }

  .store-panel,
  .launcher-panel {
    left: 10px;
    right: 10px;
    top: 10px;
    bottom: 10px;
    width: auto;
    max-height: none;
  }

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

  .time-switch {
    width: 100%;
    grid-template-columns: repeat(2, 1fr);
  }

  .toast {
    right: 8px;
    bottom: 8px;
    max-width: calc(100% - 16px);
    font-size: 12px;
  }

  .power-meter {
    left: 8px;
    bottom: 8px;
    width: min(180px, calc(100% - 16px));
  }

  .start-menu,
  .game-over {
    width: min(360px, calc(100% - 24px));
    padding: 16px;
  }

  .start-menu h2 {
    font-size: 42px;
  }

  .boost-btn {
    flex: 1;
  }

  body.is-playing .controls {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
  }

  body.is-playing .actions {
    grid-column: auto;
  }
}

@media (max-width: 760px) and (orientation: landscape) {
  .game-shell {
    height: 100dvh;
    min-height: 0;
    grid-template-rows: auto minmax(0, 1fr) auto;
  }

  .topbar {
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    z-index: 2;
    background: rgba(5, 7, 11, 0.7);
  }

  .topbar > div:first-child {
    display: none;
  }

  .stage-wrap {
    grid-row: 1 / 4;
    min-height: 0;
  }

  .controls {
    position: absolute;
    left: 8px;
    right: 8px;
    bottom: 8px;
    z-index: 2;
    background: rgba(5, 7, 11, 0.74);
  }

  .roster {
    grid-template-columns: repeat(10, minmax(42px, 1fr));
  }

  .pilot {
    min-height: 46px;
  }

  .avatar {
    width: 44px;
    height: 34px;
  }
}

@media (min-width: 761px) and (max-width: 1180px) {
  .controls {
    flex-wrap: wrap;
  }

  .roster {
    grid-template-columns: repeat(5, minmax(96px, 1fr));
    width: 100%;
  }

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