
:root {
  --cyan: #70f7ff;
  --violet: #896bff;
  --pink: #ff63bd;
  --amber: #ffd15c;
  --danger: #ff476f;
  --ink: #f0fbff;
  --muted: #929fbd;
  --line: rgba(156, 184, 255, 0.16);
  font-family: Syne, Arial, sans-serif;
  color: var(--ink);
  background: #050612;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }

button {
  font: 700 10px 'Space Mono', monospace;
  letter-spacing: .11em;
  color: var(--ink);
  background: rgba(14, 18, 41, 0.85);
  border: 1px solid var(--line);
  cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, background .15s ease, box-shadow .15s ease;
  user-select: none;
}
button:hover {
  transform: translateY(-1px);
  border-color: var(--cyan);
  background: #252c52;
}
button:active {
  transform: translateY(1px);
}
button:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}
.hidden { display: none !important; }

/* Main Shell */
.shell {
  height: 100svh;
  display: grid;
  grid-template-rows: 62px minmax(0, 1fr) 34px;
  background: radial-gradient(circle at 50% 40%, #181037, #050612 65%);
  isolation: isolate;
  position: relative;
}

/* Optional CRT Scanlines Filter */
.shell.crt-scanlines:after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 30;
  pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.015) 0 1px, transparent 1px 3px);
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.5);
}

/* Header */
header {
  z-index: 10;
  padding: 0 clamp(14px, 3vw, 42px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: rgba(5, 6, 18, 0.88);
  backdrop-filter: blur(14px);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand > span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, var(--cyan), var(--violet));
  clip-path: polygon(20% 0, 100% 0, 80% 100%, 0 100%);
  font-weight: 900;
  color: #050612;
  font-size: 15px;
}
.brand b {
  display: block;
  letter-spacing: .24em;
  font-size: 15px;
}
.brand small {
  display: block;
  color: var(--cyan);
  font: 700 7px 'Space Mono';
  letter-spacing: .34em;
}
.sector {
  font: 700 9px 'Space Mono';
  letter-spacing: .17em;
  color: #9ca9c9;
  display: flex;
  align-items: center;
}
.sector i, footer i {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #6dffac;
  box-shadow: 0 0 10px #6dffac;
  margin-right: 8px;
}
.sector em {
  font-style: normal;
  color: #4d5674;
  margin: 0 7px;
}
.speed-badge {
  display: inline-block;
  margin-left: 10px;
  padding: 2px 7px;
  border-radius: 3px;
  background: rgba(112, 247, 255, 0.15);
  border: 1px solid rgba(112, 247, 255, 0.35);
  color: var(--cyan);
  font-size: 8px;
  letter-spacing: .1em;
}
.actions {
  display: flex;
  gap: 7px;
}
.actions button {
  padding: 7px 11px;
  font-size: 8px;
}

/* Stage Area */
.stage {
  position: relative;
  min-height: 0;
  overflow: hidden;
  touch-action: none;
  background: #070817;
}
.stage canvas {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.stage:after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 120px rgba(0, 0, 0, 0.65);
}

/* Boss Health HUD (Top Center) */
.boss-hud {
  position: absolute;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  width: min(520px, 86%);
  z-index: 5;
  pointer-events: none;
  background: rgba(7, 8, 26, 0.82);
  border: 1px solid rgba(255, 79, 196, 0.4);
  padding: 8px 14px;
  border-radius: 4px;
  backdrop-filter: blur(8px);
  box-shadow: 0 0 24px rgba(255, 79, 196, 0.25);
  animation: bossFadeIn .4s ease-out;
}
@keyframes bossFadeIn {
  from { opacity: 0; transform: translate(-50%, -10px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}
.boss-hud-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font: 700 8px 'Space Mono';
  letter-spacing: .15em;
  margin-bottom: 5px;
}
.boss-name {
  color: #ff76ca;
  display: flex;
  align-items: center;
  gap: 6px;
}
.boss-pulse {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #ff3377;
  box-shadow: 0 0 10px #ff3377;
  animation: pulse 1s infinite alternate;
}
@keyframes pulse {
  0% { transform: scale(0.85); opacity: 0.6; }
  100% { transform: scale(1.3); opacity: 1; }
}
.boss-hp {
  color: #ffe36e;
}
.boss-meter {
  height: 6px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 2px;
  overflow: hidden;
}
.boss-meter-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #ff4fc4, #ffbd5c);
  box-shadow: 0 0 14px #ff4fc4;
  transition: width .15s ease-out;
}

