@import url("https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@500;600;700;800;900&family=DM+Mono:wght@300;400;500&display=swap");

:root {
  color-scheme: dark;
  --bg: #080a0b;
  --surface: #101315;
  --surface-2: #15191b;
  --line: #2a2f31;
  --muted: #899194;
  --paper: #edf0e9;
  --orange: #ff5a3d;
  --orange-pale: #ff8069;
  --green: #90f29a;
  --font-display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-mono: "DM Mono", ui-monospace, monospace;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 72% 24%, rgba(255, 90, 61, 0.08), transparent 28rem),
    linear-gradient(135deg, #090b0c 0%, #070909 100%);
  color: var(--paper);
  font-family: var(--font-mono);
  -webkit-font-smoothing: antialiased;
}

button,
a {
  color: inherit;
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--paper);
  outline-offset: 3px;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 30;
  opacity: 0.038;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.92' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}

.atmosphere {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.atmosphere span {
  position: absolute;
  width: 1px;
  height: 70px;
  background: linear-gradient(transparent, rgba(255, 111, 84, 0.28), transparent);
  transform: rotate(25deg);
  animation: debris 8s linear infinite;
}

.atmosphere span:nth-child(1) { left: 14%; top: -10%; animation-delay: -3s; }
.atmosphere span:nth-child(2) { left: 46%; top: -15%; animation-delay: -6s; animation-duration: 10s; }
.atmosphere span:nth-child(3) { left: 80%; top: -8%; animation-delay: -1s; animation-duration: 7s; }
.atmosphere span:nth-child(4) { left: 92%; top: -12%; animation-delay: -5s; animation-duration: 11s; }

@keyframes debris {
  to { transform: translate(22vw, 120vh) rotate(25deg); }
}

.icon {
  width: 1.25em;
  height: 1.25em;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.brand-mark .icon {
  fill: currentColor;
  stroke: none;
}

.intro-shell,
.end-shell {
  width: min(1500px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 0 48px;
  display: flex;
  flex-direction: column;
}

.site-header {
  min-height: 94px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  border-bottom: 1px solid var(--line);
}

.brand {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-decoration: none;
  background: none;
  border: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 2px;
  background: var(--orange);
  color: #080a0b;
  transform: skew(-5deg);
}

.brand-mark .icon {
  width: 20px;
  height: 20px;
}

.system-line {
  display: flex;
  align-items: center;
  gap: 9px;
  color: #9ba2a3;
  font-size: 10px;
  letter-spacing: 0.13em;
}

.system-line b {
  margin-left: 12px;
  color: #d9deda;
  font-weight: 500;
}

.pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px rgba(144, 242, 154, 0.75);
  animation: pulse 1.8s ease-in-out infinite;
}

@keyframes pulse {
  50% { opacity: 0.35; }
}

.icon-button {
  justify-self: end;
  width: 39px;
  height: 39px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  background: rgba(15, 18, 19, 0.8);
  color: #aeb4b3;
}

.icon-button:hover {
  color: var(--paper);
  border-color: #5a6162;
}

.hero {
  flex: 1;
  min-height: 650px;
  display: grid;
  grid-template-columns: minmax(460px, 1.06fr) minmax(410px, 0.94fr);
  align-items: center;
  gap: clamp(55px, 8vw, 125px);
  padding: 68px 5vw 65px;
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 13px;
  color: var(--orange-pale);
  font-size: 10px;
  letter-spacing: 0.16em;
}

.eyebrow i {
  width: 30px;
  height: 1px;
  background: #414748;
}

.eyebrow span:last-child {
  color: #b7bdbb;
}

.hero h1,
.end-content h1 {
  margin: 20px 0 25px;
  color: var(--paper);
  font-family: var(--font-display);
  font-size: clamp(76px, 8.1vw, 132px);
  font-weight: 900;
  line-height: 0.78;
  letter-spacing: -0.045em;
}

.hero h1 em,
.end-content h1 em {
  color: transparent;
  font-style: normal;
  -webkit-text-stroke: 1.5px var(--orange);
  text-shadow: 8px 8px 0 rgba(255, 90, 61, 0.075);
}

.hero-lede {
  max-width: 600px;
  margin: 0;
  color: #a6adac;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: 0.015em;
}

.hero-actions {
  display: flex;
  align-items: center;
  gap: 30px;
  margin-top: 37px;
}

.primary-button,
.confirm-button {
  position: relative;
  min-height: 54px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  padding: 0 21px 0 25px;
  border: 0;
  background: var(--orange);
  color: #0b0d0d;
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.08em;
  clip-path: polygon(0 0, 94% 0, 100% 25%, 100% 100%, 0 100%);
  transition: transform 160ms ease, filter 160ms ease;
}

.primary-button::after,
.confirm-button::after {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(8, 10, 11, 0.3);
  pointer-events: none;
  clip-path: inherit;
}

.primary-button:hover,
.confirm-button:not(:disabled):hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
}

.confirm-button:disabled {
  opacity: 0.35;
}

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 0;
  border: 0;
  border-bottom: 1px solid #4b5152;
  background: none;
  color: #aab0af;
  font-size: 10px;
  letter-spacing: 0.12em;
}

.text-button:hover {
  color: var(--paper);
  border-color: var(--paper);
}

