:root {
  /* Tactile Solutions palette (tactilesolutions.io) */
  --bg: #13232f; --panel: #142e40; --panel-2: #1c3a50; --line: rgba(197, 216, 231, .16);
  --text: #ffffff; --muted: rgba(197, 216, 231, .72); --accent: #fffc53;
  --good: #3fb67a; --fair: #e2c341; --poor: #ee8a35; --crit: #e5484d; --none: #13232f;   /* stations: brand navy, never a severity colour */
  --topbar: 56px; --panel-w: 320px;
  font-family: "Helvetica Neue", Arial, sans-serif;
}
h1, #title, .pano-head #panoTitle, button, .tool { font-family: "Inter Tight", "Helvetica Neue", Arial, sans-serif; }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); overflow: hidden; }
button { font: inherit; color: inherit; }

#topbar { position: fixed; inset: 0 0 auto 0; height: var(--topbar); display: flex; align-items: center; gap: 12px;
  padding: 0 12px; background: var(--panel); border-bottom: 1px solid var(--line); z-index: 20; }
.titles { flex: 1; min-width: 0; }
#title { font-size: 16px; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#subtitle { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tools { display: flex; gap: 6px; }
.tool, .icon-btn { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 7px 11px;
  cursor: pointer; font-size: 13px; text-decoration: none; color: var(--text); white-space: nowrap; }
.tool:hover, .icon-btn:hover { border-color: var(--accent); }
.tool[aria-pressed="true"] { background: color-mix(in srgb, var(--accent) 22%, var(--panel-2)); border-color: var(--accent); }
.tool.small { padding: 4px 8px; font-size: 12px; }
.icon-btn { font-size: 18px; padding: 4px 10px; }

#panel { position: fixed; top: var(--topbar); bottom: 0; left: 0; width: var(--panel-w); background: var(--panel);
  border-right: 1px solid var(--line); display: flex; flex-direction: column; z-index: 15;
  transform: translateX(-100%); transition: transform .2s ease; }
body.panel-open #panel { transform: none; }
#search { margin: 12px; padding: 9px 11px; border-radius: 8px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }
#count { font-size: 12px; color: var(--muted); padding: 0 14px 8px; }
#list { list-style: none; margin: 0; padding: 0 8px 12px; overflow-y: auto; flex: 1; }
#list li { display: grid; grid-template-columns: 96px 1fr; grid-template-rows: auto auto; gap: 4px 10px; padding: 8px;
  border-radius: 10px; }
#list li:hover { background: var(--panel-2); }
#list img { width: 96px; height: 48px; object-fit: cover; border-radius: 6px; grid-row: span 2; background: #000; }
#list .t { font-weight: 600; font-size: 14px; }
#list .e { font-size: 12px; color: var(--muted); }
#list .acts { grid-column: 2; display: flex; gap: 6px; }

#stage { position: fixed; top: var(--topbar); bottom: 0; right: 0; left: 0; transition: left .2s ease; }
body.panel-open #stage { left: var(--panel-w); }
#canvasHost, #canvasHost canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
#markers { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
#measureSvg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
#measureSvg line { stroke: var(--accent); stroke-width: 2; }
#measureSvg circle { fill: var(--accent); }
#measureSvg text { fill: #fff; font-size: 13px; font-weight: 600; text-anchor: middle; paint-order: stroke; stroke: #000; stroke-width: 3px; }

.marker { position: absolute; left: 0; top: 0; pointer-events: auto; background: none; border: 0; padding: 0; cursor: pointer; }
.marker .ring { display: block; width: 26px; height: 26px; border-radius: 50%; border: 3px solid #fff;
  background: var(--mc, var(--none)); box-shadow: 0 1px 6px rgba(0,0,0,.6); }
