:root {
  --coal-950: #06080b;
  --coal-900: #0b0f15;
  --coal-850: #101720;
  --coal-800: #151d27;
  --steel-700: #273444;
  --steel-500: #607087;
  --steel-300: #a8b5c6;
  --ivory: #f7f2e8;
  --amber: #ffc83d;
  --amber-hi: #ffe28b;
  --amber-low: #c98708;
  --cyan: #72d9ee;
  --danger: #ff6b5f;
  --glass: rgba(13, 18, 25, .88);
}

html, body {
  background:
    radial-gradient(circle at 50% 18%, #1a2430 0, #080b10 48%, #030507 100%);
  color: var(--ivory);
}

body {
  letter-spacing: .005em;
}

button, input, select {
  -webkit-tap-highlight-color: transparent;
}

#wrap::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: .22;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.92' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.28'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
  z-index: 30;
}

#stage {
  isolation: isolate;
  overflow: hidden;
  background: #05070a;
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 0 0 1px #000, 0 34px 100px rgba(0, 0, 0, .72);
}

canvas {
  filter: saturate(1.06) contrast(1.01);
  transform-origin: center;
}

.overlay {
  gap: 20px;
  padding: clamp(18px, 3vw, 36px) 16px;
  background:
    radial-gradient(90% 80% at 50% 15%, transparent 20%, rgba(2, 5, 9, .72) 100%),
    linear-gradient(180deg, rgba(5, 9, 15, .5), rgba(4, 6, 10, .84));
  backdrop-filter: blur(7px) saturate(.85);
}

#menu {
  background:
    linear-gradient(90deg, rgba(4, 7, 12, .8), rgba(4, 7, 12, .16) 35%, rgba(4, 7, 12, .16) 65%, rgba(4, 7, 12, .8)),
    linear-gradient(180deg, rgba(5, 8, 14, .12), rgba(5, 8, 14, .78)),
    url(assets/titel.png) center / cover no-repeat;
}

#menu::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, .018) 0 1px, transparent 1px 4px);
}

.panel {
  border-radius: 20px;
  border: 1px solid rgba(255, 200, 61, .22);
  background:
    linear-gradient(145deg, rgba(30, 39, 51, .96), rgba(12, 17, 24, .97)),
    var(--glass);
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, .75),
    0 28px 80px rgba(0, 0, 0, .64),
    inset 0 1px rgba(255, 255, 255, .08),
    inset 0 -1px rgba(0, 0, 0, .7);
}

.panel::before {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(255, 255, 255, .035);
  border-radius: 14px;
  pointer-events: none;
}

.marquee {
  position: relative;
  z-index: 1;
  filter: drop-shadow(0 16px 28px rgba(0, 0, 0, .65));
}

.eyebrow,
.hud-kicker {
  color: #9eafc1;
  font: 800 10px/1.2 ui-monospace, "Cascadia Mono", Consolas, monospace;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.marquee .eyebrow {
  margin-bottom: 10px;
  color: var(--amber-hi);
  font-size: 13px;
  line-height: 1.35;
  opacity: .82;
}

h1 {
  font-size: clamp(48px, 8vw, 88px);
  letter-spacing: .045em;
  color: #ffd050;
  text-shadow:
    0 1px 0 #fff0a4,
    0 4px 0 #b77700,
    0 7px 0 #6c4300,
    0 15px 30px rgba(0, 0, 0, .82),
    0 0 45px rgba(255, 175, 20, .24);
}

.rule {
  width: min(300px, 62vw);
  height: 2px;
  margin: 17px auto 12px;
  box-shadow: 0 0 14px rgba(255, 200, 61, .48);
}

.menu-lead {
  margin: 0 0 7px;
  color: #e7edf5;
  font-size: clamp(13px, 1.5vw, 16px);
  font-weight: 650;
  letter-spacing: .065em;
}

.credit {
  opacity: .75;
}

.menu-panel {
  width: min(760px, calc(100vw - 32px));
  padding: clamp(20px, 3vw, 32px);
}

.mode-switch {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 0 auto;
}

.mode-switch:has(.mode-button.active) {
  margin-bottom: 24px;
}

button.mode-button,
#btnLocal.mode-button,
#btnOnline.mode-button {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-height: 70px;
  padding: 13px 17px;
  color: #d7e0ea;
  text-align: left;
  text-transform: none;
  letter-spacing: 0;
  background: linear-gradient(180deg, rgba(35, 46, 60, .94), rgba(17, 23, 32, .96));
  border: 1px solid #354457;
  box-shadow: 0 4px 0 #07090d, inset 0 1px rgba(255, 255, 255, .055);
}

