:root {
  color-scheme: dark;
  --bg: #121019;
  --shell: #282332;
  --stroke: #504457;
  --fg: #f8efeb;
  --quiet: #c0b0c2;
  --coral: #ff8982;
  --mint: #89e5bd;
  --amber: #f7ce7e;
  --mono: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  font-family: 'Barlow', 'PingFang SC', 'Microsoft YaHei', system-ui, sans-serif;
  color: var(--fg);
  background: var(--bg);
}
* {
  box-sizing: border-box;
}
[hidden] {
  display: none !important;
}
body {
  margin: 0;
  min-height: 100svh;
  background:
    radial-gradient(ellipse at 50% 0, #34233455, transparent 64%),
    repeating-linear-gradient(113deg, transparent 0 65px, #ffffff03 66px 67px, transparent 68px 120px),
    var(--bg);
}
button,
input {
  font: inherit;
}
button {
  color: inherit;
  cursor: pointer;
  touch-action: manipulation;
}
button:hover:enabled {
  filter: brightness(1.09);
}
button:active:enabled {
  transform: translateY(1px);
}
button:disabled {
  cursor: default;
  opacity: 0.53;
}
button:focus-visible,
input:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}
.console {
  width: min(1160px, 100%);
  margin: auto;
  padding: 0 clamp(9px, 2.8vw, 36px) 12px;
}
.mast,
.identity,
.utilities,
.field-header,
.field-title,
.field-stats,
.field-foot,
.news,
.floor-header,
.floor-header > div,
.wallet,
.overlay-actions,
footer {
  display: flex;
  align-items: center;
}
.mast {
  justify-content: space-between;
  padding: clamp(9px, 1.6vh, 16px) 2px;
}
.identity {
  gap: 10px;
}
.identity strong {
  font:
    1000 italic clamp(23px, 3vw, 32px) / 1 'Arial Black',
    'Archivo Black',
    Arial,
    sans-serif;
  letter-spacing: -0.085em;
}
.identity strong span {
  color: var(--coral);
}
.identity b {
  font-size: 12px;
  letter-spacing: 0.14em;
  border-left: 1px solid #5b4b5e;
  padding-left: 11px;
  color: #ddcddb;
}
.coin-mark,
.mini-coin {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 2px solid var(--coral);
  border-radius: 50%;
  box-shadow:
    inset 0 0 0 2px #362434,
    inset 0 0 0 3px var(--coral),
    2px 1px #7b4d59;
  transform: rotate(22deg);
}
.coin-mark:after,
.mini-coin:after {
  content: '';
  height: 55%;
  width: 3px;
  background: var(--coral);
}
.utilities {
  gap: 6px;
}
.utilities button,
#pause,
.overlay-actions button {
  border: 1px solid #645368;
  background: #271f30;
  border-radius: 4px;
  padding: 5px 10px;
  font-size: 12px;
}
.module,
.arcade {
  border: 1px solid #796579;
  box-shadow:
    inset 0 1px #a18a9c6b,
    0 3px 0 #090811;
  background: linear-gradient(140deg, #403442, #2b2432 53%, #342a37);
  border-radius: 9px;
}
.field-header,
.floor-header {
  justify-content: space-between;
  gap: 8px;
}
.field-header {
  padding: 8px 13px 7px;
}
.field-title {
  gap: 10px;
}
.field-title h1,
.floor-header h2 {
  margin: 0;
  font-size: clamp(15px, 1.65vw, 21px);
  font-weight: 900;
  letter-spacing: 0.025em;
}
.field-type,
.cap > span,
.kicker,
.serial {
  font: 800 10px/1 var(--mono);
  letter-spacing: 0.13em;
}
.field-type {
  color: #c0a8bc;
}
.signal {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1px solid #daffdf;
  background: #a2efba;
  box-shadow: 0 0 10px #a2efba69;
}
.field-stats {
  gap: 12px;
  font: 700 12px var(--mono);
  color: #e8d9e6;
}
.field-stats #clock {
  font-variant-numeric: tabular-nums;
  color: #bdaabd;
}
.field-stats button {
  padding: 2px 8px;
}
.field {
  margin: 0 8px;
  position: relative;
  height: clamp(215px, 34.5svh, 380px);
  background: #181620;
  border: 2px solid #15111a;
  border-radius: 4px;
  overflow: hidden;
}
.field canvas,
.glass canvas {
  display: block;
  width: 100%;
  height: 100%;
  touch-action: none;
}
.field-foot {
  justify-content: space-between;
  gap: 8px;
  min-height: 34px;
  padding: 5px 12px;
}
.news {
  min-width: 0;
  gap: 8px;
  font-size: 12px;
  color: #eadde8;
}
.news i {
  flex: none;
  width: 4px;
  height: 4px;
  background: var(--mint);
  transform: rotate(45deg);
}
.news span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.start,
.overlay-actions button:first-child {
  flex: none;
  border: 1px solid #ffe5b8;
  border-radius: 4px;
  background: var(--amber);
  color: #2b2027;
  font-weight: 850;
  font-size: 13px;
  padding: 4px 15px;
  box-shadow: 0 2px 0 #1a151d;
}
.population {
  color: #d7c4d9;
  font-size: 11px;
  white-space: nowrap;
}
.field-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: #100d1baa;
  backdrop-filter: blur(2px);
  text-align: center;
  padding: 4px;
}
.field-overlay > div {
  max-width: 97%;
  padding: 11px 24px;
  border: 1px solid #96788d;
  background: #2f2434f5;
  box-shadow: 4px 4px #100e16;
  border-radius: 4px;
}
.field-overlay small,
.kicker {
  color: var(--amber);
  font: 700 10px var(--mono);
  letter-spacing: 0.15em;
}
.field-overlay h2 {
  margin: 0.13em 0;
  font-size: clamp(22px, 4vw, 44px);
  font-style: italic;
  line-height: 1.15;
}
.field-overlay p {
  font-size: 12px;
  margin: 0 0 7px;
}
.overlay-actions {
  gap: 8px;
  justify-content: center;
}
.arcade {
  margin-top: 10px;
  padding: 0 8px 8px;
}
.floor-header {
  padding: 7px 4px;
}
.floor-header > div {
  gap: 8px;
}
.floor-header h2 {
  font-size: 15px;
}
.tiny-bars {
  width: 15px;
  height: 12px;
  background: repeating-linear-gradient(90deg, #f4c882 0 2px, transparent 2px 5px);
  transform: skewX(-12deg);
}
.wallet {
  font-size: 11px;
  color: #f1dfc2;
}
.wallet b {
  font: 800 19px/1 var(--mono);
  color: var(--amber);
}
.wallet small {
  font-size: 10px;
  color: var(--quiet);
  min-width: 60px;
}
.mini-coin {
  width: 14px;
  height: 14px;
  border-color: var(--amber);
  box-shadow: inset 0 0 0 1px #543f2f;
}
.mini-coin:after {
  background: var(--amber);
  width: 2px;
}
.machines {
  display: grid;
  grid-template-columns: 1fr 1.12fr 1fr;
  gap: 8px;
  align-items: stretch;
}
.cab {
  --accent: var(--coral);
  min-width: 0;
  display: flex;
  flex-direction: column;
  isolation: isolate;
  background: linear-gradient(155deg, #514554, #332b3c);
  border: 1px solid #756076;
  border-radius: 6px;
  overflow: hidden;
  box-shadow:
    0 2px #131019,
    inset 0 0 0 1px #5e4f60;
}
.cab.claw {
  --accent: var(--mint);
}
.cab.pin {
  --accent: var(--amber);
}
.cap {
  padding: 5px 12px;
  display: flex;
  align-items: center;
  gap: 9px;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--accent);
  color: #281f2b;
  border-bottom: 2px solid #261d29;
}
.cap h3 {
  margin: 0;
  font-size: clamp(15px, 1.7vw, 21px);
  font-style: italic;
  font-weight: 1000;
  line-height: 1.2;
  letter-spacing: -0.06em;
}
.cap span {
  font-size: 8px;
  line-height: 1.15;
  width: min-content;
  order: 1;
}
.cap i {
  z-index: -1;
  position: absolute;
  right: 0;
  width: 24%;
  height: 150%;
  background: repeating-linear-gradient(
    125deg,
    transparent 0 5px,
    #322332 6px 10px,
    transparent 11px 15px
  );
  opacity: 0.68;
}
.glass {
  height: clamp(138px, 23svh, 238px);
  border: 2px solid #221b26;
  border-radius: 3px;
  background: #171420;
  margin: 4px 4px 0;
  overflow: hidden;
}
.panel {
  padding: 5px 7px 8px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 5px;
}
.readout {
  display: flex;
  align-items: baseline;
  gap: 6px;
  min-width: 0;
}
.readout b {
  color: var(--accent);
  font-size: 12px;
  flex: none;
}
.readout span {
  color: #dbccdd;
  font-size: 11px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.switches {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}
.action,
.alternate {
  border: 1px solid #ffefd75c;
  border-radius: 4px;
  min-height: 31px;
  padding: 4px 11px;
  background: var(--accent);
  color: #271d29;
  box-shadow:
    0 2px #1c1721,
    inset 0 1px #ffffff50;
  font-size: 13px;
  font-weight: 850;
  white-space: nowrap;
}
.alternate {
  background: #4b3d50;
  color: #f7e4e6;
}
.slot-switches .action {
  flex: 1;
}
.switches input {
  flex: 1 1 0;
  min-width: 0;
  margin: 0;
  accent-color: var(--accent);
  height: 25px;
  cursor: ew-resize;
}
.switches .action:only-child {
  width: 100%;
}
footer {
  justify-content: space-between;
  gap: 8px;
  min-height: 26px;
  padding: 5px 3px;
  color: #bfaec3;
  font-size: 11px;
}
.serial {
  font-size: 9px;
  white-space: nowrap;
}
.loadout {
  white-space: normal;
}
dialog {
  border: 1px solid #8b778b;
  background: #2e2434;
  color: var(--fg);
  box-shadow: 0 10px 80px #0009;
  border-radius: 8px;
  width: min(430px, 90vw);
  padding: 20px;
  max-height: 88svh;
}
dialog::backdrop {
  background: #100d1ab8;
}
dialog h2 {
  margin: 4px 0 10px;
}
dialog p {
  font-size: 14px;
  line-height: 1.65;
  margin: 0.55em 0;
  color: #e1d3e0;
}
dialog button {
  margin-top: 7px;
}
@media (max-width: 720px) {
  .field-type {
    display: none;
  }
  .console {
    padding-inline: 7px;
  }
  .machines {
    gap: 4px;
    grid-template-columns: 1fr 1.18fr 1fr;
  }
  .arcade {
    padding: 0 4px 6px;
  }
  .cap {
    padding: 5px;
  }
  .cap i {
    width: 15%;
  }
  .cap span {
    font-size: 7px;
  }
  .panel {
    padding: 5px;
    gap: 4px;
  }
  .readout {
    display: block;
  }
  .readout b,
  .readout span {
    display: block;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
  }
  .readout b {
    font-size: 11px;
  }
  .readout span {
    font-size: 10px;
  }
  .switches {
    gap: 3px;
  }
  .action,
  .alternate {
    font-size: 12px;
    padding-inline: 5px;
  }
  .glass {
    margin: 3px 2px 0;
  }
  .field-header {
    padding: 6px 9px;
  }
  .field {
    margin-inline: 4px;
  }
}
@media (max-width: 520px) {
  .mast {
    padding: 9px 1px;
  }
  .identity {
    gap: 6px;
  }
  .identity b {
    font-size: 10px;
    padding-left: 6px;
  }
  .identity strong {
    font-size: 22px;
  }
  .coin-mark {
    width: 19px;
    height: 19px;
  }
  .utilities {
    gap: 4px;
  }
  .utilities button {
    font-size: 11px;
    padding: 4px 6px;
  }
  .field {
    height: clamp(164px, 30.5svh, 285px);
  }
  .arena {
    border-radius: 6px;
  }
  .field-stats {
    gap: 6px;
    font-size: 10px;
  }
  .field-title {
    gap: 6px;
  }
  .field-foot {
    padding: 5px 6px;
    min-height: 31px;
  }
  .news {
    font-size: 10px;
    gap: 4px;
  }
  .population {
    font-size: 9px;
  }
  .floor-header {
    padding: 6px 2px;
  }
  .floor-header h2 {
    font-size: 13px;
  }
  .floor-header > div {
    gap: 4px;
  }
  .wallet small {
    min-width: 45px;
  }
  .wallet b {
    font-size: 16px;
  }
  .arcade {
    margin-top: 6px;
  }
  .cap {
    align-items: flex-start;
    flex-direction: column;
    gap: 0;
  }
  .cap span {
    order: -1;
    width: auto;
    font-size: 6px;
    letter-spacing: 0.08em;
  }
  .cap h3 {
    font-size: 16px;
    margin-top: 2px;
  }
  .glass {
    height: clamp(126px, 19.5svh, 187px);
  }
  .switches {
    flex-wrap: wrap;
    align-content: end;
  }
  .switches input {
    width: 100%;
    flex-basis: 100%;
    height: 22px;
  }
  .switches .action {
    width: 100%;
    min-height: 33px;
    font-size: 12px;
  }
  .slot-switches .alternate {
    width: 100%;
    min-height: 22px;
    order: -1;
    font-size: 10px;
    padding: 2px 0;
  }
  .panel {
    padding: 4px 3px 7px;
  }
  .readout b {
    font-size: 10px;
  }
  .readout span {
    font-size: 9px;
  }
  .start {
    font-size: 11px;
    padding: 4px 8px;
  }
  .serial {
    font-size: 8px;
  }
  .loadout {
    font-size: 9px;
  }
  .field-overlay .overlay-actions button {
    font-size: 12px;
  }
}
@media (max-height: 510px) and (min-width: 521px) {
  .console {
    padding-inline: 8px;
  }
  .mast {
    padding: 3px 1px;
  }
  .identity strong {
    font-size: 18px;
  }
  .coin-mark {
    width: 17px;
    height: 17px;
  }
  .field-header,
  .floor-header {
    padding-block: 3px;
  }
  .field-title h1,
  .floor-header h2 {
    font-size: 12px;
  }
  .field {
    height: clamp(90px, 29.5svh, 145px);
  }
  .field-foot {
    min-height: 20px;
    padding: 2px 6px;
  }
  .start {
    font-size: 10px;
    padding: 2px 8px;
  }
  .arcade {
    margin-top: 3px;
    padding-bottom: 4px;
  }
  .cap {
    padding-block: 2px;
  }
  .cap h3 {
    font-size: 13px;
  }
  .glass {
    height: clamp(60px, 19.5svh, 99px);
    margin-top: 2px;
  }
  .panel {
    padding: 2px 4px 4px;
    gap: 2px;
  }
  .readout {
    display: flex;
  }
  .readout b,
  .readout span {
    font-size: 9px;
  }
  .action,
  .alternate {
    min-height: 23px;
    font-size: 11px;
  }
  .switches input {
    height: 18px;
  }
  footer {
    min-height: 15px;
    font-size: 9px;
    padding: 2px;
  }
  .wallet b {
    font-size: 14px;
  }
  .field-overlay > div {
    padding: 4px 16px;
  }
  .field-overlay small {
    display: none;
  }
}
