/* ═══════════════════════════════════════════════════════════════════════
   LCARS · colour schemes
   Palettes reconstructed by eye from screen-accurate references of the
   Okudagram sets. Fan interpretation, not official specification.
   ═══════════════════════════════════════════════════════════════════════ */

/* ── TNG · Galaxy-class, LCARS 24 (seasons 3–7) ────────────────────────
   The canonical Okudagram set: orange, sunflower, african violet,
   periwinkle blue and salmon on pure black.                            */
body.theme-tng{
  --bg:        #000000;
  --panel-bg:  #0a0a0c;
  --fg:        #ff9c00;
  --c1:        #ff9c00;   /* orange          */
  --c2:        #ffcc66;   /* sunflower       */
  --c3:        #cc99cc;   /* african violet  */
  --c4:        #9c9cff;   /* periwinkle      */
  --c5:        #cc6666;   /* salmon          */
  --c6:        #ff9966;   /* butterscotch    */
  --c7:        #99ccff;   /* ice             */
  --c-ok:      #66cc66;
  --c-warn:    #ffcc00;
  --c-bad:     #cc4444;
  --glow:      0;
}

/* ── TNG FILMS · Sovereign-class, 2373 (First Contact / Insurrection) ──
   The film redesign: warm amber and bronze against steel blue and
   lavender grey, on a black with a faint blue cast. Lower chroma,
   higher contrast — reads as machined metal rather than plastic.       */
body.theme-films{
  --bg:        #01030a;
  --panel-bg:  #070a13;
  --fg:        #ffb05c;
  --c1:        #ffb05c;   /* amber           */
  --c2:        #c98d4b;   /* bronze          */
  --c3:        #7b94c4;   /* steel blue      */
  --c4:        #a9a6d8;   /* lavender grey   */
  --c5:        #c85b4b;   /* brick           */
  --c6:        #e2d2a8;   /* parchment       */
  --c7:        #5c7396;   /* deep slate      */
  --c-ok:      #7cc47c;
  --c-warn:    #e8b44c;
  --c-bad:     #c24238;
  --glow:      1;
}

/* ── NEMESIS · Sovereign-class refit, 2379 ─────────────────────────────
   Cooler and greyer than First Contact; pale steel dominates, amber is
   reserved for live values.                                            */
body.theme-nemesis{
  --bg:        #02040a;
  --panel-bg:  #080b12;
  --fg:        #b9c9e4;
  --c1:        #b9c9e4;   /* pale steel      */
  --c2:        #e9a94f;   /* amber accent    */
  --c3:        #6d84a6;   /* slate           */
  --c4:        #9fb4d0;   /* powder blue     */
  --c5:        #c2564e;   /* brick           */
  --c6:        #d8dfe8;   /* bone            */
  --c7:        #43566e;   /* graphite blue   */
  --c-ok:      #6fbf8f;
  --c-warn:    #e9a94f;
  --c-bad:     #c2564e;
  --glow:      1;
}

/* ── VOYAGER · Intrepid-class, LCARS 2371 ──────────────────────────────
   Softer and cooler than the TNG series set: periwinkle and mauve carry
   the frame, orange is used sparingly for command functions.           */
body.theme-voyager{
  --bg:        #000002;
  --panel-bg:  #08080e;
  --fg:        #ff9f55;
  --c1:        #ff9f55;   /* command orange  */
  --c2:        #f0c67a;   /* tan gold        */
  --c3:        #9da8d8;   /* periwinkle      */
  --c4:        #b9a2d0;   /* mauve           */
  --c5:        #d06c5e;   /* salmon red      */
  --c6:        #7fa8d8;   /* sky             */
  --c7:        #6e7ba8;   /* dusk blue       */
  --c-ok:      #72c48c;
  --c-warn:    #f0c67a;
  --c-bad:     #d06c5e;
  --glow:      .6;
}

/* ── ambient bloom (film-era sets) ─────────────────────────────────── */
body .lc-block, body .lc-btn, body .lc-elbow, body .w-title, body .w-code, body .w-rule{
  box-shadow: 0 0 calc(14px * var(--glow, 0)) rgba(255,190,120,calc(.13 * var(--glow, 0)));
}

/* ═══ ALERT CONDITIONS ═══════════════════════════════════════════════
   The sets never repainted a whole console on alert — the ship's scheme
   stayed legible and the condition announced itself through pulsing
   frame elements, an ambient wash and the alert panels themselves.     */
body.cond-yellow{ --alert: var(--c-warn); }
body.cond-red   { --alert: var(--c-bad);  }
body.cond-blue  { --alert: var(--c4);     }

body.cond-red .lc-elbow,
body.cond-yellow .lc-elbow,
body.cond-blue .lc-elbow{ animation: alertElbow 1.5s steps(2, end) infinite; }
@keyframes alertElbow{ 50%{ border-color: var(--alert); } }

body.cond-red .lc-side > *:nth-child(2n){ animation: alertBlock 1.5s steps(2, end) infinite; }
@keyframes alertBlock{ 50%{ background: var(--alert); } }

body.cond-red    .lc-titlebox .t1{ color: var(--alert); animation: blink 1.5s steps(2,end) infinite; }
body.cond-yellow .lc-titlebox .t1{ color: var(--alert); }
body.cond-blue   .lc-titlebox .t1{ color: var(--alert); }

/* ═══ THEME SWATCHES (control panel) ═════════════════════════════════ */
.sw{ display:flex; align-items:center; gap:9px; width:100%; }
.sw-dots{ display:flex; gap:3px; flex:0 0 auto; }
.sw-dots i{ width:9px; height:9px; border-radius:50%; display:block; }
.sw-name{ flex:1 1 auto; text-align:left; overflow:hidden; min-width:0; line-height:1.15; }
.sw-name em{ display:block; font-style:normal; font-size:9px; letter-spacing:.1em; opacity:.62;
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
