:root {
  color-scheme: dark;
  --ink: #0b1420;
  --muted: #8ca0ad;
  --text: #edf5f1;
  --orange: #ff7145;
  --mint: #a9f8d4;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #05090f;
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
}
body {
  display: flex;
  align-items: center;
  justify-content: center;
}
button,
input,
select {
  font: inherit;
}
button {
  cursor: pointer;
  border: 1px solid #43505c;
  background: #101e2be8;
  color: var(--text);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.1px;
  padding: 14px 18px;
  text-align: left;
  transition:
    background 0.15s,
    border-color 0.15s;
}
button:hover,
button:focus-visible {
  background: #263b49;
  border-color: var(--mint);
  outline: none;
}
button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
button.primary {
  background: var(--orange);
  border-color: var(--orange);
  color: #171922;
}
button.primary:hover {
  background: #ff9872;
}
button span {
  float: right;
}
button.subtle {
  background: transparent;
}
input,
select {
  background: #102130;
  border: 1px solid #495968;
  border-radius: 0;
  color: #e6f4f4;
  padding: 10px 12px;
  width: 100%;
  outline: none;
}
input:focus,
select:focus {
  border-color: var(--mint);
}
input[type="range"] {
  padding: 0;
  accent-color: var(--orange);
}
label {
  display: block;
  color: #acbec9;
  font-size: 11px;
  letter-spacing: 1px;
  margin: 12px 0 7px;
}
#stage {
  position: relative;
  width: min(100vw, 177.7778vh);
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #142d40;
  box-shadow: 0 0 90px #22354455;
}
#game {
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
  outline: none;
  cursor: crosshair;
}
#vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  box-shadow: inset 0 0 80px #06101b40;
}
.screen {
  position: absolute;
  inset: 0;
}
.home {
  background: linear-gradient(
    90deg,
    #08121cf5 0%,
    #0a1722ed 33%,
    #091a2475 55%,
    #07151d08 75%
  );
}
.home-content {
  position: absolute;
  top: 10%;
  left: 6%;
  width: 44%;
  height: 83%;
  display: flex;
  flex-direction: column;
}
.eyebrow {
  font-size: 9px;
  letter-spacing: 1.8px;
  color: #a7c1c4;
  display: flex;
  gap: 8px;
  align-items: center;
}
.eyebrow i,
.status-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--orange);
  box-shadow: 0 0 12px #ff7145;
}
h1 {
  margin: 24px 0 0;
  font-family: "Arial Black", Impact, sans-serif;
  font-size: clamp(46px, 7.8vw, 104px);
  font-style: italic;
  letter-spacing: -5px;
  line-height: 0.82;
  text-shadow: 3px 4px 0 #203844;
}
h1 span {
  display: block;
  color: var(--orange);
  letter-spacing: -4px;
}
.tagline {
  margin: 20px 0 0;
  font-size: 10px;
  letter-spacing: 2.1px;
  font-weight: bold;
}
.intro {
  font-size: 12px;
  line-height: 1.8;
  color: #9cb3bd;
  margin: 17px 0 22px;
}
.home-buttons {
  width: 86%;
  display: grid;
  gap: 8px;
}
.home-buttons > .primary {
  padding: 17px 18px;
  font-size: 12px;
}
.button-row {
  display: flex;
  gap: 6px;
}
.button-row button {
  flex: 1;
  padding: 10px 7px;
  font-size: 8px;
  text-align: center;
}
.home-footer {
  margin-top: auto;
  font-size: 8px;
  letter-spacing: 1px;
  color: #bccbc9;
  display: flex;
  align-items: center;
  gap: 7px;
}
.home-footer > span:last-child {
  margin-left: 10px;
  color: #7695a4;
  font-size: 7px;
}
.hero-label {
  position: absolute;
  right: 8%;
  bottom: 15%;
  border-left: 2px solid var(--orange);
  padding: 8px 14px;
  text-shadow: 1px 2px #0b1520;
}
.hero-label span {
  display: block;
  font-size: 18px;
  font-weight: bold;
  letter-spacing: 4px;
}
.hero-label small {
  display: block;
  font-size: 8px;
  letter-spacing: 1.8px;
  color: #bdcdc9;
  margin-top: 5px;
}
.version {
  position: absolute;
  right: 3%;
  bottom: 4%;
  font: 8px monospace;
  letter-spacing: 1px;
  color: #a5bfcc;
}
.panel-screen {
  background: #040c15ce;
  backdrop-filter: blur(7px);
  display: flex;
  align-items: center;
  justify-content: center;
}
.panel-card {
  background: #0c1925f5;
  border: 1px solid #3f5564;
  border-top: 3px solid var(--orange);
  padding: 25px 30px;
  width: 540px;
  max-width: 92%;
  max-height: 92%;
  overflow: auto;
  box-shadow: 0 22px 70px #0008;
}
.panel-card.wide {
  width: 730px;
}
.panel-card h2 {
  font-size: 26px;
  letter-spacing: -1px;
  margin: 4px 0 12px;
}
.panel-card h3 {
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--mint);
  margin: 20px 0 10px;
}
.panel-card p {
  color: #a1b5c2;
  font-size: 12px;
  line-height: 1.65;
}
.panel-card .kicker {
  color: var(--orange);
  font-size: 9px;
  letter-spacing: 2px;
}
.panel-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}
.panel-actions button {
  flex: 1;
  text-align: center;
}
.grid2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.tip {
  border-left: 2px solid #ff7145;
  padding-left: 12px;
}
.muted {
  color: #93a9b6;
  font-size: 10px;
}
.route {
  display: flex;
  gap: 5px;
  margin: 16px 0;
}
.route span {
  flex: 1;
  padding: 12px 5px;
  text-align: center;
  border: 1px solid #365363;
  font: 9px monospace;
  color: #b3dccb;
}
.controls {
  display: grid;
  grid-template-columns: 145px 1fr;
  gap: 10px;
  font-size: 11px;
  color: #aac1cf;
}
.controls b {
  color: #f3f7ec;
  font-weight: 400;
}
kbd {
  font: 8px monospace;
  border: 1px solid #63798788;
  padding: 2px 4px;
  border-radius: 2px;
  margin-left: 4px;
  color: #aab9bf;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}
th {
  text-align: left;
  color: #91a6b5;
  font-size: 8px;
  letter-spacing: 1.2px;
}
td,
th {
  border-bottom: 1px solid #294150;
  padding: 9px 5px;
}
td:nth-child(3) {
  color: var(--mint);
  text-align: right;
  font-family: monospace;
}
#hud {
  position: absolute;
  inset: 0;
  pointer-events: none;
  font-family: monospace;
  user-select: none;
}
.hud-top,
.hud-bottom {
  position: absolute;
  left: 2.5%;
  right: 2.5%;
  display: flex;
  align-items: center;
  gap: 17px;
}
.hud-top {
  top: 3%;
  padding: 10px 12px;
  background: linear-gradient(90deg, #07121ceb, #07121caa);
  border-top: 2px solid #709baa77;
  border-bottom: 1px solid #a8dfe622;
}
.identity {
  width: 13%;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.rook {
  font-size: 19px;
  color: #f9efde;
  letter-spacing: 1px;
}
#lives {
  font-size: 11px;
  color: var(--orange);
  white-space: nowrap;
}
.armor {
  width: 24%;
}
.armor span,
.score span,
.sector span {
  display: block;
  font-size: 8px;
  letter-spacing: 1.2px;
  color: #a6bbc6;
}
.armor b {
  float: right;
  color: var(--mint);
}
.meter {
  height: 5px;
  background: #40556488;
  overflow: hidden;
  margin-top: 6px;
}
.meter i {
  height: 100%;
  background: var(--mint);
  display: block;
  width: 100%;
  transition: width 0.1s linear;
}
.sector {
  margin-left: auto;
  text-align: right;
}
.sector b {
  font-size: 14px;
  display: block;
  margin-top: 4px;
  color: #d7edf2;
}
.score {
  text-align: right;
  min-width: 12%;
}
.score b {
  font-size: 20px;
  font-weight: 400;
  display: block;
  margin-top: 3px;
  color: #ffdf9f;
}
#pause-button {
  pointer-events: auto;
  border: none;
  padding: 8px;
  font-size: 16px;
  min-width: 29px;
}
.hud-bottom {
  bottom: 3%;
  gap: 8px;
  align-items: stretch;
}
.hud-bottom > div {
  background: #07121cd9;
  border-bottom: 2px solid #658e9a88;
  padding: 9px 12px;
  min-width: 18%;
}
.hud-bottom small {
  display: block;
  font-size: 8px;
  color: #a6bbc6;
  letter-spacing: 1px;
  margin-bottom: 5px;
}
.hud-bottom b {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.5px;
}
.weapon {
  min-width: 29% !important;
}
.weapon > span {
  float: right;
  color: var(--orange);
  font-size: 11px;
}
.heat {
  height: 2px;
  margin-top: 4px;
}
.heat i {
  width: 0%;
  background: #ff9263;
}
.shock {
  flex: 1;
}
.shock .meter {
  height: 7px;
}
.shock i {
  background: #83d4ff;
}
.equipment:last-child {
  text-align: right;
  min-width: 13%;
}
.equipment:last-child b {
  color: var(--orange);
}
#boss-hud {
  position: absolute;
  top: 18%;
  left: 25%;
  right: 25%;
  text-align: center;
  color: #ffc4bd;
  font-size: 10px;
  letter-spacing: 2px;
  background: #180f22ce;
  padding: 8px 15px;
}
#boss-hud .meter {
  height: 7px;
  margin: 7px 0;
}
#boss-hud i {
  background: linear-gradient(90deg, #d64962, #ff9865);
}
#boss-hud small {
  font-size: 7px;
  color: #cd97a0;
}
#toast {
  position: absolute;
  left: 20%;
  right: 20%;
  bottom: 18%;
  text-align: center;
  font-size: 11px;
  color: #edffcb;
  text-shadow: 1px 2px #00111f;
  letter-spacing: 1px;
  opacity: 0;
  transition: opacity 0.2s;
}
#toast.visible {
  opacity: 1;
}
#sector-banner {
  position: absolute;
  left: 0;
  right: 0;
  top: 36%;
  text-align: center;
  background: linear-gradient(90deg, transparent, #091728df, transparent);
  padding: 16px;
  opacity: 0;
  transition: opacity 0.35s;
}
#sector-banner.visible {
  opacity: 1;
}
#sector-banner small {
  display: block;
  color: #ffb38b;
  letter-spacing: 4px;
  font-size: 8px;
}
#sector-banner b {
  display: block;
  font-size: 28px;
  letter-spacing: 3px;
  margin: 10px;
}
#sector-banner span {
  font-size: 10px;
  color: #c3dbde;
  letter-spacing: 2px;
}
#desktop-note {
  display: none;
  position: absolute;
  bottom: 0;
  background: #121c28;
  width: 100%;
  padding: 9px;
  text-align: center;
  font-size: 10px;
  color: #d9d5b5;
}
[hidden] {
  display: none !important;
}
.error {
  color: #ffae9a !important;
}
.result-score {
  font-size: 38px;
  color: var(--mint);
  font-family: monospace;
  letter-spacing: 3px;
  margin: 10px 0;
}
.toggle {
  display: flex;
  align-items: center;
  gap: 12px;
}
.toggle input {
  width: auto;
}
.separator {
  height: 1px;
  background: #2c4352;
  margin: 15px 0;
}
@media (min-aspect-ratio: 16/9) {
  h1 {
    font-size: 17vh;
  }
}
@media (max-width: 740px) {
  .home-content {
    top: 7%;
  }
  .intro {
    font-size: 9px;
    margin: 10px 0;
  }
  .tagline {
    font-size: 7px;
    margin-top: 12px;
  }
  .eyebrow {
    font-size: 6px;
  }
  .home-buttons > .primary {
    padding: 10px;
  }
  .home-footer {
    display: none;
  }
  .hud-top {
    gap: 7px;
    padding: 5px;
  }
  .rook {
    font-size: 13px;
  }
  .score b {
    font-size: 13px;
  }
  .hud-bottom > div {
    padding: 5px 7px;
  }
  .hud-bottom b {
    font-size: 8px;
  }
  .hero-label {
    bottom: 20%;
  }
  .panel-card {
    padding: 15px;
  }
  .panel-card h2 {
    font-size: 20px;
  }
}
@media (pointer: coarse) {
  #desktop-note {
    display: block;
  }
}