button.mode-button:hover,
#btnLocal.mode-button:hover,
#btnOnline.mode-button:hover {
  filter: none;
  border-color: #61748d;
  background: linear-gradient(180deg, #2b394a, #161e29);
}

button.mode-button.active,
#btnLocal.mode-button.active,
#btnOnline.mode-button.active {
  color: #251800;
  border-color: var(--amber-hi);
  background: linear-gradient(155deg, #ffe58f, #ffc536 62%, #e49d0d);
  box-shadow: 0 4px 0 #995f00, 0 10px 25px rgba(255, 174, 10, .16), inset 0 1px #fff5c8;
}

.mode-button > span:last-child {
  display: grid;
  gap: 3px;
}

.mode-button b {
  font-size: 14px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.mode-button small {
  color: #8797aa;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.3;
}

.mode-button.active small {
  color: rgba(37, 24, 0, .68);
}

.mode-icon {
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  margin-right: 12px;
  color: #b8c4d2;
  border: 1px solid rgba(184, 196, 210, .45);
  border-radius: 10px;
  background: rgba(184, 196, 210, .055);
  box-shadow: inset 0 1px rgba(255, 255, 255, .045);
  transition: color .16s ease, border-color .16s ease, background .16s ease, transform .16s ease;
}

.mode-icon svg {
  width: 27px;
  height: 27px;
  overflow: visible;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

#btnLocal .mode-icon {
  color: #ffc85c;
  border-color: rgba(255, 200, 92, .42);
  background: rgba(255, 200, 92, .075);
}

#btnOnline .mode-icon {
  color: #71d9ff;
  border-color: rgba(113, 217, 255, .42);
  background: rgba(113, 217, 255, .075);
}

.mode-button:hover .mode-icon {
  transform: translateY(-1px);
}

.mode-button.active .mode-icon {
  color: #332200 !important;
  border-color: rgba(51, 34, 0, .34) !important;
  background: rgba(255, 255, 255, .24) !important;
}

.setup-heading {
  display: flex;
  align-items: center;
  gap: 11px;
  margin: 4px 0 13px;
  text-align: left;
}

.setup-heading.compact {
  margin-top: 20px;
}

.setup-heading > span {
  display: grid;
  place-items: center;
  width: 27px;
  height: 27px;
  border: 1px solid rgba(255, 200, 61, .48);
  border-radius: 50%;
  color: var(--amber);
  font: 800 10px/1 ui-monospace, monospace;
}

.setup-heading > div {
  display: grid;
  gap: 2px;
}

.setup-heading b {
  color: #edf2f7;
  font-size: 13px;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.setup-heading small {
  color: #8493a5;
  font-size: 11px;
}

#playerRows {
  display: grid;
  grid-template-columns: repeat(4, minmax(125px, 1fr));
  gap: 9px;
}

#playerRows .pcard {
  position: relative;
  min-width: 0;
  padding: 12px;
  overflow: hidden;
  border-color: rgba(255, 255, 255, .09);
  background: linear-gradient(160deg, rgba(23, 31, 42, .95), rgba(11, 16, 23, .95));
  transition: border-color .18s ease, transform .18s ease, opacity .18s ease;
}

#playerRows .pcard::after {
  content: '';
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  background: var(--pc);
  box-shadow: 0 0 12px var(--pc);
  opacity: .72;
}

#playerRows .pcard:has(select[value="off"]) {
  opacity: .55;
}

#playerRows .pcard.is-off {
  opacity: .5;
  filter: grayscale(.55);
}

