/*
 * "Observatory console" theme — Space Map's own take on the Lucario Ink
 * language: Fira Code, cyan light on plum-black glass, cobalt aura edges,
 * gold for whatever is active, scanlined hologram tiles. Here the emitter is
 * a horizontal console rail, and every window is projected out of the control
 * that opened it (cone + unfold), so nothing simply "appears".
 * Loaded after styles.css; it restyles only.
 */
:root {
  --cyan: #63c7e6;
  --cyan-soft: #8295a1;
  --cyan-bright: #c7f2ff;
  --text-muted: #789bb8;
  --fur-soft: #7b6874;
  --aura-blue: #4f8dff;
  --aura-bright: #8ed7ff;
  --gold: #f0c75e;
  --gold-soft: #f0c75e88;
  --border: #5b9dff55;
  --borderd: #5b9dff2b;
  --mono: "Fira Code", "Cascadia Code", Consolas, monospace;
  --text: #c7f2ff;
  --muted: #789bb8;
  --line: #5b9dff24;
  --panel: #0c0b10f2;
  --ease-out-expo: cubic-bezier(.16, 1, .3, 1);
  --holo-scan: repeating-linear-gradient(0deg, #8ed7ff0a 0 1px, transparent 1px 3px);
  /* Pixel stops: a panel that grows (e.g. "Data & sources" opening) keeps
     its gradient where it was instead of the whole fill jumping down. */
  --glass: var(--holo-scan), radial-gradient(520px 420px at 0 0, #4f8dff17, transparent), linear-gradient(180deg, #14203aea, #0c0b10ee 460px) top / 100% 100% no-repeat, #0c0b10ee;
}

html, body { background: #0b0a0e; color: var(--cyan); font: 12px/1.5 var(--mono); }
button, input, select, kbd, .stat-row strong, .object-card h1 { font-family: var(--mono) !important; }
button, select, input[type=date] { color: var(--cyan); background: transparent; border: 1px solid var(--borderd); border-radius: 3px; }
button:hover { background: #4f8dff14; color: var(--cyan-bright); border-color: var(--border); }
button:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 1px solid var(--aura-bright); outline-offset: 2px; box-shadow: 0 0 10px #8ed7ff33; }
::selection { background: #f0c75e44; color: var(--cyan-bright); }
.map-panel { background: #08070b; }

/* ── Console bar: a row of hologram tiles over a light rail ─────────────── */
.map-toolbar {
  top: 14px; left: 14px; padding: 9px 8px 6px; gap: 6px; align-items: center;
  border: 1px solid #8ed7ff26; border-radius: 6px;
  background: var(--holo-scan), linear-gradient(180deg, #14203ad0, #0c0b10d8);
  box-shadow: 0 0 16px #4f8dff1f, 0 8px 24px #00000080;
}
.map-toolbar::after {   /* the emitter rail along the top edge: it projects the console below it */
  content: ""; position: absolute; left: 10px; right: 10px; top: -1px; height: 2px; pointer-events: none; border-radius: 1px;
  background: linear-gradient(90deg, transparent, var(--aura-bright) 12%, var(--aura-blue) 55%, #4f8dff44 85%, transparent);
  -webkit-mask: repeating-linear-gradient(90deg, #000 0 26px, #0008 26px 30px, #000 30px 44px, transparent 44px 47px);
  mask: repeating-linear-gradient(90deg, #000 0 26px, #0008 26px 30px, #000 30px 44px, transparent 44px 47px);
  box-shadow: 0 0 8px #4f8dff66; opacity: .8;
}
.map-toolbar .home-button {
  width: 38px; height: 38px; min-width: 0; padding: 0; border: 1px solid #8ed7ff33; border-radius: 5px; color: var(--gold); font-size: 19px;
  background: var(--holo-scan), radial-gradient(circle at 50% 45%, #f0c75e22, transparent 70%);
  box-shadow: 0 0 12px #4f8dff26; text-shadow: 0 0 10px var(--gold-soft);
}
.map-toolbar .home-button:hover { border-color: var(--aura-bright); box-shadow: 0 0 18px #4f8dff4d; }
.toolbar-divider { width: 1px; height: 26px; margin: 0 2px; background: linear-gradient(180deg, transparent, #8ed7ff55, transparent); }
.map-toolbar .nav-item {
  position: relative; display: grid; justify-items: center; width: 40px; height: auto; min-width: 0; padding: 0;
  border: 0; border-radius: 0; background: none; color: var(--cyan-soft);
}
.map-toolbar .nav-item:hover { background: none; }
.nav-icon {
  display: flex; align-items: center; justify-content: center; width: 38px; height: 38px;
  border: 1px solid #8ed7ff2e; border-radius: 5px;
  background: var(--holo-scan), linear-gradient(180deg, #4f8dff24, #4f8dff08);
  box-shadow: 0 0 10px #4f8dff1f, inset 0 0 10px #8ed7ff12;
  transform: perspective(220px) rotateX(14deg); transform-origin: center top;
  transition: transform .45s var(--ease-out-expo), border-color .35s ease, box-shadow .35s ease;
}
.nav-icon svg { filter: drop-shadow(0 0 2px #8ed7ff55); transition: filter .35s ease, transform .4s var(--ease-out-expo); }
.map-toolbar .nav-item:is(:hover, :focus-visible) { color: var(--aura-bright); outline: none; box-shadow: none; }
.map-toolbar .nav-item:is(:hover, :focus-visible) .nav-icon {
  transform: perspective(220px) rotateX(0deg); border-color: #8ed7ff80; box-shadow: 0 0 18px #4f8dff59, inset 0 0 14px #8ed7ff26;
}
.map-toolbar .nav-item:is(:hover, :focus-visible) .nav-icon svg { filter: drop-shadow(0 0 5px #8ed7ffcc); transform: scale(1.1); }
.map-toolbar .nav-item[aria-expanded=true] { color: var(--cyan-bright); background: none; }
.map-toolbar .nav-item[aria-expanded=true] .nav-icon {
  transform: none; border-color: #f0c75e77;
  background: var(--holo-scan), linear-gradient(180deg, #f0c75e22, #4f8dff12);
  box-shadow: 0 0 12px #f0c75e2a, inset 0 0 12px #f0c75e14;
}
.map-toolbar .nav-item[aria-expanded=true]::after {   /* active marker on the rail */
  content: ""; position: absolute; left: 50%; top: -10px; width: 22px; height: 3px; transform: translateX(-50%); border-radius: 2px;
  background: var(--gold); box-shadow: 0 0 10px var(--gold), 0 0 18px var(--gold-soft);
}
.map-toolbar .nav-item.is-playing .nav-icon { border-color: #f0c75e99; box-shadow: 0 0 14px #f0c75e44; color: var(--gold); }
.nav-label {
  position: absolute; top: calc(100% + 14px); left: 50%; transform: translateX(-50%); z-index: 2;
  padding: 2px 8px; border: 1px solid #8ed7ff4d; border-radius: 3px; white-space: nowrap; font-size: 11px; letter-spacing: 1.5px;
  background: var(--holo-scan), linear-gradient(180deg, #16243ff2, #0c0b10f2); color: var(--cyan-bright);
  box-shadow: 0 0 14px #4f8dff33, 0 4px 14px #00000080; text-shadow: -.5px 0 #ff5fa233, .5px 0 #5fe1ff55, 0 0 8px #8ed7ff55;
  opacity: 0; visibility: hidden; pointer-events: none;
}
.nav-label::before { content: ""; position: absolute; bottom: 100%; left: 50%; width: 1px; height: 8px; background: linear-gradient(180deg, #8ed7ff00, #8ed7ffcc); box-shadow: 0 0 4px #8ed7ff88; }
@media (hover: hover) {
  .map-toolbar .nav-item:is(:hover, :focus-visible):not([aria-expanded=true]) .nav-label { visibility: visible; opacity: 1; animation: label-drop .35s var(--ease-out-expo) both; }
}
@keyframes label-drop {
  0% { opacity: 0; clip-path: inset(0 46% 100% 46%); }
  45% { opacity: 1; clip-path: inset(0 46% 0 46%); }
  100% { opacity: 1; clip-path: inset(-3px -3px -3px -3px); }
}

/* ── Windows: hologram cards projected from their control ─────────────── */
.floating-panel, .inspector, .documentation-window {
  border: 1px solid #8ed7ff47; border-radius: 6px; color: var(--cyan);
  background: var(--glass);
  box-shadow: 0 0 18px #4f8dff2e, 0 10px 30px #00000099, inset 0 0 22px #8ed7ff0f;
  scrollbar-color: #5b9dff55 transparent;
}
.floating-panel, .inspector { top: 82px; left: 14px; width: 336px; max-height: calc(100dvh - 160px); padding: 16px 18px; overflow-y: auto; }
#help-panel { top: auto; left: auto; right: 14px; bottom: 106px; width: 320px; }
.documentation-window { top: 14px; right: 14px; bottom: 106px; }

.is-projecting { animation: holo-unfold .55s .1s var(--ease-out-expo) backwards; }
@keyframes holo-unfold {
  0% { opacity: .5; clip-path: inset(0 calc(100% - var(--beam-x) - 2px) calc(100% - 2px) calc(var(--beam-x) - 2px) round 6px); }
  40% { opacity: 1; clip-path: inset(0 0 calc(100% - 2px) 0 round 6px); }
  100% { opacity: 1; clip-path: inset(0 0 0 0 round 6px); }
}
.beam-up.is-projecting { animation-name: holo-unfold-up; }
@keyframes holo-unfold-up {
  0% { opacity: .5; clip-path: inset(calc(100% - 2px) calc(100% - var(--beam-x) - 2px) 0 calc(var(--beam-x) - 2px) round 6px); }
  40% { opacity: 1; clip-path: inset(calc(100% - 2px) 0 0 0 round 6px); }
  100% { opacity: 1; clip-path: inset(0 0 0 0 round 6px); }
}
/* The projection cone lives in its own fixed element (windows scroll, so
   they cannot paint outside themselves). */
.holo-beam { position: fixed; z-index: 18; pointer-events: none; opacity: 0; }
.holo-beam.is-down { background: linear-gradient(180deg, #8ed7ff18, #8ed7ff66); clip-path: polygon(calc(var(--from) - 3px) 0, calc(var(--from) + 3px) 0, var(--to-right) 100%, var(--to-left) 100%); }
.holo-beam.is-up { background: linear-gradient(0deg, #8ed7ff18, #8ed7ff66); clip-path: polygon(var(--to-left) 0, var(--to-right) 0, calc(var(--from) + 3px) 100%, calc(var(--from) - 3px) 100%); }
.holo-beam.is-live { animation: beam-flash 1.1s ease-out both; }
@keyframes beam-flash { 0% { opacity: 0; } 12% { opacity: 1; } 50% { opacity: .55; } 100% { opacity: 0; } }

.floating-panel h2, .section-heading, .selected-section > .section-heading {
  margin: 0 0 14px; padding-bottom: 8px; border-bottom: 1px solid var(--borderd);
  color: var(--cyan); font: 600 11px var(--mono); letter-spacing: 2.5px; text-transform: uppercase;
  text-shadow: -.5px 0 #ff5fa233, .5px 0 #5fe1ff55, 0 0 8px #4f8dff4d;
}
.floating-panel h2::before, .section-heading::before { content: "◆ "; color: var(--gold); }
.panel-subtitle, .render-setting p, .setting-hint, .setting-note { color: var(--cyan-soft); }
.panel-subtitle::before, .render-setting p::before { content: "// "; color: var(--fur-soft); }
/* Close buttons: a small framed tile, as on the Lucario Ink site. */
.panel-close {
  width: 24px; height: 24px; color: var(--cyan-soft); z-index: 2;
  border: 1px solid var(--border) !important; border-radius: 5px; background: #4f8dff0f !important;
  transition: border-color .2s ease, background .2s ease, color .2s ease, box-shadow .2s ease;
}
.panel-close:is(:hover, :focus-visible) { color: var(--cyan-bright); border-color: var(--aura-bright) !important; background: #4f8dff17 !important; box-shadow: 0 0 10px #4f8dff40; }
.panel-close:focus-visible { outline: 1px solid var(--gold); outline-offset: 2px; }

/* Explore: an index list, keys in gold */
.presets { gap: 2px; }
.preset-button { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid transparent; color: var(--cyan-soft); font-size: 12px; letter-spacing: .5px; }
.preset-button:hover { border-color: var(--borderd); background: #4f8dff10; }
.preset-button.is-active { color: var(--cyan-bright); background: linear-gradient(90deg, #f0c75e14, transparent 80%); border-color: #f0c75e33; }
.preset-key { padding: 0; border: 0; background: none; color: var(--gold); font: 12px var(--mono); }
.preset-key::after { content: ":"; color: var(--fur-soft); }

/* Inputs: underline fields, gold caret */
.date-field input, .speed-field select, .render-setting input[type=number] {
  border: 0; border-bottom: 1px solid var(--borderd); border-radius: 0; background: transparent; color: var(--cyan-bright); caret-color: var(--gold);
}
.date-field input:focus, .render-setting input[type=number]:focus { border-bottom-color: var(--aura-bright); outline: none; box-shadow: 0 1px 0 #8ed7ff24; }
.speed-field select option { background: #0c0b10; }
input[type=range], .render-setting-toggle input[type=checkbox] { accent-color: var(--gold) !important; }
.render-setting { border-bottom-color: var(--borderd); }
.render-setting label, .sensitivity-settings legend, .advanced-render-settings > summary { color: var(--cyan); }
.sensitivity-setting output { color: var(--gold); }
.play-button { color: var(--cyan); }
.play-button.is-playing { color: var(--gold); background: #f0c75e14; border-color: #f0c75e55; }
.reset-settings, .documentation-launch, .documentation-action {
  border: 1px solid var(--border); background: #4f9dff10; color: var(--cyan); letter-spacing: 1.5px; text-transform: lowercase;
}
.reset-settings:hover, .documentation-launch:hover, .documentation-action:hover { border-color: var(--aura-bright); background: #4f8dff26; color: var(--cyan-bright); box-shadow: 0 0 10px #8ed7ff24; }
.render-actions > span { color: var(--fur-soft); }
.render-actions > span::before { content: "// "; }

/* Layers: gold toggles */
.layer-row { color: var(--cyan-soft); }
.layer-row:hover { color: var(--cyan-bright); }
.layer-moons { background: #9fb7c4; box-shadow: 0 0 6px #9fb7c466; }
.layer-minor { background: #c9a37a; box-shadow: 0 0 6px #c9a37a66; }
.toggle { border-color: var(--borderd); background: #0c0b10; border-radius: 3px; }
.toggle i { border-radius: 2px; background: var(--cyan-soft); }
.layer-row input:checked + .toggle { background: #f0c75e1a; border-color: #f0c75e77; }
.layer-row input:checked + .toggle i { background: var(--gold); box-shadow: 0 0 8px var(--gold-soft); }

/* Object card */
.object-card .object-eyebrow { color: var(--gold); font: 10px var(--mono); letter-spacing: 2px; text-transform: uppercase; }
.object-card h1 { color: var(--cyan-bright); font-weight: 600; font-size: 22px; letter-spacing: 0; text-shadow: 0 0 12px #4f8dff55; }
.object-card .object-description { color: var(--text-muted); font-size: 12px; }
.object-actions .focus-object-button, .object-actions .wikipedia-link { border-radius: 3px; font: 11px var(--mono); letter-spacing: 1px; text-transform: lowercase; }
.object-actions .focus-object-button { background: #4f9dff10; color: var(--cyan); border-color: var(--border); }
.object-actions .focus-object-button:hover:not(:disabled) { background: #4f8dff26; color: var(--cyan-bright); border-color: var(--aura-bright); }
.object-actions .focus-object-button:disabled { color: var(--gold); border-color: #f0c75e44; background: #f0c75e0c; }
.object-actions .wikipedia-link { color: var(--cyan-soft); border-color: var(--borderd); }
.object-actions .wikipedia-link:hover { color: var(--cyan-bright); border-color: var(--border); background: #4f8dff14; }
.object-stats { border-color: var(--borderd); }
.object-stats .stat-row > span, .object-card .more-details .stat-row > span, .stat-row { color: var(--cyan-soft); }
.object-stats .stat-row > span::before { content: "// "; color: var(--fur-soft); }
.object-stats .stat-row strong, .stat-row strong { color: var(--cyan-bright); font-family: var(--mono); }
.object-card .more-details .stat-row strong { color: var(--text-muted); }
.more-details summary { border-top-color: var(--borderd); color: var(--cyan); }
.object-card .uncertainty-note { background: #f0c75e0a; border-left: 2px solid #f0c75e55; border-radius: 0; color: var(--text-muted); }

/* Help & docs */
kbd { border-color: var(--borderd); background: #4f8dff10; color: var(--gold); border-radius: 2px; }
.help-keys dt, .documentation-keys dt { color: var(--cyan-soft); }
.help-keys dd, .documentation-keys dd { color: var(--cyan-bright); }
.dataset-counts strong, .documentation-counts strong { color: var(--gold); }
.dataset-counts span, .documentation-counts span { color: var(--cyan-soft); }
.documentation-kicker { color: var(--gold); letter-spacing: 3px; }
.documentation-kicker::before { content: "◆ "; }
.documentation-header h2 { color: var(--cyan-bright); font-family: var(--mono); font-weight: 600; text-shadow: 0 0 12px #4f8dff55; }
.documentation-header p, .documentation-section > p, .documentation-sources { color: var(--text-muted); }
.documentation-section { border-bottom-color: var(--borderd); }
.documentation-section > summary { color: var(--cyan); letter-spacing: .5px; }
.documentation-section > summary::marker { color: var(--gold); }
.documentation-section > p strong { color: var(--cyan-bright); }
.documentation-presets button:hover { border-color: #f0c75e66; color: var(--gold); }
.documentation-counts > div { border-color: var(--borderd); background: #4f8dff0a; border-radius: 3px; }

/* Map readouts, zoom console (with help) */
.scale-label strong { color: var(--cyan-soft); font-family: var(--mono); letter-spacing: 2px; }
.scale-label strong::before { content: "// "; color: var(--fur-soft); }
.scale-chip { color: var(--cyan-bright); font-family: var(--mono); }
.zoom-controls {
  right: 14px; bottom: 14px; gap: 4px; padding: 7px 6px 5px; border: 1px solid #8ed7ff33; border-radius: 6px;
  background: var(--holo-scan), linear-gradient(180deg, #14203ad0, #0c0b10d8); box-shadow: 0 0 14px #4f8dff26;
}
.zoom-controls::after {
  content: ""; position: absolute; left: 8px; right: 8px; top: -1px; height: 1px; pointer-events: none;
  background: linear-gradient(90deg, transparent, var(--aura-bright), var(--aura-blue), transparent); opacity: .6;
}
.zoom-controls button { width: 32px; height: 30px; color: var(--cyan); border: 1px solid transparent; }
.zoom-controls button:hover { color: var(--cyan-bright); background: #4f8dff1a; border-color: var(--borderd); }
.map-help {   /* stands on its own above the zoom console, so the console can grow without moving it */
  position: absolute; right: 14px; bottom: 62px; z-index: 6; display: grid; place-items: center; width: 34px; height: 34px; padding: 0;
  color: var(--cyan); border: 1px solid #8ed7ff33; border-radius: 6px; cursor: pointer;
  background: var(--holo-scan), linear-gradient(180deg, #14203ad0, #0c0b10d8); box-shadow: 0 0 12px #4f8dff26;
}
.map-help:hover { color: var(--cyan-bright); border-color: #8ed7ff80; box-shadow: 0 0 16px #4f8dff4d; }
.map-help[aria-expanded=true] { color: var(--gold); border-color: #f0c75e66; background: #f0c75e14; box-shadow: 0 0 10px #f0c75e2a; }
.zoom-divider { width: 1px; height: 20px; margin: 0 2px; background: linear-gradient(180deg, transparent, #8ed7ff55, transparent); }
.catalog-loading { background: #5b9dff22; }
.catalog-loading::after { background: linear-gradient(90deg, transparent, var(--aura-blue), var(--aura-bright), var(--aura-blue), transparent); }
.catalog-zoom-warning { border-color: #f0c75e45; border-radius: 3px; background: #0c0b10f2; color: var(--gold); font-family: var(--mono); }
.statusbar { border-radius: 3px; font-family: var(--mono); }
.render-perf-panel {
  top: 14px; right: 14px; border-color: #8ed7ff47; border-radius: 6px; background: var(--glass);
  animation: holo-unfold .55s var(--ease-out-expo) backwards; --beam-x: 50%;
}

@media (max-width: 520px) {
  .map-toolbar { left: 8px; top: 8px; gap: 3px; padding: 8px 6px 5px; }
  .map-help { right: 8px; bottom: 56px; }
  .nav-icon, .map-toolbar .home-button { width: 32px; height: 32px; }
  .map-toolbar .nav-item { width: 33px; }
  .floating-panel, .inspector { left: 8px; top: 64px; max-width: calc(100vw - 16px); max-height: calc(100dvh - 140px); }
  #help-panel { right: 8px; left: auto; }
}
@media (prefers-reduced-motion: reduce) { .is-projecting, .nav-label, .render-perf-panel { animation: none !important; } .holo-beam { display: none; } }

/* Layers: star-name density slider */
.layer-row.layer-slider { gap: 10px; }
.layer-row.layer-slider input[type=range] { position: static; opacity: 1; pointer-events: auto; flex: 1; min-width: 70px; accent-color: var(--gold); }
.layer-row.layer-slider output { width: 38px; text-align: right; color: var(--cyan-bright); font-family: var(--mono); font-size: 11px; }
.render-setting select {
  width: 100%; margin-top: 6px; padding: 5px 8px; border: 1px solid var(--borderd); border-radius: 3px;
  background: #0c0b10; color: var(--cyan-bright); font-family: var(--mono); font-size: 12px;
}
.render-setting select:focus-visible { outline: 1px solid var(--aura-bright); }

/* Warp test flight */
.warp-test-button {
  width: 100%; margin-top: 8px; padding: 7px 10px; border: 1px solid #8ed7ff55; border-radius: 3px; cursor: pointer;
  background: var(--holo-scan), linear-gradient(180deg, #4f8dff24, #4f8dff08); color: var(--cyan-bright); font-family: var(--mono); font-size: 12px; letter-spacing: 1px;
}
.warp-test-button:hover { border-color: var(--aura-bright); box-shadow: 0 0 14px #4f8dff4d; }
.warp-flash {
  position: absolute; inset: 0; z-index: 5; pointer-events: none; opacity: 0;
  background: radial-gradient(circle at 50% 50%, #ffffff 0%, #bfe4ff 18%, #4f8dff66 45%, transparent 75%);
}
.warp-hud {
  position: absolute; left: 50%; bottom: 18px; z-index: 7; transform: translateX(-50%);
  display: grid; grid-template-columns: auto 1fr auto; gap: 2px 14px; align-items: center; min-width: 320px; padding: 9px 14px;
  border: 1px solid #8ed7ff47; border-radius: 6px; background: var(--holo-scan), linear-gradient(180deg, #14203ad8, #0c0b10e0);
  box-shadow: 0 0 18px #4f8dff33; font-family: var(--mono); color: var(--cyan-soft);
  animation: holo-unfold-up .5s var(--ease-out-expo) backwards; --beam-x: 50%;
}
.warp-hud[hidden] { display: none; }
.warp-hud .warp-factor { color: var(--gold); font-weight: 600; letter-spacing: 2px; text-shadow: 0 0 10px var(--gold-soft); }
.warp-hud .warp-target { color: var(--cyan-bright); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.warp-hud .warp-keys { grid-column: 1 / 3; font-size: 10px; color: var(--fur-soft, #8797aa); }
.warp-hud .warp-buttons { grid-row: 1 / 3; grid-column: 3; display: flex; gap: 6px; }
.warp-hud button { padding: 4px 9px; border: 1px solid var(--borderd); border-radius: 3px; background: none; color: var(--cyan); cursor: pointer; font-family: var(--mono); }
body.warp-mode .map-toolbar, body.warp-mode .zoom-controls, body.warp-mode .map-help { opacity: .35; }
body.warp-mode .map-topline { opacity: 0; }

.warp-hud button[aria-pressed=true] { color: var(--gold); border-color: #f0c75e77; }
.warp-hud.is-galactic { border-color: #c5a6df88; box-shadow: 0 0 22px #c5a6df44; }
.warp-hud.is-galactic .warp-factor { color: #e3c8ff; text-shadow: 0 0 12px #c5a6dfaa; }
.warp-hud.is-galactic #warp-galactic { color: #e3c8ff; border-color: #c5a6df99; }

/* ══ 2026-11-06 UI pass: cleaner cards in the Lucario Ink site style ═══════ */
.panel-close { display: grid; place-items: center; padding: 0; line-height: 1; font-size: 16px; font-family: var(--mono); }

/* Warp-flight launcher: its own tile floating just right of the console bar. */
.map-toolbar .flight-launch {
  position: absolute; left: calc(100% + 10px); top: -1px; bottom: -1px; width: 52px; display: grid; place-items: center; padding: 0;
  border: 1px solid #f0c75e40; border-radius: 6px; color: var(--gold); cursor: pointer;
  background: var(--holo-scan), radial-gradient(circle at 50% 60%, #f0c75e1c, transparent 70%), linear-gradient(180deg, #14203ad0, #0c0b10d8);
  box-shadow: 0 0 16px #f0c75e1a, 0 8px 24px #00000080; transition: border-color .3s, box-shadow .3s, transform .45s var(--ease-out-expo);
}
.map-toolbar .flight-launch svg { transition: transform .5s var(--ease-out-expo); filter: drop-shadow(0 0 4px #f0c75e66); }
.map-toolbar .flight-launch:hover, .map-toolbar .flight-launch:focus-visible { border-color: #f0c75eaa; box-shadow: 0 0 22px #f0c75e44; outline: none; }
.map-toolbar .flight-launch:hover svg { transform: translate(2px, -2px); }
.map-toolbar .flight-launch[aria-pressed=true] { border-color: var(--gold); background: var(--holo-scan), radial-gradient(circle, #f0c75e33, transparent 75%), #14203ad0; }
.map-toolbar .flight-launch .nav-label { top: calc(100% + 14px); }
@media (hover: hover) { .map-toolbar .flight-launch:hover .nav-label { visibility: visible; opacity: 1; animation: label-drop .35s var(--ease-out-expo) both; } }

/* Explore: icon tiles with a two-line caption. */
.presets { gap: 4px; }
.preset-button { padding: 7px 10px 7px 7px; gap: 12px; border-radius: 4px; }
.preset-icon { display: grid; place-items: center; width: 36px; height: 36px; flex: none; border: 1px solid var(--borderd); border-radius: 4px;
  background: var(--holo-scan), linear-gradient(180deg, #4f8dff1c, #4f8dff06); color: var(--aura-bright); }
.preset-icon svg { width: 22px; height: 22px; filter: drop-shadow(0 0 3px #8ed7ff55); }
.preset-text { display: grid; gap: 2px; text-align: left; }
.preset-text strong { font-weight: 400; color: var(--cyan-bright); font-size: 12.5px; letter-spacing: .3px; }
.preset-text small { color: var(--cyan-soft); font-size: 10.5px; letter-spacing: .3px; }
.preset-button.is-active .preset-icon { border-color: #f0c75e66; color: var(--gold); box-shadow: 0 0 10px #f0c75e22; }
.preset-button.is-active .preset-text strong { color: var(--gold); }

/* Simulation */
#time-panel .time-controls { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: stretch; }
#time-panel .date-field { display: flex; align-items: center; padding: 0 10px; border: 1px solid var(--borderd); border-radius: 4px; background: #0c0b10; }
#time-panel .date-field input { width: 100%; border: 0; background: transparent; color: var(--cyan-bright); font-family: var(--mono); font-size: 12.5px; color-scheme: dark; }
#time-panel .play-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-width: 96px; padding: 8px 14px; border: 1px solid #f0c75e55; border-radius: 4px;
  background: linear-gradient(180deg, #f0c75e1a, #f0c75e06); color: var(--gold); font-family: var(--mono); letter-spacing: 1.5px; }
#time-panel .panel-subtitle { margin: 10px 0 0; color: var(--cyan-soft); font-size: 10.5px; }

/* Render settings: compact rows */
#render-panel .render-setting { margin: 0 0 12px; }
#render-panel .render-setting input[type=number] { width: 100%; }
.render-toggle-row { margin: 4px 0 10px; padding: 6px 0; border-top: 1px dashed var(--borderd); border-bottom: 1px dashed var(--borderd); }
.render-setting-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 8px; }
.advanced-render-settings summary { cursor: pointer; color: var(--cyan-soft); font-size: 11px; letter-spacing: 1px; margin: 4px 0 10px; }

/* Help & guide */
.help-counts { color: var(--cyan-soft); font-size: 10.5px; line-height: 1.7; margin: 6px 0 12px; }
.help-counts span { color: var(--cyan-bright); }
.documentation-section h3 { margin: 0 0 8px; color: var(--gold); font-weight: 400; font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase; }
.documentation-section h3::before { content: "/ "; color: var(--aura-blue); }
.documentation-section { padding: 14px 0; border-bottom: 1px solid var(--borderd); }
.documentation-section p { color: var(--cyan-soft); line-height: 1.75; font-size: 12px; }
.documentation-section kbd { padding: 0 4px; border: 1px solid var(--borderd); border-radius: 3px; color: var(--cyan-bright); font-size: 10.5px; }
.documentation-counts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; border-bottom: 0; }

/* Object card: type line, class chip, two-column stat tiles */
.object-eyebrow { display: flex; align-items: center; gap: 8px; }
.object-class { margin-left: auto; padding: 1px 7px; border: 1px solid #f0c75e55; border-radius: 3px; color: var(--gold); font-size: 10.5px; letter-spacing: 1px; }
.object-class:empty { display: none; }
.object-card h1 { margin: 10px 0 4px; }
.object-type { margin: 0 0 6px; color: var(--cyan-bright); font-size: 12.5px; }
.object-type::before { content: "• "; color: var(--gold); }
.object-description { font-size: 11px; }
.object-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 12px 0; }
.object-stats .stat-row { display: grid; gap: 3px; padding: 8px 10px; border: 1px solid var(--borderd); border-radius: 4px; background: #4f8dff08; }
.object-stats .stat-row[hidden] { display: none; }
.object-stats .stat-row span { color: var(--cyan-soft); font-size: 9.5px; letter-spacing: 1.2px; text-transform: uppercase; }
.object-stats .stat-row strong { color: var(--cyan-bright); font-weight: 400; font-size: 12px; line-height: 1.4; }
.object-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 8px; }
.object-actions .wikipedia-link[hidden] + * , .object-actions:has(.wikipedia-link[hidden]) { grid-template-columns: 1fr; }

/* Zoom console: the slider unfolds instead of popping in. */
.zoom-controls input {
  transition: width .5s var(--ease-out-expo), margin .5s var(--ease-out-expo), opacity .35s ease .05s, clip-path .5s var(--ease-out-expo);
  clip-path: inset(0 50% 0 50%);
}
.zoom-controls:hover input, .zoom-controls:focus-within input { clip-path: inset(0 0 0 0); }


/* Warp HUD: readout · warp gauge · actions, keys underneath */
.warp-hud { grid-template-columns: auto 1fr auto; gap: 8px 16px; min-width: 460px; padding: 10px 14px 9px; }
.warp-hud .warp-readout { display: grid; gap: 2px; min-width: 150px; }
.warp-hud .warp-factor { font-size: 15px; }
.warp-hud .warp-target { font-size: 11px; }
.warp-gauge { display: flex; align-items: flex-end; gap: 3px; height: 22px; }
.warp-gauge i { flex: 1; min-width: 8px; height: 30%; border-radius: 1px; background: #8ed7ff22; transition: background .3s, height .3s, box-shadow .3s; }
.warp-gauge i:nth-child(2) { height: 38%; } .warp-gauge i:nth-child(3) { height: 47%; } .warp-gauge i:nth-child(4) { height: 56%; }
.warp-gauge i:nth-child(5) { height: 66%; } .warp-gauge i:nth-child(6) { height: 76%; } .warp-gauge i:nth-child(7) { height: 88%; } .warp-gauge i:nth-child(8) { height: 100%; }
.warp-gauge i.is-on { background: linear-gradient(180deg, var(--aura-bright), var(--aura-blue)); box-shadow: 0 0 8px #4f8dff88; }
.warp-hud.is-galactic .warp-gauge i.is-on { background: linear-gradient(180deg, #e3c8ff, #a77bff); box-shadow: 0 0 8px #c5a6dfaa; }
.warp-hud .warp-buttons { grid-row: auto; grid-column: auto; }
.warp-hud .warp-keys { grid-column: 1 / -1; padding-top: 6px; border-top: 1px solid var(--borderd); }
.warp-hud .warp-keys kbd { padding: 0 3px; border: 1px solid var(--borderd); border-radius: 2px; color: var(--cyan-bright); font-size: 9.5px; }
.object-class { margin-right: 0; }
.map-toolbar .flight-launch { top: -1px; bottom: auto; height: calc(100% + 2px); min-height: 0; }
#time-panel .play-label { display: inline; }
.wormhole-button {
  width: 100%; margin: 0 0 8px; padding: 9px 12px; border: 1px solid #c5a6df77; border-radius: 4px; cursor: pointer;
  background: var(--holo-scan), radial-gradient(ellipse at 50% 120%, #a77bff40, transparent 70%), #14102080;
  color: #e3c8ff; font-family: var(--mono); font-size: 12px; letter-spacing: 1px; box-shadow: 0 0 14px #a77bff2a;
  transition: box-shadow .3s, border-color .3s;
}
.wormhole-button:hover { border-color: #e3c8ff; box-shadow: 0 0 22px #a77bff66; }
.wormhole-button[hidden] { display: none; }

/* ── 2026-11-06 loading screen: the map blurs behind a console card ─────── */
.space-loader {
  position: fixed; inset: 0; z-index: 10030; pointer-events: auto;
  background: radial-gradient(ellipse at 50% 50%, #14203a66, #08070b99 70%);
  -webkit-backdrop-filter: blur(10px) saturate(.85) brightness(.7);
  backdrop-filter: blur(10px) saturate(.85) brightness(.7);
  transition: opacity .55s ease, backdrop-filter .55s ease;
}
.space-loader.is-done { opacity: 0; pointer-events: none; }
.space-loader[hidden] { display: none; }
.loader-card {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(460px, calc(100vw - 32px)); padding: 16px 18px 14px;
  border: 1px solid #8ed7ff2e; border-radius: 6px; background: var(--glass);
  box-shadow: 0 0 22px #4f8dff26, 0 14px 40px #000a; --beam-x: 50%;
  animation: holo-unfold .6s var(--ease-out-expo) backwards;
}
.loader-card::before {   /* emitter rail, same as the console bar */
  content: ""; position: absolute; left: 12px; right: 12px; top: -1px; height: 2px; border-radius: 1px;
  background: linear-gradient(90deg, transparent, var(--aura-bright) 12%, var(--aura-blue) 55%, #4f8dff44 85%, transparent);
  box-shadow: 0 0 8px #4f8dff66;
}
.loader-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 4px; }
.loader-logo { display: block; width: auto; height: 68px; max-width: calc(100% - 80px); object-fit: contain; filter: drop-shadow(0 0 10px #4f8dff40); }
.loader-caption { margin: 12px 0 10px; overflow: hidden; color: var(--text-muted); font-size: 11px; white-space: nowrap; text-overflow: ellipsis; }
.loader-percent { color: var(--cyan-bright); font: 600 22px/1 var(--mono); font-variant-numeric: tabular-nums; text-shadow: 0 0 12px #8ed7ff55; }
.loader-bar { position: relative; height: 6px; overflow: hidden; border: 1px solid #8ed7ff26; border-radius: 3px; background: #4f8dff14; }
.loader-bar i {
  position: absolute; inset: 0 auto 0 0; width: 0; border-radius: inherit;
  background: linear-gradient(90deg, var(--aura-blue), var(--aura-bright));
  box-shadow: 0 0 10px #4f8dff88; transition: width .25s ease-out, background .4s ease, box-shadow .4s ease;
}
.loader-bar i::after {   /* sheen travelling along the filled part */
  content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, #ffffff55, transparent);
  background-size: 40% 100%; background-repeat: no-repeat; animation: loader-sheen 1.3s linear infinite;
}
@keyframes loader-sheen { from { background-position: -40% 0; } to { background-position: 140% 0; } }
.loader-steps { display: grid; gap: 3px; margin: 12px 0 0; padding: 0; list-style: none; }
.loader-steps li { display: grid; grid-template-columns: 14px 1fr auto; align-items: center; gap: 9px; color: #789bb866; font-size: 11px; }
.loader-steps li small { color: inherit; font-size: 10px; font-variant-numeric: tabular-nums; opacity: .85; }
.loader-steps li i { width: 9px; height: 9px; justify-self: center; border: 1px solid currentColor; border-radius: 50%; }
.loader-steps li.is-active { color: var(--cyan-bright); }
.loader-steps li.is-active i { border-color: var(--aura-bright) transparent var(--aura-bright) transparent; animation: loader-spin .8s linear infinite; box-shadow: 0 0 6px #8ed7ff66; }
.loader-steps li.is-done { color: var(--cyan-soft); }
.loader-steps li.is-done small { color: #6fe39a; }
.loader-steps li.is-done i { width: 10px; height: 6px; border: solid #6fe39a; border-width: 0 0 2px 2px; border-radius: 0; transform: translateY(-2px) rotate(-45deg); }
.loader-steps li.is-failed, .space-loader.is-failed .loader-caption { color: #ff7a8a; }
.loader-steps li.is-failed i { border-color: #ff7a8a; background: #ff7a8a; }
@keyframes loader-spin { to { transform: rotate(360deg); } }
.space-loader.is-complete .loader-bar i { width: 100% !important; background: linear-gradient(90deg, #3fcf7a, #8af5b0); box-shadow: 0 0 14px #4fe08aaa; }
.space-loader.is-complete .loader-bar i::after { animation: none; opacity: 0; }
.space-loader.is-complete .loader-percent { color: #8af5b0; text-shadow: 0 0 12px #4fe08a77; }
.space-loader.is-complete .loader-caption { color: #8af5b0; }
.space-loader.is-failed .loader-bar i { background: #ff7a8a; box-shadow: none; }
.loader-continue { width: 100%; margin-top: 12px; padding: 7px 10px; border-color: var(--border); color: var(--gold); }
@media (prefers-reduced-motion: reduce) {
  .loader-card { animation: none; }
  .loader-bar i::after, .loader-steps li.is-active i { animation: none; }
}

/* Space Chart emblem in the console bar's home button */
.map-toolbar .home-button .brand-emblem { display: block; width: 28px; height: 28px; margin: auto; filter: drop-shadow(0 0 6px #4f8dff55); }

/* ── 2026-11-07 render diagnostics: pacing first, then where the time goes ─ */
.render-perf-panel {
  width: min(340px, calc(100vw - 28px)); max-height: calc(100dvh - 28px); gap: 10px; padding: 14px 14px 12px;
  box-shadow: 0 0 18px #4f8dff2e, 0 10px 30px #00000099, inset 0 0 22px #8ed7ff0f; backdrop-filter: blur(10px);
  color: var(--cyan); font: 11px/1.45 var(--mono); scrollbar-color: #5b9dff55 transparent;
}
.render-perf-panel .perf-header { position: relative; display: grid; gap: 4px; padding: 0 30px 8px 0; border-bottom: 1px solid var(--borderd); }
.render-perf-panel .perf-kicker { color: var(--cyan-bright); font: 600 11px/1.3 var(--mono); letter-spacing: .14em; text-transform: uppercase; }
.render-perf-panel .perf-kicker::before { content: "◆ "; color: var(--gold); }
.render-perf-panel .perf-close { position: absolute; right: 0; top: -2px; }
.render-perf-panel .perf-context { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 0; color: var(--text-muted); font-size: 10px; }
.render-perf-panel .perf-context span + span::before { content: "· "; color: var(--fur-soft); }
.render-perf-panel .perf-renderer--gpu { color: #6fe39a; }
.render-perf-panel .perf-renderer--canvas { color: var(--gold); }
.perf-pacing { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 12px; }
.perf-fps { display: grid; justify-items: center; min-width: 58px; }
.perf-fps strong { color: var(--cyan-bright); font: 600 28px/1 var(--mono); font-variant-numeric: tabular-nums; }
.perf-fps span { color: var(--text-muted); font-size: 9px; letter-spacing: .2em; text-transform: uppercase; }
.perf-spark { display: grid; gap: 2px; min-width: 0; margin: 0; }
.perf-spark canvas { position: static; inset: auto; display: block; width: 100%; height: 56px; border: 1px solid var(--borderd); border-radius: 3px; background: #4f8dff0a; }
.perf-spark figcaption { color: #789bb899; font-size: 9px; }
.perf-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.perf-tile { display: grid; gap: 1px; min-width: 0; padding: 6px 8px; border: 1px solid var(--borderd); border-radius: 3px; background: #4f8dff0a; }
.perf-tile > span { overflow: hidden; color: var(--text-muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.perf-tile > strong { color: var(--cyan-bright); font: 500 14px/1.3 var(--mono); font-variant-numeric: tabular-nums; }
.perf-tile > small { min-height: 12px; overflow: hidden; color: #789bb8aa; font-size: 8.5px; text-overflow: ellipsis; white-space: nowrap; }
.perf-tile[data-tile="hitches"] > small { white-space: normal; }
.perf-tiles--counts .perf-tile > strong { color: var(--gold); }
.perf-section-title { display: flex; justify-content: space-between; color: var(--text-muted); font-size: 9px; letter-spacing: .08em; text-transform: uppercase; }
.perf-work { display: grid; gap: 6px; }
.perf-work-bar { display: flex; height: 6px; overflow: hidden; border-radius: 3px; background: #4f8dff14; }
.perf-work-bar i { min-width: 0; flex-basis: 0; transition: flex-grow .25s ease; }
.perf-work-list { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 12px; margin: 0; padding: 0; list-style: none; }
.perf-work-list li { display: grid; grid-template-columns: 8px 1fr auto; align-items: center; gap: 6px; color: var(--cyan-soft); font-size: 10px; }
.perf-work-list li i { width: 8px; height: 8px; border-radius: 2px; }
.perf-work-list strong { color: var(--cyan-bright); font: 500 10px var(--mono); font-variant-numeric: tabular-nums; }
[data-work-key="scene"], [data-work="scene"] i { background: #4f8dff; }
[data-work-key="labels"], [data-work="labels"] i { background: #8ed7ff; }
[data-work-key="upload"], [data-work="upload"] i { background: #b48cff; }
[data-work-key="overlays"], [data-work="overlays"] i { background: #6fe39a; }
[data-work-key="background"], [data-work="background"] i { background: #f0c75e; }
.render-perf-panel .perf-memory { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; padding: 0; border: 0; border-radius: 0; background: none; color: var(--text-muted); font-size: 10px; }
.perf-memory strong { color: var(--cyan-bright); font-weight: 500; }
.perf-details { border-top: 1px solid var(--borderd); padding-top: 6px; }
.perf-details summary { color: var(--cyan-soft); font-size: 10px; cursor: pointer; }
.perf-details summary:hover { color: var(--cyan-bright); }
.perf-details dl { display: grid; grid-template-columns: auto 1fr; gap: 3px 10px; margin: 6px 0 0; font-size: 9.5px; }
.perf-details dt { color: var(--text-muted); }
.perf-details dd { margin: 0; color: var(--cyan-bright); overflow-wrap: anywhere; }
.render-perf-panel .perf-time--good { color: #6fe39a !important; text-shadow: none; }
.render-perf-panel .perf-time--warn { color: var(--gold) !important; text-shadow: none; }
.render-perf-panel .perf-time--bad { color: #ff7a8a !important; text-shadow: none; }

/* ── 2026-11-07 console bar polish ────────────────────────────────────────
   Icons rise with a transform-only transition (no box-shadow or filter
   transitions, which repaint over the WebGPU canvas every frame); the glow is
   a pre-rendered layer that only fades. */
.map-toolbar::after { z-index: 1; }
.nav-icon {
  position: relative; will-change: transform;
  transition: transform .26s cubic-bezier(.2, .9, .25, 1), border-color .2s ease;
}
.nav-icon::before {
  content: ""; position: absolute; inset: -1px; border-radius: inherit; pointer-events: none;
  box-shadow: 0 0 18px #4f8dff59, inset 0 0 14px #8ed7ff26; opacity: 0; transition: opacity .2s ease;
}
.nav-icon svg { transition: transform .26s cubic-bezier(.2, .9, .25, 1); }
.map-toolbar .nav-item:is(:hover, :focus-visible) .nav-icon { box-shadow: 0 0 10px #4f8dff1f, inset 0 0 10px #8ed7ff12; }
.map-toolbar .nav-item:is(:hover, :focus-visible) .nav-icon::before { opacity: 1; }
.map-toolbar .nav-item:is(:hover, :focus-visible) .nav-icon svg { transform: scale(1.1); }
/* Active marker sits on the emitter rail, above its glow. */
.map-toolbar .nav-item[aria-expanded=true]::after { top: -10px; z-index: 3; height: 3px; }

/* Labels: projected like the Lucario Ink sidebar labels — the beam pulses
   down, the frame corners land, the surface fills behind a scan line, then
   the text appears. */
.nav-label {
  --holo-label-border: #8ed7ff4d; --holo-label-corner: var(--aura-bright);
  border: 1px solid var(--holo-label-border);
  background:
    linear-gradient(var(--holo-label-corner) 0 0) left top / 6px 1px no-repeat,
    linear-gradient(var(--holo-label-corner) 0 0) left top / 1px 6px no-repeat,
    linear-gradient(var(--holo-label-corner) 0 0) right bottom / 6px 1px no-repeat,
    linear-gradient(var(--holo-label-corner) 0 0) right bottom / 1px 6px no-repeat,
    repeating-linear-gradient(0deg, #8ed7ff0d 0 1px, transparent 1px 3px) left / 100% 100% no-repeat,
    linear-gradient(90deg, #16243ff2, #0c0b10f2 70%) left / 100% 100% no-repeat;
}
.nav-label::before { transform-origin: center top; }
.nav-label::after {
  content: ""; position: absolute; inset: 0 auto 0 0; width: 6px; pointer-events: none; opacity: 0;
  background: linear-gradient(90deg, transparent, #8ed7ff44 75%, #b8e7ffcc);
}
.nav-label-text { display: block; }
@media (hover: hover) {
  .map-toolbar .nav-item:is(:hover, :focus-visible):not([aria-expanded=true]) .nav-label,
  .map-toolbar .flight-launch:hover .nav-label { visibility: visible; opacity: 1; animation: holo-surface-in 150ms 40ms linear backwards; }
  .map-toolbar .nav-item:is(:hover, :focus-visible):not([aria-expanded=true]) .nav-label::before,
  .map-toolbar .flight-launch:hover .nav-label::before { animation: holo-pulse-down 110ms ease-out backwards; }
  .map-toolbar .nav-item:is(:hover, :focus-visible):not([aria-expanded=true]) .nav-label::after,
  .map-toolbar .flight-launch:hover .nav-label::after { animation: holo-scan 150ms 40ms linear both; }
  .map-toolbar .nav-item:is(:hover, :focus-visible):not([aria-expanded=true]) .nav-label-text,
  .map-toolbar .flight-launch:hover .nav-label-text { animation: nav-label-text-in 65ms 50ms ease-out backwards; }
}
@keyframes holo-surface-in {
  0% { background-size: 0 0, 0 0, 0 0, 0 0, 0 100%, 0 100%; border-color: transparent; box-shadow: none; }
  1% { background-size: 6px 1px, 1px 6px, 6px 1px, 1px 6px, 0 100%, 0 100%; }
}
@keyframes holo-pulse-down { from { transform: scaleY(0); opacity: .8; } 38% { transform: scaleY(1); opacity: 1; } }
@keyframes holo-scan { from { left: 0; opacity: 0; } 12%, 85% { opacity: 1; } to { left: calc(100% - 6px); opacity: 0; } }
@keyframes nav-label-text-in { from { opacity: 0; } }
.map-toolbar .flight-launch .nav-label { --holo-label-border: #f0c75e66; --holo-label-corner: var(--gold); }
@media (prefers-reduced-motion: reduce) {
  .nav-label::before, .nav-label::after, .nav-label-text { animation: none !important; }
  .nav-icon, .nav-icon svg { transition: none; }
}

/* Guide: full logo on top, licence block at the bottom. */
.documentation-logo { display: block; width: min(100%, 300px); height: auto; margin: 0 auto 14px; filter: drop-shadow(0 0 14px #4f8dff33); }
.documentation-license { position: relative; border-bottom: 0; margin-top: auto; padding-top: 22px; }
.documentation-license::before {   /* bolder rule than the section dividers above */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; border-radius: 1px;
  background: linear-gradient(90deg, transparent, var(--aura-blue) 15%, var(--aura-bright) 50%, var(--aura-blue) 85%, transparent);
  box-shadow: 0 0 8px #4f8dff66; opacity: .85;
}
.documentation-counts { margin-bottom: 34px; }
.documentation-section:has(+ .documentation-counts) { border-bottom: 0; }
.documentation-content { display: flex; flex-direction: column; flex: 1 1 auto; }
.documentation-content > .documentation-section { flex: none; }
.documentation-license p, .documentation-license li { color: var(--text-muted); font-size: 10.5px; line-height: 1.55; }
.documentation-license ul { display: grid; gap: 4px; margin: 8px 0 0; padding-left: 14px; }
.documentation-license li::marker { color: var(--gold); content: "◆ "; font-size: 8px; }
.documentation-license strong { color: var(--cyan-bright); font-weight: 500; }
.documentation-license a { color: var(--aura-bright); text-decoration-color: #8ed7ff55; }
.documentation-license a:hover { color: var(--cyan-bright); }

/* Icon buttons: SVG glyphs centred on a grid, never text baselines. */
.panel-close, .zoom-controls button, .map-help { display: grid; place-items: center; padding: 0; line-height: 0; }
.btn-glyph, .map-help svg { display: block; }
.zoom-controls { align-items: center; padding: 6px; }
.zoom-controls button { height: 30px; }
.documentation-header > div { flex: 1 1 auto; min-width: 0; }

/* OLED black background (default; Render → Navigation & advanced). */
body.true-black, body.true-black .map-panel { background: #000; }

/* Guide logo: the header keeps 58 px on the right for the close button and
   22 px on the left, so shift the logo by half the difference to sit on the
   window's true centre line. */
.documentation-header { padding-right: 22px; }
@media (max-width: 520px) { .documentation-header { padding-right: 16px; } }
.documentation-window:focus { outline: none; }

/* "Don't stare at the Sun" warning: a red hologram strip under the top edge. */
.sun-warning {
  position: fixed; top: 14px; left: 50%; z-index: 10010; transform: translateX(-50%);
  display: grid; justify-items: center; gap: 5px; width: min(420px, calc(100vw - 32px)); padding: 9px 16px 10px;
  border: 1px solid #ff6b7a66; border-radius: 6px; text-align: center; pointer-events: none;
  background: repeating-linear-gradient(0deg, #ff7a8a0a 0 1px, transparent 1px 3px), linear-gradient(180deg, #3a1420e6, #140a10ee);
  box-shadow: 0 0 18px #ff4d6a33, 0 8px 24px #00000099;
  animation: sun-warning-in .45s var(--ease-out-expo) both;
}
.sun-warning::before {   /* emitter rail, in red */
  content: ""; position: absolute; left: 12px; right: 12px; top: -1px; height: 2px; border-radius: 1px;
  background: linear-gradient(90deg, transparent, #ff9aa6 15%, #ff4d6a 55%, #ff4d6a44 85%, transparent); box-shadow: 0 0 8px #ff4d6a88;
}
.sun-warning strong { color: #ffb3bc; font: 600 12px/1.2 var(--mono); letter-spacing: .18em; text-transform: uppercase; text-shadow: 0 0 10px #ff4d6a88; }
.sun-warning strong span { color: var(--gold); letter-spacing: 0; margin-right: 4px; }
.sun-warning > i { display: block; width: 70%; height: 1px; background: linear-gradient(90deg, transparent, #ff6b7a99, transparent); }
.sun-warning p { margin: 0; color: #ffd6db; font: 11px/1.5 var(--mono); }
.sun-warning.is-leaving { animation: sun-warning-out .25s ease-in both; }
@keyframes sun-warning-in { from { opacity: 0; transform: translate(-50%, -14px); clip-path: inset(0 45% 100% 45%); } to { opacity: 1; transform: translate(-50%, 0); clip-path: inset(0 0 0 0); } }
@keyframes sun-warning-out { to { opacity: 0; transform: translate(-50%, -10px); } }
@media (prefers-reduced-motion: reduce) { .sun-warning, .sun-warning.is-leaving { animation: none; } }
.layer-name small { color: var(--text-muted); font-size: 10px; }

/* WebGPU required: the loader stops with the reason. */
.loader-fatal { display: grid; gap: 6px; margin-top: 12px; padding: 10px 12px; border: 1px solid #ff6b7a55; border-radius: 4px;
  background: linear-gradient(180deg, #3a142055, #140a1055); }
.loader-fatal[hidden] { display: none; }
.loader-fatal strong { color: #ffb3bc; font: 600 12px/1.3 var(--mono); letter-spacing: .06em; }
.loader-fatal p { margin: 0; color: #ffd6db; font-size: 11px; line-height: 1.55; }
.loader-fatal .loader-fatal-tip { color: var(--text-muted); }
.loader-fatal b { color: var(--gold); font-weight: 600; }
.space-loader.is-fatal .loader-bar i { background: #ff7a8a; box-shadow: none; }
.space-loader.is-fatal .loader-percent { color: #ff7a8a; text-shadow: none; }

/* Guide: wide enough that the whole guide fits on a typical laptop/desktop
   screen without a scrollbar (it still scrolls on small windows). */
.documentation-header { padding-top: 16px; padding-bottom: 12px; }
.documentation-section { padding: 11px 0; }
.documentation-counts { margin-bottom: 22px; }
.documentation-license { padding-top: 16px; }
.documentation-section > p { line-height: 1.6; margin: 0 0 6px; }
.documentation-section > p:last-child { margin-bottom: 0; }
.documentation-section { padding: 10px 0; }
.documentation-counts { margin-bottom: 16px; }

/* HDR toggle: say plainly whether HDR is actually in use. */
#hdr-note { padding: 1px 6px; border-radius: 3px; font-size: 9.5px; letter-spacing: .04em; }
#hdr-note.is-on { color: #6fe39a; background: #6fe39a1a; border: 1px solid #6fe39a55; }
#hdr-note.is-off { color: var(--gold); background: #f0c75e14; border: 1px solid #f0c75e44; }
#hdr-note.is-unavailable { color: #ff9aa6; background: #ff6b7a14; border: 1px solid #ff6b7a44; }
.render-toggle-row:has(#hdr-toggle:disabled) { opacity: .6; cursor: not-allowed; }
.render-toggle-row:has(#hdr-toggle:disabled) .toggle { filter: grayscale(1); }
/* Guide: full-size logo, slimmer gaps elsewhere so it still fits unscrolled. */
.documentation-header { padding-bottom: 8px; }
.documentation-counts { margin-bottom: 4px; }
.documentation-license { padding-top: 14px; }
.documentation-section > p { margin-bottom: 4px; }
.documentation-section { padding: 9px 0; }

/* Link to the main site, centred in the space between the counts and the credits. */
.documentation-site-link {
  align-self: center; display: inline-flex; align-items: baseline; gap: 10px; margin: auto 0; padding: 7px 14px;
  border: 1px solid #f0c75e44; border-radius: 4px; color: var(--cyan-bright); text-decoration: none;
  background: var(--holo-scan), linear-gradient(90deg, #f0c75e12, #4f8dff12);
  box-shadow: 0 0 12px #4f8dff1f; transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.documentation-site-link .site-link-kicker { color: var(--text-muted); font-size: 10px; letter-spacing: .12em; text-transform: uppercase; }
.documentation-site-link strong { color: var(--gold); font: 600 12px var(--mono); letter-spacing: .04em; }
.documentation-site-link .site-link-arrow { color: var(--aura-bright); transition: transform .25s var(--ease-out-expo); }
.documentation-site-link:is(:hover, :focus-visible) { border-color: #f0c75e99; box-shadow: 0 0 18px #f0c75e33; outline: none; }
.documentation-site-link:is(:hover, :focus-visible) .site-link-arrow { transform: translate(2px, -2px); }
.documentation-site-link + .documentation-license { margin-top: 0; }
/* Credits a touch tighter so the guide still fits unscrolled with the link. */
.documentation-license p, .documentation-license li { line-height: 1.45; }
.documentation-license ul { gap: 2px; margin-top: 6px; }
.documentation-header { padding-top: 10px; }
.documentation-logo { margin-bottom: 6px; }
.documentation-header h2 { margin-top: 4px; margin-bottom: 2px; }
.documentation-section h3 { margin-bottom: 6px; }
.documentation-counts > div { padding: 7px 10px; }
.documentation-counts { margin-top: 8px; }
.documentation-counts { margin-top: 4px; margin-bottom: 12px; }
.documentation-site-link { margin: auto 0; }
.documentation-site-link + .documentation-license { margin-top: 12px; padding-top: 10px; }
.documentation-section { padding: 8px 0; }
.documentation-section h3 { margin-bottom: 5px; }
.documentation-header { padding-bottom: 6px; }