.marker .ring::after { content: "360"; display: block; font-size: 8px; font-weight: 800; color: #111; text-align: center; line-height: 20px; }
.marker .lbl { position: absolute; left: 32px; top: 2px; white-space: nowrap; font-size: 12px; background: rgba(0,0,0,.72);
  padding: 3px 7px; border-radius: 6px; opacity: 0; transition: opacity .15s; pointer-events: none; }
.marker:hover .lbl, .marker:focus .lbl { opacity: 1; }
.marker.pulse .ring { animation: pulse 0.6s ease-in-out 3; }
@keyframes pulse { 50% { transform: scale(1.5); } }
.c-good { --mc: var(--good); } .c-fair { --mc: var(--fair); } .c-poor { --mc: var(--poor); }
.c-crit { --mc: var(--crit); } .c-none { --mc: var(--none); }
.badge { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--mc); color: #111; font-weight: 600; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--none); border: 2px solid #fff; vertical-align: -1px; }

#loading { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px;
  background: rgba(21,23,27,.85); transition: opacity .4s; color: var(--muted); text-align: center; padding: 16px; }
#loading.done { opacity: 0; pointer-events: none; }
.spinner { width: 34px; height: 34px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
#help { position: absolute; left: 12px; bottom: 12px; font-size: 12px; color: var(--muted); background: rgba(0,0,0,.45);
  padding: 6px 10px; border-radius: 8px; max-width: calc(100% - 24px); }
#toast { position: absolute; left: 50%; top: 14px; transform: translateX(-50%); background: rgba(0,0,0,.8); padding: 8px 14px;
  border-radius: 8px; font-size: 13px; opacity: 0; transition: opacity .2s; pointer-events: none; }
#toast.show { opacity: 1; }
#credit { position: fixed; right: 10px; bottom: 8px; font-size: 11px; color: var(--muted); z-index: 5; pointer-events: none; }

#panoModal { position: fixed; inset: 0; z-index: 50; background: #000; display: flex; flex-direction: column; }
#panoModal[hidden] { display: none; }
.pano-head { display: flex; align-items: center; gap: 12px; padding: 8px 12px; background: var(--panel); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.pano-titles { flex: 1; min-width: 180px; }
#panoTitle { font-weight: 600; }
#panoMeta { font-size: 12px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.pano-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
#panoHeading { font-variant-numeric: tabular-nums; font-size: 13px; color: var(--accent); min-width: 64px; text-align: right; }
#panoNotes { padding: 8px 12px; font-size: 13px; background: var(--panel-2); border-bottom: 1px solid var(--line); white-space: pre-wrap; }
#panoNotes[hidden] { display: none; }
#panoHost { flex: 1; position: relative; min-height: 0; }

@media (max-width: 800px) {
  #panel { width: min(88vw, var(--panel-w)); }
  body.panel-open #stage { left: 0; }
  .tools .tool { padding: 6px 8px; font-size: 12px; }
  #btnHome { display: none; }
  #help { font-size: 11px; left: 8px; right: 8px; bottom: 28px; text-align: center; }   /* above the credit line */
}
/* phones (Rob, 2026-10-06: the top bar was cut off): two rows, the title on the first, the buttons on the second,
   sliding sideways when they do not all fit */
@media (max-width: 800px) {
  :root { --topbar: calc(96px + env(safe-area-inset-top, 0px)); }
  #topbar { flex-wrap: wrap; align-content: center; row-gap: 6px; gap: 8px; padding: env(safe-area-inset-top, 0px) 10px 0; }
  #topbar .titles { flex: 1 1 0; }
  #topbar .tools { flex: 1 0 100%; order: 3; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch;
    padding-bottom: 2px; }
  #topbar .tools::-webkit-scrollbar { display: none; }
  #topbar .tools > * { flex-shrink: 0; }
  #btnCover { display: none !important; }
}

/* 360 -> 360 links (Street-View style): one per nearby station, in its true direction */
.pano-links { position: absolute; inset: 0; pointer-events: none; z-index: 5; overflow: hidden; }
.pano-link { position: absolute; left: 0; top: 0; pointer-events: auto; cursor: pointer; background: none; border: 0;
  padding: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; visibility: hidden; }
.pano-link .dot { width: 34px; height: 34px; border-radius: 50%; border: 3px solid #fff; background: rgba(20, 22, 26, .55);
  box-shadow: 0 0 0 2px rgba(0, 0, 0, .45), 0 2px 10px rgba(0, 0, 0, .5); transition: transform .12s, background .12s; }
.pano-link:hover .dot { transform: scale(1.25); background: rgba(20, 22, 26, .9); }
.pano-link .lbl { font: 600 11px/1.2 system-ui, sans-serif; color: #fff; background: rgba(0, 0, 0, .6); padding: 2px 6px;
  border-radius: 8px; white-space: nowrap; opacity: 0; transition: opacity .12s; }
