/* Look borrowed from Images_Collage (config\theme.json, dark palette):
   IBM Plex Sans for text, Plex Sans Condensed for titles, Plex Mono for figures and the
   small uppercase "eyebrow" captions, quiet slate colours, one blue accent. */

@font-face { font-family: 'Plex Sans'; src: url(assets/fonts/IBMPlexSans-Regular.ttf) format('truetype'); font-display: swap; }
@font-face { font-family: 'Plex Condensed'; src: url(assets/fonts/IBMPlexSansCondensed-SemiBold.ttf) format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Plex Mono'; src: url(assets/fonts/IBMPlexMono-Regular.ttf) format('truetype'); font-display: swap; }

:root {
  --paper: #0f1518;
  --panel: #151d21f2;
  --card: #1a2328;
  --card-hover: #202b31;
  --well: #0b1013;
  --ink: #e3eae8;
  --dim: #93a3a8;
  --rule: #27343b;
  --accent: #6a9cf2;
  --good: #34c79a;
  --warn: #e0b93c;
  --bad: #f06c62;
  --r-widget: 4px;
  --r-card: 12px;
  --sans: 'Plex Sans', 'Segoe UI', system-ui, sans-serif;
  --display: 'Plex Condensed', 'Plex Sans', 'Segoe UI', sans-serif;
  --mono: 'Plex Mono', Consolas, ui-monospace, monospace;
}

html, body { margin: 0; height: 100%; background: #000; overflow: hidden;
  font: 14.5px/1.45 var(--sans); color: var(--ink); }
#view { position: fixed; inset: 0; }

.eyebrow { font: 11px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); }

/* ---------- read-out card (bottom left) ---------- */
#hud { position: fixed; left: 16px; bottom: 16px; pointer-events: none;
  background: var(--panel); border: 1px solid var(--rule); border-radius: var(--r-card);
  box-shadow: 0 10px 30px #0009; padding: 12px 16px 14px; min-width: 300px;
  backdrop-filter: blur(6px); }
#hud:empty { display: none; }
/* second panel (site finder): left of the main one */
/* its folders are drawers (link budget, best spots), not section captions */
.lil-gui.root.side-panel > .children > .lil-gui > .title {
  font: 13px/1 var(--sans); letter-spacing: 0; text-transform: none; color: var(--dim);
  padding: 10px 8px 8px; margin-top: 4px; border-top: 1px dashed var(--rule);
}
/* site finder results (siteFinder.js) */
.sf-results { padding: 4px 8px 8px; display: flex; flex-direction: column; gap: 6px; }
.sf-row { display: grid; grid-template-columns: 22px 1fr auto auto; align-items: center; gap: 10px; width: 100%;
  padding: 7px 10px; border: 1px solid var(--rule); border-radius: 8px; background: #ffffff06;
  color: var(--ink); font: 12.5px/1.3 var(--sans); text-align: left; cursor: pointer; }