/* HUD */
.hud {
  position: absolute;
  z-index: 4;
  inset: 0 0 auto;
  display: grid;
  grid-template-columns: 1fr minmax(240px, 30%) 1fr;
  align-items: start;
  padding: 17px clamp(16px, 2.6vw, 36px);
  pointer-events: none;
  text-shadow: 0 2px 10px #000;
}
.score {
  display: flex;
  flex-direction: column;
  font-family: 'Space Mono';
}
.score small, .status small {
  font-size: 7px;
  letter-spacing: .23em;
  color: #8290b0;
}
.score > b {
  font-size: 19px;
  letter-spacing: .08em;
}
.score span {
  font-size: 7px;
  color: #6f7c9d;
}
.mission {
  padding-top: 2px;
}
.mission > div:first-child {
  display: flex;
  justify-content: space-between;
  font: 700 8px 'Space Mono';
  letter-spacing: .15em;
}
.mission small {
  font-size: 7px;
  color: #8e9aba;
}
.bar {
  height: 3px;
  background: #ffffff1f;
  margin-top: 8px;
}
.bar i {
  display: block;
  width: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--violet), var(--cyan));
  box-shadow: 0 0 12px var(--cyan);
  transition: width .12s;
}
.status {
  display: flex;
  justify-content: flex-end;
  gap: clamp(12px, 1.8vw, 26px);
  text-align: right;
}
.status > div {
  display: flex;
  flex-direction: column;
}
.status b {
  font: 700 12px 'Space Mono';
}
.status em {
  font-size: 7px;
  font-style: normal;
  color: #fff;
}
.bombs-val {
  color: var(--cyan);
  letter-spacing: .14em;
  text-shadow: 0 0 8px var(--cyan);
}
.combo {
  position: absolute;
  right: 4%;
  top: 90px;
  font: 700 italic 25px 'Space Mono';
  filter: drop-shadow(0 0 10px var(--pink));
  transform: skew(-6deg);
}
.combo small {
  display: block;
  color: var(--pink);
  font-size: 7px;
  letter-spacing: .28em;
}

/* Overlays / Modals */
.overlay {
  position: absolute;
  z-index: 7;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding-left: clamp(28px, 8vw, 120px);
  background: linear-gradient(90deg, #050612fa 0%, #050612b8 48%, #05061210 78%),
              radial-gradient(circle at 75% 48%, #7a44dd30, transparent 35%);
}
.overlay:after {
  content: "";
  position: absolute;
  width: min(42vw, 520px);
  aspect-ratio: 1;
  right: 7%;
  top: 50%;
  transform: translateY(-50%) rotate(45deg);
  border: 1px solid #7865ff33;
  box-shadow: 0 0 0 34px #6453dc09, 0 0 0 70px #6453dc08;
  pointer-events: none;
}
.overlay > * { z-index: 2; }

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--cyan);
  font: 700 8.5px 'Space Mono', monospace;
  letter-spacing: .25em;
  text-transform: uppercase;
}
.eyebrow i, .pulse-cyan {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
  animation: pulseCyan 1.5s infinite alternate;
}
@keyframes pulseCyan {
  0% { transform: scale(0.85); opacity: 0.7; }
  100% { transform: scale(1.3); opacity: 1; }
}
.tag-ver {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 7px;
  border-radius: 3px;
  background: rgba(112, 247, 255, 0.12);
  border: 1px solid rgba(112, 247, 255, 0.3);
  color: var(--cyan);
  font-size: 7.5px;
  letter-spacing: .12em;
}

.menu h1 {
  font-size: clamp(48px, 8vw, 110px);
  line-height: .75;
  letter-spacing: -.075em;
  margin: 20px 0 22px;
  font-weight: 800;
  font-style: italic;
  text-shadow: 0 0 35px #7574ff4d;
}
.menu h1 em {
  display: block;
  color: transparent;
  -webkit-text-stroke: 1px #7df4ff;
  font-size: .20em;
  line-height: 1;
  letter-spacing: .7em;
  margin: 16px 0 0 6px;
  text-shadow: 0 0 14px #6ff7ff66;
}

