:root {
  color-scheme: dark;
  --bg: #09121d;
  --bg-deep: #050b13;
  --panel: rgba(9, 21, 34, 0.9);
  --panel-strong: rgba(7, 17, 28, 0.96);
  --panel-soft: rgba(15, 29, 46, 0.8);
  --line: rgba(148, 201, 223, 0.18);
  --line-strong: rgba(148, 201, 223, 0.32);
  --text: #eef5f8;
  --muted: #98b3c6;
  --accent: #ff8a4c;
  --accent-2: #5ae5d2;
  --accent-3: #ff6a61;
  --accent-4: #ffe09d;
  --shadow: 0 28px 70px rgba(2, 8, 15, 0.42);
  --shadow-soft: 0 14px 32px rgba(2, 8, 15, 0.28);
  --radius-xl: 30px;
  --radius-lg: 22px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --font-body: "Bahnschrift", "Segoe UI Variable Text", "Trebuchet MS", sans-serif;
  --font-display: "Segoe UI Variable Display", "Franklin Gothic Medium", "Bahnschrift", sans-serif;
  --theme-sky-top: #586f8e;
  --theme-sky-bottom: #e1a56f;
  --theme-haze: rgba(255, 160, 97, 0.28);
  --theme-floor: #726050;
  --theme-floor-line: rgba(255, 242, 214, 0.16);
  --theme-wall-left: #5f544c;
  --theme-wall-right: #8e7862;
  --theme-gate: #25384b;
  --theme-gate-glow: #ff9853;
  --theme-hud: rgba(10, 20, 32, 0.84);
  --reticle-x: 50%;
  --reticle-y: 58%;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  background:
    radial-gradient(circle at top left, rgba(90, 229, 210, 0.16), transparent 24%),
    radial-gradient(circle at top right, rgba(255, 138, 76, 0.18), transparent 26%),
    linear-gradient(180deg, #0a1421 0%, #060d17 48%, #050910 100%);
  color: var(--text);
  font-family: var(--font-body);
}

body {
  min-height: 100dvh;
}

button,
input,
textarea,
select {
  font: inherit;
}

button {
  cursor: pointer;
  border: 0;
  touch-action: manipulation;
}

input,
textarea,
select {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(156, 210, 231, 0.18);
  background: rgba(7, 20, 32, 0.95);
  color: var(--text);
  padding: 14px 16px;
}

textarea {
  resize: vertical;
}

canvas {
  display: block;
  width: 100%;
  height: 100%;
}

h1,
h2,
h3,
strong {
  font-family: var(--font-display);
}

h1,
h2,
h3,
p,
ul,
ol {
  margin-top: 0;
}

ul,
ol {
  margin-bottom: 0;
}

.app-shell {
  min-height: 100dvh;
  max-width: 1220px;
  margin: 0 auto;
  padding: calc(18px + env(safe-area-inset-top)) 16px calc(104px + env(safe-area-inset-bottom));
}

.topbar,
.section-head,
.sheet-header,
.sheet-actions,
.entry-card-header,
.entry-card-meta,
.stage-footer,
.play-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.topbar {
  align-items: flex-start;
  margin-bottom: 18px;
}

.eyebrow,
.section-kicker,
.hud-label,
.scan-label {
  margin: 0 0 6px;
  color: var(--accent-2);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.subtitle {
  margin: 8px 0 0;
  max-width: 680px;
  line-height: 1.58;
  color: var(--muted);
}

.status-chip,
.ghost-button,
.primary-button,
.secondary-button,
.nav-button,
.deck-chip,
.stage-chip {
  min-height: 56px;
  border-radius: 999px;
  padding: 0 18px;
}

.status-chip,
.stage-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(12, 28, 43, 0.78);
  border: 1px solid var(--line);
  color: var(--muted);
  white-space: nowrap;
}

.compact-chip {
  min-height: 48px;
}

.ghost-button,
.secondary-button,
.primary-button {
  color: var(--text);
  border: 1px solid var(--line);
  background: rgba(12, 29, 48, 0.84);
  box-shadow: var(--shadow-soft);
}

.primary-button {
  background: linear-gradient(135deg, #ff9c57 0%, #ff744d 100%);
  color: #11161b;
  font-weight: 800;
}

.secondary-button {
  background: linear-gradient(135deg, rgba(90, 229, 210, 0.16), rgba(90, 229, 210, 0.08));
}

.danger-button {
  color: #ffc1b7;
  border-color: rgba(255, 106, 97, 0.34);
}

.main-content {
  display: grid;
}

.panel {
  display: none;
  gap: 18px;
}

.panel.is-active {
  display: grid;
}

.mission-rail,
.arena-card,
.combat-sidebar,
.briefing-card,
.dashboard-card,
.studio-summary,
.entry-card,
.sheet-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}

.mission-rail,
.briefing-card,
.dashboard-card,
.studio-summary,
.entry-card,
.sheet-panel,
.arena-card,
.combat-sidebar {
  position: relative;
  overflow: hidden;
}

.mission-rail::before,
.briefing-card::before,
.dashboard-card::before,
.arena-card::before,
.sheet-panel::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, rgba(90, 229, 210, 0.5), transparent 55%);
}

.mission-rail {
  padding: 18px 20px 20px;
  display: grid;
  gap: 14px;
}

.mission-copy p:last-child {
  margin-bottom: 0;
  line-height: 1.58;
  color: var(--muted);
}

.deck-strip {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

.deck-strip::-webkit-scrollbar {
  display: none;
}

.deck-chip {
  flex: 0 0 auto;
  background: rgba(18, 34, 52, 0.9);
  border: 1px solid var(--line);
  color: var(--text);
}

.deck-chip.is-active {
  background: linear-gradient(135deg, rgba(255, 138, 76, 0.28), rgba(255, 224, 157, 0.1));
  border-color: rgba(255, 138, 76, 0.54);
}

.play-layout {
  display: grid;
  gap: 18px;
}

.arena-card,
.combat-sidebar,
.briefing-card,
.dashboard-card,
.studio-summary,
.entry-card,
.sheet-panel {
  backdrop-filter: blur(16px);
}

.arena-card {
  padding: 16px;
}

.arena-hud {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.arena-hud > div {
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.fps-stage {
  position: relative;
  overflow: hidden;
  min-height: 560px;
  aspect-ratio: 9 / 15.8;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, #1a2b3f 0%, #0f1a2a 58%, #081119 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04), 0 22px 54px rgba(0, 0, 0, 0.26);
  touch-action: none;
}

.fps-stage::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 50% 18%, var(--theme-haze), transparent 32%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent 12%);
  pointer-events: none;
}

#gameCanvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.fps-stage.is-hit-flash {
  box-shadow:
    inset 0 0 0 1px rgba(126, 255, 232, 0.28),
    0 0 38px rgba(90, 229, 210, 0.24),
    0 22px 54px rgba(0, 0, 0, 0.26);
}