#playerRows .pcard.is-human {
  border-color: color-mix(in srgb, var(--pc) 42%, #354255);
}

#playerRows .pcard:hover {
  border-color: color-mix(in srgb, var(--pc) 52%, #344255);
  transform: translateY(-2px);
}

#playerRows select {
  width: 100%;
  min-width: 0;
}

.opts {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  width: 100%;
  margin: 0 0 18px;
}

.opts label {
  display: grid;
  gap: 6px;
  min-width: 0;
  text-align: left;
}

.opts label span {
  justify-self: start;
  margin-left: 2px;
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.opts select {
  width: 100%;
}

input, select {
  border-color: #303e50;
  background-color: #0c121a;
  box-shadow: inset 0 1px 4px rgba(0, 0, 0, .45);
}

input:hover, select:hover {
  border-color: #60718a;
}

.online-fields {
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  align-items: end;
  margin: 4px 0 15px;
}

.online-fields label {
  display: grid;
  gap: 6px;
  text-align: left;
}

.online-fields label > span {
  margin-left: 2px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.online-fields input {
  width: 100%;
  min-height: 54px;
  padding: 12px 15px;
  font-size: 17px;
}

.online-fields #btnJoin {
  min-height: 54px;
  align-self: end;
}

button {
  border: 1px solid rgba(255, 238, 163, .42);
  box-shadow: 0 4px 0 #976000, 0 9px 20px rgba(0, 0, 0, .38), inset 0 1px #fff4bd;
}

button:disabled {
  border-color: rgba(255, 255, 255, .06);
  opacity: .72;
}

/* Utility controls remain available in menu and during play. */
#utilityDock {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 12;
  display: flex;
  gap: 7px;
}

#utilityDock .utility-btn,
#utilityDock #btnMute {
  position: static;
  display: grid;
  place-items: center;
  width: 38px;
  height: 36px;
  min-width: 38px;
  min-height: 36px;
  padding: 0;
  color: #d9e2ed;
  font-size: 16px;
  line-height: 1;
  opacity: .74;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 10px;
  background: rgba(9, 14, 21, .72);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .32), inset 0 1px rgba(255, 255, 255, .07);
  backdrop-filter: blur(9px);
}

#utilityDock .utility-btn:hover,
#utilityDock #btnMute:hover {
  color: var(--amber-hi);
  opacity: 1;
  filter: none;
  border-color: rgba(255, 200, 61, .5);
}

/* In-game HUD */
#gameHud {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  font-variant-numeric: tabular-nums;
}

.hud-topline {
  position: absolute;
  top: 12px;
  left: 50%;
  display: grid;
  grid-template-columns: auto auto auto;
  align-items: center;
  gap: 18px;
  min-height: 50px;
  padding: 8px 17px;
  color: #f1f5f8;
  border: 1px solid rgba(255, 255, 255, .13);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(18, 25, 34, .9), rgba(7, 11, 16, .82));
  box-shadow: 0 11px 28px rgba(0, 0, 0, .42), inset 0 1px rgba(255, 255, 255, .08);
  backdrop-filter: blur(9px);
  transform: translateX(-50%);
}

.hud-round,
.hud-survivors {
  display: grid;
  gap: 2px;
  text-align: left;
}

.hud-round strong,
.hud-survivors strong {
  color: var(--amber-hi);
  font: 850 15px/1.1 system-ui, sans-serif;
}

.hud-survivors {
  min-width: 46px;
}

.hud-environment {
  display: flex;
  gap: 6px;
  padding: 0 15px;
  border-right: 1px solid rgba(255, 255, 255, .1);
  border-left: 1px solid rgba(255, 255, 255, .1);
}

.hud-chip {
  padding: 6px 9px;
  color: #ced8e4;
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 999px;
  background: rgba(255, 255, 255, .045);
}