.survival-stats {
  max-width: 500px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 53px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.survival-stats div {
  display: flex;
  align-items: center;
  gap: 11px;
  min-height: 43px;
}

.survival-stats div + div {
  padding-left: 24px;
  border-left: 1px solid var(--line);
}

.survival-stats strong {
  font-family: var(--font-display);
  font-size: 31px;
  line-height: 1;
}

.survival-stats span {
  color: #6f7778;
  font-size: 8px;
  line-height: 1.55;
  letter-spacing: 0.12em;
}

.dossier-wrap {
  position: relative;
  width: min(100%, 500px);
  justify-self: center;
}

.dossier-wrap::before {
  content: "";
  position: absolute;
  inset: -35px -50px;
  background:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 25px 25px;
  mask-image: radial-gradient(circle, black, transparent 70%);
}

.orbit {
  position: absolute;
  border: 1px solid rgba(255, 90, 61, 0.16);
  border-radius: 50%;
}

.orbit-one {
  width: 440px;
  height: 440px;
  top: 35px;
  left: 20px;
}

.orbit-two {
  width: 520px;
  height: 520px;
  top: -5px;
  left: -20px;
  border-style: dashed;
  animation: orbit 30s linear infinite;
}

@keyframes orbit {
  to { transform: rotate(360deg); }
}

.dossier {
  position: relative;
  z-index: 2;
  min-height: 550px;
  padding: 24px;
  border: 1px solid #343a3c;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.026), transparent 30%),
    rgba(14, 17, 18, 0.95);
  box-shadow: 0 35px 80px rgba(0, 0, 0, 0.38);
  clip-path: polygon(0 0, calc(100% - 22px) 0, 100% 22px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
}

.dossier-top {
  display: flex;
  justify-content: space-between;
  color: #737b7c;
  font-size: 9px;
  letter-spacing: 0.13em;
}

.dossier-code {
  color: var(--orange);
}

.radar {
  position: relative;
  width: 166px;
  height: 166px;
  margin: 22px auto 19px;
  overflow: hidden;
  border: 1px solid #373e3f;
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 49.5%, #303738 50%, transparent 50.5%),
    linear-gradient(transparent 49.5%, #303738 50%, transparent 50.5%),
    repeating-radial-gradient(circle, transparent 0 26px, rgba(118, 130, 131, 0.24) 27px 28px);
}

.radar-sweep {
  position: absolute;
  inset: 50% 50% 0 0;
  transform-origin: 100% 0;
  background: linear-gradient(135deg, transparent, rgba(255, 90, 61, 0.18));
  animation: sweep 3.5s linear infinite;
}

@keyframes sweep {
  to { transform: rotate(360deg); }
}

.radar-core {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--orange);
}

.radar-core .icon {
  width: 34px;
  height: 34px;
}

.radar-point {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 9px var(--orange);
}

.p1 { left: 30px; top: 70px; }
.p2 { right: 36px; top: 40px; animation: pulse 1.2s infinite; }
.p3 { right: 49px; bottom: 29px; }

.incident-list {
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid #2e3435;
}

.incident-list li {
  min-height: 52px;
  display: grid;
  grid-template-columns: 28px 35px 1fr 30px;
  align-items: center;
  gap: 9px;
  border-bottom: 1px solid #282d2f;
}

.incident-number {
  color: #555d5e;
  font-size: 9px;
}

.incident-icon {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  color: var(--mission-accent);
}

.mission-glyph {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mission-glyph .hot {
  stroke: var(--orange);
}

.incident-list b {
  display: block;
  color: #dfe3de;
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.1em;
}

.incident-list small {
  display: block;
  margin-top: 2px;
  color: #6e7677;
  font-size: 7px;
  text-transform: uppercase;
}

.incident-list li > i {
  width: 22px;
  height: 2px;
  background: linear-gradient(90deg, var(--mission-accent) 0 55%, #333839 55%);
}

.dossier-stamp {
  position: absolute;
  right: 25px;
  top: 235px;
  padding: 5px 9px;
  border: 1px solid rgba(255, 90, 61, 0.32);
  color: rgba(255, 111, 84, 0.42);
  font-family: var(--font-display);
  font-size: 8px;
  line-height: 1;
  letter-spacing: 0.16em;
  text-align: center;
  transform: rotate(-7deg);
}

.dossier-stamp b {
  font-size: 10px;
}

.briefing-panel {
  display: grid;
  grid-template-columns: 1.2fr repeat(3, 1fr);
  gap: 30px;
  margin: 0 5vw 55px;
  padding: 35px;
  border: 1px solid var(--line);
  background: #0d1011;
}

.briefing-panel[hidden] {
  display: none;
}

.briefing-panel h2 {
  max-width: 300px;
  margin: 13px 0 0;
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1;
  text-transform: uppercase;
}

.briefing-step {
  padding-left: 22px;
  border-left: 1px solid var(--line);
}

.briefing-step b {
  color: var(--orange);
  font-family: var(--font-display);
  font-size: 34px;
}

.briefing-step span {
  display: block;
  margin-top: 7px;
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 0.08em;
}

.briefing-step p {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.6;
}

.intro-footer {
  min-height: 48px;
  display: grid;
  grid-template-columns: 120px 1fr auto;
  align-items: center;
  gap: 28px;
  overflow: hidden;
  border-top: 1px solid var(--line);
  color: #656d6e;
  font-size: 8px;
  letter-spacing: 0.13em;
}

.footer-label {
  align-self: stretch;
  display: grid;
  place-items: center;
  margin-left: -48px;
  padding-left: 48px;
  background: var(--orange);
  color: #101212;
  font-weight: 700;
}

.ticker {
  display: flex;
  gap: 12px;
  white-space: nowrap;
  color: #3e4546;
}

.ticker span {
  color: #929a9a;
}

/* Game shell */
.game-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background:
    linear-gradient(rgba(255, 255, 255, 0.015) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.015) 1px, transparent 1px);
  background-size: 36px 36px;
}

.game-header {
  height: 74px;
  display: grid;
  grid-template-columns: 250px 1fr 250px;
  align-items: center;
  padding: 0 28px;
  border-bottom: 1px solid var(--line);
  background: rgba(8, 10, 11, 0.96);
}

.game-brand {
  padding: 0;
}

.mission-readout {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 13px;
  color: #687071;
  font-size: 8px;
  letter-spacing: 0.14em;
}

.mission-readout b {
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 15px;
  letter-spacing: 0.1em;
}

.game-tools {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 20px;
}

.network-status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #707879;
  font-size: 8px;
  letter-spacing: 0.11em;
}

.network-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
}