.pano-link:hover .lbl { opacity: 1; }
.pano-hint { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); z-index: 6; pointer-events: none;
  font: 12px/1.3 system-ui, sans-serif; color: #fff; background: rgba(0, 0, 0, .55); padding: 5px 10px; border-radius: 12px; }

/* ---- client notes */
/* just above Tools at the bottom of the panel: the sliders take Tools' place at the bottom (margin-top: auto) */
#viewSettings { margin-top: auto; border-top: 1px solid var(--line); padding: 8px 14px; display: grid; gap: 8px; }
#viewSettings:not([hidden]) + #toolsBox { margin-top: 0; }
#viewSettings[hidden] { display: none; }
#viewSettings label { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; font-size: 12px; color: var(--muted); }
#viewSettings label[hidden] { display: none; }
#viewSettings output { color: var(--text); font-variant-numeric: tabular-nums; }
#viewSettings input[type=range] { grid-column: 1 / -1; width: 100%; accent-color: var(--accent); }
#notesBox { border-bottom: 1px solid var(--line); padding: 8px 10px; }
#notesBox summary { cursor: pointer; font-weight: 600; font-size: 14px; padding: 4px; }
#noteCount { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 10px; background: var(--panel-2);
  font-size: 12px; text-align: center; color: var(--accent); }
