:root {
  --desktop:  #dcdcdc;   /* behind the dialog */
  --face:     #f0f0f0;   /* window face */
  --client:   #ffffff;   /* document area */
  --frame:    #9a9a9a;   /* window border */
  --hairline: #dfdfdf;
  /* the glow a sign is lit with under the pointer, on the map and wherever it is shown lit */
  --hoverglow: drop-shadow(0 0 4px rgba(255, 236, 150, .95));
  --field:    #ffffff;
  --field-b:  #7a7a7a;
  --text:     #000000;
  --dim:      #555555;
  --accent:   #2a3f8f;   /* indigo, deep enough to carry white text */
  --btn:      #e1e1e1;
  --btn-b:    #adadad;
  --btn-hi:   #e8ebf7;
  --btn-dn:   #d3daf0;
  --btn-dn-b: #1b2a63;
  --menu-hi:  #dfe4f5;
  --menu-b:   #a0a0a0;
  --error:    #a80000;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
::selection {
  background: var(--accent);
  color: #ffffff;
}
html { overflow: hidden; }
body {
  margin: 0;
  overflow: hidden;
  background: var(--desktop);
  color: var(--text);
  font: 12px/1.35 "Segoe UI", Tahoma, sans-serif;
}
/* Windows' own interface faces for scripts Segoe UI does not carry. */
:lang(zh) body, body:lang(zh) { font-family: "Segoe UI", "Microsoft YaHei UI", "Microsoft YaHei", "PingFang SC", sans-serif; }
:lang(ja) body, body:lang(ja) { font-family: "Segoe UI", "Yu Gothic UI", "Meiryo UI", Meiryo, "Hiragino Sans", sans-serif; }
option:lang(zh) { font-family: "Microsoft YaHei UI", "Microsoft YaHei", sans-serif; }
option:lang(ja) { font-family: "Yu Gothic UI", "Meiryo UI", sans-serif; }

/* ---- window chrome ------------------------------------------------------ */
.window {
  background: var(--face);
  border: 1px solid var(--frame);
  display: flex;
  flex-direction: column;
}
.titlebar {
  flex: none;
  height: 28px;
  padding: 6px 8px;
  background: var(--client);
  border-bottom: 1px solid var(--hairline);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  user-select: none;
}
.statusbar #who { display: none; }
.statusbar {
  flex: none;
  display: flex;
  gap: 12px;
  height: 22px;
  padding: 3px 8px;
  background: var(--face);
  border-top: 1px solid var(--hairline);
  color: var(--dim);
  white-space: nowrap;
  overflow: hidden;
}
.statusbar span { overflow: hidden; text-overflow: ellipsis; }
.statusbar.error { color: var(--error); }

/* ---- menu bar ----------------------------------------------------------- */
.menubar {
  flex: none;
  display: flex;
  height: 24px;
  background: var(--face);
  border-bottom: 1px solid var(--hairline);
  user-select: none;
}
.menu { position: relative; }
.menu > button {
  white-space: nowrap;
  height: 24px;
  min-width: 0;
  padding: 0 9px;
  font: inherit;
  color: var(--text);
  background: transparent;
  border: none;
  cursor: default;
}
.menu > button:hover, .menu.open > button { background: var(--menu-hi); }
.dropdown {
  position: absolute;
  top: 100%;
  inset-inline-start: 0;
  z-index: 10;
  min-width: 184px;
  padding: 2px;
  background: var(--client);
  border: 1px solid var(--menu-b);
  box-shadow: 2px 2px 3px rgba(0, 0, 0, .18);
}
.dropdown { width: max-content; max-width: calc(100vw - 16px); }
.dropdown button {
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 24px;
  width: 100%;
  height: 22px;
  min-width: 0;
  padding-block: 0;
  padding-inline: 24px 12px;
  font: inherit;
  color: var(--text);
  background: transparent;
  border: none;
  text-align: start;
  cursor: default;
}
.dropdown button:hover, .dropdown button:focus { background: var(--menu-hi); outline: none; }
.dropdown button:disabled { color: #a0a0a0; background: transparent; }
.dropdown button:disabled .key { color: #b8b8b8; }

/* ---- toolbar ------------------------------------------------------------ */
.toolbar {
  flex: none;
  overflow: hidden;
  display: flex;
  gap: 2px;
  height: 30px;
  padding: 3px 4px;
  background: var(--face);
  border-bottom: 1px solid var(--hairline);
  user-select: none;
}
.toolbar button {
  flex: none;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding-block: 0;
  padding-inline: 5px 7px;
  font: inherit;
  color: var(--text);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 0;
  cursor: default;
}
/* The signs stand alone and their names are in the tooltip, at every width - as on a phone, and
   now on a desk as well. Only the words go: a span holding a sign of its own stays, and so does
   the one that is there for a reader rather than an eye. */
.toolbar > button > span[data-t]:not(.sr), .toolbar > button > span[data-tm]:not(.sr),
.toolbar > .menu > button > span[data-t]:not(.sr),
.toolbar > .menu > button > span[data-tm]:not(.sr) { display: none; }
.toolbar > button, .toolbar > .menu > button { padding-inline: 6px; }
/* too many tools for the width: the overflow menu comes out */
#tapMenu { display: none; }
.toolbar.tight #tapMenu { display: inline-flex; }
@media (hover: none) {
  /* a tap is not a hover: nothing stays lit because a finger passed over it */
  .toolbar button:hover:not(:disabled), .profile .profileflip:hover, .gnsspanel button:hover:not(:disabled),
  .viewpanel button:hover, .nodesnav button:hover, .floatpanel button:hover {
    background: var(--btn); border-color: var(--btn-b);
  }
  .toolbar button:hover:not(:disabled) { background: transparent; border-color: transparent; }
}
.toolbar button:hover:not(:disabled) { background: var(--btn-hi); border-color: var(--accent); }
.toolbar button:active:not(:disabled) { background: var(--btn-dn); border-color: var(--btn-dn-b); }
.toolbar button:focus-visible { outline: 1px dotted var(--text); outline-offset: -3px; }
.toolbar button:disabled { color: #a0a0a0; }
.toolbar svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.5;
  stroke-linecap: square;
}
.toolbar button:disabled svg { stroke: #b8b8b8; }
.toolbar svg .solid { fill: var(--accent); stroke: none; }
.toolbar button:disabled svg .solid { fill: #b8b8b8; }
.toolbar .sep {
  flex: none;
  width: 1px;
  margin: 2px 4px;
  background: #d0d0d0;
}
/* The active tool stays pressed in. */
.toolbar button.tool[aria-pressed="true"] {
  background: var(--btn-dn);
  border-color: var(--btn-dn-b);
}

/* ---- map area and selection banner ------------------------------------- */
.mapwrap {
  flex: 1;
  position: relative;
  min-height: 0;
}
.mapwrap #map { position: absolute; inset: 0; }
.mapwrap .maplibregl-canvas-container, .mapwrap .maplibregl-canvas { touch-action: none; }
/* the atlas view (Robinson, Equal Earth) lies over the map, which keeps its place underneath */
.mapwrap #atlas { position: absolute; inset: 0; width: 100%; height: 100%; background: #ffffff; cursor: grab; touch-action: none; }
.mapwrap #atlas.dragging { cursor: grabbing; }
.mapwrap.atlas-on #map { visibility: hidden; }
.mapwrap.atlas-on #map .maplibregl-control-container { display: none; }   /* MapLibre forces its credit visible */
.atlasnav { position: absolute; top: 10px; right: 10px; z-index: 4; }
/* the map keeps the crosshair pointer throughout; it is hidden only while a drag holds it */
.mapwrap .maplibregl-canvas-container, .mapwrap .maplibregl-canvas, .mapwrap #atlas { cursor: crosshair !important; }
body.navigating .mapwrap .maplibregl-canvas-container, body.navigating .mapwrap .maplibregl-canvas,
body.navigating .mapwrap #atlas { cursor: none !important; }
/* what can be done with what is selected, where it was right-clicked; also the Multi-Select shapes */
.dropdown.ctxmenu { position: fixed; top: auto; inset-inline-start: auto; z-index: 45; }
.dropdown.ctxmenu.submenu { z-index: 46; }
.dropdown.ctxmenu button.more { position: relative; padding-inline-end: 20px; }
.dropdown.ctxmenu button.more .arrow { position: absolute; inset-inline-end: 6px; color: var(--dim); }
.dropdown.ctxmenu .separator { height: 1px; margin: 3px 2px; background: var(--menu-b); }
.dropdown.ctxmenu button[role="menuitemradio"][aria-checked="true"]::before {
  content: "\2022"; position: absolute; inset-inline-start: 10px; font-weight: bold;
}
.dropdown.ctxmenu button { position: relative; }
/* Multi-Select: a switch of its own, beside the tools, with its shape menu */
.toolbar button.toggle[aria-pressed="true"] { background: var(--btn-dn); border-color: var(--btn-dn-b); }
.toolbar button.split { min-width: 0; padding-inline: 1px; margin-inline-start: -2px; }
.selbox { position: absolute; z-index: 5; pointer-events: none; border: 1px dashed #1f9d55; background: rgba(31, 157, 85, 0.1); }
.brushring { position: absolute; z-index: 5; pointer-events: none; border: 1.5px solid #1f9d55; border-radius: 50%;
             box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.8); background: rgba(31, 157, 85, 0.06); }
.note.error { color: #b00020; }
/* while a drag holds the pointer, a small crosshair marks where the view was grabbed: zooming aims there */
body.navigating, body.navigating * { cursor: none !important; }
.navcross {
  position: absolute;
  z-index: 6;
  width: 21px;
  height: 21px;
  margin: -10px 0 0 -10px;
  pointer-events: none;
}
.navcross::before, .navcross::after {
  content: "";
  position: absolute;
  background: #1f1f1f;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.9);
}
.navcross::before { left: 10px; top: 2px; width: 1px; height: 17px; }
.navcross::after { top: 10px; left: 2px; height: 1px; width: 17px; }
.mapwrap.has-selection .atlasnav { top: 38px; }
.mapwrap #atlas.linking { cursor: crosshair; }
.mapwrap #atlas.pointing { cursor: pointer; }
/* View > Height Profile: the heights along the selected line, docked under the map */
.profile {
  position: absolute;
  left: 8px;
  bottom: 30px;
  z-index: 4;
  width: min(560px, calc(100% - 120px));
  height: 190px;
  min-width: 240px;
  min-height: 90px;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid var(--frame);
  box-shadow: 2px 2px 4px rgba(0, 0, 0, .18);
  resize: both;
  overflow: hidden;
}
.profile .profiletitle { cursor: move; }
.profile .profiletitle {
  flex: none;
  padding: 3px 8px 0;
  color: #1f1f1f;
  font: 12px "Segoe UI", Tahoma, sans-serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.profile canvas { flex: 1; min-height: 0; width: 100%; display: block; }
.atlasattrib {
  position: absolute;
  right: 0;
  bottom: 0;
  z-index: 4;
  padding: 0 5px;
  background: rgba(255, 255, 255, 0.5);
  color: rgba(0, 0, 0, 0.75);
  font: 12px/20px "Segoe UI", Tahoma, sans-serif;
}
/* The one tip: for a place on the map and for every button, item and tick alike. It lives on the
   page itself, over everything, and wraps a long saying rather than running off. */
.atlastip {
  position: fixed;
  z-index: 1000;
  pointer-events: none;
  max-width: min(480px, calc(100vw - 8px));
  padding: 2px 6px;
  background: #ffffe1;
  border: 1px solid #767676;
  color: #000;
  font: 12px "Segoe UI", Tahoma, sans-serif;
  white-space: normal;
}
.selectionbar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 28px;
  padding-block: 0;
  padding-inline: 10px 4px;
  background: #e0a800;
  border-bottom: 1px solid #b88a00;
  color: #ffffff;
  text-shadow: 0 1px 1px rgba(90, 60, 0, .45);
  white-space: nowrap;
}
.selectionbar .what {
  flex: none;
  padding: 1px 6px;
  border: 1px solid rgba(255, 255, 255, .8);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .04em;
}
#selectionName { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
#selectionInfo { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; opacity: .95; }
#selectionClose {
  flex: none;
  width: 22px;
  height: 22px;
  padding: 0;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 0;
  cursor: default;
}
#selectionClose:hover { border-color: rgba(255, 255, 255, .9); background: rgba(255, 255, 255, .15); }
#selectionClose svg { width: 12px; height: 12px; stroke: #ffffff; stroke-width: 2; display: block; margin: auto; }
/* the map's zoom buttons move down out of the banner's way */
.mapwrap.has-selection .maplibregl-ctrl-top-right { top: 28px; }

/* ---- sea ice legend ------------------------------------------------------ */
.icelegend {
  position: absolute;
  top: 8px;
  inset-inline-start: 8px;
  z-index: 2;
  padding: 6px 8px 5px;
  background: rgba(255, 255, 255, .92);
  border: 1px solid var(--frame);
  white-space: nowrap;
  cursor: move;
  user-select: none;
}
.mapwrap.has-selection .icelegend:not(.moved) { top: 36px; }
.icelegend .daterow { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.icelegend .daterow button { height: 20px; padding: 0 8px; font: inherit; cursor: default; }
.icelegend .title { margin-bottom: 4px; font-weight: 600; }
.icelegend .row { display: flex; align-items: center; gap: 6px; height: 18px; }
.icelegend .swatch {
  flex: none;
  position: relative;
  width: 22px;
  height: 12px;
  border: 1px solid #b9c3c9;
  background: #e3f0f7;
}
.icelegend .note { margin-top: 3px; color: var(--dim); font-size: 11px; }
.dropdown .key { margin-inline-start: auto; color: var(--dim); direction: ltr; }
.dropdown button { position: relative; }
.dropdown button[aria-checked="true"]::before {
  content: "\2713";
  position: absolute;
  inset-inline-start: 8px;
}
.dropdown .separator {
  height: 1px;
  margin: 3px 2px;
  background: #e0e0e0;
}

/* ---- controls ----------------------------------------------------------- */
input[type="text"] {
  width: 100%;
  height: 22px;
  padding: 0 4px;
  font: inherit;
  color: var(--text);
  background: var(--field);
  border: 1px solid var(--field-b);
  border-radius: 0;
}
input[type="date"] {
  height: 22px;
  padding: 0 2px 0 4px;
  font: inherit;
  color: var(--text);
  background: var(--field);
  border: 1px solid var(--field-b);
  border-radius: 0;
}
input[type="date"]:focus,
input[type="text"]:focus {
  outline: none;
  border-color: var(--accent);
}
.buttons { display: flex; justify-content: flex-end; gap: 8px; }
.buttons button {
  white-space: nowrap;
  min-width: 75px;
  height: 23px;
  padding: 0 10px;
  font: inherit;
  color: var(--text);
  background: var(--btn);
  border: 1px solid var(--btn-b);
  border-radius: 0;
  cursor: default;
}
.buttons button.default { border-color: var(--accent); }
.buttons button:hover:not(:disabled) { background: var(--btn-hi); border-color: var(--accent); }
.buttons button:active:not(:disabled) { background: var(--btn-dn); border-color: var(--btn-dn-b); }
.buttons button:focus-visible { outline: 1px dotted var(--text); outline-offset: -4px; }
.buttons button:disabled { color: #6d6d6d; background: #f0f0f0; border-color: #d0d0d0; }

.fields {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
}
.fields label { text-align: end; }
[dir="rtl"] .toolbar svg.mirror { transform: scaleX(-1); }   /* undo points back, whichever way text runs */
#routing .marquee { direction: ltr; }

/* ---- sign-in dialog ----------------------------------------------------- */
#loginScreen select { width: 100%; min-width: 0; }
#loginScreen {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.dialog { width: 328px; max-width: 100%; }
.dialog .client { padding: 16px; }

/* ---- application window ------------------------------------------------- */
#appScreen { height: 100%; }
#appScreen .window { height: 100%; border: none; }
#map {
  flex: 1;
  width: 100%;
  background: var(--client);
}
/* The reading stands in a place of its own, wide enough for the longest of them, so the numbers
   stay where they are as the pointer moves rather than shifting the whole bar about. */
#coords {
  flex: 0 1 46ch;
  font-variant-numeric: tabular-nums;
}
#docStatus { flex: 1 1 auto; min-width: 0; }
#who { flex: none; margin-inline-start: auto; }

/* Work in the background: a marquee progress bar, as Windows shows it. */
#routing {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  color: var(--text);
}
#routing .marquee {
  flex: none;
  position: relative;
  width: 96px;
  height: 12px;
  background: #e6e6e6;
  border: 1px solid #bcbcbc;
  overflow: hidden;
}
#routing .marquee span {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 32px;
  background: linear-gradient(90deg, rgba(42, 63, 143, 0), var(--accent) 35%, var(--accent) 65%, rgba(42, 63, 143, 0));
  animation: marquee 1.4s linear infinite;
}
@keyframes marquee {
  from { left: -32px; }
  to   { left: 96px; }
}
#routingText { overflow: hidden; text-overflow: ellipsis; }

/* What Esc would stop, said in the status bar - words, not a button */
#statusCancel {
  flex: none;
  align-self: center;
  color: var(--dim);
}
#statusCancel[hidden] { display: none; }

/* The map takes keys (arrows pan it) but never shows a focus frame. */
.maplibregl-canvas:focus, .maplibregl-canvas:focus-visible, .maplibregl-canvas-container:focus { outline: none; }

/* Square off MapLibre chrome so it reads as part of the window. */
.maplibregl-ctrl-group {
  border: 1px solid var(--frame) !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
.maplibregl-ctrl-group button { border-radius: 0 !important; }
.maplibregl-ctrl-group button + button { border-top: 1px solid var(--hairline); }
.maplibregl-ctrl-scale {
  border-radius: 0;
  border-color: var(--frame);
  background: rgba(255, 255, 255, .75);
  font: 11px "Segoe UI", Tahoma, sans-serif;
}
.maplibregl-ctrl-attrib {
  border-radius: 0 !important;
  font: 11px "Segoe UI", Tahoma, sans-serif;
}
.maplibregl-ctrl-attrib-button { border-radius: 0 !important; }

/* ---- modal dialogs ------------------------------------------------------ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, .06);
}
#messageDialog { z-index: 60; }
.modal .window { box-shadow: 3px 3px 8px rgba(0, 0, 0, .25); }
.modal .dialog { width: 360px; }
.modal .client { padding: 16px; }
.modal p { margin: 0 0 16px; }

.listbox {
  height: 168px;
  margin-bottom: 12px;
  overflow: auto;
  background: var(--field);
  border: 1px solid var(--field-b);
}
.listbox:focus { outline: none; }
.listbox div {
  height: 20px;
  padding: 2px 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  cursor: default;
}
.listbox div.selected { background: var(--accent); color: #ffffff; }
.listbox .empty { color: var(--dim); font-style: italic; }

/* ---- settings dialog ---------------------------------------------------- */

.grouplabel { margin: 0 0 8px; color: var(--dim); }
.datepick { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.datepick select { min-width: 0; }
.datepick .literal { color: var(--text); }
.modal .daterow, .modal .langrow { grid-template-columns: auto auto; justify-content: start; margin-bottom: 6px; }
.modal .shiprow { grid-template-columns: auto auto; justify-content: start; row-gap: 6px; margin-bottom: 6px; }
#shipSettingsDialog .dialog { width: 420px; }
.modal .note { margin: 0 0 16px; color: var(--dim); font-size: 11px; }
#viewSettingsDialog .dialog { width: 400px; }
#viewSettingsDialog .orderrow .listbox { height: 204px; }
/* The credits: who made it and what it stands for, then the sources as a dense reference list. */
#creditsDialog .dialog { width: 430px; }
.creditslist { max-height: 58vh; overflow-y: auto; margin-bottom: 12px; }
.creditslist .creditsby { margin: 0 0 10px; font-weight: 600; }
/* the board: three lanes of sayings sliding past, the middle one the other way */
.creditslist .board { margin: 2px 0 8px; }
.creditslist .lane { position: relative; overflow: hidden; height: 20px; }
.creditslist .track { position: absolute; left: 0; top: 0; display: flex; white-space: nowrap; will-change: transform; }
.creditslist .boarditem { display: flex; align-items: center; gap: 6px; padding-right: 30px; white-space: nowrap; }
.creditslist .boarditem .flag { width: 18px; height: auto; flex: none; border: 1px solid var(--hairline); }
.creditslist .boardnative { color: var(--dim); }
.creditslist .creditshead { margin: 14px 0 6px; }
.creditslist .creditwhat { margin: 0; font-size: 11px; }
.creditslist .creditwho { margin: 0 0 6px; }

/* Debug: the legend of every sign, in the rows of the class it belongs to */
#debugDialog .dialog { width: min(1000px, calc(100vw - 24px)); }
#debugDialog .debugbody { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 10px; margin-bottom: 12px; }
#debugDialog .debugtree {
  height: 68vh; overflow-y: auto; padding: 3px; border: 1px solid var(--frame); background: var(--client);
}
#debugDialog .debugpane { display: flex; flex-direction: column; min-width: 0; }
#debugDialog .debugpane .debuglist { height: calc(68vh - 26px); max-height: none; margin-bottom: 0; }
#debugDialog .tgroup, #debugDialog .titem {
  display: flex; align-items: center; gap: 6px; width: 100%; height: 21px; padding: 0 4px;
  font: inherit; color: var(--text); text-align: start; white-space: nowrap;
  background: none; border: 1px solid transparent; cursor: default;
}
#debugDialog .tgroup { font-weight: 600; margin-top: 3px; }
#debugDialog .tgroup:first-child { margin-top: 0; }
#debugDialog .tfold {
  display: grid; place-items: center; width: 11px; height: 11px; flex: none;
  font-size: 10px; line-height: 1; border: 1px solid var(--frame); color: var(--dim);
}
#debugDialog .titem { padding-inline-start: 20px; }
#debugDialog .titem:hover { background: var(--btn-hi); }
#debugDialog .titem[aria-selected="true"] { background: var(--accent); color: #ffffff; }
#debugDialog .titem[aria-selected="true"] .dsym svg { stroke: #ffffff; }
#debugDialog .titem[aria-selected="true"] .dsym svg .solid { fill: #ffffff; }
#debugDialog .titem .tlabel { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
#debugDialog .titem .ttally { color: var(--dim); font-size: 11px; }
#debugDialog .titem[aria-selected="true"] .ttally { color: #dfe5ff; }
.dsym { display: inline-grid; place-items: center; width: 16px; height: 16px; flex: none; }
.dsym svg { width: 16px; height: 16px; display: block; fill: none; stroke: var(--accent); stroke-width: 1.4; stroke-linecap: square; }
.dsym svg .solid { fill: var(--accent); stroke: none; }
.dsym.big, .dsym.big svg { width: 32px; height: 32px; }
.debuglist .dsrc {
  display: block; margin-top: 2px; padding: 4px 6px; font: 11px/1.4 Consolas, "Courier New", monospace;
  white-space: pre-wrap; overflow-wrap: anywhere; background: var(--client); border: 1px solid var(--hairline);
}
.debuglist .dkey { font: 11px Consolas, "Courier New", monospace; color: var(--dim); white-space: nowrap; }
.debuglist .at { max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.debuglist .solarcell { background: #000000; }
.debuglist .dlangs { grid-column: 1 / -1; display: grid; grid-template-columns: 170px 1fr; gap: 2px 10px; }
.debuglist .dlangs > .tkey { grid-column: 1 / -1; margin-top: 5px; font-weight: 600; color: var(--text); }
.debuglist .dlanglist { display: contents; color: var(--dim); }
#debugDialog #debugCount { margin: 0 0 8px; }
.debuglist { max-height: 60vh; overflow-y: auto; margin-bottom: 12px; border: 1px solid var(--hairline); padding: 6px 8px; }
.debuglist .lsee {
  display: flex; align-items: center; gap: 7px; font-weight: 600; font-size: 13px;
  margin: 16px 0 2px; padding-bottom: 4px; border-bottom: 2px solid var(--accent);
}
.debuglist .lsee:first-child { margin-top: 0; }
.debuglist .wsign { display: block; width: 17px; height: 17px; flex: none; }
.debuglist .wsign svg {
  width: 17px; height: 17px; display: block;
  fill: none; stroke: var(--accent); stroke-width: 1.4; stroke-linecap: square;
}
.debuglist .wsign svg .solid { fill: var(--accent); stroke: none; }
.debuglist .lwork { padding-inline-start: 10px; }
.debuglist .lclass {
  display: flex; align-items: center; gap: 6px; font-weight: 600;
  margin: 10px 0 4px; padding-bottom: 3px; border-bottom: 1px solid var(--hairline);
}
.debuglist .lclass:first-child { margin-top: 0; }
.debuglist .csign { display: block; width: 16px; height: 16px; flex: none; }
.debuglist .csign svg { width: 16px; height: 16px; fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linecap: square; display: block; }
.debuglist .csign svg .solid { fill: var(--accent); stroke: none; }
.debuglist .legend { display: flex; align-items: center; gap: 10px; padding: 3px 0; }
.debuglist .turn {
  flex: none; width: 15px; height: 15px; padding: 0; line-height: 13px; text-align: center;
  font: inherit; color: var(--text); background: var(--face); border: 1px solid var(--frame); cursor: pointer;
}
.debuglist .what { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.debuglist .shows { display: flex; align-items: flex-end; gap: 10px; flex: none; }
.debuglist .shown { display: flex; flex-direction: column; align-items: center; gap: 2px; width: 54px; }
.debuglist .cell {
  display: grid; place-items: center; width: 52px; height: 46px;
  border: 1px solid var(--hairline); background: var(--face);
}
.debuglist .cell img { display: block; max-width: 48px; max-height: 42px; }
.debuglist .cell.hov img { filter: var(--hoverglow); }
/* a picture of a node, not a node: it does not light when the pointer crosses it, because the
   cell beside it is what it looks like when it does */
.debuglist .cell .node { position: static; pointer-events: none; }
.debuglist .sline { display: block; width: 36px; height: 4px; border-radius: 2px; }
.debuglist .ssheet { display: block; width: 34px; height: 22px; border: 1.5px solid; opacity: .85; }
.debuglist .sramp { display: block; width: 40px; height: 14px; border: 1px solid var(--hairline); }
.debuglist .under { color: var(--dim); font-size: 10px; text-align: center; line-height: 1.1; }
.debuglist .at { flex: none; color: var(--dim); white-space: nowrap; }
.debuglist .legendmore {
  display: grid; grid-template-columns: 170px 1fr; gap: 2px 10px;
  margin: 2px 0 8px 25px; padding: 5px 8px; border: 1px solid var(--hairline); background: var(--face);
}
.debuglist .legendmore .trait { display: contents; }
.debuglist .legendmore .tkey { color: var(--dim); white-space: nowrap; }
.debuglist .legendmore .tval { white-space: normal; overflow-wrap: anywhere; }
.debuglist .legendmore .tval.none { color: var(--dim); }
.debuglist .swatch {
  display: inline-block; width: 11px; height: 11px; margin-inline-start: 6px;
  vertical-align: -1px; border: 1px solid var(--frame);
}

#findDialog .dialog { width: 440px; }
#findDialog .findrow { margin-bottom: 8px; }
#findDialog .listbox { height: 240px; margin-bottom: 6px; }
#findDialog .listbox div { display: flex; gap: 8px; }
#findDialog .listbox .name { overflow: hidden; text-overflow: ellipsis; }
#findDialog .listbox .place { margin-inline-start: auto; flex: none; color: var(--dim); }
#findDialog .listbox div.selected .place { color: #dfe4f5; }
#findDialog .note { margin: 0 0 6px; }
#findDialog .buttons { margin-top: 10px; }
select {
  min-width: 180px;
  height: 22px;
  padding-block: 0;
  padding-inline: 4px 2px;
  font: inherit;
  color: var(--text);
  background: var(--field);
  border: 1px solid var(--field-b);
  border-radius: 0;
}
select:focus { outline: none; border-color: var(--accent); }
.orderrow {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.orderrow .listbox {
  flex: 1;
  height: 116px;
  margin-bottom: 0;
}
.orderbuttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.orderbuttons button {
  white-space: nowrap;
  min-width: 88px;
  height: 23px;
  padding: 0 10px;
  font: inherit;
  color: var(--text);
  background: var(--btn);
  border: 1px solid var(--btn-b);
  border-radius: 0;
  cursor: default;
}
.orderbuttons button:hover:not(:disabled) { background: var(--btn-hi); border-color: var(--accent); }
.orderbuttons button:active:not(:disabled) { background: var(--btn-dn); border-color: var(--btn-dn-b); }
.orderbuttons button:disabled { color: #6d6d6d; background: #f0f0f0; border-color: #d0d0d0; }
.listbox label {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 100%;
  cursor: default;
}
.checkrow {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  white-space: nowrap;
  cursor: default;
}
.checkrow input[type="checkbox"],
.listbox input[type="checkbox"] {
  width: 13px;
  height: 13px;
  margin: 0;
  accent-color: var(--accent);
}

[hidden] { display: none !important; }

/* The place pointed at on the height chart, on the map: a ring over everything */
.profile-mark {
  position: absolute;
  left: -8px;
  top: -8px;
  width: 10px;
  height: 10px;
  border: 3px solid #1f9d55;
  border-radius: 50%;
  background: #ffffff;
  pointer-events: none;
  z-index: 3;
}
.profile-mark[hidden] { display: none; }

/* ---- the View panel (the eye): what the map shows, by tool, and its panels and settings ---- */
.viewpanel {
  position: fixed;
  z-index: 20;
  display: flex;
  gap: 0;
  padding: 6px 4px 8px;
  background: var(--client);
  border: 1px solid var(--menu-b);
  box-shadow: 2px 2px 3px rgba(0, 0, 0, .18);
  user-select: none;
}
.viewpanel .col { padding: 0 10px; min-width: 92px; border-inline-start: 1px solid var(--hairline); }
.viewpanel .col:first-child { border-inline-start: none; }
.viewpanel .col.view { min-width: 210px; }
.viewpanel .col { display: flex; flex-direction: column; }
/* the path checks are the last thing in a column, whatever the tallest column holds */
.viewpanel .col .foot { margin-top: auto; padding-top: 6px; }
.viewpanel .head { display: flex; align-items: center; gap: 5px; height: 22px; margin-bottom: 2px; font-weight: 600; white-space: nowrap; }
.viewpanel .head svg { width: 16px; height: 16px; fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linecap: square; }
.viewpanel .head svg .solid { fill: var(--accent); stroke: none; }
.viewpanel label.check { display: flex; align-items: center; gap: 5px; height: 21px; white-space: nowrap; }
.viewpanel label.check input { margin: 0; }
.viewpanel .sub { margin: 8px 0 2px; color: var(--dim); white-space: nowrap; }
.viewpanel .row { display: flex; align-items: center; gap: 4px; margin: 3px 0; white-space: nowrap; }
.viewpanel .row .grow { flex: 1; }
.viewpanel button {
  height: 21px; padding: 0 8px; font: inherit; color: var(--text); white-space: nowrap;
  background: var(--btn); border: 1px solid var(--btn-b);
}
.viewpanel button:hover { background: var(--btn-hi); border-color: var(--accent); }
.viewpanel .seg { display: inline-flex; }
.viewpanel .seg button + button { border-inline-start: none; }
.viewpanel .seg button[aria-pressed="true"] { background: var(--btn-dn); border-color: var(--btn-dn-b); }
.viewpanel button.reset { width: 22px; padding: 0; }
.viewpanel button.reset svg { width: 12px; height: 12px; fill: none; stroke: var(--accent); stroke-width: 1.5; display: block; margin: auto; }
.viewpanel .advanced { margin-top: 6px; }
.viewpanel .advanced summary { cursor: default; color: var(--dim); }
.viewpanel .advanced .row button { flex: 1; text-align: start; }
#viewEye[aria-expanded="true"] { background: var(--btn-dn); border-color: var(--btn-dn-b); }
.floatpanel.dragging { opacity: .9; }
/* the corner a panel is sized by: the browser's own answers to a mouse alone */
.floatpanel .sizer { position: absolute; inset-inline-end: 0; bottom: 0; width: 18px; height: 18px; cursor: nwse-resize; touch-action: none; }
/* a finger on a panel moves or sizes the panel, and never carries the page with it */
.floatpanel { touch-action: none; }
.floatpanel .body, .floatpanel .panellist, .traitspanel .body, .labelspanel .body { touch-action: pan-y; }
.groundpanel .view, .groundpanel .view * { touch-action: auto; }

/* the point under the pointer, shown larger over the map */
.hovericon { position: absolute; left: 0; top: 0; z-index: 3; pointer-events: none; filter: var(--hoverglow); }
.hovericon[hidden] { display: none; }
/* the actions done at a hovered place, under its sign */
.hoveracts { position: absolute; left: 0; top: 0; z-index: 4; pointer-events: none; }
.hoveracts[hidden] { display: none; }
.hoveracts img { position: absolute; left: 0; top: 0; pointer-events: auto; cursor: pointer; }
.viewpanel .grid { display: grid; grid-template-columns: auto auto auto; gap: 4px; margin: 3px 0 4px; justify-content: start; }
.viewpanel .grid .gap { display: block; }
/* Map, Globe, 2D, 3D, the whole world and the weather, in one row, each half a button wide */
.viewpanel .halfrow { display: flex; gap: 2px; margin: 0 0 4px; }
.viewpanel .halfrow button {
  /* each as wide as its own word needs, sharing what is left over: an equal share for all of them
     cut Globe short while 2D sat in room it had no use for */
  flex: 1 1 auto; min-width: 0; height: 21px; padding: 0 3px; font: inherit; color: var(--text); white-space: nowrap;
  background: var(--btn); border: 1px solid var(--btn-b); cursor: pointer;
}
.viewpanel .halfrow button[aria-pressed="true"] { background: var(--btn-dn); border-color: var(--btn-dn-b); }
.viewpanel .halfrow button.icon { display: grid; place-items: center; }
.viewpanel .halfrow button svg { width: 13px; height: 13px; fill: none; stroke: var(--text); stroke-width: 1.4; }
.viewpanel .halfrow button svg .solid { fill: var(--text); stroke: none; }
.viewpanel .grid .seg button { flex: 1; }
.viewpanel button.icon { width: 30px; padding: 0; justify-self: start; }
.viewpanel button.icon svg { width: 14px; height: 14px; fill: none; stroke: var(--accent); stroke-width: 1.3; display: block; margin: auto; }
.viewpanel .panellist .grip { display: inline-flex; width: 12px; height: 18px; align-items: center; justify-content: center; cursor: grab; }
.viewpanel .panellist .grip svg { width: 6px; height: 12px; fill: var(--dim); }
.viewpanel .panellist .row.lifted { background: var(--menu-hi); outline: 1px dotted var(--accent); }
.viewpanel .settingsrow { margin-top: 8px; }
.viewpanel .panellist .row { position: relative; padding: 0 2px; cursor: grab; }
.viewpanel .panellist .row.picked { background: var(--menu-hi); }
.viewpanel .panellist .row.lifted { z-index: 1; background: var(--btn-hi); box-shadow: 0 2px 5px rgba(0, 0, 0, .22); cursor: grabbing; }
.viewpanel .panellist .grip { width: 14px; }
.viewpanel .panellist .grip svg { width: 8px; height: 14px; }

.viewpanel button.reset svg path { stroke-linecap: round; stroke-linejoin: round; }
/* the Path Monitor's flip: seen from the other end */
.profile .profileflip { position: absolute; top: 2px; inset-inline-end: 4px; width: 24px; height: 18px; padding: 0;
  background: var(--btn); border: 1px solid var(--btn-b); }
.profile .profileflip:hover { background: var(--btn-hi); border-color: var(--accent); }
.profile .profileflip[aria-pressed="true"] { background: var(--btn-dn); border-color: var(--btn-dn-b); }
.profile .profileflip svg { width: 14px; height: 14px; fill: none; stroke: var(--accent); stroke-width: 1.4; display: block; margin: auto; }
.profile .profiletitle { padding-inline-end: 34px; }
/* Play, Pause and the timescale, over the chart's top rows */
.profile .profileplay { flex: none; display: flex; align-items: center; gap: 3px; padding: 2px 8px 0 52px; direction: ltr;
  font: 11px "Segoe UI", Tahoma, sans-serif; color: #4a4a4a; white-space: nowrap; overflow: hidden; }
.profile .playbtn, .profile .playstep { width: 22px; height: 18px; padding: 0; background: var(--btn); border: 1px solid var(--btn-b); }
.profile .playstep { width: 16px; }
.profile .playbtn:hover:not(:disabled), .profile .playstep:hover { background: var(--btn-hi); border-color: var(--accent); }
.profile .playbtn[aria-pressed="true"] { background: var(--btn-dn); border-color: var(--btn-dn-b); }
.profile .playbtn:disabled { opacity: .45; }
.profile .profileplay svg { width: 12px; height: 12px; display: block; margin: auto; fill: none; stroke: var(--accent); stroke-width: 1.5; }
.profile .profileplay svg .solid { fill: var(--accent); stroke: none; }
.profile .playscale { display: inline-flex; align-items: center; gap: 2px; margin-inline-start: 6px; }
.profile .playtimes { min-width: 44px; text-align: center; }
.profile .playtime { margin-inline-start: 8px; overflow: hidden; text-overflow: ellipsis; }
/* ---- the Weather panel and the wind -------------------------------------- */
.icelegend .wrow { display: flex; align-items: center; gap: 5px; height: 21px; margin-top: 4px; font-weight: 600; cursor: default; }
.icelegend .wrow input { margin: 0; }
.icelegend .wkey { margin: 2px 0 2px 19px; }
.icelegend .wkey[hidden] { display: none; }
/* the sky's own choices, under its tick: the look, the weather in it, and the hour it is drawn for */
.icelegend #skyKey select { width: 100%; margin: 2px 0 4px; }
.icelegend #skyKey .wrow { margin-left: 0; }
.icelegend .timerow { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.icelegend .timerow input { flex: 1; min-width: 0; }
.icelegend .sub { margin-bottom: 3px; color: var(--dim); }
.icelegend .scalebar { display: block; width: 170px; height: 10px; border: 1px solid #b9c3c9; }
.icelegend .scaletext { display: flex; justify-content: space-between; width: 172px; color: var(--dim); font-size: 11px; }
.icelegend .note[hidden] { display: none; }
.windflow { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.windflow[hidden] { display: none; }

/* ---- File, Search and Account in the toolbar (the menu bar is gone) ------ */
.toolbar button.square { padding-inline: 4px; }
.toolbar .grow { flex: 1; }
.toolbar .menu.open > button { background: var(--btn-dn); border-color: var(--btn-dn-b); }
.toolbar .menu > .dropdown { position: fixed; top: auto; inset-inline-start: auto; z-index: 45; }
.toolbar .dropdown button { width: 100%; height: 22px; gap: 24px; padding-block: 0; padding-inline: 24px 12px; border: none; }
.toolbar .dropdown button:hover:not(:disabled), .toolbar .dropdown button:focus { background: var(--menu-hi); border: none; outline: none; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
/* Where you are and where you can go: the button wears the sign of the workspace you are in, and
   opens to a column of every workspace's sign, yours among them and pressed. */
.toolbar .iconmenu { position: relative; }
.toolbar .iconmenu > .dropdown.icons { min-width: 0; padding: 2px 1px; box-sizing: border-box; }
.toolbar .dropdown.icons button {
  display: grid; place-items: center; width: 100%; height: 26px; padding: 0; gap: 0; margin: 1px 0;
  border: 1px solid transparent;
}
.toolbar .dropdown.icons button[aria-checked="true"] { background: var(--btn-dn); border-color: var(--btn-dn-b); }
.toolbar .dropdown.icons button[aria-checked="true"]::before { content: none; }
.toolbar .dropdown.icons button:hover:not([aria-checked="true"]) { background: var(--menu-hi); border-color: transparent; }
/* the Inventory's sets: the open one's name on the button, and the plus that adds one */
.toolbar .setmenu > button.setbtn { justify-content: center; min-width: 26px; max-width: 120px; padding-inline: 6px;
  overflow: hidden; text-overflow: ellipsis; font-weight: 600; color: var(--accent); }
.toolbar .setmenu .dropdown button { max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.toolbar .setmenu .invlist { display: flex; flex-direction: column; min-width: 150px; }
.toolbar .setmenu .invrow { position: relative; display: flex; align-items: center; gap: 4px; height: 22px; padding-inline: 2px 2px; cursor: default; background: var(--client); }
.toolbar .setmenu .invrow:hover { background: var(--menu-hi); }
.toolbar .setmenu .invrow.on { background: var(--btn-dn); }
.toolbar .setmenu .invrow.lifted { z-index: 1; background: var(--btn-hi); box-shadow: 0 2px 5px rgba(0, 0, 0, .22); }
.toolbar .setmenu .invrow .grip { display: inline-flex; width: 14px; height: 18px; align-items: center; justify-content: center; cursor: grab; }
.toolbar .setmenu .invrow .grip svg { width: 8px; height: 14px; fill: var(--dim); stroke: none; }
.toolbar .setmenu .invrow .invname { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.toolbar .setmenu .invrow input.invfield { flex: 1 1 auto; height: 18px; width: auto; min-width: 0; }
.toolbar .setmenu .dropdown button.invgone { flex: none; width: 18px; height: 18px; padding: 0; justify-content: center; border: 1px solid transparent; }
.toolbar .setmenu .dropdown button.invgone:hover { border-color: var(--accent); background: var(--btn-hi); }
.toolbar .setmenu .dropdown button.invgone svg { width: 10px; height: 10px; stroke: var(--text); stroke-width: 1.6; }
.toolbar .setmenu .dropdown button.invadd { gap: 6px; padding-inline-start: 6px; }
.toolbar .setmenu .dropdown button.invadd svg { width: 12px; height: 12px; stroke-width: 1.6; }

/* ---- Ground View panel: a photograph taken where the thing stands --------- */
.groundpanel {
  position: absolute;
  bottom: 28px;
  inset-inline-end: 48px;
  z-index: 3;
  width: 360px;
  height: 280px;
  min-width: 220px;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  padding: 6px 8px 6px;
  background: rgba(255, 255, 255, .92);
  border: 1px solid var(--frame);
  resize: both;
  overflow: hidden;
}
/* the panel is taken by its title: inside the picture the pointer belongs to the viewer, which
   turns, zooms and walks down the road with it */
.groundpanel .title { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; font-weight: 600;
  cursor: move; user-select: none; }
.groundpanel .title span { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.groundpanel .clear {
  width: 18px; height: 18px; padding: 0; line-height: 1; font: inherit; color: var(--text);
  background: var(--btn); border: 1px solid var(--btn-b); cursor: default;
}
.groundpanel .clear:hover { background: var(--btn-hi); border-color: var(--accent); }
.groundpanel .view { flex: 1; min-height: 0; background: #0c1116; border: 1px solid var(--hairline); cursor: default; user-select: auto; }
.groundpanel .view .mapillary-viewer { width: 100%; height: 100%; }
.groundpanel .said { margin-top: 4px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---- Labels panel: the languages the map's names are written in ----------- */
.labelspanel {
  position: absolute;
  top: 236px;                   /* under the Vehicle panel, opposite the Weather and State panels */
  inset-inline-end: 48px;
  z-index: 2;
  min-width: 150px;
  padding: 6px 8px;
  background: rgba(255, 255, 255, .92);
  border: 1px solid var(--frame);
  white-space: nowrap;
  cursor: move;
  user-select: none;
}
.mapwrap.has-selection .labelspanel:not(.moved) { top: 264px; }
.labelspanel .title { margin-bottom: 2px; font-weight: 600; }
.labelspanel .hint { margin-bottom: 3px; color: var(--dim); white-space: normal; max-width: 210px; }
.labelspanel label.check { display: flex; align-items: center; gap: 6px; cursor: default; }
.labelspanel label.check input { margin: 0; }
.labelspanel .row { display: flex; align-items: center; gap: 4px; margin: 2px 0; padding: 0 2px; }
.labelspanel .row .grow { flex: 1; }
.labelspanel .row.picked { background: var(--menu-hi); }
.labelspanel .arrows { margin-top: 5px; }
.labelspanel button.reset { width: 22px; height: 21px; padding: 0; font: inherit; color: var(--text); background: var(--btn); border: 1px solid var(--btn-b); }
.labelspanel button.reset:hover:not(:disabled) { background: var(--btn-hi); border-color: var(--accent); }
.labelspanel button.reset:disabled { color: var(--dim); }
.labelspanel button.reset svg { width: 12px; height: 12px; fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; display: block; margin: auto; }
.labelspanel button.reset:disabled svg { stroke: var(--dim); }

/* ---- Traits panel: what is selected, and everything known of it ---------- */
/* ---- the Scene and the Environment: how the map is drawn, and what is on it ---------- */
.scenepanel, .envpanel {
  position: absolute;
  bottom: 28px;
  inset-inline-start: 8px;
  z-index: 3;
  width: 250px;
  display: flex;
  flex-direction: column;
  padding: 6px 8px;
  background: rgba(255, 255, 255, .94);
  border: 1px solid var(--frame);
}
.scenepanel .title, .envpanel .title { margin-bottom: 4px; font-weight: 600; cursor: move; user-select: none; }
.scenepanel .row, .envpanel .row { display: flex; align-items: center; gap: 6px; margin-top: 4px; white-space: nowrap; }
.scenepanel label.check, .envpanel label.check { display: flex; align-items: center; gap: 5px; height: 21px; white-space: nowrap; }
.scenepanel select { font: inherit; }
.scenepanel .note, .envpanel .note { margin-top: 6px; color: var(--dim); white-space: normal; }
.scenepanel .sub { margin: 8px 0 2px; color: var(--dim); font-weight: 600; }
.scenepanel .hint { color: var(--dim); white-space: normal; margin-bottom: 3px; }
.scenepanel .labellist .row { display: flex; align-items: center; gap: 4px; }
.scenepanel .labellist .row.picked { background: var(--btn-hi); }
.scenepanel .labellist .grow { flex: 1; }
.scenepanel .arrows { display: flex; gap: 4px; margin-top: 3px; }
.scenepanel .reset { width: 20px; height: 18px; padding: 0; background: var(--btn); border: 1px solid var(--btn-b); cursor: pointer; }
.scenepanel .reset svg { width: 12px; height: 12px; fill: none; stroke: var(--text); stroke-width: 1.4; display: block; margin: auto; }
.scenepanel { max-height: calc(100% - 44px); overflow-y: auto; }

/* ---- the classes as the items of a menu, each opening its ticks to the side ------------ */
#viewPanel { max-height: calc(100vh - 56px); overflow-y: auto; }
#viewPanel .classlist { display: flex; flex-direction: column; margin: 7px 0 3px; }
#viewPanel .classrow {
  display: flex; align-items: center; gap: 6px; width: 100%; height: 21px; padding: 0 4px;
  font: inherit; color: var(--text); text-align: start; white-space: nowrap;
  background: none; border: 1px solid transparent; cursor: default;
}
#viewPanel .classrow:hover, #viewPanel .classrow.open { background: var(--btn-hi); border-color: var(--accent); }
#viewPanel .classrow .csign { display: block; width: 16px; height: 16px; flex: none; }
#viewPanel .classrow .csign svg {
  width: 16px; height: 16px; display: block;
  fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linecap: square;
}
#viewPanel .classrow .csign svg .solid { fill: var(--accent); stroke: none; }
#viewPanel .classrow .what { flex: 1; min-width: 0; }
#viewPanel .classrow .more { display: block; width: 10px; height: 10px; flex: none; }
#viewPanel .classrow .more svg { width: 10px; height: 10px; display: block; fill: none; stroke: var(--dim); stroke-width: 1.7; }
[dir="rtl"] #viewPanel .classrow .more svg { transform: scaleX(-1); }
.viewpanel.viewflyout { display: block; z-index: 21; padding: 6px 2px 7px; max-height: calc(100vh - 8px); overflow-y: auto; }
.viewpanel.viewflyout .col { min-width: 0; }
.viewpanel.viewflyout .foot { margin-top: 7px; padding-top: 6px; border-top: 1px solid var(--hairline); }

/* ---- the four states a layer stands in: locked, hidden, shown, faded ------------------ */
.viewpanel .staterow { display: flex; align-items: center; gap: 6px; margin: 1px 0; white-space: nowrap; }
.viewpanel .staterow .what { flex: 1; }
.viewpanel .states { display: grid; grid-template-rows: repeat(2, 11px); grid-auto-flow: column; gap: 1px; }
.viewpanel .states button {
  width: 13px; height: 11px; padding: 0; display: grid; place-items: center;
  background: none; border: 1px solid transparent; border-radius: 0; cursor: pointer;
}
.viewpanel .states button svg { width: 9px; height: 9px; fill: none; stroke: var(--dim); stroke-width: 1.6; stroke-linecap: square; }
.viewpanel .states button svg .solid { fill: var(--dim); stroke: none; }
.viewpanel .states button[aria-pressed="true"] { background: var(--btn-dn); border-color: var(--btn-dn-b); }
.viewpanel .states button[aria-pressed="true"] svg { stroke: var(--accent); }
.viewpanel .states button[aria-pressed="true"] svg .solid { fill: var(--accent); stroke: none; }
.viewpanel .states button:hover { border-color: var(--btn-b); }

/* ---- GNSS: where this machine says it is ------------------------------- */
.gnsspanel {
  position: absolute;
  bottom: 28px;
  inset-inline-start: 8px;
  z-index: 3;
  width: 268px;
  display: flex;
  flex-direction: column;
  padding: 6px 8px;
  background: rgba(255, 255, 255, .94);
  border: 1px solid var(--frame);
}
.gnsspanel .title { margin-bottom: 4px; font-weight: 600; cursor: move; user-select: none; }
.gnsspanel .grow { display: grid; grid-template-columns: 1fr auto auto; gap: 4px; align-items: center; margin-top: 4px; }
.gnsspanel .gname { font-weight: 600; }
.gnsspanel .gsaid { grid-column: 1 / -1; color: var(--dim); white-space: normal; }
.gnsspanel button {
  height: 20px; padding: 0 7px; font: inherit; color: var(--text); white-space: nowrap;
  background: var(--btn); border: 1px solid var(--btn-b); cursor: pointer;
}
.gnsspanel button:hover:not(:disabled) { background: var(--btn-hi); border-color: var(--accent); }
.gnsspanel button:disabled { color: var(--dim); cursor: default; }
.gnsspanel .note { margin-top: 6px; color: var(--dim); white-space: normal; }

.traitspanel {
  position: absolute;
  top: 8px;
  inset-inline-end: 48px;       /* down the right of the map, clear of its own controls */
  z-index: 4;
  width: 248px;
  height: calc(100% - 44px);    /* portrait: the traits of a path or a point run long */
  min-width: 180px;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  padding: 6px 8px;
  /* solid, where the small floating legends are see-through: this one is read, and it stands over
     whatever panel is behind it */
  background: #ffffff;
  border: 1px solid var(--frame);
  resize: both;
  overflow: hidden;
}
.traitspanel .title { margin-bottom: 4px; font-weight: 600; cursor: move; user-select: none; }
/* the Path Monitor and the ground picture, standing in the panel's foot rather than on their own */
.traitspanel .inpanel {
  position: static; inset: auto; width: auto; height: 146px; min-height: 0; min-width: 0;
  flex: none; margin-top: 6px; margin-bottom: 2px; padding: 0;
  background: none; border: none; box-shadow: none; z-index: auto; resize: none; overflow: hidden;
}
/* the picture keeps the shape it has when the panel is at its narrowest, whatever width it is
   given afterwards: a window on the world, not a strip */
.traitspanel #traitsGround { height: auto; overflow: visible; }
.traitspanel #traitsGround .view { flex: none; height: auto; aspect-ratio: 4 / 3; }
.traitspanel .inpanel .title { margin-bottom: 3px; cursor: default; }
/* a fold of the Traits panel: its name, with a mark that turns down when it is open */
.traitspanel .fold { display: flex; align-items: center; gap: 6px; width: 100%; margin: 4px 0 3px; padding: 1px 0;
  font: inherit; font-weight: 600; color: var(--text); text-align: start; background: none; border: none; cursor: default; }
.traitspanel .fold::before { content: ''; flex: none; width: 0; height: 0; border-style: solid; border-width: 4px 0 4px 6px;
  border-color: transparent transparent transparent currentColor; transition: transform .12s; }
[dir="rtl"] .traitspanel .fold::before { transform: scaleX(-1); }
.traitspanel .fold[aria-expanded="true"]::before { transform: rotate(90deg); }
.traitspanel .fold:hover { color: var(--accent); }
.traitspanel .fold[hidden], .traitspanel .foldbody[hidden] { display: none; }
.traitspanel .foldbody { display: flex; flex-direction: column; margin-bottom: 4px; }
.traitspanel .detailview { position: relative; overflow: hidden; background: #000; }
.traitspanel .detailview .cesium-viewer-bottom { font-size: 9px; }
.traitspanel .pathview { background: #8fb4de; }
.traitspanel .pathview .pathstill { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }
.traitspanel .pathview .pathstill[hidden] { display: none; }
.pathahead { position: absolute; left: 0; top: 0; visibility: hidden; pointer-events: none; }
.pathviewset { display: grid; grid-template-columns: auto 80px 80px 80px; gap: 3px 10px; align-items: center; margin: 2px 0 8px; }
.pathviewset .head { color: var(--dim); font-size: 11px; }
.pathviewset input { width: 72px; }
/* the eye on the map where a path is being looked at, in Ground View and Detail View */
.vieweye { width: 24px; height: 24px; border-radius: 50%; background: #1a3a6b; border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0, 0, 0, .35);
  display: flex; align-items: center; justify-content: center; pointer-events: none; }
.vieweye svg { width: 16px; height: 16px; fill: none; stroke: #fff; stroke-width: 1.3; }
.vieweye svg .solid { fill: #fff; stroke: none; }
/* an action's Traits: its orders, the actions to choose from, and the packages it is done with */
.traitspanel .actlist { display: flex; flex-direction: column; max-height: 120px; overflow: auto; margin: 3px 0 6px; border: 1px solid var(--hairline); }
.traitspanel .actitem { text-align: start; padding: 3px 6px; font: inherit; color: var(--text); background: none; border: none; cursor: default; }
.traitspanel .actitem:hover { background: var(--btn-hi); }
.traitspanel .actitem.on { background: rgba(232, 163, 23, .22); font-weight: 600; }
.traitspanel .actgridbox { position: relative; width: 100%; margin: 3px 0 6px; border: 1px solid var(--hairline); background: #f4f4f4; }
.traitspanel .actgrid { display: block; touch-action: none; cursor: default; }
.traitspanel .tnote { color: var(--dim); margin: 2px 0; }
/* a menu item's own sign, before its words */
#ctxMenu .micon { display: inline-flex; width: 16px; height: 16px; margin-inline-end: 6px; vertical-align: -3px; }
#ctxMenu .micon svg { width: 16px; height: 16px; }
.traitspanel .inpanel .profiletitle { cursor: default; }
.traitspanel .inpanel .clear {
  width: auto; height: 18px; padding: 0 7px; font: inherit; color: var(--text); cursor: pointer;
  background: var(--btn); border: 1px solid var(--btn-b); border-radius: 0; flex: none;
}
.traitspanel.narrow .inpanel { height: 120px; }
.traitspanel .body { flex: 1 1 auto; min-height: 30px; overflow-y: auto; overflow-x: hidden; user-select: text; cursor: default; }
.traitspanel .tnone { color: var(--dim); white-space: normal; }
/* the head - the title and its sign, and a path's two ends - stays while the traits scroll under it */
.traitspanel .thead { display: flex; align-items: flex-start; gap: 6px; margin-bottom: 5px;
  position: sticky; top: 0; z-index: 1; background: #ffffff; padding-top: 1px; }
.traitspanel .tends { position: sticky; top: 42px; z-index: 1; background: #ffffff; }
.traitspanel .thead .flag { width: 32px; height: auto; border: 1px solid var(--hairline); }
.traitspanel .tnames { min-width: 0; }
.traitspanel .tname { font-weight: 600; white-space: normal; overflow-wrap: anywhere; }
/* a title that is typed in: the title as it stands, a box only while it is pointed at or typed in */
.traitspanel .tnames.named { flex: 1 1 auto; }
.traitspanel .thead .tedit {
  display: block; box-sizing: border-box; width: calc(100% + 4px); height: auto; margin: -1px 0 0 -4px; padding: 0 3px;
  font: inherit; font-weight: 600; line-height: inherit; color: var(--text); background: transparent;
  border: 1px solid transparent; border-radius: 0; outline: none; resize: none; overflow: hidden; cursor: text;
}
.traitspanel .thead .tedit:hover { border-color: var(--field-b); }
.traitspanel .thead .tedit:focus { border-color: var(--accent); background: var(--field); }
.traitspanel .thead .tedit::placeholder { color: var(--text); opacity: 1; }
.traitspanel .twhat { color: var(--dim); white-space: normal; }
.traitspanel .ticon { flex: none; image-rendering: auto; }
.traitspanel .thead span.ticon { display: inline-flex; width: 18px; height: 18px; align-items: center; }
.traitspanel .thead span.ticon svg { width: 18px; height: 18px; fill: none; stroke: var(--accent); stroke-width: 1.5; stroke-linecap: square; }
.traitspanel .thead span.ticon svg .solid { fill: var(--accent); stroke: none; }
.traitspanel .tends { margin-bottom: 5px; padding-bottom: 4px; border-bottom: 1px solid var(--hairline); }
.traitspanel .tend { display: flex; align-items: center; gap: 4px; margin: 2px 0; }
.traitspanel .tend .tval { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.traitspanel .tbtn {
  padding: 0 5px; height: 19px; font: inherit; color: var(--text);
  background: var(--btn); border: 1px solid var(--btn-b); cursor: default;
}
.traitspanel .tbtn:hover { background: var(--btn-hi); border-color: var(--accent); }
.traitspanel .tbtn.wide { width: 100%; margin-top: 3px; }
.traitspanel .ttable { display: grid; grid-template-columns: auto 1fr; gap: 1px 8px; align-items: baseline; }
.traitspanel .trait { display: contents; }
.traitspanel .tkey { color: var(--dim); white-space: nowrap; }
.traitspanel .tval { white-space: normal; overflow-wrap: anywhere; }
.traitspanel .tval.none { color: var(--dim); }

/* The weather in the sky (Map Settings > Advanced > Sky), behind the map: clouds drifting, rain
   falling. Only transforms move. */
.sky-weather { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.sky-clouds { position: absolute; top: 0; left: 0; width: calc(100% + 1024px); height: 100%;
              background-size: 1024px 512px; animation: sky-drift 300s linear infinite; }
.sky-rain { position: absolute; left: 0; top: -256px; width: 100%; height: calc(100% + 256px);
            animation: sky-fall 0.45s linear infinite; }
.sky-rain.far { top: -128px; height: calc(100% + 128px); background-size: 128px 128px; opacity: 0.55;
                animation: sky-fall-far 0.7s linear infinite; }
@keyframes sky-drift { to { transform: translateX(-1024px); } }
@keyframes sky-fall { to { transform: translateY(256px); } }
@keyframes sky-fall-far { to { transform: translateY(128px); } }
@media (prefers-reduced-motion: reduce) { .sky-clouds, .sky-rain { animation: none; } }

/* ---- the Nodes workspace: the same project seen as what is joined to what ---------------- */
/* It lies over the map, which keeps its place underneath as the atlas does. The grid is the
   background, scaled and slid with the view, so a node snaps to a line of it at any zoom. */
.nodeswork {
  position: absolute; inset: 0; z-index: 2; overflow: hidden; background: #f4f4f4;
  background-image: linear-gradient(to right, rgba(0, 0, 0, .07) 1px, transparent 1px),
                    linear-gradient(to bottom, rgba(0, 0, 0, .07) 1px, transparent 1px);
  cursor: crosshair; touch-action: none; user-select: none;
}
.nodeswork .node, .nodeswork .node .box, .nodeswork .node .said, .nodeswork .node .br { cursor: crosshair; }
.nodeswork .node input { cursor: text; }
body.navigating .nodeswork, body.navigating .nodeswork .node,
body.navigating .nodeswork .node .box, body.navigating .nodeswork .node .plug { cursor: none !important; }
.mapwrap.nodes-on #map, .mapwrap.nodes-on #atlas, .mapwrap.nodes-on .atlasnav { visibility: hidden; }
.mapwrap.loco-on #map, .mapwrap.loco-on #atlas, .mapwrap.loco-on .atlasnav { visibility: hidden; }
/* Locomotion: the workspace for what a trip is made with. Nothing in it yet but the saying so. */
.locowork { position: absolute; inset: 0; z-index: 3; background: #f4f4f4; overflow: auto; }
/* the one cross every workspace is pointed in, as the map and Nodes are */
.lococanvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: crosshair; touch-action: none; }
/* a light shows against the dark, not against the page */
.solarwork { background: #000000; }
/* What is chosen in Solar or the cargo, set by hand in Traits: a field to a row, the label first */
.traitspanel .cust { margin-bottom: 6px; }
.traitspanel .cust .row { display: flex; align-items: center; gap: 4px; margin-top: 4px; }
.traitspanel .cust .row .what { flex: none; min-width: 64px; color: var(--dim); }
.traitspanel .cust .row input, .traitspanel .cust .row select { width: 72px; min-width: 0; font: inherit; }
.traitspanel .cust .row select { width: auto; }
.traitspanel .cust .row.wide input, .traitspanel .cust .row.wide textarea { flex: 1 1 auto; width: auto; }
.traitspanel .cust .row textarea { resize: vertical; font: inherit; }
.traitspanel .cust .row input[type="color"] { flex: 0 0 44px; width: 44px; padding: 0; height: 20px; }
.traitspanel .cust .row .axis { font-weight: 600; font-size: 11px; }
/* three numbers to a row: the label over them, so each has room for what it holds */
.traitspanel .cust .row.three { flex-wrap: wrap; }
.traitspanel .cust .row.three .what { flex: 0 0 100%; }
.traitspanel .cust .row.three input { flex: 1 1 0; width: 0; }
.traitspanel .cust .row .unit { color: var(--dim); }
.traitspanel .cust .check { display: flex; align-items: center; gap: 4px; margin-top: 4px; }
/* a part of what is known of it under a heading of its own: a sensor's readings */
.traitspanel .tsub { margin: 8px 0 3px; padding-top: 6px; border-top: 1px solid var(--hairline); font-weight: 600; }
.solarpanel .additem {
  display: flex; align-items: center; gap: 8px; width: 100%; height: 24px; padding: 0 6px;
  font: inherit; color: var(--text); text-align: start; background: none; border: 1px solid transparent; cursor: default;
}
.solarpanel .additem:hover { background: var(--btn-hi); border-color: var(--accent); }
.binpackpanel { width: 240px; }
.binpackpanel label.check { display: flex; align-items: center; gap: 5px; height: 21px; white-space: nowrap; }
/* a panel asked for while open already shows where it is */
.floatpanel.called { animation: panelcalled .8s ease-out; }
@keyframes panelcalled { 0% { box-shadow: 0 0 0 3px var(--accent); } 100% { box-shadow: 0 0 0 0 rgba(42, 63, 143, 0); } }
.binpackpanel .row select { flex: 1; min-width: 0; font: inherit; }
.binpackpanel .row button { height: 23px; padding: 0 14px; font: inherit; }
.binpackpanel .note.said { color: var(--text); }
/* the Container panel starts at the other side from Binpack, so the two never open one over the other */
.containerpanel { inset-inline-start: auto; inset-inline-end: 8px; }
.containerpanel .row > span:first-child { min-width: 76px; }
.containerpanel .row input { width: 70px; min-width: 0; font: inherit; }
.containerpanel .row .unit { color: var(--dim); }
.mapwrap.solar-on #map, .mapwrap.solar-on #atlas, .mapwrap.solar-on .atlasnav { visibility: hidden; }
/* Property: the place fills the workspace, the address bar over its top corner */
.mapwrap.property-on #map, .mapwrap.property-on #atlas, .mapwrap.property-on .atlasnav { visibility: hidden; }
.propertywork { background: #0d0f12; overflow: hidden; }
.propertywork .propmap { position: absolute; inset: 0; cursor: crosshair; touch-action: none; }
.propertywork .propbar {
  position: absolute; top: 8px; inset-inline-start: 8px; z-index: 4; display: flex; gap: 4px; align-items: center;
  padding: 4px; background: var(--client); border: 1px solid var(--menu-b); box-shadow: 2px 2px 3px rgba(0, 0, 0, .18);
}
.propertywork .propbar input { width: min(360px, 52vw); height: 23px; font: inherit; }
.propertywork .propbar select { height: 23px; font: inherit; }
.propertywork .propbar button { height: 23px; padding: 0 14px; font: inherit; }
/* Solar's Property: the 3D property fills Solar's workspace */
.solarwork .solarsite { position: absolute; inset: 0; background: #000000; }
.solarwork .solarsite .sitenote {
  position: absolute; top: 8px; inset-inline-start: 8px; z-index: 2; max-width: min(520px, 80vw); padding: 4px 8px; color: #ffffff; background: rgba(0, 0, 0, .6);
}
.traitspanel .cust .row input[type="date"], .traitspanel .cust .row input[type="time"] { width: auto; }
/* the suggestions under the address box, as it is typed */
.propertywork .propsuggest {
  position: absolute; top: 100%; inset-inline-start: 4px; z-index: 3; width: min(360px, 52vw); margin-top: 2px;
  background: var(--client); border: 1px solid var(--menu-b); box-shadow: 2px 2px 3px rgba(0, 0, 0, .18);
}
.propertywork .propsuggest button {
  display: block; width: 100%; height: auto; padding: 3px 6px; font: inherit; text-align: start; color: var(--text); background: none; border: 0;
}
.propertywork .propsuggest button:hover, .propertywork .propsuggest button.on { background: var(--menu-hi); }
.propertywork .propsuggest .main { display: block; }
.propertywork .propsuggest .sub { display: block; font-size: 11px; color: var(--dim); }
/* Developer Settings: a key on a row of its own, with the button that tries it */
#devSettingsDialog .devrow { display: flex; align-items: center; gap: 6px; }
#devSettingsDialog .devrow label { flex: none; width: auto; white-space: nowrap; text-align: start; }
#devSettingsDialog .devrow input { flex: 0 1 230px; width: 230px; min-width: 120px; font: inherit; }
#devSettingsDialog .devrow button { padding: 0 12px; font: inherit; }
#devSettingsDialog .devresult { white-space: pre-line; min-height: 1.3em; color: var(--text); max-width: 460px; overflow-wrap: anywhere; }
#devSettingsDialog .note { max-width: 460px; }
.viewpanel .note { color: var(--dim); font-size: 11px; max-width: 240px; }
.propertywork .cesium-viewer-bottom { inset-inline-end: 0; }
/* the place's own bar, once the search gives way: its address, Select and Another */
.propertywork .propplace .propname { max-width: min(380px, 50vw); padding: 0 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.propertywork .propplace button[aria-pressed="true"] { background: var(--btn-dn); border-color: var(--btn-dn-b); }
.propertywork.selecting .propmap, .propertywork.selecting .propmap canvas { cursor: crosshair; }
/* what to do with a box drawn: delete it, ask for another place, or commit it */
.propertywork .propchoose {
  position: absolute; z-index: 5; display: flex; gap: 4px; padding: 4px;
  background: var(--client); border: 1px solid var(--menu-b); box-shadow: 2px 2px 3px rgba(0, 0, 0, .18);
}
.propertywork .propchoose button { height: 23px; padding: 0 12px; font: inherit; }
.propertywork .propchoose .propcommit { font-weight: 600; }
.propertywork .propsuggest .by { padding: 2px 6px; font-size: 10px; color: var(--dim); text-align: end; }
.propertywork .propnote {
  position: absolute; top: 46px; inset-inline-start: 8px; z-index: 2; max-width: min(520px, 80vw); padding: 4px 8px;
  color: #ffffff; background: rgba(0, 0, 0, .6);
}
.locopanel .field { display: flex; align-items: center; gap: 6px; padding: 2px 6px; }
.locopanel .field { align-items: flex-start; }
.locopanel .field input, .locopanel .field textarea { flex: 1 1 auto; min-width: 0; }
.locopanel .field textarea { resize: vertical; font: inherit; }
.locopanel button[disabled] { color: var(--dim); }
.locopanel .field input[type="color"] { flex: 0 0 44px; padding: 0; height: 20px; }
.locopanel .field .unit { flex: 0 0 auto; color: var(--dim); }
/* box or bag, side by side */
.locopanel .field.shapes { align-items: center; }
.locopanel .field.shapes .choice { display: inline-flex; align-items: center; gap: 3px; margin-inline-start: 6px; }
.locopanel .field[hidden] { display: none; }
.nodeswork .wires { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; }
.nodeswork .nodelayer { position: absolute; inset: 0; pointer-events: none; }

/* A node: the sign of its kind above, then the rounded box - grey angle brackets round a white
   field. Empty, the field is typed into and searches that kind alone; once a place is chosen the
   node is that place and the field is read only. */
.node { position: absolute; pointer-events: auto; transform-origin: 50% 50%; display: flex; flex-direction: column; align-items: center; }
.node .sign { position: relative; width: 24px; height: 22px; margin-bottom: 0; display: grid; place-items: center; border-radius: 50%; }
.node .sign img { width: 18px; height: 18px; display: block; image-rendering: auto; -webkit-user-drag: none; user-select: none; pointer-events: none;
  transition: transform 90ms ease; }
.node { --glow: #ffd21f; }
.node:hover .sign, .node.lit .sign { box-shadow: 0 0 7px 3px var(--glow); background: color-mix(in srgb, var(--glow) 35%, transparent); }
.node:hover .sign img, .node.lit .sign img { transform: scale(1.18); }
.node.picked .sign { box-shadow: 0 0 0 2px #000000; }
.node.target .sign { box-shadow: 0 0 0 2px #e67e22; }
/* a node with no place yet: a field under its sign to find one with, and nothing else */
.node .box {
  position: relative; display: flex; align-items: center; justify-content: center;
  min-width: 70px; max-width: none; height: 22px; margin-top: 3px; padding: 0 3px;
  background: var(--client); border: 1px solid var(--btn-b); border-radius: 7px; box-shadow: 1px 1px 2px rgba(0, 0, 0, .14);
  cursor: default;
}
.node .box, .node:not(.named) .box { width: auto; }
.node.named .box { display: none; }
.node.picked .box { border-color: #000000; box-shadow: 0 0 0 1px #000000; }
.node.target .box { border-color: #e67e22; box-shadow: 0 0 0 1px #e67e22; }
.node .br { color: var(--dim); font-style: normal; white-space: nowrap; }
.node input {
  flex: none; min-width: 0; height: 18px; padding: 0 3px; font: inherit; color: var(--text);
  text-align: center; background: #ffffff; border: 1px solid var(--hairline);
}
.node .plug {
  position: absolute; top: 50%; width: 9px; height: 9px; margin-top: -4.5px; border-radius: 50%;
  background: var(--client); border: 1px solid var(--btn-b); cursor: crosshair;
}
.node .plug.mark {
  inset-inline-start: auto; inset-inline-end: auto; top: auto;
  width: 13px; height: 13px; margin: -6.5px 0 0 -6.5px;
  background: none; border: 0; border-radius: 0;
}
/* The body of a circle, drawn as one stroked shape. Where two meet, the straight edge is part of
   that same outline - the same stroke at every angle and every zoom, rather than a hairline laid
   across them that antialiasing thickened wherever it fell between two rows of pixels. */
.node .mark { display: grid; place-items: center; color: #555555; }
.node .mark .disc {
  position: absolute; inset: 0; width: 13px; height: 13px; overflow: visible; pointer-events: none;
}
.node .mark .disc path { fill: #ffffff; stroke: #767676; stroke-width: 1; }
.node .mark .ch { position: relative; }
.node .mark .ch { display: block; width: 10px; height: 10px; }
.node .mark .ch svg { display: block; width: 10px; height: 10px; }
.node .mark .ch path {
  fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
/* the shape carries every colour a circle takes: the box behind it stays out of it, in every state */
.node .plug.mark:hover, .node .plug.mark.held, .node .plug.mark.lit, .node .plug.mark.no {
  background: none; border-color: transparent;
}
.node .plug:hover .disc path, .node .plug.held .disc path { fill: #000000; stroke: #000000; }
.node .plug.mark:hover, .node .plug.mark:hover .ch { color: #ffffff; }
/* the circle a wire is being drawn from: black for as long as the wire is in hand */
.node .plug.mark.held, .node .plug.mark.held .ch { color: #ffffff; }
/* The circle a wire would meet: black where it can be met, red where it can not. These stand after
   the hover, which is otherwise as strong a rule and would win by coming later - so the circle
   under the pointer said the wrong thing, and red was never seen at all. */
.node .plug.lit, .node .plug.lit:hover, .node .plug.no, .node .plug.no:hover,
.node .plug:hover, .node .plug.held { color: #ffffff; }
.node .plug.lit .disc path, .node .plug.lit:hover .disc path { fill: #000000; stroke: #000000; }
.node .plug.no .disc path, .node .plug.no:hover .disc path { fill: #e0302a; stroke: #e0302a; }
.node .hits {
  position: absolute; top: 27px; inset-inline-start: 0; z-index: 2; width: 220px; max-height: 190px; overflow: auto;
  background: #ffffff; border: 1px solid var(--menu-b); box-shadow: 2px 2px 3px rgba(0, 0, 0, .18);
}
.node .hits div { padding: 1px 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.node .hits div.on, .node .hits div:hover { background: var(--accent); color: #ffffff; }
.node .hits .note { color: var(--dim); cursor: default; }
.node .hits .note:hover { background: none; color: var(--dim); }

/* the Nodes menu is the View eye's panel in all but its rows, which add rather than show */
.nodespanel button.add { display: block; width: 100%; height: 21px; text-align: start; padding: 0 4px; border-color: transparent; background: none; }
.nodespanel button.add:hover { background: var(--btn-hi); border-color: var(--btn-b); }
.nodespanel button.add svg { width: 11px; height: 11px; margin-inline-end: 4px; fill: none; stroke: var(--text); stroke-width: 1.6; vertical-align: -1px; }

/* what runs from a place and what runs to it: a count that opens into a list of their own signs */
.traitspanel .routed { display: contents; }
.traitspanel .routed .rmark {
  display: flex; align-items: center; gap: 6px; min-width: 0; padding: 0 2px;
  font: inherit; color: inherit; text-align: start; background: none; border: 1px solid transparent; cursor: pointer;
}
.traitspanel .routed .rmark::after {
  content: ''; flex: none; width: 0; height: 0; margin-inline-start: 2px;
  border: 3px solid transparent; border-inline-start-color: var(--dim);
}
.traitspanel .routed.open .rmark::after {
  border-inline-start-color: transparent; border-top-color: var(--dim); margin-block-start: 3px;
}
.traitspanel .routed .rmark:hover { background: var(--btn-hi); border-color: var(--btn-b); }
.traitspanel .routed .rlist { grid-column: 1 / -1; padding: 1px 0 3px 10px; }
.traitspanel .routed .rrow { display: flex; align-items: center; gap: 2px; }
.traitspanel .routed .rpick {
  display: flex; align-items: center; gap: 5px; flex: 1; min-width: 0; height: 18px; padding: 0 4px;
  font: inherit; color: inherit; text-align: start; background: none; border: 1px solid transparent; cursor: pointer;
}
.traitspanel .routed .rpick img { width: 14px; height: 14px; flex: none; }
.traitspanel .routed .rpick .rline { width: 14px; height: 14px; flex: none; }
.traitspanel .routed .rpick .rline path { fill: none; stroke-width: 2.2; stroke-linecap: round; }
.traitspanel .routed .rname { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.traitspanel .routed .rgo {
  flex: none; width: 18px; height: 18px; font: inherit; color: var(--dim); line-height: 1;
  background: none; border: 1px solid transparent; cursor: pointer;
}
.traitspanel .routed .rpick:hover, .traitspanel .routed .rgo:hover { background: var(--btn-hi); border-color: var(--btn-b); }
.traitspanel .routed .rgo:hover { color: var(--text); }

/* a switch that has nothing to act on: it is still there, and plainly not to be had */
.envpanel .check.off { color: var(--dim); }
.envpanel .check.under { margin-left: 19px; }
.envpanel .check.under.deeper { margin-left: 38px; }
/* out to the Sun: behind the map, and the page's sky behind that */
.space-view { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.space-view[hidden] { display: none; }
.spaced .profile-mark { visibility: hidden; }
.envpanel .check.off input { opacity: .5; }

/* the cache's limit, in Account Settings */
#accountSettingsDialog .cacherow { display: flex; align-items: center; gap: 6px; }
#accountSettingsDialog .renderrow { display: flex; align-items: center; gap: 6px; }
#accountSettingsDialog .pathwaitrow { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; margin-bottom: 8px; }
#accountSettingsDialog .pathwaitrow label { white-space: nowrap; }
#accountSettingsDialog .pathwaitrow .checkrow { flex-basis: 100%; margin: 0; }
#accountSettingsDialog .pathwaitrow input[type="number"] { width: 70px; }
#accountSettingsDialog .renderrow input { width: 70px; }
#accountSettingsDialog .cacherow input { width: 70px; }
#accountSettingsDialog .cacherow button { margin-inline-start: auto; }

/* ---- the Vehicle workspace: the vehicle open, large, in its purple ------------------------------- */
.vehwork { display: flex; align-items: center; justify-content: center; background: var(--client); }
.vehwork[hidden] { display: none; }
.vehstage { display: flex; flex-direction: column; align-items: center; gap: 12px; user-select: none; pointer-events: none; }
.vehstage svg { width: 200px; height: 200px; fill: none; stroke: #8e44ad; stroke-width: 1.1; stroke-linecap: round; stroke-linejoin: round;
  filter: drop-shadow(0 0 10px rgba(142, 68, 173, .55)); }
.vehstage .vname { font-size: 18px; font-weight: 600; color: var(--text); }
.vehstage .vkind { color: var(--dim); }
