* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  min-height: 100%;
  background: #121415;
  color: #e9ebe6;
  font:
    16px/1.4 Inter,
    "Helvetica Neue",
    Arial,
    "PingFang SC",
    sans-serif;
}
body {
  --accent: #ff7950;
  --muted: #a5adaa;
}
button,
a,
input {
  font: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 2px solid #ffa588;
  outline-offset: 3px;
}
[hidden] {
  display: none !important;
}
button:disabled {
  cursor: progress;
}
#entry {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding: 0 clamp(22px, 6vw, 100px);
  overflow: hidden;
  background: radial-gradient(
    ellipse at 68% 48%,
    #393830,
    #151919 61%,
    #111414 88%
  );
}
.entry-art {
  z-index: -2;
  position: absolute;
  inset: 0;
  background: url(maze.webp) no-repeat right center/auto min(100%, 78vw);
  opacity: 0.96;
}
.entry-art:after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      90deg,
      #131616 1%,
      #131616f0 16%,
      #14171795 38%,
      transparent 65%
    ),
    linear-gradient(
      0deg,
      #111515 0,
      transparent 15%,
      transparent 85%,
      #171a1999 100%
    );
}
header,
footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
header {
  height: 92px;
  border-bottom: 1px solid #b6c6bc29;
}
.wordmark,
#language {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}
.wordmark {
  font-weight: 850;
  letter-spacing: 0.055em;
  font-size: 16px;
}
.wordmark img {
  width: 33px;
  height: 33px;
}
#language {
  font-size: 14px;
  padding: 9px 12px;
  border: 1px solid #aeb7ac44;
  border-radius: 3px;
  background: #151919c9;
}
.console {
  margin: auto 0;
  width: min(510px, 100%);
  padding: 50px 0 58px;
}
.kicker {
  font:
    650 13px/1.1 ui-monospace,
    monospace;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: #ff9878;
  margin: 0 0 23px;
}
.kicker:before {
  content: "";
  display: inline-block;
  background: var(--accent);
  width: 24px;
  height: 2px;
  vertical-align: middle;
  margin-right: 10px;
}
h1 {
  font:
    900 clamp(76px, 9.3vw, 152px) / 0.82 Impact,
    "Arial Narrow",
    Inter,
    "Helvetica Neue",
    sans-serif;
  letter-spacing: -0.055em;
  text-transform: uppercase;
  margin: 0 0 25px;
  color: #f1efe6;
}
h1 span {
  color: var(--accent);
}
html[lang="zh-CN"] h1 {
  font-family: "PingFang SC", "Heiti SC", sans-serif;
  font-size: clamp(65px, 8vw, 119px);
  line-height: 0.98;
}
.lead {
  font-size: clamp(16px, 1.45vw, 21px);
  margin: 0 0 41px;
  color: #c9cfca;
}
.field {
  height: 56px;
  display: flex;
  align-items: center;
  background: #202425;
  box-shadow: 0 9px 30px #080b0b60;
  border: 1px solid #707674;
  border-radius: 4px;
  padding: 4px;
  gap: 8px;
}
.field > span {
  display: grid;
  place-items: center;
  width: 32px;
  color: #c0c5bd;
}
label {
  display: block;
  color: #dbe0d9;
  font-weight: 650;
  font-size: 14px;
  margin: 0 0 8px;
}
.field input {
  color: #f3f4ed;
  min-width: 0;
  flex: 1;
  border: 0;
  outline: 0;
  background: none;
  font-size: 16px;
}
.field input::placeholder {
  color: #97a3a0;
}
.field:focus-within {
  border-color: #ff9e7f;
}
.field button,
.modalBtns button:first-child {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 2px;
  background: var(--accent);
  color: #171512;
  font-weight: 760;
  padding: 0 20px;
  min-height: 44px;
}
.field button:disabled {
  background: #dda18a;
}
.field button i {
  display: none;
}
.field button:disabled i {
  display: flex;
  animation: spin 1s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
footer {
  border-top: 1px solid #bbcfc229;
  font:
    12px ui-monospace,
    monospace;
  color: #acb3aa;
  min-height: 68px;
}
.bindings,
.bindings span {
  display: flex;
  align-items: center;
  gap: 20px;
}
.bindings span {
  gap: 7px;
}
.bindings em {
  font-style: normal;
}
.credit {
  opacity: 0.85;
}
#arena {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: #131a1b;
  outline: none;
  touch-action: none;
  user-select: none;
}
#view,
#view canvas,
.vignette {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.vignette {
  pointer-events: none;
  background: radial-gradient(
    ellipse at center,
    transparent 44%,
    #06101059 100%
  );
  box-shadow: inset 0 -80px 110px -80px #05090c;
}
.top {
  position: absolute;
  inset: max(18px, env(safe-area-inset-top)) 22px auto;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  pointer-events: none;
}
.location,
#stats,
#objective,
#exitHint {
  background: #101715df;
  border: 1px solid #b6c6bc45;
  border-radius: 3px;
}
.location {
  padding: 9px 15px;
  display: grid;
  max-width: 65vw;
  min-width: 130px;
}
.location strong {
  font-size: 17px;
}
.location span {
  font-size: 13px;
  color: #bbcac1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.actions {
  display: flex;
  gap: 5px;
  pointer-events: auto;
}
.square {
  width: 44px;
  height: 44px;
  display: inline-grid;
  place-items: center;
  border-radius: 3px;
  border: 1px solid #c0d2c84d;
  background: #111917db;
  color: #e5efe7;
}
#reticle {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translate(-50%, -50%);
  border: 1px solid #faf6eabf;
  border-radius: 50%;
  box-shadow: 0 0 2px #131812;
  pointer-events: none;
}
#reticle i {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #fff8e9;
  left: 6.5px;
  top: 6.5px;
}
#stats {
  position: absolute;
  bottom: 22px;
  left: 22px;
  display: flex;
  gap: 18px;
  padding: 11px 16px;
  align-items: center;
}
#stats small,
#stats b,
#stats strong {
  display: block;
}
#stats small {
  color: #c5cdc6;
  font-size: 12px;
}
#stats b {
  font:
    700 18px ui-monospace,
    monospace;
}
#stats strong {
  font:
    760 23px ui-monospace,
    monospace;
  color: var(--accent);
}
.track {
  background: #46504a;
  width: 110px;
  height: 3px;
}
.track i {
  display: block;
  background: var(--accent);
  height: 100%;
  width: 0;
}
#objective {
  position: absolute;
  bottom: 24px;
  right: 22px;
  padding: 9px 12px;
  font-size: 14px;
}
#exitHint {
  position: absolute;
  top: 19%;
  left: 50%;
  transform: translateX(-50%);
  padding: 5px 11px;
  font:
    600 13px ui-monospace,
    monospace;
  color: #9fffc0;
  border-color: #98deb790;
}
.touch {
  display: none;
}
dialog {
  color: #ebeee8;
  background: #18201f;
  border: 1px solid #67736d;
  border-radius: 6px;
  padding: 26px;
  width: min(90vw, 540px);
  max-height: 90svh;
  overflow: auto;
  box-shadow: 0 30px 80px #050808b0;
}
dialog::backdrop {
  background: #101616bb;
}
dialog h2 {
  margin: 0 0 10px;
  line-height: 1.1;
}
#details {
  color: #c9cfc9;
}
#inspectImage,
#radar {
  width: 100%;
  object-fit: contain;
  max-height: 48vh;
  background: #101614;
}
#sourceLink {
  display: block;
  color: #ffa986;
  margin: 8px 0;
}
.modalBtns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 18px;
}
.modalBtns button {
  min-height: 44px;
  border: 1px solid #859087;
  background: #202a26;
  color: #ebefe8;
  border-radius: 3px;
  padding: 0 18px;
}
#toast {
  position: fixed;
  z-index: 20;
  bottom: 90px;
  left: 50%;
  transform: translateX(-50%);
  text-align: center;
  pointer-events: none;
  max-width: min(480px, 92vw);
}
#toast:not(:empty) {
  background: #18201cf0;
  border: 1px solid #a2ada7;
  border-radius: 4px;
  padding: 12px 18px;
  box-shadow: 0 5px 25px #050a09;
  animation: vanish 3.22s forwards;
}
@keyframes vanish {
  92% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}