.fps-stage.is-wrong-flash {
  box-shadow:
    inset 0 0 0 1px rgba(255, 130, 118, 0.28),
    0 0 38px rgba(255, 106, 97, 0.2),
    0 22px 54px rgba(0, 0, 0, 0.26);
}

.vignette {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at center, transparent 34%, rgba(4, 9, 15, 0.38) 82%, rgba(3, 7, 12, 0.76) 100%);
}

.world-overlay {
  position: absolute;
  inset: 0;
  padding: 14px;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto auto 1fr auto;
  gap: 10px;
  pointer-events: none;
}

.objective-panel,
.distance-card,
.scan-feed,
.touch-hint,
.route-map {
  background: linear-gradient(180deg, rgba(10, 20, 32, 0.9), rgba(7, 14, 24, 0.78));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  backdrop-filter: blur(18px) saturate(1.08);
  box-shadow: 0 20px 44px rgba(1, 7, 14, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

.objective-panel {
  position: relative;
  grid-column: 1 / span 2;
  grid-row: 1;
  padding: 16px 18px 18px;
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(90, 229, 210, 0.16), transparent 38%),
    radial-gradient(circle at right center, rgba(255, 138, 76, 0.16), transparent 34%),
    linear-gradient(135deg, rgba(12, 23, 37, 0.96), rgba(7, 15, 26, 0.82));
}

.objective-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  transform: translateX(-100%);
  animation: promptSweep 3.6s linear infinite;
  opacity: 0.6;
  pointer-events: none;
}

.objective-panel h3 {
  position: relative;
  z-index: 1;
  margin-bottom: 10px;
  font-size: clamp(1.52rem, 4.8vw, 2.44rem);
  line-height: 1.04;
  letter-spacing: 0.015em;
  text-shadow: 0 4px 24px rgba(90, 229, 210, 0.18), 0 2px 8px rgba(0, 0, 0, 0.34);
}

.objective-panel p:last-child {
  position: relative;
  z-index: 1;
  margin-bottom: 0;
  color: var(--muted);
  line-height: 1.5;
}

#missionPrompt {
  max-width: 14ch;
  text-wrap: balance;
}

#missionClue {
  max-width: 36ch;
}

.distance-card {
  grid-column: 2 / 3;
  grid-row: 2;
  justify-self: end;
  align-self: start;
  min-width: 132px;
  padding: 12px 16px;
  display: grid;
  gap: 4px;
  text-align: right;
  background:
    radial-gradient(circle at top, rgba(90, 229, 210, 0.12), transparent 55%),
    linear-gradient(180deg, rgba(10, 20, 32, 0.92), rgba(7, 14, 24, 0.8));
}

.distance-card span,
.touch-hint span,
.scan-feed p:last-child {
  color: var(--muted);
}

.distance-card strong {
  font-size: 1.48rem;
  letter-spacing: 0.04em;
}

.route-map {
  display: none;
}

.route-node {
  min-height: 46px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
    rgba(255, 255, 255, 0.02);
  padding: 6px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 2px;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.route-node strong {
  font-size: 0.74rem;
}

.route-node span {
  font-size: 0.62rem;
  line-height: 1.12;
  color: var(--muted);
}

.route-node.is-active {
  transform: translateY(-2px);
  background: linear-gradient(135deg, rgba(255, 138, 76, 0.28), rgba(90, 229, 210, 0.18));
  border-color: rgba(255, 138, 76, 0.46);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2), 0 0 0 1px rgba(255, 138, 76, 0.12);
}

.route-node.is-cleared {
  border-color: rgba(90, 229, 210, 0.4);
  color: #91f5e7;
  background: linear-gradient(135deg, rgba(90, 229, 210, 0.16), rgba(90, 229, 210, 0.05));
}

.route-node.is-cleared span {
  color: rgba(145, 245, 231, 0.84);
}

.target-layer {
  display: none;
  position: absolute;
  inset: 0;
  pointer-events: none;
  isolation: isolate;
}



.target-layer {
  display: none;
  position: absolute;
  inset: 0;
  pointer-events: none;
  isolation: isolate;
}

.target-layer.is-active {
  display: block;
}

.target-layer.is-active::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 56%;
  width: min(92%, 680px);
  height: 260px;
  transform: translateX(-50%);
  border-radius: 34px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(5, 12, 20, 0.2)),
    linear-gradient(180deg, rgba(34, 44, 56, 0.78), rgba(8, 13, 20, 0.22));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

.target-layer.is-active::after {
  content: "TARGET RACK";
  position: absolute;
  left: 50%;
  top: 58%;
  transform: translateX(-50%);
  color: rgba(220, 233, 241, 0.82);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  pointer-events: none;
}

.target-node {
  --target-scale: 1;
  --target-tilt: 0deg;
  position: absolute;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  min-height: 132px;
  text-align: center;
  padding: 28px 10px 16px;
  border-radius: 18px 18px 24px 24px;
  border: 1px solid rgba(73, 82, 90, 0.52);
  background:
    linear-gradient(180deg, rgba(252, 248, 237, 0.98) 0%, rgba(239, 231, 210, 0.98) 100%),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.04) 0 1px, transparent 1px 26px);
  color: #121820;
  box-shadow:
    0 5px 0 rgba(90, 69, 46, 0.46),
    0 14px 28px rgba(0, 0, 0, 0.34),
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    inset 0 -18px 22px rgba(117, 92, 60, 0.14);
  pointer-events: auto;
  overflow: visible;
  transform: translate3d(-50%, -50%, 0) rotateZ(var(--target-tilt)) scale(var(--target-scale));
  transition: transform 120ms ease, border-color 120ms ease, box-shadow 120ms ease, opacity 120ms ease, filter 120ms ease;
  touch-action: manipulation;
}