.sf-row:hover { background: #ffffff10; border-color: var(--accent); }
.sf-row.sel { border-color: #7dff9a; background: #7dff9a14; }
.sf-row .go:hover { color: var(--ink); text-decoration: underline; }
.sf-row .rk { font: 600 15px var(--mono); color: var(--dim); text-align: center; }
.sf-row.best .rk { color: #7dff9a; }
.sf-row .main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.sf-row .bar { height: 5px; border-radius: 3px; background: #ffffff14; overflow: hidden; }
.sf-row .bar i { display: block; height: 100%; background: linear-gradient(90deg, #d8a23a, #7dff9a); }
.sf-row .sub { font: 11.5px var(--mono); color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sf-row .sub b { font-weight: 400; color: var(--ink); }
.sf-row .go { font: 11px var(--mono); color: var(--accent); text-transform: uppercase; letter-spacing: 0.08em; }
.sf-row .eye { display: inline-flex; padding: 3px; border-radius: 4px; color: var(--dim); }
.sf-row .eye:hover { color: var(--ink); background: #ffffff14; }
.sf-row.off .main, .sf-row.off .rk { opacity: 0.45; }
.sf-all { display: flex; align-items: center; justify-content: space-between; font: 11px var(--mono); color: var(--dim);
  text-transform: uppercase; letter-spacing: 0.08em; padding: 0 2px; white-space: nowrap; gap: 10px; }
.sf-all button { display: inline-flex; align-items: center; gap: 6px; background: none; border: 1px solid var(--rule); border-radius: 4px;
  color: var(--dim); font: 11.5px var(--sans); text-transform: none; letter-spacing: 0; padding: 3px 8px; cursor: pointer; }
.sf-all button:hover { color: var(--ink); border-color: var(--accent); }
.sf-note { margin: 4px 2px 0; font: 11px/1.45 var(--sans); color: var(--dim); }
.sf-note .lo { color: #e0614d; } .sf-note .hi { color: #7dff9a; }
/* SVG icons in panel labels (icons.js) */
.lil-gui .name .ico { display: inline-flex; vertical-align: -3px; margin-right: 7px; }
.lil-gui .controller.function .name .ico { margin-right: 6px; }
#hud .hud-head { pointer-events: auto; cursor: pointer; user-select: none; margin: -2px 0 8px;
  font: 11px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim); }
#hud .hud-head:hover { color: var(--ink); }
#hud .hud-head:only-child { margin: 0; }
#hud:has(.hud-head:only-child) { min-width: 0; padding: 10px 14px; }
#hud .row { display: grid; grid-template-columns: 64px 1fr; gap: 2px 12px; align-items: baseline; }
#hud .row + .row { margin-top: 7px; }
#hud .eyebrow { padding-top: 2px; }
#hud .v { font: 12.5px/1.5 var(--mono); color: var(--ink); }
#hud .v b { font-weight: 400; color: var(--accent); }
#hud .v .dim { color: var(--dim); }

#status { position: fixed; left: 50%; transform: translateX(-50%); top: 92px; pointer-events: none;
  font: 12.5px var(--mono); color: var(--dim); }
#status:empty { display: none; }

/* ---------- lil-gui panel ---------- */
.lil-gui {
  --background-color: transparent;
  --text-color: var(--ink);
  --title-background-color: transparent;
  --title-text-color: var(--ink);
  --widget-color: var(--well);
  --hover-color: var(--card-hover);
  --focus-color: var(--card-hover);
  --number-color: var(--accent);
  --string-color: var(--ink);
  --font-size: 14px;
  --input-font-size: 12.5px;
  --font-family: var(--sans);
  --font-family-mono: var(--mono);
  --padding: 6px;
  --spacing: 8px;
  --widget-height: 28px;
  --title-height: 40px;
  --name-width: 42%;
  --slider-knob-width: 3px;
  --slider-input-width: 30%;
  --color-input-width: 30%;
  --widget-border-radius: var(--r-widget);
  --checkbox-size: 16px;
  --scrollbar-width: 6px;
}
/* the panels' column, top right; each panel scrolls on its own when the screen is short */
#panels { position: fixed; top: 16px; right: 16px; z-index: 10; max-height: calc(100% - 32px);
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px; pointer-events: none; }
#panels-left { position: fixed; top: 16px; left: 16px; z-index: 10; max-height: calc(100% - 32px);
  display: flex; flex-direction: column; align-items: flex-start; gap: 10px; pointer-events: none; }
#panels > .lil-gui.root, #panels-left > .lil-gui.root { pointer-events: auto; flex: 0 1 auto; min-height: 0; }
.lil-gui.root {
  background: var(--panel); border: 1px solid var(--rule); border-radius: var(--r-card);
  box-shadow: 0 10px 30px #0009; backdrop-filter: blur(6px); overflow: hidden auto;
}
.lil-gui.root > .title {
  font: 600 19px/var(--title-height) var(--display); letter-spacing: 0.01em;
  padding: 4px 16px 0; border-bottom: 1px solid var(--rule);
}
.lil-gui.root > .children { padding: 4px 8px 12px; }
/* collapsed: no scrollbar next to the title */
.lil-gui.root.closed { overflow: hidden; flex-shrink: 0; width: auto !important; }   /* folded: a tab sized to its title */
.lil-gui.root.closed > .title { border-bottom: 0; padding-right: 18px; }
/* Folder titles as eyebrow captions with a rule. */
.lil-gui .lil-gui > .title {
  font: 11px/1 var(--mono); letter-spacing: 0.12em; text-transform: uppercase; color: var(--dim);
  height: auto; padding: 18px 8px 8px; border: 0; background: none;
}
.lil-gui .lil-gui > .title:hover { color: var(--ink); background: none; }
.lil-gui .lil-gui > .children { border-left: 0; padding-left: 0; margin-left: 0; }
.lil-gui .lil-gui.transition > .children { transition-duration: 200ms; }

.lil-gui .controller { padding: 0 8px; margin: 3px 0; }
.lil-gui .controller .name { color: var(--ink); }
.lil-gui .controller.number .name, .lil-gui .controller.option .name, .lil-gui .controller.string .name { color: var(--dim); }

.lil-gui input, .lil-gui select, .lil-gui .display {
  border: 1px solid var(--rule) !important; border-radius: var(--r-widget); }
.lil-gui input[type=text], .lil-gui input[type=number] { font-family: var(--mono); padding: 0 8px; }
.lil-gui .controller.string input { color: var(--ink); }
.lil-gui input:focus { border-color: var(--accent) !important; box-shadow: 0 0 0 2px #6a9cf233; }
.lil-gui .controller.option .display { font: 12.5px/var(--widget-height) var(--mono); padding: 0 26px 0 8px; }

/* Slider: thin rail, accent fill, small rectangular handle (selectors match lil-gui's own specificity). */
.lil-gui .controller.number .slider,
.lil-gui .controller.number .slider:hover,
.lil-gui .controller.number .slider.active {
  position: relative; overflow: visible; border: 0 !important; padding: 0 8px 0 0; margin-left: 8px;
  background: linear-gradient(var(--rule), var(--rule)) no-repeat 0 50% / calc(100% - 8px) 3px;
}
.lil-gui .controller.number .fill,
.lil-gui .controller.number .slider.active .fill {
  position: relative; height: 100%; border-right: 0; opacity: 1;
  background: linear-gradient(var(--accent), var(--accent)) no-repeat 0 50% / 100% 3px;
}
.lil-gui .controller.number .fill::after {
  content: ''; position: absolute; right: -8px; top: 50%; width: 16px; height: 14px; margin-top: -7px;
  background: var(--ink); border-radius: 3px; box-shadow: 0 1px 4px #000a;
}
.lil-gui .controller.number .slider:hover .fill::after,
.lil-gui .controller.number .slider.active .fill::after { background: #fff; }

/* Buttons. */
.lil-gui .controller.function { margin-top: 8px; }
.lil-gui .controller.function button {
  background: var(--card); border: 1px solid var(--rule); border-radius: var(--r-widget);
  height: 32px; color: var(--ink); font: 14px var(--sans); }
.lil-gui .controller.function button:hover { background: var(--card-hover); border-color: #6a9cf299; }
.lil-gui .controller.function button:active { background: #6a9cf240; border-color: var(--accent); }
.lil-gui .controller.function .name { padding-left: 0; text-align: center; }
#hud .hint { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--rule);
  font: 11px/1.4 var(--sans); color: var(--dim); }

/* "Advanced" drawers inside a section: quieter than the section captions. */
.lil-gui .lil-gui .lil-gui > .title {
  font: 13px/1 var(--sans); letter-spacing: 0; text-transform: none; color: var(--dim);
  padding: 10px 8px 8px; margin-top: 4px; border-top: 1px dashed var(--rule);
}
.lil-gui .lil-gui .lil-gui > .title:hover { color: var(--ink); }
.lil-gui .lil-gui .lil-gui > .children { padding-bottom: 4px; }

/* repeater info card (repeaterCard.js) */
#map-card { position: fixed; z-index: 30; width: 330px; padding: 10px 14px 12px;
  background: var(--panel); border: 1px solid var(--rule); border-left: 3px solid #7dffb0; border-radius: var(--r-card);
  box-shadow: 0 10px 30px #0009; backdrop-filter: blur(6px); font: 12px/1.45 var(--sans); color: var(--ink); }
#map-card .head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; font-size: 15px; }
#map-card .x { cursor: pointer; color: var(--dim); font-size: 18px; padding: 0 2px; }
#map-card .x:hover { color: var(--ink); }
#map-card .row { display: grid; grid-template-columns: 48px 1fr; gap: 10px; }
#map-card .row > span:first-child { font: 10px/1.9 var(--mono); text-transform: uppercase; letter-spacing: 0.08em; color: var(--dim); }
#map-card .row i { color: var(--dim); font-style: normal; }
#map-card .ok { color: #7dffb0; } #map-card .no { color: #ff8a7a; }
#map-card .sel { font-family: var(--mono); user-select: all; }
#map-card .note { margin-top: 8px; font-size: 11px; color: var(--dim); }
#map-card .btns { display: flex; gap: 6px; margin-top: 10px; }
#map-card .btns button { flex: 1; }
#map-card .circle { padding: 7px 10px; cursor: pointer; border-radius: 6px;
  background: #ffe0661a; border: 1px solid #ffe06666; color: #ffe066; font: 600 13px/1 var(--sans); }
#map-card .circle:hover { background: #ffe06633; }
#map-card.peak { border-left-color: #ffb020; } #map-card.place { border-left-color: #5fb4ff; }
#map-card .alt { color: #ffc94d; font-family: var(--mono); }
#map-card .place { padding: 7px 10px; cursor: pointer; border-radius: 6px;
  background: #7dffb01a; border: 1px solid #7dffb066; color: #7dffb0; font: 600 13px/1 var(--sans); }
#map-card .place:hover { background: #7dffb033; }
/* my spots: violet (spots.js) */
#map-card.mine { border-left-color: #c58cff; }
#map-card .mine-note { margin: -2px 0 6px; color: #d9c6f2; font-style: italic; white-space: pre-wrap; }
#map-card .save, #map-card .del { flex: 0 0 auto; padding: 7px 10px; cursor: pointer; border-radius: 6px;
  background: #c58cff1a; border: 1px solid #c58cff66; color: #c58cff; font: 600 13px/1 var(--sans); }
#map-card .save:hover { background: #c58cff33; }
#map-card .del { background: #ff8a7a14; border-color: #ff8a7a55; color: #ff8a7a; }
#map-card .del:hover { background: #ff8a7a33; }
.sp-list { padding: 4px 8px 2px; max-height: 320px; overflow-y: auto; }
.sp-row { display: grid; grid-template-columns: 10px 1fr auto 24px 24px 24px; align-items: center; gap: 6px;
  padding: 4px 4px; border-radius: 5px; font: 12px/1.3 var(--sans); color: var(--ink); }
.sp-row:hover { background: #c58cff14; }
.sp-dot { width: 9px; height: 9px; border-radius: 50%; box-shadow: 0 0 6px #c58cff99; }
.sp-name { cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.sp-name:hover { color: #c58cff; }
.sp-meta { font: 11px var(--mono); color: var(--dim); white-space: nowrap; }
.sp-b { width: 24px; height: 22px; padding: 0; cursor: pointer; border-radius: 4px; border: 1px solid transparent;
  background: none; color: var(--dim); font: 13px/1 var(--sans); }
.sp-b:hover { color: var(--ink); border-color: var(--rule); background: #ffffff0d; }
.sp-b[data-a="del"]:hover { color: #ff8a7a; }
.sp-edit { width: 100%; min-width: 0; font: 600 12px var(--sans); color: var(--ink); background: #0006;
  border: 1px solid #c58cff88; border-radius: 4px; padding: 2px 4px; }
.sp-io { display: flex; gap: 6px; padding: 6px 8px 8px; }
.sp-io > * { flex: 1; text-align: center; padding: 6px 8px; cursor: pointer; border-radius: 5px; font: 12px var(--sans);
  background: #ffffff0a; border: 1px solid var(--rule); color: var(--ink); }
.sp-io > *:hover { background: #c58cff22; border-color: #c58cff66; }
/* a slider whose value is written in its name (repeater range): no number box */
.lil-gui .controller.no-number .widget input { display: none; }
.lil-gui .controller.no-number .slider { margin-right: 0; }

/* top toolbar: map layer toggles (toolbar.js) */
#toolbar { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 20; display: flex; flex-direction: column; gap: 2px;
  padding: 4px; background: var(--panel); border: 1px solid var(--rule); border-radius: 12px;
  box-shadow: 0 10px 30px #0009; backdrop-filter: blur(6px); }
#toolbar .tb-row { display: flex; align-items: center; gap: 3px; }
#toolbar .tb-row + .tb-row { border-top: 1px solid var(--rule); padding-top: 2px; }
#toolbar .tb-cap { flex: none; width: 62px; padding-left: 8px; color: var(--dim); font: 10px var(--mono); letter-spacing: .12em; text-transform: uppercase; opacity: .8; }
#toolbar button { display: flex; align-items: center; gap: 6px; padding: 6px 10px 6px 8px; border: 1px solid transparent; white-space: nowrap;
  border-radius: 8px; background: none; color: var(--dim); font: 600 12.5px/1 var(--sans); cursor: pointer; }
#toolbar button:hover { color: var(--ink); background: #ffffff0d; }
#toolbar button.on { color: var(--ink); background: #4aa3ff26; border-color: #4aa3ff66; }
#toolbar button.on svg { color: #6fc0ff; }
@media (max-width: 760px) { #toolbar button span, #toolbar .tb-cap { display: none; } #toolbar button { padding: 8px; } }
/* units sit inside the number box, on its right (main.js unit()): the label says what, the box says how much */
/* (.lil-gui twice: every folder is a .lil-gui that sets these variables again, a rule on the root alone is lost inside them) */
.lil-gui.lil-gui { --slider-input-width: 38%; --slider-input-min-width: 62px; }
.lil-gui .controller.number .widget { position: relative; }
.lil-gui .controller.number .unit { position: absolute; right: 7px; top: 0; line-height: var(--widget-height); pointer-events: none;
  color: var(--dim); font: 10.5px/var(--widget-height) var(--mono); }
.lil-gui .controller.number.has-unit input { padding-right: calc(8px + var(--unit-w, 2ch)); }

/* overhead mini map (miniMap.js): a frame over the region the renderer draws into */
#minimap { position: fixed; z-index: 9; border: 1px solid var(--rule); border-radius: 10px; cursor: crosshair;
  box-shadow: 0 10px 30px #0009, inset 0 0 0 1px #ffffff14; overflow: hidden; }
#minimap .mm-bar { position: absolute; left: 0; right: 0; top: 0; z-index: 1; display: flex; align-items: center; gap: 6px;
  padding: 3px 4px 3px 8px; font: 10px/1.2 var(--mono); color: var(--dim); cursor: move; user-select: none;
  background: linear-gradient(#0b1013e6, #0b101300); }
#minimap .mm-bar span { flex: 1; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
#minimap .mm-grid.off { opacity: 0.4; text-decoration: line-through; }
#minimap .mm-pop, #minimap .mm-btn, #minimap .mm-grid { border: 0; background: none; color: var(--dim); font: 14px/1 var(--mono); cursor: pointer; padding: 0 4px; }
#minimap .mm-pop:hover, #minimap .mm-btn:hover, #minimap .mm-grid:hover { color: var(--ink); }
#minimap .mm-grip { position: absolute; right: 0; bottom: 0; width: 16px; height: 16px; cursor: nwse-resize; z-index: 1;
  background: linear-gradient(135deg, transparent 50%, #ffffff40 50%, #ffffff40 60%, transparent 60%, transparent 70%, #ffffff40 70%, #ffffff40 80%, transparent 80%); }
#minimap .mm-img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: inherit; pointer-events: none; }
#minimap.solo .mm-img { display: none; }
#minimap .mm-cam { position: absolute; left: 0; top: 0; fill: #ffe066; stroke: #0b1013; stroke-width: 1.5; pointer-events: none; }
#minimap .mm-n { position: absolute; right: 8px; top: 24px; font: 600 11px var(--mono); color: #f06c62; pointer-events: none; }
#minimap .mm-scale { position: absolute; right: 20px; bottom: 6px; font: 10px var(--mono); color: var(--dim); pointer-events: none; }
/* Signal legend (signalLegend.js): bottom centre */
#signal-legend { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 15; width: 340px;
  padding: 8px 12px 8px; background: var(--panel); border: 1px solid var(--rule); border-radius: var(--r-card);
  box-shadow: 0 8px 24px #0008; backdrop-filter: blur(6px); font: 11px/1.3 var(--sans); color: var(--ink); pointer-events: none; }
#signal-legend .sl-head { margin-bottom: 5px; font-weight: 600; }
#signal-legend .sl-head i { font: 10px var(--mono); font-style: normal; color: var(--dim); margin-left: 4px; }
#signal-legend .sl-bar { position: relative; height: 10px; border-radius: 3px; }
#signal-legend .sl-fade { position: absolute; top: -3px; bottom: -3px; width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 3px #000; }
#signal-legend .sl-ticks { position: relative; height: 14px; margin: 2px 0 4px; font: 10px var(--mono); color: var(--dim); }
#signal-legend .sl-ticks span { position: absolute; transform: translateX(-50%); }
#signal-legend .sl-ticks span:first-child { transform: none; }
#signal-legend .sl-ticks span:last-child { transform: translateX(-100%); }
#signal-legend .sl-foot { display: flex; gap: 12px; color: var(--dim); font-size: 10px; }
#signal-legend .sl-foot b { display: inline-block; vertical-align: middle; margin-right: 4px; }
#signal-legend .sl-line { width: 12px; height: 2px; background: #f2d9ff; }
#signal-legend .sl-risky { width: 10px; height: 10px; border-radius: 2px; background: linear-gradient(90deg, rgb(92,26,158), rgb(199,41,158)); }
#signal-legend .sl-blocked { width: 10px; height: 10px; border-radius: 2px; background: repeating-linear-gradient(45deg, #555 0 2px, #222 2px 4px); }
@media (max-width: 760px) { #signal-legend { width: 280px; } }
#map-credit { position: fixed; right: 6px; bottom: 3px; z-index: 4; font: 9px var(--sans); color: #ffffffa0; text-shadow: 0 0 3px #000; pointer-events: none; }
#map-credit:empty { display: none; }
#signal-legend .sl-foot + .sl-foot { margin-top: 3px; }
#signal-legend .sl-diff { width: 10px; height: 10px; border-radius: 2px; background: repeating-linear-gradient(-45deg, rgb(255,92,77) 0 3px, rgb(102,37,31) 3px 4.5px); }
/* path profile (pathProfile.js): bottom centre, over the info box while open */
#path-profile { position: fixed; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 12;
  width: min(1060px, calc(100vw - 32px)); padding: 8px 12px 8px; background: var(--panel); border: 1px solid var(--rule);
  border-radius: var(--r-card); box-shadow: 0 10px 34px #000a; backdrop-filter: blur(8px); font: 12px/1.4 var(--sans); color: var(--ink); }
#path-profile .pp-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; font-size: 13px; }
#path-profile .pp-x { cursor: pointer; color: var(--dim); font-size: 19px; padding: 0 4px; }
#path-profile .pp-x:hover { color: var(--ink); }
#path-profile .pp-body { display: flex; gap: 12px; }
#path-profile .pp-chart { position: relative; flex: 1; min-width: 0; height: 250px; }
#path-profile canvas { width: 100%; height: 100%; display: block; cursor: crosshair; }
#path-profile .pp-tip { position: absolute; top: 8px; padding: 5px 8px; background: #0b1013e8; border: 1px solid var(--rule);
  border-radius: 6px; font: 11px/1.45 var(--mono); pointer-events: none; white-space: nowrap; }
#path-profile .ok { color: #7dffb0; } #path-profile .warn { color: #ffad1f; } #path-profile .bad { color: #ff7a6a; }
#path-profile .pp-side { width: 330px; flex: none; display: flex; flex-direction: column; gap: 6px; }
#path-profile .pp-verdict { display: flex; flex-direction: column; padding: 6px 10px; border-radius: 7px; border: 1px solid; }
#path-profile .pp-verdict b { font-size: 17px; }
#path-profile .pp-verdict span { font: 11px var(--mono); }
#path-profile .pp-verdict.ok { background: #7dffb014; border-color: #7dffb066; color: #7dffb0; }
#path-profile .pp-verdict.warn { background: #ffad1f14; border-color: #ffad1f66; color: #ffad1f; }
#path-profile .pp-verdict.bad { background: #ff7a6a14; border-color: #ff7a6a66; color: #ff7a6a; }
#path-profile .pp-table { border-collapse: collapse; width: 100%; font: 11px/1.5 var(--mono); }
#path-profile .pp-table td { padding: 0 2px; vertical-align: top; }
#path-profile .pp-table td:first-child { color: var(--dim); white-space: nowrap; padding-right: 10px; }
#path-profile .pp-table td:last-child { text-align: right; }
#path-profile .pp-table i { color: var(--dim); font-style: normal; }
#path-profile .pp-table tr.sub td { font-size: 10px; text-align: left; white-space: normal; padding: 0 2px 3px 12px; }
#path-profile .pp-table td:last-child { white-space: nowrap; }
#path-profile .pp-table tr.strong td { border-top: 1px solid var(--rule); color: var(--ink); }
#path-profile .pp-inputs { display: flex; gap: 10px; font-size: 11px; color: var(--dim); }
#path-profile .pp-inputs input { width: 52px; background: #0006; border: 1px solid var(--rule); border-radius: 4px; color: var(--ink); font: 11px var(--mono); padding: 2px 4px; }
#path-profile .pp-note { margin-top: 5px; font-size: 10px; color: var(--dim); }
body.profile-open #signal-legend { bottom: calc(var(--pp-h, 330px) + 22px); }
/* the side panels end above the open profile (they scroll inside), so neither covers the other */
body.profile-open #panels, body.profile-open #panels-left { max-height: calc(100% - 16px - var(--pp-h, 330px) - 22px); }
@media (max-width: 760px) { #path-profile .pp-body { flex-direction: column; } #path-profile .pp-side { width: auto; } #path-profile .pp-chart { height: 200px; } }
#map-card .prof { display: block; width: 100%; margin-top: 6px; padding: 6px 10px; cursor: pointer; border-radius: 6px;
  background: #5fb4ff14; border: 1px solid #5fb4ff55; color: #8cc8ff; font: 600 12px/1.2 var(--sans); text-align: left; }
#map-card .prof:hover { background: #5fb4ff2a; }
#signal-legend .sl-gap { width: 10px; height: 10px; border-radius: 2px; background: #a8302a; }
#signal-legend .sl-fill { width: 10px; height: 10px; border-radius: 2px; background: #38ff73; }
#signal-legend .sl-both { width: 10px; height: 10px; border-radius: 2px; background: #4d8cff; }
#signal-legend .sl-opacity { display: flex; align-items: center; gap: 8px; margin-top: 6px; padding-top: 5px; border-top: 1px solid var(--rule);
  font-size: 10px; color: var(--dim); pointer-events: auto; }
#signal-legend .sl-opacity input { flex: 1; accent-color: #c88bff; height: 12px; }
#signal-legend .sl-opacity b { font: 10px var(--mono); color: var(--ink); width: 34px; text-align: right; }
/* path profile: header buttons, folded state, end colours */
#path-profile .pp-btns { display: flex; align-items: center; gap: 6px; flex: none; }
#path-profile .pp-btns button { background: #ffffff0d; border: 1px solid var(--rule); border-radius: 5px; color: var(--ink);
  font: 11px var(--sans); padding: 2px 8px; cursor: pointer; }
#path-profile .pp-btns button:hover { background: #ffffff1f; }
#path-profile .pp-btns button[hidden] { display: none; }
#path-profile .pp-min { min-width: 26px; font-weight: 700; }
#path-profile.folded .pp-body, #path-profile.folded .pp-note { display: none; }
#path-profile.folded .pp-head { margin-bottom: 0; }
#path-profile .pp-note b.tx { color: #ffb020; } #path-profile .pp-note b.rx { color: #7dffb0; }
/* progress bar (progressBar.js): site finder, under "find best spots" */
.pbar { padding: 4px 8px 7px; font: 11px var(--sans); color: var(--dim); }
.pbar-track { position: relative; height: 6px; border-radius: 3px; background: #ffffff14; overflow: hidden; }
.pbar-fill { height: 100%; width: 0; border-radius: 3px; background: linear-gradient(90deg, #4aa8ff, #7dd3ff); transition: width .15s linear; }
.pbar.busy .pbar-fill { background-image: repeating-linear-gradient(-45deg, #ffffff38 0 6px, transparent 6px 12px), linear-gradient(90deg, #4aa8ff, #7dd3ff);
  background-size: 17px 17px, 100% 100%; animation: pbar-move .6s linear infinite; }
@keyframes pbar-move { to { background-position: 17px 0, 0 0; } }
.pbar.done .pbar-fill { background: #7dffb0; }
.pbar.failed .pbar-fill { background: #ff7a6a; }
.pbar-text { display: flex; justify-content: space-between; gap: 8px; margin-top: 3px; }
.pbar-text b { font: 10px var(--mono); color: var(--ink); font-weight: 400; }
.pbar.done .pbar-text span { color: #7dffb0; } .pbar.failed .pbar-text span { color: #ff7a6a; }
/* right-click menu on the map (contextMenu.js) */
#ctx-menu { position: fixed; z-index: 1000; min-width: 230px; padding: 4px; background: var(--panel); border: 1px solid var(--rule);
  border-radius: 8px; box-shadow: 0 10px 30px #000b; backdrop-filter: blur(8px); font: 12px var(--sans); color: var(--ink); }
#ctx-menu .cm-head { padding: 5px 8px 6px; font: 11px var(--mono); color: var(--ink); border-bottom: 1px solid var(--rule); margin-bottom: 3px; }
#ctx-menu .cm-head i { font-style: normal; color: var(--dim); }
#ctx-menu .cm-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; border: 0; border-radius: 5px;
  background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
#ctx-menu .cm-item:hover, #ctx-menu .cm-item:focus-visible { background: #ffffff14; outline: none; }
#ctx-menu .cm-ico { width: 16px; text-align: center; color: #7dd3ff; }
#ctx-menu .cm-label { flex: 1; }
#ctx-menu .cm-hint { font: 10px var(--mono); color: var(--dim); }
#ctx-menu .cm-item.ok .cm-hint { color: #7dffb0; } #ctx-menu .cm-item.bad .cm-hint { color: #ff7a6a; }
