
:root{--bg:#f4f6f8;--panel:#fff;--text:#1f2933;--muted:#667085;--accent:#2457d6;--line:#d9dee7}
*{box-sizing:border-box}
html,body{margin:0;height:100%;font-family:Segoe UI,Arial,sans-serif;background:var(--bg);color:var(--text);overflow:hidden}
header{height:44px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;padding:0 22px;gap:16px}
header h1{font-size:22px;margin:0}.version-badge{font-size:12px;color:#2457d6;margin-left:8px}.stats{margin-left:auto;color:var(--muted);font-size:14px}
main{--left-pane:260px;--right-pane:400px;position:relative;height:calc(100vh - 44px);display:grid;grid-template-columns:var(--left-pane) 7px minmax(360px,1fr) 7px var(--right-pane)}
.sidebar,.gallery{background:#fff;overflow:auto}.sidebar{border-right:1px solid var(--line)}.gallery{border-left:1px solid var(--line)}
.search{padding:14px;position:sticky;top:0;background:#fff;z-index:500;border-bottom:1px solid var(--line)}
.search input{width:100%;padding:10px 12px;border:1px solid var(--line);border-radius:8px;font-size:14px}
.location{padding:12px 14px;border-bottom:1px solid #eef1f4;cursor:pointer}.location:hover,.location.active{background:#eaf0ff}
.location b{display:block;font-size:15px}.location small{color:var(--muted)}
.sublocation-list{padding:4px 8px 10px 22px;background:#f8faff;border-bottom:1px solid #e7ebf2}
.sublocation-item{display:flex;justify-content:space-between;gap:8px;padding:8px 9px;border-radius:6px;cursor:pointer;font-size:13px}
.sublocation-item:hover,.sublocation-item.active{background:#dfe9ff;color:#173f9f}.sublocation-item span:last-child{color:#667085}
.mapwrap{position:relative;min-width:0;background:#d9e3ea;overflow:hidden}#map{width:100%;height:100%;z-index:1}
.map-toolbar{position:absolute;right:12px;top:12px;z-index:800;display:flex;align-items:center;justify-content:flex-end;flex-wrap:wrap;max-width:calc(100% - 24px);gap:7px;background:rgba(255,255,255,.96);padding:6px;border-radius:8px;box-shadow:0 1px 6px rgba(0,0,0,.22)}
.map-toolbar button,.map-toolbar select{border:1px solid #c8ced7;background:white;padding:8px 10px;border-radius:6px;font:600 14px Segoe UI,Arial;cursor:pointer}.map-toolbar button:disabled{background:#eef1f4;color:#9aa3af;border-color:#d9dee7;cursor:not-allowed;box-shadow:none}
.route-toggle{display:flex;align-items:center;gap:5px;font-size:13px;font-weight:700;color:#475467;padding:0 3px}
.map-hint,.photo-marker-hint{position:absolute;left:50%;transform:translateX(-50%);z-index:790;background:rgba(255,255,255,.92);padding:7px 11px;border-radius:7px;font-size:12px;color:#475467;box-shadow:0 1px 5px rgba(0,0,0,.16);pointer-events:none;white-space:nowrap}
.map-hint{top:70px}.photo-marker-hint{bottom:12px}.hidden{display:none!important}
.leader-lines{position:absolute;inset:0;width:100%;height:100%;z-index:610;pointer-events:none}.leader-lines line{stroke:rgba(25,35,45,.78);stroke-width:4.05}
.map-label-layer{position:absolute;inset:0;z-index:620;pointer-events:none}
.map-label{position:absolute;transform:translate(-50%,-50%);background:rgba(255,255,255,.95);border:1px solid rgba(25,35,45,.35);border-radius:5px;padding:4px 7px;font-size:11px;font-weight:700;white-space:nowrap;box-shadow:0 1px 4px rgba(0,0,0,.2);pointer-events:auto;cursor:pointer}
.map-label.selected{background:#eaf0ff;border-color:#2457d6;color:#173f9f}.map-label.sub{background:#fff8df;border-color:#a77c18}
.gallery-head{padding:16px 18px;border-bottom:1px solid var(--line);position:sticky;top:0;background:#fff;z-index:500}.gallery-head h2{margin:5px 0 6px}.gallery-head p{margin:0;color:var(--muted);font-size:14px}
.back-button{border:0;background:none;color:#2457d6;font-weight:700;cursor:pointer;padding:0}
.grid{padding:12px;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.card,.sub-card{background:#fff;border:1px solid var(--line);border-radius:8px;overflow:hidden;cursor:pointer}.card:hover,.sub-card:hover{box-shadow:0 3px 12px rgba(0,0,0,.12)}
.card img{width:100%;height:120px;object-fit:contain;display:block;background:#e5e7eb}.card .meta,.sub-card .meta{padding:8px;font-size:12px}.card .meta b,.sub-card .meta b{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.sub-card{
  height:104px;
  min-height:104px;
  display:flex;
  align-items:stretch;
  justify-content:center;
  text-align:center;
  background:linear-gradient(145deg,#f8faff,#edf2ff)
}
.sub-card .meta{
  width:100%;
  height:100%;
  box-sizing:border-box;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:10px 12px 9px
}
.sub-card .meta b{
  display:flex;
  align-items:center;
  justify-content:center;
  flex:1 1 auto;
  width:100%;
  white-space:normal;
  overflow:visible;
  text-overflow:clip;
  overflow-wrap:anywhere;
  word-break:normal;
  line-height:1.22
}
.sub-card .count{
  flex:0 0 auto;
  display:block;
  width:100%;
  color:#667085;
  margin-top:6px;
  line-height:1.15
}
.emptyimg{height:120px;display:flex;align-items:center;justify-content:center;background:#eef1f4;color:#667085;font-size:12px}
.splitter{position:relative;background:#e4e8ee;cursor:col-resize;z-index:900;border-left:1px solid #cfd5de;border-right:1px solid #cfd5de}.splitter:hover,.splitter.dragging{background:#9fb4e8}
body.resizing{cursor:col-resize;user-select:none}
.atlas-pin{background:transparent;border:0}.pin-dot{position:relative;width:19px;height:19px;border-radius:50% 50% 50% 0;background:#d9544d;transform:rotate(-45deg);border:2px solid white;box-shadow:0 1px 5px rgba(0,0,0,.48)}
.pin-dot:after{content:"";position:absolute;width:5px;height:5px;border-radius:50%;background:white;left:5px;top:5px}
.photo-camera-icon{background:transparent!important;border:0!important}.photo-camera{width:25px;height:25px;display:flex;align-items:center;justify-content:center;border-radius:50%;background:#fff;border:2px solid #2457d6;box-shadow:0 1px 5px rgba(0,0,0,.48);font-size:14px;transition:transform .2s,background .2s,border-color .2s}
.photo-camera.active{width:38px;height:38px;font-size:20px;background:#ffd95a;border:3px solid #9a6500;box-shadow:0 2px 10px rgba(0,0,0,.58);transform:translate(-6px,-6px)}
.photo-inspector{position:fixed;top:44px;right:0;bottom:0;z-index:1700;display:none;background:#111827;color:white;box-shadow:-5px 0 18px rgba(0,0,0,.35);min-width:440px}
.photo-inspector.open{display:grid;grid-template-rows:44px minmax(0,1fr) 48px}
.inspector-header{min-width:0;display:flex;align-items:center;gap:18px;padding:0 54px 0 18px;border-bottom:1px solid rgba(255,255,255,.18);white-space:nowrap;overflow:hidden;color:#d7deea;font-size:13px}
.inspector-header b{color:white;overflow:hidden;text-overflow:ellipsis;max-width:28%}.inspector-header #viewercontext{font-weight:700;color:white;overflow:hidden;text-overflow:ellipsis}
.inspector-close{position:absolute;right:8px;top:5px;z-index:2;border:0;border-radius:50%;width:34px;height:34px;background:rgba(255,255,255,.18);color:white;font-size:23px;line-height:1;cursor:pointer}
.inspector-image{min-height:0;display:flex;align-items:center;justify-content:center;padding:4px 8px}.inspector-image img{width:100%;height:100%;object-fit:contain}
.inspector-controls{display:flex;align-items:center;justify-content:center;gap:18px;padding:6px 10px}.inspector-controls button{height:30px;border:1px solid #8995a7;background:#f8fafc;color:#1f2933;border-radius:7px;padding:3px 18px;font-weight:700;cursor:pointer}
.route-kml-main{stroke:#ffd92f;stroke-width:4.5;stroke-opacity:.84;stroke-linecap:round;stroke-linejoin:round}
.leaflet-control-scale{margin-left:12px!important;margin-bottom:12px!important}
@media(max-width:900px){main{--left-pane:220px;--right-pane:330px}.photo-inspector{left:30%!important;min-width:0}}

/* V5.7: mode switch, chronological photo album, notes, and larger viewer */
.mode-switch{margin-left:auto;display:flex;border:1px solid #c8ced7;border-radius:8px;overflow:hidden;background:#f5f7fa}
.mode-switch button{border:0;border-right:1px solid #c8ced7;background:transparent;padding:7px 12px;font-weight:700;color:#475467;cursor:pointer}.mode-switch button:last-child{border-right:0}.mode-switch button.active{background:#2457d6;color:white}
.stats{margin-left:0}
.photo-album{display:none;position:fixed;inset:44px 0 0;background:#f4f6f8;overflow:auto;z-index:1200;padding:0 20px 28px}
body.photos-only main{display:none}body.photos-only .photo-album{display:block}
.album-head{position:sticky;top:0;z-index:5;display:flex;align-items:center;justify-content:space-between;background:rgba(255,255,255,.97);border-bottom:1px solid var(--line);padding:12px 16px;margin:0 -20px 16px}.album-head h2{margin:0 0 3px}.album-head p{margin:0;color:var(--muted)}.album-head button{border:1px solid #c8ced7;background:white;border-radius:7px;padding:8px 12px;font-weight:700;cursor:pointer}
.album-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px;max-width:1900px;margin:auto}.album-date{grid-column:1/-1;margin:14px 0 0;padding:8px 2px 5px;border-bottom:2px solid #cfd8e6;font-size:18px}
.album-card{position:relative;background:white;border:1px solid var(--line);border-radius:8px;overflow:hidden;cursor:pointer;min-width:0}.album-card:hover{box-shadow:0 4px 15px rgba(0,0,0,.16);transform:translateY(-1px)}.album-card img{width:100%;aspect-ratio:4/3;object-fit:contain;display:block;background:#e5e7eb}.album-meta{padding:7px 8px;min-width:0}.album-meta b,.album-meta span,.album-meta small{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.album-meta b{font-size:12px}.album-meta span,.album-meta small{font-size:11px;color:var(--muted);margin-top:2px}
.note-badge{position:absolute;right:6px;top:6px;width:30px;height:30px;border-radius:50%;border:1px solid rgba(0,0,0,.25);background:rgba(255,255,255,.94);cursor:pointer;box-shadow:0 1px 5px rgba(0,0,0,.25);z-index:3}.card{position:relative}
.quick-note{position:fixed;z-index:3000;max-width:360px;min-width:180px;padding:11px 13px;background:#fffbe8;border:1px solid #b49b43;border-radius:8px;box-shadow:0 7px 24px rgba(0,0,0,.3);font-size:13px;line-height:1.4;white-space:pre-wrap}
body.viewer-active>header{visibility:hidden}.photo-inspector{top:0}.photo-inspector.open{grid-template-rows:42px minmax(0,1fr) 44px}.inspector-image{position:relative;padding:2px 6px}.viewer-notes{margin-left:auto;border:1px solid #8995a7;background:#fff7ce;color:#4d3a00;border-radius:6px;padding:5px 10px;font-weight:700;cursor:pointer}.viewer-note-panel{position:absolute;right:18px;bottom:18px;max-width:min(460px,70%);max-height:45%;overflow:auto;background:rgba(255,251,232,.97);color:#2b2b2b;border:1px solid #b49b43;border-radius:10px;padding:15px 18px;box-shadow:0 6px 25px rgba(0,0,0,.45)}.viewer-note-panel h3{margin:0 30px 7px 0}.viewer-note-panel p{margin:0;white-space:pre-wrap;line-height:1.45}.viewer-note-panel button{position:absolute;right:7px;top:5px;border:0;background:transparent;font-size:22px;cursor:pointer}
body.photos-only.viewer-active .photo-inspector{left:0!important;width:100vw!important}
@media(max-width:1450px){.album-grid{grid-template-columns:repeat(5,minmax(0,1fr))}}
@media(max-width:1150px){.album-grid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:850px){.album-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.mode-switch button{padding:6px 8px;font-size:12px}}

/* V5.8: reference introductions, journal pages, and exact CSV labels */
.location-intro{position:relative;margin:12px 0 2px;padding:12px 36px 12px 14px;background:#f7f9fc;border:1px solid #d7deea;border-radius:9px;font-size:13px;line-height:1.45}.location-intro p{margin:0 0 9px}.location-intro.collapsed{padding-top:4px;padding-bottom:4px;min-height:28px}.intro-collapse{position:absolute;right:6px;top:5px;border:0;background:transparent;color:#375b9c;font-size:16px;cursor:pointer}.location-intro dl{margin:0}.location-intro dl div{display:grid;grid-template-columns:82px 1fr;gap:7px;margin-top:3px}.location-intro dt{font-weight:700;color:#475467}.location-intro dd{margin:0}.intro-pref{display:block;margin-top:10px;color:#667085;font-size:12px}
.journal-view{display:none;position:fixed;inset:44px 0 0;background:#eef2f6;overflow:auto;z-index:1200;padding:0 20px 40px}body.journal-only main{display:none}body.journal-only .journal-view{display:block}body.journal-only .photo-album{display:none}.journal-head{position:sticky;top:0;z-index:5;background:rgba(255,255,255,.97);border-bottom:1px solid var(--line);padding:14px max(20px,calc((100% - 960px)/2));margin:0 -20px 22px}.journal-head h2{margin:0}.journal-head p{margin:3px 0 0;color:var(--muted)}.journal-entries{max-width:960px;margin:auto}.journal-entry{background:white;border:1px solid #d7deea;border-radius:12px;padding:24px 28px;margin:0 0 18px;box-shadow:0 2px 10px rgba(0,0,0,.06)}.journal-entry h3{font-size:25px;margin:3px 0 6px}.journal-entry p{font-size:17px;line-height:1.6;margin:14px 0 0}.journal-kicker{text-transform:uppercase;letter-spacing:.08em;font-size:11px;font-weight:800;color:#2457d6}.journal-date{color:#667085;font-size:13px}


/* V6.2: interactive enlarged-photo viewer */
.inspector-image{overflow:hidden;touch-action:none;user-select:none;background:#0b1220}
.inspector-image img{width:100%;height:100%;object-fit:contain;transform-origin:center center;will-change:transform;transition:transform .08s ease-out;pointer-events:none}
.inspector-image.zoomed{cursor:grab}.inspector-image.zoomed.dragging{cursor:grabbing}.inspector-image.dragging img{transition:none}
.zoom-indicator{position:absolute;left:50%;bottom:14px;transform:translateX(-50%) translateY(6px);padding:5px 10px;border-radius:999px;background:rgba(0,0,0,.7);color:#fff;font-size:12px;font-weight:700;opacity:0;pointer-events:none;transition:opacity .18s,transform .18s;z-index:8}
.zoom-indicator.show{opacity:1;transform:translateX(-50%) translateY(0)}
.viewer-side-nav{display:none;position:absolute;top:50%;transform:translateY(-50%);z-index:9;width:52px;height:76px;border:0;border-radius:10px;background:rgba(10,18,32,.42);color:#fff;font-size:54px;line-height:62px;cursor:pointer;opacity:.35;transition:opacity .18s,background .18s}
.viewer-side-nav:hover,.viewer-side-nav:focus-visible{opacity:1;background:rgba(10,18,32,.72)}
.viewer-side-prev{left:14px}.viewer-side-next{right:14px}
.inspector-controls #fullscreenviewer{margin-left:4px;margin-right:4px}
body.photos-only.viewer-active .photo-inspector.open{grid-template-rows:42px minmax(0,1fr)}
body.photos-only.viewer-active .inspector-controls{display:none}
body.photos-only.viewer-active .viewer-side-nav{display:block}
body.photos-only.viewer-active .inspector-image{padding:0}
.photo-inspector:fullscreen,.photo-inspector.is-fullscreen{inset:0!important;left:0!important;top:0!important;width:100vw!important;height:100vh!important;max-width:none!important}
.photo-inspector:fullscreen.open,.photo-inspector.is-fullscreen.open{display:grid;grid-template-rows:42px minmax(0,1fr)}
.photo-inspector:fullscreen .inspector-controls,.photo-inspector.is-fullscreen .inspector-controls{display:none}
.photo-inspector:fullscreen .viewer-side-nav,.photo-inspector.is-fullscreen .viewer-side-nav{display:block}
.photo-inspector:fullscreen .inspector-image,.photo-inspector.is-fullscreen .inspector-image{padding:0}
@media(max-width:700px){.viewer-side-nav{width:42px;height:64px;font-size:44px}.viewer-side-prev{left:6px}.viewer-side-next{right:6px}}


/* V6.3: stronger street tiles, route state, and dynamic label layout */
.leaflet-tile-pane,.leaflet-tile{opacity:1!important;filter:none!important}
.route-toggle.disabled{opacity:.45;cursor:not-allowed}.route-toggle.disabled input{cursor:not-allowed}
.map-label{transition:left .18s ease-out,top .18s ease-out;z-index:2}
.map-label.selected{z-index:5}
.leader-lines line{stroke:#344054;stroke-width:1.35;stroke-opacity:.9;vector-effect:non-scaling-stroke}
.card img,.album-card img{image-orientation:from-image}

/* V6.3.2: enforce fully opaque base map and clean label stacking */
.leaflet-tile-pane{opacity:1!important;filter:none!important;mix-blend-mode:normal!important}
.leaflet-tile{opacity:1!important;filter:none!important}
.map-label-layer{isolation:isolate}
.map-label{will-change:left,top}


/* V6.3.3: stronger leader lines and live cursor coordinates */
.leader-lines line{
  stroke-width:4.05!important;
  stroke-linecap:round;
  stroke-linejoin:round;
}
.cursor-coords{
  position:absolute;
  right:12px;
  bottom:12px;
  z-index:1100;
  border:1px solid rgba(17,24,39,.42);
  border-radius:7px;
  padding:5px 9px;
  background:rgba(255,255,255,.92);
  color:#172033;
  font:600 12px/1.2 system-ui,-apple-system,"Segoe UI",sans-serif;
  font-variant-numeric:tabular-nums;
  box-shadow:0 1px 5px rgba(0,0,0,.18);
  cursor:pointer;
  user-select:none;
}
.cursor-coords:hover{background:#fff;border-color:#2457d6}
.cursor-coords.copied{background:#e7f7ed;border-color:#218653;color:#145a35}





/* V6.3.5: GPS readout anchored bottom-right immediately above attribution */
.cursor-coords{
  right:12px!important;
  bottom:34px!important;
  left:auto!important;
  top:auto!important;
}


/* V6.3.6: explicit, clickable Location Introduction bar */
.intro-collapse{
  width:100%;
  text-align:left!important;
  display:flex!important;
  align-items:center;
  gap:7px;
  font-weight:700!important;
  padding:7px 10px!important;
}
.intro-arrow{display:inline-block;min-width:12px}

/* V6.3.6: observation-only trip-day weather */
.journal-weather{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
  align-items:center;
  margin:7px 0 10px;
  padding:7px 10px;
  border-radius:8px;
  background:#edf5fb;
  color:#24445e;
  font-size:13px;
  font-weight:650;
}
.journal-weather span{opacity:.55}


/* V6.4 polish */
.location-intro{padding:12px 14px!important}
.location-intro.collapsed{padding:0!important;min-height:34px;display:flex;align-items:center}
.intro-collapse{position:static!important;width:100%!important;min-height:34px;display:flex!important;align-items:center!important;justify-content:center!important;gap:7px;padding:5px 10px!important;text-align:center!important}
.location-intro:not(.collapsed) .intro-collapse{position:absolute!important;right:5px!important;top:4px!important;width:30px!important;min-height:26px;justify-content:center!important;padding:2px!important}
.location-intro:not(.collapsed) #introbody{padding-right:26px}
.intro-label{line-height:1.2}
.copy-toast{position:fixed;right:18px;bottom:18px;z-index:5000;background:#176b3a;color:white;padding:10px 14px;border-radius:8px;font-weight:700;box-shadow:0 5px 18px rgba(0,0,0,.3);opacity:0;transform:translateY(8px);pointer-events:none;transition:.18s}
.copy-toast.show{opacity:1;transform:translateY(0)}
@media(max-width:700px){header{height:auto;min-height:50px;padding:5px 8px;gap:6px;flex-wrap:wrap}header h1{font-size:15px;flex:1 1 100%}.version-badge{font-size:9px}.stats{font-size:11px}.photo-album,.journal-view{inset:72px 0 0;padding-left:8px;padding-right:8px}.album-head{margin-left:-8px;margin-right:-8px}.album-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px}.album-card img{aspect-ratio:1/1;object-fit:contain}.photo-inspector.open{grid-template-rows:auto minmax(0,1fr) 48px}.inspector-header{height:auto;min-height:44px;flex-wrap:wrap;padding:5px 42px 5px 8px;gap:4px}.inspector-header b{max-width:100%}.inspector-controls{gap:7px}.inspector-controls button{padding:4px 9px}.viewer-side-nav{opacity:.72}.cursor-coords{font-size:10px;right:6px!important;bottom:30px!important}}

/* V6.5.3 GPX activities + multi-point measurement */
.activity-toggle.disabled{opacity:.45}
.activity-toggle.bike{border-bottom:3px solid #2563eb}.activity-toggle.walk{border-bottom:3px dashed #16a34a}.activity-toggle.run{border-bottom:3px dotted #e11d48}
.activity-symbol-wrap{background:transparent;border:0}.activity-symbol{width:30px;height:30px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:#fff;border:2px solid #334155;box-shadow:0 1px 5px #0005;font-size:17px}
.activity-popup{min-width:230px;font:13px Segoe UI,Arial}.activity-popup h3{margin:0 0 3px;font-size:16px}.activity-popup .activity-date{color:#667085;margin-bottom:8px}.activity-popup dl{display:grid;grid-template-columns:auto 1fr;gap:4px 12px;margin:7px 0}.activity-popup dt{font-weight:700}.activity-popup dd{margin:0;text-align:right}.activity-popup button{width:100%;margin-top:8px;padding:7px;border:1px solid #8793a5;border-radius:6px;background:#f8fafc;font-weight:700;cursor:pointer}.activity-popup button:disabled{opacity:.45;cursor:not-allowed}.activity-popup .activity-note{margin-top:7px;color:#475569;font-style:italic}
.measure-status{font:600 12px Segoe UI,Arial;white-space:nowrap;color:#334155}.mapwrap.measuring #map{cursor:crosshair}.measure-line{stroke:#7c3aed;stroke-width:3;stroke-dasharray:6 6}.measure-point{stroke:#6d28d9;fill:#fff;stroke-width:2}
@media(max-width:700px){.map-toolbar{right:5px;top:5px;max-width:calc(100% - 10px);gap:4px;padding:4px}.map-toolbar button,.map-toolbar select{padding:6px 7px;font-size:11px}.route-toggle{font-size:10px}.measure-status{font-size:10px;max-width:120px;overflow:hidden;text-overflow:ellipsis}}


/* V6.5.3 maintenance polish */
.leader-lines .leader-halo{
  stroke:rgba(255,255,255,.96)!important;
  stroke-width:6px!important;
  stroke-linecap:round!important;
  vector-effect:non-scaling-stroke;
}
.leader-lines .leader-core{
  stroke:#173f9f!important;
  stroke-width:2.6px!important;
  stroke-opacity:.95!important;
  stroke-linecap:round!important;
  vector-effect:non-scaling-stroke;
}
.leader-lines .leader-dot{
  fill:#f4c84a;
  stroke:#173f9f;
  stroke-width:1.5px;
  vector-effect:non-scaling-stroke;
}
.mapwrap.activity-popup-open .map-label-layer,
.mapwrap.activity-popup-open .leader-lines{
  visibility:hidden;
}
.activity-popup{
  min-width:245px;
  font:14px/1.3 "Segoe UI",Arial,sans-serif;
  color:#1f2933;
}
.activity-popup h3{
  display:flex;
  align-items:center;
  gap:7px;
  margin:0 0 4px;
  font-size:18px;
  line-height:1.18;
}
.activity-popup-icon{font-size:20px}
.activity-popup .activity-date{color:#667085;margin-bottom:10px}
.activity-popup dl{gap:6px 16px;margin:9px 0}
.activity-popup button{
  background:#2457d6;
  border-color:#2457d6;
  color:#fff;
  padding:8px 9px;
}
.activity-popup button:hover:not(:disabled){background:#173f9f}
.activity-popup button:disabled{background:#eef1f4;color:#98a2b3;border-color:#d0d5dd}
.photo-marker-hint{
  transition:opacity .45s ease;
}


/* V6.5.3 activity-route interaction */
.activity-symbol-wrap,.activity-symbol{display:none!important}
.mapwrap.activity-popup-open .map-label-layer,
.mapwrap.activity-popup-open .leader-lines{visibility:hidden!important}
.leaflet-popup-pane{z-index:750!important}
.activity-popup{min-width:255px}

.timeline-toggle{color:#6d28d9!important;border-bottom-color:#a78bfa!important}.timeline-toggle input{accent-color:#7c3aed}


/* V6.5.3: information-available badge on gallery and album thumbnails. */
.info-badge{
  position:absolute;left:6px;top:6px;width:30px;height:30px;border-radius:50%;
  border:1px solid rgba(23,78,166,.55);background:rgba(234,242,255,.96);
  color:#174ea6;font-size:18px;font-weight:800;line-height:27px;text-align:center;
  cursor:pointer;box-shadow:0 1px 5px rgba(0,0,0,.25);z-index:4
}
.info-badge:hover{background:#dceaff;transform:scale(1.05)}
.card,.album-card{position:relative}


/* V6.5.3 build-time MP3 narration */
.narration-disclosure{
  font-size:11px;color:#64748b;font-weight:600;white-space:nowrap
}
#speak-info:disabled{opacity:.5;cursor:not-allowed}

/* V6.5.3 information-card layout refinement */
.viewer-info-panel{
  position:absolute;
  z-index:20;
  top:18px;
  right:18px;
  bottom:18px;
  width:clamp(390px,34vw,560px);
  min-width:390px;
  box-sizing:border-box;
  display:flex;
  flex-direction:column;
  overflow:hidden;
  padding:18px 20px 16px;
  background:#f8fafc;
  color:#172033;
  border:1px solid #aeb9c8;
  border-radius:12px;
  box-shadow:0 8px 30px rgba(0,0,0,.42);
  text-align:left;
  user-select:text;
}
.viewer-info-panel.hidden{display:none!important}
.viewer-info-close{
  position:absolute;right:8px;top:8px;z-index:2;
  width:32px;height:32px;border:1px solid #c5ceda;border-radius:50%;
  background:#fff;color:#27364a;font-size:23px;line-height:27px;cursor:pointer
}
.viewer-info-close:hover{background:#e8eef7;border-color:#8796aa}
.viewer-info-heading{padding-right:34px;border-bottom:1px solid #d6dde7;padding-bottom:10px;margin-bottom:10px}
.viewer-info-heading #viewer-info-type{display:block;color:#5a6a7f;font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.045em;margin-bottom:5px}
.viewer-info-heading h3{margin:0;font-size:20px;line-height:1.25;color:#111827}
.viewer-info-scroll{min-height:0;overflow-y:auto;overscroll-behavior:contain;padding-right:8px;scrollbar-gutter:stable}
#viewer-info-description{margin:0;white-space:pre-wrap;font-size:15px;line-height:1.52;color:#1f2937}
.viewer-info-footer{flex:0 0 auto;margin-top:12px;padding-top:12px;border-top:1px solid #d6dde7}
.viewer-info-narration{display:flex;align-items:center;gap:10px;min-height:32px}
#speak-info{border:1px solid #8796aa;border-radius:7px;background:#fff;color:#172033;padding:6px 11px;font-weight:700;cursor:pointer}
#speak-info:hover:not(:disabled){background:#edf3fb;border-color:#58749b}
.narration-disclosure{margin-left:2px;font-size:12px;color:#66758a;font-weight:600;white-space:nowrap}
.viewer-info-source{display:block!important;margin-top:10px;color:#1456a0!important;text-decoration:underline;text-underline-offset:2px;font-size:14px;font-weight:700;line-height:1.35}
.viewer-info-source:visited{color:#5b3f9b!important}
.viewer-info-source:hover{color:#0b407c!important}
.viewer-info-source.hidden{display:none!important}

/* Reserve real space for the card so the photograph is not hidden beneath it. */
body.viewer-info-open .inspector-image{box-sizing:border-box;padding:14px max(438px,36vw) 14px 14px;gap:14px}
body.photos-only.viewer-info-open .inspector-image,
.photo-inspector:fullscreen .inspector-image:has(.viewer-info-panel:not(.hidden)),
.photo-inspector.is-fullscreen .inspector-image:has(.viewer-info-panel:not(.hidden)){
  padding:14px max(470px,34vw) 14px 14px
}

/* Information icon overlays thumbnails; it does not alter thumbnail dimensions. */
.info-badge{left:6px;top:6px;width:26px;height:26px;font-size:16px;line-height:23px;padding:0}

@media(max-width:1050px){
  .viewer-info-panel{width:390px;min-width:350px}
  body.viewer-info-open .inspector-image{padding-right:410px}
}
@media(max-width:760px){
  body.viewer-info-open .photo-inspector{left:0!important;width:100vw!important}
  body.viewer-info-open .inspector-image{padding:8px}
  .viewer-info-panel{
    left:10px;right:10px;top:auto;bottom:10px;width:auto;min-width:0;
    max-height:min(52vh,520px);padding:15px 16px 13px
  }
  .viewer-info-heading h3{font-size:18px}
  #viewer-info-description{font-size:14px}
}


/* V6.5.3 Location / Sublocation More Information */
.location-more-info-button{
  display:block;margin:10px 0 2px;padding:5px 9px;border:1px solid #8ab4f8;
  border-radius:6px;background:#eaf2ff;color:#174ea6;font-weight:750;
  font-size:12px;cursor:pointer
}
.location-more-info-button:hover{background:#dceaff}
.location-more-info-card{
  position:relative;margin:10px 0 8px;padding:14px 38px 13px 14px;
  background:#fff;border:1px solid #b8c3d1;border-radius:9px;
  box-shadow:0 2px 9px rgba(0,0,0,.10);max-height:340px;overflow:auto
}
.location-more-info-card h3{
  margin:0 0 8px;color:#172033;font-size:16px;line-height:1.3
}
#location-more-info-description{
  margin:0;white-space:pre-wrap;color:#273444;font-size:13px;line-height:1.5
}
#location-more-info-source{
  display:block;margin-top:11px;padding-top:9px;border-top:1px solid #e1e6ed;
  color:#174ea6!important;font-weight:750;text-decoration:none
}
#location-more-info-source:hover{text-decoration:underline}
.location-more-info-close{
  position:absolute;right:7px;top:5px;width:28px;height:28px;border:0;
  background:transparent;color:#334155;font-size:22px;line-height:1;cursor:pointer
}
.location-more-info-close:hover{color:#111827;background:#eef2f6;border-radius:50%}
@media(max-width:700px){
  .location-more-info-card{max-height:280px;padding-left:12px;padding-right:34px}
}


/* ================================================================
   V6.5.3 EXPLORE 360° — Panoramax bounding-box exploration
   ================================================================ */
#explore360.active{background:#dcecff;border-color:#3976c6;color:#174ea6;font-weight:750}
.mapwrap.explore360-drawing #map{cursor:crosshair!important}
.explore360-panel{
  position:absolute;z-index:8500;left:12px;right:12px;bottom:12px;
  background:rgba(247,249,252,.98);border:1px solid #aebbc9;border-radius:12px;
  box-shadow:0 5px 24px rgba(0,0,0,.22);overflow:hidden
}
.explore360-head{
  min-height:43px;display:flex;gap:10px;align-items:center;padding:7px 10px;
  background:#fff;border-bottom:1px solid #d6dde6
}
.explore360-head>div:first-child{display:flex;align-items:baseline;gap:10px;flex:1;min-width:0}
.explore360-head b{font-size:15px}.explore360-head span{font-size:12px;color:#5c6877;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.explore360-head label{display:flex;gap:5px;align-items:center;font-size:12px;color:#4a5565}
.explore360-head select{padding:3px 5px}.explore360-head button{white-space:nowrap}
#explore360-close,#explore360-modal-close{
  border:0;background:transparent;font-size:24px;line-height:1;cursor:pointer;color:#344154;
  padding:2px 7px;border-radius:50%
}
#explore360-close:hover,#explore360-modal-close:hover{background:#edf1f5}
.explore360-strip{
  display:flex;gap:9px;overflow-x:auto;overflow-y:hidden;padding:10px;
  scroll-snap-type:x proximity;min-height:164px;max-height:225px
}
.explore360-card{
  flex:0 0 210px;scroll-snap-align:start;background:#fff;border:2px solid transparent;
  border-radius:9px;padding:6px;box-shadow:0 1px 5px #0002;cursor:pointer;position:relative
}
.explore360-card.active{border-color:#235ec8;box-shadow:0 0 0 2px #b8d2ff,0 2px 8px #0003}
.explore360-card img,.explore360-mini-host{
  width:100%;height:112px;display:block;object-fit:cover;background:#172033;border-radius:6px;overflow:hidden
}
.explore360-mini-host pnx-photo-viewer{display:block;width:100%;height:112px}
.explore360-card-meta{display:flex;justify-content:space-between;gap:5px;margin-top:5px;font-size:11px;color:#586575}
.explore360-card-meta b{color:#243247}
.explore360-card-actions{display:flex;gap:5px;margin-top:5px}
.explore360-card-actions button{font-size:11px;padding:4px 7px;cursor:pointer}
.explore360-marker-wrap{background:transparent;border:0}
.explore360-marker{
  width:22px;height:22px;border-radius:50%;display:flex;align-items:center;justify-content:center;
  background:#fff;border:2px solid #5b21b6;color:#5b21b6;font-size:12px;font-weight:900;
  box-shadow:0 1px 5px #0005;transition:transform .12s,background .12s,color .12s
}
.explore360-marker.active{transform:scale(1.45);background:#5b21b6;color:#fff;border-color:#fff}
.explore360-selection{stroke:#5b21b6;stroke-width:2;fill:#7c3aed;fill-opacity:.10;stroke-dasharray:7 5}
.explore360-direction{stroke:#f97316;stroke-width:5;stroke-linecap:round}
.explore360-modal{
  position:fixed;inset:0;z-index:30000;background:rgba(0,0,0,.82);
  display:flex;align-items:center;justify-content:center;padding:20px
}
.explore360-modal.hidden{display:none}
.explore360-modal-card{
  width:min(1450px,96vw);height:min(900px,94vh);background:#101318;border-radius:12px;
  overflow:hidden;box-shadow:0 12px 55px #0009
}
.explore360-modal-head{
  height:48px;padding:8px 12px;display:flex;align-items:center;gap:12px;background:#fff;color:#172033
}
.explore360-modal-head b{flex:1}.explore360-modal-head span{font-size:12px;color:#64748b}
.explore360-modal-host{height:calc(100% - 48px);background:#111}
.explore360-modal-host pnx-photo-viewer{display:block;width:100%;height:100%}
.explore360-preloader{
  position:fixed;left:-5000px;top:0;width:500px;height:300px;opacity:.01;pointer-events:none;overflow:hidden
}
.explore360-preloader pnx-photo-viewer{display:block;width:500px;height:300px}
.explore360-empty{padding:28px;text-align:center;color:#667085;width:100%}
.location-more-info-card{width:calc(100% - 2px);max-width:none;margin-left:1px;margin-right:1px}

@media(max-width:800px){
  .explore360-panel{left:6px;right:6px;bottom:6px}
  .explore360-head{flex-wrap:wrap}.explore360-head>div:first-child{flex-basis:100%}
  .explore360-card{flex-basis:180px}.explore360-strip{max-height:210px}
}


/* V6.5.3 Explore 360° — sequence/path cards */
.explore360-sequence-card{flex-basis:260px}
.explore360-seq-label{font-weight:800;font-size:12px;color:#4c2c86;margin:1px 2px 6px}
.explore360-card-visual{height:128px;background:#172033;border-radius:6px;overflow:hidden}
.explore360-card-visual img,.explore360-card-visual .explore360-mini-host{
  width:100%;height:128px;display:block;object-fit:cover
}
.explore360-card-visual pnx-photo-viewer{display:block;width:100%;height:128px}
.explore360-thumb-empty{height:128px;display:flex;align-items:center;justify-content:center;color:#fff;font-weight:800}
.explore360-seq-nav{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:5px;margin-top:6px}
.explore360-seq-nav button{font-size:11px;padding:4px 5px;cursor:pointer}
.explore360-seq-nav button:disabled{opacity:.45;cursor:default}
.explore360-position{font-size:11px;color:#344154;white-space:nowrap}
.explore360-date{white-space:nowrap}
.explore360-sequence-card.active .explore360-seq-label{color:#174ea6}
.explore360-sequence-card.active{border-color:#235ec8;box-shadow:0 0 0 2px #b8d2ff,0 2px 8px #0003}


/* Explore 360 — Atlas-owned equirectangular WebGL proof of concept */
.explore360-card-visual{cursor:pointer}
.explore360-modal-host{
  position:relative!important;width:100%!important;height:calc(100% - 48px)!important;
  min-height:480px!important;background:#000!important;overflow:hidden
}
.atlas-equirect-canvas{
  display:block;width:100%;height:100%;background:#000;cursor:grab;touch-action:none
}
.atlas-equirect-canvas:active{cursor:grabbing}
.explore360-loading,.explore360-viewer-error{
  position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);
  z-index:30;padding:14px 18px;border-radius:9px;background:#fff;color:#172033;text-align:center;
  box-shadow:0 4px 22px #0008
}
.explore360-viewer-error{color:#8b1e1e;max-width:600px}

/* Mapillary-only Explore 360 POC */
.explore360-seq-label{color:#6a35d4}
.explore360-thumb-empty{font-size:12px}

#mapillary-token-btn{
  margin-left:8px;padding:3px 7px;font-size:11px;border:1px solid #b8c3d1;
  border-radius:6px;background:#fff;color:#334155;cursor:pointer
}

.explore360-limit-note{min-width:260px;max-width:360px;padding:12px;margin:8px;border:1px solid #d8b4fe;border-radius:9px;background:#faf5ff;color:#5b21b6;font-size:12px;line-height:1.35}

.explore360-source-label{display:inline-flex!important;align-items:center;gap:5px;white-space:nowrap;color:#344154!important}
#explore360-source{font-size:12px;padding:3px 5px}
.explore360-google-card{flex-basis:245px;min-height:118px}
.explore360-google-place{font-weight:750;font-size:13px;line-height:1.25;min-height:34px;padding:8px 2px;color:#263244}


/* Google Street View split-map exploration mode */
.explore360-source-toolbar{border:1px solid #c8ced7;background:white;padding:8px 7px;border-radius:6px;font:600 13px Segoe UI,Arial;cursor:pointer}
.google360-status{position:absolute;left:50%;bottom:14px;transform:translateX(-50%);z-index:8600;background:rgba(255,255,255,.96);border:1px solid #b9c3cf;border-radius:8px;padding:7px 11px;font-size:12px;font-weight:650;color:#475467;box-shadow:0 2px 8px #0002;white-space:nowrap}
.google-streetview-pane{display:grid;grid-template-rows:44px minmax(0,1fr);background:#111;min-width:0;min-height:0;border-left:2px solid #aeb8c4;z-index:2}
.google-streetview-head{display:flex;align-items:center;gap:10px;padding:6px 10px;background:#fff;border-bottom:1px solid #cfd6df;color:#172033}
.google-streetview-head b{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.google-streetview-head span{font-size:12px;color:#64748b;white-space:nowrap}
#google-streetview-close{border:0;background:transparent;font-size:25px;line-height:1;cursor:pointer;padding:2px 7px;border-radius:50%;color:#344154}
#google-streetview-close:hover{background:#edf1f5}
.google-streetview-host{min-height:0;background:#111}
body.google-streetview-split main{display:block}
body.google-streetview-split .sidebar,
body.google-streetview-split .gallery,
body.google-streetview-split #split-left,
body.google-streetview-split #split-right{display:none!important}
body.google-streetview-split .mapwrap{
  height:100%;display:grid;grid-template-columns:minmax(340px,40%) minmax(520px,60%);
  grid-template-rows:100%;overflow:hidden
}
body.google-streetview-split #map{grid-column:1;grid-row:1;width:100%;height:100%}
body.google-streetview-split .google-streetview-pane{grid-column:2;grid-row:1}
body.google-streetview-split .map-toolbar{right:auto;left:12px;max-width:calc(40% - 24px)}
body.google-streetview-split #leaderlines,
body.google-streetview-split #maplabels{width:40%}
body.google-streetview-split .explore360-panel{display:none!important}
.explore360-marker{width:18px;height:18px;font-size:9px;border-width:2px}
.explore360-marker.active{transform:scale(1.25)}

/* Refined 360 marker: enough room between text and circle outline */
.explore360-marker{
  width:26px;height:26px;
  font-size:9px;line-height:1;
  border-width:2px;
  box-sizing:border-box;
}
.explore360-marker.active{transform:scale(1.18)}

/* Final Explore 360 functional cleanup */
.explore360-menu{border:1px solid #c8ced7;background:white;padding:8px 10px;border-radius:6px;font:600 14px Segoe UI,Arial;cursor:pointer;min-width:150px}
.explore360-menu.active{outline:2px solid #8b5cf6;outline-offset:1px}
.google360-view-cone{filter:drop-shadow(0 1px 1px rgba(0,0,0,.2))}