.target-node:hover,
.target-node:active {
  transform: translate3d(-50%, calc(-50% - 4px), 0) rotateZ(var(--target-tilt)) scale(calc(var(--target-scale) * 1.02));
  border-color: rgba(255, 156, 84, 0.72);
  box-shadow:
    0 7px 0 rgba(90, 69, 46, 0.44),
    0 16px 32px rgba(0, 0, 0, 0.36),
    0 0 0 1px rgba(255, 156, 84, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.88);
}

.target-node::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -12px;
  width: 34px;
  height: 16px;
  transform: translateX(-50%);
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(70, 78, 88, 0.98), rgba(27, 34, 43, 0.98));
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.34);
}

.target-node::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -18px;
  width: 76%;
  height: 20px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: radial-gradient(circle at center, rgba(0, 0, 0, 0.34), transparent 72%);
  pointer-events: none;
}

.target-node.is-meaning {
  background:
    linear-gradient(180deg, rgba(245, 250, 242, 0.98) 0%, rgba(226, 240, 226, 0.98) 100%),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.04) 0 1px, transparent 1px 26px);
}

.target-node.is-long .target-word {
  font-size: clamp(0.74rem, 1.8vw, 1rem);
  line-height: 1.08;
}

.target-node.is-hit {
  border-color: rgba(82, 196, 152, 0.9);
  background:
    linear-gradient(180deg, rgba(238, 255, 245, 0.98) 0%, rgba(210, 241, 222, 0.98) 100%),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.04) 0 1px, transparent 1px 26px);
  box-shadow:
    0 6px 0 rgba(48, 113, 87, 0.42),
    0 0 28px rgba(82, 196, 152, 0.24),
    0 16px 34px rgba(0, 0, 0, 0.34);
  animation: targetCorrect 420ms ease-out;
}

.target-node.is-wrong,
.target-node:disabled {
  border-color: rgba(220, 96, 96, 0.92);
  background:
    linear-gradient(180deg, rgba(255, 238, 238, 0.98) 0%, rgba(246, 214, 214, 0.98) 100%),
    repeating-linear-gradient(0deg, rgba(0, 0, 0, 0.05) 0 1px, transparent 1px 26px);
  box-shadow:
    0 4px 0 rgba(114, 51, 51, 0.42),
    0 0 22px rgba(220, 96, 96, 0.18),
    0 12px 24px rgba(0, 0, 0, 0.28);
  filter: saturate(0.88);
  animation: targetWrong 320ms ease-out;
}

.target-node:disabled {
  cursor: default;
}

.target-hanger {
  position: absolute;
  left: 50%;
  top: -28px;
  width: 2px;
  height: 18px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(196, 206, 214, 0.92), rgba(92, 102, 112, 0.92));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06);
  pointer-events: none;
}

.target-word {
  position: relative;
  z-index: 1;
  max-width: 96%;
  font-size: clamp(0.94rem, 2.15vw, 1.22rem);
  font-weight: 900;
  line-height: 1.08;
  color: #101722;
  letter-spacing: -0.02em;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.64);
  word-break: keep-all;
}

.target-tag {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.45);
  font-size: 0.62rem;
  font-weight: 800;
  color: rgba(20, 28, 38, 0.82);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

@keyframes targetCorrect {
  0% {
    transform: translate3d(-50%, -50%, 0) rotateZ(var(--target-tilt)) scale(var(--target-scale));
  }

  55% {
    transform: translate3d(-50%, calc(-50% - 8px), 0) rotateZ(var(--target-tilt)) scale(calc(var(--target-scale) * 1.04));
  }

  100% {
    transform: translate3d(-50%, calc(-50% - 2px), 0) rotateZ(var(--target-tilt)) scale(var(--target-scale));
  }
}

@keyframes targetWrong {
  0%,
  100% {
    transform: translate3d(-50%, -50%, 0) rotateZ(var(--target-tilt)) scale(var(--target-scale));
  }

  25% {
    transform: translate3d(calc(-50% - 6px), calc(-50% + 2px), 0) rotateZ(calc(var(--target-tilt) - 1.5deg)) scale(var(--target-scale));
  }

  50% {
    transform: translate3d(calc(-50% + 7px), calc(-50% - 1px), 0) rotateZ(calc(var(--target-tilt) + 1.5deg)) scale(var(--target-scale));
  }

  75% {
    transform: translate3d(calc(-50% - 4px), calc(-50% + 1px), 0) rotateZ(calc(var(--target-tilt) - 0.8deg)) scale(var(--target-scale));
  }
}

.reticle {
  position: absolute;
  left: var(--reticle-x);
  top: var(--reticle-y);
  width: 92px;
  height: 92px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background:
    radial-gradient(circle, rgba(255, 255, 255, 0.98) 0 2px, transparent 2px),
    radial-gradient(circle, transparent 0 30px, rgba(255, 255, 255, 0.46) 30px 31px, transparent 31px),
    radial-gradient(circle, rgba(90, 229, 210, 0.1), transparent 64%);
  box-shadow: 0 0 0 10px rgba(90, 229, 210, 0.05), 0 0 26px rgba(255, 255, 255, 0.12);
  pointer-events: none;
}

.reticle::before,
.reticle::after {
  content: "";
  position: absolute;
}

.reticle::before {
  inset: 50% 12px auto;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.88) 18%, rgba(255, 255, 255, 0.88) 82%, transparent);
}

.reticle::after {
  inset: 12px auto 12px 50%;
  width: 2px;
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.88) 18%, rgba(255, 255, 255, 0.88) 82%, transparent);
}

.scan-feed {
  grid-column: 1 / 2;
  grid-row: 5;
  align-self: end;
  max-width: min(68%, 360px);
  padding: 12px 14px;
}

.touch-hint {
  grid-column: 2 / 3;
  grid-row: 5;
  justify-self: end;
  align-self: end;
  min-width: 188px;
  max-width: 220px;
  padding: 12px 14px;
  display: grid;
  gap: 4px;
}