/* Mission Brief Card */
.brief-card {
  max-width: 680px;
  margin: 0 0 22px;
  padding: 13px 18px;
  background: rgba(12, 16, 38, 0.78);
  border: 1px solid rgba(112, 247, 255, 0.16);
  border-left: 3px solid var(--cyan);
  border-radius: 4px;
  backdrop-filter: blur(10px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}
.brief-card p {
  margin: 0 0 10px;
  color: #a6b5d4;
  line-height: 1.6;
  font-size: clamp(12px, 1.15vw, 14.5px);
}
.brief-card b {
  color: #fff;
}
.brief-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 3px;
  background: rgba(18, 24, 52, 0.85);
  border: 1px solid rgba(156, 184, 255, 0.18);
  font: 700 7.5px 'Space Mono', monospace;
  letter-spacing: .12em;
  color: #cbd5e1;
}
.badge i {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
}
.dot-green { background: #6dffac; box-shadow: 0 0 6px #6dffac; }
.dot-cyan  { background: #70f7ff; box-shadow: 0 0 6px #70f7ff; }
.dot-pink  { background: #ff63bd; box-shadow: 0 0 6px #ff63bd; }
.badge.highlight {
  border-color: rgba(255, 99, 189, 0.45);
  color: #ff99d3;
  background: rgba(255, 99, 189, 0.12);
}

/* Menu Actions - Modern Cyber Cards */
.menu-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 215px));
  gap: 14px;
  margin-bottom: 18px;
}
.menu-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  transition: transform .2s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow .2s cubic-bezier(0.16, 1, 0.3, 1),
              border-color .2s cubic-bezier(0.16, 1, 0.3, 1),
              background .2s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}
.card-icon {
  font-size: 15px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.08);
}
.card-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex-grow: 1;
}
.card-title {
  font: 700 12px 'Space Mono', monospace;
  letter-spacing: .14em;
  color: #fff;
  white-space: nowrap;
}
.card-sub {
  font: 700 7px 'Space Mono', monospace;
  letter-spacing: .09em;
  color: rgba(255, 255, 255, 0.65);
  white-space: nowrap;
}
.card-arrow {
  font-size: 16px;
  color: #fff;
  font-weight: 900;
  transition: transform .2s ease;
  flex-shrink: 0;
}
.card-pill {
  font: 700 7px 'Space Mono', monospace;
  letter-spacing: .1em;
  padding: 3px 6px;
  border-radius: 3px;
  background: rgba(112, 247, 255, 0.15);
  border: 1px solid rgba(112, 247, 255, 0.4);
  color: var(--cyan);
  flex-shrink: 0;
}
.card-pill.config {
  background: rgba(192, 132, 252, 0.15);
  border-color: rgba(192, 132, 252, 0.4);
  color: #d8b4fe;
}

