@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=Orbitron:wght@400;700;900&display=swap');

    :root {
      --bg: #00000c;
      --accent: #00ffe0;
      --accent2: #ff4500;
      --dim: rgba(0, 255, 224, 0.35);
      --text: #b0ffe8;
      --grid: rgba(0, 255, 224, 0.03);
    }

    * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
    }

    body {
      background: var(--bg);
      color: var(--text);
      font-family: 'Share Tech Mono', monospace;
      width: 100vw;
      height: 100vh;
      overflow: hidden;
      background-image:
        linear-gradient(var(--grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--grid) 1px, transparent 1px);
      background-size: 32px 32px;
    }

    header {
      position: absolute;
      top: 20px;
      left: 50%;
      transform: translateX(-50%);
      padding: 0;
      z-index: 15;
      pointer-events: auto;
      display: flex;
      justify-content: center;
      align-items: center;
    }

    .topbar-brand {
      display: flex;
      align-items: center;
      gap: 10px;
      text-align: left;
    }

    .brand-logo {
      width: 32px;
      height: 32px;
      object-fit: contain;
      filter: drop-shadow(0 0 8px rgba(0, 255, 224, 0.45));
      animation: logo-pulse 3s ease-in-out infinite;
    }

    @keyframes logo-pulse {

      0%,
      100% {
        transform: scale(1);
        filter: drop-shadow(0 0 10px rgba(0, 255, 224, 0.45));
      }

      50% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 18px rgba(0, 255, 224, 0.75));
      }
    }

    .brand-text {
      font-family: 'Orbitron', monospace;
    }

    .brand-text .mintbyte {
      font-size: 8px;
      font-weight: 700;
      color: #00e676;
      letter-spacing: 2px;
      margin-bottom: -2px;
    }

    .brand-text .horizon {
      font-size: 16px;
      font-weight: 900;
      color: #fff;
      letter-spacing: 3px;
      text-shadow: 0 0 20px rgba(0, 255, 224, 0.35);
    }

    .brand-text .sub {
      font-size: 9px;
      color: var(--dim);
      letter-spacing: 3px;
      margin-top: 2px;
      font-family: 'Share Tech Mono', monospace;
    }

    .hud-container {
      position: absolute;
      top: 0;
      left: 0;
      width: 100vw;
      height: 100vh;
      pointer-events: none;
      z-index: 10;
    }

    /* Floating Overview Card */
    .floating-overview-card {
      position: fixed;
      top: 16px;
      left: 16px;
      width: 260px;
      background: rgba(4, 10, 22, 0.42);
      backdrop-filter: blur(18px) saturate(1.4);
      -webkit-backdrop-filter: blur(18px) saturate(1.4);
      border: 1px solid rgba(0, 255, 224, 0.12);
      border-radius: 10px;
      padding: 10px 12px;
      z-index: 100;
      box-shadow: 0 2px 16px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.04);
      pointer-events: auto;
    }
    .floating-overview-card .card-title {
      font-size: 0.65rem;
      letter-spacing: 2px;
      margin-bottom: 6px;
    }
    #date-display {
      font-family: 'Orbitron', monospace;
      font-size: 1.1rem;
      font-weight: 700;
      color: #fff;
      margin-bottom: 4px;
      text-shadow: 0 0 10px rgba(255, 255, 255, 0.15);
      background: transparent;
      border: 0;
      padding: 0;
      cursor: pointer;
      text-align: left;
    }
    #date-display:hover {
      color: var(--accent);
    }
    .date-picker-popover {
      display: none;
      position: absolute;
      top: 72px;
      left: 12px;
      right: 12px;
      padding: 10px;
      background: rgba(2, 12, 24, 0.96);
      border: 1px solid rgba(0, 255, 224, 0.28);
      border-radius: 6px;
      box-shadow: 0 12px 32px rgba(0,0,0,0.55);
      z-index: 130;
    }
    .date-picker-popover.open {
      display: block;
    }
    .date-picker-popover label {
      display: block;
      margin-bottom: 6px;
      font-size: 0.58rem;
      letter-spacing: 0.16em;
      color: var(--dim);
      text-transform: uppercase;
    }
    .date-picker-popover input {
      width: 100%;
      height: 30px;
      box-sizing: border-box;
      background: rgba(0, 15, 30, 0.9);
      border: 1px solid rgba(0, 255, 224, 0.28);
      border-radius: 4px;
      color: #fff;
      padding: 4px 8px;
      font-family: 'Share Tech Mono', monospace;
      color-scheme: dark;
    }
    .date-picker-grid {
      display: grid;
      grid-template-columns: 1.2fr 0.8fr 0.8fr;
      gap: 6px;
      margin-top: 8px;
    }
    .date-picker-grid label {
      margin-bottom: 4px;
      font-size: 0.5rem;
      letter-spacing: 0.12em;
    }
    .date-picker-actions {
      display: flex;
      gap: 8px;
      margin-top: 8px;
    }
    .date-picker-actions button {
      flex: 1;
      height: 28px;
      border: 1px solid rgba(0, 255, 224, 0.35);
      border-radius: 4px;
      background: rgba(0, 255, 224, 0.06);
      color: var(--accent);
      font-family: 'Share Tech Mono', monospace;
      cursor: pointer;
    }
    #arc-display {
      font-size: 0.65rem;
      color: var(--dim);
      margin-bottom: 8px;
    }
    #arc-val {
      font-family: 'Orbitron', monospace;
      font-weight: 700;
      color: var(--accent);
    }

    /* Moon Phase Widget */
    .moon-phase-widget {
      margin-top: 10px;
      padding-top: 10px;
      border-top: 1px solid rgba(0,255,224,0.08);
      display: flex;
      align-items: center;
      gap: 10px;
    }
    .moon-phase-canvas-wrap {
      position: relative;
      flex-shrink: 0;
    }
    #moon-phase-canvas {
      border-radius: 50%;
      display: block;
      filter: drop-shadow(0 0 6px rgba(180,200,255,0.25));
    }
    .moon-phase-info {
      display: flex;
      flex-direction: column;
      gap: 3px;
      min-width: 0;
    }
    .moon-phase-name {
      font-family: 'Orbitron', monospace;
      font-size: 0.6rem;
      font-weight: 700;
      color: #fff;
      letter-spacing: 1px;
      text-transform: uppercase;
    }
    .moon-phase-illum {
      font-size: 0.62rem;
      color: var(--accent);
      letter-spacing: 0.5px;
    }
    .moon-phase-age {
      font-size: 0.58rem;
      color: var(--dim);
      letter-spacing: 0.5px;
    }
    .moon-phase-bar-wrap {
      width: 100%;
      height: 3px;
      background: rgba(0,255,224,0.08);
      border-radius: 2px;
      margin-top: 2px;
      overflow: hidden;
    }
    .moon-phase-bar {
      height: 100%;
      border-radius: 2px;
      background: linear-gradient(90deg, rgba(180,200,255,0.5), rgba(255,255,255,0.85));
      transition: none;
      will-change: width;
    }

    /* Floating Bottom Toolbar */
    .floating-bottom-toolbar {
      position: fixed;
      bottom: 10px;
      left: 50%;
      transform: translateX(-50%);
      background: rgba(4, 10, 22, 0.78);
      backdrop-filter: blur(20px) saturate(1.3);
      -webkit-backdrop-filter: blur(20px) saturate(1.3);
      border: 1px solid rgba(0, 255, 224, 0.28);
      border-radius: 12px;
      padding: 8px 18px;
      z-index: 1010;
      box-shadow: 0 0 0 1px rgba(0,255,224,0.06), 0 4px 24px rgba(0,0,0,0.7), 0 0 18px rgba(0,255,224,0.08);
      display: flex;
      align-items: center;
      gap: 12px;
      pointer-events: auto;
      font-family: 'Share Tech Mono', monospace;
      transition: opacity 0.3s ease;
    }
    .toolbar-group {
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .engine-model-group {
      position: relative;
    }
    .toolbar-divider {
      width: 1px;
      height: 20px;
      background: rgba(0, 255, 224, 0.15);
    }
    .toolbar-btn {
      background: rgba(0, 255, 224, 0.05);
      border: 1px solid rgba(0, 255, 224, 0.2);
      color: #fff;
      padding: 4px 8px;
      font-size: 0.65rem;
      border-radius: 4px;
      cursor: pointer;
      transition: all 0.2s;
      font-family: 'Share Tech Mono', monospace;
      outline: none;
    }
    .toolbar-btn:hover {
      background: rgba(0, 255, 224, 0.15);
      border-color: var(--accent);
    }
    .toolbar-select {
      font-size: 0.65rem;
      padding: 4px 8px;
      background: rgba(0, 10, 30, 0.6);
      border: 1px solid rgba(0, 255, 224, 0.2);
      color: #fff;
      border-radius: 4px;
      cursor: pointer;
      outline: none;
      width: auto !important;
      font-family: 'Share Tech Mono', monospace;
    }
    .engine-native-select {
      position: absolute;
      width: 1px !important;
      height: 1px;
      opacity: 0;
      pointer-events: none;
    }
    .ui-icon {
      width: 1.15em;
      height: 1.15em;
      min-width: 15px;
      min-height: 15px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex: 0 0 auto;
      color: currentColor;
      line-height: 1;
      vertical-align: -0.14em;
    }
    .ui-icon svg {
      width: 100%;
      height: 100%;
      display: block;
      fill: none;
      stroke: currentColor;
      stroke-width: 2;
      stroke-linecap: round;
      stroke-linejoin: round;
    }
    .ui-icon .fill {
      fill: currentColor;
      stroke: none;
    }
    .grayscale-silhouette {
      color: #aeb6c2 !important;
      filter: grayscale(1);
      opacity: 0.92;
    }
    .grayscale-silhouette .ui-icon svg {
      stroke-width: 1.7;
    }
    .grayscale-silhouette .ui-icon .fill {
      fill: currentColor;
    }
    .zenith-status-mark {
      width: 8px;
      height: 8px;
      display: inline-block;
      border-radius: 50%;
      background: #b7bec8;
      box-shadow: 0 0 8px rgba(183, 190, 200, 0.45);
    }
    .icon-label {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 0.45em;
      min-width: 0;
    }
    .toolbar-btn .ui-icon,
    .tab-btn .ui-icon {
      width: 16px;
      height: 16px;
      min-width: 16px;
      min-height: 16px;
    }
    #engine-picker-icon .ui-icon,
    .engine-picker-option .ui-icon {
      width: 18px;
      height: 18px;
      min-width: 18px;
      min-height: 18px;
    }
    .moon-phase-name .ui-icon,
    #tab-content-scan .ui-icon,
    .evt-date .ui-icon {
      width: 16px;
      height: 16px;
      min-width: 16px;
      min-height: 16px;
    }
    .evt-date .ui-icon {
      margin-right: 0.35em;
    }
    .engine-picker-button {
      min-width: 430px;
      height: 34px;
      display: grid;
      grid-template-columns: auto 1fr auto;
      align-items: center;
      gap: 9px;
      padding: 0 12px;
      background: linear-gradient(180deg, rgba(0, 20, 42, 0.94), rgba(0, 10, 24, 0.92));
      border: 1px solid rgba(0, 255, 224, 0.28);
      border-radius: 6px;
      color: #f4fbff;
      cursor: pointer;
      font: 0.72rem 'Share Tech Mono', monospace;
      letter-spacing: 0.7px;
      text-align: left;
      box-shadow: inset 0 0 18px rgba(0,255,224,0.035), 0 0 16px rgba(0,0,0,0.25);
      outline: none;
    }
    .engine-picker-button:hover,
    .engine-picker-button[aria-expanded="true"] {
      border-color: rgba(0, 255, 224, 0.7);
      box-shadow: inset 0 0 22px rgba(0,255,224,0.08), 0 0 22px rgba(0,255,224,0.12);
    }
    .engine-picker-caret {
      color: var(--accent);
      font-size: 1rem;
      line-height: 1;
    }
    .engine-picker-menu {
      position: absolute;
      left: 0;
      bottom: calc(100% + 8px);
      width: 430px;
      display: none;
      padding: 7px;
      background:
        linear-gradient(145deg, rgba(4, 12, 30, 0.98), rgba(5, 18, 36, 0.96)),
        repeating-linear-gradient(0deg, rgba(0,255,224,0.035) 0 1px, transparent 1px 12px);
      border: 1px solid rgba(0, 255, 224, 0.38);
      border-radius: 8px;
      box-shadow: 0 0 0 1px rgba(255,255,255,0.035), 0 20px 46px rgba(0,0,0,0.82), 0 0 26px rgba(0,255,224,0.14);
      z-index: 1032;
    }
    .engine-picker-menu.open {
      display: grid;
      gap: 5px;
    }
    .engine-picker-option {
      display: grid;
      grid-template-columns: auto minmax(84px, auto) 1fr;
      align-items: center;
      gap: 10px;
      min-height: 38px;
      padding: 8px 10px;
      background: rgba(0, 255, 224, 0.035);
      border: 1px solid rgba(0, 255, 224, 0.12);
      border-radius: 6px;
      color: #eafcff;
      cursor: pointer;
      text-align: left;
      font-family: 'Share Tech Mono', monospace;
    }
    .engine-picker-option:hover,
    .engine-picker-option.active {
      background: rgba(0, 255, 224, 0.12);
      border-color: rgba(0, 255, 224, 0.42);
      box-shadow: inset 0 0 18px rgba(0,255,224,0.08);
    }
    .engine-picker-option span {
      width: 20px;
      text-align: center;
    }
    .engine-picker-option strong {
      color: #fff;
      font-size: 0.72rem;
      letter-spacing: 1px;
      text-transform: uppercase;
    }
    .engine-picker-option em {
      color: rgba(166, 255, 244, 0.72);
      font-size: 0.62rem;
      font-style: normal;
    }
    .engine-picker-option.locked {
      opacity: 0.44;
      cursor: not-allowed;
      filter: grayscale(1);
    }
    .engine-picker-option.locked:disabled:hover {
      opacity: 0.44;
      border-color: rgba(0, 255, 224, 0.12);
      background: rgba(0, 255, 224, 0.035);
      box-shadow: none;
    }
    .engine-picker-option.unlocked {
      border-color: rgba(255, 229, 102, 0.36);
      box-shadow: inset 0 0 18px rgba(255, 229, 102, 0.08);
    }
    .engine-model-card {
      position: fixed;
      left: 62%;
      top: 44%;
      width: min(600px, calc(100vw - 32px));
      max-height: min(56vh, 520px);
      overflow: auto;
      padding: 14px 16px 15px;
      background:
        linear-gradient(135deg, rgba(4, 14, 34, 0.98), rgba(7, 22, 42, 0.94)),
        repeating-linear-gradient(90deg, rgba(0,255,224,0.05) 0 1px, transparent 1px 16px);
      border: 1px solid rgba(0, 255, 224, 0.38);
      border-radius: 8px;
      box-shadow: 0 0 0 1px rgba(255,255,255,0.04), 0 0 32px rgba(0,255,224,0.16), 0 18px 50px rgba(0,0,0,0.82);
      color: #eafcff;
      opacity: 0;
      transform: translate(-50%, -45%) scale(0.985);
      pointer-events: none;
      transition: opacity 0.18s ease, transform 0.18s ease;
      z-index: 1030;
    }
    .engine-model-card::-webkit-scrollbar {
      width: 3px;
    }
    .engine-model-card::-webkit-scrollbar-thumb {
      background: rgba(0, 255, 224, 0.45);
      border-radius: 2px;
    }
    .engine-model-card.visible {
      opacity: 1;
      transform: translate(-50%, -50%) scale(1);
      pointer-events: none;
    }
    .engine-model-card::before {
      content: "";
      position: absolute;
      inset: 0;
      border-radius: inherit;
      background: linear-gradient(90deg, transparent, rgba(0,255,224,0.12), transparent);
      opacity: 0.35;
      pointer-events: none;
    }
    .engine-card-kicker {
      color: var(--accent);
      font-size: 0.56rem;
      letter-spacing: 3px;
      margin-bottom: 7px;
      text-transform: uppercase;
    }
    .engine-card-title {
      color: #fff;
      font-family: 'Orbitron', sans-serif;
      font-size: 1rem;
      letter-spacing: 2px;
      text-transform: uppercase;
      margin-bottom: 4px;
    }
    .engine-card-subtitle {
      color: rgba(166, 255, 244, 0.78);
      font-size: 0.68rem;
      line-height: 1.4;
      margin-bottom: 12px;
    }
    .engine-card-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 8px;
      margin-bottom: 12px;
    }
    .engine-card-grid div {
      min-height: 54px;
      padding: 8px;
      background: rgba(0, 255, 224, 0.055);
      border: 1px solid rgba(0, 255, 224, 0.14);
      border-radius: 6px;
    }
    .engine-card-grid span {
      display: block;
      color: rgba(255, 229, 102, 0.8);
      font-size: 0.5rem;
      letter-spacing: 1.6px;
      margin-bottom: 5px;
    }
    .engine-card-grid strong {
      display: block;
      color: #fff;
      font-size: 0.58rem;
      line-height: 1.35;
      font-weight: 600;
    }
    .engine-card-copy {
      color: rgba(230, 252, 255, 0.82);
      font-size: 0.63rem;
      line-height: 1.55;
    }
    @media (max-height: 760px) {
      .engine-model-card {
        left: 62%;
        top: 42%;
        width: min(600px, calc(100vw - 32px));
        max-height: 48vh;
        padding: 12px 14px;
      }
      .engine-card-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 6px;
        margin-bottom: 8px;
      }
      .engine-card-grid div {
        min-height: 44px;
        padding: 7px;
      }
      .engine-card-copy {
        font-size: 0.58rem;
        line-height: 1.4;
      }
    }
    @media (max-width: 1120px) {
      .engine-model-card {
        left: 50%;
        top: 45%;
      }
    }
    .step-btn {
      padding: 4px 6px;
    }

    .zenith-modal {
      position: fixed;
      inset: 0;
      z-index: 1000;
      display: grid;
      place-items: center;
      padding: 24px;
      background: rgba(0, 4, 14, 0.72);
      backdrop-filter: blur(14px) saturate(1.15);
      -webkit-backdrop-filter: blur(14px) saturate(1.15);
      opacity: 0;
      transition: opacity 0.2s ease;
    }
    .zenith-modal.open {
      opacity: 1;
    }
    .zenith-panel {
      position: relative;
      width: min(720px, calc(100vw - 32px));
      max-height: min(82vh, 720px);
      overflow: auto;
      padding: 22px;
      background:
        linear-gradient(145deg, rgba(5, 14, 32, 0.98), rgba(8, 22, 40, 0.96)),
        repeating-linear-gradient(90deg, rgba(255,229,102,0.04) 0 1px, transparent 1px 18px);
      border: 1px solid rgba(255, 229, 102, 0.36);
      border-radius: 10px;
      box-shadow: 0 0 0 1px rgba(255,255,255,0.05), 0 0 42px rgba(255,229,102,0.14), 0 24px 70px rgba(0,0,0,0.85);
      font-family: 'Share Tech Mono', monospace;
      color: #f4fbff;
      transform: translateY(10px) scale(0.985);
      transition: transform 0.42s cubic-bezier(0.2, 0.72, 0.18, 1), box-shadow 0.42s ease, border-color 0.42s ease;
    }
    .zenith-modal.open .zenith-panel {
      transform: translateY(0) scale(1);
    }
    .zenith-modal.zenith-stage-online .zenith-panel {
      border-color: rgba(0, 255, 224, 0.54);
      box-shadow: 0 0 0 1px rgba(255,255,255,0.06), 0 0 54px rgba(0,255,224,0.18), 0 24px 70px rgba(0,0,0,0.85);
    }
    .zenith-orbital-lock {
      position: absolute;
      top: 18px;
      right: 20px;
      width: 92px;
      aspect-ratio: 1;
      border-radius: 50%;
      display: grid;
      place-items: center;
      border: 1px solid rgba(255, 229, 102, 0.24);
      background:
        radial-gradient(circle at center, rgba(255,229,102,0.18) 0 2px, transparent 3px),
        radial-gradient(circle at center, rgba(0,255,224,0.08), rgba(0,0,0,0) 58%);
      box-shadow: inset 0 0 22px rgba(255,229,102,0.08), 0 0 22px rgba(0,0,0,0.32);
    }
    .zenith-orbital-lock::before,
    .zenith-orbital-lock::after {
      content: "";
      position: absolute;
      inset: 9px;
      border-radius: 50%;
      border: 1px solid rgba(0, 255, 224, 0.24);
      border-top-color: rgba(255, 229, 102, 0.86);
      animation: zenith-orbit-scan 7.5s linear infinite;
    }
    .zenith-orbital-lock::after {
      inset: 22px;
      border-color: rgba(255, 229, 102, 0.2);
      border-bottom-color: rgba(0, 255, 224, 0.86);
      animation-duration: 11s;
      animation-direction: reverse;
    }
    .zenith-lock-core {
      z-index: 1;
      color: #fff;
      font-family: 'Orbitron', sans-serif;
      font-size: 0.62rem;
      letter-spacing: 1px;
      text-shadow: 0 0 12px rgba(255,229,102,0.5);
    }
    @keyframes zenith-orbit-scan {
      to { transform: rotate(360deg); }
    }
    .zenith-kicker {
      color: #ffe566;
      font-size: 0.58rem;
      letter-spacing: 3px;
      text-transform: uppercase;
      margin-bottom: 8px;
      padding-right: 112px;
    }
    .zenith-title {
      font-family: 'Orbitron', sans-serif;
      font-size: 1.25rem;
      letter-spacing: 3px;
      text-transform: uppercase;
      margin-bottom: 8px;
      padding-right: 112px;
    }
    .zenith-copy {
      color: rgba(230, 252, 255, 0.82);
      font-size: 0.72rem;
      line-height: 1.55;
      margin-bottom: 14px;
    }
    .zenith-stage-rail {
      position: relative;
      display: grid;
      grid-template-columns: repeat(5, minmax(0, 1fr));
      gap: 6px;
      margin: 18px 0 14px;
      padding-top: 12px;
    }
    .zenith-stage-rail::before {
      content: "";
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      height: 1px;
      background: linear-gradient(90deg, rgba(255,229,102,0.1), rgba(255,229,102,0.6), rgba(0,255,224,0.1));
      transform-origin: left;
      animation: zenith-rail-prime 2.4s cubic-bezier(0.22, 0.7, 0.18, 1) infinite;
    }
    @keyframes zenith-rail-prime {
      0%, 100% { transform: scaleX(0.42); opacity: 0.45; }
      55% { transform: scaleX(1); opacity: 0.95; }
    }
    .zenith-stage {
      min-height: 52px;
      padding: 8px 7px;
      border: 1px solid rgba(255, 229, 102, 0.16);
      border-radius: 6px;
      background: rgba(255, 229, 102, 0.035);
      opacity: 0.54;
      transition: opacity 0.34s ease, border-color 0.34s ease, background 0.34s ease, transform 0.34s ease;
    }
    .zenith-stage span,
    .zenith-stage strong {
      display: block;
    }
    .zenith-stage span {
      color: rgba(255, 229, 102, 0.78);
      font-size: 0.5rem;
      letter-spacing: 1.5px;
      margin-bottom: 5px;
    }
    .zenith-stage strong {
      color: #fff;
      font-size: 0.58rem;
      letter-spacing: 0.8px;
      text-transform: uppercase;
      line-height: 1.2;
    }
    .zenith-stage.active {
      opacity: 1;
      transform: translateY(-2px);
      border-color: rgba(255, 229, 102, 0.5);
      background: rgba(255, 229, 102, 0.09);
      box-shadow: inset 0 0 18px rgba(255,229,102,0.08), 0 0 18px rgba(255,229,102,0.08);
    }
    .zenith-stage.complete {
      opacity: 0.9;
      border-color: rgba(0, 255, 224, 0.34);
      background: rgba(0, 255, 224, 0.06);
    }
    .zenith-status-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
      margin: 14px 0;
    }
    .zenith-status-grid div {
      padding: 10px;
      border: 1px solid rgba(0, 255, 224, 0.14);
      border-radius: 6px;
      background: rgba(0, 255, 224, 0.045);
      min-height: 58px;
    }
    .zenith-status-grid span {
      display: block;
      color: rgba(255, 229, 102, 0.78);
      font-size: 0.52rem;
      letter-spacing: 1.8px;
      margin-bottom: 6px;
      text-transform: uppercase;
    }
    .zenith-status-grid strong {
      color: #fff;
      font-size: 0.68rem;
      line-height: 1.35;
    }
    .zenith-progress {
      height: 8px;
      overflow: hidden;
      border: 1px solid rgba(255, 229, 102, 0.28);
      border-radius: 999px;
      background: rgba(255,255,255,0.06);
      margin: 12px 0 8px;
      box-shadow: inset 0 0 14px rgba(0,0,0,0.34);
    }
    .zenith-progress-bar {
      width: 0%;
      height: 100%;
      background: linear-gradient(90deg, #00ffd5, #ffe566);
      box-shadow: 0 0 18px rgba(255,229,102,0.32);
      transition: width 0.32s cubic-bezier(0.22, 0.7, 0.18, 1);
    }
    .zenith-direct-assist {
      display: grid;
      gap: 8px;
      margin-top: 12px;
      padding: 12px;
      border: 1px solid rgba(0, 255, 224, 0.3);
      border-radius: 6px;
      background: rgba(0, 255, 224, 0.07);
      color: rgba(230, 255, 252, 0.9);
      font-family: 'Share Tech Mono', monospace;
      font-size: 0.72rem;
      line-height: 1.4;
    }
    .zenith-direct-assist.hidden {
      display: none;
    }
    .zenith-direct-assist strong {
      color: #ffe566;
      text-transform: uppercase;
      letter-spacing: 1.6px;
    }
    .zenith-direct-links {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }
    .zenith-direct-links a {
      border: 1px solid rgba(255, 255, 255, 0.16);
      border-radius: 4px;
      padding: 5px 7px;
      color: #78fff0;
      text-decoration: none;
      background: rgba(0, 0, 0, 0.18);
    }
    .zenith-direct-links a:hover {
      border-color: rgba(0, 255, 224, 0.46);
      background: rgba(0, 255, 224, 0.12);
    }
    .zenith-direct-assist button {
      justify-self: start;
      border: 1px solid rgba(0, 255, 224, 0.46);
      background: rgba(0, 255, 224, 0.1);
      color: #eaffff;
      border-radius: 6px;
      padding: 8px 11px;
      cursor: pointer;
      font-family: 'Share Tech Mono', monospace;
      font-size: 0.68rem;
      letter-spacing: 1px;
    }
    .zenith-direct-assist button:hover {
      background: rgba(0, 255, 224, 0.16);
      box-shadow: 0 0 20px rgba(0, 255, 224, 0.14);
    }
    .zenith-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      margin-top: 16px;
    }
    .zenith-actions button,
    .zenith-actions a {
      border: 1px solid rgba(255, 229, 102, 0.36);
      background: rgba(255, 229, 102, 0.08);
      color: #fff;
      border-radius: 6px;
      padding: 9px 12px;
      cursor: pointer;
      font-family: 'Share Tech Mono', monospace;
      font-size: 0.68rem;
      letter-spacing: 1px;
      line-height: normal;
      text-align: center;
      text-decoration: none;
    }
    .zenith-actions button:hover:not(:disabled),
    .zenith-actions a:hover {
      background: rgba(255, 229, 102, 0.16);
      box-shadow: 0 0 18px rgba(255, 229, 102, 0.12);
    }
    .zenith-actions #zenith-release-package {
      border-color: rgba(0, 255, 224, 0.46);
      background: rgba(0, 255, 224, 0.09);
      color: #eaffff;
    }
    .zenith-actions #zenith-release-package:hover {
      background: rgba(0, 255, 224, 0.16);
      box-shadow: 0 0 20px rgba(0, 255, 224, 0.16);
    }
    .zenith-actions button:disabled {
      opacity: 0.45;
      cursor: not-allowed;
    }
    @media (max-width: 720px) {
      .zenith-orbital-lock {
        position: relative;
        top: auto;
        right: auto;
        width: 78px;
        margin-bottom: 14px;
      }
      .zenith-kicker,
      .zenith-title {
        padding-right: 0;
      }
      .zenith-stage-rail,
      .zenith-status-grid {
        grid-template-columns: 1fr;
      }
    }
    .speed-slider-group {
      display: flex;
      align-items: center;
      gap: 6px;
    }
    .speed-slider-group input[type="range"] {
      cursor: pointer;
      accent-color: var(--accent);
      width: 100px;
    }
    /* Analysis Sidebar */
    .analysis-sidebar {
      position: fixed;
      top: 0;
      right: -380px;
      width: 360px;
      height: 100vh;
      background: rgba(4, 8, 16, 0.92);
      backdrop-filter: blur(16px);
      border-left: 1px solid rgba(0, 255, 224, 0.18);
      box-shadow: -10px 0 40px rgba(0,0,0,0.9);
      z-index: 1020;
      transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
      display: flex;
      flex-direction: column;
      overflow: hidden;
      pointer-events: auto;
    }
    .analysis-sidebar.open {
      right: 0;
    }

    /* Sidebar Header Bar */
    .sidebar-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 14px 16px 12px;
      border-bottom: 1px solid rgba(0, 255, 224, 0.12);
      background: rgba(0, 255, 224, 0.03);
      flex-shrink: 0;
    }
    .sidebar-title {
      font-family: 'Orbitron', monospace;
      font-size: 0.65rem;
      font-weight: 700;
      letter-spacing: 3px;
      color: var(--accent);
      text-transform: uppercase;
      opacity: 0.9;
    }
    .sidebar-close-btn {
      background: transparent;
      border: 1px solid rgba(0, 255, 224, 0.25);
      color: var(--dim);
      width: 28px;
      height: 28px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 1.1rem;
      line-height: 1;
      border-radius: 4px;
      cursor: pointer;
      font-family: sans-serif;
      transition: all 0.2s;
      outline: none;
      flex-shrink: 0;
      padding: 0;
    }
    .sidebar-close-btn:hover {
      background: rgba(0, 255, 224, 0.1);
      border-color: var(--accent);
      color: var(--accent);
    }

    /* Sidebar scrollable body */
    .sidebar-body {
      flex: 1;
      overflow-y: auto;
      padding: 14px 16px;
      display: flex;
      flex-direction: column;
      gap: 14px;
    }
    .sidebar-body::-webkit-scrollbar {
      width: 3px;
    }
    .sidebar-body::-webkit-scrollbar-thumb {
      background: var(--dim);
      border-radius: 2px;
    }

    /* Sidebar Tabs styling */
    .sidebar-tabs {
      display: flex;
      gap: 6px;
      padding: 10px 16px;
      border-bottom: 1px solid rgba(0, 255, 224, 0.1);
      flex-shrink: 0;
    }
    .tab-btn {
      flex: 1;
      font-size: 0.65rem;
      padding: 6px 12px;
      font-family: 'Share Tech Mono', monospace;
      background: transparent;
      border: 1px solid transparent;
      color: var(--dim);
      cursor: pointer;
      text-transform: uppercase;
      transition: all 0.25s ease;
      letter-spacing: 1px;
      border-radius: 4px;
    }
    .tab-btn:hover {
      color: var(--accent);
      background: rgba(0, 255, 224, 0.04);
    }
    .tab-btn.active {
      color: #000;
      background: var(--accent);
      border: 1px solid var(--accent);
      box-shadow: 0 0 10px rgba(0, 255, 224, 0.2);
      font-weight: bold;
    }
    .tab-btn.mode-disabled {
      opacity: 0.35;
      pointer-events: none;
    }
    .mode-hidden {
      display: none !important;
    }
    .mode-scope-note {
      border: 1px solid rgba(0, 255, 224, 0.18);
      background: rgba(0, 255, 224, 0.035);
      color: rgba(160, 255, 239, 0.72);
      font-size: 0.58rem;
      line-height: 1.45;
      padding: 8px 10px;
      margin-bottom: 10px;
      border-radius: 4px;
    }
    .mode-scope-note:empty {
      display: none;
    }
    .mode-scope-note.blocked {
      border-color: rgba(255, 190, 40, 0.28);
      background: rgba(255, 190, 40, 0.055);
      color: rgba(255, 222, 120, 0.78);
    }
    .mode-disabled-panel > *:not(.mode-scope-note) {
      opacity: 0.35;
      pointer-events: none;
      filter: saturate(0.55);
    }

    /* Sidebar backdrop */
    .sidebar-backdrop {
      position: fixed;
      top: 0;
      left: 0;
      width: 100vw;
      height: 100vh;
      background: rgba(0, 0, 0, 0.0);
      z-index: 999;
      opacity: 0;
      pointer-events: none;
      transition: opacity 0.3s ease;
    }
    .sidebar-backdrop.open {
      opacity: 1;
      pointer-events: auto;
    }

    /* Sidebar Toggle Button */
    #sidebar-toggle-btn {
      position: fixed;
      top: 20px;
      right: 20px;
      background: rgba(4, 8, 16, 0.72);
      backdrop-filter: blur(8px);
      border: 1px solid rgba(0, 255, 224, 0.3);
      color: var(--accent);
      padding: 8px 16px;
      font-size: 0.75rem;
      font-weight: bold;
      border-radius: 6px;
      cursor: pointer;
      z-index: 100;
      box-shadow: 0 4px 20px rgba(0,0,0,0.5);
      transition: all 0.2s;
      font-family: 'Orbitron', monospace;
      letter-spacing: 1px;
      outline: none;
    }
    #sidebar-toggle-btn:hover {
      background: rgba(0, 255, 224, 0.15);
      border-color: var(--accent);
      box-shadow: 0 0 15px rgba(0, 255, 224, 0.4);
    }

    /* ── Canvas ── */
    .canvas-wrap {
      position: fixed;
      top: 0;
      left: 0;
      width: 100vw;
      height: 100vh;
      z-index: 1;
    }
    #planet-labels-container-2d {
      position: absolute;
      top: 0; left: 0;
      width: 100vw; height: 100vh;
      pointer-events: none;
      z-index: 10;
      overflow: hidden;
      transition: opacity 0.5s ease;
    }
    .planet-node {
      position: absolute;
      top: 0; left: 0;
      will-change: transform;
    }
    .planet-dot {
      position: absolute;
      top: 0; left: 0;
      transform: translate(-50%, -50%);
      border-radius: 50%;
    }
    .planet-label {
      position: absolute;
      top: 0; left: 0;
      transform: translate(-50%, -100%);
      font-family: 'Share Tech Mono', monospace;
      font-size: 9px;
      text-align: center;
    }

    canvas#solar {
      position: absolute;
      top: 0;
      left: 0;
      width: 100vw;
      height: 100vh;
      z-index: 2;
      border: none;
      background: radial-gradient(ellipse at center, #00001e 0%, #00000c 75%);
      transition: opacity 1.5s ease-in-out;
    }

    .canvas-corner-mask {
      position: fixed;
      top: 0;
      left: 0;
      width: 82px;
      height: 82px;
      z-index: 12;
      pointer-events: none;
      background: var(--bg);
    }

    /* ── Panel ── */

    .card {
      border: 1px solid rgba(0, 255, 224, 0.15);
      background: rgba(0, 15, 30, 0.65);
      padding: 18px;
      border-radius: 6px;
      backdrop-filter: blur(10px);
      box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    }

    .card-title {
      font-family: 'Orbitron', monospace;
      font-size: 0.55rem;
      letter-spacing: 0.35em;
      color: var(--accent);
      margin-bottom: 10px;
      text-transform: uppercase;
    }

    #date-display {
      font-family: 'Orbitron', monospace;
      font-size: 1.3rem;
      color: #fff;
      letter-spacing: 0.08em;
      background: transparent;
      border: 0;
      padding: 0;
      cursor: pointer;
      text-align: left;
    }

    #arc-display {
      margin-top: 6px;
      font-size: 0.72rem;
      color: var(--dim);
      white-space: nowrap;
      height: 22px;
    }

    #arc-val {
      font-size: 1rem;
      font-weight: 700;
      transition: color 0.3s;
      color: var(--accent);
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      max-width: 100%;
      display: block;
    }

    .bar-wrap {
      margin-top: 8px;
      height: 3px;
      background: rgba(255, 255, 255, 0.08);
      border-radius: 2px;
      overflow: hidden;
    }

    #arc-bar {
      height: 100%;
      background: var(--accent);
      border-radius: 2px;
      transition: width 0.15s, background 0.3s;
    }

    #align-badge {
      font-family: 'Orbitron', monospace;
      font-size: 0.6rem;
      letter-spacing: 0.2em;
      padding: 5px 8px;
      border-radius: 2px;
      text-align: center;
      margin-top: 8px;
      white-space: nowrap;
      overflow: hidden;
      height: 24px;
    }

    #align-badge.on {
      background: rgba(255, 69, 0, 0.15);
      border: 1px solid rgba(255, 69, 0, 0.5);
      color: var(--accent2);
      text-shadow: 0 0 8px rgba(255, 69, 0, 0.5);
    }

    #align-badge.off {
      background: rgba(0, 255, 224, 0.04);
      border: 1px solid rgba(0, 255, 224, 0.08);
      color: rgba(0, 255, 224, 0.25);
    }

    #align-badge.washout {
      background: rgba(255, 229, 102, 0.1);
      border: 1px solid rgba(255, 229, 102, 0.3);
      color: rgba(255, 229, 102, 0.7);
      letter-spacing: 1.5px;
    }

    #align-badge .icon-label {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 5px;
    }

    #canvas-container-3d {
      position: absolute;
      inset: 0;
      width: 100vw;
      height: 100vh;
      z-index: 2;
      opacity: 0;
      pointer-events: none;
      overflow: hidden;
      transition: opacity 0.8s ease;
    }

    #canvas-container-3d::after {
      content: "";
      position: absolute;
      inset: 0;
      pointer-events: none;
      background:
        radial-gradient(circle at 50% 45%, transparent 48%, rgba(0, 2, 12, 0.2) 72%, rgba(0, 1, 8, 0.72) 100%),
        linear-gradient(180deg, rgba(24, 54, 92, 0.05), transparent 28%, rgba(0, 0, 0, 0.12));
      z-index: 2;
    }

    #canvas-container-3d canvas {
      display: block;
      width: 100%;
      height: 100%;
    }

    #planet-hud-overlay {
      position: absolute;
      z-index: 100;
      opacity: 0;
      pointer-events: none;
      transform: translate3d(0, 5px, 0);
      transition: opacity 0.2s ease, transform 0.2s ease;
      border: 1px solid rgba(0, 255, 213, 0.5);
      border-radius: 4px;
      padding: 8px 12px;
      background: rgba(4, 10, 20, 0.88);
      color: var(--accent);
      font-family: 'Share Tech Mono', monospace;
      font-size: 10px;
      box-shadow: 0 0 15px rgba(0, 255, 213, 0.15);
    }

    #planet-hud-overlay.visible {
      opacity: 1;
      transform: translate3d(0, 0, 0);
    }

    #hud-name {
      margin-bottom: 5px;
      padding-bottom: 4px;
      border-bottom: 1px solid rgba(0, 255, 213, 0.3);
      color: #fff;
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 2px;
    }

    #hud-details {
      color: #a0aec0;
      line-height: 1.4;
      white-space: nowrap;
    }

    #hud-details span {
      color: var(--accent);
    }

    .textures-loader {
      position: fixed;
      inset: 0;
      z-index: 2000;
      display: none;
      align-items: center;
      justify-content: center;
      background: rgba(2, 8, 18, 0.86);
      backdrop-filter: blur(18px);
    }

    .textures-loader-panel {
      width: min(360px, calc(100vw - 40px));
      padding: 20px;
      border: 1px solid rgba(0, 255, 224, 0.2);
      background: rgba(5, 18, 32, 0.84);
      text-align: center;
    }

    .textures-loader-title {
      margin-bottom: 8px;
      color: #fff;
      font-family: 'Orbitron', monospace;
      font-size: 0.72rem;
      font-weight: 900;
      letter-spacing: 2px;
    }

    .textures-loader-copy {
      margin-bottom: 16px;
      color: var(--accent);
      font-size: 0.72rem;
    }

    .textures-loader-track {
      position: relative;
      height: 4px;
      overflow: hidden;
      border: 1px solid rgba(0, 255, 224, 0.16);
      background: rgba(0, 255, 224, 0.1);
    }

    .textures-loader-bar {
      position: absolute;
      top: 0;
      left: -45%;
      width: 45%;
      height: 100%;
      background: var(--accent);
      animation: textures-loader-sweep 1.25s ease-in-out infinite;
    }

    .textures-loader-bar.determinate {
      left: 0;
      animation: none;
      transform: none;
      transition: width 0.18s linear;
    }

    .textures-loader-meta {
      margin-top: 12px;
      color: var(--dim);
      font-size: 0.56rem;
      letter-spacing: 1px;
      text-transform: uppercase;
    }

    @keyframes textures-loader-sweep {
      0% { left: -45%; }
      55% { left: 55%; }
      100% { left: 100%; }
    }

    /* Controls */
    .controls {
      display: flex;
      flex-direction: column;
      gap: 8px;
    }

    .btn-row {
      display: flex;
      gap: 6px;
    }

    button {
      font-family: 'Share Tech Mono', monospace;
      font-size: 0.68rem;
      letter-spacing: 0.08em;
      padding: 7px 10px;
      background: transparent;
      border: 1px solid rgba(0, 255, 224, 0.25);
      color: var(--accent);
      cursor: pointer;
      border-radius: 2px;
      transition: all 0.15s;
    }

    button:focus-visible,
    input:focus-visible,
    select:focus-visible,
    textarea:focus-visible {
      outline: 2px solid var(--accent);
      outline-offset: 2px;
    }

    button:hover {
      background: rgba(0, 255, 224, 0.08);
      border-color: var(--accent);
    }

    .btn-jump {
      background: rgba(255, 69, 0, 0.08) !important;
      border-color: rgba(255, 69, 0, 0.3) !important;
      color: var(--accent2) !important;
    }

    .btn-jump:hover {
      background: rgba(255, 69, 0, 0.18) !important;
      border-color: var(--accent2) !important;
    }

    .speed-row {
      display: flex;
      justify-content: space-between;
      font-size: 0.6rem;
      color: var(--dim);
    }

    input[type=range] {
      width: 100%;
      accent-color: var(--accent);
      cursor: pointer;
    }

    .custom-file-btn {
      display: block;
      width: 100%;
      padding: 10px;
      text-align: center;
      background: rgba(0, 255, 224, 0.05);
      border: 1px dashed rgba(0, 255, 224, 0.4);
      color: var(--accent);
      font-size: 0.65rem;
      cursor: pointer;
      transition: all 0.2s ease;
      font-weight: bold;
      margin-top: 10px;
    }
    .custom-file-btn:hover {
      background: rgba(0, 255, 224, 0.15);
      box-shadow: 0 0 12px rgba(0,255,224,0.3);
    }

    /* Event list */
    .evt-list {
      display: flex;
      flex-direction: column;
      gap: 4px;
      max-height: 210px;
      overflow-y: auto;
    }

    .evt-list::-webkit-scrollbar {
      width: 2px;
    }

    .evt-list::-webkit-scrollbar-thumb {
      background: var(--dim);
    }

    .evt-item {
      display: block;
      flex: 0 0 auto;
      min-width: 0;
      padding: 9px 10px;
      border: 1px solid rgba(0, 255, 224, 0.08);
      border-radius: 5px;
      cursor: pointer;
      overflow: hidden;
      transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
      font-size: 0.68rem;
    }

    .evt-item:hover {
      background: rgba(0, 255, 224, 0.06);
      border-color: rgba(0, 255, 224, 0.25);
    }

    .evt-item.active {
      background: rgba(255, 69, 0, 0.1);
      border-color: rgba(255, 69, 0, 0.4);
      color: var(--accent2);
    }

    .evt-date {
      display: flex;
      align-items: center;
      gap: 5px;
      min-width: 0;
      line-height: 1.35;
      cursor: pointer;
      white-space: normal;
      overflow-wrap: anywhere;
    }

    .evt-summary {
      display: grid;
      grid-template-columns: minmax(0, 1fr) 16px;
      grid-template-areas:
        "date chevron"
        "type chevron";
      align-items: center;
      row-gap: 4px;
      column-gap: 10px;
      width: 100%;
      min-height: 44px;
      padding: 0;
      border: 0;
      background: transparent;
      color: inherit;
      font: inherit;
      text-align: left;
      cursor: pointer;
    }

    .evt-type {
      grid-area: type;
      font-size: 0.6rem;
      color: var(--dim);
      text-align: left;
      line-height: 1.3;
      white-space: normal;
      overflow-wrap: anywhere;
    }

    .evt-date {
      grid-area: date;
    }

    .evt-chevron {
      grid-area: chevron;
      justify-self: end;
      color: var(--dim);
      transform: rotate(0deg);
      transition: transform 0.22s ease;
    }

    .evt-item.expanded .evt-chevron {
      transform: rotate(180deg);
    }

    .evt-details {
      display: grid;
      grid-template-columns: 1fr;
      gap: 0;
      max-height: 0;
      padding: 0 3px;
      opacity: 0;
      overflow: hidden;
      transition: max-height 0.34s ease, opacity 0.24s ease, padding 0.34s ease, margin 0.34s ease;
    }

    .evt-item.expanded .evt-details {
      max-height: 360px;
      padding: 10px 3px 4px;
      opacity: 1;
      border-top: 1px solid rgba(0, 255, 224, 0.08);
      margin-top: 6px;
    }

    .evt-details div {
      display: grid;
      grid-template-columns: minmax(78px, 0.42fr) minmax(0, 1fr);
      gap: 10px;
      padding: 5px 0;
      color: var(--dim);
      font-size: 0.58rem;
      line-height: 1.4;
    }

    .evt-details strong {
      color: rgba(224, 251, 255, 0.9);
      text-align: left;
      font-weight: 500;
      overflow-wrap: anywhere;
    }

    .evt-details .evt-detail-wide {
      grid-column: 1 / -1;
    }

    .evt-details .evt-detail-peak {
      display: block;
      padding: 8px 10px;
      margin-bottom: 4px;
      border: 1px solid rgba(0, 255, 224, 0.16);
      border-radius: 4px;
      background: rgba(0, 255, 224, 0.045);
    }

    .evt-details .evt-detail-peak span,
    .evt-details .evt-detail-peak strong {
      display: block;
      text-align: left;
    }

    .evt-details .evt-detail-peak span {
      margin-bottom: 4px;
      color: var(--accent);
      font-size: 0.52rem;
      letter-spacing: 0.16em;
      text-transform: uppercase;
    }

    .evt-details .evt-detail-peak strong {
      color: #fff;
      font-size: 0.68rem;
      letter-spacing: 0.04em;
    }

    .evt-item.active .evt-type {
      color: var(--accent2);
    }

    /* Legend */
    .legend {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 3px 10px;
    }

    .leg-item {
      display: flex;
      align-items: center;
      gap: 5px;
      font-size: 0.62rem;
      color: var(--dim);
    }

    .leg-dot {
      width: 7px;
      height: 7px;
      border-radius: 50%;
      flex-shrink: 0;
    }

    /* note */
    .note {
      font-size: 0.58rem;
      color: rgba(0, 255, 224, 0.25);
      margin-top: 6px;
      line-height: 1.6;
    }

    .note.ok {
      color: rgba(80, 255, 180, 0.5);
    }

    #tab-content-scan {
      display: grid;
      gap: 10px;
    }

    .scan-subtabs,
    .event-filter-strip {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 4px;
      padding: 3px;
      border: 1px solid rgba(0, 255, 224, 0.11);
      border-radius: 5px;
      background: rgba(0, 8, 20, 0.58);
    }

    .scan-subtab,
    .event-filter-strip .tab-btn {
      min-height: 30px;
      padding: 5px 6px !important;
      border: 0 !important;
      border-radius: 4px;
      background: transparent;
      color: rgba(0, 255, 224, 0.52);
      font-size: 0.58rem !important;
      line-height: 1.1;
      flex: 0 1 auto;
    }

    .scan-subtab.active,
    .event-filter-strip .tab-btn.active {
      background: var(--accent);
      color: #001611;
      box-shadow: 0 0 16px rgba(0, 255, 224, 0.22);
    }

    .event-filter-strip {
      grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
      margin-bottom: 10px;
    }

    .event-filter-strip .tab-btn span {
      display: block;
      margin-top: 2px;
      font-size: 0.5rem;
      opacity: 0.72;
    }

    .scan-tool-card {
      display: none;
    }

    .observer-region-card {
      margin-bottom: 10px !important;
    }

    .observer-region-heading {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 10px;
      color: var(--dim);
      font-size: 0.54rem;
      line-height: 1.35;
    }

    #tab-content-scan #btn-use-location {
      flex: 0 0 auto;
      min-height: 28px;
      margin: 0 !important;
      padding: 4px 8px;
      color: var(--accent);
      border-color: rgba(0, 255, 224, 0.42);
      font-size: 0.54rem;
    }

    .observer-coordinate-row {
      display: none;
      gap: 8px;
    }

    .observer-coordinate-row > div {
      flex: 1;
    }

    #tab-content-scan #btn-set-coordinates {
      align-self: end;
      flex: 0 0 48px;
      min-height: 32px;
      margin: 0 !important;
      padding: 4px 8px;
      color: var(--accent);
      border-color: rgba(0, 255, 224, 0.42);
      font-size: 0.56rem;
    }

    .observer-location-status {
      margin-top: 8px;
      padding: 7px 8px;
      color: rgba(190, 225, 232, 0.72);
      background: rgba(0, 255, 224, 0.035);
      border: 1px solid rgba(0, 255, 224, 0.1);
      border-radius: 4px;
      font-size: 0.54rem;
      line-height: 1.45;
    }

    .scan-tool-card.active {
      display: block;
    }

    .scan-combined-only {
      display: none !important;
    }

    body.combined-scanner-enabled .scan-subtab.scan-combined-only,
    body.combined-scanner-enabled .event-filter-strip .scan-combined-only {
      display: block !important;
    }

    body.combined-scanner-enabled .scan-tool-card.scan-combined-only.active {
      display: block !important;
    }

    #tab-content-scan .card {
      margin-top: 0 !important;
      padding: 14px;
      border-color: rgba(0, 255, 224, 0.18);
      background: rgba(0, 15, 30, 0.54);
      box-shadow: 0 8px 24px rgba(0,0,0,0.32);
    }

    #tab-content-scan .card-title {
      margin-bottom: 12px;
      padding-bottom: 8px;
      border-bottom: 1px solid rgba(0, 255, 224, 0.08);
      letter-spacing: 0.28em;
    }

    #tab-content-scan .control-row {
      margin-top: 7px !important;
    }

    #tab-content-scan label {
      letter-spacing: 0.05em;
    }

    #tab-content-scan .custom-input,
    #tab-content-scan .custom-select {
      min-height: 32px;
      background: rgba(0, 10, 24, 0.72);
    }

    #tab-content-scan button[id^="btn-"] {
      min-height: 36px;
      margin-top: 10px !important;
    }

    #tab-content-scan .event-filter-strip button[id^="btn-filter-"] {
      min-height: 34px;
      height: 34px;
      margin-top: 0 !important;
      padding: 3px 8px !important;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      border-radius: 4px;
      line-height: 1;
      letter-spacing: 0.12em;
    }

    #tab-content-scan .event-filter-strip button[id^="btn-filter-"] .ui-icon {
      width: 13px;
      height: 13px;
      min-width: 13px;
      min-height: 13px;
    }

    #tab-content-scan .event-filter-strip button[id^="btn-filter-"] span {
      display: inline-flex;
      align-items: center;
      margin-top: 0;
      font-size: 0.54rem;
      opacity: 0.86;
    }

    #tab-content-scan .event-filter-strip button[id^="btn-filter-"] span:last-child {
      min-width: 1.2em;
      justify-content: center;
      opacity: 0.62;
    }

    #tab-content-scan .note {
      min-height: 18px;
      padding-top: 2px;
      color: rgba(0, 255, 224, 0.38);
    }

    #tab-content-scan .bar-wrap {
      height: 5px !important;
      border: 1px solid rgba(255,255,255,0.06);
      background: rgba(255,255,255,0.045) !important;
    }

    #tab-content-scan .evt-list {
      max-height: 360px;
      gap: 7px;
      padding-right: 2px;
      scrollbar-width: thin;
      scrollbar-color: rgba(0, 255, 224, 0.54) rgba(0, 10, 24, 0.7);
    }

    #tab-content-scan .evt-list::-webkit-scrollbar {
      width: 8px;
    }

    #tab-content-scan .evt-list::-webkit-scrollbar-track {
      background: rgba(0, 10, 24, 0.7);
    }

    #tab-content-scan .evt-list::-webkit-scrollbar-thumb {
      background: rgba(0, 255, 224, 0.42);
      border: 2px solid rgba(0, 10, 24, 0.7);
      border-radius: 999px;
    }

    #tab-content-scan .evt-item {
      min-height: 64px;
      padding: 9px 11px;
      background: rgba(0, 10, 24, 0.38);
    }

    #tab-content-scan .evt-item.active {
      background: rgba(255, 69, 0, 0.12);
      box-shadow: inset 0 0 0 1px rgba(255, 69, 0, 0.18);
    }

    .evt-empty {
      padding: 14px 12px;
      border: 1px dashed rgba(0, 255, 224, 0.16);
      border-radius: 5px;
      color: rgba(166, 255, 244, 0.56);
      font-size: 0.62rem;
      line-height: 1.4;
      text-align: center;
      background: rgba(0, 255, 224, 0.025);
    }

    /* flash */
    .flash {
      position: fixed;
      inset: 0;
      background: rgba(0, 255, 224, 0.02);
      pointer-events: none;
      animation: fl 0.5s ease-out forwards;
      z-index: 999;
    }

    @keyframes fl {
      0% {
        opacity: 1
      }

      100% {
        opacity: 0
      }
    }

    /* Observational Guide styling */
    .obs-section {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    .obs-subtitle {
      font-family: 'Orbitron', monospace;
      font-size: 0.55rem;
      letter-spacing: 0.08em;
      font-weight: 700;
      margin-bottom: 2px;
      line-height: 1.45;
    }

    .obs-subtitle.washout {
      color: #ffe566;
      text-shadow: 0 0 8px rgba(255, 229, 102, 0.25);
    }

    .obs-subtitle.evening {
      color: #ff5500;
      text-shadow: 0 0 8px rgba(255, 85, 0, 0.25);
    }

    .obs-subtitle.morning {
      color: #00ffd5;
      text-shadow: 0 0 8px rgba(0, 255, 213, 0.25);
    }

    .obs-list {
      display: flex;
      flex-wrap: wrap;
      gap: 6px 12px;
      margin-top: 1px;
      min-height: 20px;
    }

    .obs-item {
      display: flex;
      align-items: center;
      gap: 5px;
      font-size: 0.62rem;
      color: #fff;
      line-height: 1.35;
    }

    .obs-item .leg-dot {
      width: 6px;
      height: 6px;
    }

    .obs-tip {
      font-style: italic;
      margin-top: 12px;
      padding-top: 9px;
      border-top: 1px solid rgba(0,255,224,0.08);
      color: var(--dim);
      font-size: 0.61rem;
      line-height: 1.55;
      overflow-wrap: anywhere;
    }

    /* Calculator input styles */
    .custom-select,
    .custom-input {
      background: rgba(0, 10, 30, 0.6);
      border: 1px solid rgba(0, 255, 224, 0.16);
      color: #fff;
      font-family: 'Share Tech Mono', monospace;
      font-size: 0.65rem;
      padding: 4px 6px;
      border-radius: 4px;
      width: 100%;
      box-sizing: border-box;
      outline: none;
      transition: all 0.2s ease;
    }

    .custom-select:focus,
    .custom-input:focus {
      border-color: var(--accent);
      box-shadow: 0 0 8px rgba(0, 255, 224, 0.3);
    }

    .custom-select {
      cursor: pointer;
      appearance: none;
      background-image: url("data:image/svg+xml;utf8,<svg fill='cyan' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/><path d='M0 0h24v24H0z' fill='none'/></svg>");
      background-repeat: no-repeat;
      background-position: right 4px center;
      background-size: 16px;
      padding-right: 20px;
    }
    /* Hidden HUD state */
    body.ui-hidden header,
    body.ui-hidden .floating-overview-card,
    body.ui-hidden .floating-bottom-toolbar,
    body.ui-hidden #sidebar-toggle-btn,
    body.ui-hidden #analysis-sidebar,
    body.ui-hidden #sidebar-backdrop,
    body.ui-hidden #ui-toggle-btn,
    body.ui-hidden #planet-labels-container-2d {
      opacity: 0 !important;
      pointer-events: none !important;
    }
    header, .floating-overview-card, .floating-bottom-toolbar,
    #sidebar-toggle-btn,
    #planet-labels-container-2d {
      transition: opacity 0.25s ease;
    }
    .hud-left, .hud-right, #planet-labels-container-2d {
      transition: opacity 0.3s ease;
    }
    #ui-toggle-btn {
      position: absolute;
      top: 20px;
      left: 50%;
      transform: translateX(-50%);
      background: rgba(0, 255, 224, 0.1);
      border: 1px solid rgba(0, 255, 224, 0.3);
      color: var(--accent);
      padding: 6px 16px;
      font-size: 0.75rem;
      border-radius: 4px;
      cursor: pointer;
      z-index: 2000;
      opacity: 0.5;
      transition: opacity 0.2s;
    }
    #ui-toggle-btn:hover { opacity: 1; background: rgba(0, 255, 224, 0.2); }
    body:not(.ui-hidden) #ui-toggle-btn { display: none; }
    .planet-checkboxes-grid {
      display: grid;
      grid-template-columns: repeat(4, 1fr);
      gap: 6px;
      width: 100%;
      margin-top: 4px;
    }
    .planet-chk-label {
      font-size: 0.62rem;
      display: flex;
      align-items: center;
      gap: 4px;
      cursor: pointer;
      background: rgba(0, 10, 30, 0.4);
      border: 1px solid rgba(0, 255, 224, 0.08);
      padding: 3px 6px;
      border-radius: 4px;
      transition: all 0.2s ease;
      user-select: none;
    }
    .planet-chk-label:hover {
      background: rgba(0, 10, 30, 0.7);
      border-color: rgba(0, 255, 224, 0.25);
    }
    .planet-chk-label input {
      cursor: pointer;
      margin: 0;
    }

    /* Custom slidey toggle switch */
    .switch {
      position: relative;
      display: inline-block;
      width: 32px;
      height: 18px;
    }
    .switch input {
      opacity: 0;
      width: 0;
      height: 0;
    }
    .slider-toggle {
      position: absolute;
      cursor: pointer;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background-color: rgba(255, 255, 255, 0.08);
      transition: .3s cubic-bezier(0.16, 1, 0.3, 1);
      border-radius: 18px;
      border: 1px solid rgba(0, 255, 224, 0.2);
    }
    .slider-toggle:before {
      position: absolute;
      content: "";
      height: 12px;
      width: 12px;
      left: 2px;
      bottom: 2px;
      background-color: rgba(0, 255, 224, 0.45);
      transition: .3s cubic-bezier(0.16, 1, 0.3, 1);
      border-radius: 50%;
    }
    input:checked + .slider-toggle {
      background-color: rgba(0, 255, 224, 0.15);
      border-color: var(--accent);
    }
    input:checked + .slider-toggle:before {
      transform: translateX(14px);
      background-color: var(--accent);
      box-shadow: 0 0 6px var(--accent);
    }

    .status-strip {
      border: 1px solid rgba(255, 229, 102, 0.25);
      background: rgba(255, 229, 102, 0.06);
      color: #ffe566;
      border-radius: 4px;
      padding: 7px 9px;
      margin-bottom: 10px;
      font-size: 0.62rem;
      letter-spacing: 1px;
      text-transform: uppercase;
    }

    .zenith-certified-hud {
      position: fixed;
      top: 26%;
      right: 26px;
      z-index: 95;
      width: 210px;
      pointer-events: auto;
      display: grid;
      gap: 14px;
      font-family: 'Share Tech Mono', monospace;
      cursor: grab;
      user-select: none;
      touch-action: none;
    }

    .zenith-certified-hud.dragging {
      cursor: grabbing;
    }

    .zenith-certified-hud.dismissed {
      display: none;
    }

    .zenith-certified-hud.hidden {
      display: none;
    }

    .zenith-hud-close {
      position: absolute;
      top: 9px;
      right: 9px;
      width: 24px;
      height: 24px;
      display: flex;
      align-items: center;
      justify-content: center;
      border: 1px solid rgba(0, 255, 224, 0.34);
      border-radius: 5px;
      background: rgba(3, 12, 24, 0.92);
      color: transparent;
      opacity: 0;
      cursor: pointer;
      font-family: 'Share Tech Mono', monospace;
      font-size: 0;
      line-height: 0;
      transition: opacity 0.18s ease, transform 0.18s ease, background 0.18s ease;
      z-index: 2;
    }

    .zenith-hud-close::before {
      content: "X";
      color: #78fff0;
      font-size: 0.72rem;
      line-height: 1;
      transform: translateY(-0.5px);
    }

    .zenith-certified-hud:hover .zenith-hud-close,
    .zenith-hud-close:focus {
      opacity: 1;
      transform: translateY(-1px);
    }

    .zenith-hud-close:hover {
      background: rgba(0, 255, 224, 0.15);
    }

    .zenith-hud-pill,
    .zenith-hud-panel {
      background: rgba(3, 12, 24, 0.72);
      border: 1px solid rgba(0, 255, 224, 0.18);
      border-radius: 6px;
      box-shadow: 0 12px 34px rgba(0,0,0,0.46), inset 0 1px 0 rgba(255,255,255,0.04);
      backdrop-filter: blur(12px);
    }

    .zenith-hud-pill {
      justify-self: end;
      padding: 9px 12px;
      width: 132px;
      color: rgba(230, 252, 255, 0.7);
      font-size: 0.48rem;
      letter-spacing: 1.2px;
    }

    .zenith-hud-pill span {
      display: inline-block;
      width: 7px;
      height: 7px;
      margin-right: 7px;
      border-radius: 50%;
      background: #48ff9b;
      box-shadow: 0 0 10px rgba(72, 255, 155, 0.7);
    }

    .zenith-orbit-mark {
      position: relative;
      display: inline-block;
      width: 14px;
      height: 14px;
      margin-right: 7px;
      border: 1px solid #aeb6c2;
      border-radius: 50%;
      vertical-align: -3px;
      box-shadow: inset 0 0 5px rgba(174, 182, 194, 0.2);
    }

    .zenith-orbit-mark::before {
      content: "";
      position: absolute;
      left: -3px;
      top: 4px;
      width: 18px;
      height: 5px;
      border: 1px solid #aeb6c2;
      border-radius: 50%;
      transform: rotate(-18deg);
    }

    .zenith-orbit-mark::after {
      content: "";
      position: absolute;
      left: 5px;
      top: 5px;
      width: 3px;
      height: 3px;
      border-radius: 50%;
      background: #d7dce3;
    }

    .zenith-hud-panel {
      position: relative;
      padding: 12px 14px;
      color: #b0ffe8;
      cursor: inherit;
    }

    .zenith-hud-title {
      color: #f5ffff;
      font-size: 0.58rem;
      letter-spacing: 2px;
      margin-bottom: 8px;
      padding-right: 30px;
      font-weight: 700;
    }

    #zenith-hud-lines {
      color: #8dffbf;
      font-size: 0.5rem;
      line-height: 1.65;
    }

    #zenith-hud-lines div:last-child {
      color: #ffe566;
    }

    .zenith-certified-hud[data-horizons-state="verified"] #zenith-hud-lines div:last-child {
      color: #48ff9b;
    }

    .zenith-certified-hud[data-horizons-state="review"] #zenith-hud-lines div:last-child {
      color: #ffe566;
    }

    .zenith-certified-hud[data-horizons-state="offline"] #zenith-hud-lines div:last-child {
      color: #ff7b7b;
    }

    .zenith-hud-foot {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-top: 12px;
      padding-top: 8px;
      border-top: 1px solid rgba(0, 255, 224, 0.12);
      color: #eaffff;
      font-size: 0.54rem;
    }

    .zenith-hud-foot span {
      width: 15px;
      height: 15px;
      display: grid;
      place-items: center;
      border-radius: 3px;
      background: #11f0d2;
      color: #001;
      font-weight: 700;
    }

    .strict-mode-control {
      margin: 0.85rem 0 0;
      padding: 0.7rem 0.75rem;
      display: flex;
      align-items: center;
      gap: 0.65rem;
      border: 1px solid rgba(0, 255, 224, 0.28);
      border-radius: 6px;
      background: rgba(0, 255, 224, 0.04);
      color: var(--text);
      font-family: var(--font-mono);
      font-size: 0.72rem;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      cursor: pointer;
      user-select: none;
    }

    .strict-mode-control input {
      width: 1rem;
      height: 1rem;
      accent-color: var(--accent);
      flex: 0 0 auto;
    }

    .residual-modal {
      position: fixed;
      inset: 0;
      display: grid;
      place-items: center;
      padding: 28px;
      z-index: 1000;
      background: rgba(1, 8, 18, 0.74);
      backdrop-filter: blur(12px);
    }

    .mission-expanded-modal {
      position: fixed;
      inset: 0;
      display: grid;
      place-items: center;
      padding: 18px;
      z-index: 1000;
      background: rgba(1, 8, 18, 0.76);
      backdrop-filter: blur(12px);
    }

    .mission-expanded-panel {
      width: min(1880px, calc(100vw - 36px));
      height: min(94vh, 1120px);
      overflow: auto;
      padding: 18px;
      border: 1px solid rgba(0, 255, 224, 0.38);
      border-radius: 8px;
      background: rgba(3, 11, 24, 0.98);
      box-shadow: 0 22px 80px rgba(0,0,0,0.82), inset 0 1px 0 rgba(255,255,255,0.05);
    }

    .mission-expanded-head {
      display: flex;
      justify-content: space-between;
      align-items: center;
      gap: 14px;
      min-height: 58px;
      border: 1px solid rgba(0,255,224,0.16);
      border-radius: 6px;
      padding: 10px 14px;
      margin-bottom: 8px;
      background: rgba(0, 255, 224, 0.035);
    }

    .mission-expanded-title {
      color: #eaffff;
      font-family: 'Orbitron', monospace;
      font-size: 1rem;
      letter-spacing: 2px;
      text-transform: uppercase;
    }

    .mission-expanded-source {
      margin-left: 16px;
      color: rgba(0,255,224,0.55);
      font-size: 0.62rem;
      letter-spacing: 1.7px;
    }

    .mission-expanded-close {
      flex: 0 0 44px;
      height: 38px;
      border-radius: 5px;
    }

    .mission-expanded-controls {
      display: grid;
      grid-template-columns: repeat(5, minmax(130px, 1fr));
      gap: 8px;
      margin-bottom: 10px;
      padding: 10px;
      border: 1px solid rgba(0, 255, 224, 0.16);
      border-radius: 6px;
      background: rgba(0, 255, 224, 0.035);
    }

    .mission-expanded-controls label {
      display: grid;
      gap: 5px;
      color: rgba(255, 229, 102, 0.78);
      font-size: 0.58rem;
      letter-spacing: 1.4px;
      text-transform: uppercase;
    }

    .mission-expanded-controls select,
    .mission-expanded-controls input,
    .mission-expanded-controls button {
      width: 100%;
      min-width: 0;
      height: 38px;
      padding: 0 10px;
      border: 1px solid rgba(0, 255, 224, 0.26);
      border-radius: 4px;
      background: rgba(1, 10, 22, 0.92);
      color: #eaffff;
      font-family: 'Share Tech Mono', monospace;
      font-size: 0.72rem;
    }

    .mission-expanded-controls button {
      align-self: end;
      color: #ffe566;
      border-color: rgba(255, 213, 0, 0.72);
      cursor: pointer;
      letter-spacing: 1.5px;
    }

    .mission-expanded-controls button:hover {
      background: rgba(255, 213, 0, 0.1);
    }

    .mission-expanded-stage {
      width: 100%;
      min-height: 610px;
      overflow: hidden;
      border: 1px solid rgba(166, 255, 244, 0.18);
      background: #020712;
    }

    #mission-expanded-canvas {
      width: 100%;
      height: auto;
      aspect-ratio: 24 / 11;
      min-height: 610px;
      display: block;
      background: #020712;
    }

    .mission-expanded-summary {
      display: grid;
      grid-template-columns: repeat(8, minmax(0, 1fr));
      gap: 8px;
      margin-top: 12px;
      border: 1px solid rgba(0,255,224,0.16);
      border-radius: 5px;
      padding: 10px;
      background: rgba(0, 255, 224, 0.04);
    }

    .mission-expanded-summary div {
      color: var(--accent);
      font-size: 0.58rem;
      line-height: 1.5;
    }

    .mission-expanded-summary span {
      display: block;
      color: #fff;
      font-size: 0.52rem;
      letter-spacing: 1px;
      text-transform: uppercase;
      margin-bottom: 4px;
    }

    .mission-expanded-note {
      color: rgba(166, 255, 244, 0.64);
      font-size: 0.54rem;
      line-height: 1.5;
      margin-top: 10px;
      display: flex;
      justify-content: space-between;
      gap: 14px;
      border-top: 1px solid rgba(0,255,224,0.13);
      padding-top: 10px;
    }

    .residual-panel {
      width: min(1320px, calc(100vw - 44px));
      max-height: min(84vh, 900px);
      overflow: auto;
      padding: 24px 26px;
      scrollbar-width: thin;
      scrollbar-color: rgba(0, 255, 224, 0.82) rgba(3, 13, 25, 0.86);
      border: 1px solid rgba(0, 255, 224, 0.34);
      border-radius: 8px;
      background:
        linear-gradient(180deg, rgba(4, 14, 30, 0.98), rgba(3, 11, 24, 0.97)),
        repeating-linear-gradient(90deg, rgba(0,255,224,0.035) 0 1px, transparent 1px 18px);
      box-shadow: 0 0 0 1px rgba(255,255,255,0.04), 0 24px 80px rgba(0,0,0,0.82);
    }

    .residual-panel::-webkit-scrollbar {
      width: 12px;
      height: 12px;
    }

    .residual-panel::-webkit-scrollbar-track {
      background: rgba(3, 13, 25, 0.92);
      border-left: 1px solid rgba(0, 255, 224, 0.12);
    }

    .residual-panel::-webkit-scrollbar-thumb {
      background: linear-gradient(180deg, rgba(0, 255, 224, 0.88), rgba(255, 229, 102, 0.74));
      border: 3px solid rgba(3, 13, 25, 0.92);
      border-radius: 999px;
      box-shadow: 0 0 16px rgba(0, 255, 224, 0.28);
    }

    .residual-panel::-webkit-scrollbar-corner {
      background: rgba(3, 13, 25, 0.92);
    }

    .residual-head {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      align-items: start;
      margin-bottom: 16px;
      border-bottom: 1px solid rgba(0,255,224,0.13);
      padding-bottom: 12px;
    }

    .residual-kicker {
      color: var(--accent);
      font-size: 0.68rem;
      letter-spacing: 3px;
      text-transform: uppercase;
      margin-bottom: 5px;
    }

    .residual-title {
      color: #fff;
      font-family: 'Orbitron', monospace;
      font-size: clamp(1.65rem, 2vw, 2.25rem);
      letter-spacing: 3px;
      text-transform: uppercase;
    }

    .residual-close {
      flex: 0 0 38px;
      height: 38px;
      border-radius: 5px;
    }

    .residual-export-strip {
      position: sticky;
      top: -24px;
      z-index: 2;
      display: grid;
      grid-template-columns: minmax(220px, 1fr) repeat(4, auto);
      gap: 8px;
      align-items: center;
      margin: -4px 0 14px;
      padding: 10px;
      border: 1px solid rgba(0, 255, 224, 0.22);
      border-radius: 6px;
      background: rgba(3, 13, 25, 0.96);
      box-shadow: 0 10px 28px rgba(0,0,0,0.26);
    }

    .residual-export-strip strong {
      display: block;
      color: #ffe566;
      font-size: 0.72rem;
      letter-spacing: 1.8px;
      text-transform: uppercase;
    }

    .residual-export-strip span {
      display: block;
      margin-top: 3px;
      color: rgba(230,252,255,0.62);
      font-size: 0.68rem;
      line-height: 1.35;
    }

    .residual-export-strip button {
      min-width: 72px;
      height: 40px;
      border: 1px solid rgba(0, 255, 224, 0.28);
      border-radius: 5px;
      background: rgba(0, 255, 224, 0.07);
      color: #eaffff;
      cursor: pointer;
      font-family: 'Share Tech Mono', monospace;
      font-size: 0.72rem;
      letter-spacing: 1px;
    }

    .residual-export-strip button:hover {
      background: rgba(0, 255, 224, 0.14);
      border-color: rgba(0, 255, 224, 0.44);
    }

    .residual-metric-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 8px;
      margin-bottom: 12px;
    }

    .residual-metric-grid div,
    .residual-note {
      border: 1px solid rgba(0, 255, 224, 0.13);
      background: rgba(0, 255, 224, 0.045);
      border-radius: 5px;
      padding: 12px;
    }

    .residual-metric-grid span {
      display: block;
      color: rgba(255,229,102,0.75);
      font-size: 0.68rem;
      letter-spacing: 1.6px;
      margin-bottom: 7px;
      text-transform: uppercase;
    }

    .residual-metric-grid strong {
      color: #fff;
      font-size: 0.9rem;
    }

    .residual-note {
      color: rgba(230,252,255,0.78);
      font-size: 0.82rem;
      line-height: 1.55;
      margin-bottom: 14px;
    }

    .dossier-progress-card {
      border: 1px solid rgba(0, 255, 224, 0.22);
      border-radius: 6px;
      padding: 18px;
      background: rgba(0, 255, 224, 0.045);
      box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
    }

    .dossier-progress-head {
      display: flex;
      align-items: start;
      justify-content: space-between;
      gap: 18px;
      margin-bottom: 14px;
    }

    .dossier-progress-head strong {
      display: block;
      color: #ffe566;
      font-family: 'Orbitron', monospace;
      font-size: 1.05rem;
      letter-spacing: 2px;
      text-transform: uppercase;
    }

    .dossier-progress-head span {
      display: block;
      margin-top: 8px;
      color: rgba(230,252,255,0.78);
      font-size: 0.86rem;
      line-height: 1.45;
    }

    .dossier-progress-head em {
      color: var(--accent);
      font-family: 'Orbitron', monospace;
      font-size: 1.6rem;
      font-style: normal;
      line-height: 1;
      text-shadow: 0 0 18px rgba(0, 255, 224, 0.28);
    }

    .dossier-progress-bar {
      height: 14px;
      overflow: hidden;
      border: 1px solid rgba(0, 255, 224, 0.3);
      border-radius: 999px;
      background: rgba(1, 7, 16, 0.84);
    }

    .dossier-progress-bar span {
      display: block;
      height: 100%;
      border-radius: inherit;
      background: linear-gradient(90deg, #00ffe0, #8dffbf, #ffe566);
      box-shadow: 0 0 20px rgba(0, 255, 224, 0.42);
      transition: width 180ms ease;
    }

    .dossier-progress-meta {
      display: flex;
      justify-content: space-between;
      gap: 18px;
      margin-top: 12px;
      color: rgba(166, 255, 244, 0.72);
      font-size: 0.76rem;
      line-height: 1.45;
    }

    .residual-rank-grid {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 8px;
      margin-bottom: 14px;
    }

    .residual-rank-panel {
      border: 1px solid rgba(0, 255, 224, 0.13);
      border-radius: 5px;
      background: rgba(0, 255, 224, 0.035);
      padding: 11px;
      min-width: 0;
    }

    .residual-rank-panel h3 {
      margin: 0 0 9px;
      color: rgba(255,229,102,0.82);
      font-size: 0.7rem;
      letter-spacing: 1.8px;
      text-transform: uppercase;
    }

    .residual-rank-row {
      display: grid;
      gap: 3px;
      padding: 7px 0;
      border-top: 1px solid rgba(0,255,224,0.08);
      color: rgba(230,252,255,0.76);
      font-size: 0.72rem;
      line-height: 1.35;
    }

    .residual-rank-row:first-of-type {
      border-top: 0;
      padding-top: 0;
    }

    .residual-rank-row strong {
      color: #fff;
      font-size: 0.76rem;
    }

    .residual-rank-row span {
      color: #8dffbf;
    }

    .residual-table {
      width: 100%;
      border-collapse: collapse;
      font-size: 0.76rem;
    }

    .residual-table th,
    .residual-table td {
      padding: 9px;
      border-bottom: 1px solid rgba(0,255,224,0.08);
      text-align: left;
      line-height: 1.42;
    }

    .residual-table th {
      color: rgba(166, 255, 244, 0.62);
      background: rgba(0, 255, 224, 0.05);
      text-transform: uppercase;
      letter-spacing: 1px;
    }

    @media (max-width: 900px) {
      .zenith-certified-hud {
        display: none;
      }
      .residual-metric-grid {
        grid-template-columns: 1fr;
      }
      .residual-rank-grid {
        grid-template-columns: 1fr;
      }
      .residual-export-strip {
        position: static;
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
      .residual-export-strip div {
        grid-column: 1 / -1;
      }
      .mission-expanded-summary {
        grid-template-columns: 1fr;
      }
    }

    .reloaded-grid {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 7px;
    }

    .reloaded-grid div {
      min-height: 58px;
      padding: 8px;
      border: 1px solid rgba(0, 255, 224, 0.12);
      border-radius: 5px;
      background: rgba(0, 255, 224, 0.035);
      overflow: hidden;
    }

    .reloaded-grid span,
    .mission-controls label {
      display: block;
      color: rgba(255, 229, 102, 0.72);
      font-size: 0.5rem;
      letter-spacing: 1.5px;
      margin-bottom: 5px;
      text-transform: uppercase;
    }

    .reloaded-grid strong {
      display: block;
      color: #f5ffff;
      font-size: 0.56rem;
      line-height: 1.35;
      word-break: break-word;
    }

    .reloaded-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin-top: 10px;
    }

    .reloaded-actions button {
      min-height: 29px;
      flex: 1 1 90px;
      font-size: 0.56rem;
      border-radius: 4px;
    }

    .reloaded-results {
      margin-top: 10px;
      max-height: 230px;
      overflow: auto;
      display: grid;
      gap: 6px;
    }

    .validation-row {
      padding: 7px;
      border: 1px solid rgba(0, 255, 224, 0.1);
      border-radius: 4px;
      background: rgba(0, 10, 24, 0.65);
      font-size: 0.57rem;
      line-height: 1.45;
      color: rgba(230, 252, 255, 0.82);
    }

    .validation-row strong {
      color: #fff;
    }

    .mission-controls {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 8px;
    }

    .mission-controls .custom-input,
    .mission-controls .custom-select {
      width: 100%;
      min-width: 0;
    }

    .mission-section-stack {
      display: grid;
      gap: 7px;
    }

    .mission-section {
      overflow: hidden;
      border: 1px solid rgba(0, 255, 224, 0.14);
      border-radius: 6px;
      background: rgba(0, 255, 224, 0.025);
    }

    .mission-section summary {
      display: grid;
      grid-template-columns: auto minmax(0, 1fr) auto;
      align-items: center;
      gap: 9px;
      min-height: 38px;
      padding: 7px 10px;
      cursor: pointer;
      list-style: none;
      color: #eaffff;
      font-family: 'Orbitron', monospace;
      font-size: 0.62rem;
      letter-spacing: 1.5px;
      text-transform: uppercase;
      user-select: none;
    }

    .mission-section summary::-webkit-details-marker {
      display: none;
    }

    .mission-section summary::after {
      content: '+';
      color: var(--accent);
      font-size: 0.9rem;
    }

    .mission-section[open] summary::after {
      content: '-';
    }

    .mission-section summary small {
      overflow: hidden;
      color: rgba(166, 255, 244, 0.48);
      font-family: 'Share Tech Mono', monospace;
      font-size: 0.5rem;
      font-weight: 400;
      letter-spacing: 0.4px;
      text-overflow: ellipsis;
      text-transform: none;
      white-space: nowrap;
    }

    .mission-section > .mission-controls {
      padding: 9px;
      border-top: 1px solid rgba(0, 255, 224, 0.1);
    }

    .mission-control-wide {
      grid-column: 1 / -1;
    }

    .mission-output-actions {
      display: grid;
      grid-template-columns: repeat(3, minmax(0, 1fr));
      gap: 7px;
      padding: 0 9px 8px;
    }

    .mission-output-section .mission-summary,
    .mission-output-section .mission-note {
      margin: 0 9px 7px;
    }

    .mission-output-section #mission-porkchop {
      width: calc(100% - 18px);
      margin: 7px 9px;
      aspect-ratio: 16 / 8;
    }

    .mission-debug-control {
      grid-column: 1 / -1;
    }

    .mission-check-label,
    .mission-expanded-controls .mission-debug-toggle,
    .mission-expanded-groups .mission-debug-toggle {
      display: flex;
      align-items: center;
      gap: 8px;
      min-height: 36px;
      color: rgba(230, 252, 255, 0.78);
      font-size: 0.58rem;
      letter-spacing: 0.7px;
      text-transform: none;
    }

    .mission-check-label input,
    .mission-expanded-controls .mission-debug-toggle input,
    .mission-expanded-groups .mission-debug-toggle input {
      width: 15px;
      height: 15px;
      min-width: 15px;
      accent-color: var(--accent);
    }

    .mission-summary,
    .mission-note {
      margin-top: 10px;
      color: rgba(230, 252, 255, 0.78);
      font-size: 0.58rem;
      line-height: 1.55;
    }

    #mission-porkchop {
      width: 100%;
      aspect-ratio: 16 / 9;
      height: auto;
      margin-top: 10px;
      display: block;
      border: 1px solid rgba(0, 255, 224, 0.16);
      border-radius: 6px;
      background: #030916;
    }

    .mission-expanded-modal {
      padding: 8px;
      overflow: hidden;
    }

    .mission-expanded-panel {
      box-sizing: border-box;
      width: min(1900px, calc(100vw - 16px));
      height: calc(100vh - 16px);
      min-height: 0;
      overflow: hidden;
      padding: 10px;
      display: grid;
      grid-template-rows: auto auto minmax(0, 1fr) auto auto;
      gap: 7px;
    }

    .mission-expanded-head {
      min-height: 42px;
      margin: 0;
      padding: 6px 10px;
    }

    .mission-expanded-close {
      height: 32px;
    }

    .mission-expanded-groups {
      display: grid;
      grid-template-columns: 0.9fr 1.18fr 1.12fr 0.9fr;
      gap: 7px;
      min-height: 0;
    }

    .mission-expanded-group {
      min-width: 0;
      padding: 7px;
      border: 1px solid rgba(0, 255, 224, 0.14);
      border-radius: 5px;
      background: rgba(0, 255, 224, 0.028);
    }

    .mission-expanded-group > strong {
      display: block;
      margin-bottom: 5px;
      color: rgba(255, 229, 102, 0.84);
      font-family: 'Orbitron', monospace;
      font-size: 0.52rem;
      letter-spacing: 1.4px;
      text-transform: uppercase;
    }

    .mission-expanded-fields {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      gap: 5px;
    }

    .mission-expanded-fields-route {
      grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .mission-expanded-groups label {
      display: grid;
      gap: 3px;
      min-width: 0;
      color: rgba(166, 255, 244, 0.62);
      font-size: 0.46rem;
      letter-spacing: 0.8px;
      text-transform: uppercase;
    }

    .mission-expanded-groups select,
    .mission-expanded-groups input,
    .mission-expanded-groups button {
      box-sizing: border-box;
      width: 100%;
      min-width: 0;
      height: 29px;
      padding: 0 7px;
      border: 1px solid rgba(0, 255, 224, 0.24);
      border-radius: 3px;
      background: rgba(1, 10, 22, 0.94);
      color: #eaffff;
      font-family: 'Share Tech Mono', monospace;
      font-size: 0.6rem;
    }

    .mission-expanded-actions {
      display: grid;
      grid-template-columns: auto minmax(92px, 1fr);
      align-items: end;
      gap: 6px;
      margin-top: 5px;
    }

    .mission-expanded-actions button {
      color: #ffe566;
      border-color: rgba(255, 213, 0, 0.68);
      cursor: pointer;
      letter-spacing: 1px;
    }

    .mission-expanded-actions button:hover {
      background: rgba(255, 213, 0, 0.1);
    }

    .mission-expanded-groups .mission-debug-toggle {
      min-height: 29px;
      white-space: nowrap;
    }

    .mission-expanded-stage {
      width: 100%;
      height: 100%;
      min-height: 0;
    }

    #mission-expanded-canvas {
      width: 100%;
      height: 100%;
      min-height: 0;
      aspect-ratio: auto;
    }

    .mission-expanded-summary {
      gap: 5px;
      margin: 0;
      padding: 6px 8px;
    }

    .mission-expanded-summary div {
      font-size: 0.52rem;
      line-height: 1.3;
    }

    .mission-expanded-summary span {
      margin-bottom: 2px;
      font-size: 0.46rem;
    }

    .mission-expanded-note {
      margin: 0;
      padding-top: 5px;
      font-size: 0.48rem;
      line-height: 1.25;
    }

    @media (max-width: 520px) {
      .reloaded-grid,
      .mission-controls {
        grid-template-columns: 1fr;
      }
    }

    @media (max-width: 1180px) {
      .mission-expanded-controls {
        grid-template-columns: repeat(3, minmax(130px, 1fr));
      }

      .mission-expanded-groups {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .mission-expanded-summary {
        grid-template-columns: repeat(4, minmax(0, 1fr));
      }
    }

    @media (max-width: 760px) {
      .mission-expanded-modal {
        padding: 6px;
      }

      .mission-expanded-panel {
        width: calc(100vw - 12px);
        height: calc(100vh - 12px);
        padding: 10px;
        overflow: auto;
      }

      .mission-expanded-controls {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }

      .mission-expanded-groups {
        grid-template-columns: 1fr;
      }

      .mission-expanded-stage,
      #mission-expanded-canvas {
        min-height: 360px;
      }

      .mission-expanded-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
      }
    }


