html,
body {
  margin: 0 !important;
  padding: 0 !important;
  width: 100%;
  min-width: 320px;
  overflow: hidden;
  background: #020305;
}

.msb-body {
  background: #020305;
}

.msb-page,
.msb-page * {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

.msb-page {
  --black: #020305;
  --panel: #0d1219;
  --ink: #f7fbff;
  --muted: #9aa2aa;
  --yellow: #ffe04c;
  --blue: #2b64ff;
  --cyan: #5be7ff;
  --mint: #63ffd7;
  --pink: #ff3eb5;
  --orange: #ff512f;
  --violet: #832cff;
  position: relative;
  width: 100vw;
  height: 100svh;
  min-height: 540px;
  overflow: hidden;
  background:
    var(--msb-bg-image, linear-gradient(transparent, transparent)) center / cover no-repeat,
    radial-gradient(circle at 52% 40%, rgba(44, 99, 255, 0.13), transparent 28%),
    radial-gradient(circle at 50% 85%, rgba(255, 62, 181, 0.11), transparent 22%),
    var(--black);
  color: var(--ink);
  font-family: "Arial Black", Impact, system-ui, sans-serif;
  letter-spacing: 0.04em;
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
  overscroll-behavior: none;
}

body.admin-bar .msb-page {
  height: calc(100svh - 32px);
}

.msb-stage {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-rows: minmax(118px, 0.42fr) auto minmax(330px, 58vh);
  align-items: center;
  width: min(1180px, calc(100vw - 116px));
  height: 100%;
  margin: 0 auto;
  padding: clamp(10px, 1.7vh, 20px) 0 clamp(12px, 2vh, 22px);
}

.msb-pill,
.msb-play,
.msb-shot,
.msb-choice-button {
  text-decoration: none;
  text-transform: uppercase;
  color: #fff;
  text-shadow: 2px 2px 0 #000;
}

.msb-title-wrap {
  align-self: end;
  text-align: center;
  padding-bottom: clamp(8px, 1.5vh, 16px);
}

.msb-kicker {
  margin: 0 0 10px;
  color: var(--cyan);
  font-size: clamp(10px, 1.4vw, 14px);
  letter-spacing: 0.22em;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.msb-title {
  margin: 0;
  font-size: clamp(38px, 8.4vw, 96px);
  line-height: 0.82;
  text-transform: uppercase;
  color: transparent;
  -webkit-text-stroke: 2px #fff;
  text-shadow:
    5px 0 0 var(--yellow),
    10px 0 0 var(--orange),
    15px 0 0 var(--blue),
    20px 0 0 var(--mint),
    0 0 26px rgba(91, 231, 255, 0.35);
}

.msb-title-link {
  display: inline-block;
  text-decoration: none;
}

.msb-title-link:focus-visible {
  outline: 3px solid var(--cyan);
  outline-offset: 8px;
}

.msb-logo-image {
  display: block;
  width: min(760px, 78vw);
  max-height: 128px;
  object-fit: contain;
}

.msb-lead {
  width: min(720px, 92%);
  margin: clamp(10px, 1.6vh, 18px) auto 0;
  font-family: system-ui, sans-serif;
  font-size: clamp(12px, 1.5vw, 16px);
  font-weight: 700;
  line-height: 1.55;
  color: #dbeeff;
  letter-spacing: 0.04em;
}

.msb-link-rack {
  align-self: start;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  width: min(980px, 100%);
  margin: clamp(4px, 1vh, 10px) auto 0;
  padding: 8px 12px;
  background: rgba(170, 181, 194, 0.16);
  border: 1px solid rgba(202, 217, 232, 0.1);
  box-shadow: 0 0 0 4px #05070a;
}

.msb-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 6px 14px;
  background: var(--msb-pill-color, #6c7076);
  border: 2px solid #222730;
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.22);
  font-size: clamp(10px, 1.4vw, 14px);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-weight: 900;
}

.msb-pill {
  color: #fff;
}

.msb-pill[style*="#ffd84d"],
.msb-pill[style*="#63ffd7"] {
  color: #201500;
  text-shadow: none;
}

.msb-game-shell {
  position: relative;
  align-self: stretch;
  min-height: 330px;
  border: 4px solid #05070a;
  background:
    linear-gradient(rgba(2, 3, 5, 0.36), rgba(2, 3, 5, 0.36)),
    var(--msb-play-bg-image, linear-gradient(var(--black), var(--black))) center / cover no-repeat,
    var(--black);
  overflow: hidden;
}

.msb-canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.msb-game-shell::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background:
    linear-gradient(90deg, rgba(91, 231, 255, 0.16) 0 4px, transparent 4px 10px),
    linear-gradient(rgba(255, 255, 255, 0.1) 0 3px, transparent 3px 9px);
  mix-blend-mode: screen;
  transition: opacity 260ms ease;
}

.msb-game-shell.msb-game-starting::after,
.msb-page.msb-page-transitioning .msb-game-shell::after {
  opacity: 0.55;
  animation: msb-scan 620ms steps(6) both;
}