.game-grid {
  flex: 1;
  display: grid;
  grid-template-columns: 230px minmax(560px, 1fr) 230px;
  min-height: 0;
}

.progress-rail,
.status-rail {
  background: rgba(10, 12, 13, 0.92);
}

.progress-rail {
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
}

.rail-title {
  height: 66px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  color: #6c7475;
  font-size: 8px;
  letter-spacing: 0.13em;
}

.rail-title b {
  color: #b8bdbb;
  font-weight: 400;
}

.progress-rail ol {
  margin: 0;
  padding: 15px 0;
  list-style: none;
}

.progress-rail li {
  position: relative;
  min-height: 70px;
  display: grid;
  grid-template-columns: 29px 31px 1fr;
  align-items: center;
  gap: 8px;
  padding: 0 17px;
  opacity: 0.38;
}

.progress-rail li::before {
  content: "";
  position: absolute;
  left: 31px;
  top: 49px;
  width: 1px;
  height: 42px;
  background: #353a3b;
}

.progress-rail li:last-child::before {
  display: none;
}

.progress-rail li.active,
.progress-rail li.done,
.progress-rail li.failed {
  opacity: 1;
}

.progress-rail li.active {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.04), transparent);
}

.progress-rail li.active::after {
  content: "";
  position: absolute;
  left: 0;
  width: 3px;
  height: 44px;
  background: var(--mission-accent);
  box-shadow: 0 0 16px var(--mission-accent);
}

.rail-node {
  position: relative;
  z-index: 1;
  width: 29px;
  height: 29px;
  display: grid;
  place-items: center;
  border: 1px solid #3a4041;
  border-radius: 50%;
  background: #0c0f10;
  color: #697172;
  font-size: 8px;
}

.active .rail-node {
  border-color: var(--mission-accent);
  color: var(--mission-accent);
}

.done .rail-node {
  border-color: #5aa866;
  background: #17351d;
  color: #8ee298;
}

.failed .rail-node {
  border-color: #9b3d32;
  background: #361713;
  color: #ff6c57;
}

.rail-node .icon {
  width: 13px;
}

.rail-glyph {
  color: var(--mission-accent);
}

.rail-glyph .mission-glyph {
  width: 20px;
}

.progress-rail li b {
  display: block;
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.progress-rail li small {
  color: #5f6768;
  font-size: 6px;
  letter-spacing: 0.13em;
}

.active small {
  color: var(--mission-accent) !important;
}

.rail-coordinates {
  margin-top: auto;
  padding: 19px 22px;
  border-top: 1px solid var(--line);
  color: #495051;
  font-size: 7px;
  line-height: 2;
  letter-spacing: 0.09em;
}

.rail-coordinates span {
  display: block;
}

.status-rail {
  border-left: 1px solid var(--line);
}

.status-block {
  padding: 23px 21px;
  border-bottom: 1px solid var(--line);
}

.status-label {
  display: block;
  margin-bottom: 13px;
  color: #656d6e;
  font-size: 7px;
  letter-spacing: 0.14em;
}

.life-meter {
  display: flex;
  gap: 8px;
}

.life-meter span {
  width: 38px;
  height: 27px;
  display: grid;
  place-items: center;
  border: 1px solid #343a3b;
  color: #343a3b;
}

.life-meter span.full {
  border-color: rgba(255, 90, 61, 0.4);
  background: rgba(255, 90, 61, 0.08);
  color: var(--orange);
}

.life-meter .icon {
  width: 14px;
}

.status-block.split {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 13px;
}

.status-block.split > div + div {
  padding-left: 13px;
  border-left: 1px solid var(--line);
}

.status-block.split b {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: 0.05em;
}

.field-note {
  margin: 22px 18px;
  padding: 18px;
  border: 1px solid #303637;
  border-top: 2px solid var(--note-accent);
  background: #111516;
}

.field-note > div {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--note-accent);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.field-note p {
  margin: 13px 0 0;
  color: #8c9494;
  font-size: 9px;
  line-height: 1.65;
}

.risk-card {
  margin: 22px 18px;
  color: #606869;
  font-size: 7px;
  letter-spacing: 0.13em;
}

.risk-card b {
  display: block;
  margin: 7px 0 12px;
  color: var(--orange);
  font-family: var(--font-display);
  font-size: 16px;
}

.risk-card div {
  display: flex;
  gap: 4px;
}

.risk-card i {
  width: 27px;
  height: 3px;
  background: var(--orange);
}

.risk-card i.on {
  background: #3a3f40;
}

.mission-panel {
  width: min(100%, 910px);
  margin: 0 auto;
  padding: 30px clamp(24px, 4.5vw, 70px) 40px;
  overflow: auto;
}

.mission-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 23px;
  border-bottom: 1px solid var(--line);
}