.touch-hint strong {
  color: var(--accent-4);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.stage-footer {
  flex-wrap: wrap;
  margin-top: 14px;
}

.stage-chip {
  min-height: 46px;
  padding-inline: 14px;
}

.combat-sidebar {
  padding: 16px;
  display: grid;
  gap: 16px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.metric-card {
  min-height: 126px;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 16px;
  display: grid;
  align-content: space-between;
}

.metric-card span,
.deck-profile p {
  color: var(--muted);
}

.metric-card strong {
  font-size: 1.9rem;
}

.accent-orange {
  background: linear-gradient(135deg, rgba(255, 138, 76, 0.22), rgba(255, 138, 76, 0.06));
}

.accent-teal {
  background: linear-gradient(135deg, rgba(90, 229, 210, 0.22), rgba(90, 229, 210, 0.06));
}

.accent-red {
  background: linear-gradient(135deg, rgba(255, 106, 97, 0.22), rgba(255, 106, 97, 0.06));
}

.accent-sand {
  background: linear-gradient(135deg, rgba(255, 224, 157, 0.24), rgba(255, 224, 157, 0.08));
}

.briefing-card,
.dashboard-card,
.studio-summary {
  padding: 18px;
}

.instruction-list {
  padding-left: 18px;
  line-height: 1.65;
  color: var(--muted);
}

.deck-profile h3,
.dashboard-card h3 {
  margin-bottom: 8px;
}

.studio-toolbar,
.dashboard-grid,
.entry-list {
  display: grid;
  gap: 14px;
}

.field,
.form-grid,
.entry-form {
  display: grid;
  gap: 12px;
}

.field span {
  color: var(--muted);
  font-size: 0.92rem;
}

.compact-field span {
  font-size: 0.86rem;
}

.entry-card {
  padding: 18px;
  gap: 10px;
}

.entry-card-header {
  align-items: flex-start;
}

.entry-card-header h3 {
  margin-bottom: 6px;
}

.entry-card-header p,
.entry-card-body p,
.studio-summary p,
.dashboard-card p {
  margin-bottom: 0;
}

.entry-card-meta {
  flex-wrap: wrap;
}

.meta-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 0.88rem;
}

.meta-pill.custom {
  color: #8bf0df;
  border-color: rgba(90, 229, 210, 0.34);
}

.entry-card-body {
  color: var(--muted);
  line-height: 1.55;
}

.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  width: min(94vw, 580px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 10px;
  border-radius: 999px;
  background: rgba(7, 18, 30, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.nav-button {
  background: transparent;
  color: var(--muted);
}

.nav-button.is-active {
  background: linear-gradient(135deg, rgba(255, 138, 76, 0.24), rgba(90, 229, 210, 0.16));
  color: var(--text);
}

.sheet {
  position: fixed;
  inset: 0;
  z-index: 30;
}

.sheet.hidden {
  display: none;
}

.sheet-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 8, 14, 0.72);
  backdrop-filter: blur(8px);
}

.sheet-panel {
  position: absolute;
  inset: auto 0 0 0;
  max-height: 92dvh;
  overflow: auto;
  padding: 18px;
  border-radius: 28px 28px 0 0;
  background: var(--panel-strong);
}

.toast {
  position: fixed;
  left: 50%;
  top: calc(18px + env(safe-area-inset-top));
  transform: translateX(-50%) translateY(-18px);
  padding: 14px 18px;
  border-radius: 999px;
  background: rgba(7, 20, 32, 0.96);
  color: var(--text);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease, transform 160ms ease;
  z-index: 40;
}

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

@media (min-width: 760px) {
  .arena-hud {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .studio-toolbar,
  .dashboard-grid,
  .two-up {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .three-up {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 980px) {
  .play-layout {
    grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
    align-items: start;
  }

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

  .sheet-panel {
    inset: 24px 24px 24px auto;
    width: min(640px, calc(100vw - 48px));
    border-radius: 30px;
  }
}

@media (orientation: landscape) and (max-height: 640px) {
  .fps-stage {
    min-height: 360px;
    aspect-ratio: 19.5 / 9;
  }

  .world-overlay {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto 1fr auto;
  }

  .objective-panel {
    grid-column: 1 / 2;
    max-width: min(54%, 460px);
  }

  .distance-card {
    grid-column: 2 / 3;
  }

  .route-map {
    grid-column: 2 / 3;
    grid-row: 3;
    width: 176px;
    align-self: start;
  }

  .touch-hint {
    align-self: end;
  }
}

@media (max-width: 759px) {
  .topbar,
  .section-head,
  .play-actions,
  .sheet-header,
  .sheet-actions,
  .entry-card-header,
  .entry-card-meta,
  .stage-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .status-chip,
  .ghost-button,
  .primary-button,
  .secondary-button {
    width: 100%;
  }

  .fps-stage {
    min-height: 520px;
  }

  .route-map {
    display: none;
  }

  .distance-card {
    grid-column: 2 / 3;
  }

  .scan-feed,
  .touch-hint,
  .objective-panel,
  .distance-card {
    border-radius: 18px;
  }

  .sheet-actions {
    position: sticky;
    bottom: 0;
    padding-top: 8px;
    background: linear-gradient(180deg, rgba(7, 17, 28, 0), rgba(7, 17, 28, 0.95) 30%);
  }
}


.projectile-layer {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  overflow: hidden;
}

.projectile-trace {
  position: absolute;
  height: 30px;
  transform: translateY(-50%) rotate(var(--trace-angle));
  transform-origin: left center;
  filter: drop-shadow(0 0 14px rgba(255, 255, 255, 0.34));
  mix-blend-mode: screen;
}

.projectile-streak {
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  transform: translateY(-50%) scaleX(0);
  transform-origin: left center;
  box-shadow: 0 0 18px rgba(255, 255, 255, 0.34);
  animation: projectileStreak 320ms ease-out forwards;
}

.projectile-bolt {
  position: absolute;
  left: 0;
  top: 50%;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 24px rgba(255, 255, 255, 0.42);
  animation: projectileBolt 320ms ease-out forwards;
}

.projectile-trace.is-correct .projectile-streak,
.projectile-trace.is-correct .projectile-bolt,
.impact-marker.is-correct {
  background: radial-gradient(circle, rgba(185, 255, 242, 0.98) 0%, rgba(120, 246, 223, 0.92) 52%, rgba(120, 246, 223, 0.12) 100%);
}

.projectile-trace.is-wrong .projectile-streak,
.projectile-trace.is-wrong .projectile-bolt,
.impact-marker.is-wrong {
  background: radial-gradient(circle, rgba(255, 209, 205, 0.98) 0%, rgba(255, 106, 97, 0.92) 52%, rgba(255, 106, 97, 0.12) 100%);
}

.projectile-trace.is-miss .projectile-streak,
.projectile-trace.is-miss .projectile-bolt,
.impact-marker.is-miss {
  background: radial-gradient(circle, rgba(255, 233, 180, 0.98) 0%, rgba(255, 179, 123, 0.92) 52%, rgba(255, 179, 123, 0.12) 100%);
}

.impact-marker {
  position: absolute;
  z-index: 4;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.44);
  mix-blend-mode: screen;
  animation: impactMarker 560ms ease-out forwards;
}

.target-layer {
  z-index: 3;
}

.target-layer.is-active::before {
  top: 48%;
  height: 230px;
}

.target-layer.is-active::after {
  top: 50%;
}

.target-node {
  min-height: 126px;
}

.reticle {
  z-index: 5;
}

@keyframes projectileStreak {
  0% {
    opacity: 0;
    transform: translateY(-50%) scaleX(0);
  }

  20% {
    opacity: 1;
    transform: translateY(-50%) scaleX(0.38);
  }

  100% {
    opacity: 0;
    transform: translateY(-50%) scaleX(1);
  }
}

@keyframes projectileBolt {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) translateX(0) scale(1.06);
  }

  18% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) translateX(var(--trace-travel)) scale(0.58);
  }
}

