:root {
  --cyan: #08bad2;
  --cyan-deep: #007f9e;
  --cyan-light: #6ef0ef;
  --coral: #ff5473;
  --coral-deep: #a91d43;
  --ink: #063b52;
  --display: #164e48;
  --glow: #bbff8f;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  min-height: 100%;
  background: #fff2c6;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  font-family: "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
  background:
    radial-gradient(circle at 18% 15%, rgb(255 255 255 / 78%) 0 4%, transparent 18%),
    radial-gradient(circle at 88% 80%, rgb(255 255 255 / 55%) 0 5%, transparent 22%),
    repeating-linear-gradient(135deg, transparent 0 24px, rgb(244 159 75 / 5%) 24px 26px),
    linear-gradient(145deg, #fff9dd, #ffdda1);
}

button { font: inherit; }

.page-shell {
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 22px 16px 16px;
}

.toy {
  position: relative;
  width: min(760px, calc(100vw - 24px));
  padding: clamp(18px, 4vw, 36px);
  overflow: hidden;
  isolation: isolate;
  border: 5px solid #057b97;
  border-radius: 58px 58px 92px 92px;
  background:
    linear-gradient(90deg, transparent 0 3%, rgb(255 255 255 / 20%) 6%, transparent 12% 88%, rgb(0 83 117 / 14%) 96%),
    linear-gradient(155deg, var(--cyan-light), var(--cyan) 18%, #08accb 76%, var(--cyan-deep));
  box-shadow:
    inset 0 7px 3px rgb(255 255 255 / 48%),
    inset 0 -13px 8px rgb(0 79 111 / 28%),
    0 13px 0 #005d78,
    0 24px 38px rgb(91 57 28 / 30%);
}

.toy::before,
.toy::after {
  position: absolute;
  z-index: -1;
  bottom: 12%;
  width: 28px;
  height: 38%;
  border-radius: 50%;
  background: rgb(0 92 126 / 22%);
  content: "";
}

.toy::before { left: -14px; }
.toy::after { right: -14px; }

.toy__highlight {
  position: absolute;
  top: 17px;
  left: 11%;
  width: 43%;
  height: 8px;
  border-radius: 999px;
  background: rgb(255 255 255 / 43%);
  transform: rotate(-1.5deg);
}

.scoreboard {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin: 0 10px 17px;
}

.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 5px;
  padding: 3px 9px 3px 7px;
  border-radius: 999px;
  background: rgb(6 59 82 / 55%);
  color: #eafffb;
  font-size: clamp(7px, 1.3vw, 10px);
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.live-badge[hidden] { display: none; }

.live-badge__dot {
  width: 6px;
  height: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #3cff6a;
  animation: live-badge-pulse 1.8s ease-out infinite;
}

@keyframes live-badge-pulse {
  0% { box-shadow: 0 0 0 0 rgb(60 255 106 / 55%); }
  70% { box-shadow: 0 0 0 6px rgb(60 255 106 / 0%); }
  100% { box-shadow: 0 0 0 0 rgb(60 255 106 / 0%); }
}

@media (prefers-reduced-motion: reduce) {
  .live-badge__dot { animation: none; }
}

.brand-block__eyebrow {
  display: block;
  margin-bottom: 2px;
  color: #eafffb;
  font-size: clamp(8px, 1.5vw, 12px);
  font-weight: 900;
  letter-spacing: .2em;
  text-transform: uppercase;
  text-shadow: 0 1px #007893;
}

.brand-block h1 {
  margin: 0;
  color: #fff9cb;
  font-size: clamp(20px, 4vw, 36px);
  font-style: italic;
  font-weight: 1000;
  letter-spacing: -.07em;
  line-height: .95;
  text-shadow: 1px 2px #ef4563, 3px 4px #00758e;
  transform: rotate(-2deg);
}

.brand-block h1 span { font-size: .55em; }

.digital-readout {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: clamp(9px, 2vw, 18px);
  min-width: min(315px, 49%);
  padding: 9px clamp(12px, 2vw, 20px) 10px;
  border: 4px solid #00637c;
  border-radius: 14px;
  background: linear-gradient(rgb(255 255 255 / 8%), transparent 35%), var(--display);
  box-shadow: inset 0 3px 7px rgb(0 0 0 / 46%), 0 3px rgb(133 255 246 / 56%);
}

.digital-readout__item {
  display: grid;
  flex: 1;
  gap: 2px;
  min-width: 0;
  text-align: center;
}

.digital-readout__item + .digital-readout__item {
  border-left: 2px solid #0a373a;
}

.digital-readout__item--timer .digital-readout__value {
  color: #fff59b;
}

.toy.is-versus .digital-readout {
  min-width: min(390px, 56%);
  gap: 8px;
  padding-inline: 8px;
}

.toy.is-versus .digital-readout__value {
  font-size: clamp(19px, 4vw, 32px);
}

.toy.is-versus #leftReadout .digital-readout__value { color: #ff8ba0; }
.toy.is-versus #rightReadout .digital-readout__value { color: #8ca9ff; }

.digital-readout__label {
  color: #8cd4a3;
  font: 700 clamp(8px, 1.4vw, 11px) / 1 monospace;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.digital-readout__value {
  color: var(--glow);
  font: 800 clamp(22px, 5vw, 39px) / .95 "Courier New", monospace;
  letter-spacing: .04em;
  text-shadow: 0 0 8px rgb(176 255 132 / 34%);
}

.digital-readout__divider {
  width: 2px;
  height: 35px;
  background: #0a373a;
  box-shadow: 1px 0 rgb(137 205 166 / 19%);
}

.tank-bezel {
  padding: clamp(10px, 2vw, 17px);
  border: 4px solid #006b84;
  border-radius: 35px;
  background: linear-gradient(145deg, #026c86, #53e0e5 50%, #00627d);
  box-shadow: inset 0 3px 5px rgb(255 255 255 / 45%), 0 4px rgb(125 255 245 / 31%);
}

.tank {
  position: relative;
  aspect-ratio: 620 / 560;
  overflow: hidden;
  border: 5px solid #d7ffff;
  border-radius: 24px;
  background: #95e6ea;
  box-shadow: inset 0 0 32px rgb(0 88 126 / 43%), inset 0 0 0 3px rgb(20 109 134 / 42%), 0 2px #00647c;
}

#gameCanvas {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}

.tank__glare {
  position: absolute;
  z-index: 4;
  top: -22%;
  left: -17%;
  width: 52%;
  height: 116%;
  pointer-events: none;
  border-radius: 50%;
  background: linear-gradient(90deg, transparent, rgb(255 255 255 / 13%), transparent);
  transform: rotate(17deg);
}

.tank__rim {
  position: absolute;
  z-index: 4;
  inset: 0;
  pointer-events: none;
  border-radius: 19px;
  box-shadow: inset 9px 10px 14px rgb(255 255 255 / 20%), inset -8px -10px 17px rgb(0 66 102 / 23%);
}

.game-overlay {
  position: absolute;
  z-index: 6;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  background: rgb(8 82 105 / 20%);
  backdrop-filter: blur(2px);
  transition: opacity 180ms ease;
}

.game-overlay.is-visible { opacity: 1; pointer-events: auto; }

.game-overlay__panel {
  width: min(410px, 90%);
  padding: clamp(20px, 5vw, 35px);
  border: 4px solid rgb(255 255 255 / 83%);
  border-radius: 28px;
  text-align: center;
  background: rgb(234 255 242 / 88%);
  box-shadow: 0 12px 35px rgb(0 52 82 / 30%), inset 0 2px white;
}

.game-overlay__kicker {
  color: #f13d61;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .2em;
  text-transform: uppercase;
}

.game-overlay h2 {
  margin: 5px 0 8px;
  color: #007e9b;
  font-size: clamp(30px, 8vw, 54px);
  letter-spacing: -.07em;
  line-height: .95;
  text-shadow: 2px 2px white;
}

.game-overlay p {
  margin: 0 auto 20px;
  max-width: 32ch;
  font: clamp(13px, 2.5vw, 17px) / 1.4 "Trebuchet MS", sans-serif;
}

.mode-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 11px;
}

.mode-button {
  min-width: 0;
  padding: 13px 10px 11px;
  border: 3px solid;
  border-radius: 17px;
  color: white;
  cursor: pointer;
  box-shadow: inset 0 3px rgb(255 255 255 / 28%), 0 5px rgb(0 66 92 / 20%);
  transition: transform 80ms ease;
}

.mode-button:active { transform: translateY(3px); }
.mode-button--solo { border-color: #a71f43; background: linear-gradient(#ff7890, #f13e62); }
.mode-button--online { border-color: #0c7a4f; background: linear-gradient(#3ddc97, #12a06a); }
.mode-button strong { display: block; font-size: 16px; text-transform: uppercase; }
.mode-button small { display: block; margin-top: 4px; font: 700 10px/1.2 "Trebuchet MS", sans-serif; }

.online-share {
  display: flex;
  gap: 8px;
  margin-top: 14px;
}

.online-share[hidden] { display: none; }

.online-share__input {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border: 2px solid #8fa8c2;
  border-radius: 10px;
  background: #f4f8fc;
  color: #14364f;
  font: 700 13px/1.2 "Courier New", monospace;
}

.online-share__copy {
  flex: 0 0 auto;
  min-width: 104px;
  padding: 10px 14px;
  border: 2px solid #0c7a4f;
  border-radius: 10px;
  background: linear-gradient(#3ddc97, #12a06a);
  color: white;
  cursor: pointer;
  font: 900 12px/1.2 "Trebuchet MS", sans-serif;
  text-align: center;
  text-transform: uppercase;
}

.online-share__copy:active { transform: translateY(2px); }
.online-share__copy.is-copied { background: linear-gradient(#8097ff, #5368d8); border-color: #33439e; }

.overlay-actions {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.overlay-menu-button {
  padding: 10px 14px;
  border: 2px solid #00728d;
  border-radius: 999px;
  color: #00667f;
  cursor: pointer;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: #bff5ec;
}

.overlay-button,
.reset-button { border: 0; cursor: pointer; text-transform: uppercase; }

.overlay-button {
  padding: 13px 25px 11px;
  border: 3px solid var(--coral-deep);
  border-radius: 999px;
  color: white;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: .1em;
  background: linear-gradient(#ff7890, #f13e62);
  box-shadow: inset 0 3px rgb(255 255 255 / 35%), 0 5px var(--coral-deep);
}

.overlay-button:active { transform: translateY(4px); box-shadow: 0 1px var(--coral-deep); }

.control-labels {
  display: flex;
  justify-content: space-between;
  padding: 10px 6% 3px;
  color: #005e78;
  font-size: clamp(9px, 2vw, 12px);
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.controls {
  display: grid;
  grid-template-columns: minmax(100px, 1fr) minmax(70px, .55fr) minmax(100px, 1fr);
  align-items: center;
  gap: clamp(11px, 4vw, 32px);
  padding: 4px 5% 5px;
}

.player-station {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.jet-button {
  position: relative;
  min-height: clamp(72px, 15vw, 105px);
  overflow: hidden;
  border: 5px solid var(--coral-deep);
  border-radius: 28px 28px 35px 35px;
  color: white;
  cursor: pointer;
  font-size: clamp(17px, 4vw, 28px);
  font-weight: 1000;
  letter-spacing: .02em;
  line-height: .85;
  text-transform: uppercase;
  background: radial-gradient(circle at 50% 20%, #ff9ead 0 6%, transparent 38%), linear-gradient(145deg, #ff6980, #eb3158);
  box-shadow: inset 0 7px 2px rgb(255 255 255 / 24%), inset 0 -7px 5px rgb(132 13 54 / 19%), 0 9px #9e1c40, 0 13px 12px rgb(0 79 108 / 36%);
  transition: transform 70ms ease, box-shadow 70ms ease;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

.jet-button:active,
.jet-button.is-pressed {
  transform: translateY(7px) scaleY(.97);
  box-shadow: inset 0 4px 6px rgb(113 0 37 / 19%), 0 2px #9e1c40, 0 5px 6px rgb(0 79 108 / 26%);
}

.toy.is-versus .player-station--two .jet-button {
  border-color: #303f9b;
  background: radial-gradient(circle at 50% 20%, #b3c0ff 0 6%, transparent 38%), linear-gradient(145deg, #8097ff, #5368d8);
  box-shadow: inset 0 7px 2px rgb(255 255 255 / 24%), inset 0 -7px 5px rgb(22 29 116 / 22%), 0 9px #303f9b, 0 13px 12px rgb(0 79 108 / 36%);
}

.toy.is-versus .player-station--two .jet-button:active,
.toy.is-versus .player-station--two .jet-button.is-pressed {
  box-shadow: inset 0 4px 6px rgb(17 24 92 / 22%), 0 2px #303f9b, 0 5px 6px rgb(0 79 108 / 26%);
}

.jet-button.is-hijacked {
  filter: brightness(1.18) saturate(1.25);
  outline: 4px solid #fff07a;
  outline-offset: 3px;
}

.jet-button.is-jammed {
  filter: grayscale(0.75) brightness(0.75);
  pointer-events: none;
  animation: jet-jammed-shake 320ms ease-in-out;
}

@keyframes jet-jammed-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

@media (prefers-reduced-motion: reduce) {
  .jet-button.is-jammed { animation: none; }
}

.jet-button:focus-visible,
.overlay-button:focus-visible,
.reset-button:focus-visible { outline: 4px solid #fff6a8; outline-offset: 3px; }

.jet-button__shine {
  position: absolute;
  top: 9px;
  left: 15%;
  width: 42%;
  height: 10px;
  border-radius: 50%;
  background: rgb(255 255 255 / 35%);
}

.jet-button__arrow { margin-right: 4px; color: #fff7aa; font-size: .85em; }

.jet-button small {
  display: block;
  margin-top: 9px;
  color: #ffd6d9;
  font: 800 clamp(8px, 1.8vw, 11px) / 1 monospace;
  letter-spacing: .1em;
}

.power-button {
  justify-self: center;
  min-width: 112px;
  padding: 7px 10px 6px;
  border: 3px solid #9b5b00;
  border-radius: 999px;
  color: #4c3100;
  cursor: pointer;
  font-size: 11px;
  font-weight: 1000;
  letter-spacing: .06em;
  text-transform: uppercase;
  background: linear-gradient(#fff89a, #ffbd36);
  box-shadow: inset 0 2px rgb(255 255 255 / 55%), 0 4px #9b5b00;
}

.power-button em { font-style: normal; }
.power-button span { color: #b21f43; font-size: 14px; }
.power-button small { margin-left: 7px; font: 900 10px/1 monospace; opacity: .7; }
.power-button:active { transform: translateY(3px); box-shadow: 0 1px #9b5b00; }
.power-button:disabled { cursor: not-allowed; filter: grayscale(1); opacity: .48; }

.control-center {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
}

.control-center .power-button {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 0;
  transform: translate(-50%, -50%);
}

.toy.is-versus .control-center .speaker { display: none; }

.speaker {
  display: grid;
  grid-template-columns: repeat(3, 10px);
  justify-content: center;
  gap: 8px;
  transform: rotate(45deg);
}

.speaker span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #00738e;
  box-shadow: inset 1px 2px 2px rgb(0 44 68 / 52%), 1px 1px rgb(143 255 249 / 34%);
}

.toy-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 4% 0;
  color: #d7ffff;
  font-size: clamp(8px, 1.6vw, 11px);
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.theme-switcher {
  display: inline-flex;
  gap: 3px;
  padding: 3px;
  border: 2px solid rgb(0 79 105 / 45%);
  border-radius: 999px;
  background: rgb(0 72 96 / 18%);
  box-shadow: inset 0 2px 4px rgb(0 38 58 / 22%);
}

.theme-switcher__button {
  min-width: 45px;
  padding: 5px 8px 4px;
  border: 0;
  border-radius: 999px;
  color: rgb(223 255 251 / 75%);
  cursor: pointer;
  font-size: 9px;
  font-weight: 1000;
  letter-spacing: .07em;
  text-transform: uppercase;
  background: transparent;
  transition: color 140ms ease, background-color 140ms ease, box-shadow 140ms ease, transform 80ms ease;
}

.theme-switcher__button.is-active {
  color: #07425a;
  background: #fff3a0;
  box-shadow: inset 0 2px white, 0 2px 4px rgb(0 39 61 / 25%);
}

.theme-switcher__button:active { transform: translateY(2px); }

.theme-switcher__button:focus-visible,
.mode-menu-button:focus-visible,
.sound-button:focus-visible,
.tilt-button:focus-visible { outline: 3px solid #fff6a8; outline-offset: 2px; }

.toy-footer__badge { padding: 5px 8px; border: 2px solid rgb(207 255 250 / 62%); border-radius: 6px; }

.mode-menu-button,
.sound-button,
.tilt-button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 29px;
  padding: 5px 8px;
  border: 2px solid rgb(207 255 250 / 62%);
  border-radius: 6px;
  color: #d7ffff;
  cursor: pointer;
  font-size: inherit;
  font-weight: 900;
  letter-spacing: .1em;
  text-align: center;
  text-transform: uppercase;
  background: transparent;
}

.sound-button[aria-pressed="false"] { opacity: .5; }
.sound-button:active { transform: translateY(2px); }

.tilt-button {
  letter-spacing: .08em;
  background: rgb(0 82 105 / 18%);
  transition: transform 80ms ease, color 140ms ease, background-color 140ms ease;
}

.tilt-button[aria-pressed="true"] {
  border-color: #fff1a0;
  color: #174556;
  background: #fff1a0;
  box-shadow: inset 0 2px white, 0 2px rgb(87 77 5 / 25%);
}

.tilt-button.is-error { border-color: #ffb2bd; color: #fff0f2; background: #a62d4b; }
.tilt-button:active { transform: translateY(2px); }

.reset-button {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 29px;
  padding: 6px 10px;
  border: 2px solid #00627b;
  border-radius: 7px;
  color: #00627b;
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .08em;
  text-align: center;
  background: #62e3e3;
  box-shadow: 0 3px #00627b;
}

.instructions {
  margin: 24px 0 0;
  color: #6d563c;
  font: 700 clamp(11px, 2.4vw, 14px) / 1.4 "Courier New", monospace;
  text-align: center;
}

.credits {
  margin: 8px 0 0;
  color: #a6875f;
  font: 700 clamp(9px, 2vw, 11px) / 1.4 "Courier New", monospace;
  text-align: center;
}

.credits a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.soundtrack {
  /* Audio only — the player's own control panel is not shown. */
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

/* --------------------------------------------------------------------------
   SWITCHABLE CONSOLE SKINS
   Sunburst follows the bright yellow 1980s toy direction; Clearwave uses the
   translucent aqua / navy electronics direction. Layout and controls remain
   identical so changing the shell never changes the game or thumb positions.
   -------------------------------------------------------------------------- */

body[data-theme="sunburst"] {
  --cyan: #f8bd18;
  --cyan-deep: #d78300;
  --cyan-light: #ffe85e;
  --ink: #10496b;
  background:
    radial-gradient(circle at 50% 18%, rgb(255 255 255 / 82%) 0 7%, transparent 29%),
    repeating-conic-gradient(from -8deg at 50% 44%, rgb(249 180 30 / 8%) 0 7deg, transparent 7deg 15deg),
    #fff5d2;
}

body[data-theme="sunburst"] .toy {
  border-color: #e3a100;
  background:
    linear-gradient(90deg, transparent 0 3%, rgb(255 255 255 / 34%) 6%, transparent 13% 88%, rgb(177 104 0 / 13%) 96%),
    linear-gradient(155deg, #fff277, #ffd629 20%, #ffc51e 76%, #e9a408);
  box-shadow:
    inset 0 8px 3px rgb(255 255 255 / 56%),
    inset 0 -13px 8px rgb(164 92 0 / 24%),
    0 13px 0 #bd7800,
    0 24px 38px rgb(91 57 28 / 30%);
}

body[data-theme="sunburst"] .toy::before,
body[data-theme="sunburst"] .toy::after { background: rgb(176 101 0 / 18%); }
body[data-theme="sunburst"] .brand-block__eyebrow { color: #1486ae; text-shadow: none; }
body[data-theme="sunburst"] .brand-block h1 { color: #fffdf0; text-shadow: 1px 2px #ef4563, 3px 4px #1685b0; }
body[data-theme="sunburst"] .tank-bezel { border-color: #087a93; background: linear-gradient(145deg, #0088a2, #57edf0 50%, #00647f); }
body[data-theme="sunburst"] .control-labels { color: #a74c19; }
body[data-theme="sunburst"] .toy.is-versus .control-labels span:last-child { color: #284fba; }
body[data-theme="sunburst"] .speaker span { background: #9d6800; box-shadow: inset 1px 2px 2px rgb(83 44 0 / 47%), 1px 1px rgb(255 245 151 / 58%); }
body[data-theme="sunburst"] .toy-footer { color: #946000; }
body[data-theme="sunburst"] .mode-menu-button,
body[data-theme="sunburst"] .sound-button { border-color: #0786a4; color: white; background: #09a8bf; box-shadow: 0 3px #08728c; }
body[data-theme="sunburst"] .tilt-button { border-color: #d78d00; color: #895500; background: #ffe274; }
body[data-theme="sunburst"] .tilt-button[aria-pressed="true"] { border-color: #087f9b; color: white; background: #08a9c2; box-shadow: inset 0 2px rgb(255 255 255 / 45%), 0 3px #08718a; }
body[data-theme="sunburst"] .reset-button { background: #a8eddf; }

body[data-theme="clearwave"] {
  --cyan: #5bc9dc;
  --cyan-deep: #083956;
  --cyan-light: #e1ffff;
  --ink: #dffcff;
  --display: #071923;
  background:
    radial-gradient(circle at 50% 28%, rgb(46 125 161 / 42%) 0 8%, transparent 46%),
    linear-gradient(160deg, #102f4a, #061a2e 58%, #020e1d);
}

body[data-theme="clearwave"] .toy {
  border-color: rgb(211 253 255 / 76%);
  background:
    linear-gradient(90deg, rgb(255 255 255 / 18%), transparent 13% 84%, rgb(0 30 54 / 22%)),
    linear-gradient(155deg, rgb(199 250 255 / 72%), rgb(64 172 196 / 72%) 22%, rgb(18 94 126 / 82%) 74%, rgb(5 43 70 / 94%));
  box-shadow:
    inset 0 8px 5px rgb(255 255 255 / 72%),
    inset 0 0 0 7px rgb(146 229 241 / 20%),
    inset 0 -16px 14px rgb(0 28 53 / 42%),
    0 10px 0 #05243a,
    0 27px 48px rgb(0 4 13 / 58%);
  backdrop-filter: blur(12px) saturate(1.18);
}

body[data-theme="clearwave"] .toy::before,
body[data-theme="clearwave"] .toy::after { background: rgb(220 255 255 / 22%); }
body[data-theme="clearwave"] .toy__highlight { background: rgb(255 255 255 / 68%); }
body[data-theme="clearwave"] .brand-block__eyebrow { color: #d4faff; text-shadow: 0 1px #153e55; }
body[data-theme="clearwave"] .brand-block h1 { color: #f2fdff; text-shadow: 1px 2px #5fb2bf, 3px 4px #18374b; }
body[data-theme="clearwave"] .digital-readout { border-color: #315a6a; background: linear-gradient(rgb(255 255 255 / 7%), transparent 35%), #071923; box-shadow: inset 0 3px 10px rgb(0 0 0 / 72%), 0 2px rgb(227 255 255 / 72%); }
body[data-theme="clearwave"] .tank-bezel { border-color: rgb(214 255 255 / 74%); background: linear-gradient(145deg, rgb(225 255 255 / 82%), rgb(67 169 194 / 76%) 48%, rgb(4 56 89 / 94%)); box-shadow: inset 0 3px 6px white, 0 4px #0a3854; }
body[data-theme="clearwave"] .game-overlay__panel { color: #063b52; }
body[data-theme="clearwave"] .control-labels span:first-child { color: #ffadad; }
body[data-theme="clearwave"] .control-labels span:last-child { color: #a9c8ff; }
body[data-theme="clearwave"] .power-button {
  border-color: #6c98a9;
  border-radius: 9px;
  color: #edfaff;
  background: linear-gradient(#17394b, #071c2b);
  box-shadow: inset 0 2px rgb(255 255 255 / 13%), 0 4px #03131f;
}
body[data-theme="clearwave"] .power-button span { color: #ffb739; }
body[data-theme="clearwave"] .power-button small { color: #ffbd45; opacity: 1; }
body[data-theme="clearwave"] .power-button:active { box-shadow: 0 1px #03131f; }
body[data-theme="clearwave"] .speaker span { background: #072b42; box-shadow: inset 1px 2px 2px black, 1px 1px rgb(187 246 255 / 38%); }
body[data-theme="clearwave"] .toy-footer { color: #d7f8ff; }
body[data-theme="clearwave"] .mode-menu-button,
body[data-theme="clearwave"] .sound-button { border-color: #afdeea; color: #e6fbff; background: rgb(5 32 50 / 46%); }
body[data-theme="clearwave"] .tilt-button { border-color: #7ea9b7; color: #dff8ff; background: rgb(5 31 47 / 72%); }
body[data-theme="clearwave"] .tilt-button[aria-pressed="true"] { border-color: #ffd66b; color: #122f3d; background: #ffd66b; }
body[data-theme="clearwave"] .reset-button { border-color: #173d54; color: #143a51; background: #c7dce0; box-shadow: 0 3px #173d54; }
body[data-theme="clearwave"] .theme-switcher { border-color: rgb(206 250 255 / 55%); background: rgb(1 20 35 / 48%); }
body[data-theme="clearwave"] .theme-switcher__button { color: rgb(221 251 255 / 62%); }
body[data-theme="clearwave"] .theme-switcher__button.is-active { color: #072b40; background: #c7f8ff; box-shadow: inset 0 2px white, 0 2px 4px rgb(0 8 18 / 55%); }

@media (max-width: 570px) {
  body { min-height: 100svh; overflow: hidden; }

  .page-shell { align-content: center; min-height: 100svh; padding: 7px; }

  .toy {
    padding: 12px 11px 16px;
    border-width: 3px;
    border-radius: 34px 34px 48px 48px;
    box-shadow: inset 0 5px 3px rgb(255 255 255 / 45%), inset 0 -9px 6px rgb(0 79 111 / 25%), 0 8px #005d78, 0 14px 24px rgb(91 57 28 / 25%);
  }

  .scoreboard { gap: 8px; margin: 4px 4px 8px; }
  .digital-readout { gap: 7px; padding: 6px 8px; border-width: 3px; border-radius: 10px; }
  .toy.is-versus .digital-readout { min-width: 57%; gap: 4px; padding-inline: 4px; }
  .toy.is-versus .digital-readout__label { font-size: 7px; letter-spacing: .1em; }
  .toy.is-versus .digital-readout__value { font-size: clamp(15px, 5vw, 23px); }
  .tank-bezel { padding: 6px; border-width: 3px; border-radius: 23px; }
  .tank { border-width: 3px; border-radius: 17px; }
  .game-overlay { padding: 14px; }
  .game-overlay__panel { padding: 19px 14px; border-radius: 22px; }
  .game-overlay p { margin-bottom: 15px; }
  .mode-buttons { gap: 7px; }
  .mode-button { padding: 10px 6px 9px; border-width: 2px; }
  .mode-button strong { font-size: 13px; }
  .mode-button small { font-size: 8px; }
  .controls { grid-template-columns: 1fr 42px 1fr; gap: 9px; }
  .speaker { grid-template-columns: repeat(3, 7px); gap: 5px; }
  .speaker span { width: 7px; height: 7px; }

  .jet-button {
    min-height: 62px;
    border-width: 3px;
    border-radius: 18px 18px 23px 23px;
    box-shadow: inset 0 5px 2px rgb(255 255 255 / 24%), inset 0 -5px 4px rgb(132 13 54 / 19%), 0 6px #9e1c40, 0 9px 8px rgb(0 79 108 / 30%);
  }

  .jet-button:active,
  .jet-button.is-pressed { transform: translateY(5px) scaleY(.97); }
  .power-button { min-width: 0; padding: 7px 10px; border-width: 2px; font-size: 9px; box-shadow: 0 3px #9b5b00; }
  .power-button em, .power-button small { display: none; }
  .power-button span { margin: 0; font-size: 13px; }
  .player-station { gap: 7px; }
  .control-labels { padding-top: 6px; }
  .toy-footer { padding-top: 9px; }
  .sound-button, .tilt-button { padding-inline: 6px; font-size: 7px; }
  .theme-switcher { gap: 2px; padding: 2px; }
  .theme-switcher__button { min-width: 37px; padding: 4px 5px 3px; font-size: 7px; }
  .instructions { display: none; }
}

@media (max-width: 570px) and (max-height: 700px) {
  .toy { width: min(calc(100vw - 12px), 430px); padding-block: 9px 13px; }
  .scoreboard { margin-bottom: 5px; }
  .game-overlay { padding: 7px; }
  .game-overlay__panel { padding: 12px 10px; border-width: 3px; }
  .game-overlay h2 { font-size: 28px; }
  .game-overlay p { margin-bottom: 8px; font-size: 11px; line-height: 1.25; }
  .mode-button { padding-block: 7px 6px; }
  .control-labels { padding-top: 4px; }
  .jet-button { min-height: 55px; }
  .toy-footer { padding-top: 6px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; }
}

/* --------------------------------------------------------------------------
   PHYSICAL CONSOLE PASS
   Keep the cabinet handheld-sized even on a desktop. The layered seams,
   hardware, hard plastic edges and separate control deck make it read as a
   manufactured water toy instead of a responsive dashboard.
   -------------------------------------------------------------------------- */

.page-shell { padding: 12px 10px 10px; }

.toy {
  width: min(470px, calc(100vw - 20px), calc((100svh - 70px) * .66));
  padding: 18px 18px 22px;
  border-width: 3px;
  border-radius: 45px 45px 61px 61px;
}

.toy::before,
.toy::after {
  z-index: 0;
  inset: 7px;
  width: auto;
  height: auto;
  pointer-events: none;
  border: 2px solid rgb(255 255 255 / 35%);
  border-radius: 36px 36px 52px 52px;
  background: transparent;
  box-shadow: 0 1px rgb(113 66 0 / 18%);
}

.toy::after {
  inset: 13px;
  border-width: 1px;
  border-color: rgb(116 65 0 / 18%);
  border-radius: 31px 31px 47px 47px;
  box-shadow: none;
}

.toy > :not(.toy__highlight, .case-hardware) { position: relative; z-index: 1; }

.toy__highlight {
  z-index: 2;
  top: 10px;
  left: 15%;
  width: 34%;
  height: 4px;
}

.case-hardware {
  position: absolute;
  z-index: 3;
  inset: 0;
  pointer-events: none;
}

.case-hardware i {
  position: absolute;
  width: 8px;
  height: 8px;
  border: 1px solid rgb(91 58 0 / 38%);
  border-radius: 50%;
  background: #f4bd1e;
  box-shadow: inset 1px 1px 1px rgb(255 255 255 / 72%), 0 1px 1px rgb(97 55 0 / 35%);
}

.case-hardware i::after {
  position: absolute;
  top: 3px;
  left: 1px;
  width: 5px;
  height: 1px;
  background: rgb(84 59 11 / 52%);
  content: "";
  transform: rotate(-24deg);
}

.case-hardware i:nth-child(1) { top: 22px; left: 18px; }
.case-hardware i:nth-child(2) { top: 22px; right: 18px; }
.case-hardware i:nth-child(3) { bottom: 21px; left: 21px; }
.case-hardware i:nth-child(4) { right: 21px; bottom: 21px; }

.scoreboard {
  gap: 10px;
  margin: 2px 11px 13px;
}

.brand-block { flex: 1 1 42%; min-width: 0; }

.brand-block__eyebrow {
  font-size: clamp(7px, 1.8vw, 10px);
  letter-spacing: .16em;
}

.brand-block h1 { font-size: clamp(22px, 6.5vw, 29px); }

.digital-readout,
.toy.is-versus .digital-readout {
  min-width: 54%;
  gap: 6px;
  padding: 7px 7px 8px;
  border-width: 3px;
  border-radius: 12px;
}

.digital-readout__label { font-size: clamp(7px, 1.7vw, 9px); letter-spacing: .11em; }
.digital-readout__value,
.toy.is-versus .digital-readout__value { font-size: clamp(20px, 6vw, 27px); }

.tank-bezel {
  padding: 8px;
  border-width: 3px;
  border-radius: 28px;
}

.tank {
  border-width: 4px;
  border-radius: 20px;
  box-shadow:
    inset 0 0 28px rgb(0 69 105 / 35%),
    inset 0 0 0 2px rgb(22 106 130 / 42%),
    0 2px #00536b;
}

.tank__rim { border-radius: 15px; }

.control-deck {
  position: relative;
  margin-top: 4px;
  padding: 0 3px 3px;
  border-radius: 0 0 34px 34px;
}

.control-labels {
  padding: 9px 6% 4px;
  font-size: 9px;
  letter-spacing: .15em;
}

.controls {
  grid-template-columns: minmax(110px, 1fr) 45px minmax(110px, 1fr);
  gap: 10px;
  padding: 3px 5% 5px;
}

.jet-button {
  min-height: 78px;
  border-width: 4px;
  border-radius: 23px 23px 29px 29px;
  font-size: 23px;
  box-shadow:
    inset 0 5px 0 rgb(255 255 255 / 32%),
    inset 0 0 0 2px rgb(255 255 255 / 13%),
    inset 0 -7px 4px rgb(116 8 43 / 23%),
    0 7px #941636,
    0 10px 10px rgb(75 45 4 / 28%);
}

.toy.is-versus .player-station--two .jet-button {
  box-shadow:
    inset 0 5px 0 rgb(255 255 255 / 32%),
    inset 0 0 0 2px rgb(255 255 255 / 12%),
    inset 0 -7px 4px rgb(18 24 105 / 27%),
    0 7px #29388f,
    0 10px 10px rgb(42 45 82 / 30%);
}

.jet-button__shine { top: 8px; left: 13%; width: 48%; height: 6px; opacity: .82; }
.jet-button small { margin-top: 8px; font-size: 9px; }

.speaker {
  grid-template-columns: repeat(3, 7px);
  gap: 6px;
}

.speaker span { width: 7px; height: 7px; }

.power-button {
  min-width: 100px;
  border-radius: 10px;
  box-shadow: inset 0 2px rgb(255 255 255 / 55%), 0 3px #8f5200;
}

.toy-footer { padding: 11px 4% 0; }

.mode-menu-button,
.reset-button,
.sound-button,
.tilt-button {
  min-height: 29px;
  padding-inline: 9px;
  border-radius: 8px;
}

.theme-switcher {
  gap: 1px;
  padding: 2px;
  border-radius: 7px;
}

.theme-switcher__button {
  min-width: 37px;
  padding: 4px 5px;
  border-radius: 5px;
  font-size: 7px;
}

/* Sunburst: opaque injection-moulded ABS with a warm lower lip. */
body[data-theme="sunburst"] .toy {
  border-color: #d38d00;
  background:
    linear-gradient(90deg, transparent 0 4%, rgb(255 255 255 / 25%) 7%, transparent 11% 88%, rgb(147 74 0 / 13%) 96%),
    linear-gradient(165deg, #ffe65a 0 8%, #ffd324 31%, #ffc41a 78%, #eca60b);
  box-shadow:
    inset 0 5px 2px rgb(255 255 255 / 67%),
    inset 0 -12px 7px rgb(149 76 0 / 23%),
    0 9px 0 #bd7700,
    0 18px 30px rgb(91 57 28 / 28%);
}

body[data-theme="sunburst"] .tank-bezel {
  border-color: #00718b;
  background: linear-gradient(150deg, #07bdd0, #7bfbf0 42%, #00819c 78%);
  box-shadow:
    inset 0 3px 2px rgb(255 255 255 / 62%),
    inset 0 -3px 3px rgb(0 63 87 / 35%),
    0 3px #b57a00;
}

body[data-theme="sunburst"] .digital-readout { border-color: #07596b; box-shadow: inset 0 4px 7px rgb(0 0 0 / 56%), 0 2px #ffec79; }
body[data-theme="sunburst"] .control-deck { background: rgb(255 213 46 / 10%); }

/* Clearwave: transparent shell over a deep blue internal control plate. */
body[data-theme="clearwave"] .toy {
  border-color: rgb(226 254 255 / 85%);
  background:
    repeating-linear-gradient(90deg, rgb(255 255 255 / 7%) 0 1px, transparent 1px 34px),
    linear-gradient(100deg, rgb(235 255 255 / 55%), transparent 11% 82%, rgb(2 28 48 / 30%)),
    linear-gradient(164deg, rgb(116 218 231 / 55%), rgb(23 112 145 / 65%) 54%, rgb(4 48 76 / 91%));
  box-shadow:
    inset 0 5px 3px rgb(255 255 255 / 84%),
    inset 0 0 0 6px rgb(157 233 244 / 23%),
    inset 0 -13px 9px rgb(0 25 48 / 43%),
    0 8px 0 #041f34,
    0 23px 45px rgb(0 4 13 / 62%);
}

body[data-theme="clearwave"] .toy::before {
  border-color: rgb(228 255 255 / 58%);
  box-shadow: inset 0 0 0 1px rgb(9 71 96 / 34%), 0 1px rgb(0 20 36 / 45%);
}

body[data-theme="clearwave"] .toy::after { border-color: rgb(219 255 255 / 25%); }

body[data-theme="clearwave"] .case-hardware i {
  border-color: rgb(207 251 255 / 70%);
  background: rgb(61 132 156 / 67%);
  box-shadow: inset 1px 1px 1px rgb(255 255 255 / 72%), 0 1px 2px rgb(0 15 29 / 75%);
}

body[data-theme="clearwave"] .case-hardware i::after { background: rgb(215 250 255 / 64%); }

body[data-theme="clearwave"] .control-deck {
  margin-top: 7px;
  padding: 0 7px 10px;
  border: 1px solid rgb(202 249 255 / 24%);
  border-top-color: rgb(222 255 255 / 48%);
  background: linear-gradient(180deg, rgb(2 37 61 / 35%), rgb(1 25 44 / 56%));
  box-shadow: inset 0 2px rgb(255 255 255 / 8%), inset 0 -2px rgb(0 9 18 / 35%);
}

body[data-theme="clearwave"] .tank-bezel {
  border-color: rgb(226 255 255 / 81%);
  background: linear-gradient(145deg, rgb(231 255 255 / 86%), rgb(83 181 202 / 70%) 43%, rgb(5 55 86 / 95%));
  box-shadow: inset 0 3px 4px white, inset 0 -3px 5px rgb(0 26 47 / 52%), 0 3px #072e49;
}

body[data-theme="clearwave"] .speaker {
  padding: 13px 8px;
  border: 1px solid rgb(179 236 245 / 25%);
  border-radius: 22px;
  background: rgb(2 31 51 / 30%);
  box-shadow: inset 0 1px rgb(255 255 255 / 12%);
}

body[data-theme="clearwave"] .jet-button {
  border-color: #7f3449;
  background: linear-gradient(155deg, #ff948f, #df5264 62%, #bb304c);
}

body[data-theme="clearwave"] .toy.is-versus .player-station--two .jet-button {
  border-color: #24378d;
  background: linear-gradient(155deg, #899cff, #556ad8 62%, #3549ac);
}

body[data-theme="clearwave"] .theme-switcher { border-color: rgb(185 239 247 / 44%); border-radius: 7px; }

@media (max-width: 570px) {
  .page-shell { padding: 6px; }

  .toy {
    width: min(380px, calc(100vw - 12px), calc((100svh - 58px) * .66));
    padding: 13px 12px 17px;
    border-radius: 34px 34px 46px 46px;
  }

  .toy::before { inset: 5px; border-radius: 28px 28px 39px 39px; }
  .toy::after { inset: 10px; border-radius: 24px 24px 35px 35px; }
  .case-hardware i:nth-child(1), .case-hardware i:nth-child(2) { top: 15px; }
  .case-hardware i:nth-child(1), .case-hardware i:nth-child(3) { left: 12px; }
  .case-hardware i:nth-child(2), .case-hardware i:nth-child(4) { right: 12px; }
  .case-hardware i:nth-child(3), .case-hardware i:nth-child(4) { bottom: 15px; }
  .scoreboard { margin-inline: 6px; }
  .brand-block h1 { font-size: clamp(19px, 6.3vw, 24px); }
  .digital-readout, .toy.is-versus .digital-readout { min-width: 55%; }
  .tank-bezel { padding: 6px; }
  .jet-button { min-height: 68px; font-size: clamp(17px, 5.5vw, 22px); }
  .controls { grid-template-columns: minmax(95px, 1fr) 38px minmax(95px, 1fr); gap: 8px; }
  .speaker { grid-template-columns: repeat(3, 6px); gap: 5px; }
  .speaker span { width: 6px; height: 6px; }
  body[data-theme="clearwave"] .speaker { padding: 10px 6px; }
  .toy-footer { gap: 6px; padding-inline: 3%; }
  .mode-menu-button, .reset-button, .sound-button, .tilt-button { padding-inline: 7px; }
}

@media (max-width: 570px) and (max-height: 700px) {
  .toy { width: min(326px, calc(100vw - 10px)); padding: 9px 9px 13px; }
  .scoreboard { margin-bottom: 6px; }
  .brand-block h1 { font-size: 18px; }
  .brand-block__eyebrow { font-size: 6px; }
  .digital-readout, .toy.is-versus .digital-readout { padding-block: 5px; }
  .tank-bezel { padding: 5px; }
  .control-labels { padding-top: 5px; }
  .jet-button { min-height: 54px; border-width: 3px; }
  .jet-button small { margin-top: 5px; }
  .power-button { padding-block: 4px 3px; }
  .toy-footer { padding-top: 6px; }
  body[data-theme="clearwave"] .control-deck { margin-top: 4px; padding-bottom: 6px; }
}

/* --------------------------------------------------------------------------
   FIVE-SKIN COLLECTION
   The picker stays collapsed during play and opens over the control deck, so
   adding skins never makes the handheld taller or pushes it below a phone.
   -------------------------------------------------------------------------- */

.theme-picker {
  position: relative;
  z-index: 24;
  flex: 0 0 auto;
}

.theme-picker__summary {
  display: grid;
  min-width: 74px;
  min-height: 29px;
  place-items: center;
  padding: 3px 8px 2px;
  border: 2px solid rgb(0 79 105 / 45%);
  border-radius: 8px;
  color: #664b00;
  cursor: pointer;
  line-height: 1;
  list-style: none;
  background: #ffe675;
  box-shadow: inset 0 2px rgb(255 255 255 / 55%), 0 3px rgb(111 69 0 / 28%);
  user-select: none;
}

.theme-picker__summary::-webkit-details-marker { display: none; }
.theme-picker__summary::marker { content: ""; }
.theme-picker__summary span { font-size: 6px; letter-spacing: .18em; opacity: .68; }
.theme-picker__summary strong { max-width: 76px; overflow: hidden; font-size: 8px; letter-spacing: .06em; text-overflow: ellipsis; white-space: nowrap; }
.theme-picker[open] .theme-picker__summary { transform: translateY(2px); box-shadow: inset 0 2px 4px rgb(80 43 0 / 18%), 0 1px rgb(111 69 0 / 25%); }
.theme-picker__summary:focus-visible { outline: 3px solid #fff6a8; outline-offset: 2px; }

.theme-switcher {
  position: absolute;
  bottom: calc(100% + 9px);
  left: 50%;
  display: grid;
  grid-template-columns: repeat(5, minmax(45px, 1fr));
  width: min(340px, calc(100vw - 40px));
  gap: 4px;
  padding: 7px;
  border: 3px solid #07455c;
  border-radius: 14px;
  background: #e9fbf5;
  box-shadow: 0 8px 24px rgb(0 29 48 / 38%), inset 0 2px white;
  transform: translateX(-50%);
}

.theme-switcher::after {
  position: absolute;
  top: 100%;
  left: 50%;
  width: 12px;
  height: 12px;
  border-right: 3px solid #07455c;
  border-bottom: 3px solid #07455c;
  background: #e9fbf5;
  content: "";
  transform: translate(-50%, -7px) rotate(45deg);
}

.theme-switcher__button {
  position: relative;
  z-index: 1;
  display: grid;
  min-width: 0;
  min-height: 48px;
  place-items: center;
  gap: 3px;
  padding: 5px 3px 4px;
  border: 2px solid transparent;
  border-radius: 9px;
  color: #1a4050;
  font-size: 7px;
  line-height: 1.05;
  background: #d9eee9;
}

.theme-switcher__button i {
  display: block;
  width: 22px;
  height: 14px;
  border: 2px solid rgb(6 43 57 / 24%);
  border-radius: 5px;
  background: #f8bd18;
  box-shadow: inset 0 2px rgb(255 255 255 / 48%);
}

.theme-switcher__button[data-theme-option="clearwave"] i { background: #357c9a; }
.theme-switcher__button[data-theme-option="arcade"] i { background: #f44078; }
.theme-switcher__button[data-theme-option="deepsea"] i { background: #172f47; box-shadow: inset 0 0 0 4px #f17a20; }
.theme-switcher__button[data-theme-option="spacelab"] i { background: #eee9d9; box-shadow: inset 0 0 0 4px #163b61; }

.theme-switcher__button.is-active {
  border-color: #f14f70;
  color: #0a3446;
  background: white;
  box-shadow: inset 0 2px white, 0 3px 6px rgb(0 39 61 / 18%);
}

/* Bubblegum Arcade: glossy pink plastic, aqua glass frame and party-speckled deck. */
body[data-theme="arcade"] {
  --cyan: #f44078;
  --cyan-deep: #a51f51;
  --cyan-light: #ff88ad;
  --ink: #073c55;
  --display: #101d25;
  background:
    radial-gradient(circle at 50% 12%, rgb(255 255 255 / 92%) 0 8%, transparent 34%),
    repeating-linear-gradient(118deg, transparent 0 42px, rgb(49 191 191 / 8%) 42px 45px),
    #fff7e9;
}

body[data-theme="arcade"] .toy {
  border-color: #ae1f52;
  border-radius: 48px 48px 58px 58px;
  background:
    radial-gradient(circle at 14% 12%, #ffe878 0 2px, transparent 3px),
    radial-gradient(circle at 86% 19%, #52d7cf 0 2px, transparent 3px),
    radial-gradient(circle at 9% 77%, #fff08b 0 2px, transparent 3px),
    radial-gradient(circle at 91% 68%, #5ddad4 0 2px, transparent 3px),
    linear-gradient(98deg, rgb(255 255 255 / 28%), transparent 13% 87%, rgb(122 5 48 / 18%)),
    linear-gradient(164deg, #ff6c9b, #f63f77 58%, #d62461);
  box-shadow:
    inset 0 6px 2px rgb(255 255 255 / 70%),
    inset 0 -13px 7px rgb(133 9 55 / 25%),
    0 9px 0 #9e194a,
    0 20px 35px rgb(105 34 54 / 32%);
}

body[data-theme="arcade"] .toy::before { border-color: rgb(255 220 234 / 74%); box-shadow: 0 1px rgb(117 8 47 / 34%); }
body[data-theme="arcade"] .toy::after { border-color: rgb(131 9 51 / 23%); }
body[data-theme="arcade"] .case-hardware i { border-color: #351c29; background: #eee1c8; }
body[data-theme="arcade"] .case-hardware i::after { background: #3a2630; }

body[data-theme="arcade"] .brand-block {
  padding: 8px 9px 7px;
  border: 2px solid #ea8a42;
  border-radius: 12px;
  background:
    radial-gradient(circle at 17% 25%, #f44f72 0 2px, transparent 3px),
    radial-gradient(circle at 82% 70%, #20aabd 0 2px, transparent 3px),
    #ffd861;
  box-shadow: inset 0 2px #fff6b0, 0 3px #bd2f62;
  transform: rotate(-1deg);
}

body[data-theme="arcade"] .brand-block__eyebrow { color: #805017; text-shadow: none; }
body[data-theme="arcade"] .brand-block h1 { color: #fffbed; font-family: "Arial Rounded MT Bold", "Trebuchet MS", sans-serif; text-shadow: 2px 2px #ed4e70, 4px 4px #1a93b1; }
body[data-theme="arcade"] .digital-readout { border-color: #6a173b; border-radius: 18px; background: #101d25; box-shadow: inset 0 4px 9px black, 0 3px #ff94b5; }
body[data-theme="arcade"] .tank-bezel { border-color: #087f8b; border-radius: 31px; background: linear-gradient(145deg, #83fff0, #21c7c8 45%, #087c91); box-shadow: inset 0 4px 3px white, inset 0 -4px rgb(0 72 87 / 36%), 0 4px #9b1947; }
body[data-theme="arcade"] .control-deck { margin-top: 7px; padding: 4px 8px 9px; border: 3px solid #7e2c88; border-radius: 19px 19px 32px 32px; background: radial-gradient(circle at 12% 24%, #ffd95f 0 2px, transparent 3px), radial-gradient(circle at 79% 58%, #58dfd2 0 2px, transparent 3px), #7a4ba1; box-shadow: inset 0 3px #a978c4, 0 4px #971d50; }
body[data-theme="arcade"] .control-labels span { padding: 3px 8px 2px; border-radius: 999px; color: white; box-shadow: inset 0 2px rgb(255 255 255 / 26%), 0 2px rgb(43 17 61 / 30%); }
body[data-theme="arcade"] .control-labels span:first-child { background: #e94a63; }
body[data-theme="arcade"] .control-labels span:last-child { background: #316bc1; }
body[data-theme="arcade"] .speaker span { background: #22182e; box-shadow: inset 1px 2px black, 1px 1px rgb(255 221 255 / 30%); }
body[data-theme="arcade"] .jet-button { border-color: #9e1e45; border-radius: 26px 26px 33px 33px; background: linear-gradient(150deg, #ff8f98, #f45066 62%, #ca294d); }
body[data-theme="arcade"] .toy.is-versus .player-station--two .jet-button { border-color: #164cae; background: linear-gradient(150deg, #78adff, #3476dc 62%, #174eae); }
body[data-theme="arcade"] .power-button { border-color: #a05b00; border-radius: 12px; background: linear-gradient(#ffe779, #ffc633); }
body[data-theme="arcade"] .toy-footer { color: #fff5c9; }
body[data-theme="arcade"] .mode-menu-button,
body[data-theme="arcade"] .sound-button { border-color: #085f6d; color: white; background: #14b8b7; box-shadow: 0 3px #08606c; }
body[data-theme="arcade"] .reset-button { border-color: #085f6d; color: white; background: #14b8b7; box-shadow: 0 3px #08606c; }
body[data-theme="arcade"] .tilt-button { border-color: #ebc048; color: #4e2d69; background: #ffe274; }
body[data-theme="arcade"] .theme-picker__summary { border-color: #781d65; color: #4e2d69; background: #ffdd61; }

/* Deep Sea: rugged navy instrument housing with an orange pressure-tank rim. */
body[data-theme="deepsea"] {
  --cyan: #172f47;
  --cyan-deep: #071724;
  --cyan-light: #34516d;
  --ink: #f4d399;
  --display: #07131b;
  background:
    repeating-linear-gradient(12deg, rgb(255 255 255 / 2%) 0 1px, transparent 1px 8px),
    linear-gradient(155deg, #17334f, #071827 64%, #030c14);
}

body[data-theme="deepsea"] .toy {
  border-color: #07131d;
  border-radius: 29px 29px 46px 46px;
  background:
    repeating-linear-gradient(93deg, rgb(255 255 255 / 2%) 0 1px, transparent 1px 13px),
    linear-gradient(98deg, #26445e, #172f47 15% 84%, #0b1d2d),
    #172f47;
  box-shadow:
    inset 0 5px 2px rgb(124 159 183 / 45%),
    inset 0 0 0 8px rgb(5 19 30 / 18%),
    inset 0 -14px 8px rgb(0 7 13 / 48%),
    0 9px 0 #030a10,
    0 23px 48px rgb(0 4 9 / 68%);
}

body[data-theme="deepsea"] .toy::before { inset: 8px; border-color: #486277; border-radius: 22px 22px 37px 37px; box-shadow: inset 0 0 0 2px #091b29; }
body[data-theme="deepsea"] .toy::after { inset: 14px; border-color: #0a1e2e; border-radius: 18px 18px 32px 32px; }
body[data-theme="deepsea"] .case-hardware i { width: 10px; height: 10px; border-color: #02070b; background: #bd9d73; box-shadow: inset 2px 2px #f2d4a4, 0 2px 2px black; }
body[data-theme="deepsea"] .case-hardware i::after { top: 4px; left: 1px; width: 7px; background: #31271e; }

body[data-theme="deepsea"] .scoreboard { align-items: stretch; }
body[data-theme="deepsea"] .brand-block { padding: 8px 9px; border: 2px solid #07141f; border-radius: 7px; background: #1b3850; box-shadow: inset 0 2px #36536b, 0 3px #08131d; }
body[data-theme="deepsea"] .brand-block__eyebrow { color: #efbc72; text-shadow: 0 1px #06101a; }
body[data-theme="deepsea"] .brand-block h1 { color: #f5dfb8; font-size: clamp(17px, 5.2vw, 23px); letter-spacing: -.07em; text-shadow: 2px 3px #09131a; white-space: nowrap; }
body[data-theme="deepsea"] .digital-readout { border-color: #09151d; border-radius: 8px; background: #07131b; box-shadow: inset 0 4px 10px black, 0 2px #36536b; }
body[data-theme="deepsea"] .tank-bezel { position: relative; padding: 15px; border: 4px solid #9d480c; border-radius: 24px; background: linear-gradient(145deg, #ff9a3e, #f57718 52%, #bb4d0e); box-shadow: inset 0 4px 2px #ffc079, inset 0 -4px 4px #813106, 0 4px #06121b; }
body[data-theme="deepsea"] .tank-bezel::before,
body[data-theme="deepsea"] .tank-bezel::after { position: absolute; z-index: 3; top: 26%; color: #272112; font: 900 6px/2.75 "Courier New", monospace; white-space: pre; pointer-events: none; text-shadow: 0 1px rgb(255 193 111 / 52%); }
body[data-theme="deepsea"] .tank-bezel::before { left: 3px; content: "10—\A 20—\A 30—\A 40—"; }
body[data-theme="deepsea"] .tank-bezel::after { right: 3px; content: "—\A —\A —\A —"; }
body[data-theme="deepsea"] .tank { border-color: #a9bbc0; border-radius: 15px; box-shadow: inset 0 0 30px rgb(0 47 79 / 48%), inset 0 0 0 3px #244456, 0 0 0 3px #342518; }
body[data-theme="deepsea"] .control-deck { margin-top: 8px; padding: 3px 9px 10px; border: 2px solid #07141e; border-radius: 8px 8px 31px 31px; background: #152d43; box-shadow: inset 0 2px #365169, 0 3px #07131d; }
body[data-theme="deepsea"] .control-labels span:first-child { color: #ff846d; }
body[data-theme="deepsea"] .control-labels span:last-child { color: #8daaff; }
body[data-theme="deepsea"] .jet-button { margin: 7px; min-height: 72px; border-color: #301815; border-radius: 11px 11px 26px 26px; background: linear-gradient(150deg, #ff876f, #d95545 65%, #97372f); box-shadow: inset 0 5px #ffab90, inset 0 -6px #8b2f2c, 0 0 0 7px #172027, 0 8px 0 7px #070b0e, 0 14px 12px rgb(0 0 0 / 42%); }
body[data-theme="deepsea"] .toy.is-versus .player-station--two .jet-button { border-color: #14235a; background: linear-gradient(150deg, #799cff, #4c6fd1 65%, #2b499c); box-shadow: inset 0 5px #aabfff, inset 0 -6px #263d8f, 0 0 0 7px #172027, 0 8px 0 7px #070b0e, 0 14px 12px rgb(0 0 0 / 42%); }
body[data-theme="deepsea"] .power-button { border-color: #080f14; border-radius: 7px; color: #f5d7a7; background: #b64a35; box-shadow: inset 0 2px #e77a63, 0 4px #050a0e; }
body[data-theme="deepsea"] .player-station--two .power-button { background: #355fb2; box-shadow: inset 0 2px #6789db, 0 4px #050a0e; }
body[data-theme="deepsea"] .speaker { position: relative; display: grid; width: 46px; aspect-ratio: 1; place-self: center; place-items: center; padding: 0; border: 3px solid #b79362; border-radius: 50%; color: #f5d282; background: #203c52; box-shadow: inset 0 0 0 4px #0b1b28, 0 2px #050b10; transform: none; }
body[data-theme="deepsea"] .speaker span { display: none; }
body[data-theme="deepsea"] .speaker::before { content: "PRESSURE\AOK"; font: 900 5px/1.15 "Courier New", monospace; text-align: center; white-space: pre; }
body[data-theme="deepsea"] .speaker::after { position: absolute; top: 11px; left: 22px; width: 12px; height: 2px; background: #ed7d37; content: ""; transform: rotate(-28deg); transform-origin: left center; }
body[data-theme="deepsea"] .toy-footer { color: #e8c99a; }
body[data-theme="deepsea"] .mode-menu-button, body[data-theme="deepsea"] .reset-button, body[data-theme="deepsea"] .sound-button, body[data-theme="deepsea"] .tilt-button { border-color: #050b10; color: #f0d3a2; background: #173a45; box-shadow: inset 0 2px #31545c, 0 3px #03080c; }
body[data-theme="deepsea"] .theme-picker__summary { border-color: #c66a25; color: #efc98f; background: #182d3c; box-shadow: inset 0 2px #385061, 0 3px #040a0e; }

/* Space Lab: warm ivory electronics, navy instrument deck and circular pumps. */
body[data-theme="spacelab"] {
  --cyan: #eee9d9;
  --cyan-deep: #aaa696;
  --cyan-light: #fffdf3;
  --ink: #17385d;
  --display: #0b1118;
  background:
    radial-gradient(circle at 50% 15%, white 0 7%, transparent 38%),
    repeating-linear-gradient(0deg, rgb(26 58 89 / 3%) 0 1px, transparent 1px 9px),
    #e9e8e4;
}

body[data-theme="spacelab"] .toy {
  border-color: #aaa697;
  border-radius: 35px 35px 45px 45px;
  background:
    linear-gradient(95deg, rgb(255 255 255 / 67%), transparent 15% 85%, rgb(103 97 79 / 13%)),
    linear-gradient(165deg, #fffdf3, #eee9d9 66%, #d1ccbc);
  box-shadow:
    inset 0 6px 3px white,
    inset 0 0 0 7px rgb(123 117 97 / 8%),
    inset 0 -13px 8px rgb(96 91 76 / 17%),
    0 8px 0 #959080,
    0 23px 40px rgb(30 38 43 / 38%);
}

body[data-theme="spacelab"] .toy::before { border-color: white; border-radius: 27px 27px 37px 37px; box-shadow: 0 1px #96907d; }
body[data-theme="spacelab"] .toy::after { border-color: rgb(103 96 75 / 26%); border-radius: 22px 22px 33px 33px; }
body[data-theme="spacelab"] .case-hardware i { border-color: #403e38; background: #dfd9c7; box-shadow: inset 1px 1px white, 0 1px 2px #6f6a5c; }
body[data-theme="spacelab"] .case-hardware i::after { background: #4b4943; }

body[data-theme="spacelab"] .brand-block { position: relative; padding: 7px 7px 7px 31px; border-left: 0; background: linear-gradient(135deg, #4288b5 0 8px, transparent 8px 12px, #e85b4f 12px 20px, transparent 20px); }
body[data-theme="spacelab"] .brand-block__eyebrow { color: #243652; text-shadow: none; }
body[data-theme="spacelab"] .brand-block h1 { color: #1f4770; font-size: clamp(17px, 5vw, 22px); letter-spacing: -.05em; text-shadow: 1px 2px #d4cfc0; transform: none; white-space: nowrap; }
body[data-theme="spacelab"] .digital-readout { border-color: #57564f; border-radius: 10px; background: #0b1118; box-shadow: inset 0 4px 10px black, 0 2px white; }
body[data-theme="spacelab"] .tank-bezel { padding: 9px; border: 3px solid #c3bdac; border-radius: 27px; background: linear-gradient(145deg, #fffdf2, #d8d3c5 58%, #9d998c); box-shadow: inset 0 4px 3px white, inset 0 -3px #827e70, 0 0 0 3px #235a7f; }
body[data-theme="spacelab"] .tank { border-color: #b9f5f6; border-radius: 16px; box-shadow: inset 0 0 28px rgb(0 72 107 / 32%), inset 0 0 0 3px #2d7395, 0 2px #143e5a; }
body[data-theme="spacelab"] .control-deck { margin-top: 9px; padding: 5px 9px 10px; border: 3px solid #07121e; border-radius: 22px; background: linear-gradient(160deg, #173453, #0a1b2e); box-shadow: inset 0 3px #34506a, 0 4px #aaa595; }
body[data-theme="spacelab"] .control-labels span:first-child { color: #ff7c6e; }
body[data-theme="spacelab"] .control-labels span:last-child { color: #75a7ff; }
body[data-theme="spacelab"] .controls { grid-template-columns: minmax(110px, 1fr) 48px minmax(110px, 1fr); }
body[data-theme="spacelab"] .jet-button { justify-self: center; width: 112px; min-height: 112px; border-color: #5b171b; border-radius: 50%; background: radial-gradient(circle at 36% 24%, #ff9b8e, #d8463f 55%, #9c2b2d); box-shadow: inset 0 8px 3px rgb(255 255 255 / 28%), inset 0 -8px 5px rgb(82 9 15 / 32%), 0 7px #52171b, 0 12px 14px rgb(0 0 0 / 50%); }
body[data-theme="spacelab"] .toy.is-versus .player-station--two .jet-button { border-color: #172f70; background: radial-gradient(circle at 36% 24%, #8eb0ff, #316bc5 55%, #183f8e); box-shadow: inset 0 8px 3px rgb(255 255 255 / 28%), inset 0 -8px 5px rgb(6 22 76 / 33%), 0 7px #102758, 0 12px 14px rgb(0 0 0 / 50%); }
body[data-theme="spacelab"] .power-button { border-color: #54191d; border-radius: 18px; color: #fff0dc; background: #c9443c; box-shadow: inset 0 3px #f47b6f, 0 4px #54191d; }
body[data-theme="spacelab"] .player-station--two .power-button { border-color: #142a61; background: #285eaf; box-shadow: inset 0 3px #618bd3, 0 4px #142a61; }
body[data-theme="spacelab"] .speaker { padding: 12px 8px; border: 1px solid #566878; border-radius: 50%; background: #050d15; }
body[data-theme="spacelab"] .speaker span { border-radius: 2px; background: #020609; box-shadow: 0 1px #52687b; }
body[data-theme="spacelab"] .toy-footer { color: #e4ebf2; }
body[data-theme="spacelab"] .mode-menu-button, body[data-theme="spacelab"] .reset-button, body[data-theme="spacelab"] .sound-button, body[data-theme="spacelab"] .tilt-button { border-color: #0b2745; color: #eef4ed; background: #173e67; box-shadow: inset 0 2px #416487, 0 3px #071a2d; }
body[data-theme="spacelab"] .reset-button { color: #183654; background: #eee9d9; box-shadow: inset 0 2px white, 0 3px #8e897b; }
body[data-theme="spacelab"] .theme-picker__summary { border-color: #797466; color: #17385d; background: #eee9d9; box-shadow: inset 0 2px white, 0 3px #8f8a7c; }

body[data-theme="clearwave"] .theme-picker__summary { border-color: #9bdce8; color: #ddfbff; background: #12354c; box-shadow: inset 0 2px #39637a, 0 3px #041826; }

@media (max-width: 570px) {
  .theme-picker__summary { min-width: 62px; min-height: 26px; padding-inline: 6px; }
  .theme-picker__summary strong { max-width: 64px; font-size: 7px; }
  .theme-switcher { width: min(326px, calc(100vw - 34px)); gap: 3px; padding: 6px; }
  .theme-switcher__button { min-height: 44px; font-size: 6px; }

  body[data-theme="arcade"] .brand-block { padding: 6px 7px 5px; }
  body[data-theme="arcade"] .control-deck,
  body[data-theme="deepsea"] .control-deck,
  body[data-theme="spacelab"] .control-deck { margin-top: 5px; padding: 2px 5px 7px; }
  body[data-theme="deepsea"] .tank-bezel { padding: 11px; border-width: 3px; }
  body[data-theme="deepsea"] .jet-button { margin: 5px; min-height: 62px; box-shadow: inset 0 4px #ffab90, inset 0 -5px #8b2f2c, 0 0 0 5px #172027, 0 6px 0 5px #070b0e, 0 10px 8px rgb(0 0 0 / 38%); }
  body[data-theme="deepsea"] .toy.is-versus .player-station--two .jet-button { box-shadow: inset 0 4px #aabfff, inset 0 -5px #263d8f, 0 0 0 5px #172027, 0 6px 0 5px #070b0e, 0 10px 8px rgb(0 0 0 / 38%); }
  body[data-theme="spacelab"] .brand-block { padding: 5px 4px 5px 24px; background-size: 24px 100%; background-repeat: no-repeat; }
  body[data-theme="spacelab"] .controls { grid-template-columns: minmax(90px, 1fr) 36px minmax(90px, 1fr); }
  body[data-theme="spacelab"] .jet-button { width: 88px; min-height: 88px; font-size: 19px; }
  body[data-theme="spacelab"] .speaker { padding: 8px 5px; }
}

@media (max-width: 570px) and (max-height: 700px) {
  .theme-picker__summary { min-height: 24px; }
  .theme-switcher { bottom: calc(100% + 7px); }
  body[data-theme="arcade"] .control-deck,
  body[data-theme="deepsea"] .control-deck,
  body[data-theme="spacelab"] .control-deck { margin-top: 3px; padding-bottom: 5px; }
  body[data-theme="deepsea"] .jet-button { margin: 3px; min-height: 49px; }
  body[data-theme="spacelab"] .jet-button { width: 65px; min-height: 65px; font-size: 16px; }
}

/* Tall phones get the long water window and substantial pump deck shown in
   the concept art, while the short-phone rules above keep every control in view. */
@media (max-width: 570px) and (min-height: 701px) {
  .tank { aspect-ratio: 620 / 650; }
  .control-labels { padding-top: 9px; }
  .jet-button { min-height: 78px; }
  .toy-footer { padding-top: 12px; }

  body[data-theme="arcade"] .jet-button,
  body[data-theme="deepsea"] .jet-button { min-height: 78px; }

  body[data-theme="spacelab"] .jet-button {
    width: 94px;
    min-height: 94px;
  }
}

/* Keep the mode card sized from the tank—not the browser window. The cabinet
   is height-constrained on desktop, so viewport-based type and padding could
   make this one panel taller than the water window and clip its buttons. */
.game-overlay {
  padding: 10px;
}

.game-overlay__panel {
  display: flex;
  width: min(380px, 96%);
  max-height: calc(100% - 12px);
  flex-direction: column;
  justify-content: center;
  padding: clamp(14px, 3vw, 24px);
}

.game-overlay.is-mode-menu h2 {
  font-size: clamp(28px, 7vw, 42px);
  white-space: nowrap;
}

.game-overlay.is-mode-menu p {
  margin-bottom: 14px;
  font-size: clamp(12px, 2.2vw, 15px);
  line-height: 1.32;
}

.game-overlay.is-mode-menu .mode-buttons {
  flex: 0 0 auto;
}

@media (max-width: 570px) {
  .game-overlay { padding: 7px; }
  .game-overlay__panel { width: min(360px, 98%); max-height: calc(100% - 8px); padding: 14px 12px; }
  .game-overlay.is-mode-menu h2 { font-size: clamp(27px, 8vw, 34px); }
  .game-overlay.is-mode-menu p { margin-bottom: 10px; font-size: 12px; }
}