.mission-identity {
  display: flex;
  align-items: center;
  gap: 17px;
}

.mission-badge {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--accent), transparent 48%);
  background: color-mix(in srgb, var(--accent), transparent 91%);
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  clip-path: polygon(0 0, 82% 0, 100% 18%, 100% 100%, 0 100%);
}

.mission-identity span {
  color: var(--accent);
  font-size: 7px;
  letter-spacing: 0.16em;
}

.mission-identity h2 {
  margin: 4px 0 0;
  font-family: var(--font-display);
  font-size: clamp(25px, 3vw, 36px);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.015em;
}

.timer-unit {
  position: relative;
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
}

.timer-ring {
  position: absolute;
  inset: 0;
  width: 62px;
  height: 62px;
  transform: rotate(-90deg);
}

.timer-ring circle {
  fill: none;
  stroke: #2c3132;
  stroke-width: 2;
}

.timer-ring .timer-arc {
  stroke: var(--accent);
  stroke-dasharray: 125.66;
  stroke-dashoffset: 0;
  stroke-linecap: square;
  transition: stroke-dashoffset 0.3s linear;
}

.timer-unit > div {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.timer-unit b {
  font-family: var(--font-display);
  font-size: 23px;
  line-height: 1;
}

.timer-unit span {
  margin-top: 2px;
  color: #697172;
  font-size: 6px;
  letter-spacing: 0.12em;
}

.timer-unit.urgent {
  color: #ff4b39;
  animation: timer-alert 0.6s ease-in-out infinite alternate;
}

@keyframes timer-alert {
  to { transform: scale(1.06); }
}

.dispatch {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 18px;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}

.dispatch > span {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--accent);
  font-size: 8px;
  letter-spacing: 0.12em;
}

.dispatch p {
  margin: 0;
  color: #a3aaaa;
  font-family: var(--font-display);
  font-size: 17px;
  line-height: 1.35;
}

.puzzle-heading {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 23px 0 18px;
}

.step-tag {
  flex: 0 0 auto;
  padding: 5px 7px;
  background: var(--accent);
  color: #0b0d0d;
  font-size: 7px;
  font-weight: 500;
  letter-spacing: 0.1em;
}

.puzzle-heading p {
  margin: 0;
  color: #d7dcd8;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
}

.puzzle-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 18px;
}

.puzzle-actions p {
  margin: 0;
  color: #656d6e;
  font-size: 8px;
}

.secondary-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 0 16px;
  border: 1px solid #373d3e;
  background: #121516;
  color: #929999;
  font-size: 8px;
  letter-spacing: 0.1em;
}

.secondary-button:hover {
  border-color: #747b7b;
  color: var(--paper);
}

.confirm-button {
  min-height: 45px;
  gap: 20px;
  padding: 0 18px 0 21px;
  background: var(--accent);
  font-size: 11px;
}

.confirm-button .icon {
  width: 16px;
}

/* Quake puzzle */
.sequence-slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-bottom: 12px;
}

.sequence-slots div {
  min-height: 53px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 13px;
  border: 1px dashed #353b3c;
  color: #555d5e;
}

.sequence-slots div.filled {
  border-style: solid;
  border-color: color-mix(in srgb, var(--accent), transparent 55%);
  background: color-mix(in srgb, var(--accent), transparent 94%);
  color: var(--paper);
}

.sequence-slots span {
  color: var(--accent);
  font-size: 8px;
}

.sequence-slots b {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.action-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.action-card {
  min-height: 78px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px;
  border: 1px solid #303637;
  background: #111415;
  text-align: left;
  transition: border 150ms, background 150ms, transform 150ms;
}

.action-card:hover:not(:disabled) {
  border-color: var(--accent);
  transform: translateY(-1px);
}

.action-card.selected {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent), transparent 91%);
  opacity: 0.55;
}

.action-card > span {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid #343a3b;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 22px;
}