@keyframes impactMarker {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.3);
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.2);
  }

  28% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.5);
    box-shadow: 0 0 0 18px rgba(255, 255, 255, 0.12);
  }

  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(3.8);
    box-shadow: 0 0 0 40px rgba(255, 255, 255, 0);
  }
}


.target-layer.is-active::before {
  top: 44%;
  height: 240px;
}

.target-layer.is-active::after {
  top: 46%;
}

.projectile-streak {
  animation-duration: 620ms;
}

.projectile-bolt {
  animation-duration: 620ms;
}

.impact-marker {
  animation-duration: 880ms;
}

.hidden {
  display: none !important;
}

.help-chip {
  position: absolute;
  right: 16px;
  top: 160px;
  z-index: 8;
  display: none;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(8, 17, 28, 0.84);
  color: var(--text);
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.24);
  pointer-events: auto;
  backdrop-filter: blur(14px);
}

.help-chip.is-visible {
  display: inline-flex;
}

.tutorial-overlay {
  position: absolute;
  inset: 0;
  z-index: 9;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(2, 7, 12, 0.44);
  backdrop-filter: blur(10px);
  pointer-events: auto;
}

.tutorial-card {
  width: min(100%, 390px);
  padding: 18px;
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: linear-gradient(180deg, rgba(11, 24, 38, 0.96), rgba(7, 15, 25, 0.92));
  box-shadow: 0 24px 54px rgba(0, 0, 0, 0.42);
}

.tutorial-card h3 {
  margin-bottom: 10px;
  font-size: clamp(1.3rem, 4vw, 1.8rem);
}

.tutorial-list {
  padding-left: 18px;
  margin-bottom: 0;
}

.tutorial-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.tutorial-action {
  min-height: 50px;
  width: 100%;
}

.mobile-controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(18px + env(safe-area-inset-bottom));
  z-index: 8;
  display: none;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 16px;
  pointer-events: none;
}

.mobile-controls.is-visible {
  display: flex;
}

.move-pad,
.fire-button {
  pointer-events: auto;
  touch-action: none;
}

.move-pad {
  position: relative;
  width: 134px;
  height: 134px;
  border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, rgba(255, 255, 255, 0.08), rgba(7, 16, 27, 0.9) 62%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.move-pad.is-active {
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.34), 0 0 0 1px rgba(90, 229, 210, 0.18), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.move-ring {
  position: absolute;
  inset: 18px;
  border-radius: 50%;
  border: 1px dashed rgba(154, 221, 233, 0.26);
}

.move-knob {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle at 35% 35%, rgba(255, 255, 255, 0.82), rgba(90, 229, 210, 0.42) 42%, rgba(10, 20, 32, 0.95) 78%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.34);
  transition: transform 40ms linear;
}

.control-caption {
  position: absolute;
  left: 50%;
  bottom: -24px;
  transform: translateX(-50%);
  color: rgba(220, 233, 241, 0.8);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.fire-button {
  width: 116px;
  height: 116px;
  border-radius: 50%;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 4px;
  padding: 0;
  border: 1px solid rgba(255, 157, 90, 0.42);
  background: radial-gradient(circle at 35% 35%, rgba(255, 214, 179, 0.84), rgba(255, 138, 76, 0.9) 40%, rgba(124, 40, 29, 0.96) 88%);
  color: #0f141a;
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.34), 0 0 0 10px rgba(255, 138, 76, 0.08);
  text-transform: uppercase;
}

.fire-button span {
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.fire-button small {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  opacity: 0.76;
}

.fire-button.is-pressed {
  transform: scale(0.96);
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.28), 0 0 0 8px rgba(255, 138, 76, 0.12);
}

.fps-stage.has-mobile-controls .touch-hint {
  display: none;
}

.fps-stage.has-mobile-controls .scan-feed {
  margin-bottom: 126px;
  max-width: min(56%, 300px);
}