.hud-players {
  position: absolute;
  right: 12px;
  bottom: 12px;
  left: 12px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.hud-player {
  --pc: #fff;
  position: relative;
  min-width: 0;
  min-height: 82px;
  padding: 12px 14px 13px;
  overflow: hidden;
  color: #e7edf3;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 12px;
  background: linear-gradient(160deg, rgba(20, 27, 37, .88), rgba(6, 10, 15, .86));
  box-shadow: 0 8px 24px rgba(0, 0, 0, .34), inset 0 1px rgba(255, 255, 255, .055);
  backdrop-filter: blur(7px);
  transition: opacity .2s ease, border-color .2s ease;
}

.hud-player::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  background: var(--pc);
  box-shadow: 0 0 12px var(--pc);
}

.hud-player.is-focus {
  border-color: color-mix(in srgb, var(--pc) 55%, transparent);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .34), 0 0 18px color-mix(in srgb, var(--pc) 18%, transparent), inset 0 1px rgba(255, 255, 255, .08);
}

.hud-player.is-dead {
  opacity: .42;
  filter: grayscale(.8);
}

.hud-player.is-critical .hud-hp-fill {
  animation: critical-pulse .8s ease-in-out infinite alternate;
}

.hud-player-head,
.hud-player-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.hud-player-head strong {
  overflow: hidden;
  font-size: 14px;
  line-height: 1.2;
  letter-spacing: .035em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hud-player-head span,
.hud-player-meta {
  color: #95a4b7;
  font-size: 12px;
  font-weight: 700;
}

.hud-hp {
  height: 8px;
  margin: 8px 0;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .7);
}

.hud-hp-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #e75a4f, #f5c047 48%, #64dc83);
  box-shadow: 0 0 8px currentColor;
  transition: width .18s linear;
}

.hud-weapon {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  overflow: hidden;
  color: #dbe4ed;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hud-weapon > span {
  overflow: hidden;
  text-overflow: ellipsis;
}

.hud-weapon-icon {
  flex: 0 0 25px;
  width: 25px;
  height: 25px;
  object-fit: contain;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .7));
}

.hud-charge {
  color: var(--amber-hi);
}

.hud-hint {
  position: absolute;
  bottom: 108px;
  left: 50%;
  max-width: calc(100% - 32px);
  padding: 7px 12px;
  color: #dce5ef;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  white-space: nowrap;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 999px;
  background: rgba(7, 11, 16, .7);
  box-shadow: 0 7px 18px rgba(0, 0, 0, .3);
  backdrop-filter: blur(7px);
  transform: translateX(-50%);
}

.hud-hint kbd {
  min-width: 17px;
  padding: 2px 5px;
  font-size: 9px;
  border-bottom-width: 2px;
}

@keyframes critical-pulse {
  to { filter: brightness(1.7); box-shadow: 0 0 12px #ff5c4f; }
}

.touch-controls {
  display: none;
}

/* Shop and score surfaces */
#shop, #gameover, #lobby {
  background:
    radial-gradient(100% 80% at 50% 20%, rgba(12, 19, 28, .3), rgba(3, 6, 10, .82)),
    rgba(5, 8, 12, .56);
}

#lobby {
  background:
    radial-gradient(90% 80% at 50% 15%, transparent 20%, rgba(2, 5, 9, .74) 100%),
    linear-gradient(180deg, rgba(5, 8, 14, .34), rgba(5, 8, 14, .78)),
    url(assets/titel.png) center / cover no-repeat;
}

#lobby .lobby-action {
  min-height: 44px;
  padding: 11px 26px;
  color: #241800;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: .05em;
  text-transform: uppercase;
  border: 1px solid rgba(255, 238, 163, .42);
  border-radius: 10px;
  background: linear-gradient(#ffdf7e, #ffd24a 45%, #f0b41c);
  box-shadow: 0 4px 0 var(--accent-shadow), 0 8px 18px rgba(0, 0, 0, .45), inset 0 1px #fff4bd;
}

#lobby #btnLeaveLobby {
  margin-top: 10px;
}

.shop-panel {
  width: min(890px, calc(100vw - 28px));
  max-width: 890px;
  padding: 24px 26px 22px;
}

.shop-heading,
.shop-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  text-align: left;
}

.shop-heading h2 {
  margin: 5px 0 0;
}

.shop-heading .eyebrow {
  font-size: 13px;
  line-height: 1.3;
  letter-spacing: .16em;
}