.action-card b {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Fire map */
.map-key {
  display: flex;
  align-items: center;
  gap: 17px;
  margin-bottom: 10px;
  color: #697172;
  font-size: 7px;
  letter-spacing: 0.1em;
}

.map-key span {
  display: flex;
  align-items: center;
  gap: 6px;
}

.map-key i {
  width: 8px;
  height: 8px;
  display: inline-block;
  border: 1px solid #4a5152;
}

.map-key i.smoke { background: #414a4c; }
.map-key i.fire { background: var(--orange); border-color: var(--orange); }
.map-key b { margin-left: auto; color: var(--accent); }

.fire-grid {
  display: grid;
  grid-template-columns: repeat(var(--cols), 1fr);
  gap: 4px;
  padding: 10px;
  border: 1px solid #313738;
  background: #0d1011;
}

.map-cell {
  position: relative;
  aspect-ratio: 1.34;
  min-height: 43px;
  overflow: hidden;
  border: 1px solid #2c3233;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.02), transparent),
    #15191a;
  color: #667071;
}

.map-cell:not(:disabled):hover {
  border-color: var(--accent);
}

.map-cell.smoke {
  background: #252b2d;
}

.map-cell.fire {
  background: radial-gradient(circle, rgba(255, 104, 54, 0.38), #311611 65%);
  color: var(--orange);
  opacity: 0.85;
}

.map-cell.fire .mission-glyph {
  width: 26px;
  height: 26px;
  fill: rgba(255, 90, 61, 0.13);
}

.map-cell.start,
.map-cell.exit {
  background: #17251b;
  border-color: #4f8757;
  color: #a5e8ad;
}

.map-cell.exit {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.map-cell b {
  font-size: 7px;
  letter-spacing: 0.08em;
}

.map-cell.path {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent), transparent 87%);
  box-shadow: inset 0 0 14px color-mix(in srgb, var(--accent), transparent 83%);
}

.map-cell.path > span {
  width: 17px;
  height: 17px;
  display: grid;
  place-items: center;
  margin: auto;
  border-radius: 50%;
  background: var(--accent);
  color: #101212;
  font-size: 7px;
}

.smoke-lines,
.smoke-lines::before,
.smoke-lines::after {
  position: absolute;
  left: 25%;
  width: 50%;
  height: 1px;
  content: "";
  background: #5c6668;
}

.smoke-lines { top: 50%; }
.smoke-lines::before { left: 10%; top: -7px; width: 80%; }
.smoke-lines::after { left: 18%; top: 7px; width: 65%; }

/* Flood loadout */
.weight-readout {
  display: grid;
  grid-template-columns: 105px 1fr 85px;
  align-items: center;
  gap: 14px;
  margin-bottom: 11px;
  padding: 10px 15px;
  border: 1px solid #303637;
  background: #101415;
}

.weight-readout > div:first-child,
.weight-readout > div:last-child {
  display: flex;
  align-items: baseline;
  gap: 7px;
}

.weight-readout span {
  color: #687071;
  font-size: 6px;
}

.weight-readout b {
  font-family: var(--font-display);
  font-size: 21px;
}

.weight-readout small {
  margin-left: 2px;
  color: #6c7475;
  font-size: 7px;
}

.weight-track {
  position: relative;
  height: 7px;
  background: #252b2c;
}

.weight-track i {
  display: block;
  height: 100%;
  background: var(--accent);
  transition: width 200ms;
}

.weight-track em {
  position: absolute;
  top: -4px;
  width: 1px;
  height: 15px;
  background: var(--paper);
}

.weight-readout.over .weight-track i { background: var(--orange); }
.weight-readout.over > div:first-child b { color: var(--orange); }
.weight-readout.exact .weight-track i { background: var(--green); }

.loadout-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
}

.loadout-card {
  min-height: 62px;
  display: grid;
  grid-template-columns: 34px 1fr 23px;
  align-items: center;
  gap: 9px;
  padding: 9px;
  border: 1px solid #303637;
  background: #111516;
  text-align: left;
}

.loadout-card:hover,
.loadout-card.selected {
  border-color: var(--accent);
}

.loadout-card.selected {
  background: color-mix(in srgb, var(--accent), transparent 92%);
}

.loadout-card.priority::before {
  content: "";
  position: absolute;
}

.loadout-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid #363d3e;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 19px;
}

.loadout-card b {
  display: block;
  font-family: var(--font-display);
  font-size: 12px;
  text-transform: uppercase;
}

.loadout-card small {
  display: block;
  margin-top: 3px;
  color: #626a6b;
  font-size: 6px;
}

.loadout-card > i {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 1px solid #3a4041;
  color: #656d6e;
  font-style: normal;
}

.loadout-card.selected > i {
  border-color: var(--accent);
  background: var(--accent);
  color: #101212;
}

.loadout-card > i .icon { width: 12px; }

/* Signal */
.signal-console {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  gap: 12px;
  padding: 13px;
  border: 1px solid #313738;
  background: #0d1011;
}

.signal-screen {
  min-height: 250px;
  padding: 20px;
  border: 1px solid #363d3e;
  background:
    linear-gradient(rgba(178, 140, 255, 0.04) 1px, transparent 1px),
    #0c0e11;
  background-size: 100% 10px;
}

.signal-bars {
  height: 100px;
  display: flex;
  align-items: center;
  gap: 4px;
  opacity: 0.72;
}

.signal-bars i {
  flex: 1;
  height: var(--h);
  background: var(--accent);
  animation: signal-bars 1.5s ease-in-out infinite alternate;
}

.signal-bars i:nth-child(3n) { animation-delay: -0.5s; }
.signal-bars i:nth-child(4n) { animation-delay: -1s; }

@keyframes signal-bars {
  to { height: 20%; opacity: 0.35; }
}