@media (max-width: 759px) {
  .help-chip {
    top: 152px;
    right: 12px;
  }

  .mobile-controls {
    padding: 0 12px;
  }

  .move-pad {
    width: 118px;
    height: 118px;
  }

  .fire-button {
    width: 102px;
    height: 102px;
  }

  .fps-stage.has-mobile-controls .scan-feed {
    max-width: min(58%, 240px);
    margin-bottom: 116px;
  }
}
@media (max-width: 759px) {
  .app-shell {
    padding: calc(10px + env(safe-area-inset-top)) 12px calc(104px + env(safe-area-inset-bottom));
  }

  .topbar {
    margin-bottom: 10px;
    gap: 8px;
  }

  .topbar h1 {
    margin-bottom: 0;
    font-size: clamp(1.55rem, 6vw, 1.92rem);
    line-height: 1.04;
  }

  .topbar .subtitle {
    display: none;
  }

  .topbar .status-chip {
    min-height: 42px;
    padding: 0 12px;
    font-size: 0.74rem;
  }

  .panel.is-active {
    gap: 12px;
  }

  .play-head {
    position: sticky;
    top: calc(8px + env(safe-area-inset-top));
    z-index: 24;
    padding: 10px 12px;
    border-radius: 18px;
    background: rgba(7, 16, 27, 0.96);
    border: 1px solid rgba(148, 201, 223, 0.16);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(16px);
  }

  .play-head .section-kicker {
    margin-bottom: 2px;
    font-size: 0.66rem;
  }

  .play-head h2 {
    margin-bottom: 0;
    font-size: 1.06rem;
  }

  .play-head .play-actions {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    width: 100%;
  }

  .play-head .compact-chip {
    min-height: 40px;
    width: auto;
    flex: 1 1 auto;
    justify-content: flex-start;
    padding: 0 12px;
    font-size: 0.78rem;
  }

  .play-head .primary-button {
    min-height: 42px;
    width: auto;
    padding: 0 16px;
    flex: 0 0 auto;
  }

  .mission-rail {
    padding: 12px 14px 14px;
    gap: 10px;
  }

  .mission-copy h3 {
    margin-bottom: 4px;
    font-size: 1.06rem;
  }

  .mission-copy p:last-child {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.42;
  }

  .deck-strip {
    gap: 8px;
  }

  .deck-chip {
    min-height: 42px;
    padding: 0 14px;
    font-size: 0.84rem;
  }

  .arena-card {
    padding: 12px;
  }

  .arena-hud {
    gap: 8px;
    margin-bottom: 10px;
  }

  .arena-hud > div {
    padding: 9px 10px;
    border-radius: 14px;
  }

  .hud-label {
    margin-bottom: 3px;
    font-size: 0.64rem;
  }

  .arena-hud strong {
    font-size: 0.88rem;
  }

  .fps-stage {
    min-height: 500px;
  }

  .world-overlay {
    padding: 10px;
    gap: 8px;
  }

  .objective-panel {
    margin-top: 62px;
    padding: 12px 14px 14px;
    border-radius: 16px;
  }

  .objective-panel h3 {
    margin-bottom: 8px;
    font-size: clamp(1.2rem, 5.1vw, 1.76rem);
    line-height: 1.08;
  }

  #missionPrompt {
    max-width: 11ch;
  }

  #missionClue {
    max-width: 26ch;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.88rem;
    line-height: 1.38;
  }

  .distance-card {
    margin-top: 66px;
    min-width: 96px;
    padding: 10px 12px;
    border-radius: 16px;
  }

  .distance-card strong {
    font-size: 1.16rem;
  }

  .help-chip {
    top: 118px;
    min-height: 36px;
    padding: 0 12px;
  }
}

@media (max-width: 759px) {
  .objective-panel {
    margin-top: 120px;
  }

  .distance-card {
    margin-top: 124px;
  }

  .target-layer.is-active::before {
    top: 41%;
    height: 224px;
  }

  .target-layer.is-active::after {
    top: 43%;
  }
}

.sound-chip {
  right: 116px;
  min-width: 84px;
}

.sound-chip.is-ready {
  border-color: rgba(90, 229, 210, 0.34);
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.24), 0 0 0 1px rgba(90, 229, 210, 0.08);
}

.sound-chip.is-muted {
  color: #ffc8c2;
  border-color: rgba(255, 106, 97, 0.3);
  background: rgba(38, 12, 18, 0.84);
}

@media (max-width: 759px) {
  .sound-chip {
    top: 118px;
    right: 104px;
  }
}

.studio-head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.import-inline-note {
  padding: 14px 16px;
  border-radius: 18px;
  border: 1px solid rgba(148, 201, 223, 0.14);
  background: rgba(10, 19, 30, 0.72);
  color: var(--muted);
  line-height: 1.55;
}

.import-sheet-panel {
  display: grid;
  gap: 16px;
}

.import-controls {
  display: grid;
  gap: 12px;
}

.import-summary-card {
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(148, 201, 223, 0.14);
  background: rgba(9, 18, 29, 0.76);
}

.import-summary-card h3,
.import-preview-head h3 {
  margin-bottom: 6px;
}

.import-summary-card p,
.import-preview-note {
  margin-bottom: 0;
}

.import-stat-grid,
.import-candidate-list,
.import-preview-layout {
  display: grid;
  gap: 12px;
}

.import-stat-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 14px;
}

.import-stat-card {
  padding: 12px 14px;
  border-radius: 16px;
  border: 1px solid rgba(148, 201, 223, 0.12);
  background: rgba(14, 26, 41, 0.76);
}

.import-stat-card span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.import-stat-card strong {
  font-size: 1.12rem;
}

.import-warning-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.import-warning-item {
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(48, 19, 18, 0.82);
  border: 1px solid rgba(255, 106, 97, 0.18);
  color: #ffd8d2;
}

.import-preview-pane {
  padding: 16px;
  border-radius: 22px;
  border: 1px solid rgba(148, 201, 223, 0.12);
  background: rgba(8, 16, 26, 0.78);
}

.import-text-preview {
  margin: 10px 0 0;
  min-height: 220px;
  max-height: 360px;
  overflow: auto;
  white-space: pre-wrap;
  line-height: 1.5;
  color: #d7ecf5;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.84rem;
}

.import-preview-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-end;
}

.import-candidate-list {
  margin-top: 14px;
}

.import-candidate-card {
  padding: 14px;
  border-radius: 18px;
  border: 1px solid rgba(148, 201, 223, 0.12);
  background: rgba(13, 24, 37, 0.8);
}

.import-candidate-top,
.import-candidate-meta,
.import-candidate-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.import-candidate-top {
  justify-content: space-between;
}

.import-candidate-top h4 {
  margin-bottom: 4px;
}

.import-candidate-top p,
.import-candidate-card p,
.import-candidate-meta,
.import-candidate-notes {
  margin-bottom: 0;
}

.import-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid rgba(148, 201, 223, 0.14);
  background: rgba(18, 29, 44, 0.76);
  color: var(--muted);
}

.import-badge.is-ready {
  border-color: rgba(90, 229, 210, 0.18);
  background: rgba(9, 42, 41, 0.74);
  color: #99fff1;
}

.import-badge.is-review {
  border-color: rgba(255, 106, 97, 0.18);
  background: rgba(49, 18, 17, 0.74);
  color: #ffc7bf;
}

.import-candidate-notes {
  display: grid;
  gap: 6px;
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.5;
}

.import-candidate-actions {
  margin-top: 12px;
}

.import-action-button {
  min-height: 38px;
}

@media (min-width: 760px) {
  .import-controls {
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: end;
  }

  .import-preview-layout {
    grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.25fr);
  }
}

@media (max-width: 759px) {
  .studio-head-actions {
    width: 100%;
  }

  .studio-head-actions .secondary-button,
  .studio-head-actions .primary-button {
    flex: 1 1 calc(50% - 5px);
  }

  .import-stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .import-preview-head {
    flex-direction: column;
    align-items: flex-start;
  }
}
.sheet-sync-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 22px;
  border: 1px solid rgba(148, 201, 223, 0.14);
  background: rgba(8, 17, 28, 0.76);
}

