.horizon-card { order:29; --horizon-sky-top:#dcebf8; --horizon-sky-bottom:#f6f0d7; --horizon-sky-grid:#7f96ac; --horizon-sky-label:#284968; --horizon-planet-color:#496d91; --horizon-selected-color:#005cae; }
.horizon-card[data-sky-phase="morning"] { --horizon-sky-top:#3e5680; --horizon-sky-bottom:#f3b776; --horizon-sky-grid:#c6d2e3; --horizon-sky-label:#fff5df; --horizon-planet-color:#fff0c6; --horizon-selected-color:#ffe19b; }
.horizon-card[data-sky-phase="evening"] { --horizon-sky-top:#483b6e; --horizon-sky-bottom:#e6a078; --horizon-sky-grid:#c6c2df; --horizon-sky-label:#fff5df; --horizon-planet-color:#fff0c6; --horizon-selected-color:#ffe19b; }
.horizon-card[data-sky-level="nautical"] { --horizon-sky-top:#202c50; --horizon-sky-bottom:#80658b; }
.horizon-card[data-sky-level="astronomical"] { --horizon-sky-top:#14213c; --horizon-sky-bottom:#30456b; }
.horizon-card[data-sky-phase="night"] { --horizon-sky-top:#0c1730; --horizon-sky-bottom:#182f52; --horizon-sky-grid:#6e84a3; --horizon-sky-label:#fff5df; --horizon-planet-color:#f4ecd1; --horizon-selected-color:#ffdc87; }
.light-travel-card { order:22; }
.horizon-card,
.light-travel-card { gap:12px; }
.horizon-card .group-title,
.light-travel-card .group-title { margin-top:0; margin-bottom:0; }
.explorer-context,
.explorer-note { width:100%; text-align:center; color:var(--muted); overflow-wrap:anywhere; }
.explorer-context { font-size:var(--font-body); line-height:var(--line-body); }
.explorer-note { font-size:var(--font-note); line-height:var(--line-note); }
.horizon-view-tabs { display:flex; flex-wrap:wrap; justify-content:center; gap:6px; }
.horizon-view-tabs button {
  min-height:var(--control-height);
  margin:0;
  padding:7px 13px;
  border:1px solid #bfdbfe;
  border-radius:999px;
  background:#f8fbff;
  color:#0f172a;
  box-shadow:none;
  font-size:var(--font-control);
  font-weight:700;
  line-height:1.2;
}
.horizon-view-tabs button[aria-selected="true"] {
  background:linear-gradient(135deg,#1d4ed8,#3b82f6);
  border-color:#2563eb;
  color:#fff;
}
.horizon-view-panel { display:grid; gap:12px; width:100%; min-width:0; }
.horizon-view-panel[hidden] { display:none; }
.horizon-calculation-copy { margin:0; font-size:var(--font-note); line-height:var(--line-note); }
.horizon-calculation-equations,
.horizon-calculation-body { display:grid; gap:7px; min-width:0; padding:12px; border-radius:9px; }
.horizon-calculation-equations { background:#f4f7fb; }
.horizon-calculation-equations code,
.horizon-calculation-body code {
  font-size:var(--font-note);
  line-height:1.55;
  overflow-wrap:anywhere;
}
.horizon-calculation-bodies { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,290px),1fr)); gap:12px; }
.horizon-calculation-body {
  align-content:start;
  border:1px solid #dbeafe;
  background:#fbfdff;
  --horizon-ray:#175aa4;
}
.horizon-calculation-sun { --horizon-ray:#a75807; }
.horizon-calculation-body h3 { margin:0; font-size:var(--font-subheading); }
.horizon-calculation-figure { margin:0; text-align:center; }
.horizon-calculation-figure svg { display:block; width:min(100%,180px); height:auto; margin:0 auto 5px; border-radius:8px; }
.horizon-calculation-figure figcaption { color:var(--horizon-ray); font-weight:700; }
.horizon-sketch-sky { fill:#e5f2ff; }
.horizon-sketch-ground { fill:#edf0f3; }
.horizon-sketch-axis { stroke:#63768c; stroke-width:1.5; }
.horizon-sketch-ray,
.horizon-sketch-angle { fill:none; stroke:var(--horizon-ray); stroke-width:2; }
.horizon-sketch-marker { fill:var(--horizon-ray); }
.horizon-sketch-observer { fill:#263a52; }
.horizon-plot { display:block; width:100%; height:282px; flex-shrink:0; }
.horizon-plot text { font-family:var(--font-family); font-size:var(--font-diagram); fill:var(--fg); }
.horizon-grid-line { stroke:var(--border); stroke-width:1; }
.horizon-grid-line.is-sky { stroke:var(--horizon-sky-grid); opacity:.5; }
.horizon-sky-top { stop-color:var(--horizon-sky-top); }
.horizon-sky-bottom { stop-color:var(--horizon-sky-bottom); }
.horizon-marker:not(.is-below) circle { fill:var(--horizon-planet-color); stroke:var(--horizon-sky-top); }
.horizon-marker.is-selected:not(.is-below) circle { fill:var(--horizon-selected-color); }
.horizon-marker:not(.is-below) text { fill:var(--horizon-sky-label); stroke:var(--horizon-sky-top); }
.horizon-card[data-sky-phase="day"] .horizon-marker:not(.is-selected):not(.is-below) { opacity:.7; }
.horizon-light-state { min-height:1.6em; text-align:center; color:var(--fg); font-size:var(--font-note); font-weight:600; line-height:var(--line-note); }
.horizon-daylight-panel { width:100%; display:grid; gap:8px; }
.horizon-band-heading { display:flex; flex-wrap:wrap; justify-content:space-between; gap:4px 12px; color:var(--muted); font-size:var(--font-note); line-height:var(--line-note); }
.horizon-light-band { position:relative; height:22px; margin-top:4px; }
.horizon-light-segments { position:absolute; inset:0; overflow:hidden; border-radius:5px; }
.horizon-light-segment { position:absolute; top:0; bottom:0; }
.horizon-light-segment[data-phase="day"], .horizon-light-swatch[data-phase="day"] { background:#c9e4f7; }
.horizon-light-segment[data-phase="night"], .horizon-light-swatch[data-phase="night"] { background:#142748; }
.horizon-light-segment[data-key="morning-civil"] { background:#e7b27e; }
.horizon-light-segment[data-key="evening-civil"] { background:#d59a83; }
.horizon-light-segment[data-level="nautical"] { background:#80658b; }
.horizon-light-segment[data-level="astronomical"] { background:#30456b; }
.horizon-light-swatch[data-phase="morning"] { background:linear-gradient(90deg,#30456b,#e7b27e); }
.horizon-light-swatch[data-phase="evening"] { background:linear-gradient(90deg,#d59a83,#30456b); }
.horizon-light-cursor { position:absolute; top:-3px; bottom:-3px; width:2px; background:#fff; box-shadow:0 0 0 1px #142748; transform:translateX(-50%); pointer-events:none; }
.horizon-light-cursor::before { content:""; position:absolute; top:-5px; left:-3px; border-left:4px solid transparent; border-right:4px solid transparent; border-top:5px solid #142748; }
.horizon-light-ticks { position:relative; height:19px; color:var(--muted); font-size:var(--font-note); line-height:var(--line-note); }
.horizon-light-tick { position:absolute; transform:translateX(-50%); font-variant-numeric:tabular-nums; }
.horizon-light-tick[data-edge="start"] { transform:none; }
.horizon-light-tick[data-edge="end"] { transform:translateX(-100%); }
.horizon-light-legend { display:flex; flex-wrap:wrap; justify-content:center; gap:5px 14px; color:var(--muted); font-size:var(--font-note); line-height:var(--line-note); }
.horizon-light-legend-item { display:inline-flex; align-items:center; gap:5px; }
.horizon-light-swatch { display:inline-block; width:13px; height:9px; border-radius:2px; flex-shrink:0; }
.horizon-solar-events { display:flex; flex-wrap:wrap; justify-content:space-between; gap:5px 12px; color:var(--fg); font-size:var(--font-note); font-variant-numeric:tabular-nums; line-height:var(--line-note); }
.horizon-ground { fill:var(--fg); opacity:.04; }
.horizon-line { stroke:var(--muted); stroke-width:1.5; }
.horizon-marker circle { fill:var(--accent); stroke:var(--card); stroke-width:2; }
.horizon-marker.is-selected circle { r:7px; }
.horizon-marker text { paint-order:stroke; stroke:var(--card); stroke-width:4px; stroke-linejoin:round; }
.horizon-marker.is-below { opacity:.55; }
.horizon-marker.is-below circle { fill:var(--muted); }
.explorer-slider-heading { width:100%; display:flex; justify-content:space-between; align-items:center; flex-wrap:wrap; gap:6px 12px; font-size:var(--font-note); line-height:var(--line-note); }
.explorer-slider-heading output { font-variant-numeric:tabular-nums; }
input.explorer-slider { width:100%; min-height:32px; margin:0; padding:0; border:0; background:transparent; accent-color:var(--accent); }
input.explorer-slider::-webkit-slider-runnable-track { height:6px; background:var(--border); border-radius:3px; }
input.explorer-slider::-webkit-slider-thumb { margin-top:-9px; }
input.explorer-slider::-moz-range-track { height:6px; background:var(--border); border-radius:3px; }
input.explorer-slider:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
.explorer-range-ends { width:100%; display:flex; align-items:center; justify-content:space-between; gap:8px; font-size:var(--font-note); color:var(--muted); line-height:var(--line-note); }
.explorer-reset { background:transparent; color:var(--accent); border:1px solid var(--border); padding:7px 10px; margin:0; font-size:var(--font-control); border-radius:8px; line-height:var(--line-control); }
.horizon-planet-list { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,145px),1fr)); gap:6px; width:100%; }
.horizon-planet { display:flex; flex-direction:column; align-items:flex-start; gap:5px; margin:0; padding:9px 10px; border:1px solid var(--border); border-radius:9px; background:var(--card); color:var(--fg); text-align:left; min-width:0; }
.horizon-planet [data-horizon-position] { font-size:var(--font-note); line-height:var(--line-note); }
.horizon-planet[aria-pressed="true"] { border-color:var(--accent); box-shadow:inset 0 0 0 1px var(--accent); }
.horizon-planet.is-below { color:var(--muted); }
.explorer-detail { width:100%; padding:12px 14px; border-radius:9px; background:color-mix(in srgb,var(--accent) 8%,var(--card)); font-size:var(--font-body); line-height:var(--line-body); overflow-wrap:anywhere; }
.light-travel-targets { display:flex; flex-wrap:wrap; justify-content:center; gap:6px; width:100%; }
.light-travel-target { margin:0; min-height:36px; padding:8px 12px; border:1px solid var(--border); border-radius:18px; font-size:var(--font-control); background:var(--card); color:var(--fg); line-height:var(--line-control); }
.light-travel-target[aria-pressed="true"] { background:var(--accent); color:#fff; border-color:var(--accent); }
.light-travel-duration { margin-top:8px; font-size:clamp(1.4rem,4vw,2rem); font-variant-numeric:tabular-nums; text-align:center; width:100%; }
.light-travel-track { position:relative; width:calc(100% - 64px); height:92px; margin:4px 32px 0; flex-shrink:0; }
.light-travel-beam,
.light-travel-progress { position:absolute; left:0; top:28px; height:3px; }
.light-travel-beam { width:100%; background:var(--border); }
.light-travel-progress { background:#d69a16; }
.light-travel-photon { position:absolute; top:22px; width:15px; height:15px; background:#e4af32; border-radius:50%; transform:translateX(-50%); box-shadow:0 0 12px #e4af3280; }
.light-travel-end { position:absolute; top:16px; transform:translateX(-50%); display:grid; justify-items:center; gap:12px; font-size:var(--font-note); line-height:var(--line-note); }
.light-travel-end > span:last-child { white-space:nowrap; }
.light-travel-origin { left:0; }
.light-travel-destination { left:100%; }
.light-travel-orb { width:26px; height:26px; border-radius:50%; background:var(--accent); border:4px solid var(--card); }
.light-travel-origin .light-travel-orb { background:#e4af32; }
.horizon-card button:focus-visible,
.light-travel-card button:focus-visible { outline:2px solid var(--accent); outline-offset:3px; }
@media (min-width:1180px) { .horizon-card { grid-column:span 2; } }
@media (max-width:760px) {
  .horizon-planet,
  .light-travel-target,
  .explorer-reset { min-height:44px; }
  input.explorer-slider { min-height:44px; }
  .horizon-planet-list { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

.light-travel-card button:disabled { opacity:.55; cursor:default; }
.light-travel-card input.explorer-slider:disabled { opacity:1; }
