@font-face {
  font-family: LastShiftSC;
  src: url("LastShiftSC.ttf") format("truetype");
  font-display: swap;
}

:root {
  color-scheme: dark;
  --page: #101b20;
  --surface: #18272b;
  --surface-raised: #203237;
  --text: #e9e7dc;
  --muted: #9eaaa4;
  --line: rgba(221, 229, 213, 0.14);
  --signal: #e68664;
  --mint: #86c6b1;
  font-family: LastShiftSC, "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--page);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(rgba(203, 220, 207, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(203, 220, 207, 0.025) 1px, transparent 1px),
    radial-gradient(ellipse at 50% -24%, #344347 0%, var(--page) 62%);
  background-size: 48px 48px, 48px 48px, auto;
}

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 68px;
  padding: 0 clamp(1rem, 4vw, 3.5rem);
  border-bottom: 1px solid var(--line);
  background: rgba(16, 27, 32, 0.78);
}

.back-link,
.platform-label,
.wordmark {
  display: inline-flex;
  align-items: center;
}

.back-link {
  gap: 0.55rem;
  width: fit-content;
  color: var(--muted);
  font-size: 0.88rem;
}

.back-link:hover,
.site-footer a:hover {
  color: var(--text);
}

.wordmark {
  gap: 0.75rem;
  font-size: 0.82rem;
  font-weight: 800;
}

.wordmark-name,
.platform-label,
.eyebrow,
.loading-kicker {
  letter-spacing: 0.14em;
}

.wordmark-divider {
  width: 1px;
  height: 1rem;
  background: var(--signal);
}

.wordmark-cn {
  color: var(--mint);
}

.platform-label {
  justify-self: end;
  gap: 0.55rem;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
}

.status-light,
.objective-mark {
  width: 0.48rem;
  height: 0.48rem;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 14px rgba(230, 134, 100, 0.65);
}

.game-shell {
  width: min(1320px, calc(100% - 3rem));
  margin: 0 auto;
  padding: clamp(2rem, 5vh, 3.75rem) 0 3rem;
}

.game-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: 1.4rem;
}

.eyebrow {
  margin: 0 0 0.8rem;
  color: var(--signal);
  font-size: 0.66rem;
  font-weight: 800;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 2.1rem;
  font-weight: 750;
  line-height: 1.2;
}

h1 span {
  margin-left: 0.55rem;
  color: var(--mint);
  font-size: 0.78em;
  font-weight: 500;
}

.game-summary {
  max-width: 27rem;
  margin: 0 0 0.12rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.75;
}

.game-frame {
  position: relative;
  display: grid;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 72svh;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(134, 198, 177, 0.36);
  background: #080e11;
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.32);
}

#unity-canvas {
  display: block;
  width: 100%;
  height: 100%;
  outline: none;
}

.loading-panel {
  position: absolute;
  display: grid;
  width: min(28rem, calc(100% - 2rem));
  gap: 0.8rem;
  padding: clamp(1.25rem, 4vw, 2rem);
  border: 1px solid var(--line);
  border-top: 2px solid var(--mint);
  background: rgba(20, 34, 38, 0.96);
  text-align: left;
}

.loading-panel[hidden] {
  display: none;
}

.loading-kicker {
  color: var(--mint);
  font-size: 0.62rem;
  font-weight: 800;
}

.loading-panel h2 {
  margin: 0;
  font-size: 1.45rem;
}

.loading-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.loading-panel progress {
  width: 100%;
  height: 5px;
  accent-color: var(--mint);
}

.loading-error {
  border-top-color: var(--signal);
}

.game-toolbar {
  display: flex;
  min-height: 56px;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  border-bottom: 1px solid var(--line);
}

.objective {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--muted);
  font-size: 0.78rem;
}

.objective strong {
  color: var(--text);
  font-weight: 600;
}

.objective-mark {
  width: 0.42rem;
  height: 0.42rem;
}

button {
  display: inline-flex;
  min-height: 2.5rem;
  align-items: center;
  gap: 0.65rem;
  padding: 0 0.9rem;
  border: 1px solid rgba(134, 198, 177, 0.48);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
}

button:hover,
button:focus-visible {
  border-color: var(--mint);
  background: var(--surface-raised);
  outline: none;
}

button span {
  color: var(--mint);
}

.controls {
  display: grid;
  grid-template-columns: minmax(150px, 0.7fr) minmax(0, 2fr) minmax(170px, 0.9fr);
  align-items: center;
  gap: 1.5rem;
  padding: 1.6rem 0 0.5rem;
}

.controls-heading .eyebrow {
  margin-bottom: 0.4rem;
}

.controls-heading h2 {
  margin: 0;
  font-size: 1.05rem;
}

.control-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.1rem;
  margin: 0;
}

.control-list > div {
  display: flex;
  align-items: center;
  gap: 0.45rem;
}

.control-list dt,
.control-list dd {
  margin: 0;
  color: var(--muted);
  font-size: 0.75rem;
}

kbd {
  display: inline-grid;
  min-width: 1.45rem;
  height: 1.5rem;
  place-items: center;
  padding: 0 0.28rem;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.68rem;
}

.control-list dd {
  display: flex;
  gap: 0.2rem;
}

.device-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.6;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 3.5rem);
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.7rem;
}

.footer-separator {
  padding: 0 0.35rem;
  color: var(--signal);
}

@media (max-width: 800px) {
  .game-shell {
    width: min(100% - 2rem, 1320px);
  }

  .game-heading {
    display: grid;
    gap: 0.8rem;
  }

  .game-summary {
    max-width: 42rem;
  }

  .game-frame {
    max-height: none;
  }

  .controls {
    grid-template-columns: 1fr 1fr;
  }

  .device-note {
    grid-column: 2;
  }
}

@media (max-width: 560px) {
  .site-header {
    grid-template-columns: 1fr auto;
    min-height: 60px;
    padding: 0 1rem;
  }

  .wordmark {
    grid-column: 2;
    grid-row: 1;
    font-size: 0.73rem;
  }

  .back-link {
    grid-column: 1;
    grid-row: 1;
  }

  .platform-label {
    display: none;
  }

  .game-shell {
    width: calc(100% - 1.25rem);
    padding-top: 1.6rem;
  }

  h1 {
    font-size: 1.65rem;
  }

  h1 span {
    margin-left: 0.2rem;
  }

  .game-summary {
    font-size: 0.84rem;
  }

  .game-frame {
    aspect-ratio: 16 / 9;
  }

  .game-toolbar {
    align-items: flex-start;
    padding: 0.7rem 0;
  }

  .objective {
    align-items: flex-start;
    flex-wrap: wrap;
    padding-top: 0.5rem;
  }

  .objective strong {
    width: calc(100% - 1.1rem);
    margin-left: 1.1rem;
  }

  .controls {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .control-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.8rem 0.4rem;
  }

  .control-list > div {
    justify-content: space-between;
  }

  .device-note {
    grid-column: 1;
  }
}