.signal-status {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-top: 15px;
}

.signal-status > span {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #737b7c;
  font-size: 7px;
}

.signal-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #555d5e;
}

.signal-status i.live {
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.signal-status b {
  font-family: var(--font-display);
  font-size: 28px;
}

.signal-status b span {
  color: #687071;
  font-size: 8px;
}

.signal-memory {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 5px;
  margin-top: 15px;
}

.signal-memory span {
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid #303637;
  color: #484f50;
}

.signal-memory span.filled {
  border-color: var(--accent);
  color: var(--accent);
}

.signal-controls {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: 54px 54px 1fr;
  gap: 6px;
}

.signal-key {
  border: 1px solid #363d3e;
  background: #15191a;
  color: #8c9494;
  font-family: var(--font-display);
  font-size: 25px;
}

.signal-key:not(:disabled):hover,
.signal-key.transmitting {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent), transparent 82%);
  color: var(--paper);
  box-shadow: 0 0 20px color-mix(in srgb, var(--accent), transparent 70%);
}

.signal-key:disabled:not(.transmitting) {
  opacity: 0.35;
}

.key-up { grid-column: 2; }
.key-left { grid-row: 2; grid-column: 1; }
.key-right { grid-row: 2; grid-column: 3; }
.key-down { grid-row: 2; grid-column: 2; }

.play-signal {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 15px;
  border: 1px solid color-mix(in srgb, var(--accent), transparent 55%);
  background: color-mix(in srgb, var(--accent), transparent 90%);
  color: var(--accent);
  font-size: 8px;
  letter-spacing: 0.09em;
}

.play-signal:hover:not(:disabled) {
  background: color-mix(in srgb, var(--accent), transparent 84%);
}

.keyboard-note {
  margin: 8px 0 0;
  color: #505859;
  font-size: 7px;
}

/* Tornado */
.deduction-layout {
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 10px;
}

.safety-rules {
  padding: 16px;
  border: 1px solid #373d3e;
  background: #101415;
}

.safety-rules > span,
.cipher-clues > span {
  color: var(--accent);
  font-size: 7px;
  letter-spacing: 0.12em;
}

.safety-rules ol {
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.safety-rules li {
  display: grid;
  grid-template-columns: 21px 1fr;
  gap: 8px;
  padding: 9px 0;
  border-top: 1px solid #2c3233;
  color: #8d9595;
  font-size: 8px;
  line-height: 1.5;
}

.safety-rules li b {
  color: var(--accent);
  font-size: 7px;
}

.room-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.room-card {
  position: relative;
  min-height: 69px;
  display: grid;
  grid-template-columns: 36px 1fr;
  grid-template-rows: auto auto;
  align-content: center;
  gap: 2px 10px;
  padding: 10px;
  border: 1px solid #303637;
  background: #111516;
  text-align: left;
}

.room-card:hover,
.room-card.selected {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent), transparent 93%);
}

.room-card > span {
  grid-row: 1 / 3;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid #3b4243;
  color: var(--accent);
  font-family: var(--font-display);
  font-size: 20px;
}

.room-card b {
  align-self: end;
  font-family: var(--font-display);
  font-size: 12px;
  text-transform: uppercase;
}

.room-card small {
  align-self: start;
  color: #697172;
  font-size: 6px;
}

.room-card > i {
  position: absolute;
  top: 7px;
  right: 7px;
  color: var(--accent);
}

.room-card > i .icon {
  width: 12px;
}

/* Volcano */
.cipher-layout {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 12px;
}

.cipher-clues,
.keypad-console {
  padding: 17px;
  border: 1px solid #343a3b;
  background: #101415;
}

.cipher-clues ol {
  margin: 13px 0 0;
  padding: 0;
  list-style: none;
}

.cipher-clues li {
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  gap: 12px;
  min-height: 47px;
  border-top: 1px solid #2d3334;
}

.cipher-clues li b {
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--font-display);
}

.cipher-clues li p {
  margin: 0;
  color: #949c9c;
  font-size: 8px;
  line-height: 1.45;
}

.cipher-clues em {
  color: var(--paper);
  font-style: normal;
}

.keypad-console {
  padding: 12px;
}

.code-display {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 9px;
}

.code-display span {
  height: 45px;
  display: grid;
  place-items: center;
  border: 1px solid #343a3b;
  background: #0b0e0f;
  color: #4e5556;
  font-family: var(--font-display);
  font-size: 24px;
}

.code-display span.filled {
  border-color: var(--accent);
  color: var(--accent);
}

.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}

.keypad button {
  min-height: 34px;
  border: 1px solid #343a3b;
  background: #15191a;
  color: #a1a8a7;
  font-family: var(--font-display);
  font-size: 15px;
}

.keypad button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.keypad button:nth-child(10),
.keypad button:nth-child(12) {
  color: #747c7d;
  font-size: 8px;
}

.confirm-button.full {
  width: 100%;
  margin-top: 8px;
}

/* Mission result */
.result-card {
  min-height: 365px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 28px;
  border: 1px solid #343a3b;
  background:
    radial-gradient(circle at 50% 30%, rgba(144, 242, 154, 0.08), transparent 40%),
    #0e1112;
  text-align: center;
}

