:root {
  color-scheme: dark;
  --bg: #111714;
  --panel: #1a211c;
  --line: #394137;
  --cream: #e4e5cf;
  --muted: #8e9985;
  --acid: #c5ed79;
  --red: #ed6254;
  --mono: ui-monospace, SFMono-Regular, Consolas, monospace;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--cream);
  font-family: Arial, Helvetica, sans-serif;
}
button,
a,
input {
  -webkit-tap-highlight-color: transparent;
}
button {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--cream);
  font: 700 10px var(--mono);
  letter-spacing: 1px;
  padding: 12px 14px;
  cursor: pointer;
  min-height: 40px;
}
button:hover {
  background: #35412d;
  border-color: var(--acid);
  color: var(--acid);
}
button:active {
  transform: translateY(1px);
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 3px;
}
button[aria-pressed="true"] {
  color: var(--acid);
  border-color: var(--acid);
}
[hidden] {
  display: none !important;
}
#app {
  max-width: 1600px;
  margin: auto;
  padding: 0 32px;
}
.masthead {
  height: 89px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  gap: 20px;
}
.brand {
  display: flex;
  gap: 14px;
  align-items: center;
  color: var(--cream);
  text-decoration: none;
  font-size: 26px;
  font-weight: 950;
  letter-spacing: 3px;
}
.brand small {
  display: block;
  color: var(--muted);
  font: 9px var(--mono);
  letter-spacing: 2px;
  margin-top: 5px;
}
.brand-mark {
  color: var(--acid);
  border: 2px solid var(--acid);
  height: 45px;
  width: 43px;
  display: grid;
  place-content: center;
  font-size: 28px;
  position: relative;
  font-style: italic;
}
.brand-mark span {
  position: absolute;
  right: -8px;
  bottom: -8px;
  background: var(--bg);
  font-size: 30px;
}
.station {
  font: 10px var(--mono);
  letter-spacing: 1px;
  color: var(--muted);
}
.station i {
  display: inline-block;
  width: 6px;
  height: 6px;
  background: var(--acid);
  margin-right: 9px;
}
.station b {
  color: var(--cream);
}
.header-actions {
  display: flex;
  gap: 8px;
}
.dashboard {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1.2fr 1fr 1.15fr;
  padding: 23px 0 22px;
}
.dashboard > div {
  padding: 0 25px;
  border-left: 1px solid var(--line);
}
.dashboard > div:first-child {
  padding-left: 0;
  border: 0;
}
.dashboard > div:last-child {
  padding-right: 0;
}
.label {
  display: block;
  font: 9px var(--mono);
  letter-spacing: 1.7px;
  color: var(--muted);
  white-space: nowrap;
}
.live-dot {
  float: right;
  font-size: 8px;
  color: var(--acid);
}
.health-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 8px 0 10px;
}
.health-line b {
  font: 700 29px var(--mono);
}
.health-line small {
  font-size: 14px;
  color: var(--muted);
}
.health-icon {
  color: var(--acid);
  font-size: 25px;
}
.meter {
  height: 4px;
  background: #343c30;
  overflow: hidden;
}
.meter i {
  height: 100%;
  display: block;
  background: var(--acid);
  width: 100%;
  transition: width 0.12s;
}
.stat strong,
.blood-stat strong {
  display: block;
  font: 500 33px var(--mono);
  letter-spacing: -1px;
  margin-top: 7px;
}
.stat > span:last-child,
.blood-stat > span:last-child {
  font: 8px var(--mono);
  letter-spacing: 1px;
  color: var(--muted);
}
.threat strong {
  color: var(--acid);
}
.blood-stat strong {
  color: var(--red);
  font-size: 29px;
  margin-bottom: 8px;
}
.blood-stat small {
  font-size: 16px;
}
.blood-stat .meter {
  margin-bottom: 6px;
}
.blood-stat .meter i {
  background: var(--red);
  width: 0;
}
.arena-wrap {
  height: clamp(350px, 57vh, 720px);
  position: relative;
  overflow: hidden;
  border: 1px solid #646b53;
  background: #6d745e;
}
#arena {
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: crosshair;
}
.arena-top,
.arena-bottom {
  position: absolute;
  left: 20px;
  right: 20px;
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  font: 9px var(--mono);
  letter-spacing: 1px;
  z-index: 2;
}
.arena-top {
  top: 16px;
}
.arena-bottom {
  bottom: 12px;
  color: #d7ddbd77;
  font-size: 8px;
}
.sector-tag {
  background: #151c15da;
  padding: 8px 10px;
  color: #d3d6bd;
}
.sector-tag b {
  color: var(--acid);
  margin: 0 6px;
}
.status-tag {
  background: #151c15da;
  color: var(--acid);
  padding: 8px 10px;
}
.operator-label {
  position: absolute;
  left: 18px;
  bottom: 34px;
  font: 8px var(--mono);
  letter-spacing: 1px;
  color: #c5ed79;
  pointer-events: none;
}
.overlay,
.modal {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  background: #0c140d65;
  backdrop-filter: blur(1px);
}
.panel {
  text-align: center;
  max-width: 540px;
  padding: 25px 35px;
}
.eyebrow {
  font: 9px var(--mono);
  letter-spacing: 2.7px;
  color: var(--acid);
}
h1 {
  font-size: clamp(45px, 5.5vw, 80px);
  line-height: 0.9;
  letter-spacing: -3px;
  margin: 22px 0 18px;
  font-weight: 950;
  text-shadow: 0 4px 25px #071009;
}
h1 em {
  color: var(--acid);
  font-style: normal;
}
p {
  color: #c3c9b8;
  font-size: 13px;
  line-height: 1.7;
}
.primary {
  background: var(--acid);
  color: #1b2514;
  border: 0;
  font-size: 11px;
  letter-spacing: 1.5px;
  min-height: 48px;
  min-width: 255px;
  margin-top: 15px;
}
.primary span {
  float: right;
  margin-left: 35px;
  font-size: 18px;
}
.primary:hover {
  background: #deff9f;
  color: #182111;
}
.intro-controls {
  display: flex;
  justify-content: center;
  gap: 24px;
  font: 8px var(--mono);
  color: #c0c8ad;
  margin-top: 22px;
  align-items: center;
}
kbd {
  font: 8px var(--mono);
  padding: 3px 4px;
  border: 1px solid #66745a;
  border-radius: 2px;
  margin-right: 2px;
  color: var(--cream);
}
.loadout {
  display: grid;
  grid-template-columns: 1.25fr 0.85fr 1.5fr;
  background: var(--panel);
  border: 1px solid var(--line);
  border-top: 0;
  padding: 19px 22px;
  gap: 24px;
}
.weapon-block > div {
  display: flex;
  align-items: center;
  margin-top: 10px;
  gap: 12px;
}
.weapon-block b {
  font-size: 18px;
  letter-spacing: 1px;
}
.gun-icon {
  color: var(--acid);
  font-size: 27px;
  line-height: 1;
}
.weapon-type {
  font: 8px var(--mono);
  padding: 4px 6px;
  border: 1px solid var(--line);
  color: var(--muted);
}
.ammo-block {
  border-left: 1px solid var(--line);
  padding-left: 24px;
}
.ammo-block b {
  display: inline-block;
  font: 22px var(--mono);
  margin-top: 8px;
}
.ammo-block > span:last-child {
  font: 8px var(--mono);
  color: var(--muted);
  margin-left: 14px;
}
.level-block > div:first-child {
  display: flex;
  justify-content: space-between;
  font: 10px var(--mono);
}
.level-block b {
  color: var(--acid);
}
#xp-text {
  color: var(--muted);
}
.xp {
  margin: 10px 0;
  height: 5px;
}
.xp i {
  width: 0;
}
#perks-taken {
  font: 8px var(--mono);
  color: var(--muted);
  max-height: 34px;
  overflow: auto;
  line-height: 1.5;
}
footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 17px 0;
  font: 8px var(--mono);
  color: var(--muted);
  gap: 12px;
}
.controls-legend {
  display: flex;
  gap: 18px;
}
.seed-control {
  display: flex;
  align-items: center;
  gap: 9px;
}
.seed-control input {
  width: 75px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  color: var(--cream);
  font: 10px var(--mono);
  padding: 5px;
}
.seed-control button {
  font-size: 8px;
  min-height: 28px;
  padding: 6px 9px;
}
#run-seed {
  font-size: 8px;
  color: var(--acid);
}
#error {
  background: #5b2420;
  color: #fff;
  padding: 10px;
  margin: 0;
}
#announcement {
  position: absolute;
  top: 65px;
  left: 0;
  right: 0;
  text-align: center;
  font: 900 23px Arial;
  letter-spacing: 4px;
  color: var(--acid);
  pointer-events: none;
  text-shadow: 0 2px 8px #000;
}
#pickup-hint {
  position: absolute;
  bottom: 50px;
  left: 50%;
  transform: translateX(-50%);
  font: 10px var(--mono);
  color: var(--acid);
  background: #111b13d9;
  padding: 7px;
  pointer-events: none;
  white-space: nowrap;
}
#pickup-hint:empty {
  display: none;
}
#effects {
  position: absolute;
  top: 54px;
  left: 18px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  max-width: 45%;
  pointer-events: none;
}
#effects span {
  background: #121c14e8;
  border: 1px solid #8ca36b;
  color: var(--acid);
  font: 9px var(--mono);
  padding: 6px;
}
.modal {
  background: #0c130eeb;
  backdrop-filter: blur(5px);
  padding: 24px;
  overflow: auto;
}
.perk-inner {
  max-width: 900px;
  width: 100%;
  text-align: center;
}
h2 {
  font-size: 38px;
  letter-spacing: -1px;
  margin: 13px 0;
}
.perk-inner p {
  margin: 8px 0 20px;
}
#choices {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}
#choices button {
  text-align: left;
  min-height: 150px;
  background: #222d20;
  padding: 22px;
  white-space: normal;
  line-height: 1.5;
}
#choices button:hover {
  background: #34472b;
}
#choices b {
  display: block;
  font-size: 16px;
  margin: 14px 0 8px;
  color: var(--acid);
}
#choices small {
  font: 11px/1.6 Arial;
  letter-spacing: 0;
  color: #c3ccb6;
}
.death-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin: 22px 0;
}
.death-stats span {
  font: 9px var(--mono);
  color: var(--muted);
}
.death-stats b {
  display: block;
  font: 22px var(--mono);
  color: var(--cream);
  margin-bottom: 5px;
}
#touch-controls {
  display: none;
  position: absolute;
  inset: auto 18px 32px;
  justify-content: space-between;
  align-items: end;
  pointer-events: none;
  z-index: 3;
}
.stick {
  width: 100px;
  height: 100px;
  border: 1px solid #c5ed7966;
  background: #14201966;
  border-radius: 50%;
  position: relative;
  touch-action: none;
  pointer-events: auto;
}
.stick span {
  position: absolute;
  bottom: 12px;
  width: 100%;
  text-align: center;
  font: 7px var(--mono);
  color: #d5e6bc;
}
.stick i {
  position: absolute;
  left: 32px;
  top: 32px;
  width: 34px;
  height: 34px;
  background: #c5ed7955;
  border: 1px solid #d5ff9b88;
  border-radius: 50%;
  pointer-events: none;
}
.touch-actions {
  display: flex;
  flex-direction: column;
  gap: 7px;
  pointer-events: auto;
}
.touch-actions button {
  background: #142019aa;
  min-height: 44px;
  font-size: 8px;
  padding: 8px;
  touch-action: none;
}
.low-health {
  box-shadow: inset 0 0 80px #ac211b88;
}
.low-health:after {
  content: "";
  position: absolute;
  inset: 0;
  border: 2px solid #d95547;
  pointer-events: none;
}
@media (pointer: coarse) {
  #touch-controls {
    display: flex;
  }
  .controls-legend {
    display: none;
  }
}
@media (max-width: 850px) {
  #app {
    padding: 0 16px;
  }
  .station {
    display: none;
  }
  .dashboard > div {
    padding: 0 14px;
  }
  .stat strong {
    font-size: 27px;
  }
  .loadout {
    gap: 15px;
    padding: 16px;
  }
  .ammo-block {
    padding-left: 15px;
  }
  .weapon-type {
    display: none;
  }
  .ammo-block > span:last-child {
    display: block;
    margin: 5px 0 0;
  }
  .controls-legend {
    gap: 10px;
  }
}
@media (max-width: 600px) {
  #app {
    padding: 0 10px;
  }
  .masthead {
    height: 67px;
    gap: 8px;
  }
  .brand {
    font-size: 20px;
    gap: 9px;
  }
  .brand-mark {
    height: 32px;
    width: 30px;
    font-size: 22px;
  }
  .brand small {
    font-size: 6px;
    letter-spacing: 1.4px;
  }
  .header-actions {
    gap: 5px;
  }
  .header-actions button {
    font-size: 7px;
    padding: 6px;
    min-height: 36px;
  }
  .header-actions #pause span {
    display: none;
  }
  .dashboard {
    grid-template-columns: 1fr 1fr 1fr;
    padding: 13px 0;
    row-gap: 12px;
  }
  .dashboard > div {
    padding: 0 12px;
  }
  .dashboard .vitals {
    grid-column: 1 / 3;
  }
  .dashboard .stat:nth-child(2) {
    grid-column: 3;
    grid-row: 1;
  }
  .dashboard .stat:nth-child(3) {
    border-left: 0;
    padding-left: 0;
  }
  .dashboard .blood-stat {
    padding-right: 0;
  }
  .label {
    font-size: 7px;
    letter-spacing: 1px;
  }
  .health-line {
    margin: 3px 0 7px;
  }
  .health-line b {
    font-size: 24px;
  }
  .stat strong {
    font-size: 23px;
    margin-top: 4px;
  }
  .blood-stat strong {
    font-size: 23px;
    margin-top: 4px;
    margin-bottom: 5px;
  }
  .stat > span:last-child,
  .blood-stat > span:last-child {
    font-size: 6px;
    letter-spacing: 0.4px;
  }
  .arena-wrap {
    height: clamp(390px, 55svh, 650px);
  }
  .arena-top {
    left: 10px;
    right: 10px;
    top: 10px;
    font-size: 7px;
  }
  .sector-tag,
  .status-tag {
    padding: 6px;
  }
  .arena-bottom {
    left: 10px;
    right: 10px;
    font-size: 6px;
  }
  .arena-bottom span:last-child {
    display: none;
  }
  .operator-label {
    display: none;
  }
  .panel {
    padding: 20px;
  }
  .eyebrow {
    font-size: 7px;
    letter-spacing: 1.4px;
  }
  h1 {
    font-size: 54px;
  }
  #touch-controls {
    display: flex;
    inset: auto 10px 32px;
  }
  .stick {
    width: 88px;
    height: 88px;
  }
  .stick i {
    left: 26px;
    top: 26px;
  }
  .loadout {
    grid-template-columns: 1fr 0.7fr;
    padding: 13px;
    gap: 13px;
  }
  .weapon-block b {
    font-size: 15px;
  }
  .gun-icon {
    font-size: 22px;
  }
  .ammo-block b {
    font-size: 19px;
  }
  .level-block {
    grid-column: 1 / -1;
    border-top: 1px solid var(--line);
    padding-top: 10px;
  }
  .ammo-block > span:last-child {
    display: inline;
    margin-left: 8px;
    font-size: 6px;
  }
  footer {
    padding: 10px 0;
    justify-content: center;
  }
  .controls-legend {
    display: none;
  }
  #choices {
    gap: 8px;
    grid-template-columns: 1fr;
  }
  #choices button {
    padding: 10px 15px;
    min-height: 70px;
  }
  #choices b {
    display: inline-block;
    font-size: 13px;
    margin: 0 0 3px 8px;
  }
  #choices small {
    display: block;
    font-size: 10px;
  }
  .modal {
    padding: 15px;
    align-items: flex-start;
  }
  .perk-inner {
    margin: auto;
  }
  h2 {
    font-size: 27px;
  }
  .perk-inner p {
    margin: 6px 0 12px;
  }
  #effects {
    max-width: 90%;
    top: 42px;
    left: 10px;
  }
  #effects span {
    font-size: 7px;
    padding: 4px;
  }
  #pickup-hint {
    bottom: 145px;
    font-size: 8px;
  }
  #announcement {
    top: 70px;
    font-size: 18px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
  button:active {
    transform: none;
  }
}
@media (pointer: coarse) and (orientation: landscape) and (max-height: 600px) {
  #app {
    padding: 0 10px;
  }
  .masthead {
    height: 52px;
  }
  .brand {
    font-size: 18px;
  }
  .brand-mark {
    height: 30px;
    width: 28px;
    font-size: 20px;
  }
  .dashboard {
    padding: 8px 0;
    grid-template-columns: repeat(5, 1fr);
    gap: 0;
  }
  .dashboard .vitals,
  .dashboard .stat:nth-child(2) {
    grid-column: auto;
    grid-row: auto;
  }
  .dashboard > div {
    padding: 0 10px;
  }
  .dashboard .label {
    font-size: 7px;
  }
  .dashboard .stat strong,
  .dashboard .blood-stat strong,
  .health-line b {
    font-size: 21px;
    margin-top: 2px;
  }
  .dashboard .stat > span:last-child,
  .blood-stat > span:last-child {
    display: none;
  }
  .health-line {
    margin: 2px 0 4px;
  }
  .arena-wrap {
    height: 65svh;
    min-height: 230px;
  }
  .loadout {
    padding: 10px 14px;
  }
  .stick {
    width: 78px;
    height: 78px;
  }
  .stick i {
    left: 21px;
    top: 21px;
  }
  .stick span {
    bottom: 7px;
  }
  #touch-controls {
    bottom: 18px;
  }
  h1 {
    font-size: 37px;
    margin: 10px 0;
  }
  .intro p,
  .intro-controls {
    display: none;
  }
  .primary {
    margin-top: 7px;
    min-height: 44px;
  }
  .arena-bottom {
    display: none;
  }
  .modal {
    padding: 12px;
  }
  .perk-inner h2 {
    font-size: 22px;
    margin: 6px;
  }
  .perk-inner p {
    margin: 4px 0 10px;
  }
  #choices {
    grid-template-columns: repeat(3, 1fr);
  }
  #choices button {
    padding: 10px;
    min-height: 105px;
  }
  #choices b {
    font-size: 12px;
    margin: 7px 0;
    display: block;
  }
  .panel {
    padding: 12px;
  }
  .death-stats {
    margin: 12px 0;
  }
  .death-stats b {
    font-size: 16px;
  }
}