.sheet-sync-head h3,
.sheet-sync-head p {
  margin-bottom: 0;
}

.sheet-sync-controls {
  display: grid;
  gap: 12px;
  align-items: end;
}

.sheet-feed-field input {
  width: 100%;
}

@media (min-width: 760px) {
  .sheet-sync-controls {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

/* Final mobile range polish overrides */
.objective-panel {
  max-width: min(74%, 560px);
}

#missionClue {
  max-width: 30ch;
}

.target-layer.is-active::before {
  top: 54%;
  height: 236px;
}

.target-layer.is-active::after {
  top: 56%;
}

.reticle {
  width: 86px;
  height: 86px;
  box-shadow: 0 0 0 8px rgba(90, 229, 210, 0.04), 0 0 22px rgba(255, 255, 255, 0.1);
}

@media (max-width: 759px) {
  .objective-panel {
    margin-top: 108px;
    max-width: min(76%, 440px);
  }

  .distance-card {
    margin-top: 112px;
  }

  .target-layer.is-active::before {
    top: 55%;
    height: 214px;
  }

  .target-layer.is-active::after {
    top: 57%;
  }
}

.mobile-stage-bar {
  display: none;
  grid-column: 1 / span 2;
  grid-row: 1;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 20px;
  border: 1px solid rgba(148, 201, 223, 0.14);
  background:
    linear-gradient(135deg, rgba(8, 18, 29, 0.92), rgba(6, 14, 24, 0.86)),
    radial-gradient(circle at top left, rgba(90, 229, 210, 0.12), transparent 42%);
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.28);
  backdrop-filter: blur(18px);
  pointer-events: auto;
  z-index: 6;
}

.mobile-stage-meta {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.mobile-stage-label {
  color: var(--accent-2);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.mobile-stage-meta strong {
  font-size: 0.96rem;
  line-height: 1.1;
}

#mobileStageStats {
  color: var(--muted);
  font-size: 0.78rem;
}

.mobile-stage-start {
  min-height: 42px;
  padding: 0 16px;
  border-radius: 999px;
  border: 1px solid rgba(255, 157, 90, 0.34);
  background: linear-gradient(135deg, #ffae66 0%, #ff7b52 100%);
  color: #10151b;
  font-weight: 900;
  letter-spacing: 0.04em;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.24);
}

@media (max-width: 979px) {
  body[data-active-tab="play"] .app-shell {
    max-width: 580px;
    padding: calc(8px + env(safe-area-inset-top)) 10px calc(98px + env(safe-area-inset-bottom));
  }

  body[data-active-tab="play"] .topbar,
  body[data-active-tab="play"] .play-head,
  body[data-active-tab="play"] .combat-sidebar,
  body[data-active-tab="play"] .arena-hud,
  body[data-active-tab="play"] .mission-copy,
  body[data-active-tab="play"] .scan-feed,
  body[data-active-tab="play"] .touch-hint,
  body[data-active-tab="play"] #fpsSummary {
    display: none;
  }

  body[data-active-tab="play"] .panel.is-active[data-panel="play"] {
    gap: 10px;
  }

  body[data-active-tab="play"] .mission-rail {
    padding: 10px 10px 12px;
    gap: 8px;
    border-radius: 24px;
  }

  body[data-active-tab="play"] .deck-strip {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  body[data-active-tab="play"] .deck-strip::-webkit-scrollbar {
    display: none;
  }

  body[data-active-tab="play"] .deck-chip {
    min-height: 40px;
    padding: 0 14px;
    flex: 0 0 auto;
    font-size: 0.82rem;
    white-space: nowrap;
  }

  body[data-active-tab="play"] .play-layout {
    gap: 10px;
  }

  body[data-active-tab="play"] .arena-card {
    padding: 8px;
    border-radius: 24px;
  }

  body[data-active-tab="play"] .fps-stage {
    min-height: clamp(540px, calc(100dvh - 188px), 760px);
    height: clamp(540px, calc(100dvh - 188px), 760px);
    aspect-ratio: auto;
    border-radius: 22px;
  }

  body[data-active-tab="play"] .world-overlay {
    padding: 10px;
    gap: 8px;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto 1fr auto;
  }

  body[data-active-tab="play"] .mobile-stage-bar {
    display: flex;
  }

  body[data-active-tab="play"] .objective-panel {
    grid-column: 1 / 2;
    grid-row: 2;
    margin-top: 0;
    max-width: none;
    padding: 12px 14px 14px;
    border-radius: 18px;
  }

  body[data-active-tab="play"] .objective-panel .section-kicker {
    margin-bottom: 4px;
    font-size: 0.64rem;
  }

  body[data-active-tab="play"] .objective-panel h3 {
    margin-bottom: 6px;
    max-width: 12ch;
    font-size: clamp(1.42rem, 6.2vw, 2.2rem);
    line-height: 1.02;
  }

  body[data-active-tab="play"] #missionClue {
    max-width: 24ch;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.84rem;
    line-height: 1.35;
  }

  body[data-active-tab="play"] .distance-card {
    grid-column: 2 / 3;
    grid-row: 2;
    margin-top: 0;
    min-width: 88px;
    padding: 10px 12px;
    border-radius: 18px;
    align-self: start;
  }

  body[data-active-tab="play"] .route-map {
    display: none;
  }

  body[data-active-tab="play"] .sound-chip {
    top: 132px;
    right: 12px;
  }

  body[data-active-tab="play"] .help-chip:not(.sound-chip) {
    display: none;
  }

  body[data-active-tab="play"] .mobile-controls {
    padding: 0 10px;
  }

  body[data-active-tab="play"] .move-pad {
    width: 112px;
    height: 112px;
  }

  body[data-active-tab="play"] .fire-button {
    width: 92px;
    height: 92px;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.3), 0 0 0 8px rgba(255, 138, 76, 0.08);
  }

  body[data-active-tab="play"] .fire-button span {
    font-size: 1.04rem;
  }

  body[data-active-tab="play"] .fire-button small {
    font-size: 0.62rem;
  }

  body[data-active-tab="play"] .reticle {
    width: 72px;
    height: 72px;
  }

  body[data-active-tab="play"] .stage-footer {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 10px;
  }

  body[data-active-tab="play"] .stage-chip {
    min-height: 42px;
    padding-inline: 12px;
    font-size: 0.78rem;
    text-align: center;
  }
}

