@font-face {
  font-family: Montserrat;
  src: url("fonts/Montserrat-Regular.2aafe071bb35.woff2") format("woff2");
  font-display: swap;
  font-weight: 400;
}
@font-face {
  font-family: Montserrat;
  src: url("fonts/Montserrat-SemiBold.0d00e4aea5b3.woff2") format("woff2");
  font-display: swap;
  font-weight: 600;
}
:root {
  color-scheme: dark;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  color: var(--text);
  font-family: Montserrat, Arial, sans-serif;
  line-height: 1.6;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  touch-action: manipulation;
}
a {
  color: var(--purple);
}
button {
  cursor: pointer;
  color: inherit;
  border: 1px solid var(--line);
  background: #192136;
  padding: 12px 18px;
}
button:hover {
  border-color: #9b89e2;
  background: #242b43;
}
button:disabled {
  cursor: default;
  opacity: 0.45;
}
input,
select {
  color: inherit;
  background: #0c1222;
  border: 1px solid #46516b;
  border-radius: 10px;
  padding: 12px;
  max-width: 100%;
}
input {
  width: 100%;
}
label {
  display: block;
  margin: 16px 0 8px;
}
label input {
  margin-top: 8px;
}
h1,
h2,
h3,
p {
  margin: 0 0 16px;
}
h1 {
  line-height: 1.17;
  font-weight: 600;
}
h2 {
  letter-spacing: -0.6px;
  line-height: 1.35;
}
h3 {
  font-size: 17px;
  line-height: 1.4;
}
.muted {
  color: var(--muted);
}
.small {
  font-size: 12px;
}
.eyebrow {
  font-weight: 600;
  margin-bottom: 12px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #48516b;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  letter-spacing: 0.6px;
}
.primary {
  border: 0;
  display: inline-flex;
  justify-content: space-between;
  gap: 30px;
}
.primary:hover {
  color: #15102d;
}
.secondary {
  border-color: #697691;
}
.quiet {
  background: none;
  border: 0;
  color: var(--muted);
  padding-left: 0;
}
.icon-button {
  font-size: 26px;
  line-height: 1;
  padding: 4px 14px;
}
.skip {
  position: fixed;
  top: -100px;
  left: 15px;
  z-index: 99;
  background: var(--text);
  color: var(--bg);
  padding: 15px;
}
.skip:focus {
  top: 10px;
}
[hidden] {
  display: none !important;
}
.auth-shell {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  align-items: center;
  margin: auto;
  padding: 50px 40px;
}
.auth-shell.compact {
  display: flex;
  justify-content: center;
}
.auth-art {
  position: relative;
}
.auth-art > p {
  color: var(--muted);
}
.auth-card {
  padding: 40px;
  border: 1px solid var(--line);
  width: 100%;
  max-width: 460px;
}
.auth-card h2 {
  font-size: 30px;
}
.auth-card form button {
  width: 100%;
  margin: 16px 0;
}
.orbit-art {
  height: 240px;
  position: relative;
  margin-bottom: 30px;
}
.planet {
  background: radial-gradient(
    circle at 30% 22%,
    #bacff6 0%,
    #718bb8 17%,
    #3c496d 40%,
    #151c32 65%,
    #090d19 77%
  );
  width: 220px;
  height: 220px;
  border-radius: 50%;
  box-shadow: -10px -6px 70px #7689ca30;
}
.orbit-art .planet {
  position: absolute;
  left: 90px;
  top: 0;
}
.orbit {
  position: absolute;
  border: 1px solid #666e9e66;
  width: 360px;
  height: 100px;
  top: 65px;
  left: 20px;
  transform: rotate(-25deg);
  border-radius: 50%;
}
.o2 {
  transform: rotate(25deg);
}
.o3 {
  transform: rotate(-65deg);
}
.app-shell {
  display: grid;
  margin: auto;
  min-height: 100dvh;
}
.sidebar {
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100dvh;
}
.brand {
  font-weight: 600;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
}
.brand img {
  width: 32px;
}
.brand span {
  font-size: 12px;
  padding: 2px 5px;
  letter-spacing: 0;
}
.side-caption {
  font-size: 12px;
}
.sidebar nav {
  display: grid;
  gap: 9px;
}
.nav {
  text-align: left;
  background: transparent;
  border-color: transparent;
  display: flex;
  gap: 10px;
}
.sidebar-bottom {
  margin-top: auto;
}
.nova-status {
  font-size: 12px;
}
.nova-status span {
  display: inline-block;
  width: 7px;
  height: 7px;
  background: #b5e7ce;
  border-radius: 50%;
  margin-right: 8px;
}
.main {
  min-width: 0;
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}
.topbar .eyebrow {
  margin-bottom: 3px;
}
.top-actions {
  display: flex;
  gap: 12px;
  align-items: center;
}
.top-actions select {
  font-size: 12px;
}
.demo-banner {
  border: 1px solid #aa886255;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 22px;
}
.notice {
  border: 1px solid #7081ae;
  padding: 14px;
  border-radius: 12px;
  margin-bottom: 20px;
}
.notice.error {
  border-color: #ec8a91;
  color: #ffc7c7;
}
.hero {
  border: 1px solid #53608155;
  position: relative;
  overflow: hidden;
  margin-bottom: 22px;
}
.hero-copy {
  position: relative;
  z-index: 1;
}
.hero-copy .primary {
  margin-top: 10px;
}
.hero-space {
  position: absolute;
  pointer-events: none;
}
.hero-space .planet {
  width: 280px;
  height: 280px;
  position: absolute;
  left: 60px;
  top: 15px;
}
.orbital-ring {
  position: absolute;
  left: -10px;
  top: 60px;
  width: 420px;
  height: 140px;
  transform: rotate(-35deg);
  border: 1px solid #a1b4ed77;
  border-radius: 50%;
  box-shadow: 0 0 50px #b6a7ff0a;
}
.hero-coordinate {
  position: absolute;
  letter-spacing: 3px;
}
.star {
  position: absolute;
  color: #d9d5fb;
}
.s1 {
  left: 60px;
  top: 30px;
  font-size: 25px;
}
.s2 {
  right: 10px;
  bottom: 20px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stat strong {
  font-weight: 600;
  display: block;
  margin: 5px 0;
}
.stat span {
  color: var(--muted);
  font-size: 12px;
}
.section-title {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin: 26px 0 17px;
}
.section-title h2,
.section-title h1 {
  margin: 0;
}
.section-title .eyebrow {
  margin-bottom: 5px;
}
.systems {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.system {
  border: 1px solid var(--line);
}
.system p {
  margin: 8px 0 0;
}
.split {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  margin: 25px 0;
}
.panel {
  margin-bottom: 20px;
}
.split .panel {
  margin-bottom: 0;
}
.nova-panel {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}
.nova-panel p:last-child {
  margin: 0;
}
.nova-orb {
  flex: none;
  width: 65px;
  height: 65px;
  border-radius: 50%;
  text-align: center;
  padding: 14px;
  font-size: 25px;
}
.tabs {
  display: flex;
  flex-wrap: wrap;
  margin: 22px 0;
}
.tabs button.active {
  background: #26243f;
  color: #e1d8ff;
  border-color: #7d6fa3;
}
.ship-panel {
  border: 1px solid var(--line);
  background: radial-gradient(ellipse at center, #26375855, #0c1322);
  border-radius: 20px;
  overflow: hidden;
  padding: 25px 0;
}
.ship-panel svg {
  display: block;
  width: 100%;
}
.ship-node {
  cursor: pointer;
}
.ship-node text {
  fill: #fff;
  font-size: 18px;
  text-anchor: middle;
  pointer-events: none;
}
.ship-node circle {
  fill: #7664ad;
  stroke: #cbbdff;
  stroke-width: 2;
}
.ship-node[data-status="completed"] circle {
  fill: #2e715e;
  stroke: #b5efce;
}
.mission-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
}
.mission-card {
  display: block;
}
.mission-card h3 {
  margin: 9px 0 12px;
}
.mission-card .status {
  font-size: 12px;
  color: var(--muted);
}
footer {
  margin: 45px 0 15px;
}
.table-wrap {
  overflow-x: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
}
th,
td {
  text-align: left;
  padding: 16px 12px;
  border-bottom: 1px solid var(--line);
}
tr:last-child td {
  border-bottom: 0;
}
td:last-child {
  text-align: right;
}
.journal-entry {
  border-bottom: 1px solid var(--line);
  padding: 16px 0;
}
.journal-entry:last-child {
  border: 0;
}
dialog {
  border: 1px solid #606f94;
  max-height: 90dvh;
}
dialog::backdrop {
  backdrop-filter: blur(6px);
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.dialog-head .eyebrow {
  margin: 0;
}
.dialog-tools {
  display: flex;
  gap: 8px;
}
.choice {
  display: flex;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  padding: 12px;
  border-radius: 10px;
}
.choice input {
  width: auto;
}
.pixel-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
  max-width: 320px;
  margin: 20px 0;
}
.pixel {
  aspect-ratio: 1;
  padding: 0;
}
.pixel.selected {
  background: #b7a6ff;
}
.radio-tabs,
.radio-table {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}
.radio-tab.active {
  background: #b7a6ff;
  color: #10131f;
}
.radio-key {
  min-height: 40px;
  padding: 0 10px;
  font-size: 14px;
  white-space: pre;
}
.radio-lamp {
  width: 56px;
  height: 56px;
  margin: 14px auto;
  border-radius: 50%;
  background: #1a2238;
  border: 2px solid #34465f;
  transition: background 0.05s, box-shadow 0.05s;
}
.radio-lamp.on {
  background: #ffe28a;
  box-shadow: 0 0 28px 8px rgba(255, 226, 138, 0.6);
}
.radio-signal {
  overflow-wrap: anywhere;
}
.energy-clues {
  margin: 10px 0 18px;
  padding-left: 20px;
  line-height: 1.5;
}
.energy-row {
  margin: 14px 0;
}
.energy-head {
  display: flex;
  justify-content: space-between;
  font-size: 15px;
}
.energy-head strong {
  color: var(--energy);
}
.energy-bar {
  height: 10px;
  margin: 8px 0 4px;
  border-radius: 6px;
  background: #1a2238;
  overflow: hidden;
}
.energy-fill {
  height: 100%;
  background: var(--energy);
  transition: width 0.12s;
}
.energy-row input[type="range"] {
  width: 100%;
  min-height: 36px;
  padding: 0;
  accent-color: var(--energy);
}
.energy-left {
  color: var(--muted, #9fb0d0);
}
.rover-grid {
  display: grid;
  gap: 3px;
  max-width: 360px;
  margin: 20px 0 10px;
}
.rover-cell {
  position: relative;
  min-width: 0;
  min-height: 0;
  aspect-ratio: 1;
  padding: 0;
  font-size: 13px;
  line-height: 1;
  border-radius: 6px;
}
.rover-cell.blocked {
  background: #3a1d2b;
  border-color: #7a3b52;
  opacity: 1;
}
.rover-cell.blocked::after {
  content: "✕";
  color: #ff8fa8;
}
.rover-cell.start::after {
  content: "С";
  color: #a6ecd6;
}
.rover-cell.goal::after {
  content: "★";
  color: #ffd979;
}
.rover-cell.on-route {
  background: #b7a6ff;
  color: #10131f;
}
.rover-cell.on-route:not(.goal)::after {
  content: attr(data-step);
  color: #10131f;
}
.rover-cell.fence-r {
  border-right: 4px solid #ffb86b;
}
.rover-cell.fence-b {
  border-bottom: 4px solid #ffb86b;
}
.rover-cell.head {
  outline: 2px solid #a6ecd6;
}
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 15px 0;
}
.reference {
  padding: 15px;
  border: 1px dashed #60729a;
  border-radius: 10px;
  white-space: pre-wrap;
}
details {
  margin: 20px 0;
}
.crew-row {
  margin: 12px 0;
}
.crew-row p {
  margin: 0 0 5px;
}
.mission-photo {
  max-width: 100%;
  border-radius: 12px;
}
.no-point {
  padding: 16px;
  border: 1px dashed #6c7290;
  border-radius: 12px;
  margin: 15px 0;
  color: var(--muted);
}
@media (min-width: 1100px) and (prefers-reduced-motion: no-preference) {
  .hero-space {
    animation: drift 12s ease-in-out infinite alternate;
  }
  @keyframes drift {
    to {
      transform: translateY(-12px);
    }
  }
}
@media (max-width: 1100px) {
  .sidebar {
    width: 190px;
  }
  .systems {
    grid-template-columns: repeat(2, 1fr);
  }
  .split {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 720px) {
  .sidebar {
    border: 0;
  }
  .sidebar .brand,
  .side-caption,
  .sidebar-bottom {
    display: none;
  }
  .sidebar nav {
    display: grid;
  }
  .nav {
    text-align: center;
  }
  .topbar {
    align-items: flex-start;
  }
  .top-actions {
    flex-direction: column-reverse;
    align-items: flex-end;
  }
  .top-actions select {
    padding: 5px;
  }
  .hero h1 {
    font-size: 36px;
  }
  .nova-panel {
    gap: 12px;
  }
  .nova-orb {
    width: 45px;
    height: 45px;
    font-size: 20px;
    padding: 6px;
  }
  .nova-panel p {
    font-size: 12px;
  }
  .tabs button {
    padding: 9px 10px;
  }
  .section-title h2 {
    font-size: 20px;
  }
  .section-title .small {
    max-width: 120px;
    text-align: right;
  }
  .ship-panel {
    padding: 18px 0;
  }
  .ship-node text {
    font-size: 23px;
  }
  .auth-card {
    margin: 8vh auto 0;
  }
  .auth-card h1 {
    font-size: 30px;
  }
  th,
  td {
    padding: 13px 8px;
    font-size: 12px;
  }
  .desktop {
    display: none;
  }
  .topbar .pill {
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    scroll-behavior: auto !important;
  }
}

.scene { margin: 0; color: var(--muted, #9fb3c8); }
.suspects { display: grid; gap: 12px; }
.suspect { display: grid; grid-template-columns: 44px 1fr; column-gap: 12px; row-gap: 4px; align-items: center; text-align: left; padding: 14px; border-radius: 16px; border: 1px solid rgba(143, 180, 200, 0.3); background: rgba(10, 20, 36, 0.7); color: inherit; font: inherit; cursor: pointer; }
.suspect-face { grid-row: span 2; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: rgba(94, 234, 212, 0.15); color: #5eead4; font-weight: 700; font-size: 1.2rem; }
.suspect-quote { grid-column: 2; font-style: italic; opacity: 0.9; }
.suspect[aria-pressed="true"] { border-color: #ffb86b; background: rgba(255, 184, 107, 0.14); box-shadow: 0 0 0 2px rgba(255, 184, 107, 0.45); }
.suspect[aria-pressed="true"] .suspect-face { background: #ffb86b; color: #1a1205; }

.star-wheel { position: relative; width: var(--size); height: var(--size); margin: 0 auto; border-radius: 50%; touch-action: none; user-select: none; background: radial-gradient(circle, rgba(94, 234, 212, 0.1), rgba(10, 20, 36, 0) 70%), radial-gradient(1px 1px at 12% 20%, #fff, transparent), radial-gradient(1px 1px at 82% 14%, #cfe8ff, transparent), radial-gradient(1.5px 1.5px at 90% 70%, #fff, transparent), radial-gradient(1px 1px at 18% 84%, #b7a6ff, transparent), radial-gradient(1px 1px at 50% 6%, #fff, transparent); }
.star-ring { position: absolute; left: 50%; top: 50%; width: var(--ring); height: var(--ring); margin: calc(var(--ring) / -2) 0 0 calc(var(--ring) / -2); border-radius: 50%; border: 1px solid var(--color); box-shadow: 0 0 14px color-mix(in srgb, var(--color) 45%, transparent), inset 0 0 14px color-mix(in srgb, var(--color) 25%, transparent); transition: transform 0.18s ease-out; }
.star-letter { position: absolute; left: 50%; top: 50%; font-size: 0.62rem; line-height: 1; color: var(--color); text-shadow: 0 0 6px var(--color); transform-origin: center; }
.star-pointer { position: absolute; left: 50%; top: 0; width: 2px; height: 50%; background: linear-gradient(#fff, rgba(255, 255, 255, 0)); transform: translateX(-50%); pointer-events: none; box-shadow: 0 0 10px #fff; }
.star-core { position: absolute; left: 50%; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; background: radial-gradient(circle, #fff, #ffd98a 45%, rgba(255, 184, 107, 0) 72%); box-shadow: 0 0 22px #ffd98a; pointer-events: none; animation: star-pulse 3s ease-in-out infinite; }
@keyframes star-pulse { 50% { transform: scale(1.25); opacity: 0.8; } }
@media (prefers-reduced-motion: reduce) { .star-core { animation: none; } .star-ring { transition: none; } }
.star-rows { display: grid; gap: 8px; }
.star-row { display: grid; grid-template-columns: 3.4rem 1.2rem 1fr auto auto; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--color) 55%, transparent); background: rgba(10, 20, 36, 0.6); }
.star-cipher { font-weight: 700; letter-spacing: 0.12em; color: var(--color); }
.star-arrow { opacity: 0.6; text-align: center; }
.star-readout { font-size: 1.15rem; letter-spacing: 0.14em; color: #fff; text-shadow: 0 0 10px var(--color); }
.star-turn { min-width: 44px; min-height: 44px; padding: 0; }

.strips { display: grid; gap: 10px; }
.strip-lane { display: grid; gap: 4px; }
.strip-label { font-size: 0.85rem; color: var(--color); }
.strip-bar { display: grid; grid-template-columns: repeat(var(--minutes), 1fr); gap: 2px; height: 28px; }
.strip-cell { border-radius: 4px; background: rgba(143, 180, 200, 0.12); }
.strip-cell.on { background: color-mix(in srgb, var(--color) 70%, transparent); box-shadow: 0 0 8px color-mix(in srgb, var(--color) 50%, transparent); }
.strip-cell.picked { outline: 2px solid #fff; outline-offset: 1px; }
.strip-scale { display: grid; grid-template-columns: repeat(var(--minutes), 1fr); font-size: 0.7rem; opacity: 0.7; }
.strip-tick { white-space: nowrap; }
.time-marker { width: 100%; accent-color: #fff; }
.strip-chosen { margin: 0; font-weight: 700; font-size: 1.1rem; text-align: center; }