#vsop87-badge {
  position: absolute;
  top: 15px;
  left: 15px;
  background: rgba(8, 14, 24, 0.85);
  border: 1px solid rgba(0, 255, 213, 0.4);
  border-radius: 6px;
  padding: 8px 12px;
  font-size: 0.6rem;
  color: #e2e8f0;
  display: none;
  font-family: monospace;
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 12px rgba(0,0,0,0.5);
  pointer-events: auto;
  cursor: pointer;
  transition: all 0.3s ease;
  z-index: 20;
}

.vsop87-badge-inner {
  display: flex;
  align-items: center;
  gap: 6px;
}

#vsop87-badge-dot {
  width: 6px;
  height: 6px;
  background: #00ffd5;
  border-radius: 50%;
  box-shadow: 0 0 6px #00ffd5;
  display: inline-block;
}

#vsop87-status {
  margin-top: 2px;
  color: #a0aec0;
  font-size: 0.52rem;
}

/* =========================================================================
   INTERFACE UTILITY STYLES
   ========================================================================= */

.svg-icon-inline { vertical-align: middle; margin-right: 6px; }
.stroke-2 { stroke-width: 2; }
.control-label-dim { font-size: 0.62rem; color: var(--dim); }
.control-label-flex { font-size: 0.62rem; color: var(--dim); display: flex; justify-content: space-between; width: 100%; }
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 2px; }
.mt-4 { margin-top: 4px; }
.mt-6 { margin-top: 6px; }
.mt-8 { margin-top: 8px; }
.mt-10 { margin-top: 10px; }
.mt-12 { margin-top: 12px; }
.mt-14 { margin-top: 14px; }
.mb-8 { margin-bottom: 8px; }
.mb-12 { margin-bottom: 12px; }