.result-card.failure {
  background:
    radial-gradient(circle at 50% 30%, rgba(255, 90, 61, 0.1), transparent 40%),
    #0e1112;
}

.result-symbol {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin-bottom: 16px;
  border: 1px solid #4f8e57;
  color: var(--green);
  transform: rotate(45deg);
}

.result-symbol .icon {
  width: 28px;
  transform: rotate(-45deg);
}

.failure .result-symbol {
  border-color: #a34034;
  color: var(--orange);
}

.result-card > span {
  color: var(--green);
  font-size: 8px;
  letter-spacing: 0.14em;
}

.failure > span {
  color: var(--orange);
}

.result-card h3 {
  margin: 8px 0;
  font-family: var(--font-display);
  font-size: 31px;
  text-transform: uppercase;
}

.result-card > p {
  margin: 0;
  color: #858d8e;
  font-size: 9px;
}

.result-stats {
  min-width: min(100%, 430px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 23px 0;
  border-top: 1px solid #2c3233;
  border-bottom: 1px solid #2c3233;
}

.result-stats div {
  padding: 13px;
}

.result-stats div + div {
  border-left: 1px solid #2c3233;
}

.result-stats span {
  display: block;
  margin-bottom: 5px;
  color: #596162;
  font-size: 6px;
  letter-spacing: 0.12em;
}

.result-stats b {
  font-family: var(--font-display);
  font-size: 21px;
}

.result-stats small {
  margin-left: 3px;
  color: #697172;
  font-size: 7px;
}

.result-button {
  background: var(--green);
}

.failure .result-button {
  background: var(--orange);
}

.game-footer {
  height: 35px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 20px;
  padding: 0 24px;
  border-top: 1px solid var(--line);
  background: #080a0b;
  color: #454c4d;
  font-size: 6px;
  letter-spacing: 0.13em;
}

.game-footer span:last-child {
  justify-self: end;
}

.game-footer div {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #6a7273;
}

.game-footer i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--orange);
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 52px;
  z-index: 20;
  max-width: calc(100vw - 32px);
  padding: 12px 18px;
  border: 1px solid #3f884a;
  background: #132b17;
  color: #a8edb0;
  font-size: 8px;
  letter-spacing: 0.1em;
  opacity: 0;
  transform: translate(-50%, 15px);
  pointer-events: none;
  transition: opacity 180ms, transform 180ms;
}

.toast.bad {
  border-color: #9e4034;
  background: #331713;
  color: #ff8d7c;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* End screen */
.end-shell {
  background: radial-gradient(circle at 50% 35%, rgba(144, 242, 154, 0.06), transparent 35rem);
}

.end-shell.lost {
  background: radial-gradient(circle at 50% 35%, rgba(255, 90, 61, 0.08), transparent 35rem);
}

.end-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 55px 20px;
  text-align: center;
}

.end-signal {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  margin-bottom: 18px;
  border: 1px solid var(--green);
  color: var(--green);
  transform: rotate(45deg);
}

.lost .end-signal {
  border-color: var(--orange);
  color: var(--orange);
}

.end-signal .icon {
  width: 27px;
  transform: rotate(-45deg);
}

.end-content h1 {
  margin: 15px 0 17px;
  font-size: clamp(68px, 7vw, 105px);
}

.end-content > p {
  max-width: 600px;
  margin: 0;
  color: #9ca3a2;
  font-family: var(--font-display);
  font-size: 18px;
  line-height: 1.45;
}

.final-score {
  display: grid;
  grid-template-columns: auto auto auto;
  align-items: center;
  gap: 22px;
  margin: 25px 0;
  padding: 15px 21px;
  border: 1px solid #33393a;
  background: #0e1112;
}

.final-score span {
  color: #687071;
  font-size: 7px;
}

.final-score b {
  font-family: var(--font-display);
  font-size: 31px;
}

.final-score i {
  padding: 7px 9px;
  background: var(--green);
  color: #0a0c0c;
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 800;
}

.lost .final-score i {
  background: var(--orange);
}

.report-grid {
  width: min(100%, 760px);
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
}

.report-grid > div {
  min-height: 94px;
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: 31px auto auto;
  align-items: center;
  gap: 2px 6px;
  padding: 10px;
  border: 1px solid #303637;
  background: #101415;
  text-align: left;
}

.report-grid > div > span {
  color: var(--mission-accent);
}

.report-grid small {
  justify-self: end;
  color: #596162;
  font-size: 7px;
}

.report-grid b,
.report-grid i {
  grid-column: 1 / -1;
}

.report-grid b {
  font-family: var(--font-display);
  font-size: 10px;
}

.report-grid i {
  color: var(--green);
  font-size: 6px;
  font-style: normal;
  letter-spacing: 0.1em;
}

.report-grid .missed {
  opacity: 0.45;
}

.report-grid .missed i {
  color: var(--orange);
}

.end-actions {
  display: flex;
  align-items: center;
  gap: 28px;
  margin-top: 28px;
}

@media (max-width: 1150px) {
  .hero {
    gap: 40px;
    padding-inline: 2vw;
  }

  .game-grid {
    grid-template-columns: 185px minmax(500px, 1fr) 185px;
  }

  .progress-rail li {
    grid-template-columns: 29px 1fr;
  }

  .rail-glyph {
    display: none;
  }

  .life-meter span {
    width: 32px;
  }

  .field-note,
  .risk-card {
    margin-inline: 13px;
  }
}