@media (max-width: 720px) {
  header {
    height: 64px;
  }
  .console {
    padding: 70px 0 20px;
  }
  .entry-art {
    background-position: 65% -4%;
    background-size: auto 55%;
    opacity: 0.86;
  }
  .entry-art:after {
    background: linear-gradient(
      0deg,
      #131616 11%,
      #131616e8 39%,
      #13161655 63%,
      transparent 80%
    );
  }
  .kicker {
    margin-bottom: 15px;
  }
  .lead {
    margin-bottom: 24px;
  }
  footer {
    align-items: flex-start;
    gap: 9px;
    flex-direction: column;
    justify-content: center;
  }
  .bindings {
    gap: 14px;
  }
  .credit {
    font-size: 11px;
  }
  .field {
    gap: 3px;
  }
  .field button {
    padding: 0 13px;
  }
  .top {
    inset: 10px 10px auto;
  }
  .actions {
    gap: 3px;
  }
  .location {
    max-width: 48vw;
    padding: 7px 10px;
  }
  .location strong {
    font-size: 15px;
  }
  #stats {
    gap: 11px;
    left: 10px;
    bottom: 12px;
    padding: 7px 10px;
  }
  .track {
    width: 72px;
  }
  #objective {
    right: 10px;
    bottom: 12px;
    max-width: 32vw;
    font-size: 12px;
    padding: 6px;
  }
  .wordmark {
    font-size: 14px;
  }
}
@media (pointer: coarse) {
  .touch {
    display: block;
  }
  #stick,
  #trigger {
    position: absolute;
    bottom: max(88px, 15%);
    width: 82px;
    height: 82px;
    border: 1px solid #c5d0c46b;
    border-radius: 50%;
    background: #14201c88;
    touch-action: none;
  }
  #stick {
    left: 24px;
    display: grid;
    place-items: center;
  }
  #stick i {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: #d0dbd078;
  }
  #trigger {
    right: 24px;
    color: #ffe8d3;
    border-color: #ff916b99;
  }
  #trigger svg {
    width: 25px;
    height: 25px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation-duration: 0.01ms !important;
  }
  #toast:not(:empty) {
    animation: none !important;
  }
  .field button:disabled i {
    animation: spin 2s linear infinite !important;
  }
}
#sourceControls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
#sourceControls input {
  flex-basis: 100%;
  min-width: 0;
  padding: 8px;
  color: inherit;
  background: #101513;
  border: 1px solid #607166;
}
#sourceControls a,
#sourceControls span {
  padding: 5px 8px;
  background: #26302b;
  color: #e0e6db;
  border-radius: 2px;
  font-size: 14px;
}
#sourceControls a {
  color: #ffb291;
}
#inspectTouch {
  position: absolute;
  right: 42px;
  bottom: calc(max(88px, 15%) + 94px);
}
#atlas {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  text-align: left;
  margin: 14px 0;
  color: #dbe3d8;
}
#atlas label {
  margin: 0;
}
#atlas small {
  color: #b6c3b8;
  line-height: 1.5;
}
#atlas > div {
  min-width: 0;
  display: flex;
  gap: 8px;
}
#atlas select {
  min-width: 0;
  flex: 1;
  background: #1c2826;
  border: 1px solid #6a7870;
  color: #e1ebe1;
  padding: 0 8px;
  border-radius: 3px;
  font: inherit;
}
#atlas-go {
  border: 1px solid #89978b;
  background: #35423b;
  color: #e8eee5;
  border-radius: 3px;
  min-height: 44px;
  padding: 0 13px;
}
#dialog:has(#atlas:not([hidden])) #radar {
  max-height: 35svh;
  object-fit: contain;
}

.policies { display: flex; gap: 1rem; flex-wrap: wrap; }
.policies a, .policy a { color: inherit; text-underline-offset: .2em; }
.policy main { max-width: 48rem; margin: auto; padding: 2rem clamp(1.2rem, 4vw, 4rem); }
.policy h1 { margin: 2.5rem 0 1rem; font-size: clamp(2rem, 5vw, 3rem); }
.policy p { line-height: 1.75; }
@media (max-width: 640px) { footer { flex-wrap: wrap; gap: .8rem; } }