.shop-balance {
  display: grid;
  min-width: 120px;
  padding: 10px 14px;
  text-align: right;
  border: 1px solid rgba(255, 200, 61, .22);
  border-radius: 11px;
  background: rgba(255, 200, 61, .055);
}

.shop-balance span {
  color: #8f9db0;
  font-size: 12px;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

#shopMoney {
  margin-top: 3px;
  font-size: 24px;
}

.table-scroll {
  max-height: min(57vh, 520px);
  margin: 17px -4px 18px;
  overflow: auto;
  border: 1px solid rgba(255, 255, 255, .075);
  border-radius: 13px;
  background: rgba(5, 9, 14, .48);
}

#shopTable {
  margin: 0;
}

#shopTable th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding-top: 11px;
  padding-bottom: 11px;
  background: #101720;
}

#shopTable td {
  padding-top: 9px;
  padding-bottom: 9px;
}

#shopTable td:first-child,
#shopTable th:first-child {
  width: 58px;
  text-align: center;
}

.shop-item-icon {
  display: block;
  width: 46px;
  height: 46px;
  margin: 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 4px 5px rgba(0, 0, 0, .5));
}

#shopTable tr.is-selected td {
  background: rgba(255, 200, 61, .065);
}

#shopTable tr.is-unaffordable:not(.is-selected) {
  opacity: .62;
}

.weapon-name {
  display: grid;
  gap: 2px;
}

.weapon-name b {
  color: #e8edf4;
  font-size: 12px;
}

.weapon-name small {
  color: #7f8fa3;
  font-size: 10px;
}

.shop-footer {
  min-height: 46px;
}

.shop-cart {
  color: #8f9db0;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 700;
}

.shop-cart.has-items {
  color: var(--amber-hi);
  font-weight: 800;
}

#btnShopDone {
  white-space: nowrap;
}

#keys {
  border-color: rgba(255, 200, 61, .35);
  background: linear-gradient(155deg, rgba(27, 36, 48, .98), rgba(9, 13, 19, .99));
  box-shadow: 0 28px 90px rgba(0, 0, 0, .72), inset 0 1px rgba(255, 255, 255, .07);
}

#toast {
  top: 20px;
  max-width: min(560px, calc(100vw - 32px));
  color: #fff2ce;
  border-color: rgba(255, 200, 61, .48);
  background: rgba(10, 15, 22, .94);
  backdrop-filter: blur(10px);
}

#wrap.in-game #toast {
  top: 78px;
}

