/* First Light demo additions within the existing app shell. */
.first-light-empty #human-view { opacity: 0; visibility: hidden; pointer-events: none; }
.first-light-empty #starfield { opacity: 1; }
.first-light-empty #back-galaxy, .first-light-empty .scale-readout { visibility: hidden; }
.first-light-empty .map-vignette {
  z-index: 1; background: linear-gradient(180deg,#03040c9c 0%,transparent 21%,transparent 76%,#02030aa8 100%),
    radial-gradient(ellipse at 50% 48%,transparent 28%,#02030a26 72%,#02030a85 100%);
}
.first-light-empty .map-tools { opacity: .35; }
.first-light-empty .map-instructions { visibility: hidden; }
.first-light-prompt {
  position: absolute; z-index: 8; left: 50%; bottom: clamp(64px, 10vh, 116px);
  transform: translateX(-50%); width: min(370px, calc(100% - 36px)); text-align: center;
}
.first-light-launch {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  width: 100%; min-height: 70px; padding: 13px 19px; text-align: left;
  border: 1px solid #b9b3ff46; border-radius: 17px;
  background: linear-gradient(120deg,#101426d9,#090c18c9); color: #e6e8ff;
  backdrop-filter: blur(14px); box-shadow: 0 16px 70px #0008;
  cursor: pointer; transition: background .2s, border-color .2s, transform .2s;
}
.first-light-launch .launch-copy { display: grid; gap: 5px; }
.first-light-launch strong { font: 500 15px var(--sans); letter-spacing: -.2px; }
.first-light-launch small { color: #aab7da; font: 9px var(--mono); }
.first-light-launch .launch-arrow { color: #c4b6ff; font-size: 19px; }
.first-light-launch:hover { background: #a6a8ff28; border-color: #c9c4ff9c; transform: translateY(-1px); }
.first-light-launch:focus-visible { outline: 2px solid #c7baff; outline-offset: 3px; }
.first-light-prompt .detail-notice { margin-top: 8px; font-size: 7px; opacity: .72; }
.first-light-preview-tools {
  position: absolute; z-index: 8; top: 54px; right: 30px;
  display: flex; gap: 7px;
}
.first-light-preview-tools button {
  border: 1px solid #303c5c; background: #0c1123c9; color: #b5c3e5;
  font: 8px var(--mono); padding: 10px;
}
.first-light-progress {
  position: absolute; bottom: 90px; left: 50%; transform: translateX(-50%);
  z-index: 8; color: var(--lime); font: 10px var(--mono); letter-spacing: 1px;
  text-align: center; white-space: nowrap; pointer-events: none;
}
.first-light-dialog {
  width: min(380px, calc(100vw - 36px)); padding: 0;
  background: #090d1cf5; color: var(--white); border: 1px solid #42578d;
  box-shadow: 0 20px 90px #0008;
}
.first-light-dialog::backdrop { background: #02030bc9; }
.first-light-dialog-content { padding: 22px; }
.first-light-dialog label { font: 8px var(--mono); color: var(--muted); }
.first-light-dialog input {
  display: block; width: 100%; margin-top: 10px; padding: 11px;
  border: 1px solid #3d4a70; background: #10152b; color: var(--white);
  font: 12px var(--mono);
}
body.first-light-revealing .map-tools,
body.first-light-revealing .map-surface { pointer-events: none; }
body.first-light-revealing #back-galaxy { visibility: hidden; }
@media (max-width: 650px) {
  .first-light-preview-tools { top: 100px; right: 15px; }
  .first-light-prompt { bottom: clamp(58px, 9vh, 90px); padding: 13px 12px; }
}
.first-light-scales {
  position: absolute; top: 100px; left: 50%; transform: translateX(-50%);
  z-index: 8; display: flex; align-items: center; gap: 6px;
  border: 1px solid #8798c538; border-radius: 999px; padding: 4px 8px;
  background: #101423e8; backdrop-filter: blur(16px);
}
.first-light-scales button, .first-light-source-tabs button {
  padding: 8px 11px; background: none; border: 0; border-radius: 999px;
  color: var(--muted); font: 11px var(--sans); white-space: nowrap;
}
.first-light-scales span { color: #617195; font-size: 12px; }
.first-light-scales button[aria-pressed="true"],
.first-light-source-tabs button[aria-pressed="true"] { background: #999ff026; color: #dce3ff; }
.first-light-kluster-source {
  position: absolute; top: 158px; right: 30px; width: 260px;
  z-index: 7; border: 1px solid #8798c538; border-radius: 12px;
  background: #101423dd; backdrop-filter: blur(16px); padding: 8px 10px;
}
.first-light-source-tabs { display: flex; gap: 3px; }
.first-light-kluster-source p { font: 10px/1.6 var(--mono); color: var(--muted); margin: 9px 4px 3px; }
/* A hint of the reference's violet/cyan atmosphere leaves the stars prominent. */
.kluster-nebula { display: none; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(ellipse at 36% 44%,#71399420,transparent 48%),
    radial-gradient(ellipse at 66% 54%,#338a9520,transparent 46%),
    radial-gradient(ellipse at 51% 68%,#54388412,transparent 52%),#030611;
}
.star-kluster-view .kluster-nebula { display: block; }
.star-kluster-view #starfield { opacity: .9; }
.star-kluster-view .map-vignette { background: radial-gradient(ellipse at center,transparent 20%,#03061699 100%); }
.star-kluster-view .system-badge { opacity: 1; }
.star-kluster-view .star-corona { display: none; }
.star-kluster-view .connection { fill: none; stroke-linecap: round; stroke-width: .9;
  transition: opacity .3s, stroke .3s; }
.star-kluster-view .connection.route-friend { stroke: #dfc7ff; stroke-dasharray: none; }
.star-kluster-view .connection.route-reuse { stroke: #9defff; stroke-dasharray: 7 4; }
.star-kluster-view .connection.kluster-line-active { opacity: .88; filter: drop-shadow(0 0 3px #aecbff80); }
.star-kluster-view .connection.kluster-line-muted { opacity: .09; filter: none; }
.star-kluster-view .system-badge .badge-surface { fill: #050b1a28; stroke: none; }
.star-kluster-view .system-badge:hover .badge-surface,
.star-kluster-view .system-badge:focus-visible .badge-surface { fill: #050b1acc; stroke: #b1c9ef80; }
.star-kluster-view .system-badge text { paint-order: stroke; stroke: #07091e; stroke-width: 3px;
  stroke-linejoin: round; fill: #edf4ff; font-size: 13px; }
.star-kluster-view .system-badge .kluster-subtitle { fill: #becfeb; font: 9px var(--mono); letter-spacing: .3px; }
.kluster-star-rays { display: none; pointer-events: none; }
.star-kluster-view .kluster-star-rays { display: block; fill: none; stroke: #e5f3ff; opacity: .8; }
.kluster-reuse-summary { margin-top: 20px; border-top: 1px solid #303e61; padding-top: 14px; }
.kluster-reuse-summary h3 { color: var(--muted); font: 11px var(--mono); }
.first-light-account-note {
  position: absolute; top: 144px; left: 50%; transform: translateX(-50%);
  z-index: 6; max-width: calc(100% - 120px); margin: 0;
  color: #a4b4d1; font: 10px/1.7 var(--mono); text-align: center; pointer-events: none;
}
.branch-traffic { pointer-events: none; }
.branch-satellite { pointer-events: all; cursor: help; outline: none; }
.branch-satellite:focus-visible .station-ring-outer { stroke: #eff6ff; stroke-width: 1.25; }
.station-hit { fill: transparent; stroke: none; pointer-events: all; }
.first-light-branch-tooltip {
  position: absolute; z-index: 20; transform: translate(-50%, -100%); pointer-events: none;
  max-width: min(260px, calc(100% - 20px)); padding: 7px 10px;
  border: 1px solid #9db7df8a; border-radius: 7px; background: #0b1222f2;
  box-shadow: 0 5px 18px #0009; color: #edf4ff;
  font: 11px/1.2 var(--mono); white-space: nowrap; text-overflow: ellipsis; overflow: hidden;
}
.first-light-branch-tooltip.below-marker { transform: translate(-50%, 0); }
.branch-orbit { fill: none; stroke: #7b99be; stroke-opacity: .18; stroke-width: .6; vector-effect: non-scaling-stroke; }
.station-ring { stroke: #a4bdd9; stroke-width: .7; vector-effect: non-scaling-stroke; }
.station-ring-outer { fill: #344960; stroke: #d1deee; stroke-opacity: .92; stroke-dasharray: 1.1 .36; }
.station-ring-inner { fill: #07101c; stroke: #c1d4e9; stroke-opacity: .9; stroke-width: .65; }
.station-ring-side { fill: #1b2c41; stroke: #b1c5dd; stroke-width: .7; vector-effect: non-scaling-stroke; }
.satellite-core { fill: #879cb2; stroke: #e0efff; stroke-width: .75; stroke-linejoin: round; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 .8px #a9ccf6); }
.station-module { fill: #263a52; stroke: #d2e2f2; stroke-width: .55; vector-effect: non-scaling-stroke; }
.station-shadow { fill: #07101f; opacity: .62; pointer-events: none; }
.station-glint { fill: none; stroke: #f2f7ff; stroke-width: .65; stroke-linecap: round; opacity: .72; pointer-events: none; }
.first-light-terminator { fill: #02050d; opacity: .93; pointer-events: none; }
.first-light-terminator-edge { fill: none; stroke: #e3efff; stroke-width: .11; opacity: .78; pointer-events: none; }
.station-truss, .station-antenna { fill: none; stroke: #dbe9ff; stroke-width: .55; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.station-tower-brace { fill: none; stroke: #344a63; stroke-width: .65; vector-effect: non-scaling-stroke; }
.commit-ship { opacity: .95; }
.commit-ship-hull { fill: #9db5c8; stroke: #d8efff; stroke-width: .16; stroke-linejoin: round; }
.commit-ship-canopy { fill: #baf9f0; stroke: #f0fffd; stroke-width: .12; }
.commit-ship-wing-mark { fill: none; stroke: #435873; stroke-width: .12; stroke-linecap: round; }
.commit-ship-engine { fill: none; stroke: #82f2d0; stroke-width: .48; stroke-linecap: round; filter: drop-shadow(0 0 1.5px #69f5d0); }
.commit-ship.ship-taurus .commit-ship-hull { fill: #a8b9ca; stroke: #e1efff; stroke-width: .18; }
.commit-ship.ship-taurus .commit-ship-cargo { fill: #687d95; stroke: #b8d0e5; stroke-width: .16; }
.commit-ship.ship-ironclad .commit-ship-hull { fill: #899bae; stroke: #d5e6f7; stroke-width: .22; }
.commit-ship.ship-ironclad .commit-ship-cargo, .commit-ship.ship-ironclad .commit-ship-module { fill: #5e7188; stroke: #b5cde2; stroke-width: .18; }
.commit-ship.ship-inbound .commit-ship-hull { fill: #8ba9d4; stroke: #deebff; }
.commit-ship.ship-inbound .commit-ship-canopy { fill: #d3e8ff; }
.commit-ship.ship-inbound .commit-ship-engine { stroke: #9bc5ff; filter: drop-shadow(0 0 1.5px #79aaff); }
.commit-trail { pointer-events: none; }
.commit-trail-link-aura { fill: none; stroke: var(--trail-color); stroke-width: 2.6; stroke-linecap: round; vector-effect: non-scaling-stroke; filter: blur(1.4px); }
.commit-trail-link-core { fill: none; stroke: var(--trail-color); stroke-width: .9; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.interplanetary-traffic, .interplanetary-flight { pointer-events: none; }
.interplanetary-trail-aura { fill: none; stroke: #75e4d3; stroke-width: 2.7; stroke-linecap: round; opacity: .42; filter: blur(1.7px); }
.interplanetary-trail { fill: none; stroke: #b7fff0; stroke-width: .82; stroke-linecap: round; opacity: .88; }
.flight-inbound .interplanetary-trail-aura { stroke: #7caeff; }
.flight-inbound .interplanetary-trail { stroke: #d6e8ff; }
.interplanetary-hull { fill: #adbed0; stroke: #e9f5ff; stroke-width: .2; stroke-linejoin: round; }
.interplanetary-canopy { fill: #c6fff3; stroke: #fff; stroke-width: .12; }
.interplanetary-engine { fill: none; stroke: #8dffe1; stroke-width: .58; stroke-linecap: round; filter: drop-shadow(0 0 1.5px #69f5d0); }
.flight-inbound .interplanetary-hull { fill: #91aaca; }
.flight-inbound .interplanetary-canopy { fill: #e4efff; }
.flight-inbound .interplanetary-engine { stroke: #a9cbff; filter: drop-shadow(0 0 1.5px #79aaff); }
.branch-highlighted .station-ring-outer { fill: #405737; stroke: #cde99f; }
.branch-highlighted .satellite-core, .branch-highlighted .commit-ship-hull { fill: #e4ffb0; opacity: 1; }
.branch-highlighted .station-module { stroke: #e4ffb0; }
.branch-highlighted .commit-ship-canopy { fill: #fff; }
.branch-highlighted .commit-ship-engine { stroke: #e4ffb0; }
.commit-trail.branch-highlighted .commit-trail-link-core { stroke: #f8ffe6; }
.branch-dimmed { opacity: .3; }
/* Materials keep tiny craft readable and reveal panel detail as the camera approaches. */
.station-visual, .craft-visual { --engine-color: #94f7df; }
.station-visual .station-ring, .station-visual .satellite-core,
.station-visual .station-module, .station-visual .station-truss,
.station-visual .station-antenna { vector-effect: none; stroke-width: .16; filter: none; }
.station-visual .station-ring-outer { stroke-dasharray: none; }
.station-visual .station-ring-inner { fill: #07111e; stroke: #e1e4dc; stroke-width: .14; }
.station-visual .station-truss { stroke: #b7c5c8; }
.station-boom { fill: #8199aa; }
.station-solar { stroke: #a5becc; stroke-width: .12; }
.station-solar-grid { fill: none; stroke: #88b7d2; stroke-width: .05; opacity: .7; }
.station-rib { fill: none; stroke: #263b4f; stroke-width: .1; }
.station-dish { stroke: #c6deea; stroke-width: .14; }
.station-running-lights { fill: none; stroke: #bbf9ed; stroke-width: .14; stroke-linecap: round; }
.craft-visual .craft-hull { stroke: #e2eaf0; stroke-width: .065; }
.craft-visual .craft-canopy { stroke: #cefbff; stroke-width: .04; }
.craft-keel { fill: #14263b; opacity: .44; }
.craft-seams { fill: none; stroke: #243c51; stroke-width: .055; stroke-linecap: round; }
.craft-visual .craft-cargo { stroke: #a6b7c4; stroke-width: .055; }
.craft-exhaust { fill: var(--engine-color); opacity: .28; }
.craft-visual .craft-engine { stroke: var(--engine-color); stroke-width: .15; filter: drop-shadow(0 0 .3px var(--engine-color)); }
.craft-running-light { fill: #e6fff1; }
.ship-inbound .craft-visual, .flight-inbound .craft-visual { --engine-color: #a9ceff; }
.branch-highlighted .craft-visual { --engine-color: #e4ffb0; }
.branch-highlighted .craft-hull, .branch-highlighted .station-ring-outer { stroke: #e4ffb0; stroke-width: .14; }
.first-light-supernova {
  position: absolute; z-index: 2; width: var(--nova-size); aspect-ratio: 1; transform: translate(-50%, -50%);
  pointer-events: none; border-radius: 50%; mix-blend-mode: screen;
}
.first-light-supernova i { position: absolute; display: block; left: 50%; top: 50%; border-radius: 50%; transform: translate(-50%, -50%); }
.supernova-rays {
  width: 100%; height: 100%; opacity: 0;
  background: repeating-conic-gradient(from 2deg, #dff2ff 0deg 1deg, transparent 1.4deg 10deg, #ffc9ad 10deg 10.7deg, transparent 11deg 18deg);
  -webkit-mask: radial-gradient(circle, transparent 0 24%, #000 35% 72%, transparent 84%);
  mask: radial-gradient(circle, transparent 0 24%, #000 35% 72%, transparent 84%);
  filter: drop-shadow(0 0 8px #abcaff); animation: nova-ray-bloom 1.25s cubic-bezier(.12,.68,.18,1) both;
}
.supernova-wave { width: 31%; height: 31%; border: 2px solid #e3f5ff; opacity: 0; box-shadow: 0 0 9px #bde1ff, inset 0 0 8px #a8c8ff; animation: nova-shockwave 1.45s cubic-bezier(.12,.68,.18,1) both; }
.supernova-wave-second { border-color: #d6baff; box-shadow: 0 0 12px #c3a5ff; animation-delay: .16s; }
.supernova-flash { width: 17%; height: 17%; opacity: 0; background: #fff; box-shadow: 0 0 15px 8px #fff, 0 0 45px 24px #9dc1ff, 0 0 86px 36px #7e70ff99; animation: nova-core-flash .62s ease-out both; }
@keyframes nova-ray-bloom { 0% { opacity: 0; transform: translate(-50%,-50%) scale(.16) rotate(-12deg); } 17% { opacity: .95; } 100% { opacity: 0; transform: translate(-50%,-50%) scale(1.08) rotate(25deg); } }
@keyframes nova-shockwave { 0% { opacity: 0; transform: translate(-50%,-50%) scale(.18); } 13% { opacity: .96; } 100% { opacity: 0; transform: translate(-50%,-50%) scale(3.05); } }
@keyframes nova-core-flash { 0% { opacity: 0; transform: translate(-50%,-50%) scale(.2); } 18% { opacity: 1; transform: translate(-50%,-50%) scale(1.3); } 100% { opacity: 0; transform: translate(-50%,-50%) scale(.58); } }
.first-light-branch-summary { margin: 0 0 16px; padding: 0 0 14px; border-bottom: 1px solid #303e61; }
.first-light-branch-summary h3 { color: var(--muted); font: 10px var(--mono); margin: 0 0 8px; }
.first-light-branch-summary .detail-action { margin-top: 12px; }
.first-light-branch-list { margin-top: 13px; font: 10px var(--mono); color: #b5c3e5; }
.first-light-branch-list summary { cursor: pointer; padding: 5px 0; }
.first-light-branch-rows { max-height: 145px; overflow-y: auto; margin-top: 8px; }
.first-light-branch-row { display: flex; width: 100%; justify-content: space-between; gap: 10px; padding: 9px 7px; background: none; border: 0; color: #9dabc9; text-align: left; font: 10px var(--mono); }
.first-light-branch-row strong { font-weight: 400; overflow: hidden; text-overflow: ellipsis; }
.first-light-branch-row small { font-size: 9px; white-space: nowrap; }
.first-light-branch-row[aria-pressed="true"] { background: #aaca6617; color: #d1eca9; }
@media (max-width: 650px) {
  .first-light-scales { top: 144px; width: max-content; max-width: calc(100% - 28px); }
  .first-light-scales button { font-size: 10px; padding: 8px; }
  .first-light-kluster-source { top: 190px; right: 14px; width: 230px; padding: 6px 8px; }
  .first-light-kluster-source p { font-size: 9px; }
  .star-kluster-view .kluster-subtitle { font-size: 11px; }
  .first-light-account-note { top: 193px; max-width: calc(100% - 104px); width: 270px; font-size: 9px; }
}
