/* Galaxy Speed Trap: the Deep-Sky Speed Trap's night console (spectrograph, Hubble plot, sky map). Scene by art.js,
   colors from the --gst-* properties below. */
html {
  --gst-sky1: #1b2350; --gst-sky2: #0b1028; --gst-frame: #a9b8e8; --gst-bezel1: rgba(32, 44, 96, .78); --gst-bezel2: rgba(14, 20, 50, .82);
  --gst-label: #f2f5ff; --gst-halo: #0b1028; --gst-grid: rgba(190, 205, 255, .18); --gst-axisline: #cdd7ff;
  --gst-absorb: #0a0d1c; --gst-comb: #121833; --gst-tooth: #ffe066; --gst-rest: #ffffff; --gst-yours: #ffb02e; --gst-fit: #59e39a;
  --gst-pt: #ffffff; --gst-sel: #ffd23f; --gst-arrow: #ff9a6b;
  --gst-ink: #17242c; --gst-panel1: #f6f8fd; --gst-panel2: #e6eaf6; --gst-accent: #21576b; --gst-ok: #13704a; --gst-bad: #b3261e;
  --gst-chip: #ffffff; --gst-chip-on: #d6eaf0; --gst-card: #ffffff;
}
html[data-theme="dark"] {
  --gst-sky1: #121838; --gst-sky2: #05070f; --gst-frame: #7d8dc4; --gst-bezel1: rgba(26, 34, 76, .8); --gst-bezel2: rgba(8, 12, 30, .85);
  --gst-ink: #e8eff3; --gst-panel1: #1d2333; --gst-panel2: #151a28; --gst-accent: #8cc8dc; --gst-ok: #4fd08c; --gst-bad: #ff8a80;
  --gst-chip: #171c2a; --gst-chip-on: #1b3d4a; --gst-card: #1a2030;
}
.gst { position: absolute; inset: 0; display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 12px; padding: 10px; color: var(--tlg-text); font-size: 16px; }
.gst input, .gst button { font: inherit; }
.gst-controls { display: flex; flex-direction: column; gap: 6px; min-height: 0; overflow: auto; padding: 8px 12px;
  background: linear-gradient(var(--gst-panel1), var(--gst-panel2)); color: var(--gst-ink); border: 3px solid var(--gst-accent); border-radius: 14px; box-shadow: 0 3px 8px rgba(0,0,0,.16); }