/* Primary Hero Card (Solo Run) */
.primary-card {
  background: linear-gradient(135deg, #7038e8 0%, #d82b8f 100%);
  border: 1px solid #ff7ec8;
  box-shadow: 0 8px 28px rgba(216, 43, 143, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.primary-card .card-icon {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.3);
}
.primary-card .card-sub {
  color: #ffd8ef;
}
.primary-card:hover {
  transform: translateY(-2px);
  border-color: #fff;
  box-shadow: 0 12px 35px rgba(216, 43, 143, 0.65), 0 0 20px rgba(255, 126, 200, 0.5);
}
.primary-card:hover .card-arrow {
  transform: translateX(4px);
}

/* 2P Co-Op Card */
.coop-card {
  background: linear-gradient(135deg, rgba(14, 25, 54, 0.92), rgba(8, 14, 34, 0.95));
  border: 1px solid rgba(112, 247, 255, 0.35);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}
.coop-card .card-icon {
  background: rgba(112, 247, 255, 0.12);
  color: var(--cyan);
  box-shadow: 0 0 10px rgba(112, 247, 255, 0.25);
}
.coop-card:hover {
  transform: translateY(-2px);
  border-color: var(--cyan);
  box-shadow: 0 8px 28px rgba(112, 247, 255, 0.35);
  background: linear-gradient(135deg, rgba(20, 36, 74, 0.95), rgba(10, 20, 48, 0.95));
}

/* Settings Card */
.settings-card {
  background: linear-gradient(135deg, rgba(28, 18, 52, 0.92), rgba(14, 10, 30, 0.95));
  border: 1px solid rgba(192, 132, 252, 0.35);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.5);
}
.settings-card .card-icon {
  background: rgba(192, 132, 252, 0.12);
  color: #c084fc;
  box-shadow: 0 0 10px rgba(192, 132, 252, 0.25);
}
.settings-card:hover {
  transform: translateY(-2px);
  border-color: #c084fc;
  box-shadow: 0 8px 28px rgba(192, 132, 252, 0.35);
  background: linear-gradient(135deg, rgba(40, 25, 74, 0.95), rgba(20, 14, 44, 0.95));
}

/* Controls Dock */
.controls-dock {
  width: min(680px, 95%);
  margin-top: 4px;
  margin-bottom: 20px;
  background: rgba(8, 12, 28, 0.85);
  border: 1px solid rgba(112, 247, 255, 0.2);
  border-radius: 6px;
  padding: 12px 18px;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
}
.dock-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font: 700 8px 'Space Mono', monospace;
  letter-spacing: .2em;
  color: var(--cyan);
  margin-bottom: 10px;
  padding-bottom: 7px;
  border-bottom: 1px solid rgba(156, 184, 255, 0.12);
}
.dock-header i {
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #6dffac;
  box-shadow: 0 0 8px #6dffac;
  margin-right: 6px;
}
.dock-header small {
  color: var(--muted);
  letter-spacing: .15em;
}
.dock-row {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1.25fr 0.9fr;
  gap: 12px;
  align-items: center;
}
.ctl-unit {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.key-combo {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
}
.sep {
  font: 700 9px 'Space Mono', monospace;
  color: #5d6c8e;
  margin: 0 1px;
}
kbd {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 5px;
  border: 1px solid rgba(162, 179, 230, 0.35);
  background: linear-gradient(180deg, #1d254c, #0e142e);
  border-radius: 3px;
  font: 700 7.5px 'Space Mono', monospace;
  color: #fff;
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.15);
  user-select: none;
}
kbd.key-wide {
  min-width: 44px;
  padding: 0 7px;
}
kbd.key-emp {
  border-color: rgba(112, 247, 255, 0.65);
  background: linear-gradient(180deg, #0d3858, #071f34);
  color: var(--cyan);
  box-shadow: 0 2px 0 rgba(0, 0, 0, 0.7), 0 0 10px rgba(112, 247, 255, 0.3);
}
.ctl-label {
  font: 700 7.5px 'Space Mono', monospace;
  letter-spacing: .12em;
  color: #8897ba;
}
.bomb-unit .ctl-label {
  color: var(--cyan);
  font-weight: 700;
}

.note {
  position: absolute;
  left: clamp(28px, 8vw, 120px);
  bottom: 22px;
  color: #526080;
  font: 500 7px 'Space Mono';
  letter-spacing: .18em;
}

/* Modal Dialogs */
.modal {
  align-items: center;
  text-align: center;
  padding: 24px;
  background: #050612eb;
  backdrop-filter: blur(10px);
}
.modal:after { display: none; }
.modal h2 {
  font-size: clamp(40px, 6vw, 76px);
  font-style: italic;
  letter-spacing: -.06em;
  margin: 14px 0 6px;
  text-shadow: 0 0 30px rgba(112, 247, 255, 0.4);
}
.modal-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.modal-btn {
  min-width: 170px;
  padding: 13px 18px;
  border-radius: 4px;
  font: 700 10px 'Space Mono', monospace;
  letter-spacing: .14em;
}
.modal-btn.primary-btn {
  background: linear-gradient(105deg, #7657ec, #b141ca);
  border-color: #bc7cff;
  box-shadow: 0 8px 30px rgba(117, 79, 220, 0.35);
}
.modal-btn.primary-btn:hover {
  border-color: #fff;
  box-shadow: 0 10px 35px rgba(188, 124, 255, 0.5);
}
.modal-btn.secondary-btn {
  background: rgba(14, 25, 54, 0.9);
  border-color: rgba(112, 247, 255, 0.35);
}
.modal-btn.secondary-btn:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 20px rgba(112, 247, 255, 0.3);
}
.modal-btn.outline-btn {
  background: rgba(14, 18, 41, 0.8);
  border-color: var(--line);
}
.modal-btn.outline-btn:hover {
  border-color: #929fbd;
}

/* Settings Modal Specifics */
.settings-modal {
  z-index: 15;
}
.settings-modal button {
  min-width: 0 !important;
}
.settings-box {
  width: min(620px, 94%);
  background: rgba(10, 14, 34, 0.9);
  border: 1px solid rgba(112, 247, 255, 0.25);
  padding: 22px 24px;
  border-radius: 8px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 16px;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.7), 0 0 25px rgba(112, 247, 255, 0.08);
  margin-bottom: 18px;
  backdrop-filter: blur(14px);
}
.set-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.set-label b {
  display: block;
  font: 700 9.5px 'Space Mono', monospace;
  letter-spacing: .14em;
  color: var(--cyan);
}
.set-label small {
  display: block;
  font: 500 7.5px 'Space Mono', monospace;
  color: var(--muted);
  line-height: 1.35;
}

/* Speed Selector Grid */
.speed-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  width: 100%;
}
.speed-opt {
  min-width: 0 !important;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 6px;
  font: 700 15px 'Space Mono', monospace;
  letter-spacing: .04em;
  border-radius: 4px;
  background: rgba(12, 17, 40, 0.9);
  border: 1px solid rgba(156, 184, 255, 0.22);
  color: #e2e8f0;
  transition: transform .18s ease, border-color .18s ease, background .18s ease, box-shadow .18s ease;
}
.speed-opt span {
  font: 700 7.5px 'Space Mono', monospace;
  color: var(--muted);
  margin-top: 4px;
  letter-spacing: .1em;
}
.speed-opt.active {
  background: linear-gradient(135deg, rgba(112, 247, 255, 0.22), rgba(137, 107, 255, 0.35));
  border-color: var(--cyan);
  box-shadow: 0 0 16px rgba(112, 247, 255, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  color: #fff;
}
.speed-opt.active span {
  color: var(--cyan);
  font-weight: 700;
}
.speed-opt:hover:not(.active) {
  transform: translateY(-1px);
  border-color: rgba(112, 247, 255, 0.5);
  background: rgba(18, 25, 56, 0.95);
}

/* Toggle Rows & Switch Buttons */
.set-row-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.set-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 15px;
  background: rgba(12, 16, 38, 0.88);
  border: 1px solid rgba(156, 184, 255, 0.16);
  border-radius: 5px;
}
.set-item .set-label {
  flex: 1;
  min-width: 0;
}
.set-item .set-label b {
  color: #f1f5f9;
  font-size: 9px;
  letter-spacing: .12em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}
