/*
 * Dead Reckoning — Used Future / Industrial Polychrome visual pass
 * Build 0007.1.x
 *
 * Additive art-direction layer. It does not change gameplay state, silhouettes,
 * saved data, location stages, or established motion choreography.
 * Color always follows a material, light, energy, heat, signal, or anomaly source.
 */

:root {
  --dr-cyan: #78c8c1;
  --dr-cyan-soft: #8fb9b3;
  --dr-cyan-dim: #537f7c;
  --dr-amber: #d4aa63;
  --dr-amber-soft: #b79b70;
  --dr-rust: #b97048;
  --dr-rust-dim: #815848;
  --dr-danger: #d76d55;
  --dr-cold: #d7e5e2;
  --dr-steel: #93a4a7;
  --dr-steel-dim: #647379;
  --dr-anomaly: #b7a0ca;
  --dr-anomaly-cold: #8bb9c8;
  --dr-space: #060908;
}

/* ------------------------------------------------------------
 * Shared character-native stage: richer physical light, not HUD glow.
 * ------------------------------------------------------------ */
.scene-stage {
  border-color: rgba(102, 127, 122, .82);
  background-color: var(--dr-space);
  box-shadow:
    inset 0 0 0 1px rgba(215, 229, 226, .018),
    inset 0 -26px 54px rgba(0, 0, 0, .34),
    0 0 18px rgba(73, 120, 113, .045);
}

.scene-stage::before,
.scene-stage::after {
  content: "";
  position: absolute;
  pointer-events: none;
  z-index: 0;
}

.scene-stage::before {
  inset: 0;
  background:
    radial-gradient(circle at 72% 28%, rgba(120, 200, 193, .055), transparent 24%),
    radial-gradient(circle at 22% 72%, rgba(212, 170, 99, .035), transparent 26%),
    linear-gradient(115deg, transparent 0 44%, rgba(215, 229, 226, .012) 45%, transparent 46% 100%);
  opacity: .78;
  animation: dr-stage-light-breathe 9.6s ease-in-out infinite;
}

.scene-stage::after {
  left: 8%;
  right: 8%;
  bottom: 7px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(120, 200, 193, .2) 28%, rgba(212, 170, 99, .13) 63%, transparent);
  opacity: .5;
  animation: dr-service-bus 8.2s ease-in-out infinite;
}

.scene-layer--stars {
  color: rgba(126, 158, 153, .56);
  text-shadow: 0 0 7px rgba(120, 200, 193, .14);
}

/* ------------------------------------------------------------
 * Glyph Surface: metal is neutral; glass/energy/heat carry source color.
 * ------------------------------------------------------------ */