.gst-right { display: flex; flex-direction: column; gap: 6px; min-width: 0; min-height: 0; overflow: auto; }
.gst-kicker { margin: 0; font-size: 16px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--gst-accent); }
.gst-step, .gst-step-b { display: grid; gap: 3px; }
.gst-step-h { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 17px; line-height: 1.2; }
.gst-n { flex: none; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--gst-accent); color: #fff; font-size: 16px; font-weight: 800; }
html[data-theme="dark"] .gst-n { color: #0d1a24; }
.gst-step.is-done .gst-n { background: var(--gst-ok); }
.gst-mark { margin-left: auto; font-weight: 800; white-space: nowrap; }
.gst-mark.is-ok, .gst-fmark.is-ok { color: var(--gst-ok); }
.gst-mark.is-bad, .gst-fmark.is-bad { color: var(--gst-bad); }
.gst-note { margin: 0; line-height: 1.25; font-size: 16px; opacity: .85; }
.gst-dial { display: grid; gap: 0; }
.gst-dial-h { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; }
.gst-dial-v { font-weight: 800; color: var(--gst-accent); white-space: nowrap; font-variant-numeric: tabular-nums; }
.gst-dial.is-unset .gst-dial-v { font-weight: 600; font-style: italic; color: var(--gst-ink); opacity: .8; }
.gst-dial-row { display: grid; grid-template-columns: 40px minmax(0, 1fr) 40px; align-items: center; gap: 6px; }
.gst-dial input { width: 100%; min-height: 30px; margin: 0; accent-color: var(--gst-accent); cursor: pointer; }
.gst-dial.is-unset input { opacity: .55; }
.gst-step-btn { min-height: 36px; border-radius: 10px; border: 2px solid var(--gst-accent); background: var(--gst-chip); color: var(--gst-ink); font-size: 20px; font-weight: 800; line-height: 1; cursor: pointer; }
.gst-step-btn:disabled { opacity: .45; cursor: default; }
.gst input:focus-visible, .gst button:focus-visible { outline: 3px solid var(--tlg-focus, #1a73e8); outline-offset: 2px; }
.gst-num { display: grid; gap: 1px; min-width: 0; }
.gst-num-l { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 6px; font-weight: 700; line-height: 1.2; }
.gst-fmark { font-weight: 800; }
.gst-num-row { display: flex; align-items: center; gap: 6px; }
.gst-num input { flex: 1 1 auto; min-width: 0; width: 100%; font-size: 17px; min-height: 38px; padding: 3px 8px; border: 2px solid #8796a1; border-radius: 8px; background: #fff; color: #17242c; }
html[data-theme="dark"] .gst-num input { background: #10141f; color: #eef3f6; border-color: #6d7f8c; }
.gst-num input:disabled { opacity: .8; }
.gst-unit { flex: none; font-weight: 700; min-width: 44px; }
.gst-chips { display: grid; gap: 4px; }
.gst-chip { position: relative; display: flex; align-items: center; min-height: 38px; padding: 3px 24px 3px 9px; border: 2px solid #9fb0bc; border-radius: 10px;
  background: var(--gst-chip); color: var(--gst-ink); font-size: 16px; line-height: 1.15; text-align: left; cursor: pointer; }
html[data-theme="dark"] .gst-chip { border-color: #4d606d; }
.gst-chip:hover:not(:disabled) { border-color: var(--gst-accent); }
.gst-chip.is-on { border-color: var(--gst-accent); background: var(--gst-chip-on); font-weight: 700; box-shadow: inset 0 0 0 1px var(--gst-accent); }
.gst-chip.is-on::before { content: '●'; margin-right: 5px; color: var(--gst-accent); }
.gst-chip-m { position: absolute; right: 6px; font-weight: 800; }
.gst-chip.is-key { border-color: var(--gst-ok); box-shadow: inset 0 0 0 2px var(--gst-ok); }
.gst-chip.is-key .gst-chip-m { color: var(--gst-ok); }
.gst-chip.is-wrong { border-color: var(--gst-bad); border-style: dashed; }
.gst-chip.is-wrong .gst-chip-m { color: var(--gst-bad); }
.gst-chip:disabled { cursor: default; opacity: 1; }
/* the log */
.gst-log { flex: none; display: grid; gap: 4px; }
.gst-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.gst-card { display: grid; gap: 0; padding: 3px 9px; border: 2px solid #9fb0bc; border-radius: 10px; background: var(--gst-card); color: var(--gst-ink); line-height: 1.25; font-variant-numeric: tabular-nums; }
.gst-card.is-sel { border-color: #d4a600; box-shadow: inset 0 0 0 1px #d4a600; }
html[data-theme="dark"] .gst-card { border-color: #4d606d; }
html[data-theme="dark"] .gst-card.is-sel { border-color: var(--gst-sel); box-shadow: inset 0 0 0 1px var(--gst-sel); }
.gst-card-n { font-weight: 800; }
.gst-log-k { margin: 0; padding: 2px 10px; border-radius: 8px; background: var(--gst-panel2); color: var(--gst-ink); line-height: 1.3; }
.gst-scene { flex: none; border-radius: 12px; overflow: hidden; border: 2px solid #0b1028; }
.gst-svg { display: block; width: 100%; height: auto; }
.gst-svg text { font-family: var(--tlg-font); }
.gst-bezel { fill: url(#gst-g-panel); stroke: var(--gst-frame); stroke-width: 1.5; opacity: .92; }
.gst-bezel--sky { fill: rgba(5, 8, 22, .35); }
.gst-plate { font-size: 17px; font-weight: 800; fill: var(--gst-label); letter-spacing: .03em; }
.gst-plate--sub { font-size: 16px; font-weight: 600; opacity: .85; }
.gst-side { font-size: 16px; font-weight: 700; fill: var(--gst-label); }
.gst-side--lamp { fill: var(--gst-tooth); }
.gst-axis { fill: var(--gst-label); stroke: var(--gst-axisline); font-size: 16px; }
.gst-axis text { stroke: none; font-weight: 600; }
.gst-axis path { stroke-width: 1.5; }
.gst-grid path { stroke: var(--gst-grid); stroke-width: 1; }
.gst-plotaxis { fill: none; stroke: var(--gst-axisline); stroke-width: 2; }
.gst-absorb { fill: var(--gst-absorb); opacity: .92; }
.gst-absorb--wide { opacity: .85; }
.gst-comb-bg { fill: var(--gst-comb); stroke: var(--gst-frame); stroke-width: 1; }
.gst-tooth { fill: var(--gst-tooth); filter: drop-shadow(0 0 2px var(--gst-tooth)); }
.gst-tooth.is-rest { opacity: .55; filter: none; }
.gst-restline { stroke: #0b1028; stroke-width: 2.5; stroke-dasharray: 5 3; }
.gst-lampline { stroke: var(--gst-tooth); stroke-width: 3; filter: drop-shadow(0 0 2px #000); }
.gst-lampline.is-rest { opacity: .6; }
.gst-lampline.is-true { stroke: var(--gst-fit); stroke-width: 2; stroke-dasharray: 3 3; }
.gst-loupe-box { fill: none; stroke: var(--gst-tooth); stroke-width: 1.5; stroke-dasharray: 3 2; }
.gst-leader { fill: none; stroke: var(--gst-frame); stroke-width: 1; opacity: .7; }
.gst-lbl { font-size: 16px; font-weight: 800; fill: var(--gst-label); paint-order: stroke; stroke: var(--gst-halo); stroke-width: 5px; stroke-linejoin: round; }
.gst-lbl--sm { font-weight: 700; }
.gst-lbl--lamp { fill: var(--gst-tooth); }
.gst-lbl--yours { fill: var(--gst-yours); }
.gst-lbl--fit { fill: var(--gst-fit); }
.gst-pt circle { fill: var(--gst-pt); stroke: #0b1028; stroke-width: 2; }
.gst-pt.is-sel circle { fill: var(--gst-sel); }
.gst-pt .gst-pt-ring { fill: none; stroke: var(--gst-sel); stroke-width: 2.5; stroke-dasharray: 4 3; }
.gst-yourline { stroke: var(--gst-yours); stroke-width: 3.5; stroke-dasharray: 10 6; fill: none; }
.gst-fitline { stroke: var(--gst-fit); stroke-width: 3; fill: none; filter: drop-shadow(0 0 3px rgba(89, 227, 154, .6)); }
.gst-reticle circle { fill: none; stroke: var(--gst-sel); stroke-width: 2; stroke-dasharray: 5 4; }
.gst-reticle path { stroke: var(--gst-sel); stroke-width: 2.5; }
.gst-arrow { stroke: var(--gst-arrow); stroke-width: 3; fill: none; }
.gst-photon-seg { fill: none; stroke-width: 2.5; stroke-linecap: round; }
.gst.is-playing .gst-skyplate, .gst.is-revealed .gst-skyplate { fill: var(--gst-fit); opacity: 1; }
.gst.is-playing .gst-reticle { animation: gst-ping .8s ease-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes gst-ping { 50% { opacity: .35; } }
.gst-readout { flex: none; padding: 4px 12px; border-radius: 10px; background: var(--gst-panel2); color: var(--gst-ink); }
.gst-readout p { margin: 0; line-height: 1.3; }
.gst-about { flex: none; padding: 2px 10px; border: 1px solid var(--tlg-border); border-radius: 8px; }
.gst-about summary { cursor: pointer; min-height: 30px; font-weight: 700; display: flex; align-items: center; }
.gst-about p { margin: 4px 0; }
.gst-ex { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 12px; align-items: center; }
.gst-ex-art svg { width: 100%; height: auto; display: block; }
.gst-ex-t { border-collapse: collapse; font-size: 16px; }
.gst-ex-t th, .gst-ex-t td { padding: 3px 8px; border-bottom: 1px solid var(--tlg-border); text-align: left; }
@media (max-width: 900px) {
  .gst { position: static; grid-template-columns: 1fr; }
  .gst-controls, .gst-right { overflow: visible; }
  .gst-cards { grid-template-columns: 1fr; }
  .gst-ex { grid-template-columns: 1fr; }
  .gst-ex-art { max-width: 200px; }
}
@media (prefers-reduced-motion: reduce) { .gst *, .gst *::before { animation: none !important; transition: none !important; } }