@media (max-width: 759px) {
  body[data-active-tab="play"] .app-shell {
    padding: calc(8px + env(safe-area-inset-top)) 8px calc(94px + env(safe-area-inset-bottom));
  }

  body[data-active-tab="play"] .fps-stage {
    min-height: calc(100dvh - 172px);
    height: calc(100dvh - 172px);
  }

  body[data-active-tab="play"] .mobile-stage-bar {
    padding: 10px 10px;
    border-radius: 18px;
  }

  body[data-active-tab="play"] .mobile-stage-meta strong {
    font-size: 0.9rem;
  }

  body[data-active-tab="play"] #mobileStageStats {
    font-size: 0.74rem;
  }

  body[data-active-tab="play"] .mobile-stage-start {
    min-height: 40px;
    padding: 0 14px;
  }

  body[data-active-tab="play"] .objective-panel {
    padding: 10px 12px 12px;
  }

  body[data-active-tab="play"] .objective-panel h3 {
    max-width: 10ch;
    font-size: clamp(1.34rem, 8vw, 1.92rem);
  }

  body[data-active-tab="play"] .distance-card {
    min-width: 78px;
    padding: 9px 10px;
  }
}

/* Play focus mode across deployed screens */
body[data-active-tab="play"] .app-shell {
  max-width: 680px;
  padding: calc(10px + env(safe-area-inset-top)) 10px calc(96px + env(safe-area-inset-bottom));
}

body[data-active-tab="play"] .topbar,
body[data-active-tab="play"] .play-head,
body[data-active-tab="play"] .combat-sidebar,
body[data-active-tab="play"] .arena-hud,
body[data-active-tab="play"] .mission-copy,
body[data-active-tab="play"] .scan-feed,
body[data-active-tab="play"] .touch-hint,
body[data-active-tab="play"] #fpsSummary {
  display: none;
}

body[data-active-tab="play"] .main-content {
  justify-items: center;
}

body[data-active-tab="play"] .panel.is-active[data-panel="play"] {
  width: 100%;
  max-width: 660px;
  gap: 10px;
}

body[data-active-tab="play"] .mission-rail {
  width: 100%;
  padding: 10px 10px 12px;
  gap: 8px;
  border-radius: 24px;
}

body[data-active-tab="play"] .deck-strip {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: none;
}

body[data-active-tab="play"] .deck-strip::-webkit-scrollbar {
  display: none;
}

body[data-active-tab="play"] .deck-chip {
  min-height: 40px;
  padding: 0 14px;
  flex: 0 0 auto;
  font-size: 0.82rem;
  white-space: nowrap;
}

body[data-active-tab="play"] .play-layout {
  width: 100%;
  grid-template-columns: 1fr;
  gap: 10px;
}

body[data-active-tab="play"] .arena-card {
  width: 100%;
  padding: 8px;
  border-radius: 24px;
}

body[data-active-tab="play"] .fps-stage {
  min-height: clamp(560px, calc(100dvh - 186px), 860px);
  height: clamp(560px, calc(100dvh - 186px), 860px);
  aspect-ratio: auto;
  border-radius: 22px;
}

body[data-active-tab="play"] .world-overlay {
  padding: 10px;
  gap: 8px;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-rows: auto auto 1fr auto;
}

body[data-active-tab="play"] .mobile-stage-bar {
  display: flex;
}

body[data-active-tab="play"] .objective-panel {
  grid-column: 1 / 2;
  grid-row: 2;
  margin-top: 0;
  max-width: none;
  padding: 12px 14px 14px;
  border-radius: 18px;
}

body[data-active-tab="play"] .objective-panel .section-kicker {
  margin-bottom: 4px;
  font-size: 0.64rem;
}

body[data-active-tab="play"] .objective-panel h3 {
  margin-bottom: 6px;
  max-width: 12ch;
  font-size: clamp(1.42rem, 5vw, 2.12rem);
  line-height: 1.02;
}

body[data-active-tab="play"] #missionClue {
  max-width: 24ch;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 0.84rem;
  line-height: 1.35;
}

body[data-active-tab="play"] .distance-card {
  grid-column: 2 / 3;
  grid-row: 2;
  margin-top: 0;
  min-width: 88px;
  padding: 10px 12px;
  border-radius: 18px;
  align-self: start;
}

body[data-active-tab="play"] .route-map {
  display: none;
}

body[data-active-tab="play"] .sound-chip {
  top: 132px;
  right: 12px;
}

body[data-active-tab="play"] .help-chip:not(.sound-chip) {
  display: none;
}

body[data-active-tab="play"] .mobile-controls {
  padding: 0 10px;
}

body[data-active-tab="play"] .move-pad {
  width: 112px;
  height: 112px;
}

body[data-active-tab="play"] .fire-button {
  width: 92px;
  height: 92px;
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.3), 0 0 0 8px rgba(255, 138, 76, 0.08);
}

body[data-active-tab="play"] .fire-button span {
  font-size: 1.04rem;
}

body[data-active-tab="play"] .fire-button small {
  font-size: 0.62rem;
}

body[data-active-tab="play"] .reticle {
  width: 72px;
  height: 72px;
}

body[data-active-tab="play"] .stage-footer {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

body[data-active-tab="play"] .stage-chip {
  min-height: 42px;
  padding-inline: 12px;
  font-size: 0.78rem;
  text-align: center;
}

@media (max-width: 759px) {
  body[data-active-tab="play"] .app-shell {
    padding: calc(8px + env(safe-area-inset-top)) 8px calc(94px + env(safe-area-inset-bottom));
  }

  body[data-active-tab="play"] .fps-stage {
    min-height: calc(100dvh - 172px);
    height: calc(100dvh - 172px);
  }

  body[data-active-tab="play"] .mobile-stage-bar {
    padding: 10px 10px;
    border-radius: 18px;
  }

  body[data-active-tab="play"] .mobile-stage-meta strong {
    font-size: 0.9rem;
  }

  body[data-active-tab="play"] #mobileStageStats {
    font-size: 0.74rem;
  }

  body[data-active-tab="play"] .mobile-stage-start {
    min-height: 40px;
    padding: 0 14px;
  }

  body[data-active-tab="play"] .objective-panel {
    padding: 10px 12px 12px;
  }

  body[data-active-tab="play"] .objective-panel h3 {
    max-width: 10ch;
    font-size: clamp(1.34rem, 8vw, 1.92rem);
  }

  body[data-active-tab="play"] .distance-card {
    min-width: 78px;
    padding: 9px 10px;
  }
}