@media (max-width: 760px) {
  .overlay {
    justify-content: flex-start;
    gap: 14px;
    padding: 18px 12px;
  }

  .overlay > :first-child { margin-top: auto; }
  .overlay > :last-child { margin-bottom: auto; }

  .marquee .eyebrow,
  .credit {
    display: none;
  }

  h1 {
    font-size: clamp(42px, 13vw, 62px);
  }

  .menu-lead {
    font-size: 12px;
  }

  .menu-panel {
    padding: 18px;
  }

  .mode-switch,
  .online-fields {
    grid-template-columns: 1fr;
  }

  .mode-switch {
    gap: 8px;
    margin-bottom: 0;
  }

  .mode-switch:has(.mode-button.active) {
    margin-bottom: 17px;
  }

  button.mode-button {
    min-height: 58px;
  }

  #playerRows {
    grid-template-columns: 1fr 1fr;
  }

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

  .opts label {
    grid-template-columns: 92px 1fr;
    align-items: center;
  }

  .opts label span {
    justify-self: end;
  }

  .hud-topline {
    top: 6px;
    gap: 7px;
    min-height: 38px;
    padding: 5px 9px;
    border-radius: 10px;
  }

  .hud-kicker,
  .hud-survivors,
  .hud-chip:first-child {
    display: none;
  }

  .hud-environment {
    padding: 0 8px;
    border-right: 0;
  }

  .hud-chip {
    padding: 4px 7px;
    font-size: 9px;
  }

  .hud-players {
    right: 6px;
    bottom: 6px;
    left: 6px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
  }

  .hud-player {
    min-height: 58px;
    padding: 7px 9px 8px;
    border-radius: 8px;
  }

  .hud-player-head strong {
    font-size: 11px;
  }

  .hud-player-head span,
  .hud-player-meta {
    font-size: 9px;
  }

  .hud-weapon {
    gap: 4px;
  }

  .hud-weapon-icon {
    flex-basis: 18px;
    width: 18px;
    height: 18px;
  }

  .hud-hp {
    height: 5px;
    margin: 5px 0;
  }

  .hud-hint {
    display: none;
  }

  #utilityDock {
    top: 6px;
    right: 6px;
  }

  #utilityDock .utility-btn,
  #utilityDock #btnMute {
    width: 32px;
    height: 30px;
    min-width: 32px;
    min-height: 30px;
    border-radius: 8px;
    font-size: 13px;
  }

  .shop-panel {
    padding: 18px 14px;
  }

  .shop-heading {
    align-items: flex-end;
  }

  .shop-heading h2 {
    font-size: 15px;
  }

  .shop-heading .eyebrow {
    font-size: 12px;
  }

  .shop-balance {
    min-width: 108px;
    padding: 8px 10px;
  }

  .shop-balance span {
    font-size: 11px;
  }

  #shopMoney {
    font-size: 21px;
  }

  .table-scroll {
    max-height: 56vh;
  }

  #shopTable th:nth-child(3),
  #shopTable td:nth-child(3) {
    display: none;
  }

  #shopTable td,
  #shopTable th {
    padding-right: 6px;
    padding-left: 6px;
  }

  .weapon-name small {
    display: none;
  }

  .shop-footer {
    align-items: stretch;
    flex-direction: column;
    gap: 9px;
  }

  .shop-cart {
    font-size: 16px;
  }
}

@media (max-width: 760px) {
  #stage {
    overflow: visible;
  }

  .touch-controls {
    position: absolute;
    right: 9px;
    bottom: -78px;
    left: 9px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 8px;
    pointer-events: none;
  }

  .touch-cluster {
    display: flex;
    gap: 6px;
    pointer-events: auto;
  }

  .touch-weapons {
    margin-left: auto;
  }

  .touch-controls button {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    min-width: 48px;
    min-height: 48px;
    padding: 0;
    color: #eef4f8;
    font-size: 20px;
    line-height: 1;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 14px;
    background: rgba(10, 15, 22, .74);
    box-shadow: 0 5px 0 rgba(0, 0, 0, .58), inset 0 1px rgba(255, 255, 255, .1);
    backdrop-filter: blur(7px);
    touch-action: none;
    user-select: none;
  }

  .touch-controls button span {
    color: #9baabd;
    font-size: 7px;
    letter-spacing: .08em;
    text-transform: uppercase;
  }

  .touch-controls button.is-held {
    color: var(--amber-hi);
    border-color: rgba(255, 200, 61, .7);
    background: rgba(94, 63, 7, .78);
    box-shadow: 0 1px 0 rgba(0, 0, 0, .7), 0 0 18px rgba(255, 185, 31, .22), inset 0 1px rgba(255, 255, 255, .14);
    transform: translateY(4px);
  }

  #touchFire {
    width: 64px;
    height: 64px;
    min-width: 64px;
    min-height: 64px;
    margin-left: 2px;
    color: #291b00;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .07em;
    text-transform: uppercase;
    border-color: #fff0ae;
    border-radius: 50%;
    background: linear-gradient(#ffe797, #ffc22e 62%, #df9505);
    box-shadow: 0 6px 0 #875300, 0 10px 25px rgba(0, 0, 0, .46), inset 0 1px #fff9df;
  }

  #touchFire span {
    color: rgba(41, 27, 0, .6);
  }
}

@media (max-height: 690px) and (min-width: 761px) {
  .marquee .eyebrow,
  .credit,
  .menu-lead {
    display: none;
  }

  .rule {
    margin-top: 10px;
    margin-bottom: 4px;
  }

  .overlay {
    gap: 10px;
    padding-top: 12px;
    padding-bottom: 12px;
  }

  .menu-panel {
    padding-top: 18px;
    padding-bottom: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