.scene-surface .surface-metal { color: #a7b3b2; }
.scene-surface .surface-lit { color: #c5d1cf; }
.scene-surface .surface-mid { color: #9eabaa; }
.scene-surface .surface-shade { color: #687579; }
.scene-surface .surface-grain { color: #8e8176; }
.scene-surface .surface-glass {
  color: var(--dr-cyan);
  text-shadow: 0 0 9px rgba(120, 200, 193, .42);
}
.scene-surface .surface-patch { color: #b88a69; }
.scene-surface .surface-module { color: #a6b6b8; }
.scene-surface .surface-engine {
  color: #d6e9e5;
  text-shadow: 0 0 9px rgba(120, 200, 193, .62);
}
.scene-surface .surface-lamp {
  color: #f0c77b;
  text-shadow: 0 0 10px rgba(212, 170, 99, .66);
}
.scene-surface .surface-pool { color: #c8ad80; }
.scene-surface .surface-fabric { color: #8f7467; }
.scene-surface .surface-occlusion { background: #070a09; }

.scene-stage--hull-worn .surface-patch { color: #c1825d; }
.scene-stage--hull-critical .surface-patch,
.scene-stage--hull-critical .scene-damage-spark {
  color: var(--dr-danger);
  text-shadow: 0 0 9px rgba(215, 109, 85, .62);
}

/* ------------------------------------------------------------
 * DR-17 / berth: cold electronics + old work lights + hot repair scars.
 * ------------------------------------------------------------ */
.scene-stage--ship,
.scene-stage--berth {
  background:
    radial-gradient(circle at 72% 46%, rgba(120, 200, 193, .12), transparent 28%),
    radial-gradient(circle at 26% 38%, rgba(212, 170, 99, .075), transparent 24%),
    radial-gradient(circle at 52% 80%, rgba(185, 112, 72, .045), transparent 21%),
    linear-gradient(180deg, rgba(215,229,226,.018), transparent 48%),
    #060908;
}

.scene-layer--dock { color: #7d8989; }
.scene-layer--service,
.scene-connector,
.scene-service-light { color: var(--dr-cyan-soft); }
.scene-world-mark { color: #84928f; }
.scene-world-mark--berth { color: var(--dr-amber-soft); }
.scene-world-mark--ship-docked { color: var(--dr-cyan-soft); }
.scene-engine-glow {
  color: var(--dr-cold);
  text-shadow: 0 0 10px rgba(120, 200, 193, .56);
}

.scene-stage--berth .scene-layer--dock {
  text-shadow: 0 0 8px rgba(212, 170, 99, .08);
}

/* ------------------------------------------------------------
 * Facilities: each space gets one primary physical source.
 * ------------------------------------------------------------ */
.scene-stage--recycler,
.scene-stage--tekk {
  background:
    radial-gradient(circle at 62% 38%, rgba(212,170,99,.12), transparent 24%),
    radial-gradient(circle at 28% 68%, rgba(185,112,72,.085), transparent 30%),
    #090907;
}
.scene-layer--recycler,
.scene-layer--tekk { color: #a99179; }
.scene-facility-light--recycler,
.scene-tekk-resonance {
  color: var(--dr-cyan);
  text-shadow: 0 0 9px rgba(120,200,193,.42);
}

.scene-stage--services,
.scene-stage--mara {
  background:
    radial-gradient(circle at 54% 35%, rgba(212,170,99,.14), transparent 23%),
    radial-gradient(circle at 63% 70%, rgba(120,200,193,.075), transparent 28%),
    radial-gradient(circle at 31% 76%, rgba(185,112,72,.07), transparent 25%),
    #090906;
}
.scene-layer--services { color: #9aa7a5; }
.scene-facility-light--services { color: var(--dr-cyan); }
.scene-layer--mara { color: #a9aaa1; }
.scene-mara-spark,
.scene-home-weld {
  color: #e18a4c;
  text-shadow: 0 0 11px rgba(225, 138, 76, .72);
}

.scene-stage--archive,
.scene-stage--home {
  background:
    radial-gradient(circle at 38% 46%, rgba(212,170,99,.095), transparent 27%),
    radial-gradient(circle at 74% 48%, rgba(120,200,193,.065), transparent 22%),
    #080907;
}
.scene-layer--archive,
.scene-layer--home { color: #a3aaa3; }
.scene-archive-trace--a,
.scene-home-dust { color: #b28d64; }
.scene-archive-trace--b,
.scene-home-order { color: var(--dr-cyan-soft); }

.scene-stage--elder-warm {
  background:
    radial-gradient(circle at 30% 54%, rgba(212,170,99,.16), transparent 25%),
    radial-gradient(circle at 72% 44%, rgba(185,112,72,.065), transparent 26%),
    #0b0907;
}
.scene-stage--elder-warm .scene-layer--elder { color: #b09a84; }
.scene-elder-steam { color: #d8c5a4; }
.scene-stage--elder-empty {
  background:
    radial-gradient(circle at 50% 48%, rgba(112,145,151,.055), transparent 34%),
    #070a0a;
}
.scene-stage--elder-empty .scene-layer--elder { color: #66777b; }

.scene-stage--rusk {
  background:
    radial-gradient(circle at 61% 36%, rgba(120,200,193,.11), transparent 18%),
    radial-gradient(circle at 35% 70%, rgba(212,170,99,.045), transparent 24%),
    #060a08;
}
.scene-layer--rusk { color: #869a92; }
.scene-rusk-crt {
  color: #68c7aa;
  text-shadow: 0 0 10px rgba(104,199,170,.48);
}

/* ------------------------------------------------------------
 * Artifacts: specimen bench remains neutral, object owns its accent.
 * ------------------------------------------------------------ */
.scene-stage--artifact {
  background:
    radial-gradient(circle at 50% 48%, rgba(120,200,193,.065), transparent 34%),
    linear-gradient(90deg, rgba(215,229,226,.012), transparent 24% 76%, rgba(215,229,226,.012)),
    #070909;
}
.scene-layer--artifact-grid { color: rgba(116, 176, 173, .38); }
.scene-stage--artifact-blue-birth-glass .scene-layer--artifact {
  color: #7ab7df;
  text-shadow: 0 0 15px rgba(122,183,223,.42);
}
.scene-stage--artifact-worn-beacon-seal .scene-layer--artifact { color: #c3a968; }
.scene-stage--artifact-neral-resonance-tag .scene-layer--artifact { color: var(--dr-cyan); }
.scene-stage--artifact-maintenance-calibration-tab .scene-layer--artifact { color: #cad7d8; }
.scene-stage--artifact-scavenger-log-slate .scene-layer--artifact { color: #8ba58d; }
.scene-artifact-seal-glint {
  color: #e0c56a;
  text-shadow: 0 0 10px rgba(224,197,106,.58);
}
.scene-artifact-resonance { color: var(--dr-cyan); }

/* ------------------------------------------------------------
 * Salvage locations — protect existing choreography, strengthen sources.
 * ------------------------------------------------------------ */
.scene-stage--motion-rich {
  border-color: rgba(98, 127, 123, .86);
  box-shadow:
    inset 0 0 0 1px rgba(215,229,226,.016),
    inset 0 -34px 62px rgba(0,0,0,.4),
    0 0 20px rgba(78,135,126,.045);
}

.scene-stage--motion-relay {
  background:
    radial-gradient(circle at 50% 42%, rgba(120,200,193,.14), transparent 31%),
    radial-gradient(circle at 50% 78%, rgba(212,170,99,.04), transparent 25%),
    #060b0a;
}
.scene-stage--motion-relay .scene-layer--location-state { color: #9bb3af; }
.scene-stage--motion-relay .scene-layer--motion-relay-aura,
.motion-relay-antenna-tip,
.motion-relay-sway,
.motion-relay-pulse,
.motion-relay-carrier {
  color: var(--dr-cyan);
  text-shadow: 0 0 10px rgba(120,200,193,.4);
}

.scene-stage--motion-graveyard {
  background:
    radial-gradient(circle at 28% 62%, rgba(185,112,72,.105), transparent 28%),
    radial-gradient(circle at 74% 34%, rgba(120,200,193,.075), transparent 25%),
    radial-gradient(circle at 52% 48%, rgba(212,170,99,.045), transparent 36%),
    #080909;
}
.scene-stage--motion-graveyard .scene-layer--location-state { color: #9da8a5; }
.motion-graveyard-wreck--a { color: #8b9897; }
.motion-graveyard-wreck--b { color: #bd8c67; }
.motion-graveyard-wreck--c { color: #83aaa8; }
.motion-graveyard-route {
  color: var(--dr-amber);
  text-shadow: 0 0 9px rgba(212,170,99,.32);
}

.scene-stage--motion-wreck {
  background:
    radial-gradient(circle at 32% 50%, rgba(215,109,85,.09), transparent 28%),
    radial-gradient(circle at 72% 42%, rgba(120,200,193,.075), transparent 24%),
    #090909;
}
.scene-stage--motion-wreck .scene-layer--location-state { color: #a8b0ad; }
.scene-stage--motion-wreck .scene-layer--motion-wreck-rib { color: #778483; }
.motion-wreck-vent {
  color: var(--dr-danger);
  text-shadow: 0 0 8px rgba(215,109,85,.46);
}
.motion-wreck-scout,
.motion-wreck-wake {
  color: var(--dr-cyan-soft);
  text-shadow: 0 0 7px rgba(120,200,193,.28);
}

.scene-stage--motion-ore {
  background:
    radial-gradient(circle at 42% 50%, rgba(212,170,99,.11), transparent 31%),
    radial-gradient(circle at 72% 32%, rgba(120,200,193,.065), transparent 25%),
    radial-gradient(circle at 24% 72%, rgba(185,112,72,.055), transparent 23%),
    #090a08;
}
.scene-stage--motion-ore .scene-layer--location-state { color: #b3aa93; }
.scene-stage--motion-ore .scene-layer--motion-ore-haze { color: #7e8575; }
.motion-ore-fragment--a { color: #d1ad6b; }
.motion-ore-fragment--b { color: #889f9d; }
.motion-ore-fragment--c { color: #86b8b2; }
.motion-ore-fragment--d { color: #766c61; }
.motion-ore-fragment--e { color: #b97650; }
.motion-ore-trail { color: #85b9b2; }
.motion-ore-claim-marker {
  color: var(--dr-amber);
  text-shadow: 0 0 10px rgba(212,170,99,.4);
}

.scene-stage--motion-signal {
  background:
    radial-gradient(circle at 50% 45%, rgba(183,160,202,.18), transparent 30%),
    radial-gradient(circle at 50% 45%, rgba(139,185,200,.065), transparent 50%),
    #09080d;
  border-color: rgba(142, 125, 159, .72);
}
.scene-stage--motion-signal .scene-layer--location-state,
.scene-stage--motion-signal .scene-layer--motion-signal-atmosphere { color: #9c91aa; }
.motion-signal-core,
.motion-signal-ring,
.motion-signal-vector {
  color: var(--dr-anomaly);
  text-shadow: 0 0 11px rgba(183,160,202,.45);
}

/* Give existing world motion more readability without changing trajectories. */
.scene-stage--motion-rich .scene-layer--motion-stars,
.scene-stage--motion-rich .scene-layer--motion-graveyard-stars {
  color: #687b78;
  opacity: .8;
}
.motion-ore-fragment,
.motion-graveyard-wreck,
.motion-wreck-scout {
  filter: drop-shadow(0 0 4px rgba(120,200,193,.08));
}

/* ------------------------------------------------------------
 * Berth 09 panorama: one lived space, six local light identities.
 * ------------------------------------------------------------ */
.scene-stage--berth-map {
  border-color: rgba(100, 126, 121, .84);
  background:
    radial-gradient(circle at 18% 24%, rgba(212,170,99,.105), transparent 18%),
    radial-gradient(circle at 45% 22%, rgba(120,200,193,.10), transparent 17%),
    radial-gradient(circle at 81% 21%, rgba(104,199,170,.085), transparent 16%),
    radial-gradient(circle at 58% 53%, rgba(225,138,76,.06), transparent 16%),
    radial-gradient(circle at 73% 78%, rgba(120,200,193,.105), transparent 22%),
    #070908;
}
.scene-layer--berth-panorama {
  color: #a8b5b2;
  text-shadow: 0 0 10px rgba(120,200,193,.11);
}
.berth-panorama-marker { color: #9cacaa; }
.berth-panorama-marker--home,
.berth-panorama-marker--street { color: #b9a17c; }
.berth-panorama-marker--tekk,
.berth-panorama-marker--mara,
.berth-panorama-marker--dr17 { color: var(--dr-cyan-soft); }
.berth-panorama-marker--rusk { color: #77b69f; }
.berth-panorama-steam { color: #d5bd99; }
.berth-panorama-tekk-resonance,
.berth-panorama-rusk-crt { color: var(--dr-cyan); }
.berth-panorama-mara-spark { color: #e18a4c; }
.berth-panorama-engine {
  color: var(--dr-cold);
  text-shadow: 0 0 9px rgba(120,200,193,.5);
}

/* ------------------------------------------------------------
 * Physical personal terminal: instrument colors, not generic dashboard neon.
 * ------------------------------------------------------------ */
.terminal-screen--personal,
.pt-chassis {
  border-color: rgba(84, 111, 106, .9);
  background-color: #060908;
}
.pt-chassis {
  background:
    radial-gradient(circle at 78% 9%, rgba(120,200,193,.075), transparent 24%),
    radial-gradient(circle at 18% 82%, rgba(212,170,99,.035), transparent 26%),
    linear-gradient(180deg, rgba(215,229,226,.014), transparent 17%),
    #060908;
}
.pt-chassis::after {
  background: linear-gradient(90deg, transparent, rgba(120,200,193,.34) 18%, rgba(212,170,99,.11) 58%, transparent);
}
.pt-link-pulse,
.pt-overview-readout span,
.pt-card__head b,
.pt-device__head span { color: var(--dr-cyan); }
.pt-header strong { color: #c8d7d4; }
.pt-tab i { color: #87a09b; }
.pt-tab.is-active {
  color: #c7dbd7;
  background:
    linear-gradient(180deg, rgba(120,200,193,.055), transparent 78%),
    rgba(120,200,193,.012);
}
.pt-tab.is-active::before { color: var(--dr-cyan); }
.pt-tab.is-active::after { background: rgba(120,200,193,.34); }
.pt-overview-surface {
  border-color: rgba(84,111,106,.76);
  background:
    radial-gradient(circle at 22% 48%, rgba(120,200,193,.10), transparent 31%),
    radial-gradient(circle at 78% 52%, rgba(212,170,99,.04), transparent 27%),
    repeating-linear-gradient(118deg, transparent 0 12px, rgba(127,138,128,.025) 13px, transparent 14px 28px);
}
.pt-overview-glyph {
  color: #a8bab6;
  text-shadow: 0 0 10px rgba(120,200,193,.14);
}
.pt-metric strong { color: #c9dbd8; }
.pt-device { border-color: rgba(79,104,99,.9); }

/* ------------------------------------------------------------
 * Interaction surfaces: subtle powered hardware response.
 * ------------------------------------------------------------ */
.choice,
.utility-button {
  transition: border-color .16s ease, background-color .16s ease, color .16s ease, text-shadow .16s ease;
}
.choice:hover,
.choice:focus-visible {
  border-color: rgba(120,200,193,.48);
  background-color: rgba(120,200,193,.025);
}
.choice__key,
.utility-button--active { color: var(--dr-cyan-soft); }

/* ------------------------------------------------------------
 * Motion additions: only ambient light/energy sources. Existing semantic
 * choreography stays in glyph-diorama.css.
 * ------------------------------------------------------------ */
@keyframes dr-stage-light-breathe {
  0%, 100% { opacity: .56; transform: translate3d(0,0,0); }
  50% { opacity: .9; transform: translate3d(1px,-1px,0); }
}

@keyframes dr-service-bus {
  0%, 100% { opacity: .24; transform: scaleX(.88); }
  48%, 56% { opacity: .68; transform: scaleX(1); }
}

@media (prefers-reduced-motion: reduce) {
  .scene-stage::before,
  .scene-stage::after {
    animation: none !important;
  }
  .scene-stage::before { opacity: .62; }
  .scene-stage::after { opacity: .32; }
}

@media (max-width: 430px) {
  .scene-stage::after { left: 12%; right: 12%; }
  .scene-stage {
    box-shadow:
      inset 0 0 0 1px rgba(215,229,226,.014),
      inset 0 -18px 36px rgba(0,0,0,.31);
  }
}