.set-item .set-label small {
  font-size: 7.5px;
  color: #8897ba;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.toggle-btn {
  width: 58px;
  height: 28px;
  min-width: 58px !important;
  max-width: 58px;
  padding: 0 8px;
  border-radius: 14px;
  font: 700 8.5px 'Space Mono', monospace;
  letter-spacing: .08em;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .18s ease;
  flex-shrink: 0;
}
.toggle-btn.on {
  background: rgba(109, 255, 172, 0.18);
  border: 1.5px solid #6dffac;
  color: #6dffac;
  box-shadow: 0 0 12px rgba(109, 255, 172, 0.35);
}
.toggle-btn.off {
  background: rgba(255, 71, 111, 0.14);
  border: 1.5px solid #ff476f;
  color: #ff859f;
  box-shadow: none;
}
.toggle-btn:hover {
  transform: translateY(-1px);
}

/* Controls Info */
.set-controls-info {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  padding: 12px 15px;
  background: rgba(8, 12, 28, 0.7);
  border: 1px solid rgba(156, 184, 255, 0.12);
  border-radius: 5px;
  font-family: 'Space Mono', monospace;
  font-size: 8px;
}
.ctl-col {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.ctl-col b {
  color: var(--amber);
  margin-bottom: 3px;
  letter-spacing: .14em;
  font-size: 8.5px;
}
.ctl-col span {
  color: #94a3b8;
  font-size: 7.5px;
  line-height: 1.45;
}

/* Settings Footer & Close Button */
.settings-footer {
  display: flex;
  justify-content: center;
  width: 100%;
}
.settings-footer button, #closeSettingsBtn {
  min-width: 220px !important;
  padding: 13px 28px;
  border-radius: 4px;
  font: 700 11px 'Space Mono', monospace;
  letter-spacing: .16em;
  background: linear-gradient(105deg, #7657ec, #b141ca);
  border: 1px solid #ff7ec8;
  box-shadow: 0 8px 28px rgba(216, 43, 143, 0.45);
  color: #fff;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.settings-footer button:hover, #closeSettingsBtn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 35px rgba(216, 43, 143, 0.65), 0 0 20px rgba(255, 126, 200, 0.5);
  border-color: #fff;
}

/* Mobile Controls */
.mobile {
  display: none;
  position: absolute;
  z-index: 8;
  inset: 0;
  pointer-events: none;
}
.stick {
  position: absolute;
  left: 32px;
  bottom: 32px;
  width: 102px;
  height: 102px;
  border: 1px solid #7eecff40;
  border-radius: 50%;
  background: #0f163240;
}
.stick i {
  position: absolute;
  left: 36px;
  top: 36px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #6ff7ff38;
  box-shadow: 0 0 18px #6ff7ff40;
}
.mobile-actions {
  position: absolute;
  right: 28px;
  bottom: 30px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.mobile button {
  pointer-events: auto;
  width: 82px;
  height: 82px;
  border-radius: 50%;
  border-color: #ff63bd80;
  background: #5e195b73;
  box-shadow: 0 0 25px #ff63bd24;
}
.mobile-bomb-btn {
  border-color: #70f7ff80 !important;
  background: #11365c85 !important;
  box-shadow: 0 0 25px rgba(112, 247, 255, 0.25) !important;
}
.mobile small {
  display: block;
  font-size: 6px;
  color: #ff99d3;
  margin-top: 4px;
}
.mobile-bomb-btn small {
  color: var(--cyan) !important;
}

/* Footer */
footer {
  z-index: 10;
  padding: 0 clamp(14px, 3vw, 42px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  background: #060713;
  color: #596581;
  font: 700 7px 'Space Mono';
  letter-spacing: .17em;
}
footer b {
  color: var(--cyan);
}

/* Media Queries & Responsive */
@media (hover: none), (pointer: coarse) {
  .mobile { display: block; }
  .p2 { display: none; }
}

@media (max-width: 800px) {
  .actions button:not(#settingsBtn):not(#soundBtn):not(#pauseBtn) {
    display: none;
  }
  .set-row-duo {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .set-controls-info {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .shell { grid-template-rows: 50px minmax(0, 1fr) 28px; }
  header { height: 50px; }
  .sector { display: none; }
  .brand > span { width: 26px; height: 26px; font-size: 13px; }
  .hud { grid-template-columns: 1fr 1fr; padding: 9px 12px; }
  .mission { position: absolute; left: 28%; right: 28%; top: 6px; }
  .status { gap: 10px; }
  .status > div:first-child { position: absolute; left: 12px; top: 49px; text-align: left; }
  .score > b { font-size: 14px; }
  .combo { top: 62px; }
  .boss-hud { top: 6px; width: 92%; padding: 5px 10px; }
  
  .overlay {
    padding: 24px 16px;
    align-items: center;
    text-align: center;
    background: #050612f0;
    backdrop-filter: blur(8px);
  }
  .overlay:after {
    right: 50%;
    transform: translate(50%, -50%) rotate(45deg);
    width: 70vw;
  }
  .menu h1 { font-size: 46px; margin: 14px 0 16px; }
  .menu h1 em { letter-spacing: .43em; }
  .brief-card { padding: 10px 14px; text-align: left; width: 100%; }
  .menu-actions { grid-template-columns: 1fr; width: 100%; max-width: 320px; gap: 8px; }
  .menu-card { padding: 10px 14px; }
  .controls-dock { display: none; }
  .note { left: 50%; transform: translateX(-50%); width: 100%; bottom: 12px; }
  .stick { left: 18px; bottom: 18px; }
  .mobile-actions { right: 18px; bottom: 20px; gap: 10px; }
  .mobile button { width: 68px; height: 68px; }
  .speed-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-height: 550px) {
  .menu h1 { font-size: 46px; margin: 12px 0; }
  .menu p { font-size: 11px; margin-bottom: 12px; }
  .controls { margin-top: 10px; }
  .note { display: none; }
  .overlay button { padding: 10px 14px; }
  .modal h2 { font-size: 46px; }
  .settings-box { padding: 12px; gap: 10px; }
}

/* Release: local fonts, reachable dialogs, touch pause. */
.overlay { overflow-y:auto; justify-content:safe center; }
.overlay > * { flex-shrink:0; }
.actions #pauseBtn { display:block; }
@media(max-width:700px) { .brand small,.brand>span {display:none} .actions {gap:3px} .actions button {padding:7px 5px;font-size:7px} .eyebrow {letter-spacing:.08em;font-size:7px} .settings-modal {justify-content:flex-start} .settings-box {padding:12px;gap:9px} .settings-modal h2 {font-size:32px} .set-controls-info {display:none} }
@media(max-height:650px) { .menu h1 {font-size:48px;margin:12px 0} .brief-card {margin-bottom:12px} .controls-dock {margin-bottom:8px;padding:8px} .note {display:none} }