.note-acts { display: flex; gap: 6px; padding: 6px 4px; flex-wrap: wrap; }
.note-acts label.tool { cursor: pointer; }
#noteList { list-style: none; margin: 0; padding: 0; max-height: 32vh; overflow-y: auto; }
#noteList li { padding: 6px; border-radius: 8px; font-size: 13px; display: grid; gap: 4px; }
#noteList li:hover { background: var(--panel-2); }
#noteList .nt { white-space: pre-wrap; }
#noteList .nm { font-size: 11px; color: var(--muted); }
#noteList .acts { display: flex; gap: 6px; }
.note-local { font-size: 11px; color: var(--muted); padding: 4px; }
.sev { display: inline-block; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 9px; margin-right: 6px; color: #111; }
.sev-Info { background: #7cc4ff; } .sev-Minor { background: #ffe06b; } .sev-Moderate { background: #ffa04a; } .sev-Severe { background: #ff5a5a; }
/* a note pin is a zero-size anchor ON the point: dot (tip) + stem + coloured head above */
.note-pin { position: absolute; left: 0; top: 0; width: 0; height: 0; pointer-events: auto; cursor: pointer; background: none;
  border: 0; padding: 0; visibility: hidden; overflow: visible; transition: opacity .15s; }
.note-pin .tip { position: absolute; left: -4px; top: -4px; width: 8px; height: 8px; border-radius: 50%; border: 2px solid #fff;
  box-sizing: border-box; box-shadow: 0 0 0 1px rgba(0, 0, 0, .6); }
.note-pin .stem { position: absolute; left: -1px; top: -17px; width: 2px; height: 13px; background: #fff; box-shadow: 0 0 0 1px rgba(0, 0, 0, .4); }
.note-pin .pin { position: absolute; left: -8px; top: -32px; width: 16px; height: 16px; border-radius: 50%; border: 2px solid #fff;
  box-sizing: border-box; box-shadow: 0 0 0 2px rgba(0, 0, 0, .45), 0 2px 8px rgba(0, 0, 0, .5); }
.note-pin:hover .pin { transform: scale(1.15); }
.note-pin .lbl { position: absolute; left: 12px; top: -36px; max-width: 260px; white-space: normal; font-size: 12px; background: rgba(0, 0, 0, .8);
  color: #fff; padding: 4px 8px; border-radius: 6px; opacity: 0; pointer-events: none; transition: opacity .12s; width: max-content; }
.note-pin:hover .lbl { opacity: 1; }
.note-pin.behind { opacity: 0; pointer-events: none; }   /* structure in front of it, or the far side: not shown (Rob, 2026-10-06) */
#noteList li.hilite { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.note-pin.p-Info .pin, .note-pin.p-Info .tip { background: #7cc4ff; }
.note-pin.p-Minor .pin, .note-pin.p-Minor .tip { background: #ffe06b; }
.note-pin.p-Moderate .pin, .note-pin.p-Moderate .tip { background: #ffa04a; }
.note-pin.p-Severe .pin, .note-pin.p-Severe .tip { background: #ff5a5a; }
body.noting #canvasHost, body.noting #canvasHost canvas, #panoHost.noting, #panoHost.noting * {
  cursor: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' width='18' height='36' viewBox='0 0 18 36'><line x1='9' y1='15' x2='9' y2='31' stroke='black' stroke-width='4'/><line x1='9' y1='15' x2='9' y2='31' stroke='white' stroke-width='2'/><circle cx='9' cy='8' r='7' fill='%23f2a33a' stroke='white' stroke-width='2'/><circle cx='9' cy='8' r='8' fill='none' stroke='black' stroke-width='1'/><circle cx='9' cy='33' r='2.5' fill='%23f2a33a' stroke='white' stroke-width='1.5'/></svg>") 9 33, crosshair !important; }
.note-pin.temp { pointer-events: none; animation: pinpulse 1s ease-in-out infinite; }
@keyframes pinpulse { 50% { opacity: .55; } }
#noteDlg { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 12px; padding: 16px; width: min(440px, 92vw); }
#noteDlg::backdrop { background: rgba(0, 0, 0, .55); }
#noteDlg h3 { margin: 0 0 10px; font-size: 16px; }
#noteDlg textarea, #noteDlg input, #noteDlg select { width: 100%; box-sizing: border-box; background: var(--panel-2); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px; padding: 8px; font: inherit; }
.note-row { display: flex; gap: 10px; margin-top: 10px; }
.note-row label { flex: 1; font-size: 12px; color: var(--muted); display: grid; gap: 4px; }
.note-row.end { justify-content: flex-end; }
#noteWhere { font-size: 12px; color: var(--muted); margin-top: 8px; }
.tool.primary { background: var(--accent); color: #111; border-color: var(--accent); font-weight: 600; }

/* station markers with no condition: white "360" on charcoal (notes keep the severity colours) */
.marker.c-none .ring::after { color: #fff; }

#noteDlg .grow { flex: 1; }
#noteDlg button[hidden] { display: none; }
.tool.danger { border-color: #e5484d; color: #ff8a8d; }
.tool.danger:hover { background: #e5484d; color: #111; }

/* orbit pivot: where the camera turns around */
#pivot { position: absolute; left: 0; top: 0; width: 0; height: 0; pointer-events: none; z-index: 6; opacity: .45; transition: opacity .25s; }
#pivot .ring { position: absolute; left: -13px; top: -13px; width: 26px; height: 26px; border-radius: 50%;
  border: 2px solid var(--accent); box-shadow: 0 0 0 1px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(0, 0, 0, .35); }
#pivot .dot { position: absolute; left: -3px; top: -3px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .6); }
#pivot .ring::before, #pivot .ring::after { content: ""; position: absolute; background: var(--accent); box-shadow: 0 0 0 1px rgba(0, 0, 0, .4); }
#pivot .ring::before { left: 50%; top: -9px; width: 2px; height: 7px; margin-left: -1px; }
#pivot .ring::after { top: 50%; left: -9px; width: 7px; height: 2px; margin-top: -1px; }
#pivot.active { opacity: 1; }
#pivot.pulse .ring { animation: pivotpulse .9s ease-out 2; }
@keyframes pivotpulse { 0% { transform: scale(2.2); opacity: 0; } 60% { transform: scale(.9); opacity: 1; } 100% { transform: scale(1); } }
#help .pv { display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 2px solid var(--accent); vertical-align: -1px; }

/* guide (tour.js) */
#tour { position: fixed; inset: 0; z-index: 1000; pointer-events: none; display: none; }
#tour.on { display: block; }
#tour .t-spot { position: fixed; border-radius: 12px; box-shadow: 0 0 0 9999px rgba(5, 12, 18, .62), 0 0 0 2px var(--accent);
  transition: left .3s, top .3s, width .3s, height .3s; }
#tour .t-card { position: fixed; width: min(360px, calc(100vw - 28px)); background: var(--panel, #13232f); color: var(--text);
  border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px 14px; pointer-events: auto;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .5); transition: left .3s, top .3s; }
#tour .t-card.mobile { transition: none; left: 14px !important; right: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); top: auto !important; width: auto; }
#tour .t-top { display: flex; justify-content: space-between; align-items: center; }
#tour .t-step { font-size: 12px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
#tour .t-x { background: none; border: 0; color: var(--muted); font-size: 22px; line-height: 1; cursor: pointer; padding: 0 2px; }
#tour .t-x:hover { color: var(--text); }
#tour h3 { margin: 6px 0 6px; font-family: "Inter Tight", sans-serif; font-weight: 700; font-size: 18px; color: var(--accent); }
#tour .t-text { margin: 0 0 12px; font-size: 14px; line-height: 1.5; }
#tour .t-auto { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); margin-bottom: 12px; cursor: pointer; }
#tour .t-auto[hidden] { display: none; }
#tour .t-auto input { accent-color: var(--accent); }
#tour .t-btns { display: flex; gap: 6px; align-items: center; }
#tour .t-btns .grow { flex: 1; }
#tour .t-btns .tool:disabled { opacity: .35; cursor: default; }
#tour .tool.primary { background: var(--accent); color: #13232f; border-color: var(--accent); font-weight: 700; }

/* tools: bottom of the side panel */
#toolsBox { margin-top: auto; border-top: 1px solid var(--line); padding: 10px 10px 14px; }
#toolsBox h4 { margin: 0 4px 8px; font-size: 11px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.tool-row { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 10px; padding: 10px 12px; color: var(--text); font: inherit; cursor: pointer; }
.tool-row:hover, .tool-row:focus-visible { border-color: var(--accent); outline: none; }
.tool-row svg { width: 22px; height: 22px; flex: none; fill: none; stroke: var(--accent); stroke-width: 1.8; }
.tool-row span { display: grid; gap: 1px; }
.tool-row b { font-weight: 600; font-size: 14px; }
.tool-row small { color: var(--muted); font-size: 12px; }
#toolsBox .tool-row + .tool-row { margin-top: 8px; }

/* georeference tool (georef.js) */
#georef { position: fixed; top: var(--topbar); right: 0; bottom: 0; width: min(560px, 100vw); background: var(--panel); border-left: 1px solid var(--line);
  z-index: 60; overflow-y: auto; padding: 14px 16px 20px; display: grid; align-content: start; gap: 12px; box-shadow: -12px 0 30px rgba(0, 0, 0, .35); }
#georef[hidden] { display: none; }
#georef .g-head { display: flex; justify-content: space-between; align-items: center; }
#georef h3 { margin: 0; font-family: "Inter Tight", sans-serif; font-size: 18px; }
#georef .g-x { background: none; border: 0; color: var(--muted); font-size: 24px; cursor: pointer; line-height: 1; }
#georef .g-help { font-size: 13px; color: var(--muted); background: var(--panel-2); border-radius: 10px; padding: 8px 12px; }
#georef .g-help summary { cursor: pointer; color: var(--text); font-weight: 600; }
#georef .g-help ol { padding-left: 18px; margin: 8px 0; display: grid; gap: 6px; }
#georef .g-help p { margin: 0 0 4px; }
#georef .g-row { display: flex; gap: 12px; align-items: end; flex-wrap: wrap; }
#georef .g-row label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
#georef .g-row input { background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 8px; padding: 7px 9px; font: inherit; }
#georef #gCrs { width: 170px; } #georef #gTol { width: 70px; }
#georef .g-tol { grid-template-columns: auto; }
#georef .g-pts { display: grid; gap: 4px; }
#georef .g-th, #georef .g-pt { display: grid; grid-template-columns: 112px 92px 1fr 1fr 70px 58px 40px; gap: 6px; align-items: center; }
#georef .g-th { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding: 0 4px; }
#georef .g-pt { background: var(--panel-2); border: 1px solid transparent; border-radius: 10px; padding: 6px 4px; }
#georef .g-pt.picking { border-color: var(--accent); }
#georef .g-pt.off { opacity: .5; }
#georef .g-name { display: grid; gap: 3px; }
#georef .g-in, #georef .g-pt select { width: 100%; min-width: 0; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 6px;
  padding: 5px 6px; font: inherit; font-size: 13px; }
#georef .g-in.num { font-variant-numeric: tabular-nums; text-align: right; }
#georef .g-views { display: grid; gap: 3px; font-size: 13px; }
#georef .g-views small { color: var(--muted); font-size: 11px; display: block; }
#georef .g-res { font-size: 13px; text-align: right; font-variant-numeric: tabular-nums; }
#georef .g-res.ok { color: #7ed6a5; } #georef .g-res.bad { color: #ff8d8f; font-weight: 700; }
#georef .g-tools { display: flex; align-items: center; gap: 2px; justify-content: end; }
#georef .g-tools input { accent-color: var(--accent); }
#georef .g-del { background: none; border: 0; color: var(--muted); font-size: 18px; cursor: pointer; }
#georef .g-del:hover { color: #ff8d8f; }
#georef .g-empty { color: var(--muted); font-size: 13px; margin: 4px 0; }
#georef .g-acts { display: flex; gap: 8px; align-items: center; }
#georef .g-acts .grow { flex: 1; }
#georef .g-sum { display: grid; gap: 4px; font-size: 13px; padding: 10px 12px; border-radius: 10px; background: var(--panel-2); border-left: 3px solid var(--line); }
#georef .g-sum.ok { border-left-color: #7ed6a5; } #georef .g-sum.bad { border-left-color: #ff8d8f; }
#georef .g-sum small { color: var(--muted); }
#georef .g-clear { justify-self: start; }
#gPickBanner { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 70; background: rgba(13, 26, 36, .94);
  border: 1px solid var(--accent); border-radius: 12px; padding: 10px 16px; font-size: 14px; max-width: min(640px, 92vw); text-align: center; }
#gPickBanner[hidden] { display: none; }
#gPickBanner .g-k { border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; font-size: 12px; }
body.gpicking #panoHost, body.gpicking #panoHost * { cursor: crosshair !important; }
body.georef-open #panoModal .pano-head { padding-right: min(560px, 100vw); }
#gcpLayer { position: absolute; inset: 0; pointer-events: none; z-index: 4; }
#gcpLayer .gcp { position: absolute; left: 0; top: 0; }
#gcpLayer .gcp i { position: absolute; left: -7px; top: -7px; width: 14px; height: 14px; border: 2px solid var(--accent); background: rgba(13, 26, 36, .6);
  transform: rotate(45deg); box-shadow: 0 0 0 1px rgba(0, 0, 0, .5); }
#gcpLayer .gcp span { position: absolute; left: 12px; top: -9px; font-size: 12px; font-weight: 700; color: var(--accent); white-space: nowrap;
  text-shadow: 0 1px 2px #000, 0 0 4px #000; }
@media (max-width: 640px) {
  #georef .g-th { display: none; }
  #georef .g-pt { grid-template-columns: 1fr 1fr 1fr; }
}
.tool-row[hidden] { display: none; }
/* note / measure live in the Tools section: show when they are switched on */
.tool-row[aria-pressed="true"] { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 18%, var(--panel-2)); }
.tool-row[aria-pressed="true"] small::after { content: " · on, click again to stop"; color: var(--accent); }

/* home link + other projects (app / client portal only) */
.home-link { display: inline-flex; align-items: center; gap: 6px; padding: 6px 11px; border-radius: 8px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--text); text-decoration: none; font-weight: 600; font-size: 13px; white-space: nowrap; }
.home-link:hover { border-color: var(--accent); }
.home-link svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; }
.home-link[hidden] { display: none; }
#projectsBox { border-bottom: 1px solid var(--line); padding: 8px 10px; }
#projectsBox[hidden] { display: none; }
#projectsBox summary { cursor: pointer; font-weight: 600; padding: 2px 4px 6px; }
#projectsBox #projCount { color: var(--muted); font-weight: 400; font-size: 12px; margin-left: 4px; }
#projList { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; max-height: 34vh; overflow-y: auto; }
#projList a { display: grid; grid-template-columns: 64px 1fr; gap: 10px; align-items: center; padding: 6px; border-radius: 8px;
  color: var(--text); text-decoration: none; border: 1px solid transparent; }