/* v1.1 / WAR MACHINE: machined steel, oxidized copper, military instrument HUD. */
:root { --mint: #b7c6b1; --orange: #dd8151; --text: #e8e6d6; }
body { background: #060a0f; }
#stage { background: #101820; box-shadow: 0 0 80px #05080c; }
.home { background: linear-gradient(90deg, #090e15fa, #090e15ee 32%, #090e1580 53%, #090e1500 72%); }
h1 { color: #d9ddcf; text-shadow: 2px 2px 0 #636f72, 4px 5px 0 #0b141d; }
h1 span { color: #c97246; }
.hero-label { background: #0b141abf; border-left-color: #bf724b; bottom: 12%; }
.hud-top { background: linear-gradient(#2c3739f5, #151e26ed 15%, #101922f5); border-top: 2px solid #93998b; border-bottom: 3px solid #070e16; box-shadow: 0 1px 0 #5a6b71, inset 0 0 0 1px #56636a66; }
.hud-bottom > div { background: linear-gradient(#26353bed, #111c25f5); border: 1px solid #59696c; border-bottom: 3px solid #07111a; box-shadow: inset 0 1px 0 #8c978766; }
.hud-top::before, .hud-top::after { content: ''; width: 3px; height: 3px; border: 1px solid #9da591; background: #33454d; position: absolute; top: 5px; }
.hud-top::before { left: 5px; } .hud-top::after { right: 5px; }
#lives { font-size: 9px; letter-spacing: 1.5px; color: #c7986a; }
.meter { background: #090f16; border-bottom: 1px solid #45565e; height: 6px; }
.meter i { box-shadow: inset 0 1px 0 #e7e3c966; }
.score b { color: #e4c998; }
button.primary { background: #ad5c37; border-color: #e4ac76; color: #fff0db; }
button.primary:hover { background: #c67645; }
#boss-hud { background: #131820e8; border-top: 2px solid #ad6b49; box-shadow: inset 0 0 0 1px #707a7355; }
#boss-hud i { background: linear-gradient(90deg, #ac4838, #d58a49); }