@media (max-width: 900px) {
  .intro-shell,
  .end-shell {
    padding: 0 26px;
  }

  .hero {
    grid-template-columns: 1fr;
    padding: 65px 4vw 80px;
  }

  .hero-copy {
    max-width: 680px;
  }

  .dossier-wrap {
    width: min(100%, 540px);
  }

  .briefing-panel {
    grid-template-columns: 1fr;
    margin-inline: 4vw;
  }

  .briefing-step {
    padding: 16px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .game-header {
    grid-template-columns: 1fr auto;
  }

  .mission-readout {
    display: none;
  }

  .game-grid {
    grid-template-columns: 1fr;
  }

  .progress-rail {
    order: 0;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .progress-rail .rail-title,
  .rail-coordinates {
    display: none;
  }

  .progress-rail ol {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    padding: 7px 16px;
  }

  .progress-rail li {
    min-height: 46px;
    display: flex;
    justify-content: center;
    padding: 0;
  }

  .progress-rail li::before {
    left: calc(50% + 14px);
    top: 23px;
    width: calc(100% - 28px);
    height: 1px;
  }

  .progress-rail li::after,
  .progress-rail li > span:not(.rail-node) {
    display: none;
  }

  .mission-panel {
    order: 1;
    min-height: calc(100vh - 155px);
  }

  .status-rail {
    order: 2;
    display: grid;
    grid-template-columns: 1fr 1.3fr 1.5fr;
    border-top: 1px solid var(--line);
    border-left: 0;
  }

  .status-block {
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .field-note {
    margin: 0;
    border: 0;
    border-top: 2px solid var(--note-accent);
  }

  .risk-card {
    display: none;
  }

  .game-footer {
    display: none;
  }

  .footer-label {
    margin-left: -26px;
    padding-left: 26px;
  }
}

@media (max-width: 620px) {
  .intro-shell,
  .end-shell {
    padding: 0 18px;
  }

  .site-header {
    grid-template-columns: 1fr auto;
    min-height: 72px;
  }

  .system-line {
    display: none;
  }

  .hero {
    min-height: auto;
    padding: 54px 0 75px;
  }

  .hero h1 {
    font-size: clamp(62px, 21vw, 95px);
  }

  .hero-lede {
    font-size: 18px;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
    gap: 14px;
  }

  .primary-button {
    width: 100%;
  }

  .text-button {
    align-self: flex-start;
  }

  .survival-stats div + div {
    padding-left: 11px;
  }

  .survival-stats strong {
    font-size: 24px;
  }

  .dossier {
    padding: 18px;
  }

  .orbit {
    display: none;
  }

  .briefing-panel {
    margin-inline: 0;
  }

  .intro-footer {
    grid-template-columns: 95px 1fr;
  }

  .intro-footer > span:last-child {
    display: none;
  }

  .game-header {
    height: 62px;
    padding: 0 16px;
  }

  .network-status {
    display: none;
  }

  .game-tools {
    gap: 8px;
  }

  .game-brand .brand-mark {
    width: 30px;
    height: 30px;
  }

  .progress-rail ol {
    padding-inline: 8px;
  }

  .mission-panel {
    min-height: auto;
    padding: 23px 16px 35px;
  }

  .mission-identity {
    gap: 10px;
  }

  .mission-badge {
    width: 40px;
    height: 44px;
  }

  .mission-identity h2 {
    font-size: 23px;
  }

  .timer-unit,
  .timer-ring {
    width: 54px;
    height: 54px;
  }

  .dispatch {
    grid-template-columns: 1fr;
    gap: 9px;
  }

  .puzzle-heading {
    align-items: flex-start;
  }

  .sequence-slots {
    grid-template-columns: 1fr;
  }

  .sequence-slots div {
    min-height: 42px;
  }

  .action-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .fire-grid {
    gap: 3px;
    padding: 5px;
  }

  .map-cell {
    min-height: 38px;
    aspect-ratio: 1;
  }

  .map-cell b {
    font-size: 5px;
  }

  .weight-readout {
    grid-template-columns: 76px 1fr 63px;
    padding-inline: 8px;
  }

  .weight-readout > div:first-child,
  .weight-readout > div:last-child {
    display: block;
  }

  .loadout-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .signal-console,
  .cipher-layout {
    grid-template-columns: 1fr;
  }

  .signal-screen {
    min-height: 205px;
  }

  .signal-controls {
    grid-template-rows: 46px 46px 58px;
  }

  .deduction-layout {
    grid-template-columns: 1fr;
  }

  .safety-rules ol {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0 10px;
  }

  .room-grid {
    grid-template-columns: 1fr;
  }

  .puzzle-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .puzzle-actions .confirm-button {
    width: 100%;
  }

  .status-rail {
    grid-template-columns: 1fr 1fr;
  }

  .field-note {
    grid-column: 1 / -1;
  }

  .report-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .end-content {
    padding-inline: 0;
  }

  .end-content h1 {
    font-size: 58px;
  }

  .final-score {
    gap: 12px;
  }

  .end-actions {
    width: 100%;
    flex-direction: column;
    gap: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