.msb-play,
.msb-shot,
.msb-choice-button {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  min-width: 156px;
  min-height: 46px;
  border: 3px solid #fff;
  background: var(--orange);
  font-size: 20px;
  font-family: "Arial Black", Impact, sans-serif;
  cursor: pointer;
  box-shadow: 0 7px 0 #741605, 0 0 24px rgba(255, 81, 47, 0.42);
}

.msb-play {
  bottom: clamp(14px, 3vh, 30px);
}

.msb-shot {
  display: none;
  bottom: clamp(72px, 10vh, 96px);
  background: #36b6ff;
  box-shadow: 0 7px 0 #104a80, 0 0 24px rgba(54, 182, 255, 0.42);
}

.msb-mode-choice {
  display: none;
  position: absolute;
  left: 50%;
  bottom: clamp(22px, 5vh, 48px);
  transform: translateX(-50%);
  width: min(460px, 86%);
  min-height: 58px;
  z-index: 3;
}

.msb-game-choice .msb-mode-choice {
  display: flex;
  justify-content: center;
  gap: 14px;
}

.msb-choice-button {
  position: static;
  transform: none;
  flex: 1 1 0;
  min-width: 128px;
}

.msb-choice-button:first-child {
  background: #ff512f;
}

.msb-choice-button:last-child {
  background: #36b6ff;
  box-shadow: 0 7px 0 #104a80, 0 0 24px rgba(54, 182, 255, 0.42);
}

.msb-game-armed .msb-shot {
  display: block;
}

.msb-play:active,
.msb-shot:active,
.msb-choice-button:active {
  transform: translate(-50%, 5px);
  box-shadow: 0 2px 0 #741605;
}

.msb-choice-button:active {
  transform: translateY(5px);
}

.msb-transition {
  position: fixed;
  z-index: 20;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background:
    linear-gradient(90deg, #000 0 8px, transparent 8px 16px),
    linear-gradient(#000 0 8px, transparent 8px 16px),
    rgba(2, 3, 5, 0.72);
  background-size: 16px 16px;
  transform: scale(1.06);
  transition: opacity 420ms steps(5), transform 420ms ease;
}

.msb-sound {
  position: absolute;
  z-index: 8;
  top: var(--msb-sound-top, 18px);
  left: var(--msb-sound-left, 110px);
  min-width: 96px;
  min-height: 32px;
  border: 2px solid #384250;
  background: #111822;
  color: #dbeeff;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  cursor: pointer;
  text-shadow: 1px 1px 0 #000;
  box-shadow: inset 0 -4px 0 rgba(255, 255, 255, 0.08);
}

.msb-sound[aria-pressed="true"] {
  border-color: #63ffd7;
  background: #12342e;
  color: #63ffd7;
}

.msb-page.msb-page-transitioning .msb-transition {
  opacity: 1;
  transform: scale(1);
}

.msb-edge {
  position: absolute;
  z-index: 1;
  top: 0;
  bottom: 0;
  width: clamp(42px, 8vw, 96px);
  background: repeating-linear-gradient(
    to bottom,
    var(--yellow) 0 16%,
    #ffbc36 16% 34%,
    var(--pink) 34% 49%,
    #cb50ff 49% 64%,
    var(--blue) 64% 80%,
    var(--cyan) 80% 100%
  );
  background: var(--msb-edge-bg);
  filter: saturate(1.15);
}

.msb-edge-left {
  left: 0;
}

.msb-edge-right {
  right: 0;
  transform: rotate(180deg);
}

@keyframes msb-scan {
  0% {
    transform: translateY(-18px);
  }
  100% {
    transform: translateY(18px);
  }
}

@media (max-width: 780px) {
  body.admin-bar .msb-page {
    height: calc(100svh - 46px);
  }

  .msb-page {
    min-height: 520px;
  }

  .msb-stage {
    width: min(100vw - 56px, 720px);
    grid-template-rows: minmax(104px, 0.38fr) auto minmax(340px, 60vh);
  }

  .msb-game-shell {
    min-height: 340px;
  }

  .msb-title {
    -webkit-text-stroke-width: 1px;
    text-shadow:
      3px 0 0 var(--yellow),
      6px 0 0 var(--orange),
      9px 0 0 var(--blue),
      12px 0 0 var(--mint);
  }

  .msb-pill {
    flex: 1 1 42%;
    padding: 7px 8px;
  }
}

@media (max-width: 460px), (max-height: 620px) {
  .msb-stage {
    width: min(100vw - 34px, 640px);
    grid-template-rows: minmax(86px, 0.26fr) auto minmax(330px, 62vh);
    padding-top: 10px;
  }

  .msb-game-shell {
    min-height: 330px;
  }

  .msb-lead {
    display: none;
  }

  .msb-link-rack {
    gap: 6px;
  }

  .msb-pill {
    min-height: 28px;
    font-size: 10px;
  }
}