#projList a:hover { background: var(--panel-2); }
#projList li.current a { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, var(--panel-2)); cursor: default; }
#projList .pthumb { width: 64px; height: 40px; border-radius: 5px; background: var(--bg) center / cover no-repeat; }
#projList .ptext { display: grid; min-width: 0; }
#projList .ptext b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#projList .ptext small { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 640px) { .home-link span { display: none; } }
/* who wrote a note (shared notes) */
#noteList .who { display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; border-radius: 4px;
  padding: 1px 5px; margin-right: 6px; vertical-align: 1px; }
#noteList .who.client { background: var(--accent); color: #13232f; }
#noteList .who.team { border: 1px solid var(--line); color: var(--muted); }
#noteList li.flash { outline: 2px solid var(--accent); border-radius: 8px; animation: noteflash 1.2s ease-out 2; }
@keyframes noteflash { 50% { background: color-mix(in srgb, var(--accent) 20%, transparent); } }
#noteList li { cursor: pointer; } #noteList li:hover { background: color-mix(in srgb, var(--accent) 8%, transparent); }

/* in-page confirm dialog (ask.js) */
dialog.ask { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px;
  width: min(440px, 92vw); box-shadow: 0 18px 50px rgba(0, 0, 0, .5); }
dialog.ask::backdrop { background: rgba(5, 12, 18, .65); }
dialog.ask .ask-title { margin: 0 0 8px; font: 600 18px "Inter Tight", "Helvetica Neue", Arial, sans-serif; }
dialog.ask .ask-text p { margin: 0 0 10px; color: var(--muted); line-height: 1.5; word-break: break-word; }
dialog.ask .ask-text b { color: var(--text); }
dialog.ask .ask-btns { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 12px; }
dialog.ask .ask-yes { background: var(--accent); color: #13232f; border-color: var(--accent); font-weight: 600; }
dialog.ask .ask-yes.danger { background: #ff8d8f; border-color: #ff8d8f; }

/* splat / mesh layer selector */
.seg { display: inline-flex; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.seg[hidden] { display: none; }
.seg .tool { border: 0; border-radius: 0; border-right: 1px solid var(--line); }
.seg .tool:last-child { border-right: 0; }
.seg .tool[aria-pressed="true"] { background: var(--accent); color: #13232f; }

/* ---------------------------------------------------------------- camera stations (photo projects, photos.js) */
#photoMarkers { position: absolute; inset: 0; pointer-events: none; z-index: 4; overflow: hidden; }
#photoMarkers[hidden] { display: none; }
/* camera markers: yellow arrows, big enough to see (Rob, 2026-10-06), pointing where the photo looks */
.photo-marker { position: absolute; left: 0; top: 0; width: 30px; height: 20px; padding: 0; border: 0; border-radius: 0; pointer-events: auto;
  clip-path: polygon(0 0, 100% 50%, 0 100%, 28% 50%);
  background: var(--accent); opacity: .9; cursor: pointer; transition: transform .1s; }
.photo-marker:hover { opacity: 1; filter: brightness(1.15); }
.photo-marker[hidden] { display: none; }
.photo-marker.end-on { width: 16px; height: 16px; clip-path: none; border-radius: 50%; border: 3px solid var(--accent); background: rgba(19, 35, 47, .8); }
.pm-spot { transform-origin: 0 0; }
.photo-spot { position: absolute; left: 0; top: 0; width: 0; height: 0; pointer-events: none; z-index: 5; }
.photo-spot::after { content: ""; position: absolute; left: -9px; top: -9px; width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid var(--accent); box-shadow: 0 0 0 2px rgba(0, 0, 0, .55); }
.photo-spot[hidden] { display: none; }
#photoStrip { position: absolute; left: 12px; right: 12px; bottom: 12px; z-index: 8; background: rgba(20, 46, 64, .96);
  border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px 10px; box-shadow: 0 8px 24px rgba(0, 0, 0, .4); }
body.panel-open #photoStrip { left: calc(var(--panel-w) + 12px); }
#photoStrip[hidden] { display: none; }
.ps-head { display: flex; align-items: center; gap: 10px; font-size: 13px; margin-bottom: 8px; }
.ps-head .ps-count { color: var(--muted); font-size: 12px; flex: 1; }
.ps-list { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; }
.ps-item { flex: 0 0 auto; position: relative; padding: 0; border: 2px solid transparent; border-radius: 6px; background: #000; cursor: pointer; }
.ps-item:hover { border-color: var(--accent); }
.ps-item img { display: block; height: 96px; width: auto; border-radius: 4px; }
.ps-item small { position: absolute; left: 4px; bottom: 4px; font-size: 11px; background: rgba(0, 0, 0, .7); padding: 1px 5px; border-radius: 4px; }
#photoModal { position: fixed; inset: 0; z-index: 50; background: #05090d; display: flex; flex-direction: column; }
#photoModal[hidden] { display: none; }
.pm-head { display: flex; align-items: center; gap: 12px; padding: 8px 12px; background: var(--panel); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.pm-titles { flex: 1; min-width: 180px; }
.pm-title { font-family: "Inter Tight", "Helvetica Neue", Arial, sans-serif; font-weight: 600; }
.pm-meta { font-size: 12px; color: var(--muted); }
.pm-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.pm-actions [hidden] { display: none; }
.pm-stage { position: relative; flex: 1; overflow: hidden; cursor: grab; touch-action: none; }
.pm-stage:active { cursor: grabbing; }
.pm-img { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.pm-img img { display: block; width: 100%; height: 100%; user-select: none; -webkit-user-drag: none; }
.pm-spot { position: absolute; width: 0; height: 0; }
.pm-spot::after { content: ""; position: absolute; left: -14px; top: -14px; width: 24px; height: 24px; border-radius: 50%;
  border: 3px solid var(--accent); box-shadow: 0 0 0 2px rgba(0, 0, 0, .6); }

/* ---------------------------------------------------------------- layer control + split view */
#layerSel .tool[disabled] { opacity: .38; cursor: not-allowed; border-style: dashed; }
#layerSel .tool[disabled]:hover { border-color: var(--line); }
#layerSel #btnSplit { margin-left: 6px; }
#splitUI { position: absolute; inset: 0; pointer-events: none; z-index: 7; --x: 50%; }
#splitUI[hidden] { display: none; }
.split-line { position: absolute; top: 0; bottom: 0; left: var(--x); width: 24px; margin-left: -12px; pointer-events: auto;
  cursor: ew-resize; touch-action: none; }
.split-line::before { content: ""; position: absolute; top: 0; bottom: 0; left: 11px; width: 2px; background: var(--accent);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .45); }
.split-grip { position: absolute; top: 50%; left: 2px; width: 20px; height: 44px; margin-top: -22px; border-radius: 6px;
  background: var(--panel); border: 2px solid var(--accent); }
.split-grip::before, .split-grip::after { content: ""; position: absolute; top: 12px; bottom: 12px; width: 2px; background: var(--accent); }
.split-grip::before { left: 5px; } .split-grip::after { right: 5px; }
.split-sel { position: absolute; top: 12px; pointer-events: auto; background: var(--panel); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; font: 13px "Inter Tight", "Helvetica Neue", Arial, sans-serif; }
.split-sel.left { right: calc(100% - var(--x) + 18px); }
.split-sel.right { left: calc(var(--x) + 18px); }

/* ---------------------------------------------------------------- model box (boxedit.js) */
#boxPanel { position: absolute; right: 12px; top: 12px; z-index: 9; width: 270px; background: rgba(20, 46, 64, .97);
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px 12px; box-shadow: 0 8px 24px rgba(0, 0, 0, .4);
  display: grid; gap: 8px; font-size: 13px; }
#boxPanel[hidden] { display: none; }
.bp-head { display: flex; align-items: center; justify-content: space-between; }
.bp-head b { font-family: "Inter Tight", "Helvetica Neue", Arial, sans-serif; }
.bp-clip { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 12px; }
.bp-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; font-size: 12px; color: var(--muted); }
.bp-row output { color: var(--text); font-variant-numeric: tabular-nums; }
.bp-row input { grid-column: 1 / -1; width: 100%; accent-color: var(--accent); }
.bp-acts { display: flex; align-items: center; gap: 8px; }
.bp-size { flex: 1; text-align: center; color: var(--muted); font-size: 12px; }
.tool.primary { background: var(--accent); color: #13232f; border-color: var(--accent); font-weight: 600; }
.tool[disabled] { opacity: .45; cursor: default; }