.flex-1 { flex: 1; }
.flex-2 { flex: 2; }
.flex-row-8 { display: flex; gap: 8px; }
.flex-row-8-center { display: flex; align-items: center; gap: 8px; }
.flex-row-16-center { display: flex; align-items: center; gap: 16px; }
.flex-between-center { display: flex; align-items: center; justify-content: space-between; }
.flex-between-tiny { display: flex; justify-content: space-between; font-size: 0.50rem; color: var(--dim); }
.block-center { display: block; text-align: center; }

.w-100 { width: 100%; }
.w-70 { width: 70px; }
.w-30-right { width: 30px; text-align: right; }

.text-normal { font-size: 0.65rem; color: var(--text); }
.text-accent { color: var(--accent); }
.text-accent-small { color: var(--accent); font-size: 0.55rem; }
.text-accent-bold { font-size: 0.62rem; color: var(--accent); font-weight: bold; }
.text-warn { color: #ffaa00; }
.text-warn-small { color: #ffaa00; font-size: 0.55rem; }
.text-sandbox { color: #ff6666; }

.btn-full-accent { width: 100%; border-color: var(--accent); font-size: 0.65rem; }
.btn-full-warn { width: 100%; border-color: #ffaa00; color: #ffaa00; font-size: 0.65rem; }
.btn-full-warn-bg { width: 100%; border-color: #ffaa00; color: #ffaa00; font-size: 0.65rem; background: rgba(255,170,0,0.02); }
.btn-small { font-size: 0.6rem; }
.btn-info { border-color: #00ffd5; color: #00ffd5; font-size: 0.6rem; }
.btn-sandbox { border-color: #ff6666; color: #ff6666; font-size: 0.6rem; }
.tab-btn-small { font-size: 0.55rem; padding: 3px 6px; border: none; }
.toolbar-btn-small { font-size: 0.55rem; padding: 4px 6px; }

.progress-wrap-accent { height: 3px; background: rgba(0,255,224,0.06); }
.progress-wrap-warn { height: 3px; background: rgba(255,170,0,0.06); }
.progress-fill-accent { height: 100%; background: var(--accent); transition: width 0.1s; }
.progress-fill-warn { height: 100%; background: #ffaa00; transition: width 0.1s; }

.note-text { font-size: 0.58rem; line-height: 1.3; }
.help-text { font-size: 0.52rem; color: var(--dim); line-height: 1.3; }
.checkbox-label { font-size: 0.62rem; color: var(--dim); display: flex; align-items: center; gap: 4px; cursor: pointer; }
.checkbox-accent { accent-color: var(--accent); }
.checkbox-label-sandbox { display: flex; align-items: center; gap: 6px; font-size: 0.58rem; color: #ff6666; cursor: pointer; font-family: 'Share Tech Mono', monospace; text-transform: uppercase; }
.checkbox-sandbox { accent-color: #ff6666; }

.card.border-accent { border-color: rgba(0, 255, 224, 0.25); }
.card.border-warn { border-color: rgba(255, 170, 0, 0.3); }
.card.border-sandbox { border-color: rgba(255, 100, 100, 0.4); }

.warn-box { font-size: 0.55rem; color: #ffaa00; background: rgba(255,170,0,0.06); padding: 4px 6px; border: 1px solid rgba(255,170,0,0.15); border-radius: 3px; }
.transition-card { transition: all 0.3s ease; }

.export-box { border-top: 1px solid rgba(0, 255, 224, 0.12); padding-top: 12px; }
.export-title { font-size: 0.62rem; color: var(--dim); margin-bottom: 6px; font-family: 'Share Tech Mono', monospace; letter-spacing: 0.5px; }

.btn-export {
  width: 100%;
  border: 1px solid rgba(0, 255, 224, 0.35);
  color: var(--accent);
  font-family: 'Share Tech Mono', monospace;
  font-size: 0.62rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  background: rgba(0, 255, 224, 0.04);
  height: 28px;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
  outline: none;
}
.btn-export:hover {
  background: rgba(0, 255, 224, 0.12);
  border-color: var(--accent);
}

.exo-info-card {
  padding: 10px 12px;
  background: rgba(0,255,213,0.06);
  border: 1px solid rgba(0,255,213,0.2);
  border-radius: 8px;
  font-family: 'Share Tech Mono', monospace;
}
.exo-info-name { font-size: 0.72rem; color: #00ffd5; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 6px; }
.exo-info-subtitle { font-size: 0.6rem; color: #a0aec0; margin-bottom: 3px; }
.exo-info-hz { font-size: 0.6rem; color: #68d391; }
.exo-info-desc { font-size: 0.58rem; color: #718096; margin-top: 6px; line-height: 1.5; border-top: 1px solid rgba(0,255,213,0.12); padding-top: 6px; }
.speed-label { font-size: 0.55rem; color: var(--dim); letter-spacing: 1px; }

