:root{
  --ubes-route-accent:#2f5d50;
  --ubes-route-accent-dark:#24483f;
  --ubes-route-bg:#f5f3ee;
  --ubes-route-surface:#ffffff;
  --ubes-route-text:#2d2d2d;
  --ubes-route-muted:#6f746f;
  --ubes-route-border:#dfe3df;
  --ubes-route-soft:#eef3f0;
}

.ubes-route-map-module,.ubes-route-logbook-table,.ubes-route-form{color:var(--ubes-route-text);font-family:inherit}
.ubes-route-map-module,.ubes-route-logbook-table{max-width:1180px;margin-left:auto;margin-right:auto}

/* MAP */
.ubes-route-master-map{
  width:100%;
  height:560px!important;
  min-height:560px!important;
  display:block!important;
  position:relative;
  border:1px solid #cfd8d2;
  border-radius:18px;
  overflow:hidden;
  background:#e9e8e2;
  margin:18px 0 18px;
  box-shadow:0 8px 26px rgba(36,72,63,.08);
}
.ubes-route-master-map .leaflet-overlay-pane{filter:none}
.ubes-route-master-map .leaflet-control-zoom{
  border:0!important;
  box-shadow:0 2px 10px rgba(36,72,63,.14)!important;
}
.ubes-route-master-map .leaflet-control-zoom a{
  background:rgba(255,255,255,.94)!important;
  color:var(--ubes-route-accent-dark)!important;
  border-color:#d8dfda!important;
  text-decoration:none!important;
  box-shadow:none!important;
}
.ubes-route-master-map .leaflet-control-zoom a:link,
.ubes-route-master-map .leaflet-control-zoom a:visited,
.ubes-route-master-map .leaflet-control-zoom a:hover,
.ubes-route-master-map .leaflet-control-zoom a:focus{
  text-decoration:none!important;
}

.ubes-route-master-map .leaflet-control-zoom a:hover{background:var(--ubes-route-soft)!important}

.ubes-route-master-map .ubes-route-reset-control{
  border:0!important;
  margin-top:8px!important;
  box-shadow:0 2px 10px rgba(36,72,63,.14)!important;
}
.ubes-route-master-map .ubes-route-reset-button{
  display:flex!important;
  align-items:center;
  justify-content:center;
  width:30px!important;
  height:30px!important;
  line-height:30px!important;
  background:rgba(255,255,255,.94)!important;
  color:var(--ubes-route-accent-dark)!important;
  border:1px solid #d8dfda!important;
  border-radius:4px!important;
  font-size:20px!important;
  font-weight:700!important;
  text-decoration:none!important;
  box-shadow:none!important;
}
.ubes-route-master-map .ubes-route-reset-button:hover,
.ubes-route-master-map .ubes-route-reset-button:focus{
  background:var(--ubes-route-soft)!important;
  color:var(--ubes-route-accent-dark)!important;
  text-decoration:none!important;
}

.ubes-route-master-map .leaflet-control-attribution{
  background:rgba(255,255,255,.78)!important;
  color:#66706a!important;
  font-size:10px!important;
}
.ubes-route-tooltip{
  border:1px solid #cfd8d2!important;
  border-radius:8px!important;
  background:rgba(255,255,255,.96)!important;
  color:var(--ubes-route-accent-dark)!important;
  box-shadow:0 4px 14px rgba(36,72,63,.12)!important;
  font-family:inherit!important;
  font-weight:650!important;
}

/* SELECTED ROUTE CARD */
.ubes-selected-route{
  width:min(820px,calc(100% - 28px));
  box-sizing:border-box;
  margin:0 auto 34px;
  border:1px solid var(--ubes-route-border);
  border-radius:15px;
  background:var(--ubes-route-surface);
  padding:20px 22px;
  box-shadow:0 5px 18px rgba(36,72,63,.055);
}
.ubes-selected-empty{text-align:center;color:var(--ubes-route-muted);padding:8px 4px;font-size:14px}
.ubes-selected-heading{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;flex-wrap:wrap}
.ubes-selected-heading h2{margin:0 0 4px;font-size:23px;line-height:1.2;color:var(--ubes-route-accent-dark)}
.ubes-route-meta-line{color:var(--ubes-route-muted);margin:0;font-size:14px}
.ubes-route-stats{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0 8px}
.ubes-route-stats>div{min-width:105px;padding:9px 13px;background:var(--ubes-route-soft);border-radius:10px;text-align:left}
.ubes-route-stats strong{display:inline;font-size:19px;line-height:1.05;color:var(--ubes-route-accent-dark)}
.ubes-route-stats span{display:inline;margin-left:4px;color:var(--ubes-route-muted);font-size:11px}
.ubes-route-section{margin:14px 0 0;padding-top:14px;border-top:1px solid #edf0ed}
.ubes-route-section h3{margin:0 0 6px;font-size:15px;color:var(--ubes-route-accent-dark)}
.ubes-route-section p{margin:0;white-space:pre-line;line-height:1.6;font-size:14px}
.ubes-route-credit{margin:17px 0 0;color:var(--ubes-route-muted);font-size:13px}
.ubes-selected-layout{display:grid;grid-template-columns:minmax(0,1fr) 230px;gap:24px;align-items:start}
.ubes-selected-main{min-width:0}
.ubes-route-image{width:230px;align-self:stretch;min-height:190px}
.ubes-route-image img{display:block;width:100%;height:100%;min-height:190px;max-height:300px;object-fit:cover;border-radius:12px}
.ubes-gpx-download,.ubes-route-submit{
  display:inline-flex;align-items:center;justify-content:center;min-height:42px;padding:9px 15px;border-radius:9px;border:0;
  background:var(--ubes-route-accent)!important;color:#fff!important;text-decoration:none!important;font-weight:700;cursor:pointer;white-space:nowrap;
  transition:background .18s ease,transform .18s ease;
}
.ubes-gpx-download:hover,.ubes-route-submit:hover{background:var(--ubes-route-accent-dark);transform:translateY(-1px)}

/* LOGBOOK TABLE */
.ubes-route-logbook-table{margin-top:12px;margin-bottom:34px}
.ubes-logbook-controls{
  display:grid;grid-template-columns:2fr repeat(4,minmax(135px,1fr));gap:12px;align-items:end;margin-bottom:12px;
  padding:15px;background:var(--ubes-route-bg);border:1px solid #e4e2db;border-radius:14px;
}
.ubes-logbook-controls label{display:flex;flex-direction:column;gap:6px;font-size:11px;font-weight:700;color:#4f5652;text-transform:uppercase;letter-spacing:.035em}
.ubes-logbook-controls input,.ubes-logbook-controls select{
  width:100%;box-sizing:border-box;border:1px solid #cbd3ce;border-radius:9px;padding:10px 11px;background:#fff;color:var(--ubes-route-text);
  font-size:14px;text-transform:none;letter-spacing:0;
}
.ubes-logbook-controls input:focus,.ubes-logbook-controls select:focus,.ubes-route-form input:focus,.ubes-route-form select:focus,.ubes-route-form textarea:focus{
  outline:2px solid rgba(47,93,80,.24);border-color:var(--ubes-route-accent)
}
.ubes-logbook-count{font-size:13px;color:var(--ubes-route-muted);margin:10px 2px}
.ubes-table-scroll{overflow-x:auto;border:1px solid var(--ubes-route-border);border-radius:14px;background:#fff}
.ubes-route-table{width:100%;border-collapse:collapse;min-width:920px;margin:0}
.ubes-route-table th,.ubes-route-table td{text-align:left;padding:12px 13px;border-bottom:1px solid #edf0ed;font-size:14px;vertical-align:middle}
.ubes-route-table th{background:#f3f5f3;font-weight:700;white-space:nowrap;color:#454c48}
.ubes-route-table tbody tr{cursor:pointer;background:#fff;transition:background .14s ease}
.ubes-route-table tbody tr:last-child td{border-bottom:0}
.ubes-route-table tbody tr:hover,.ubes-route-table tbody tr:focus,.ubes-route-table tbody tr.is-selected{background:#edf3f0;outline:none}
.ubes-route-table tbody tr.is-selected td:first-child{box-shadow:inset 4px 0 0 var(--ubes-route-accent)}
.ubes-route-table tbody td:first-child{font-weight:700;color:var(--ubes-route-accent-dark)}

/* SUBMISSION FORM */
.ubes-route-form{max-width:980px;margin:0 auto;padding:24px 26px;background:var(--ubes-route-bg);border:1px solid #e1e0d9;border-radius:15px}
.ubes-form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:17px 20px}
.ubes-form-wide{grid-column:1/-1}
.ubes-route-form label{display:block;font-weight:650;margin:0 0 7px;color:#404642}
.ubes-route-form input,.ubes-route-form select,.ubes-route-form textarea{width:100%;box-sizing:border-box;font:inherit}
.ubes-route-form input[type=text],.ubes-route-form input[type=email],.ubes-route-form input[type=date],.ubes-route-form input[type=file],.ubes-route-form select,.ubes-route-form textarea{
  border:1px solid #cbd3ce;border-radius:9px;padding:10px 12px;background:#fff;color:var(--ubes-route-text)
}
.ubes-route-form textarea{resize:vertical;line-height:1.5}
.ubes-route-form small{display:block;margin-top:6px;color:var(--ubes-route-muted);font-size:12px;line-height:1.45}
.ubes-route-submit{margin-top:22px;font-size:15px}
.ubes-route-message{max-width:980px;margin:0 auto 18px;padding:14px 18px;border-radius:10px}
.ubes-route-success{background:#edf5f0;border:1px solid #aac8b6}
.ubes-route-error{background:#fff1f1;border:1px solid #d5a3a3}

/* OLD CARD SHORTCODE */
.ubes-route-cards{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;max-width:980px;margin:0 auto}
.ubes-route-card{border:1px solid var(--ubes-route-border);border-radius:13px;background:#fff}
.ubes-route-card-body{padding:16px}
.ubes-route-card-body h3{margin:0 0 7px;font-size:18px}
.ubes-route-card-meta{color:var(--ubes-route-muted);font-size:13px}
.ubes-map-error{display:flex;align-items:center;justify-content:center;min-height:220px;padding:24px;text-align:center;background:var(--ubes-route-bg);color:#5b5b5b;border:1px solid var(--ubes-route-border);border-radius:14px}

@media(max-width:1000px){
  .ubes-logbook-controls{grid-template-columns:repeat(2,minmax(0,1fr))}
  .ubes-search-control{grid-column:1/-1}
}
@media(max-width:800px){
  .ubes-route-master-map{height:430px!important;min-height:430px!important}
  .ubes-route-cards{grid-template-columns:repeat(2,minmax(0,1fr))}
  .ubes-selected-layout{grid-template-columns:minmax(0,1fr) 190px}
  .ubes-route-image{width:190px}
}
@media(max-width:600px){
  .ubes-route-master-map{height:350px!important;min-height:350px!important;border-radius:12px}
  .ubes-logbook-controls,.ubes-form-grid,.ubes-route-cards{grid-template-columns:1fr}
  .ubes-selected-layout{grid-template-columns:1fr}
  .ubes-route-image{width:100%;min-height:0;order:-1}
  .ubes-route-image img{height:180px;min-height:180px;max-height:180px}
  .ubes-search-control,.ubes-form-wide{grid-column:auto}
  .ubes-route-form{padding:18px}
  .ubes-selected-route{width:calc(100% - 16px);padding:17px}
  .ubes-selected-heading{display:block}
  .ubes-gpx-download{margin-top:12px}
  .ubes-route-stats{gap:6px}
  .ubes-route-stats>div{min-width:0;flex:1;padding:9px 8px;text-align:center}
  .ubes-route-stats strong{font-size:17px}
  .ubes-route-stats span{display:block;margin:3px 0 0;font-size:10px}
}

/* CLEAN MAP LABELS */
.ubes-route-master-map .leaflet-tile-pane{filter:sepia(.04) saturate(.55) brightness(1.02) contrast(.94)}

/* v0.3 map overview + clustering */
.ubes-route-map-toolbar{display:flex;align-items:center;justify-content:space-between;gap:18px;margin:0 0 12px}
.ubes-route-map-toolbar p{margin:0;color:var(--ubes-route-muted);font-size:14px;line-height:1.45}
.ubes-route-submit-link{display:inline-flex;align-items:center;justify-content:center;min-height:42px;padding:9px 16px;border-radius:9px;background:var(--ubes-route-accent)!important;color:#fff!important;text-decoration:none!important;font-weight:700;white-space:nowrap}
.ubes-route-submit-link:hover{background:var(--ubes-route-accent-dark)!important;color:#fff!important}
.ubes-route-pin-wrap{background:none!important;border:0!important}
.ubes-route-pin{position:relative;display:block;width:24px;height:24px;border-radius:50% 50% 50% 0;background:#fff;border:3px solid var(--ubes-route-accent);transform:rotate(-45deg);box-shadow:0 2px 8px rgba(24,49,42,.22)}
.ubes-route-pin-dot{position:absolute;width:7px;height:7px;border-radius:50%;background:var(--ubes-route-accent);left:50%;top:50%;transform:translate(-50%,-50%)}
.ubes-route-pin.is-selected{border-color:var(--ubes-route-accent-dark);background:var(--ubes-route-accent-dark);transform:rotate(-45deg) scale(1.12)}
.ubes-route-pin.is-selected .ubes-route-pin-dot{background:#fff}
.ubes-route-cluster{background:transparent!important;border:0!important}
.ubes-route-cluster span{display:flex;align-items:center;justify-content:center;width:100%;height:100%;box-sizing:border-box;border-radius:999px;background:rgba(47,93,80,.92);border:3px solid rgba(255,255,255,.95);color:#fff;font-weight:800;font-size:13px;box-shadow:0 2px 10px rgba(24,49,42,.24)}
.ubes-route-cluster-medium span{font-size:14px;background:rgba(47,93,80,.94)}
.ubes-route-cluster-large span{font-size:15px;background:rgba(36,72,63,.96)}
/* override previous map tile filter: let the basemap handle its own zoom-dependent styling */
.ubes-route-master-map .leaflet-tile-pane{filter:none!important}
@media(max-width:600px){.ubes-route-map-toolbar{align-items:flex-start;flex-direction:column}.ubes-route-submit-link{width:100%;box-sizing:border-box}}

/* v0.3.1 — explicit button text and elapsed stat */
.ubes-gpx-download,
.ubes-route-submit-link,
.ubes-route-submit {
  color:#ffffff!important;
  -webkit-text-fill-color:#ffffff!important;
  font-family:inherit!important;
  font-size:14px!important;
  line-height:1.2!important;
  opacity:1!important;
  visibility:visible!important;
}
.ubes-gpx-download:visited,
.ubes-route-submit-link:visited {
  color:#ffffff!important;
  -webkit-text-fill-color:#ffffff!important;
}
.ubes-gpx-download::before{content:"↓";display:inline-block;margin-right:7px;font-weight:800}
.ubes-route-submit-link::after{content:"→";display:inline-block;margin-left:7px;font-weight:800}
.ubes-route-stats [data-route-time-stat][hidden]{display:none!important}
.ubes-route-form #ubes_elapsed{font-variant-numeric:tabular-nums}
.ubes-route-table{min-width:1080px}

/* v0.3.2 — drag-and-drop uploads */
.ubes-dropzone{
  position:relative;display:flex;align-items:center;gap:14px;min-height:96px;padding:17px 18px;
  border:2px dashed #b7c5bd;border-radius:12px;background:#fff;cursor:pointer;box-sizing:border-box;
  transition:border-color .16s ease,background .16s ease,box-shadow .16s ease;
}
.ubes-dropzone:hover,.ubes-dropzone:focus-visible{border-color:var(--ubes-route-accent);background:#f7faf8;outline:none;box-shadow:0 0 0 3px rgba(47,93,80,.10)}
.ubes-dropzone.is-dragover{border-color:var(--ubes-route-accent);background:#edf4f0;box-shadow:0 0 0 3px rgba(47,93,80,.13)}
.ubes-dropzone.has-file{border-style:solid;border-color:#9eb9aa;background:#f5f9f7}
.ubes-dropzone input[type=file]{position:absolute!important;width:1px!important;height:1px!important;opacity:0!important;overflow:hidden!important;padding:0!important;border:0!important;pointer-events:none!important}
.ubes-dropzone-icon{flex:0 0 42px;width:42px;height:42px;border-radius:50%;display:flex;align-items:center;justify-content:center;background:var(--ubes-route-soft);color:var(--ubes-route-accent-dark);font-size:24px;font-weight:700;line-height:1}
.ubes-dropzone-copy{min-width:0;display:flex;flex-direction:column;gap:2px}
.ubes-dropzone-copy strong{font-size:15px;color:var(--ubes-route-accent-dark)}
.ubes-dropzone-copy span{font-size:12px;color:var(--ubes-route-muted)}
.ubes-dropzone-file{margin-left:auto;max-width:38%;font-size:12px;color:var(--ubes-route-muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;text-align:right}
.ubes-dropzone.has-file .ubes-dropzone-file{color:var(--ubes-route-accent-dark);font-weight:650}
@media(max-width:600px){.ubes-dropzone{align-items:flex-start;flex-wrap:wrap}.ubes-dropzone-file{width:100%;max-width:none;margin-left:56px;text-align:left}}


/* v0.3.4 — compact route stats and GPX elevation profile */
.ubes-route-stats>div{display:flex;align-items:baseline;gap:5px;min-width:0}
.ubes-route-stats strong,.ubes-route-stats span{font-size:18px;line-height:1.1;font-weight:700;color:var(--ubes-route-accent-dark);margin:0}
.ubes-route-stats .ubes-stat-arrow{font-size:20px;font-weight:700}
.ubes-route-stats [data-route-time-stat] strong{white-space:nowrap}
.ubes-elevation-profile{margin:14px 0 18px;padding:12px 14px 8px;border:1px solid var(--ubes-route-border);border-radius:12px;background:#fbfcfa}
.ubes-elevation-profile[hidden]{display:none!important}
.ubes-elevation-profile-head{display:flex;justify-content:space-between;gap:12px;margin-bottom:5px;font-size:12px;font-weight:600;color:var(--ubes-route-muted)}
.ubes-elevation-profile svg{display:block;width:100%;height:auto;max-height:160px;overflow:visible}
.ubes-elevation-area{fill:rgba(47,93,80,.13)}
.ubes-elevation-line{fill:none;stroke:var(--ubes-route-accent);stroke-width:3;stroke-linecap:round;stroke-linejoin:round}
.ubes-elevation-axis{stroke:#cfd8d4;stroke-width:1}
.ubes-elevation-label{fill:var(--ubes-route-muted);font-size:11px;font-family:inherit}
@media(max-width:480px){.ubes-route-stats strong,.ubes-route-stats span{font-size:15px}.ubes-route-stats .ubes-stat-arrow{font-size:17px}.ubes-elevation-profile{padding:10px 8px 6px}}


/* v0.3.5 — selected route information lives inside the map */
.ubes-route-map-stage{
  position:relative;
  width:100%;
  margin:18px 0 30px;
}
.ubes-route-master-map{
  height:740px!important;
  min-height:740px!important;
  margin:0!important;
}
.ubes-selected-route{
  position:absolute;
  z-index:700;
  top:18px;
  right:18px;
  width:min(390px,calc(100% - 36px));
  max-height:704px;
  overflow:auto;
  box-sizing:border-box;
  margin:0;
  padding:17px 18px 18px;
  border:1px solid rgba(207,216,210,.95);
  border-radius:14px;
  background:rgba(255,255,255,.96);
  box-shadow:0 8px 28px rgba(24,49,42,.17);
  backdrop-filter:blur(5px);
  -webkit-backdrop-filter:blur(5px);
}
.ubes-selected-empty{padding:2px 3px;text-align:left;font-size:13px;line-height:1.45}
.ubes-selected-layout{display:block}
.ubes-selected-heading h2{font-size:20px}
.ubes-route-meta-line{font-size:12.5px}
.ubes-route-stats{margin:13px 0 8px;gap:6px}
.ubes-route-stats>div{min-width:0;padding:8px 10px}
.ubes-route-stats strong,.ubes-route-stats span{font-size:15px}
.ubes-route-stats .ubes-stat-arrow{font-size:17px}
.ubes-route-image{width:100%;min-height:0;margin:12px 0 0}
.ubes-route-image img{width:100%;height:150px;min-height:150px;max-height:150px;border-radius:10px}
.ubes-route-section{margin-top:11px;padding-top:11px}
.ubes-route-section h3{font-size:13px}
.ubes-route-section p{font-size:12.5px;line-height:1.5}
.ubes-route-credit{margin-top:12px;font-size:11.5px}
.ubes-gpx-download{min-height:38px;padding:7px 12px;margin-top:9px;font-size:13px}
.ubes-elevation-profile{margin:12px 0 13px;padding:10px 8px 5px}
.ubes-elevation-profile-head{font-size:11px;margin:0 4px 3px}
.ubes-elevation-profile svg{max-height:165px}
.ubes-elevation-gridline{stroke:#e6ebe8;stroke-width:1}
.ubes-elevation-peak-dot{fill:var(--ubes-route-accent-dark);stroke:#fff;stroke-width:2}
.ubes-elevation-peak-label{
  fill:var(--ubes-route-accent-dark);
  font-size:11px;
  font-weight:800;
  font-family:inherit;
  paint-order:stroke;
  stroke:#fff;
  stroke-width:4px;
  stroke-linejoin:round;
}
@media(max-width:900px){
  .ubes-route-master-map{height:650px!important;min-height:650px!important}
  .ubes-selected-route{top:14px;right:14px;width:min(350px,calc(100% - 28px));max-height:620px}
}
@media(max-width:600px){
  .ubes-route-master-map{height:610px!important;min-height:610px!important}
  .ubes-selected-route{
    top:auto;right:10px;bottom:10px;left:10px;
    width:auto;max-height:335px;
    padding:14px;
  }
  .ubes-route-image img{height:120px;min-height:120px;max-height:120px}
}

/* v0.3.6 — selected route information frames the map instead of covering it */
.ubes-route-map-stage{
  position:relative;
  width:100%;
  margin:18px 0 34px;
  color:var(--ubes-route-text);
}
.ubes-selected-empty{
  margin:0 0 10px;
  padding:0;
  font-size:13px;
  color:var(--ubes-route-muted);
  text-align:left;
}
.ubes-route-frame-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:28px;
  padding:0 2px 14px;
  border-bottom:1px solid var(--ubes-route-border);
}
.ubes-route-frame-title{min-width:0}
.ubes-route-frame-title h2{
  margin:0 0 10px!important;
  color:var(--ubes-route-accent-dark)!important;
  font-size:27px!important;
  line-height:1.15!important;
}
.ubes-route-frame-title .ubes-route-meta-line{margin:0;font-size:13px;color:var(--ubes-route-muted)}
.ubes-route-frame-head .ubes-route-stats{
  margin:0;
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-end;
  gap:16px;
}
.ubes-route-frame-head .ubes-route-stats>div{
  padding:0;
  background:transparent;
  border:0;
  border-radius:0;
}
.ubes-route-frame-head .ubes-route-stats strong,
.ubes-route-frame-head .ubes-route-stats span{
  font-size:17px;
  font-weight:700;
}
.ubes-route-frame-body{
  display:grid;
  grid-template-columns:minmax(0,1fr);
  align-items:stretch;
  gap:0;
  margin-top:14px;
}
.ubes-route-map-stage.has-selection.has-photo.has-notes .ubes-route-frame-body{
  grid-template-columns:210px minmax(430px,1fr) 255px;
  gap:18px;
}
.ubes-route-map-stage.has-selection.has-photo:not(.has-notes) .ubes-route-frame-body{
  grid-template-columns:220px minmax(0,1fr);
  gap:18px;
}
.ubes-route-map-stage.has-selection.has-notes:not(.has-photo) .ubes-route-frame-body{
  grid-template-columns:minmax(0,1fr) 275px;
  gap:18px;
}
.ubes-route-map-wrap{
  min-width:0;
  position:relative;
  overflow:hidden;
  border:1px solid var(--ubes-route-border);
  border-radius:14px;
  background:#eef1ed;
}
.ubes-route-master-map{
  height:660px!important;
  min-height:660px!important;
  width:100%!important;
  margin:0!important;
  border:0!important;
  border-radius:0!important;
}
.ubes-route-frame-photo,
.ubes-route-frame-notes{
  min-width:0;
  display:flex;
  flex-direction:column;
  justify-content:flex-start;
}
.ubes-route-frame-photo{padding-top:2px}
.ubes-route-frame-photo .ubes-route-image{
  width:100%;
  margin:0;
  min-height:0;
  background:transparent;
  border:0;
}
.ubes-route-frame-photo .ubes-route-image img{
  display:block;
  width:100%;
  height:auto;
  min-height:0;
  max-height:330px;
  object-fit:cover;
  border-radius:12px;
  box-shadow:none;
}
.ubes-route-frame-notes{
  padding:4px 0 2px 18px;
  border-left:1px solid var(--ubes-route-border);
  gap:20px;
}
.ubes-route-frame-notes .ubes-route-section{margin:0}
.ubes-route-frame-notes .ubes-route-section h3{
  margin:0 0 6px!important;
  color:var(--ubes-route-accent-dark)!important;
  font-size:14px!important;
  text-transform:uppercase;
  letter-spacing:.045em;
}
.ubes-route-frame-notes .ubes-route-section p{
  margin:0;
  font-size:13px;
  line-height:1.58;
}
.ubes-route-frame-foot{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:end;
  gap:24px;
  margin-top:16px;
  padding-top:14px;
  border-top:1px solid var(--ubes-route-border);
}
.ubes-route-frame-foot .ubes-elevation-profile{
  margin:0;
  padding:0;
  border:0;
  border-radius:0;
  background:transparent;
}
.ubes-route-frame-foot .ubes-elevation-profile svg{max-height:190px}
.ubes-route-frame-actions{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:10px;
  padding-bottom:4px;
  min-width:190px;
}
.ubes-route-frame-actions .ubes-route-credit{margin:0;text-align:right;font-size:12px;color:var(--ubes-route-muted)}
.ubes-route-frame-actions .ubes-gpx-download{margin:0}

/* Overview pin is located at the route's actual GPX start point. */
.ubes-route-endpoint-wrap{background:none!important;border:0!important}
.ubes-route-endpoint{
  display:flex;
  align-items:center;
  justify-content:center;
  width:30px;
  height:30px;
  box-sizing:border-box;
  border-radius:999px;
  border:2px solid #fff;
  background:var(--ubes-route-accent-dark);
  color:#fff;
  font-size:11px;
  font-weight:800;
  line-height:1;
  box-shadow:0 2px 8px rgba(24,49,42,.28);
}
.ubes-route-endpoint.is-combined{
  width:38px;
  height:38px;
  font-size:10px;
  letter-spacing:-.02em;
}

/* Keep theme link decoration away from map controls. */
.ubes-route-master-map .leaflet-control a,
.ubes-route-master-map .leaflet-control a:hover,
.ubes-route-master-map .leaflet-control a:focus{
  text-decoration:none!important;
  border-bottom:0!important;
  box-shadow:none!important;
}

@media(max-width:1120px){
  .ubes-route-map-stage.has-selection.has-photo.has-notes .ubes-route-frame-body{
    grid-template-columns:180px minmax(390px,1fr) 220px;
    gap:14px;
  }
}
@media(max-width:900px){
  .ubes-route-frame-head{align-items:flex-start;flex-direction:column;gap:10px}
  .ubes-route-frame-head .ubes-route-stats{justify-content:flex-start}
  .ubes-route-map-stage.has-selection.has-photo.has-notes .ubes-route-frame-body,
  .ubes-route-map-stage.has-selection.has-photo:not(.has-notes) .ubes-route-frame-body,
  .ubes-route-map-stage.has-selection.has-notes:not(.has-photo) .ubes-route-frame-body{
    grid-template-columns:1fr;
    gap:14px;
  }
  .ubes-route-map-wrap{order:1}
  .ubes-route-frame-photo{order:2}
  .ubes-route-frame-notes{order:3;padding:12px 0 0;border-left:0;border-top:1px solid var(--ubes-route-border)}
  .ubes-route-frame-photo .ubes-route-image img{height:220px;max-height:220px}
  .ubes-route-frame-foot{grid-template-columns:1fr}
  .ubes-route-frame-actions{align-items:flex-start;min-width:0}
  .ubes-route-frame-actions .ubes-route-credit{text-align:left}
}
@media(max-width:600px){
  .ubes-route-master-map{height:500px!important;min-height:500px!important}
  .ubes-route-frame-title h2{font-size:23px!important}
  .ubes-route-frame-head .ubes-route-stats{gap:10px}
  .ubes-route-frame-head .ubes-route-stats strong,
  .ubes-route-frame-head .ubes-route-stats span{font-size:15px}
}

/* v0.3.7 — route information sits inside the map as translucent overlays */
.ubes-route-map-stage{
  position:relative;
  width:100%;
  margin:18px 0 34px;
}
.ubes-route-map-wrap{
  position:relative;
  width:100%;
  min-width:0;
  overflow:hidden;
  border:1px solid var(--ubes-route-border);
  border-radius:14px;
  background:#eef1ed;
}
.ubes-route-master-map{
  width:100%!important;
  height:660px!important;
  min-height:660px!important;
  margin:0!important;
  border:0!important;
  border-radius:0!important;
}
.ubes-map-overlay{
  position:absolute;
  z-index:700;
  box-sizing:border-box;
  border:1px solid rgba(210,220,215,.78);
  background:rgba(255,255,255,.82);
  box-shadow:0 5px 20px rgba(24,49,42,.12);
  backdrop-filter:blur(7px);
  -webkit-backdrop-filter:blur(7px);
}
.ubes-map-overlay[hidden]{display:none!important}
.ubes-map-hint{
  top:14px;
  left:50%;
  transform:translateX(-50%);
  width:auto;
  max-width:calc(100% - 120px);
  margin:0;
  padding:8px 12px;
  border-radius:999px;
  color:var(--ubes-route-muted);
  font-size:12px;
  text-align:center;
  white-space:nowrap;
}
.ubes-map-overlay-head{
  top:16px;
  left:16px;
  width:min(470px,calc(100% - 32px));
  padding:14px 16px 13px;
  border-radius:12px;
  display:block;
}
.ubes-map-overlay-head .ubes-route-frame-title h2{
  margin:0 0 4px!important;
  color:var(--ubes-route-accent-dark)!important;
  font-size:22px!important;
  line-height:1.15!important;
}
.ubes-map-overlay-head .ubes-route-meta-line{
  margin:0 0 10px;
  color:var(--ubes-route-muted);
  font-size:12.5px;
}
.ubes-map-overlay-head .ubes-route-stats{
  margin:0;
  display:flex;
  flex-wrap:wrap;
  justify-content:flex-start;
  gap:13px;
}
.ubes-map-overlay-head .ubes-route-stats>div{
  padding:0;
  border:0;
  background:transparent;
}
.ubes-map-overlay-head .ubes-route-stats strong,
.ubes-map-overlay-head .ubes-route-stats span{
  font-size:15px;
  font-weight:700;
}
.ubes-map-overlay-photo{
  top:16px;
  right:16px;
  width:220px;
  padding:7px;
  border-radius:12px;
}
.ubes-map-overlay-photo .ubes-route-image{margin:0;width:100%;min-height:0;background:transparent;border:0}
.ubes-map-overlay-photo .ubes-route-image img{
  display:block;
  width:100%;
  height:128px;
  min-height:128px;
  max-height:128px;
  object-fit:cover;
  border-radius:8px;
}
.ubes-map-overlay-notes{
  top:168px;
  right:16px;
  width:min(285px,calc(100% - 32px));
  max-height:280px;
  overflow:auto;
  padding:13px 14px;
  border-radius:12px;
}
.ubes-map-overlay-notes .ubes-route-section{margin:0;padding:0;border:0}
.ubes-map-overlay-notes .ubes-route-section + .ubes-route-section{margin-top:12px;padding-top:11px;border-top:1px solid rgba(210,220,215,.72)}
.ubes-map-overlay-notes .ubes-route-section h3{
  margin:0 0 5px!important;
  color:var(--ubes-route-accent-dark)!important;
  font-size:11px!important;
  text-transform:uppercase;
  letter-spacing:.05em;
}
.ubes-map-overlay-notes .ubes-route-section p{
  margin:0;
  font-size:12px;
  line-height:1.5;
}
.ubes-map-overlay-foot{
  left:16px;
  right:16px;
  bottom:16px;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:end;
  gap:16px;
  padding:10px 12px 10px;
  border-radius:12px;
}
.ubes-map-overlay-foot .ubes-elevation-profile{
  margin:0;
  padding:0;
  border:0;
  background:transparent;
  min-width:0;
}
.ubes-map-overlay-foot .ubes-elevation-profile-head{margin:0 3px 2px;font-size:10.5px}
.ubes-map-overlay-foot .ubes-elevation-profile svg{display:block;width:100%;height:112px;max-height:112px}
.ubes-map-overlay-foot .ubes-route-frame-actions{
  min-width:180px;
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:8px;
  padding:0;
}
.ubes-map-overlay-foot .ubes-route-credit{margin:0;text-align:right;font-size:11px;line-height:1.4;color:var(--ubes-route-muted)}
.ubes-map-overlay-foot .ubes-gpx-download{margin:0;min-height:38px;padding:7px 12px;font-size:12.5px}

/* Keep the selected route readable beneath the overlays. */
.ubes-route-map-stage.has-selection .leaflet-control-container{z-index:750}

/* Clean reset control: this is a map-home action, not a page refresh. */
.ubes-route-master-map .ubes-route-reset-button{
  width:34px!important;
  height:34px!important;
  line-height:34px!important;
  font-size:19px!important;
  font-weight:700!important;
  text-decoration:none!important;
}

@media(max-width:900px){
  .ubes-map-overlay-head{width:min(410px,calc(100% - 32px))}
  .ubes-map-overlay-photo{width:180px}
  .ubes-map-overlay-photo .ubes-route-image img{height:108px;min-height:108px;max-height:108px}
  .ubes-map-overlay-notes{top:146px;width:245px;max-height:245px}
  .ubes-map-overlay-foot{grid-template-columns:1fr;gap:7px}
  .ubes-map-overlay-foot .ubes-route-frame-actions{min-width:0;flex-direction:row;justify-content:space-between;align-items:center}
  .ubes-map-overlay-foot .ubes-route-credit{text-align:left}
  .ubes-map-overlay-foot .ubes-elevation-profile svg{height:95px;max-height:95px}
}
@media (max-width:1200px), (max-width:1366px) and (any-pointer:coarse), (max-width:1366px) and (hover:none){
  .ubes-route-master-map{height:560px!important;min-height:560px!important}
  .ubes-map-overlay-head{top:10px;left:10px;right:10px;width:auto;padding:11px 12px}
  .ubes-map-overlay-head .ubes-route-frame-title h2{font-size:18px!important}
  .ubes-map-overlay-head .ubes-route-meta-line{margin-bottom:7px;font-size:11px}
  .ubes-map-overlay-head .ubes-route-stats{gap:9px}
  .ubes-map-overlay-head .ubes-route-stats strong,.ubes-map-overlay-head .ubes-route-stats span{font-size:13px}
  .ubes-map-overlay-photo{display:none!important}
  .ubes-map-overlay-notes{top:auto;right:10px;left:10px;bottom:152px;width:auto;max-height:125px;padding:9px 10px}
  .ubes-map-overlay-notes .ubes-route-section p{font-size:11px;line-height:1.4}
  .ubes-map-overlay-foot{left:10px;right:10px;bottom:10px;padding:8px 9px}
  .ubes-map-overlay-foot .ubes-elevation-profile svg{height:74px;max-height:74px}
  .ubes-map-overlay-foot .ubes-route-frame-actions{gap:6px;flex-wrap:wrap}
  .ubes-map-hint{top:10px;max-width:calc(100% - 100px);white-space:normal}
}

/* v0.3.9 selected-route overlay refinements */
.ubes-route-master-map .leaflet-control-zoom{
  border:1px solid #d8dfda!important;
  border-radius:5px!important;
  overflow:hidden;
  box-shadow:0 2px 10px rgba(36,72,63,.14)!important;
}
.ubes-route-master-map .leaflet-control-zoom a{
  width:34px!important;
  height:34px!important;
  line-height:34px!important;
  border-left:0!important;
  border-right:0!important;
}
.ubes-route-master-map .leaflet-control-zoom .ubes-route-reset-button{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  margin:0!important;
  width:34px!important;
  height:34px!important;
  line-height:34px!important;
  border:0!important;
  border-top:1px solid #d8dfda!important;
  border-radius:0!important;
  font-size:18px!important;
  box-shadow:none!important;
}

/* Panels hug the map edges instead of floating inward. */
.ubes-map-overlay-head{
  top:0!important;
  left:48px!important;
  width:min(500px,calc(100% - 300px))!important;
  border-radius:0 0 12px 0!important;
}
.ubes-map-overlay-notes{
  top:160px!important;
  left:0!important;
  right:auto!important;
  width:min(300px,30%)!important;
  max-height:260px!important;
  border-radius:0 12px 12px 0!important;
}
.ubes-map-overlay-photo{
  top:0!important;
  right:0!important;
  width:225px!important;
  padding:7px!important;
  border-radius:0 0 0 12px!important;
}
.ubes-map-overlay-photo .ubes-route-image{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:6px!important;
}
.ubes-map-overlay-photo .ubes-route-image img{
  width:100%!important;
  height:96px!important;
  min-height:96px!important;
  max-height:96px!important;
  object-fit:cover!important;
  border-radius:8px!important;
}
.ubes-map-overlay-photo .ubes-route-image[data-count="1"] img{height:145px!important;min-height:145px!important;max-height:145px!important}
.ubes-map-overlay-photo .ubes-route-image[data-count="2"] img{height:112px!important;min-height:112px!important;max-height:112px!important}

.ubes-map-overlay-foot{
  left:0!important;
  right:0!important;
  bottom:0!important;
  display:block!important;
  padding:12px 14px 10px!important;
  border-radius:12px 12px 0 0!important;
}
.ubes-map-overlay-foot .ubes-elevation-profile{width:100%!important}
.ubes-map-overlay-foot .ubes-elevation-profile svg{
  width:100%!important;
  height:185px!important;
  max-height:185px!important;
}
.ubes-map-overlay-foot .ubes-elevation-profile-head{font-size:11px!important;margin:0 4px 0!important}
.ubes-map-overlay-foot .ubes-route-frame-actions{
  position:absolute!important;
  right:14px!important;
  top:10px!important;
  z-index:2!important;
  min-width:0!important;
  align-items:flex-end!important;
  gap:6px!important;
}
.ubes-map-overlay-foot .ubes-route-credit{font-size:11px!important}
.ubes-map-overlay-foot .ubes-gpx-download{min-height:34px!important;padding:6px 10px!important;font-size:11.5px!important}

@media(max-width:900px){
  .ubes-map-overlay-head{left:48px!important;width:min(430px,calc(100% - 250px))!important}
  .ubes-map-overlay-photo{width:190px!important}
  .ubes-map-overlay-notes{width:255px!important}
  .ubes-map-overlay-foot .ubes-elevation-profile svg{height:155px!important;max-height:155px!important}
}
@media (max-width:1200px), (max-width:1366px) and (any-pointer:coarse), (max-width:1366px) and (hover:none){
  .ubes-map-overlay-head{top:0!important;left:44px!important;right:0!important;width:auto!important;border-radius:0 0 0 12px!important}
  .ubes-map-overlay-notes{left:0!important;right:0!important;bottom:145px!important;top:auto!important;width:auto!important;border-radius:0!important;max-height:112px!important}
  .ubes-map-overlay-photo{display:none!important}
  .ubes-map-overlay-foot{left:0!important;right:0!important;bottom:0!important;border-radius:10px 10px 0 0!important}
  .ubes-map-overlay-foot .ubes-elevation-profile svg{height:92px!important;max-height:92px!important}
  .ubes-map-overlay-foot .ubes-route-frame-actions{position:static!important;display:flex!important;flex-direction:row!important;justify-content:space-between!important;align-items:center!important;margin-top:2px!important}
}

/* v0.4.0 — cleaner route explorer, two photos, OS toggle and mobile-first controls */
.ubes-map-overlay{
  background:rgba(255,255,255,.68)!important;
  border-color:rgba(214,223,218,.62)!important;
  box-shadow:0 4px 16px rgba(24,49,42,.08)!important;
  backdrop-filter:blur(8px)!important;
  -webkit-backdrop-filter:blur(8px)!important;
}

/* No +/- chrome: wheel, double-click, keyboard and pinch zoom remain available. */
.ubes-route-master-map .leaflet-control-zoom{display:none!important}
.ubes-route-master-map .ubes-map-control-stack{
  margin:10px 0 0 10px!important;
  border:1px solid rgba(196,207,201,.9)!important;
  border-radius:7px!important;
  overflow:hidden!important;
  box-shadow:0 2px 9px rgba(36,72,63,.12)!important;
  background:rgba(255,255,255,.80)!important;
}
.ubes-route-master-map .ubes-map-control{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:36px!important;
  height:36px!important;
  min-width:36px!important;
  padding:0!important;
  margin:0!important;
  border:0!important;
  border-bottom:1px solid rgba(196,207,201,.9)!important;
  border-radius:0!important;
  background:rgba(255,255,255,.82)!important;
  color:var(--ubes-route-accent-dark)!important;
  font:700 15px/1 inherit!important;
  text-decoration:none!important;
  text-shadow:none!important;
  box-shadow:none!important;
}
.ubes-route-master-map .ubes-map-control:last-child{border-bottom:0!important}
.ubes-route-master-map .ubes-map-control:hover,
.ubes-route-master-map .ubes-map-control:focus{background:rgba(236,242,238,.95)!important;text-decoration:none!important}
.ubes-route-master-map .ubes-map-home span{font-size:20px;line-height:1;transform:translateY(-1px)}
.ubes-route-master-map .ubes-map-os-toggle{font-size:11px!important;letter-spacing:.03em!important}
.ubes-route-master-map .ubes-map-os-toggle.is-active{background:var(--ubes-route-accent-dark)!important;color:#fff!important}

/* Header aligns with the compact control stack without looking wedged underneath it. */
.ubes-map-overlay-head{
  top:0!important;
  left:54px!important;
  width:min(520px,calc(100% - 340px))!important;
  padding:13px 15px 12px!important;
  border-radius:0 0 12px 0!important;
}

/* Date/submitter gets its own small top-right strip. */
.ubes-map-overlay-credit{
  top:0!important;
  right:0!important;
  width:auto!important;
  max-width:310px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:flex-end!important;
  gap:9px!important;
  padding:8px 10px!important;
  border-radius:0 0 0 10px!important;
}
.ubes-map-overlay-credit p{margin:0!important;font-size:11px!important;line-height:1.35!important;color:var(--ubes-route-muted)!important;white-space:nowrap}
.ubes-map-overlay-credit .ubes-gpx-download{margin:0!important;min-height:30px!important;padding:5px 9px!important;font-size:11px!important;white-space:nowrap!important}

/* Notes on the left; up to two photos on the right. */
.ubes-map-overlay-notes{
  top:154px!important;
  left:0!important;
  right:auto!important;
  width:min(300px,29%)!important;
  max-height:250px!important;
  border-radius:0 12px 12px 0!important;
}
.ubes-map-overlay-photo{
  top:48px!important;
  right:0!important;
  width:210px!important;
  padding:6px!important;
  border-radius:10px 0 0 10px!important;
}
.ubes-map-overlay-photo .ubes-route-image{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:5px!important;
}
.ubes-map-overlay-photo .ubes-route-image img{
  width:100%!important;
  height:104px!important;
  min-height:104px!important;
  max-height:104px!important;
  object-fit:cover!important;
  border-radius:7px!important;
}
.ubes-map-overlay-photo .ubes-route-image[data-count="1"] img{height:150px!important;min-height:150px!important;max-height:150px!important}
.ubes-map-overlay-photo .ubes-route-image[data-count="2"] img{height:98px!important;min-height:98px!important;max-height:98px!important}

/* The elevation label and graph are one continuous full-width overlay. */
.ubes-map-overlay-foot{
  left:0!important;
  right:0!important;
  bottom:0!important;
  display:block!important;
  padding:10px 14px 8px!important;
  border-radius:12px 12px 0 0!important;
}
.ubes-map-overlay-foot .ubes-elevation-profile{
  width:100%!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  background:transparent!important;
}
.ubes-map-overlay-foot .ubes-elevation-profile-head{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  margin:0 4px 2px!important;
  font-size:11px!important;
}
.ubes-map-overlay-foot .ubes-elevation-profile svg{width:100%!important;height:184px!important;max-height:184px!important}

/* Normal pin remains visible at the GPX start when selected. */
.ubes-route-pin.is-selected{filter:drop-shadow(0 2px 4px rgba(0,0,0,.18))}

@media(max-width:900px){
  .ubes-map-overlay-head{width:min(470px,calc(100% - 285px))!important}
  .ubes-map-overlay-photo{width:170px!important}
  .ubes-map-overlay-photo .ubes-route-image[data-count="1"] img{height:126px!important;min-height:126px!important;max-height:126px!important}
  .ubes-map-overlay-photo .ubes-route-image[data-count="2"] img{height:82px!important;min-height:82px!important;max-height:82px!important}
  .ubes-map-overlay-notes{width:245px!important;max-height:220px!important}
  .ubes-map-overlay-foot .ubes-elevation-profile svg{height:150px!important;max-height:150px!important}
}

@media (max-width:1200px), (max-width:1366px) and (any-pointer:coarse), (max-width:1366px) and (hover:none){
  .ubes-route-master-map{height:600px!important;min-height:600px!important}
  .ubes-route-master-map .ubes-map-control-stack{margin:8px 0 0 8px!important}
  .ubes-route-master-map .ubes-map-control{width:34px!important;height:34px!important;min-width:34px!important}
  .ubes-map-overlay-head{
    top:0!important;
    left:50px!important;
    right:0!important;
    width:auto!important;
    padding:10px 11px!important;
    border-radius:0 0 0 10px!important;
  }
  .ubes-map-overlay-head .ubes-route-frame-title h2{font-size:17px!important}
  .ubes-map-overlay-head .ubes-route-meta-line{font-size:10.5px!important;margin-bottom:6px!important}
  .ubes-map-overlay-head .ubes-route-stats{gap:7px!important}
  .ubes-map-overlay-head .ubes-route-stats strong,.ubes-map-overlay-head .ubes-route-stats span{font-size:12px!important}
  .ubes-map-overlay-credit{
    top:101px!important;
    right:0!important;
    max-width:calc(100% - 8px)!important;
    padding:6px 8px!important;
  }
  .ubes-map-overlay-credit p{font-size:10px!important}
  .ubes-map-overlay-credit .ubes-gpx-download{min-height:28px!important;padding:4px 7px!important;font-size:10px!important}
  .ubes-map-overlay-photo{
    top:142px!important;
    right:0!important;
    width:118px!important;
    padding:4px!important;
  }
  .ubes-map-overlay-photo .ubes-route-image img,
  .ubes-map-overlay-photo .ubes-route-image[data-count="1"] img,
  .ubes-map-overlay-photo .ubes-route-image[data-count="2"] img{height:68px!important;min-height:68px!important;max-height:68px!important}
  .ubes-map-overlay-notes{
    top:auto!important;
    left:0!important;
    right:128px!important;
    bottom:137px!important;
    width:auto!important;
    max-height:116px!important;
    padding:8px 9px!important;
    border-radius:0 10px 0 0!important;
  }
  .ubes-map-overlay-notes .ubes-route-section h3{font-size:9.5px!important}
  .ubes-map-overlay-notes .ubes-route-section p{font-size:10.5px!important;line-height:1.38!important}
  .ubes-map-overlay-foot{padding:7px 7px 4px!important}
  .ubes-map-overlay-foot .ubes-elevation-profile-head{font-size:9.5px!important}
  .ubes-map-overlay-foot .ubes-elevation-profile svg{height:112px!important;max-height:112px!important}
}


/* v0.4.2 — OS-first mapping, fullscreen map, refined profile and photo layout */

/* OS is now the automatic default whenever a key exists; the second map button is fullscreen. */
.ubes-route-master-map .ubes-map-os-toggle{display:none!important}
.ubes-route-master-map .ubes-map-control-stack{
  border:1px solid rgba(184,198,190,.92)!important;
  background:rgba(255,255,255,.76)!important;
}
.ubes-route-master-map .ubes-map-control{
  border-bottom:1px solid rgba(184,198,190,.92)!important;
}
.ubes-route-master-map .ubes-map-control svg{
  display:block;
  width:18px;
  height:18px;
}

/* Make the title feel aligned with the compact two-button control stack. */
.ubes-map-overlay-head{
  left:54px!important;
  width:min(540px,calc(100% - 330px))!important;
}

/* Date/download strip and photos share the same width. */
.ubes-map-overlay-credit{
  width:250px!important;
  max-width:250px!important;
  box-sizing:border-box!important;
}
.ubes-map-overlay-photo{
  top:48%!important;
  right:0!important;
  width:250px!important;
  transform:translateY(-50%)!important;
  box-sizing:border-box!important;
  padding:7px!important;
}
.ubes-map-overlay-photo .ubes-route-image{
  gap:7px!important;
}
.ubes-map-overlay-photo .ubes-route-image img{
  height:118px!important;
  min-height:118px!important;
  max-height:118px!important;
}
.ubes-map-overlay-photo .ubes-route-image[data-count="1"] img{
  height:182px!important;
  min-height:182px!important;
  max-height:182px!important;
}
.ubes-map-overlay-photo .ubes-route-image[data-count="2"] img{
  height:118px!important;
  min-height:118px!important;
  max-height:118px!important;
}

/* Elevation title is centred; the redundant min–max range has been removed. */
.ubes-map-overlay-foot .ubes-elevation-profile-head{
  justify-content:center!important;
  text-align:center!important;
  margin:0 0 4px!important;
  font-size:12px!important;
  font-weight:750!important;
  color:var(--ubes-route-accent-dark)!important;
}
.ubes-map-overlay-foot .ubes-elevation-profile svg{
  height:200px!important;
  max-height:200px!important;
}
.ubes-elevation-line{stroke-width:3.2!important}
.ubes-elevation-gridline{stroke:rgba(207,216,212,.72)!important}

/* Fullscreen map mode. */
.ubes-route-map-wrap:fullscreen,
.ubes-route-map-wrap.ubes-css-fullscreen{
  background:#f5f3ee!important;
}
.ubes-route-map-wrap:fullscreen{
  width:100%!important;
  height:100%!important;
}
.ubes-route-map-wrap:fullscreen .ubes-route-master-map{
  width:100%!important;
  height:100vh!important;
  min-height:100vh!important;
  border-radius:0!important;
}
.ubes-route-map-wrap.ubes-css-fullscreen{
  position:fixed!important;
  z-index:999999!important;
  inset:0!important;
  width:100vw!important;
  height:100vh!important;
}
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-route-master-map{
  width:100%!important;
  height:100vh!important;
  min-height:100vh!important;
  border-radius:0!important;
}
html.ubes-route-no-scroll{overflow:hidden!important}

/* Keep the same route overlays usable in fullscreen and on narrow screens. */
@media(max-width:900px){
  .ubes-map-overlay-credit{width:220px!important;max-width:220px!important}
  .ubes-map-overlay-photo{width:220px!important}
  .ubes-map-overlay-photo .ubes-route-image[data-count="1"] img{height:160px!important;min-height:160px!important;max-height:160px!important}
  .ubes-map-overlay-photo .ubes-route-image[data-count="2"] img{height:102px!important;min-height:102px!important;max-height:102px!important}
  .ubes-map-overlay-foot .ubes-elevation-profile svg{height:165px!important;max-height:165px!important}
}
@media (max-width:1200px), (max-width:1366px) and (any-pointer:coarse), (max-width:1366px) and (hover:none){
  .ubes-map-overlay-head{
    left:48px!important;
    width:auto!important;
  }
  .ubes-map-overlay-credit{
    width:auto!important;
    max-width:calc(100% - 8px)!important;
  }
  .ubes-map-overlay-photo{
    top:160px!important;
    transform:none!important;
    width:124px!important;
  }
  .ubes-map-overlay-photo .ubes-route-image img,
  .ubes-map-overlay-photo .ubes-route-image[data-count="1"] img,
  .ubes-map-overlay-photo .ubes-route-image[data-count="2"] img{
    height:74px!important;
    min-height:74px!important;
    max-height:74px!important;
  }
  .ubes-map-overlay-foot .ubes-elevation-profile svg{
    height:118px!important;
    max-height:118px!important;
  }
}


/* v0.4.3 — compact title strip, inline download action and permanent note placeholders */

/* Title strip owns download, title, stats and attribution so it always fits as one coherent unit. */
.ubes-map-overlay-head{
  left:0!important;
  width:min(680px,calc(100% - 265px))!important;
  display:flex!important;
  align-items:center!important;
  gap:13px!important;
  padding:11px 14px 10px!important;
  border-radius:0 0 12px 0!important;
  box-sizing:border-box!important;
}
.ubes-map-overlay-head .ubes-gpx-download-head{
  flex:0 0 auto!important;
  margin:0!important;
  align-self:center!important;
  min-height:42px!important;
  padding:8px 12px!important;
  font-size:12px!important;
}
.ubes-map-overlay-head .ubes-route-frame-title{
  min-width:0!important;
  flex:1 1 auto!important;
}
.ubes-map-overlay-head .ubes-route-frame-title h2{
  margin:0 0 3px!important;
}
.ubes-map-overlay-head .ubes-route-meta-line{
  margin:0 0 7px!important;
}
.ubes-map-overlay-head .ubes-route-stats{
  display:flex!important;
  align-items:center!important;
  flex-wrap:wrap!important;
  gap:10px!important;
  margin:0!important;
}
.ubes-map-overlay-head .ubes-route-stats>div{
  padding:0!important;
  background:transparent!important;
}
.ubes-route-date-submit{
  margin:6px 0 0!important;
  font-size:11px!important;
  line-height:1.35!important;
  color:var(--ubes-route-muted)!important;
  white-space:normal!important;
}

/* Old top-right credit strip is obsolete in this layout. */
.ubes-map-overlay-credit{display:none!important}

/* Left notes always keep both sections visible, including an explicit empty-state line. */
.ubes-map-overlay-notes{
  top:150px!important;
}
.ubes-map-overlay-notes .ubes-route-section{
  display:block!important;
}
.ubes-map-overlay-notes .ubes-route-section.is-empty p{
  color:var(--ubes-route-muted)!important;
  font-style:italic!important;
}

/* With attribution moved into the title strip, the photo column can use the full right-side vertical space. */
.ubes-map-overlay-photo{
  top:48%!important;
  width:250px!important;
}

/* Mobile: keep the action visible without stealing the whole title row. */
@media (max-width:1200px), (max-width:1366px) and (any-pointer:coarse), (max-width:1366px) and (hover:none){
  .ubes-map-overlay-head{
    left:0!important;
    right:0!important;
    width:auto!important;
    gap:8px!important;
    padding:8px 9px!important;
  }
  .ubes-map-overlay-head .ubes-gpx-download-head{
    min-height:34px!important;
    padding:5px 7px!important;
    font-size:9.5px!important;
  }
  .ubes-map-overlay-head .ubes-route-frame-title h2{
    font-size:16px!important;
  }
  .ubes-map-overlay-head .ubes-route-meta-line{
    font-size:10px!important;
    margin-bottom:4px!important;
  }
  .ubes-map-overlay-head .ubes-route-stats{
    gap:6px!important;
  }
  .ubes-map-overlay-head .ubes-route-stats strong,
  .ubes-map-overlay-head .ubes-route-stats span{
    font-size:11px!important;
  }
  .ubes-route-date-submit{
    font-size:9.5px!important;
    margin-top:4px!important;
  }
  .ubes-map-overlay-notes{
    top:auto!important;
    bottom:137px!important;
  }
}


/* v0.4.4 — clear map controls and larger cardless photo rail */

/* Reserve a fixed control gutter so Home/Expand can never overlap the title or GPX button. */
.ubes-map-overlay-head{
  left:58px!important;
  width:min(720px,calc(100% - 58px - 295px))!important;
  border-radius:0 0 12px 12px!important;
}
.ubes-map-overlay-head .ubes-gpx-download-head{
  margin-left:0!important;
}

/* Photos sit directly on the map — no surrounding translucent card/panel. */
.ubes-map-overlay-photo{
  top:50%!important;
  right:0!important;
  width:280px!important;
  transform:translateY(-50%)!important;
  padding:0!important;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
  border-radius:0!important;
  overflow:visible!important;
}
.ubes-map-overlay-photo .ubes-route-image{
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:8px!important;
  width:100%!important;
}
.ubes-map-overlay-photo .ubes-route-image img{
  display:block!important;
  width:100%!important;
  object-fit:cover!important;
  border:2px solid rgba(255,255,255,.92)!important;
  border-right:0!important;
  border-radius:10px 0 0 10px!important;
  box-shadow:0 4px 14px rgba(24,49,42,.16)!important;
}

/* One image: large feature image. */
.ubes-map-overlay-photo .ubes-route-image[data-count="1"] img{
  height:230px!important;
  min-height:230px!important;
  max-height:230px!important;
}

/* Two images: two generous landscape tiles. */
.ubes-map-overlay-photo .ubes-route-image[data-count="2"] img{
  height:150px!important;
  min-height:150px!important;
  max-height:150px!important;
}

/* Three images: compact but still substantial. */
.ubes-map-overlay-photo .ubes-route-image[data-count="3"] img{
  height:112px!important;
  min-height:112px!important;
  max-height:112px!important;
}

/* Mobile/tablet: retain cardless images but reduce the rail so it doesn't crowd the GPX. */
@media(max-width:900px){
  .ubes-map-overlay-head{
    left:54px!important;
    width:min(650px,calc(100% - 54px - 235px))!important;
  }
  .ubes-map-overlay-photo{width:220px!important}
  .ubes-map-overlay-photo .ubes-route-image[data-count="1"] img{
    height:185px!important;min-height:185px!important;max-height:185px!important
  }
  .ubes-map-overlay-photo .ubes-route-image[data-count="2"] img{
    height:120px!important;min-height:120px!important;max-height:120px!important
  }
  .ubes-map-overlay-photo .ubes-route-image[data-count="3"] img{
    height:90px!important;min-height:90px!important;max-height:90px!important
  }
}
@media (max-width:1200px), (max-width:1366px) and (any-pointer:coarse), (max-width:1366px) and (hover:none){
  .ubes-map-overlay-head{
    left:46px!important;
    right:0!important;
    width:auto!important;
  }
  .ubes-map-overlay-photo{
    top:165px!important;
    right:0!important;
    width:128px!important;
    transform:none!important;
  }
  .ubes-map-overlay-photo .ubes-route-image{gap:4px!important}
  .ubes-map-overlay-photo .ubes-route-image img{
    border-radius:7px 0 0 7px!important;
    border-width:1px!important;
  }
  .ubes-map-overlay-photo .ubes-route-image[data-count="1"] img{
    height:86px!important;min-height:86px!important;max-height:86px!important
  }
  .ubes-map-overlay-photo .ubes-route-image[data-count="2"] img,
  .ubes-map-overlay-photo .ubes-route-image[data-count="3"] img{
    height:58px!important;min-height:58px!important;max-height:58px!important
  }
}


/* v0.4.5 — professional route-explorer polish */

/* Cleaner map hierarchy: subtle empty hint, overlays feel integrated rather than boxed. */
.ubes-map-hint{
  left:50%!important;
  top:auto!important;
  bottom:18px!important;
  transform:translateX(-50%)!important;
  width:auto!important;
  max-width:calc(100% - 36px)!important;
  padding:7px 11px!important;
  border-radius:999px!important;
  background:rgba(255,255,255,.58)!important;
  color:rgba(45,45,45,.72)!important;
  font-size:12px!important;
  box-shadow:none!important;
  backdrop-filter:blur(5px)!important;
}

/* Title/action block: one job, one visual line. */
.ubes-map-overlay-head{
  left:58px!important;
  width:min(760px,calc(100% - 58px - 300px))!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:18px!important;
  padding:12px 14px!important;
  background:rgba(255,255,255,.70)!important;
  border-radius:0 0 12px 12px!important;
}
.ubes-map-overlay-head .ubes-route-frame-title{
  flex:1 1 auto!important;
  min-width:0!important;
}
.ubes-map-overlay-head .ubes-gpx-download-head{
  flex:0 0 auto!important;
  margin:0!important;
  align-self:center!important;
}
.ubes-map-overlay-head .ubes-route-frame-title h2{
  font-size:24px!important;
  line-height:1.08!important;
}
.ubes-map-overlay-head .ubes-route-meta-line{
  font-size:12.5px!important;
  margin-bottom:8px!important;
}
.ubes-map-overlay-head .ubes-route-stats{
  gap:12px!important;
}
.ubes-route-date-submit{
  margin-top:7px!important;
}

/* One calm notes panel on the left. */
.ubes-map-overlay-notes{
  top:165px!important;
  left:0!important;
  width:min(320px,30%)!important;
  padding:12px 14px!important;
  border-radius:0 12px 12px 0!important;
  background:rgba(255,255,255,.58)!important;
}
.ubes-map-overlay-notes .ubes-route-section{
  margin:0!important;
  padding:0!important;
  border:0!important;
}
.ubes-map-overlay-notes .ubes-route-section + .ubes-route-section{
  margin-top:12px!important;
  padding-top:12px!important;
  border-top:1px solid rgba(47,93,80,.10)!important;
}
.ubes-map-overlay-notes .ubes-route-section h3{
  margin:0 0 5px!important;
  font-size:10px!important;
  letter-spacing:.07em!important;
  text-transform:uppercase!important;
  color:var(--ubes-route-accent-dark)!important;
}
.ubes-map-overlay-notes .ubes-route-section p{
  font-size:12px!important;
  line-height:1.45!important;
}

/* Editorial photo rail: no card, with 3-photo feature+two-thumb composition. */
.ubes-map-overlay-photo{
  width:292px!important;
  right:0!important;
}
.ubes-map-overlay-photo .ubes-route-image{
  display:grid!important;
  gap:7px!important;
}
.ubes-map-overlay-photo .ubes-route-image[data-count="1"]{
  grid-template-columns:1fr!important;
}
.ubes-map-overlay-photo .ubes-route-image[data-count="2"]{
  grid-template-columns:1fr!important;
}
.ubes-map-overlay-photo .ubes-route-image[data-count="3"]{
  grid-template-columns:1fr 1fr!important;
  grid-template-rows:190px 92px!important;
}
.ubes-map-overlay-photo .ubes-route-image[data-count="3"] img:first-child{
  grid-column:1 / -1!important;
  height:190px!important;
  min-height:190px!important;
  max-height:190px!important;
}
.ubes-map-overlay-photo .ubes-route-image[data-count="3"] img:nth-child(2),
.ubes-map-overlay-photo .ubes-route-image[data-count="3"] img:nth-child(3){
  height:92px!important;
  min-height:92px!important;
  max-height:92px!important;
}
.ubes-map-overlay-photo .ubes-route-image img{
  border-radius:10px 0 0 10px!important;
}

/* Elevation profile becomes the strongest secondary visual. */
.ubes-map-overlay-foot{
  padding:10px 16px 8px!important;
  background:rgba(255,255,255,.62)!important;
}
.ubes-map-overlay-foot .ubes-elevation-profile-head{
  font-size:12px!important;
  letter-spacing:.01em!important;
}
.ubes-map-overlay-foot .ubes-elevation-profile svg{
  height:210px!important;
  max-height:210px!important;
}

/* Logbook table: quieter, more database-like and less widget-like. */
.ubes-route-logbook-table{
  margin-top:24px!important;
}
.ubes-logbook-controls{
  background:transparent!important;
  border:0!important;
  border-radius:0!important;
  padding:0!important;
  gap:10px!important;
}
.ubes-table-scroll{
  border-radius:10px!important;
}
.ubes-route-table th{
  background:#f5f6f4!important;
  font-size:12px!important;
}
.ubes-route-table td{
  font-size:13px!important;
}

/* Fullscreen keeps the route composition balanced. */
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-head,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-head{
  width:min(820px,calc(100% - 58px - 320px))!important;
}
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-photo,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-photo{
  width:310px!important;
}

/* Mobile: preserve hierarchy, reduce overlays rather than stacking giant cards. */
@media (max-width:1200px), (max-width:1366px) and (any-pointer:coarse), (max-width:1366px) and (hover:none){
  .ubes-map-overlay-head{
    left:46px!important;
    right:0!important;
    width:auto!important;
    padding:8px 9px!important;
    gap:8px!important;
  }
  .ubes-map-overlay-head .ubes-route-frame-title h2{
    font-size:16px!important;
  }
  .ubes-map-overlay-head .ubes-gpx-download-head{
    min-height:32px!important;
    padding:5px 7px!important;
    font-size:9px!important;
  }
  .ubes-map-overlay-notes{
    width:auto!important;
    right:128px!important;
    left:0!important;
    top:auto!important;
    bottom:140px!important;
    max-height:118px!important;
    overflow:auto!important;
  }
  .ubes-map-overlay-photo{
    width:122px!important;
    top:158px!important;
    transform:none!important;
  }
  .ubes-map-overlay-photo .ubes-route-image[data-count="3"]{
    grid-template-columns:1fr!important;
    grid-template-rows:none!important;
  }
  .ubes-map-overlay-photo .ubes-route-image[data-count="3"] img:first-child,
  .ubes-map-overlay-photo .ubes-route-image[data-count="3"] img:nth-child(2),
  .ubes-map-overlay-photo .ubes-route-image[data-count="3"] img:nth-child(3){
    height:54px!important;
    min-height:54px!important;
    max-height:54px!important;
  }
  .ubes-map-overlay-foot .ubes-elevation-profile svg{
    height:116px!important;
    max-height:116px!important;
  }
}


/* v0.4.6 — full-width profile, stronger attribution, photo/profile separation */

/* Make the elevation banner truly full width and let the SVG use all available horizontal space. */
.ubes-map-overlay-foot{
  left:0!important;
  right:0!important;
  width:auto!important;
  padding:9px 10px 7px!important;
  box-sizing:border-box!important;
}
.ubes-map-overlay-foot .ubes-elevation-profile{
  width:100%!important;
  max-width:none!important;
  margin:0!important;
}
.ubes-map-overlay-foot .ubes-elevation-profile svg{
  display:block!important;
  width:100%!important;
  height:218px!important;
  max-height:218px!important;
  max-width:none!important;
  overflow:visible!important;
}
.ubes-map-overlay-foot .ubes-elevation-profile-head{
  width:100%!important;
  justify-content:center!important;
  text-align:center!important;
  margin:0 0 3px!important;
  font-size:12.5px!important;
  font-weight:800!important;
}

/* Give date/submitted-by enough hierarchy to read as important route provenance. */
.ubes-route-date-submit{
  display:block!important;
  margin:8px 0 0!important;
  font-size:12.5px!important;
  line-height:1.4!important;
  font-weight:650!important;
  color:var(--ubes-route-accent-dark)!important;
  opacity:.92!important;
}
.ubes-route-date-submit [data-route-date]{
  font-weight:750!important;
}
.ubes-route-date-submit [data-route-submitter]{
  font-weight:600!important;
}

/* Keep photos inside the map's free middle band so they can never collide with elevation. */
.ubes-map-overlay-photo{
  top:145px!important;
  bottom:245px!important;
  right:0!important;
  width:292px!important;
  transform:none!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  overflow:hidden!important;
}
.ubes-map-overlay-photo .ubes-route-image{
  width:100%!important;
  max-height:100%!important;
  align-content:center!important;
}
.ubes-map-overlay-photo .ubes-route-image[data-count="1"] img{
  height:210px!important;
  min-height:210px!important;
  max-height:210px!important;
}
.ubes-map-overlay-photo .ubes-route-image[data-count="2"] img{
  height:130px!important;
  min-height:130px!important;
  max-height:130px!important;
}
.ubes-map-overlay-photo .ubes-route-image[data-count="3"]{
  grid-template-rows:165px 82px!important;
}
.ubes-map-overlay-photo .ubes-route-image[data-count="3"] img:first-child{
  height:165px!important;
  min-height:165px!important;
  max-height:165px!important;
}
.ubes-map-overlay-photo .ubes-route-image[data-count="3"] img:nth-child(2),
.ubes-map-overlay-photo .ubes-route-image[data-count="3"] img:nth-child(3){
  height:82px!important;
  min-height:82px!important;
  max-height:82px!important;
}

/* Fullscreen gets a little more profile room, but still protects the photo rail. */
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-photo,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-photo{
  bottom:260px!important;
}
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-foot .ubes-elevation-profile svg,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-foot .ubes-elevation-profile svg{
  height:235px!important;
  max-height:235px!important;
}

/* Responsive: preserve x-axis labels and guarantee photo/profile separation. */
@media(max-width:900px){
  .ubes-map-overlay-photo{
    top:140px!important;
    bottom:205px!important;
    width:220px!important;
  }
  .ubes-map-overlay-foot .ubes-elevation-profile svg{
    height:175px!important;
    max-height:175px!important;
  }
  .ubes-route-date-submit{
    font-size:11.5px!important;
  }
}
@media (max-width:1200px), (max-width:1366px) and (any-pointer:coarse), (max-width:1366px) and (hover:none){
  .ubes-map-overlay-photo{
    top:145px!important;
    bottom:152px!important;
    width:122px!important;
  }
  .ubes-map-overlay-photo .ubes-route-image[data-count="1"] img{
    height:84px!important;min-height:84px!important;max-height:84px!important
  }
  .ubes-map-overlay-photo .ubes-route-image[data-count="2"] img,
  .ubes-map-overlay-photo .ubes-route-image[data-count="3"] img,
  .ubes-map-overlay-photo .ubes-route-image[data-count="3"] img:first-child,
  .ubes-map-overlay-photo .ubes-route-image[data-count="3"] img:nth-child(2),
  .ubes-map-overlay-photo .ubes-route-image[data-count="3"] img:nth-child(3){
    height:52px!important;min-height:52px!important;max-height:52px!important
  }
  .ubes-map-overlay-foot .ubes-elevation-profile svg{
    height:124px!important;
    max-height:124px!important;
  }
  .ubes-route-date-submit{
    font-size:10px!important;
    margin-top:4px!important;
  }
}


/* v0.4.7 — correct elevation chart framing and larger fullscreen photo presentation */

/* The SVG's 1000×240 viewBox is now respected; don't crop the x axis. */
.ubes-map-overlay-foot{
  overflow:visible!important;
}
.ubes-map-overlay-foot .ubes-elevation-profile{
  overflow:visible!important;
}
.ubes-map-overlay-foot .ubes-elevation-profile svg{
  width:100%!important;
  height:240px!important;
  max-height:none!important;
  overflow:visible!important;
}
.ubes-elevation-label{
  font-size:12px!important;
}
.ubes-elevation-axis{
  stroke:rgba(132,151,142,.55)!important;
}

/* In expanded/fullscreen mode, dedicate a much larger visual column to photos. */
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-photo,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-photo{
  top:150px!important;
  bottom:285px!important;
  width:390px!important;
  padding:0!important;
}
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-photo .ubes-route-image,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-photo .ubes-route-image{
  width:100%!important;
  max-height:100%!important;
}

/* One photo becomes a large feature image. */
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-photo .ubes-route-image[data-count="1"] img,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-photo .ubes-route-image[data-count="1"] img{
  height:360px!important;
  min-height:360px!important;
  max-height:360px!important;
}

/* Two photos get two large stacked frames. */
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-photo .ubes-route-image[data-count="2"] img,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-photo .ubes-route-image[data-count="2"] img{
  height:230px!important;
  min-height:230px!important;
  max-height:230px!important;
}

/* Three photos: large hero with two substantial supporting images. */
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-photo .ubes-route-image[data-count="3"],
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-photo .ubes-route-image[data-count="3"]{
  grid-template-columns:1fr 1fr!important;
  grid-template-rows:285px 145px!important;
  gap:9px!important;
}
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-photo .ubes-route-image[data-count="3"] img:first-child,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-photo .ubes-route-image[data-count="3"] img:first-child{
  height:285px!important;
  min-height:285px!important;
  max-height:285px!important;
}
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-photo .ubes-route-image[data-count="3"] img:nth-child(2),
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-photo .ubes-route-image[data-count="3"] img:nth-child(3),
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-photo .ubes-route-image[data-count="3"] img:nth-child(2),
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-photo .ubes-route-image[data-count="3"] img:nth-child(3){
  height:145px!important;
  min-height:145px!important;
  max-height:145px!important;
}

/* In fullscreen the elevation panel gets enough height for its x-axis labels. */
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-foot .ubes-elevation-profile svg,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-foot .ubes-elevation-profile svg{
  height:250px!important;
  max-height:none!important;
}

/* Responsive chart dimensions. */
@media(max-width:900px){
  .ubes-map-overlay-foot .ubes-elevation-profile svg{
    height:190px!important;
    max-height:none!important;
  }
}
@media (max-width:1200px), (max-width:1366px) and (any-pointer:coarse), (max-width:1366px) and (hover:none){
  .ubes-map-overlay-foot .ubes-elevation-profile svg{
    height:138px!important;
    max-height:none!important;
  }
}


/* v0.4.8 — route narrative fields and similar-route linking */

.ubes-similar-route{
  margin-top:12px;
  padding:12px 14px;
  border:1px solid rgba(47,93,80,.28);
  border-radius:10px;
  background:rgba(237,244,240,.85);
}
.ubes-similar-route[hidden]{display:none!important}
.ubes-similar-route strong{
  display:block;
  margin-bottom:4px;
  color:var(--ubes-route-accent-dark);
  font-size:14px;
}
.ubes-similar-route p{
  margin:0 0 9px;
  color:#4c5651;
  font-size:13px;
  line-height:1.45;
}
.ubes-link-route-choice{
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
  margin:0!important;
  font-size:13px!important;
  font-weight:700!important;
  color:var(--ubes-route-accent-dark)!important;
  cursor:pointer;
}
.ubes-link-route-choice input{
  width:auto!important;
  margin:0!important;
}

/* Route description leads the narrative panel; conditions and future-walker notes follow. */
.ubes-map-overlay-notes .ubes-route-description h3{
  font-size:12px!important;
  letter-spacing:.04em!important;
}
.ubes-map-overlay-notes .ubes-route-description p{
  font-size:12.5px!important;
  line-height:1.5!important;
}
.ubes-map-overlay-notes{
  max-height:310px!important;
  overflow:auto!important;
}


/* v0.4.9 — multiple recorded walks for linked routes */

.ubes-route-history{
  margin-top:13px;
  padding-top:11px;
  border-top:1px solid rgba(47,93,80,.13);
}
.ubes-route-history[hidden]{display:none!important}
.ubes-route-history{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}
.ubes-route-history > span{
  color:var(--ubes-route-accent-dark);
  font-size:11px;
  font-weight:750;
}
.ubes-route-history-controls{
  display:flex;
  align-items:center;
  gap:7px;
}
.ubes-route-history-controls span{
  min-width:38px;
  text-align:center;
  color:var(--ubes-route-muted);
  font-size:10.5px;
  font-weight:650;
}
.ubes-route-history-controls button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:30px;
  height:30px;
  margin:0;
  padding:0;
  border:1px solid rgba(47,93,80,.24);
  border-radius:50%;
  background:rgba(255,255,255,.58);
  color:var(--ubes-route-accent-dark);
  font:700 22px/1 inherit;
  cursor:pointer;
}
.ubes-route-history-controls button:hover:not(:disabled),
.ubes-route-history-controls button:focus:not(:disabled){
  background:rgba(235,243,239,.94);
  border-color:rgba(47,93,80,.42);
}
.ubes-route-history-controls button:disabled{
  opacity:.32;
  cursor:default;
}

/* The information panel has an extra navigation row when a route has history. */
.ubes-map-overlay-notes{
  max-height:340px!important;
}

@media (max-width:1200px), (max-width:1366px) and (any-pointer:coarse), (max-width:1366px) and (hover:none){
  .ubes-route-history{
    margin-top:8px;
    padding-top:7px;
  }
  .ubes-route-history > span{font-size:9.5px}
  .ubes-route-history-controls{gap:4px}
  .ubes-route-history-controls button{
    width:26px;
    height:26px;
    font-size:18px;
  }
  .ubes-route-history-controls span{font-size:9px;min-width:30px}
}


/* v0.5.1 — specific GPX region inference, regional browsing and safer map chrome */

.ubes-route-map-wrap.ubes-css-fullscreen{z-index:2147483000!important}

/* Expanded controls clear the website header. */
.ubes-route-map-wrap:fullscreen .ubes-map-control-stack,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-control-stack{
  margin-top:76px!important;
}

/* Attribution is lifted above the elevation overlay instead of being covered. */
.ubes-route-map-stage.has-selection .leaflet-control-attribution{bottom:172px!important}
.ubes-route-map-wrap:fullscreen .leaflet-control-attribution,
.ubes-route-map-wrap.ubes-css-fullscreen .leaflet-control-attribution{
  bottom:202px!important;
  right:5px!important;
  top:auto!important;
  max-width:70%!important;
}

/* Elevation responds by becoming shorter rather than overlapping map content. */
.ubes-map-overlay-foot .ubes-elevation-profile svg{
  height:145px!important;
  max-height:145px!important;
}
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-foot .ubes-elevation-profile svg,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-foot .ubes-elevation-profile svg{
  height:175px!important;
  max-height:175px!important;
}
.ubes-map-overlay-photo{bottom:175px!important}
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-photo,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-photo{bottom:205px!important}

/* Region is deliberately prominent. */
.ubes-map-overlay-head{width:min(830px,calc(100% - 58px - 330px))!important}
.ubes-route-head-actions{
  flex:0 0 155px!important;
  display:flex!important;
  flex-direction:column!important;
  gap:7px!important;
}
.ubes-route-region-badge{
  padding:7px 9px!important;
  border-radius:9px!important;
  background:rgba(47,93,80,.10)!important;
  text-align:center!important;
}
.ubes-route-region-badge span{
  display:block!important;
  margin-bottom:2px!important;
  font-size:8px!important;
  font-weight:800!important;
  text-transform:uppercase!important;
  letter-spacing:.1em!important;
  color:var(--ubes-route-muted)!important;
}
.ubes-route-region-badge strong{
  display:block!important;
  color:var(--ubes-route-accent-dark)!important;
  font-size:12px!important;
  font-weight:800!important;
  line-height:1.2!important;
}
.ubes-route-head-actions .ubes-gpx-download-head{width:100%!important;box-sizing:border-box!important}

/* ‹ title › browses routes in the same region. */
.ubes-route-title-nav{
  display:grid!important;
  grid-template-columns:30px minmax(0,1fr) 30px!important;
  align-items:center!important;
  gap:6px!important;
}
.ubes-route-title-nav button{
  display:inline-flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:30px!important;
  height:30px!important;
  padding:0!important;
  border:0!important;
  border-radius:50%!important;
  background:rgba(47,93,80,.08)!important;
  color:var(--ubes-route-accent-dark)!important;
  font:700 22px/1 inherit!important;
  cursor:pointer!important;
}
.ubes-route-title-nav button:disabled{opacity:.25!important;cursor:default!important}

/* Region search accepts typed values but offers common UBES areas. */
.ubes-logbook-controls input[data-filter-region]{width:100%!important}

@media(max-width:900px){
  .ubes-map-overlay-foot .ubes-elevation-profile svg{height:130px!important;max-height:130px!important}
  .ubes-route-map-stage.has-selection .leaflet-control-attribution{bottom:152px!important}
  .ubes-map-overlay-photo{bottom:155px!important}
}
@media (max-width:1200px), (max-width:1366px) and (any-pointer:coarse), (max-width:1366px) and (hover:none){
  .ubes-route-head-actions{flex-basis:105px!important}
  .ubes-route-region-badge{padding:5px 6px!important}
  .ubes-route-region-badge strong{font-size:9.5px!important}
  .ubes-route-title-nav{grid-template-columns:24px minmax(0,1fr) 24px!important;gap:3px!important}
  .ubes-route-title-nav button{width:24px!important;height:24px!important;font-size:18px!important}
  .ubes-map-overlay-foot .ubes-elevation-profile svg{height:100px!important;max-height:100px!important}
  .ubes-route-map-stage.has-selection .leaflet-control-attribution{bottom:116px!important;font-size:8px!important}
  .ubes-map-overlay-photo{bottom:122px!important}
}


/* v0.5.2 — centred regional navigation, proportional panels and corrected map chrome */

/* Keep Leaflet attribution at the real bottom edge of the map window. */
.ubes-route-map-stage .leaflet-control-attribution,
.ubes-route-map-stage.has-selection .leaflet-control-attribution,
.ubes-route-map-wrap:fullscreen .leaflet-control-attribution,
.ubes-route-map-wrap.ubes-css-fullscreen .leaflet-control-attribution{
  top:auto!important;
  right:0!important;
  bottom:0!important;
  max-width:74%!important;
  z-index:1200!important;
  background:rgba(255,255,255,.78)!important;
  line-height:1.25!important;
}

/* Home/expand stack vertically aligns with the selected-route banner. */
.ubes-route-master-map .ubes-map-control-stack{
  margin:18px 0 0 10px!important;
}
.ubes-route-map-wrap:fullscreen .ubes-map-control-stack,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-control-stack{
  margin:18px 0 0 10px!important;
}

/* Header: centred route information with large regional arrows wrapping the whole block. */
.ubes-map-overlay-head{
  left:58px!important;
  right:18px!important;
  width:auto!important;
  min-height:132px!important;
  display:grid!important;
  grid-template-columns:54px minmax(0,1fr) 54px 165px!important;
  align-items:center!important;
  gap:9px!important;
  padding:10px 13px!important;
  box-sizing:border-box!important;
}
.ubes-map-overlay-head .ubes-route-frame-title{
  min-width:0!important;
  text-align:center!important;
}
.ubes-map-overlay-head .ubes-route-frame-title h2{
  margin:0 0 6px!important;
  font-size:26px!important;
  text-align:center!important;
}
.ubes-map-overlay-head .ubes-route-meta-line{
  text-align:center!important;
  margin:0 0 8px!important;
}
.ubes-map-overlay-head .ubes-route-stats{
  justify-content:center!important;
  gap:15px!important;
}
.ubes-route-date-submit{
  text-align:center!important;
  margin-top:8px!important;
}
.ubes-region-route-arrow{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:48px!important;
  height:78px!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:14px!important;
  background:rgba(47,93,80,.09)!important;
  color:var(--ubes-route-accent-dark)!important;
  font:700 38px/1 inherit!important;
  cursor:pointer!important;
  box-shadow:none!important;
}
.ubes-region-route-arrow:hover:not(:disabled),
.ubes-region-route-arrow:focus:not(:disabled){
  background:rgba(47,93,80,.16)!important;
}
.ubes-region-route-arrow:disabled{
  opacity:.24!important;
  cursor:default!important;
}

/* Right actions align with the centre line of the title panel. */
.ubes-route-head-actions{
  align-self:center!important;
  width:165px!important;
  flex-basis:auto!important;
}
.ubes-route-region-badge{
  min-height:46px!important;
  display:flex!important;
  flex-direction:column!important;
  justify-content:center!important;
}
.ubes-route-head-actions .ubes-gpx-download-head{
  min-height:42px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
}

/* Make Route information visually balance the photo rail. */
.ubes-map-overlay-notes{
  top:165px!important;
  left:0!important;
  width:340px!important;
  max-height:none!important;
  bottom:27%!important;
  overflow:auto!important;
  padding:15px 17px!important;
}
.ubes-map-overlay-notes .ubes-route-description h3{
  font-size:12.5px!important;
}
.ubes-map-overlay-notes .ubes-route-section p{
  font-size:13px!important;
  line-height:1.5!important;
}

/* Elevation becomes a percentage of the map, so expanded mode scales naturally. */
.ubes-map-overlay-foot{
  height:25%!important;
  min-height:150px!important;
  max-height:235px!important;
  padding:8px 12px 7px!important;
  box-sizing:border-box!important;
}
.ubes-map-overlay-foot .ubes-elevation-profile{
  height:100%!important;
  display:flex!important;
  flex-direction:column!important;
}
.ubes-map-overlay-foot .ubes-elevation-profile-head{
  flex:0 0 auto!important;
}
.ubes-map-overlay-foot .ubes-elevation-profile svg{
  flex:1 1 auto!important;
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
}
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-foot,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-foot{
  height:29%!important;
  min-height:205px!important;
  max-height:310px!important;
}
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-notes,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-notes{
  width:390px!important;
  bottom:31%!important;
}
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-photo,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-photo{
  bottom:31%!important;
}

/* Normal photo rail also respects the proportional elevation boundary. */
.ubes-map-overlay-photo{
  bottom:27%!important;
}

/* Region is a real search field plus an explicit dropdown. */
.ubes-region-filter-control{
  display:grid!important;
  grid-template-columns:minmax(120px,1fr) 38px!important;
  gap:5px!important;
  align-items:stretch!important;
}
.ubes-region-filter-control input{
  min-width:0!important;
}
.ubes-region-filter-control select{
  width:38px!important;
  min-width:38px!important;
  padding:0!important;
  text-indent:-9999px!important;
  background-color:#fff!important;
  cursor:pointer!important;
}
.ubes-region-filter-control select option{
  text-indent:0!important;
}

/* Tablet/mobile scaling. */
@media(max-width:900px){
  .ubes-map-overlay-head{
    grid-template-columns:42px minmax(0,1fr) 42px 135px!important;
    min-height:120px!important;
  }
  .ubes-region-route-arrow{
    width:38px!important;
    height:64px!important;
    font-size:31px!important;
  }
  .ubes-route-head-actions{width:135px!important}
  .ubes-map-overlay-notes{
    width:285px!important;
    bottom:25%!important;
  }
  .ubes-map-overlay-photo{bottom:25%!important}
  .ubes-map-overlay-foot{
    height:23%!important;
    min-height:125px!important;
  }
}
@media (max-width:1200px), (max-width:1366px) and (any-pointer:coarse), (max-width:1366px) and (hover:none){
  .ubes-route-master-map .ubes-map-control-stack{
    margin:12px 0 0 7px!important;
  }
  .ubes-map-overlay-head{
    left:43px!important;
    right:4px!important;
    grid-template-columns:28px minmax(0,1fr) 28px 90px!important;
    gap:3px!important;
    min-height:104px!important;
    padding:7px 6px!important;
  }
  .ubes-region-route-arrow{
    width:26px!important;
    height:48px!important;
    border-radius:8px!important;
    font-size:23px!important;
  }
  .ubes-map-overlay-head .ubes-route-frame-title h2{
    font-size:16px!important;
    margin-bottom:3px!important;
  }
  .ubes-map-overlay-head .ubes-route-meta-line{font-size:9.5px!important;margin-bottom:4px!important}
  .ubes-map-overlay-head .ubes-route-stats{gap:5px!important}
  .ubes-route-head-actions{width:90px!important}
  .ubes-route-region-badge{min-height:35px!important;padding:4px!important}
  .ubes-route-region-badge strong{font-size:9px!important}
  .ubes-route-head-actions .ubes-gpx-download-head{min-height:31px!important;font-size:8.5px!important;padding:4px!important}
  .ubes-map-overlay-notes{
    width:auto!important;
    right:126px!important;
    bottom:21%!important;
    max-height:135px!important;
    padding:8px 9px!important;
  }
  .ubes-map-overlay-photo{
    bottom:21%!important;
  }
  .ubes-map-overlay-foot{
    height:20%!important;
    min-height:105px!important;
    padding:5px 6px!important;
  }
  .ubes-route-map-stage .leaflet-control-attribution{
    font-size:7px!important;
    max-width:80%!important;
  }
}


/* v0.5.3 — map region search, full-height elevation graph, one-line attribution */

/* Region search lives directly on the map. */
.ubes-map-region-search{
  position:absolute!important;
  z-index:850!important;
  top:150px!important;
  right:0!important;
  width:250px!important;
  padding:9px 10px!important;
  border-radius:10px 0 0 10px!important;
  background:rgba(255,255,255,.66)!important;
  box-sizing:border-box!important;
}
.ubes-map-region-search label{
  display:block!important;
  margin:0 0 5px!important;
  color:var(--ubes-route-accent-dark)!important;
  font-size:9px!important;
  font-weight:800!important;
  letter-spacing:.08em!important;
  text-transform:uppercase!important;
}
.ubes-map-region-search-row{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 40px!important;
  gap:5px!important;
}
.ubes-map-region-search input,
.ubes-map-region-search select{
  box-sizing:border-box!important;
  height:35px!important;
  margin:0!important;
  border:1px solid rgba(47,93,80,.22)!important;
  border-radius:7px!important;
  background:rgba(255,255,255,.92)!important;
  color:var(--ubes-route-text)!important;
  font:600 12px/1.2 inherit!important;
}
.ubes-map-region-search input{
  width:100%!important;
  min-width:0!important;
  padding:7px 9px!important;
}
.ubes-map-region-search select{
  width:40px!important;
  min-width:40px!important;
  padding:0!important;
  text-indent:-9999px!important;
  cursor:pointer!important;
}
.ubes-map-region-search select option{text-indent:0!important}

/* Hide the map search while a route is selected only if it would collide with photos.
   In fullscreen there is enough room, so keep it available. */
.ubes-route-map-stage.has-selection .ubes-map-region-search{
  top:150px!important;
  right:0!important;
}

/* Make the chart itself consume the elevation banner, not just sit at the top of it. */
.ubes-map-overlay-foot{
  display:flex!important;
  align-items:stretch!important;
}
.ubes-map-overlay-foot .ubes-elevation-profile{
  flex:1 1 auto!important;
  height:100%!important;
  min-height:0!important;
}
.ubes-map-overlay-foot .ubes-elevation-profile-head{
  flex:0 0 24px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  margin:0!important;
}
.ubes-map-overlay-foot .ubes-elevation-profile svg{
  flex:1 1 auto!important;
  width:100%!important;
  height:calc(100% - 24px)!important;
  min-height:0!important;
  max-height:none!important;
}

/* Attribution stays at the bottom, on one line. */
.ubes-route-map-stage .leaflet-control-attribution,
.ubes-route-map-stage.has-selection .leaflet-control-attribution,
.ubes-route-map-wrap:fullscreen .leaflet-control-attribution,
.ubes-route-map-wrap.ubes-css-fullscreen .leaflet-control-attribution{
  bottom:0!important;
  right:0!important;
  white-space:nowrap!important;
  max-width:none!important;
  width:auto!important;
  overflow:visible!important;
  font-size:9px!important;
  line-height:1.1!important;
  padding:2px 4px!important;
}

/* Fullscreen: region search and profile get more breathing room. */
.ubes-route-map-wrap:fullscreen .ubes-map-region-search,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-region-search{
  top:165px!important;
  width:285px!important;
}
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-foot,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-foot{
  height:30%!important;
  min-height:235px!important;
  max-height:340px!important;
}

/* Responsive. */
@media(max-width:900px){
  .ubes-map-region-search{width:210px!important}
}
@media (max-width:1200px), (max-width:1366px) and (any-pointer:coarse), (max-width:1366px) and (hover:none){
  .ubes-map-region-search{
    top:116px!important;
    width:170px!important;
    padding:6px!important;
  }
  .ubes-map-region-search-row{
    grid-template-columns:minmax(0,1fr) 34px!important;
  }
  .ubes-map-region-search input,
  .ubes-map-region-search select{
    height:31px!important;
    font-size:10px!important;
  }
  .ubes-map-region-search select{
    width:34px!important;
    min-width:34px!important;
  }
  .ubes-route-map-stage .leaflet-control-attribution{
    font-size:6.5px!important;
    padding:1px 2px!important;
  }
}


/* v0.5.4 — genuine map search, header region dropdown, auto-height information, full profile */

/* Route information only occupies the height its content needs. */
.ubes-map-overlay-notes,
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-notes,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-notes{
  top:165px!important;
  bottom:auto!important;
  height:auto!important;
  min-height:0!important;
  max-height:min(42%,380px)!important;
  overflow:auto!important;
}

/* Region header is now the actual dropdown. */
.ubes-route-region-badge{
  display:block!important;
  padding:7px 8px 8px!important;
}
.ubes-route-region-badge span{
  display:block!important;
}
.ubes-route-region-badge select{
  display:block!important;
  width:100%!important;
  margin:3px 0 0!important;
  padding:5px 22px 5px 7px!important;
  border:0!important;
  border-radius:6px!important;
  background:rgba(255,255,255,.62)!important;
  color:var(--ubes-route-accent-dark)!important;
  font:800 11.5px/1.2 inherit!important;
  text-align:center!important;
  cursor:pointer!important;
  box-shadow:none!important;
}

/* One useful map search: routes, regions, roads and ordinary places. */
.ubes-map-search{
  position:absolute!important;
  z-index:1250!important;
  top:150px!important;
  right:0!important;
  width:310px!important;
  padding:9px 10px!important;
  border-radius:10px 0 0 10px!important;
  background:rgba(255,255,255,.72)!important;
  box-sizing:border-box!important;
}
.ubes-map-search label{
  display:block!important;
  margin:0 0 5px!important;
  color:var(--ubes-route-accent-dark)!important;
  font-size:9px!important;
  font-weight:800!important;
  letter-spacing:.08em!important;
  text-transform:uppercase!important;
}
.ubes-map-search-row{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto!important;
  gap:5px!important;
}
.ubes-map-search input{
  width:100%!important;
  min-width:0!important;
  height:36px!important;
  box-sizing:border-box!important;
  margin:0!important;
  padding:7px 9px!important;
  border:1px solid rgba(47,93,80,.22)!important;
  border-radius:7px!important;
  background:rgba(255,255,255,.95)!important;
  color:var(--ubes-route-text)!important;
  font:600 12px/1.2 inherit!important;
}
.ubes-map-search button[data-map-search-go]{
  height:36px!important;
  margin:0!important;
  padding:0 10px!important;
  border:0!important;
  border-radius:7px!important;
  background:var(--ubes-route-accent)!important;
  color:#fff!important;
  font:750 11px/1 inherit!important;
  cursor:pointer!important;
}
.ubes-map-search-results{
  margin-top:6px!important;
  border:1px solid rgba(47,93,80,.15)!important;
  border-radius:8px!important;
  overflow:hidden!important;
  background:rgba(255,255,255,.98)!important;
  max-height:260px!important;
  overflow-y:auto!important;
}
.ubes-map-search-results[hidden]{display:none!important}
.ubes-map-search-result{
  display:block!important;
  width:100%!important;
  margin:0!important;
  padding:8px 9px!important;
  border:0!important;
  border-bottom:1px solid rgba(47,93,80,.10)!important;
  background:#fff!important;
  color:var(--ubes-route-text)!important;
  text-align:left!important;
  cursor:pointer!important;
}
.ubes-map-search-result:last-child{border-bottom:0!important}
.ubes-map-search-result:hover,
.ubes-map-search-result:focus{background:#eef4f1!important}
.ubes-map-search-result strong{
  display:block!important;
  font-size:11.5px!important;
  line-height:1.25!important;
  color:var(--ubes-route-accent-dark)!important;
}
.ubes-map-search-result span{
  display:block!important;
  margin-top:2px!important;
  font-size:9.5px!important;
  color:var(--ubes-route-muted)!important;
}

/* Ensure elevation graph fills the full banner in both dimensions. */
.ubes-map-overlay-foot{
  height:27%!important;
  min-height:175px!important;
  max-height:none!important;
  overflow:hidden!important;
}
.ubes-map-overlay-foot .ubes-elevation-profile{
  width:100%!important;
  height:100%!important;
  min-width:0!important;
}
.ubes-map-overlay-foot .ubes-elevation-profile svg{
  display:block!important;
  width:100%!important;
  height:calc(100% - 24px)!important;
  max-width:none!important;
  max-height:none!important;
  min-width:100%!important;
}
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-foot,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-foot{
  height:31%!important;
  min-height:235px!important;
  max-height:none!important;
}

/* Photo rail terminates above the proportional elevation area. */
.ubes-map-overlay-photo{bottom:29%!important}
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-photo,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-photo{bottom:33%!important}

/* Remove styling for the obsolete corner region widget. */
.ubes-map-region-search{display:none!important}

@media(max-width:900px){
  .ubes-map-search{width:250px!important}
  .ubes-map-overlay-foot{height:25%!important;min-height:145px!important}
  .ubes-map-overlay-photo{bottom:27%!important}
}
@media (max-width:1200px), (max-width:1366px) and (any-pointer:coarse), (max-width:1366px) and (hover:none){
  .ubes-map-search{
    top:112px!important;
    width:205px!important;
    padding:6px!important;
  }
  .ubes-map-search input{height:32px!important;font-size:10px!important}
  .ubes-map-search button[data-map-search-go]{height:32px!important;font-size:9px!important;padding:0 7px!important}
  .ubes-map-search-results{max-height:170px!important}
  .ubes-map-overlay-notes{
    top:auto!important;
    bottom:23%!important;
    max-height:135px!important;
  }
  .ubes-map-overlay-foot{height:21%!important;min-height:110px!important}
  .ubes-map-overlay-photo{bottom:23%!important}
  .ubes-route-region-badge select{font-size:9px!important;padding:3px 15px 3px 4px!important}
}


/* =========================================================
   v0.5.6 HARD LAYOUT RESET
   This block intentionally overrides older experimental rules.
   ========================================================= */

/* NORMAL DOCUMENT FLOW */
.ubes-route-map-module,
.ubes-route-map-stage,
.ubes-route-logbook-table{
  display:block!important;
  width:100%!important;
  max-width:none!important;
  float:none!important;
  clear:both!important;
  box-sizing:border-box!important;
}
.ubes-route-logbook-table{
  position:relative!important;
  left:auto!important;
  right:auto!important;
  top:auto!important;
  bottom:auto!important;
  margin:26px 0 34px!important;
}
.ubes-logbook-controls{
  position:relative!important;
  display:grid!important;
  grid-template-columns:minmax(180px,1.5fr) minmax(160px,1fr) minmax(150px,1fr) minmax(150px,1fr) minmax(150px,1fr)!important;
  width:100%!important;
  max-width:none!important;
  left:auto!important;
  right:auto!important;
  top:auto!important;
  bottom:auto!important;
  float:none!important;
  clear:both!important;
  margin:0 0 12px!important;
  box-sizing:border-box!important;
}

/* MAP STACKING + CLICKABILITY */
.ubes-route-map-wrap{
  position:relative!important;
  isolation:isolate!important;
  overflow:hidden!important;
}
.ubes-route-master-map{
  position:relative!important;
  z-index:1!important;
}
.ubes-map-overlay{
  pointer-events:auto!important;
}
.ubes-map-overlay-head{z-index:760!important}
.ubes-map-overlay-notes{z-index:770!important}
.ubes-map-overlay-photo{z-index:740!important}
.ubes-map-overlay-foot{z-index:730!important}
.ubes-map-search{z-index:900!important}
.ubes-map-control-stack{z-index:1000!important}
.ubes-map-search input,
.ubes-map-search select,
.ubes-map-search button,
.ubes-map-search-results,
.ubes-map-search-result,
.ubes-region-route-arrow,
.ubes-route-history button,
.ubes-gpx-download-info,
.ubes-map-control{
  pointer-events:auto!important;
}

/* TITLE: ROUTE ONLY */
.ubes-map-overlay-head{
  top:0!important;
  left:58px!important;
  right:18px!important;
  width:auto!important;
  min-height:126px!important;
  display:grid!important;
  grid-template-columns:54px minmax(0,1fr) 54px!important;
  align-items:center!important;
  gap:8px!important;
  padding:10px 14px!important;
  box-sizing:border-box!important;
}
.ubes-map-overlay-head .ubes-route-frame-title{
  grid-column:2!important;
  min-width:0!important;
  text-align:center!important;
}
.ubes-map-overlay-head .ubes-route-frame-title h2,
.ubes-map-overlay-head .ubes-route-meta-line,
.ubes-map-overlay-head .ubes-route-date-submit{
  text-align:center!important;
}
.ubes-map-overlay-head .ubes-route-stats{
  justify-content:center!important;
}
.ubes-region-route-prev{grid-column:1!important}
.ubes-region-route-next{grid-column:3!important}
.ubes-region-route-arrow{
  width:46px!important;
  height:72px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  border:0!important;
  border-radius:12px!important;
  background:rgba(47,93,80,.11)!important;
  color:var(--ubes-route-accent-dark)!important;
  font:700 34px/1 inherit!important;
  cursor:pointer!important;
}

/* REGION + SEARCH: ONE SEPARATE CARD */
.ubes-map-search{
  position:absolute!important;
  top:145px!important;
  right:0!important;
  width:310px!important;
  padding:10px!important;
  border-radius:10px 0 0 10px!important;
  background:rgba(255,255,255,.82)!important;
  backdrop-filter:blur(7px)!important;
  box-shadow:0 3px 14px rgba(24,49,42,.10)!important;
  box-sizing:border-box!important;
}
.ubes-map-search-field + .ubes-map-search-field{margin-top:8px!important}
.ubes-map-search-field label{
  display:block!important;
  margin:0 0 4px!important;
  font-size:9px!important;
  font-weight:800!important;
  letter-spacing:.08em!important;
  text-transform:uppercase!important;
  color:var(--ubes-route-accent-dark)!important;
}
.ubes-map-search-field>select,
.ubes-map-search input{
  width:100%!important;
  height:36px!important;
  box-sizing:border-box!important;
  border:1px solid rgba(47,93,80,.22)!important;
  border-radius:7px!important;
  background:#fff!important;
  color:var(--ubes-route-text)!important;
  font:600 12px/1.2 inherit!important;
}
.ubes-map-search-field>select{padding:6px 28px 6px 9px!important}
.ubes-map-search input{padding:7px 9px!important}
.ubes-map-search-row{
  display:grid!important;
  grid-template-columns:minmax(0,1fr) 42px!important;
  gap:5px!important;
}
.ubes-map-search-row button{
  width:42px!important;
  height:36px!important;
  margin:0!important;
  padding:0!important;
  border:0!important;
  border-radius:7px!important;
  background:var(--ubes-route-accent)!important;
  color:#fff!important;
  font:750 11px/1 inherit!important;
  cursor:pointer!important;
}

/* ROUTE INFORMATION: CONTENT HEIGHT ONLY */
.ubes-map-overlay-notes,
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-notes,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-notes{
  top:145px!important;
  left:0!important;
  right:auto!important;
  bottom:auto!important;
  width:340px!important;
  height:auto!important;
  min-height:0!important;
  max-height:390px!important;
  overflow:auto!important;
  padding:14px 16px!important;
  box-sizing:border-box!important;
}
.ubes-gpx-download-info{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:100%!important;
  min-height:40px!important;
  margin:13px 0 0!important;
  padding:8px 11px!important;
  box-sizing:border-box!important;
}

/* ELEVATION: BANNER AND GRAPH SCALE TOGETHER */
.ubes-map-overlay-foot{
  left:0!important;
  right:0!important;
  bottom:0!important;
  width:auto!important;
  height:26%!important;
  min-height:165px!important;
  max-height:225px!important;
  padding:7px 10px 13px!important;
  box-sizing:border-box!important;
  overflow:hidden!important;
}
.ubes-map-overlay-foot .ubes-elevation-profile{
  display:grid!important;
  grid-template-rows:22px minmax(0,1fr)!important;
  width:100%!important;
  height:100%!important;
  margin:0!important;
  padding:0!important;
}
.ubes-map-overlay-foot .ubes-elevation-profile-head{
  margin:0!important;
  height:22px!important;
  align-items:center!important;
}
.ubes-map-overlay-foot .ubes-elevation-profile svg{
  display:block!important;
  width:100%!important;
  height:100%!important;
  max-width:none!important;
  max-height:none!important;
  min-width:0!important;
  min-height:0!important;
}
.ubes-map-overlay-photo{bottom:28%!important}

/* ATTRIBUTION: BOTTOM, SINGLE LINE */
.ubes-route-map-stage .leaflet-control-attribution,
.ubes-route-map-stage.has-selection .leaflet-control-attribution,
.ubes-route-map-wrap:fullscreen .leaflet-control-attribution,
.ubes-route-map-wrap.ubes-css-fullscreen .leaflet-control-attribution{
  top:auto!important;
  right:0!important;
  bottom:0!important;
  white-space:nowrap!important;
  width:auto!important;
  max-width:none!important;
  overflow:visible!important;
  z-index:1200!important;
  font-size:8px!important;
  line-height:1!important;
  padding:2px 4px!important;
}

/* FULLSCREEN: ONLY THE MAP WRAP */
.ubes-route-map-wrap:fullscreen,
.ubes-route-map-wrap.ubes-css-fullscreen{
  position:fixed!important;
  inset:0!important;
  z-index:2147483000!important;
  width:100vw!important;
  height:100vh!important;
  max-width:none!important;
  margin:0!important;
  background:#f5f3ee!important;
  overflow:hidden!important;
}
.ubes-route-map-wrap:fullscreen .ubes-route-master-map,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-route-master-map{
  width:100%!important;
  height:100%!important;
  min-height:100%!important;
}
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-foot,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-foot{
  height:29%!important;
  min-height:220px!important;
  max-height:310px!important;
}
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-photo,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-photo{
  bottom:31%!important;
}
.ubes-route-map-wrap:fullscreen .ubes-map-search,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-search{
  top:145px!important;
  width:340px!important;
}

/* RESPONSIVE LOGBOOK */
@media(max-width:1000px){
  .ubes-logbook-controls{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  .ubes-logbook-controls .ubes-search-control{grid-column:1/-1!important}
}
@media (max-width:1200px), (max-width:1366px) and (any-pointer:coarse), (max-width:1366px) and (hover:none){
  .ubes-logbook-controls{grid-template-columns:1fr!important}
  .ubes-logbook-controls .ubes-search-control{grid-column:auto!important}
  .ubes-map-overlay-head{
    left:43px!important;
    right:4px!important;
    min-height:102px!important;
    grid-template-columns:28px minmax(0,1fr) 28px!important;
    padding:6px!important;
  }
  .ubes-region-route-arrow{
    width:26px!important;height:46px!important;font-size:22px!important
  }
  .ubes-map-search{
    top:108px!important;
    width:205px!important;
    padding:6px!important;
  }
  .ubes-map-overlay-notes{
    top:auto!important;
    bottom:23%!important;
    width:auto!important;
    right:126px!important;
    max-height:135px!important;
  }
  .ubes-map-overlay-foot{
    height:21%!important;
    min-height:108px!important;
    max-height:145px!important;
  }
  .ubes-map-overlay-photo{bottom:23%!important}
}


/* =========================================================
   v0.5.7 — fullscreen overlay restoration + top-row layout
   ========================================================= */

/* Top row: title on left, Region/Search card on right. */
.ubes-map-overlay-head{
  top:0!important;
  left:58px!important;
  right:355px!important;
  width:auto!important;
  min-height:118px!important;
  max-height:132px!important;
  padding:9px 12px!important;
  grid-template-columns:48px minmax(0,1fr) 48px!important;
}
.ubes-map-overlay-head .ubes-route-frame-title h2{
  font-size:23px!important;
  margin-bottom:4px!important;
}
.ubes-map-overlay-head .ubes-route-meta-line{
  margin-bottom:6px!important;
}
.ubes-map-overlay-head .ubes-route-stats{
  gap:11px!important;
}
.ubes-map-overlay-head .ubes-route-date-submit{
  margin-top:6px!important;
}
.ubes-region-route-arrow{
  width:42px!important;
  height:64px!important;
  font-size:31px!important;
}

/* Search/Region card sits level with the title instead of below it. */
.ubes-map-search{
  top:0!important;
  right:0!important;
  width:345px!important;
  min-height:118px!important;
  padding:9px 10px!important;
  border-radius:0 0 0 12px!important;
  box-sizing:border-box!important;
}
.ubes-map-search-field + .ubes-map-search-field{
  margin-top:6px!important;
}
.ubes-map-search-field label{
  margin-bottom:3px!important;
}
.ubes-map-search-field>select,
.ubes-map-search input{
  height:33px!important;
}
.ubes-map-search-row button{
  height:33px!important;
}

/* Information/photo area starts below the top row. */
.ubes-map-overlay-notes,
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-notes,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-notes{
  top:138px!important;
}
.ubes-map-overlay-photo,
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-photo,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-photo{
  top:138px!important;
  transform:none!important;
  align-items:flex-start!important;
}

/* Fullscreen: every route overlay is explicitly restored and anchored. */
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-head,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-head,
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-notes,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-notes,
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-photo,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-photo,
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-foot,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-foot,
.ubes-route-map-wrap:fullscreen .ubes-map-search,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-search{
  display:block!important;
  visibility:visible!important;
  opacity:1!important;
  pointer-events:auto!important;
}

/* Preserve hidden state until a route is actually selected. */
.ubes-route-map-wrap:fullscreen [hidden],
.ubes-route-map-wrap.ubes-css-fullscreen [hidden]{
  display:none!important;
}

/* When selected, force the four route-information surfaces back on. */
.ubes-route-map-stage.has-selection .ubes-route-map-wrap:fullscreen .ubes-map-overlay-head,
.ubes-route-map-stage.has-selection .ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-head,
.ubes-route-map-stage.has-selection .ubes-route-map-wrap:fullscreen .ubes-map-overlay-notes,
.ubes-route-map-stage.has-selection .ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-notes,
.ubes-route-map-stage.has-selection .ubes-route-map-wrap:fullscreen .ubes-map-overlay-foot,
.ubes-route-map-stage.has-selection .ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-foot{
  display:grid!important;
  visibility:visible!important;
  opacity:1!important;
}
.ubes-route-map-stage.has-selection.has-photo .ubes-route-map-wrap:fullscreen .ubes-map-overlay-photo,
.ubes-route-map-stage.has-selection.has-photo .ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-photo{
  display:flex!important;
  visibility:visible!important;
  opacity:1!important;
}

/* Fullscreen top row uses the same side-by-side structure. */
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-head,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-head{
  top:0!important;
  left:58px!important;
  right:380px!important;
  width:auto!important;
}
.ubes-route-map-wrap:fullscreen .ubes-map-search,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-search{
  top:0!important;
  right:0!important;
  width:370px!important;
}

/* Route info has room in fullscreen without swallowing the map. */
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-notes,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-notes{
  top:140px!important;
  width:390px!important;
  max-height:40%!important;
}
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-photo,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-photo{
  top:140px!important;
}

/* Mobile/tablet top row reflows sensibly. */
@media(max-width:900px){
  .ubes-map-overlay-head{
    right:285px!important;
  }
  .ubes-map-search{
    width:275px!important;
  }
}
@media (max-width:1200px), (max-width:1366px) and (any-pointer:coarse), (max-width:1366px) and (hover:none){
  .ubes-map-overlay-head{
    left:43px!important;
    right:4px!important;
    top:0!important;
    min-height:100px!important;
    max-height:none!important;
  }
  .ubes-map-search{
    top:108px!important;
    right:0!important;
    width:215px!important;
    min-height:0!important;
    border-radius:10px 0 0 10px!important;
  }
  .ubes-map-overlay-notes{
    top:auto!important;
  }
  .ubes-route-map-wrap:fullscreen .ubes-map-overlay-head,
  .ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-head{
    left:43px!important;
    right:4px!important;
  }
  .ubes-route-map-wrap:fullscreen .ubes-map-search,
  .ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-search{
    top:108px!important;
    width:215px!important;
  }
}


/* v0.5.8 — structural fullscreen fix.
   Route overlays are now genuinely children of .ubes-route-map-wrap. */

.ubes-route-map-wrap:fullscreen .ubes-map-overlay-head,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-head{
  display:grid!important;
}
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-notes,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-notes{
  display:block!important;
}
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-photo,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-photo{
  display:flex!important;
}
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-foot,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-foot{
  display:flex!important;
}

/* Respect real hidden states when there is no selection/photo/profile. */
.ubes-route-map-wrap:fullscreen [hidden],
.ubes-route-map-wrap.ubes-css-fullscreen [hidden]{
  display:none!important;
}
.ubes-route-map-stage.has-selection .ubes-route-map-wrap:fullscreen [data-route-frame-head],
.ubes-route-map-stage.has-selection .ubes-route-map-wrap.ubes-css-fullscreen [data-route-frame-head]{
  display:grid!important;
}
.ubes-route-map-stage.has-selection .ubes-route-map-wrap:fullscreen [data-route-frame-notes],
.ubes-route-map-stage.has-selection .ubes-route-map-wrap.ubes-css-fullscreen [data-route-frame-notes]{
  display:block!important;
}
.ubes-route-map-stage.has-selection .ubes-route-map-wrap:fullscreen [data-route-frame-foot],
.ubes-route-map-stage.has-selection .ubes-route-map-wrap.ubes-css-fullscreen [data-route-frame-foot]{
  display:flex!important;
}
.ubes-route-map-stage.has-selection.has-photo .ubes-route-map-wrap:fullscreen [data-route-frame-photo],
.ubes-route-map-stage.has-selection.has-photo .ubes-route-map-wrap.ubes-css-fullscreen [data-route-frame-photo]{
  display:flex!important;
}


/* =========================================================
   v0.5.9 — geographic Region navigation + true full-height profile
   ========================================================= */

/* The profile consumes the complete elevation banner. */
.ubes-map-overlay-foot,
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-foot,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-foot{
  display:block!important;
  overflow:hidden!important;
  padding:6px 8px 10px!important;
  box-sizing:border-box!important;
}
.ubes-map-overlay-foot .ubes-elevation-profile{
  display:grid!important;
  grid-template-rows:24px minmax(0,1fr)!important;
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  margin:0!important;
  padding:0!important;
  box-sizing:border-box!important;
}
.ubes-map-overlay-foot .ubes-elevation-profile-head{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:100%!important;
  height:24px!important;
  min-height:24px!important;
  margin:0!important;
  padding:0!important;
}
.ubes-map-overlay-foot .ubes-elevation-profile svg{
  display:block!important;
  align-self:stretch!important;
  justify-self:stretch!important;
  width:100%!important;
  height:100%!important;
  min-width:100%!important;
  min-height:100%!important;
  max-width:none!important;
  max-height:none!important;
  margin:0!important;
  padding:0!important;
}

/* Give fullscreen profile a meaningful proportion of the viewport. */
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-foot,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-foot{
  height:32%!important;
  min-height:250px!important;
  max-height:360px!important;
}
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-photo,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-photo{
  bottom:34%!important;
}

/* Region selection remains visibly interactive. */
.ubes-map-search-field>select[data-map-region-select]{
  cursor:pointer!important;
}


/* v0.6.0 — preserve elevation proportions; Region filter matches Terrain */
.ubes-map-overlay-foot{
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  padding:8px 12px 10px!important;
}
.ubes-map-overlay-foot .ubes-elevation-profile{
  display:block!important;
  width:100%!important;
  height:auto!important;
}
.ubes-map-overlay-foot .ubes-elevation-profile-head{
  height:auto!important;
  min-height:0!important;
  margin:0 0 4px!important;
}
.ubes-map-overlay-foot .ubes-elevation-profile svg{
  display:block!important;
  width:100%!important;
  height:auto!important;
  max-width:100%!important;
  max-height:none!important;
  min-width:0!important;
  min-height:0!important;
  aspect-ratio:1600 / 300!important;
}
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-foot,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-foot{
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
}
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-foot .ubes-elevation-profile svg,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-foot .ubes-elevation-profile svg{
  width:100%!important;
  height:auto!important;
  aspect-ratio:1600 / 300!important;
}
.ubes-map-overlay-photo,
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-photo,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-photo{
  bottom:22%!important;
}
.ubes-logbook-controls label select[data-filter-region]{
  width:100%!important;
  min-width:0!important;
  box-sizing:border-box!important;
}
.ubes-region-filter-control{display:none!important}


/* =========================================================
   v0.6.1 — elevation profile hard reset
   One sizing model only: responsive width + preserved 4:1 ratio.
   ========================================================= */

/* Remove all inherited percentage/fixed-height behaviour from the footer. */
.ubes-map-overlay-foot,
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-foot,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-foot{
  left:0!important;
  right:0!important;
  bottom:0!important;
  width:auto!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  padding:8px 12px 12px!important;
  box-sizing:border-box!important;
  overflow:visible!important;
  background:rgba(255,255,255,.68)!important;
}

/* Footer height comes entirely from the profile content. */
.ubes-map-overlay-foot .ubes-elevation-profile,
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-foot .ubes-elevation-profile,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-foot .ubes-elevation-profile{
  display:block!important;
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  margin:0!important;
  padding:0!important;
}

/* Title is a normal line above the chart, not part of a grid/flex height calculation. */
.ubes-map-overlay-foot .ubes-elevation-profile-head{
  display:block!important;
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  margin:0 0 5px!important;
  padding:0!important;
  text-align:center!important;
  line-height:1.3!important;
}

/* Chart preserves its native SVG geometry. */
.ubes-map-overlay-foot .ubes-elevation-profile svg,
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-foot .ubes-elevation-profile svg,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-foot .ubes-elevation-profile svg{
  display:block!important;
  width:100%!important;
  height:auto!important;
  min-width:0!important;
  min-height:0!important;
  max-width:100%!important;
  max-height:none!important;
  margin:0!important;
  padding:0!important;
  aspect-ratio:1200 / 300!important;
  overflow:visible!important;
}

/* Normal view: cap visual height only by capping the width of the chart area on very wide screens.
   It remains centred and proportional. */
.ubes-route-map-wrap:not(:fullscreen):not(.ubes-css-fullscreen) .ubes-map-overlay-foot .ubes-elevation-profile{
  max-width:1180px!important;
  margin:0 auto!important;
}

/* Expanded view: use more horizontal space, still preserving the exact ratio. */
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-foot .ubes-elevation-profile,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-foot .ubes-elevation-profile{
  max-width:1500px!important;
  margin:0 auto!important;
}

/* Photos are positioned against a predictable profile height rather than an old percentage banner. */
.ubes-map-overlay-photo{
  bottom:235px!important;
}
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-photo,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-photo{
  bottom:300px!important;
}

/* Keep the Leaflet attribution at the true map edge, above everything else. */
.ubes-route-map-stage .leaflet-control-attribution,
.ubes-route-map-stage.has-selection .leaflet-control-attribution,
.ubes-route-map-wrap:fullscreen .leaflet-control-attribution,
.ubes-route-map-wrap.ubes-css-fullscreen .leaflet-control-attribution{
  bottom:0!important;
  white-space:nowrap!important;
}

/* Tablet/mobile: proportional chart remains intact, just naturally becomes shorter. */
@media(max-width:900px){
  .ubes-map-overlay-photo{bottom:195px!important}
}
@media (max-width:1200px), (max-width:1366px) and (any-pointer:coarse), (max-width:1366px) and (hover:none){
  .ubes-map-overlay-foot{
    padding:5px 6px 7px!important;
  }
  .ubes-map-overlay-foot .ubes-elevation-profile-head{
    margin-bottom:2px!important;
    font-size:10px!important;
  }
  .ubes-map-overlay-photo{bottom:120px!important}
}


/* =========================================================
   v0.6.2 — dynamically sized elevation profile
   Sized from the actual map container by JS. No percentage heights.
   ========================================================= */

.ubes-route-map-wrap{
  --ubes-profile-chart-h: 150px;
  --ubes-profile-footer-h: 190px;
  --ubes-profile-clearance: 202px;
}

/* Footer occupies exactly the calculated height and nothing more. */
.ubes-map-overlay-foot,
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-foot,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-foot{
  position:absolute!important;
  left:0!important;
  right:0!important;
  bottom:0!important;
  width:auto!important;
  height:var(--ubes-profile-footer-h)!important;
  min-height:0!important;
  max-height:none!important;
  margin:0!important;
  padding:6px 12px 8px!important;
  box-sizing:border-box!important;
  overflow:hidden!important;
  background:rgba(255,255,255,.68)!important;
}

/* Profile is centred and fills the footer in a predictable two-row layout. */
.ubes-map-overlay-foot .ubes-elevation-profile,
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-foot .ubes-elevation-profile,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-foot .ubes-elevation-profile{
  display:grid!important;
  grid-template-rows:24px var(--ubes-profile-chart-h)!important;
  align-content:start!important;
  justify-items:stretch!important;
  width:100%!important;
  height:100%!important;
  max-width:none!important;
  margin:0 auto!important;
  padding:0!important;
  box-sizing:border-box!important;
}

.ubes-map-overlay-foot .ubes-elevation-profile-head{
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  width:100%!important;
  height:24px!important;
  margin:0!important;
  padding:0!important;
  text-align:center!important;
  line-height:1!important;
}

/* SVG uses the full calculated chart box, centred, while preserving its own geometry. */
.ubes-map-overlay-foot .ubes-elevation-profile svg,
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-foot .ubes-elevation-profile svg,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-foot .ubes-elevation-profile svg{
  display:block!important;
  width:100%!important;
  height:var(--ubes-profile-chart-h)!important;
  min-width:0!important;
  min-height:0!important;
  max-width:none!important;
  max-height:none!important;
  margin:0 auto!important;
  padding:0!important;
  aspect-ratio:auto!important;
  overflow:visible!important;
}

/* Other overlays stop above the real current profile height. */
.ubes-map-overlay-photo,
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-photo,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-photo{
  bottom:var(--ubes-profile-clearance)!important;
  max-height:calc(100% - 150px - var(--ubes-profile-clearance))!important;
}

.ubes-map-overlay-notes,
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-notes,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-notes{
  max-height:calc(100% - 155px - var(--ubes-profile-clearance))!important;
}

/* Do not let old max-width rules make the graph look left-shifted. */
.ubes-route-map-wrap:not(:fullscreen):not(.ubes-css-fullscreen) .ubes-map-overlay-foot .ubes-elevation-profile,
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-foot .ubes-elevation-profile,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-foot .ubes-elevation-profile{
  max-width:none!important;
  width:100%!important;
  margin-left:auto!important;
  margin-right:auto!important;
}

/* Attribution remains pinned to the true map edge. */
.ubes-route-map-stage .leaflet-control-attribution,
.ubes-route-map-stage.has-selection .leaflet-control-attribution,
.ubes-route-map-wrap:fullscreen .leaflet-control-attribution,
.ubes-route-map-wrap.ubes-css-fullscreen .leaflet-control-attribution{
  bottom:0!important;
  white-space:nowrap!important;
  z-index:1400!important;
}

/* Narrow screens use the same dynamic JS model; only trim padding/title height visually. */
@media (max-width:1200px), (max-width:1366px) and (any-pointer:coarse), (max-width:1366px) and (hover:none){
  .ubes-map-overlay-foot,
  .ubes-route-map-wrap:fullscreen .ubes-map-overlay-foot,
  .ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-foot{
    padding:3px 5px 5px!important;
  }
  .ubes-map-overlay-foot .ubes-elevation-profile{
    grid-template-rows:20px var(--ubes-profile-chart-h)!important;
  }
  .ubes-map-overlay-foot .ubes-elevation-profile-head{
    height:20px!important;
    font-size:9px!important;
  }
}


/* v0.6.3 — centre the proportional elevation plot itself */
.ubes-route-map-wrap{
  --ubes-profile-chart-w: 900px;
}

/* The banner remains full width, but the actual chart has its own proportional width. */
.ubes-map-overlay-foot .ubes-elevation-profile{
  justify-items:center!important;
}

.ubes-map-overlay-foot .ubes-elevation-profile svg,
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-foot .ubes-elevation-profile svg,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-foot .ubes-elevation-profile svg{
  width:var(--ubes-profile-chart-w)!important;
  max-width:calc(100% - 4px)!important;
  height:var(--ubes-profile-chart-h)!important;
  margin-left:auto!important;
  margin-right:auto!important;
  justify-self:center!important;
}

/* Keep the heading centred relative to the banner. */
.ubes-map-overlay-foot .ubes-elevation-profile-head{
  justify-self:stretch!important;
  text-align:center!important;
}


/* =========================================================
   v0.6.4 — SIMPLE ELEVATION MODEL
   Full available width + natural SVG ratio.
   The graph determines the banner height.
   ========================================================= */

.ubes-route-map-wrap{
  --ubes-profile-clearance: 210px;
}

/* Footer shrink-wraps the elevation content. */
.ubes-map-overlay-foot,
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-foot,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-foot{
  position:absolute!important;
  left:0!important;
  right:0!important;
  bottom:0!important;
  width:auto!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  margin:0!important;
  padding:7px 12px 10px!important;
  box-sizing:border-box!important;
  overflow:hidden!important;
  background:rgba(255,255,255,.68)!important;
}

/* No grid/flex sizing tricks: normal document flow inside the footer. */
.ubes-map-overlay-foot .ubes-elevation-profile,
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-foot .ubes-elevation-profile,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-foot .ubes-elevation-profile{
  display:block!important;
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  max-height:none!important;
  max-width:none!important;
  margin:0!important;
  padding:0!important;
}

.ubes-map-overlay-foot .ubes-elevation-profile-head{
  display:block!important;
  width:100%!important;
  height:auto!important;
  min-height:0!important;
  margin:0 0 4px!important;
  padding:0!important;
  text-align:center!important;
  line-height:1.25!important;
}

/* THIS is the only chart sizing rule:
   full width, automatic height from the SVG's real 1600:220 ratio. */
.ubes-map-overlay-foot .ubes-elevation-profile svg,
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-foot .ubes-elevation-profile svg,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-foot .ubes-elevation-profile svg{
  display:block!important;
  width:100%!important;
  height:auto!important;
  min-width:0!important;
  min-height:0!important;
  max-width:none!important;
  max-height:none!important;
  margin:0!important;
  padding:0!important;
  aspect-ratio:auto!important;
  overflow:visible!important;
}

/* Remove all previous chart-width variables/limits. */
.ubes-route-map-wrap:not(:fullscreen):not(.ubes-css-fullscreen) .ubes-map-overlay-foot .ubes-elevation-profile,
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-foot .ubes-elevation-profile,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-foot .ubes-elevation-profile{
  width:100%!important;
  max-width:none!important;
  margin:0!important;
}

/* Other overlays use the footer's REAL measured height, supplied by JS. */
.ubes-map-overlay-photo,
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-photo,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-photo{
  bottom:var(--ubes-profile-clearance)!important;
}

.ubes-map-overlay-notes,
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-notes,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-notes{
  max-height:calc(100% - 150px - var(--ubes-profile-clearance))!important;
}

/* On very wide fullscreen displays, prevent the chart becoming excessively tall
   by limiting the footer's content width while keeping it genuinely centred. */
.ubes-route-map-wrap:fullscreen .ubes-elevation-profile,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-elevation-profile{
  width:min(100%, 1800px)!important;
  margin-left:auto!important;
  margin-right:auto!important;
}

/* Mobile naturally becomes shallower because width is smaller. */
@media (max-width:1200px), (max-width:1366px) and (any-pointer:coarse), (max-width:1366px) and (hover:none){
  .ubes-map-overlay-foot,
  .ubes-route-map-wrap:fullscreen .ubes-map-overlay-foot,
  .ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-foot{
    padding:4px 6px 6px!important;
  }
  .ubes-map-overlay-foot .ubes-elevation-profile-head{
    margin-bottom:2px!important;
    font-size:9px!important;
  }
}


/* v0.6.5 — keep Search/Region card visually separate from photos */
.ubes-map-search{
  margin-bottom:12px!important;
}

/* Photos start lower than the Search/Region card, leaving a clear gutter. */
.ubes-map-overlay-photo,
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-photo,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-photo{
  top:176px!important;
}

/* Slightly larger gap in expanded/fullscreen view. */
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-photo,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-photo{
  top:184px!important;
}

@media (max-width:1200px), (max-width:1366px) and (any-pointer:coarse), (max-width:1366px) and (hover:none){
  .ubes-map-overlay-photo,
  .ubes-route-map-wrap:fullscreen .ubes-map-overlay-photo,
  .ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-photo{
    top:150px!important;
  }
}


/* v0.6.6 — minimal Search/Photo separation only */
.ubes-map-search{
  margin-bottom:0!important;
}

/* Keep roughly an 8px visual gap below the Search/Region card. */
.ubes-map-overlay-photo{
  top:164px!important;
}
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-photo,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-photo{
  top:164px!important;
}

@media (max-width:1200px), (max-width:1366px) and (any-pointer:coarse), (max-width:1366px) and (hover:none){
  .ubes-map-overlay-photo,
  .ubes-route-map-wrap:fullscreen .ubes-map-overlay-photo,
  .ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-photo{
    top:146px!important;
  }
}


/* v0.6.7 — centre photos in the available map space */
.ubes-map-overlay-photo,
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-photo,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-photo{
  top:50%!important;
  bottom:auto!important;
  transform:translateY(-50%)!important;
  margin-top:0!important;
  margin-bottom:0!important;
  max-height:calc(100% - 150px - var(--ubes-profile-clearance) - 16px)!important;
}

/* Keep a small gap from the Search/Region card and from the elevation panel. */
.ubes-map-overlay-photo{
  right:0!important;
}
.ubes-map-search{
  margin-bottom:8px!important;
}

@media (max-width:1200px), (max-width:1366px) and (any-pointer:coarse), (max-width:1366px) and (hover:none){
  .ubes-map-overlay-photo,
  .ubes-route-map-wrap:fullscreen .ubes-map-overlay-photo,
  .ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-photo{
    top:50%!important;
    transform:translateY(-50%)!important;
    max-height:calc(100% - 116px - var(--ubes-profile-clearance) - 12px)!important;
  }
}


/* =========================================================
   v0.6.8 — measured side-panel centring
   JS positions Route information and photos inside the real
   free space between the top row and elevation profile.
   ========================================================= */

.ubes-map-overlay-notes,
.ubes-map-overlay-photo,
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-notes,
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-photo,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-notes,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-photo{
  bottom:auto!important;
  transform:none!important;
  margin-top:0!important;
  margin-bottom:0!important;
}

/* JS supplies top/max-height inline from actual element measurements. */
.ubes-map-overlay-notes{
  height:auto!important;
  overflow:auto!important;
}

.ubes-map-overlay-photo{
  height:auto!important;
  overflow:hidden!important;
  display:flex!important;
  align-items:center!important;
}

/* Remove the artificial Search-card margin that was creating a large visual gap. */
.ubes-map-search{
  margin-bottom:0!important;
}

/* Keep only a tiny horizontal edge separation; vertical separation is measured by JS. */
.ubes-map-overlay-photo{
  right:0!important;
}


/* =========================================================
   v0.6.9 — side-panel positioning fix
   Older top:...!important rules were overriding JS measurements.
   CSS variables now carry the measured positions and win explicitly.
   ========================================================= */

.ubes-route-map-wrap{
  --ubes-notes-top: 170px;
  --ubes-photo-top: 170px;
  --ubes-side-max-h: 260px;
  --ubes-photo-max-h: 260px;
}

.ubes-map-overlay-notes,
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-notes,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-notes{
  top:var(--ubes-notes-top)!important;
  bottom:auto!important;
  transform:none!important;
  max-height:var(--ubes-side-max-h)!important;
  height:auto!important;
  margin:0!important;
  overflow:auto!important;
}

.ubes-map-overlay-photo,
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-photo,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-photo{
  top:var(--ubes-photo-top)!important;
  bottom:auto!important;
  transform:none!important;
  max-height:var(--ubes-photo-max-h)!important;
  margin:0!important;
  overflow:hidden!important;
  display:flex!important;
  align-items:center!important;
}

/* Let the photo content shrink if the free band is shorter than its normal size. */
.ubes-map-overlay-photo .ubes-route-image{
  width:100%!important;
  max-height:100%!important;
}
.ubes-map-overlay-photo .ubes-route-image img{
  max-height:100%!important;
}

/* Keep a genuine minimum visual gap from the elevation panel. */
.ubes-map-overlay-foot{
  z-index:730!important;
}
.ubes-map-overlay-notes,
.ubes-map-overlay-photo{
  z-index:770!important;
}


/* =========================================================
   v0.7.0 — enforce real breathing room around side panels
   ========================================================= */

.ubes-map-overlay-notes,
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-notes,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-notes{
  min-height:0!important;
  height:auto!important;
  box-sizing:border-box!important;
}

.ubes-map-overlay-photo,
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-photo,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-photo{
  min-height:0!important;
  height:auto!important;
  box-sizing:border-box!important;
}

/* The measured max-height is authoritative; do not let inner content force overflow. */
.ubes-map-overlay-notes > *,
.ubes-map-overlay-photo > *{
  max-width:100%!important;
  box-sizing:border-box!important;
}

/* Keep the bottom GPX button compact so the information card can fit naturally. */
.ubes-gpx-download-info{
  min-height:38px!important;
  margin-top:10px!important;
}

/* Remove any remaining vertical margins that can make the panel touch the profile. */
.ubes-map-overlay-notes,
.ubes-map-overlay-photo{
  margin-top:0!important;
  margin-bottom:0!important;
}


/* =========================================================
   v0.7.1 — single-centre-line side layout
   Both panels are centred halfway between the top UI and elevation panel.
   ========================================================= */

.ubes-route-map-wrap{
  --ubes-side-centre-y: 280px;
  --ubes-side-max-h: 260px;
}

.ubes-map-overlay-notes,
.ubes-map-overlay-photo,
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-notes,
.ubes-route-map-wrap:fullscreen .ubes-map-overlay-photo,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-notes,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-photo{
  top:var(--ubes-side-centre-y)!important;
  bottom:auto!important;
  transform:translateY(-50%)!important;
  max-height:var(--ubes-side-max-h)!important;
  margin:0!important;
  box-sizing:border-box!important;
}

/* Route information may scroll only if its content genuinely exceeds the free band. */
.ubes-map-overlay-notes{
  height:auto!important;
  min-height:0!important;
  overflow:auto!important;
}

/* Photo rail uses the same centre line and cannot exceed the same free band. */
.ubes-map-overlay-photo{
  height:auto!important;
  min-height:0!important;
  overflow:hidden!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
}

.ubes-map-overlay-photo .ubes-route-image{
  width:100%!important;
  max-height:100%!important;
  margin:0!important;
}

.ubes-map-overlay-photo .ubes-route-image img{
  max-height:100%!important;
  object-fit:cover!important;
}

/* No artificial margins between Search and photos; separation comes from the measured band. */
.ubes-map-search{
  margin:0!important;
}


/* =========================================================
   v0.7.2 — STRUCTURAL MIDDLE BAND
   Notes and photos share one bounded row between top controls
   and elevation. Overlap with elevation is structurally impossible.
   ========================================================= */

.ubes-route-map-wrap{
  --ubes-top-row-clearance: 140px;
  --ubes-profile-clearance: 220px;
}

/* One dedicated free-space band. */
.ubes-route-side-band{
  position:absolute!important;
  z-index:760!important;
  top:var(--ubes-top-row-clearance)!important;
  bottom:var(--ubes-profile-clearance)!important;
  left:0!important;
  right:0!important;
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:14px!important;
  padding:10px 0!important;
  box-sizing:border-box!important;
  pointer-events:none!important;
  overflow:hidden!important;
}

/* Children are normal flex items now — no absolute positioning at all. */
.ubes-route-side-band .ubes-map-overlay-notes,
.ubes-route-side-band .ubes-map-overlay-photo{
  position:relative!important;
  top:auto!important;
  right:auto!important;
  bottom:auto!important;
  left:auto!important;
  transform:none!important;
  margin:0!important;
  max-height:100%!important;
  min-height:0!important;
  box-sizing:border-box!important;
  pointer-events:auto!important;
}

/* Route information anchors to the left. */
.ubes-route-side-band .ubes-map-overlay-notes{
  flex:0 0 340px!important;
  width:340px!important;
  height:auto!important;
  overflow:auto!important;
  align-self:center!important;
}

/* Photos anchor to the right and centre vertically in exactly the same band. */
.ubes-route-side-band .ubes-map-overlay-photo{
  flex:0 0 292px!important;
  width:292px!important;
  height:auto!important;
  overflow:hidden!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  align-self:center!important;
}

.ubes-route-side-band .ubes-map-overlay-photo .ubes-route-image{
  width:100%!important;
  max-height:100%!important;
  margin:0!important;
}

.ubes-route-side-band .ubes-map-overlay-photo .ubes-route-image img{
  max-width:100%!important;
  object-fit:cover!important;
}

/* Fullscreen simply gives the same structural band more room. */
.ubes-route-map-wrap:fullscreen .ubes-route-side-band,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-route-side-band{
  top:var(--ubes-top-row-clearance)!important;
  bottom:var(--ubes-profile-clearance)!important;
  padding:12px 0!important;
}

.ubes-route-map-wrap:fullscreen .ubes-route-side-band .ubes-map-overlay-notes,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-route-side-band .ubes-map-overlay-notes{
  flex-basis:390px!important;
  width:390px!important;
}

.ubes-route-map-wrap:fullscreen .ubes-route-side-band .ubes-map-overlay-photo,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-route-side-band .ubes-map-overlay-photo{
  flex-basis:390px!important;
  width:390px!important;
}

/* Hidden children stay hidden. */
.ubes-route-side-band [hidden]{
  display:none!important;
}

/* Mobile: same principle, but smaller side widths. */
@media(max-width:900px){
  .ubes-route-side-band{
    gap:8px!important;
    padding:8px 0!important;
  }
  .ubes-route-side-band .ubes-map-overlay-notes{
    flex-basis:285px!important;
    width:285px!important;
  }
  .ubes-route-side-band .ubes-map-overlay-photo{
    flex-basis:220px!important;
    width:220px!important;
  }
}

@media (max-width:1200px), (max-width:1366px) and (any-pointer:coarse), (max-width:1366px) and (hover:none){
  .ubes-route-side-band{
    top:var(--ubes-top-row-clearance)!important;
    bottom:var(--ubes-profile-clearance)!important;
    align-items:center!important;
    gap:5px!important;
    padding:5px 0!important;
  }
  .ubes-route-side-band .ubes-map-overlay-notes{
    flex:1 1 auto!important;
    width:auto!important;
    max-width:calc(100% - 132px)!important;
  }
  .ubes-route-side-band .ubes-map-overlay-photo{
    flex:0 0 126px!important;
    width:126px!important;
  }
}


/* =========================================================
   v0.7.7 — photo frame, route direction + slope-colour trial
   ========================================================= */

.ubes-route-side-band .ubes-route-image img,
.ubes-route-map-wrap:fullscreen .ubes-route-side-band .ubes-route-image img,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-route-side-band .ubes-route-image img{
  border:3px solid rgba(255,255,255,0.97)!important;
  border-radius:10px!important;
  box-sizing:border-box!important;
  box-shadow:0 3px 12px rgba(0,0,0,0.22)!important;
}

.ubes-route-direction-icon{
  background:transparent!important;
  border:0!important;
}
.ubes-route-direction-icon span{
  display:block;
  width:20px;
  height:20px;
  line-height:20px;
  text-align:center;
  font-size:15px;
  font-weight:800;
  color:#fff;
  transform-origin:50% 50%;
  text-shadow:
    -1px -1px 0 rgba(25,36,32,.88),
     1px -1px 0 rgba(25,36,32,.88),
    -1px  1px 0 rgba(25,36,32,.88),
     1px  1px 0 rgba(25,36,32,.88),
     0 2px 4px rgba(0,0,0,.45);
}

.ubes-elevation-profile-head{
  display:flex!important;
  align-items:center!important;
  justify-content:space-between!important;
  gap:14px!important;
}
.ubes-slope-key{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
  font-size:11px;
  font-weight:600;
  color:#56615c;
  line-height:1;
}
.ubes-slope-key span{
  display:inline-flex;
  align-items:center;
  gap:4px;
  white-space:nowrap;
}
.ubes-slope-key i{
  display:inline-block;
  width:14px;
  height:4px;
  border-radius:3px;
}
.ubes-slope-key-flat{ background:#3f765f; }
.ubes-slope-key-moderate{ background:#d0a23a; }
.ubes-slope-key-steep{ background:#d87939; }
.ubes-slope-key-very-steep{ background:#b94747; }

@media (max-width:1200px), (max-width:1366px) and (any-pointer:coarse), (max-width:1366px) and (hover:none){
  .ubes-elevation-profile-head{
    align-items:flex-start!important;
    flex-direction:column!important;
    gap:5px!important;
  }
  .ubes-slope-key{
    justify-content:flex-start;
    gap:7px;
    font-size:10px;
  }
}


/* =========================================================
   v0.7.8 — OS-style route arrows + interactive gradient profile
   ========================================================= */

.ubes-route-direction-icon{
  background:transparent!important;
  border:0!important;
}

.ubes-os-route-arrow{
  display:block;
  width:24px;
  height:20px;
  transform-origin:50% 50%;
  filter:drop-shadow(0 1px 1px rgba(0,0,0,.28));
}
.ubes-os-route-arrow svg{
  display:block;
  width:24px;
  height:20px;
  overflow:visible;
}

/* OS-style green → yellow → orange → red gradient ramp.
   Same palette is used programmatically for map and profile. */
.ubes-slope-key{
  display:grid!important;
  grid-template-columns:54px repeat(4,auto)!important;
  align-items:center!important;
  gap:5px!important;
  font-size:10px!important;
  color:#59635e!important;
}
.ubes-slope-key-ramp{
  width:54px!important;
  height:6px!important;
  border-radius:999px!important;
  background:linear-gradient(
    90deg,
    #1a9850 0%,
    #91cf60 25%,
    #fee08b 50%,
    #fc8d59 72%,
    #d73027 100%
  )!important;
}
.ubes-slope-key-label{
  white-space:nowrap;
}

.ubes-profile-scrub-readout{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:28px;
  padding:2px 10px 4px;
  min-height:28px;
  box-sizing:border-box;
}
.ubes-profile-scrub-readout > span{
  display:flex;
  align-items:baseline;
  gap:6px;
  white-space:nowrap;
}
.ubes-profile-scrub-readout small{
  font-size:10px;
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:.055em;
  color:#6f746f;
}
.ubes-profile-scrub-readout strong{
  font-size:12px;
  font-weight:750;
  color:#24483f;
}

.ubes-elevation-line-gradient{
  fill:none!important;
  stroke-width:4!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
}
.ubes-elevation-area-gradient{
  opacity:.18!important;
}

.ubes-profile-cursor-line{
  stroke:#24483f;
  stroke-width:1.5;
  stroke-dasharray:4 4;
  opacity:.68;
  pointer-events:none;
}
.ubes-profile-cursor-dot{
  stroke:#fff;
  stroke-width:3;
  pointer-events:none;
  filter:drop-shadow(0 1px 2px rgba(0,0,0,.3));
}
.ubes-profile-hitbox{
  cursor:crosshair;
  pointer-events:all;
}
.ubes-elevation-profile svg:focus{
  outline:2px solid rgba(47,93,80,.45);
  outline-offset:2px;
  border-radius:4px;
}

@media(max-width:760px){
  .ubes-profile-scrub-readout{
    gap:10px;
    justify-content:space-between;
    flex-wrap:wrap;
  }
  .ubes-profile-scrub-readout > span{
    gap:4px;
  }
  .ubes-slope-key{
    grid-template-columns:48px repeat(4,auto)!important;
  }
  .ubes-slope-key-ramp{
    width:48px!important;
  }
}


/* =========================================================
   v0.7.9 — clean embedded arrows and profile gradient
   ========================================================= */

.ubes-slope-key{
  display:none!important;
}

.ubes-route-direction-icon{
  width:10px!important;
  height:7px!important;
  background:transparent!important;
  border:0!important;
}
.ubes-os-route-arrow{
  display:block!important;
  width:10px!important;
  height:7px!important;
  transform-origin:50% 50%!important;
  filter:drop-shadow(0 0 0.75px rgba(0,0,0,.38))!important;
}
.ubes-os-route-arrow svg{
  display:block!important;
  width:10px!important;
  height:7px!important;
  overflow:visible!important;
}

/* Gradient is carried by the actual elevation line. */
.ubes-elevation-line-gradient{
  fill:none!important;
  stroke-width:5!important;
  stroke-linecap:round!important;
  stroke-linejoin:round!important;
}
.ubes-elevation-area-gradient{
  opacity:1!important;
}

/* Cursor is deliberately neutral so it does not imply gradient colour. */
.ubes-profile-cursor-dot{
  fill:#fff!important;
  stroke:#24483f!important;
  stroke-width:3!important;
  filter:drop-shadow(0 1px 2px rgba(0,0,0,.28))!important;
}
.ubes-profile-scrub-readout [data-profile-gradient]{
  color:#24483f!important;
}


/* =========================================================
   v0.8.0 — visible embedded arrows + real slope-coloured profile
   ========================================================= */

/* White route arrows remain inside the now-9px selected GPX line,
   but are long enough to read clearly as directional arrows. */
.ubes-route-direction-icon{
  width:15px!important;
  height:8px!important;
  background:transparent!important;
  border:0!important;
}
.ubes-os-route-arrow{
  display:block!important;
  width:15px!important;
  height:8px!important;
  transform-origin:50% 50%!important;
  filter:drop-shadow(0 0 1px rgba(0,0,0,.55))!important;
}
.ubes-os-route-arrow svg{
  display:block!important;
  width:15px!important;
  height:8px!important;
  overflow:visible!important;
}

/* Legacy solid profile-line rules must not affect the new coloured segments. */
.ubes-elevation-gradient-segment{
  fill:none!important;
  vector-effect:non-scaling-stroke;
  pointer-events:none;
}

/* Scrub cursor stays neutral on graph and map. */
.ubes-profile-cursor-dot{
  fill:#fff!important;
  stroke:#24483f!important;
  stroke-width:3!important;
}


/* =========================================================
   v0.8.1 — clearer frequent direction marks
   ========================================================= */

.ubes-route-direction-icon{
  width:18px!important;
  height:16px!important;
  background:transparent!important;
  border:0!important;
  overflow:visible!important;
}

.ubes-os-route-arrow{
  display:block!important;
  width:18px!important;
  height:16px!important;
  transform-origin:50% 50%!important;
  filter:drop-shadow(0 0 1.2px rgba(0,0,0,.7))!important;
  overflow:visible!important;
}

.ubes-os-route-arrow svg{
  display:block!important;
  width:18px!important;
  height:16px!important;
  overflow:visible!important;
}




/* =========================================================
   v0.8.5 — isolated mobile layout
   Desktop remains the v0.8.3 layout.
   ========================================================= */

.ubes-route-mobile-head,
.ubes-route-mobile-details{
  display:none;
}

@media (max-width:1200px), (max-width:1366px) and (any-pointer:coarse), (max-width:1366px) and (hover:none){

  /* Title and Download GPX above map */
  .ubes-route-mobile-head:not([hidden]){
    display:flex!important;
    align-items:flex-start;
    justify-content:space-between;
    gap:12px;
    margin:0 0 10px;
    padding:0 2px;
  }

  .ubes-route-mobile-title-wrap{
    flex:1 1 auto;
    min-width:0;
  }

  .ubes-route-mobile-head h2{
    margin:0 0 3px!important;
    font-size:20px!important;
    line-height:1.15!important;
    color:#24483f!important;
  }

  .ubes-route-mobile-head p{
    margin:0!important;
    font-size:12px!important;
    line-height:1.35!important;
    color:#6f746f!important;
  }

  .ubes-mobile-gpx-download{
    flex:0 0 auto;
    min-height:38px;
    padding:9px 12px;
    border-radius:9px;
    background:#2f5d50;
    color:#fff!important;
    text-decoration:none!important;
    font-size:12px;
    font-weight:700;
    white-space:nowrap;
    display:flex;
    align-items:center;
    justify-content:center;
  }

  .ubes-mobile-gpx-download[hidden]{
    display:none!important;
  }

  /* Remove desktop overlays that are not useful on phone */
  .ubes-map-search,
  .ubes-map-overlay-head,
  .ubes-route-side-band{
    display:none!important;
  }

  /* Mobile gets a static elevation profile only.
     The desktop renderer still creates the scrub elements, but CSS disables
     the interaction/display here so desktop JavaScript is untouched. */
  .ubes-profile-scrub-readout,
  .ubes-profile-cursor-line,
  .ubes-profile-cursor-dot,
  .ubes-profile-hitbox{
    display:none!important;
    pointer-events:none!important;
  }

  .ubes-elevation-profile svg{
    cursor:default!important;
  }

  /* Route information below map */
  .ubes-route-mobile-details:not([hidden]){
    display:block!important;
    margin-top:12px;
  }

  .ubes-route-mobile-info{
    background:#fff;
    border:1px solid rgba(36,72,63,.13);
    border-radius:12px;
    padding:14px 16px;
    box-shadow:0 2px 9px rgba(0,0,0,.07);
  }

  .ubes-route-mobile-info section{
    margin:0 0 12px;
  }

  .ubes-route-mobile-info section:last-child{
    margin-bottom:0;
  }

  .ubes-route-mobile-info h3{
    margin:0 0 4px!important;
    font-size:14px!important;
    line-height:1.25!important;
    color:#24483f!important;
  }

  .ubes-route-mobile-info p{
    margin:0!important;
    font-size:13px!important;
    line-height:1.5!important;
    color:#3e4541!important;
  }

  /* Photos below route information */
  .ubes-route-mobile-gallery:not([hidden]){
    display:grid!important;
    grid-template-columns:1fr;
    gap:9px;
    margin-top:10px;
  }

  .ubes-route-mobile-gallery img{
    display:block;
    width:100%;
    height:auto;
    max-height:360px;
    object-fit:cover;
    border:3px solid #fff;
    border-radius:10px;
    box-sizing:border-box;
    box-shadow:0 2px 10px rgba(0,0,0,.16);
  }
}


/* =========================================================
   v0.8.6 — authoritative deselected/Home state
   ========================================================= */

/* hidden must always mean hidden, even when an older overlay rule uses
   display:flex/grid !important. */
.ubes-route-map-wrap [hidden],
.ubes-route-mobile-head[hidden],
.ubes-route-mobile-details[hidden],
.ubes-route-mobile-gallery[hidden]{
  display:none!important;
}

/* Home removes has-selection. In that state absolutely no selected-route
   surface may remain visible, regardless of legacy display rules. */
.ubes-route-map-stage:not(.has-selection) [data-route-frame-head],
.ubes-route-map-stage:not(.has-selection) [data-route-frame-photo],
.ubes-route-map-stage:not(.has-selection) [data-route-frame-notes],
.ubes-route-map-stage:not(.has-selection) [data-route-frame-foot],
.ubes-route-map-stage:not(.has-selection) .ubes-route-side-band{
  display:none!important;
}


/* =========================================================
   v0.8.7 — submission feedback / upload preflight
   ========================================================= */

.ubes-route-client-message{
  margin:0 0 14px;
  padding:11px 13px;
  border:1px solid #c48b39;
  border-radius:9px;
  background:#fff8e8;
  color:#573e16;
  font-size:13px;
  line-height:1.45;
  font-weight:600;
}

.ubes-route-client-message[hidden]{
  display:none!important;
}

.ubes-route-submit:disabled{
  opacity:.65;
  cursor:wait;
}


/* =========================================================
   v0.8.9 — authoritative desktop + fullscreen selected layout
   Removes old fixed photo heights and restores the fullscreen top row.
   ========================================================= */

@media (min-width:1201px) and (hover:hover) and (pointer:fine), (min-width:1367px){

  /* ---------- fullscreen shell / top controls ---------- */

  .ubes-route-map-wrap:fullscreen,
  .ubes-route-map-wrap.ubes-css-fullscreen{
    width:100%!important;
    height:100%!important;
    min-height:100%!important;
    overflow:hidden!important;
    background:#f5f3ee!important;
  }

  .ubes-route-map-wrap:fullscreen .ubes-route-master-map,
  .ubes-route-map-wrap.ubes-css-fullscreen .ubes-route-master-map{
    width:100%!important;
    height:100%!important;
    min-height:100%!important;
  }

  .ubes-route-map-stage.has-selection .ubes-route-map-wrap:fullscreen [data-route-frame-head],
  .ubes-route-map-stage.has-selection .ubes-route-map-wrap.ubes-css-fullscreen [data-route-frame-head]{
    display:grid!important;
    visibility:visible!important;
    opacity:1!important;
    top:0!important;
    left:58px!important;
    right:380px!important;
    width:auto!important;
    z-index:920!important;
  }

  .ubes-route-map-wrap:fullscreen .ubes-map-search,
  .ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-search{
    display:block!important;
    visibility:visible!important;
    opacity:1!important;
    top:0!important;
    right:0!important;
    width:370px!important;
    z-index:930!important;
  }

  .ubes-route-map-wrap:fullscreen .ubes-map-control-stack,
  .ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-control-stack{
    margin:18px 0 0 10px!important;
    z-index:1000!important;
  }

  /* ---------- one real middle band ---------- */

  .ubes-route-side-band{
    top:var(--ubes-top-row-clearance)!important;
    bottom:var(--ubes-profile-clearance)!important;
    left:0!important;
    right:0!important;
    padding:12px 0!important;
    box-sizing:border-box!important;
    overflow:hidden!important;
    display:flex!important;
    align-items:center!important;
    justify-content:space-between!important;
  }

  .ubes-route-side-band .ubes-map-overlay-notes,
  .ubes-route-side-band .ubes-map-overlay-photo{
    position:relative!important;
    top:auto!important;
    right:auto!important;
    bottom:auto!important;
    left:auto!important;
    transform:none!important;
    margin:0!important;
    min-height:0!important;
    max-height:100%!important;
    box-sizing:border-box!important;
  }

  .ubes-route-side-band .ubes-map-overlay-notes{
    flex:0 0 340px!important;
    width:340px!important;
    height:auto!important;
    overflow:auto!important;
    overscroll-behavior:contain;
  }

  .ubes-route-map-wrap:fullscreen .ubes-route-side-band .ubes-map-overlay-notes,
  .ubes-route-map-wrap.ubes-css-fullscreen .ubes-route-side-band .ubes-map-overlay-notes{
    flex-basis:390px!important;
    width:390px!important;
  }

  /* ---------- photo rail fits the band, never fixed pixels ---------- */

  .ubes-route-side-band .ubes-map-overlay-photo{
    flex:0 0 292px!important;
    width:292px!important;
    height:100%!important;
    align-self:stretch!important;
    overflow:hidden!important;
    display:flex!important;
    align-items:center!important;
    justify-content:center!important;
  }

  .ubes-route-map-wrap:fullscreen .ubes-route-side-band .ubes-map-overlay-photo,
  .ubes-route-map-wrap.ubes-css-fullscreen .ubes-route-side-band .ubes-map-overlay-photo{
    flex-basis:390px!important;
    width:390px!important;
  }

  .ubes-route-side-band .ubes-map-overlay-photo .ubes-route-image{
    width:100%!important;
    height:100%!important;
    min-height:0!important;
    max-height:100%!important;
    margin:0!important;
    gap:8px!important;
    overflow:hidden!important;
    box-sizing:border-box!important;
  }

  /* One photo: use the available band without forcing a fixed height. */
  .ubes-route-side-band .ubes-route-image[data-count="1"]{
    display:flex!important;
    align-items:center!important;
  }

  .ubes-route-side-band .ubes-route-image[data-count="1"] img{
    width:100%!important;
    height:100%!important;
    min-height:0!important;
    max-height:100%!important;
    object-fit:cover!important;
  }

  /* Two photos: equal stacked frames. */
  .ubes-route-side-band .ubes-route-image[data-count="2"]{
    display:grid!important;
    grid-template-columns:1fr!important;
    grid-template-rows:minmax(0,1fr) minmax(0,1fr)!important;
  }

  .ubes-route-side-band .ubes-route-image[data-count="2"] img{
    width:100%!important;
    height:100%!important;
    min-height:0!important;
    max-height:none!important;
    object-fit:cover!important;
  }

  /* Three photos: large hero above two supporting images.
     The rows are fractions of the REAL available middle-band height. */
  .ubes-route-side-band .ubes-route-image[data-count="3"]{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) minmax(0,1fr)!important;
    grid-template-rows:minmax(0,2fr) minmax(0,1fr)!important;
    gap:8px!important;
  }

  .ubes-route-side-band .ubes-route-image[data-count="3"] img{
    width:100%!important;
    height:100%!important;
    min-height:0!important;
    max-height:none!important;
    object-fit:cover!important;
  }

  .ubes-route-side-band .ubes-route-image[data-count="3"] img:first-child{
    grid-column:1 / -1!important;
    grid-row:1!important;
  }

  .ubes-route-side-band .ubes-route-image[data-count="3"] img:nth-child(2){
    grid-column:1!important;
    grid-row:2!important;
  }

  .ubes-route-side-band .ubes-route-image[data-count="3"] img:nth-child(3){
    grid-column:2!important;
    grid-row:2!important;
  }

  /* ---------- profile remains below, with no side-panel intrusion ---------- */

  .ubes-map-overlay-foot{
    z-index:730!important;
  }

  .ubes-route-side-band{
    z-index:760!important;
  }

  .ubes-map-overlay-head{
    z-index:920!important;
  }

  .ubes-map-search{
    z-index:930!important;
  }
}

/* Hidden always wins, including fullscreen. */
.ubes-route-map-wrap [hidden]{
  display:none!important;
}

/* =========================================================
   v0.9.8 — full-height active photo with width-matched peeks
   ========================================================= */

@media (min-width:1201px) and (hover:hover) and (pointer:fine), (min-width:1367px){

  /* Middle band is only a common geographic boundary.
     Notes and gallery are otherwise independent. */
  .ubes-route-side-band,
  .ubes-route-map-wrap:fullscreen .ubes-route-side-band,
  .ubes-route-map-wrap.ubes-css-fullscreen .ubes-route-side-band{
    position:absolute!important;
    top:calc(var(--ubes-top-row-clearance) + 8px)!important;
    bottom:var(--ubes-profile-clearance)!important;
    left:0!important;
    right:0!important;

    display:block!important;
    min-height:0!important;
    padding:4px 8px 8px 0!important;
    box-sizing:border-box!important;
    overflow:hidden!important;
    pointer-events:none!important;
  }

  /* Route information remains independent on the left. */
  .ubes-route-side-band .ubes-map-overlay-notes{
    position:absolute!important;
    left:0!important;
    right:auto!important;
    top:50%!important;
    bottom:auto!important;
    transform:translateY(-50%)!important;

    width:340px!important;
    max-width:340px!important;
    height:auto!important;
    max-height:100%!important;

    margin:0!important;
    box-sizing:border-box!important;
    overflow:auto!important;
    pointer-events:auto!important;
  }

  .ubes-route-map-wrap:fullscreen .ubes-route-side-band .ubes-map-overlay-notes,
  .ubes-route-map-wrap.ubes-css-fullscreen .ubes-route-side-band .ubes-map-overlay-notes{
    top:0!important;
    transform:none!important;
    width:390px!important;
    max-width:390px!important;
    max-height:none!important;
    overflow:visible!important;
  }

  /* Gallery anchored independently to the right.
     v0.9.8: active photo may use the WHOLE available gallery height. */
  .ubes-route-side-band .ubes-map-overlay-photo{
    --ubes-gallery-width:460px;
    --ubes-active-photo-width:460px;

    position:absolute!important;
    top:0!important;
    right:8px!important;
    bottom:0!important;
    left:auto!important;
    transform:none!important;

    width:min(var(--ubes-gallery-width), calc(100% - 390px))!important;
    max-width:calc(100% - 390px)!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;

    display:block!important;

    margin:0!important;
    padding:0!important;
    box-sizing:border-box!important;

    background:transparent!important;
    border:0!important;
    outline:0!important;
    border-radius:0!important;
    box-shadow:none!important;
    overflow:hidden!important;

    pointer-events:auto!important;
  }

  .ubes-route-map-wrap:fullscreen .ubes-route-side-band .ubes-map-overlay-photo,
  .ubes-route-map-wrap.ubes-css-fullscreen .ubes-route-side-band .ubes-map-overlay-photo{
    --ubes-gallery-width:598px;

    width:min(var(--ubes-gallery-width), calc(100% - 440px))!important;
    max-width:calc(100% - 440px)!important;
  }

  /* ACTIVE PHOTO:
     full width/height viewport with no peek rows stealing space. */
  .ubes-route-side-band .ubes-photo-gallery-viewport{
    position:absolute!important;
    inset:0!important;

    display:flex!important;
    align-items:center!important;
    justify-content:center!important;

    width:100%!important;
    height:100%!important;
    min-width:0!important;
    min-height:0!important;
    max-width:none!important;
    max-height:none!important;

    margin:0!important;
    padding:0!important;

    overflow:hidden!important;
    background:transparent!important;
    border:0!important;
    outline:0!important;
    border-radius:0!important;
    box-shadow:none!important;
  }

  .ubes-route-side-band .ubes-photo-gallery-viewport > img{
    display:block!important;

    width:auto!important;
    height:auto!important;
    max-width:100%!important;
    max-height:100%!important;

    margin:auto!important;
    padding:0!important;

    object-fit:contain!important;
    aspect-ratio:auto!important;

    background:transparent!important;
    border:0!important;
    outline:0!important;
    border-radius:0!important;
    box-shadow:none!important;
  }

  /* PEEKS:
     absolute overlays so they consume ZERO active-image height.
     Width is dynamically matched to the actual rendered active image. */
  .ubes-photo-gallery-peek{
    position:absolute!important;
    left:50%!important;
    transform:translateX(-50%)!important;

    display:block!important;
    width:min(var(--ubes-active-photo-width), 100%)!important;
    max-width:100%!important;
    height:34px!important;

    overflow:hidden!important;
    margin:0!important;
    padding:0!important;

    background:transparent!important;
    border:0!important;
    outline:0!important;
    border-radius:0!important;
    box-shadow:none!important;

    opacity:.58!important;
    pointer-events:none!important;
    z-index:5!important;
  }

  .ubes-photo-gallery-peek-prev{
    top:0!important;
  }

  .ubes-photo-gallery-peek-next{
    bottom:0!important;
  }

  .ubes-photo-gallery-peek img{
    display:block!important;
    width:100%!important;
    height:100%!important;
    max-width:none!important;
    max-height:none!important;

    object-fit:cover!important;

    margin:0!important;
    padding:0!important;
    border:0!important;
    outline:0!important;
    border-radius:0!important;
    box-shadow:none!important;
  }

  /* Chevrons overlay the peeks and therefore also match the
     visual width of the currently displayed image. */
  .ubes-photo-gallery-arrow{
    position:absolute!important;
    left:50%!important;
    transform:translateX(-50%)!important;

    width:34px!important;
    height:34px!important;
    min-width:34px!important;
    min-height:34px!important;

    margin:0!important;
    padding:0!important;

    display:flex!important;
    align-items:center!important;
    justify-content:center!important;

    border:0!important;
    border-radius:0!important;
    background:transparent!important;
    box-shadow:none!important;

    color:#24483f!important;
    cursor:pointer!important;
    z-index:8!important;
  }

  .ubes-photo-gallery-prev{top:0!important}
  .ubes-photo-gallery-next{bottom:0!important}

  .ubes-photo-gallery-arrow svg{
    display:block!important;
    width:22px!important;
    height:22px!important;
    overflow:visible!important;
  }

  .ubes-photo-gallery-arrow path{
    fill:none!important;
    stroke:currentColor!important;
    stroke-width:2.6!important;
    stroke-linecap:round!important;
    stroke-linejoin:round!important;
  }

  .ubes-photo-gallery-prev svg{transform:rotate(-90deg)!important}
  .ubes-photo-gallery-next svg{transform:rotate(90deg)!important}

  .ubes-photo-gallery-arrow:hover,
  .ubes-photo-gallery-arrow:focus-visible{
    color:#17352f!important;
    background:transparent!important;
    box-shadow:none!important;
  }

  .ubes-photo-gallery-position{
    position:absolute!important;
    right:4px!important;
    bottom:4px!important;
    padding:2px 6px!important;

    border:0!important;
    border-radius:999px!important;
    background:rgba(255,255,255,.82)!important;
    color:#24483f!important;
    box-shadow:none!important;

    font-size:10px!important;
    font-weight:700!important;
    line-height:1!important;
    z-index:9!important;
    pointer-events:none!important;
  }

  /* Single photo: same full viewport, simply no peeks/arrows. */
  .ubes-route-side-band .ubes-map-overlay-photo.has-single-photo{
    display:block!important;
  }

  .ubes-photo-gallery-peek[hidden],
  .ubes-photo-gallery-arrow[hidden],
  .ubes-photo-gallery-position[hidden],
  .ubes-photo-gallery-viewport[hidden],
  .ubes-map-overlay-photo[hidden]{
    display:none!important;
  }
}

@media (max-width:1200px), (max-width:1366px) and (any-pointer:coarse), (max-width:1366px) and (hover:none){
  .ubes-photo-gallery-peek,
  .ubes-photo-gallery-arrow,
  .ubes-photo-gallery-position{
    display:none!important;
  }
}


/* =========================================================
   v0.9.9 — fullscreen visibility + right-edge gallery alignment
   ========================================================= */

@media (min-width:1201px) and (hover:hover) and (pointer:fine), (min-width:1367px){

  /* The actual active image should hug the right edge of its gallery area,
     especially in shorter/narrower desktop windows. */
  .ubes-route-side-band .ubes-photo-gallery-viewport{
    justify-content:flex-end!important;
    align-items:center!important;
  }

  .ubes-route-side-band .ubes-photo-gallery-viewport > img{
    margin:auto 0 auto auto!important;
  }

  /* Peeks are width-matched to the rendered active image and align to the
     same right edge instead of floating around the centre of the map. */
  .ubes-photo-gallery-peek{
    left:auto!important;
    right:0!important;
    transform:none!important;
    width:min(var(--ubes-active-photo-width), 100%)!important;
  }

  /* Centre the chevron over the right-aligned peek width. */
  .ubes-photo-gallery-arrow{
    left:auto!important;
    transform:none!important;
    right:max(0px, calc((min(var(--ubes-active-photo-width), 100%) - 34px) / 2))!important;
  }

  .ubes-photo-gallery-position{
    right:4px!important;
  }

  /* -------------------------------------------------------
     FULLSCREEN
     Old fullscreen rules force [data-route-frame-photo] back
     to display:flex with older dimensions. This selector is
     intentionally more specific so the current carousel wins.
     ------------------------------------------------------- */

  .ubes-route-map-stage.has-selection.has-photo
  .ubes-route-map-wrap:fullscreen
  .ubes-route-side-band
  [data-route-frame-photo],
  .ubes-route-map-stage.has-selection.has-photo
  .ubes-route-map-wrap.ubes-css-fullscreen
  .ubes-route-side-band
  [data-route-frame-photo]{
    --ubes-gallery-width:598px!important;
    --ubes-active-photo-width:598px;

    display:block!important;
    visibility:visible!important;
    opacity:1!important;

    position:absolute!important;
    top:0!important;
    right:8px!important;
    bottom:0!important;
    left:auto!important;
    transform:none!important;

    width:min(598px, calc(100% - 440px))!important;
    max-width:calc(100% - 440px)!important;
    height:auto!important;
    min-height:1px!important;
    max-height:none!important;

    margin:0!important;
    padding:0!important;

    overflow:hidden!important;
    background:transparent!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
    pointer-events:auto!important;
  }

  .ubes-route-map-stage.has-selection.has-photo
  .ubes-route-map-wrap:fullscreen
  .ubes-route-side-band
  [data-route-gallery],
  .ubes-route-map-stage.has-selection.has-photo
  .ubes-route-map-wrap.ubes-css-fullscreen
  .ubes-route-side-band
  [data-route-gallery]{
    display:flex!important;
    visibility:visible!important;
    opacity:1!important;

    position:absolute!important;
    inset:0!important;

    align-items:center!important;
    justify-content:flex-end!important;

    width:100%!important;
    height:100%!important;
    min-height:1px!important;
    max-height:none!important;

    margin:0!important;
    padding:0!important;
    overflow:hidden!important;
  }

  .ubes-route-map-stage.has-selection.has-photo
  .ubes-route-map-wrap:fullscreen
  .ubes-route-side-band
  [data-gallery-active-img],
  .ubes-route-map-stage.has-selection.has-photo
  .ubes-route-map-wrap.ubes-css-fullscreen
  .ubes-route-side-band
  [data-gallery-active-img]{
    display:block!important;
    visibility:visible!important;
    opacity:1!important;

    width:auto!important;
    height:auto!important;
    max-width:100%!important;
    max-height:100%!important;

    margin:auto 0 auto auto!important;
    object-fit:contain!important;

    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
    background:transparent!important;
  }

  /* Fullscreen peeks/controls use the same right-aligned active-photo width. */
  .ubes-route-map-wrap:fullscreen .ubes-photo-gallery-peek,
  .ubes-route-map-wrap.ubes-css-fullscreen .ubes-photo-gallery-peek{
    left:auto!important;
    right:0!important;
    transform:none!important;
  }

  .ubes-route-map-wrap:fullscreen .ubes-photo-gallery-arrow,
  .ubes-route-map-wrap.ubes-css-fullscreen .ubes-photo-gallery-arrow{
    left:auto!important;
    transform:none!important;
    right:max(0px, calc((min(var(--ubes-active-photo-width), 100%) - 34px) / 2))!important;
  }

  /* Hidden still wins when there genuinely is no photo. */
  .ubes-route-map-stage:not(.has-photo) [data-route-frame-photo],
  [data-route-frame-photo][hidden],
  [data-route-gallery][hidden]{
    display:none!important;
  }
}


/* =========================================================
   v0.9.10 — carousel peek spacing
   ========================================================= */

@media (min-width:1201px) and (hover:hover) and (pointer:fine), (min-width:1367px){

  /* Multiple-photo carousel:
     34px peek + 7px breathing room before the active image. */
  .ubes-route-side-band
  .ubes-map-overlay-photo.has-multiple-photos
  .ubes-photo-gallery-viewport{
    top:41px!important;
    bottom:41px!important;
    left:0!important;
    right:0!important;
    width:auto!important;
    height:auto!important;
  }

  /* Single-photo routes still use the whole available gallery height. */
  .ubes-route-side-band
  .ubes-map-overlay-photo.has-single-photo
  .ubes-photo-gallery-viewport{
    inset:0!important;
    width:100%!important;
    height:100%!important;
  }
}


/* =========================================================
   v0.9.11 — fullscreen carousel peek spacing
   ========================================================= */

@media (min-width:1201px) and (hover:hover) and (pointer:fine), (min-width:1367px){

  /* v0.9.9's fullscreen [data-route-gallery] selector used inset:0.
     Match that specificity here so fullscreen gets the same spacing
     as the normal desktop window. */
  .ubes-route-map-stage.has-selection.has-photo
  .ubes-route-map-wrap:fullscreen
  .ubes-route-side-band
  .ubes-map-overlay-photo.has-multiple-photos
  [data-route-gallery],
  .ubes-route-map-stage.has-selection.has-photo
  .ubes-route-map-wrap.ubes-css-fullscreen
  .ubes-route-side-band
  .ubes-map-overlay-photo.has-multiple-photos
  [data-route-gallery]{
    top:41px!important;
    right:0!important;
    bottom:41px!important;
    left:0!important;

    width:auto!important;
    height:auto!important;
  }

  /* Single-photo fullscreen routes still fill the whole gallery. */
  .ubes-route-map-stage.has-selection.has-photo
  .ubes-route-map-wrap:fullscreen
  .ubes-route-side-band
  .ubes-map-overlay-photo.has-single-photo
  [data-route-gallery],
  .ubes-route-map-stage.has-selection.has-photo
  .ubes-route-map-wrap.ubes-css-fullscreen
  .ubes-route-side-band
  .ubes-map-overlay-photo.has-single-photo
  [data-route-gallery]{
    inset:0!important;
    width:100%!important;
    height:100%!important;
  }
}


/* =========================================================
   v0.9.12 — fullscreen gap shorthand bug fix
   ========================================================= */

@media (min-width:1201px) and (hover:hover) and (pointer:fine), (min-width:1367px){
  .ubes-route-map-stage.has-selection.has-photo
  .ubes-route-map-wrap:fullscreen
  .ubes-route-side-band
  .ubes-map-overlay-photo.has-multiple-photos
  [data-route-gallery],
  .ubes-route-map-stage.has-selection.has-photo
  .ubes-route-map-wrap.ubes-css-fullscreen
  .ubes-route-side-band
  .ubes-map-overlay-photo.has-multiple-photos
  [data-route-gallery]{
    top:41px!important;
    bottom:41px!important;
    left:0!important;
    right:0!important;
    width:auto!important;
    height:auto!important;
  }
}


/* =========================================================
   v0.9.13 — route rating input
   ========================================================= */

.ubes-rating-field{
  min-width:0;
  margin:0;
  padding:0;
  border:0;
}

.ubes-rating-field legend{
  display:block;
  margin:0 0 6px;
  padding:0;
  font-weight:600;
}

.ubes-star-rating{
  display:inline-flex;
  flex-direction:row-reverse;
  justify-content:flex-end;
  gap:2px;
  position:relative;
}

.ubes-star-rating input{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  opacity:0!important;
  pointer-events:none!important;
}

.ubes-star-rating label{
  margin:0!important;
  padding:0 1px!important;
  cursor:pointer;
  font-size:30px!important;
  line-height:1!important;
  color:#c9ceca!important;
  transition:color .12s ease, transform .12s ease;
}

.ubes-star-rating input:checked ~ label,
.ubes-star-rating label:hover,
.ubes-star-rating label:hover ~ label{
  color:#b58a32!important;
}

.ubes-star-rating label:hover{
  transform:translateY(-1px);
}

.ubes-star-rating input:focus-visible + label{
  outline:2px solid #24483f;
  outline-offset:3px;
  border-radius:3px;
}


/* v1.0 release hardening — public form honeypot only */
.ubes-route-honeypot{
  position:absolute!important;
  left:-10000px!important;
  top:auto!important;
  width:1px!important;
  height:1px!important;
  overflow:hidden!important;
  opacity:0!important;
  pointer-events:none!important;
}


/* v1.0.0-rc6 — logbook pagination only */
.ubes-logbook-pagination{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  margin:14px 0 0;
  flex-wrap:wrap;
}

.ubes-logbook-pagination[hidden]{
  display:none!important;
}

.ubes-logbook-page-numbers{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:5px;
  flex-wrap:wrap;
}

.ubes-logbook-page-nav,
.ubes-logbook-page-number{
  appearance:none;
  min-width:36px;
  height:36px;
  padding:0 10px;
  border:1px solid var(--ubes-route-border);
  border-radius:8px;
  background:#fff;
  color:var(--ubes-route-accent-dark);
  font:700 12px/1 inherit;
  cursor:pointer;
  box-sizing:border-box;
}

.ubes-logbook-page-nav{
  min-width:86px;
}

.ubes-logbook-page-nav:hover:not(:disabled),
.ubes-logbook-page-number:hover:not(:disabled),
.ubes-logbook-page-nav:focus-visible,
.ubes-logbook-page-number:focus-visible{
  border-color:var(--ubes-route-accent);
  background:#edf3f0;
  outline:none;
}

.ubes-logbook-page-number.is-current{
  background:var(--ubes-route-accent);
  border-color:var(--ubes-route-accent);
  color:#fff;
}

.ubes-logbook-page-nav:disabled,
.ubes-logbook-page-number:disabled{
  cursor:default;
}

.ubes-logbook-page-nav:disabled{
  opacity:.38;
}

.ubes-logbook-page-number.is-current:disabled{
  opacity:1;
}

.ubes-logbook-page-ellipsis{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:24px;
  height:36px;
  color:var(--ubes-route-muted);
  font-weight:700;
}

@media (max-width:1200px), (max-width:1366px) and (any-pointer:coarse), (max-width:1366px) and (hover:none){
  .ubes-logbook-pagination{
    gap:5px;
  }

  .ubes-logbook-page-nav{
    min-width:72px;
    padding:0 7px;
  }

  .ubes-logbook-page-number{
    min-width:34px;
    padding:0 7px;
  }
}


/* v1.0.0-rc7 — ensure mobile Download GPX label remains visible */
@media (max-width:1200px), (max-width:1366px) and (any-pointer:coarse), (max-width:1366px) and (hover:none){
  .ubes-route-mobile-head a.ubes-mobile-gpx-download{
    min-width:104px!important;
    min-height:38px!important;
    padding:9px 12px!important;
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;

    background:#2f5d50!important;
    color:#fff!important;
    -webkit-text-fill-color:#fff!important;

    font-size:12px!important;
    font-weight:700!important;
    line-height:1.2!important;
    text-indent:0!important;
    text-decoration:none!important;

    opacity:1!important;
    visibility:visible!important;
    overflow:visible!important;
  }

  .ubes-route-mobile-head a.ubes-mobile-gpx-download > span{
    display:inline!important;
    color:#fff!important;
    -webkit-text-fill-color:#fff!important;
    font-size:12px!important;
    font-weight:700!important;
    line-height:1.2!important;
    text-indent:0!important;
    white-space:nowrap!important;
    opacity:1!important;
    visibility:visible!important;
  }

  .ubes-route-mobile-head a.ubes-mobile-gpx-download[hidden]{
    display:none!important;
  }
}
/* rc20 — reliable touch interaction for Where We Go galleries */
[data-ubes-where-widget] .ubes-place-image{
  touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;
}

[data-ubes-lightbox]{
  touch-action:pan-y;
}

[data-ubes-lightbox] .ubes-gallery-close,
[data-ubes-lightbox] .ubes-gallery-prev,
[data-ubes-lightbox] .ubes-gallery-next{
  touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;
}

/* rc24 — GPX upload guidance and immediate stats preview */
.ubes-gpx-guidance{
  margin-top:10px;
  padding:11px 13px;
  border-left:4px solid var(--ubes-route-accent);
  background:#f3f6f4;
  color:#4b5550;
  font-size:13px;
  line-height:1.5;
}
.ubes-gpx-preview{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  margin-top:12px;
}
.ubes-gpx-preview[hidden]{display:none!important}
.ubes-gpx-preview>div{
  padding:10px 12px;
  background:#fff;
  border:1px solid #d8dfdb;
  border-radius:9px;
}
.ubes-gpx-preview span{
  display:block;
  margin-bottom:3px;
  color:var(--ubes-route-muted);
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:.04em;
}
.ubes-gpx-preview strong{
  display:block;
  color:var(--ubes-route-accent-dark);
  font-size:14px;
  line-height:1.3;
}
@media (max-width:1200px), (max-width:1366px) and (any-pointer:coarse), (max-width:1366px) and (hover:none){
  .ubes-gpx-preview{grid-template-columns:repeat(2,minmax(0,1fr))}
}
/* rc25 — route-file confirmation / source notes */
.ubes-walk-confirm{
  margin-top:14px;
  padding:14px 16px;
  border-left:4px solid #2f5d50;
  background:#f5f3ee;
}

.ubes-walk-confirm label{
  display:flex;
  align-items:flex-start;
  gap:9px;
  margin:0;
}

.ubes-walk-confirm input{
  margin-top:3px;
  flex:0 0 auto;
}

.ubes-walk-confirm p{
  margin:8px 0 0;
}

.ubes-elevation-preview-note,
.ubes-elevation-attribution{
  display:block;
  margin-top:8px;
  color:#6f746f;
  font-size:13px;
  line-height:1.45;
}

.ubes-elevation-attribution{
  margin:10px 0 0;
  text-align:center;
}


/* rc26 — source choice, remembered details and standard grey read-only fields */
.ubes-import-method{margin-top:2px;}
.ubes-import-method-label{display:block;margin-bottom:7px;font-weight:700;color:var(--ubes-route-text);}
.ubes-import-method-buttons{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:10px;}
.ubes-import-method-buttons button{
  appearance:none;border:1px solid #c9ceca;background:#fff;color:var(--ubes-route-text);
  padding:9px 14px;border-radius:7px;font:inherit;font-weight:650;line-height:1.2;cursor:pointer;
}
.ubes-import-method-buttons button:hover{border-color:#8f9992;}
.ubes-import-method-buttons button.is-active{border-color:var(--ubes-route-accent);background:var(--ubes-route-accent);color:#fff;}
.ubes-source-guidance{margin-top:4px;padding:12px 14px;border-left:4px solid var(--ubes-route-accent);background:#f5f3ee;line-height:1.5;}
.ubes-source-guidance[hidden]{display:none!important;}
.ubes-source-guidance a{display:inline-block;margin-left:5px;}
.ubes-remember-details{margin-top:-4px;}
.ubes-remember-details>label{display:flex;align-items:flex-start;gap:8px;font-weight:600;}
.ubes-remember-details input[type="checkbox"]{width:auto!important;min-width:0!important;margin:3px 0 0!important;}
.ubes-derived-fields{margin-top:14px;grid-template-columns:repeat(3,minmax(0,1fr));}
.ubes-derived-fields>div{display:block;padding:0;border:0;background:transparent;}
.ubes-derived-fields label{display:block;margin-bottom:5px;font-size:13px;font-weight:650;color:#5f665f;}
.ubes-derived-fields input,
.ubes-route-form input[readonly]{
  background:#ecefed!important;color:#626862!important;border-color:#d3d8d4!important;cursor:default;box-shadow:none!important;
}
.ubes-route-form input[readonly]:focus{outline:none;border-color:#d3d8d4!important;box-shadow:none!important;}
@media(max-width:680px){
  .ubes-derived-fields{grid-template-columns:1fr;}
  .ubes-import-method-buttons{display:grid;grid-template-columns:1fr;}
}
/* =========================================================
   v1.0.0-rc27 — aligned right column + cleaner photo carousel
   Region/Search and route photos now share the same responsive width.
   ========================================================= */

@media (min-width:1201px) and (hover:hover) and (pointer:fine), (min-width:1367px){

  .ubes-route-map-wrap{
    --ubes-right-panel-width:min(430px, 49%);
  }

  /* Slightly wider than the old 345/370px search card, while still
     shrinking automatically on narrower desktop/tablet map widths. */
  .ubes-map-search,
  .ubes-route-map-wrap:fullscreen .ubes-map-search,
  .ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-search{
    right:0!important;
    width:var(--ubes-right-panel-width)!important;
    max-width:var(--ubes-right-panel-width)!important;
  }

  /* Keep the route heading clear of the wider search card. */
  .ubes-map-overlay-head,
  .ubes-route-map-wrap:fullscreen .ubes-map-overlay-head,
  .ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-head{
    right:calc(var(--ubes-right-panel-width) + 10px)!important;
  }

  /* Photo area uses exactly the same right-column width as Region/Search. */
  .ubes-route-side-band .ubes-map-overlay-photo{
    --ubes-gallery-width:var(--ubes-right-panel-width)!important;
    --ubes-active-photo-width:var(--ubes-right-panel-width);

    right:0!important;
    width:var(--ubes-right-panel-width)!important;
    max-width:var(--ubes-right-panel-width)!important;

    padding:0!important;
    overflow:visible!important;
  }

  .ubes-route-map-stage.has-selection.has-photo
  .ubes-route-map-wrap:fullscreen
  .ubes-route-side-band
  [data-route-frame-photo],
  .ubes-route-map-stage.has-selection.has-photo
  .ubes-route-map-wrap.ubes-css-fullscreen
  .ubes-route-side-band
  [data-route-frame-photo]{
    --ubes-gallery-width:var(--ubes-right-panel-width)!important;
    --ubes-active-photo-width:var(--ubes-right-panel-width);

    right:0!important;
    width:var(--ubes-right-panel-width)!important;
    max-width:var(--ubes-right-panel-width)!important;
    overflow:visible!important;
  }

  /* Remove the old top/bottom preview strips. Adjacent photos are still
     preloaded in JS, but the visible presentation is a conventional carousel. */
  .ubes-photo-gallery-peek{
    display:none!important;
  }

  .ubes-route-side-band
  .ubes-map-overlay-photo.has-multiple-photos
  .ubes-photo-gallery-viewport,
  .ubes-route-side-band
  .ubes-map-overlay-photo.has-single-photo
  .ubes-photo-gallery-viewport{
    inset:0!important;
    top:0!important;
    right:0!important;
    bottom:0!important;
    left:0!important;

    width:100%!important;
    height:100%!important;

    padding:4px!important;
    box-sizing:border-box!important;

    justify-content:center!important;
    align-items:center!important;

    background:rgba(255,255,255,.94)!important;
    border:1px solid rgba(36,72,63,.18)!important;
    border-radius:8px!important;
    box-shadow:0 5px 18px rgba(0,0,0,.16)!important;
  }

  .ubes-route-map-stage.has-selection.has-photo
  .ubes-route-map-wrap:fullscreen
  .ubes-route-side-band
  .ubes-map-overlay-photo.has-multiple-photos
  [data-route-gallery],
  .ubes-route-map-stage.has-selection.has-photo
  .ubes-route-map-wrap.ubes-css-fullscreen
  .ubes-route-side-band
  .ubes-map-overlay-photo.has-multiple-photos
  [data-route-gallery],
  .ubes-route-map-stage.has-selection.has-photo
  .ubes-route-map-wrap:fullscreen
  .ubes-route-side-band
  .ubes-map-overlay-photo.has-single-photo
  [data-route-gallery],
  .ubes-route-map-stage.has-selection.has-photo
  .ubes-route-map-wrap.ubes-css-fullscreen
  .ubes-route-side-band
  .ubes-map-overlay-photo.has-single-photo
  [data-route-gallery]{
    inset:0!important;
    top:0!important;
    right:0!important;
    bottom:0!important;
    left:0!important;

    width:100%!important;
    height:100%!important;

    padding:4px!important;
    box-sizing:border-box!important;

    justify-content:center!important;
    align-items:center!important;

    background:rgba(255,255,255,.94)!important;
    border:1px solid rgba(36,72,63,.18)!important;
    border-radius:8px!important;
    box-shadow:0 5px 18px rgba(0,0,0,.16)!important;
  }

  /* The frame always owns the common width. Portrait and landscape photos
     are contained inside it rather than expanding the map overlay. */
  .ubes-route-side-band .ubes-photo-gallery-viewport > img,
  .ubes-route-map-stage.has-selection.has-photo
  .ubes-route-map-wrap:fullscreen
  .ubes-route-side-band
  [data-gallery-active-img],
  .ubes-route-map-stage.has-selection.has-photo
  .ubes-route-map-wrap.ubes-css-fullscreen
  .ubes-route-side-band
  [data-gallery-active-img]{
    display:block!important;
    width:100%!important;
    height:100%!important;
    max-width:100%!important;
    max-height:100%!important;
    margin:0!important;

    object-fit:contain!important;
    object-position:center!important;

    border-radius:5px!important;
    background:#fff!important;

    will-change:opacity, transform;
  }

  /* Familiar left/right carousel controls. */
  .ubes-photo-gallery-arrow{
    top:50%!important;
    bottom:auto!important;

    width:38px!important;
    height:48px!important;
    min-width:38px!important;
    min-height:48px!important;

    transform:translateY(-50%)!important;

    display:flex!important;
    align-items:center!important;
    justify-content:center!important;

    color:#24483f!important;
    background:rgba(255,255,255,.90)!important;
    border:1px solid rgba(36,72,63,.15)!important;
    border-radius:8px!important;
    box-shadow:0 2px 9px rgba(0,0,0,.13)!important;

    opacity:.94!important;
    z-index:12!important;
  }

  .ubes-photo-gallery-prev{
    left:8px!important;
    right:auto!important;
  }

  .ubes-photo-gallery-next{
    left:auto!important;
    right:8px!important;
  }

  .ubes-photo-gallery-prev svg{
    transform:rotate(180deg)!important;
  }

  .ubes-photo-gallery-next svg{
    transform:none!important;
  }

  .ubes-photo-gallery-arrow:hover,
  .ubes-photo-gallery-arrow:focus-visible{
    color:#17352f!important;
    background:#fff!important;
    opacity:1!important;
    box-shadow:0 3px 11px rgba(0,0,0,.18)!important;
  }

  .ubes-photo-gallery-position{
    right:9px!important;
    bottom:9px!important;
    padding:4px 7px!important;
    background:rgba(255,255,255,.90)!important;
    border:1px solid rgba(36,72,63,.12)!important;
    border-radius:999px!important;
    font-size:10px!important;
    line-height:1!important;
    z-index:13!important;
  }

  @keyframes ubesRouteGalleryNext{
    from{
      opacity:.15;
      transform:translateX(18px) scale(.995);
    }
    to{
      opacity:1;
      transform:translateX(0) scale(1);
    }
  }

  @keyframes ubesRouteGalleryPrev{
    from{
      opacity:.15;
      transform:translateX(-18px) scale(.995);
    }
    to{
      opacity:1;
      transform:translateX(0) scale(1);
    }
  }

  .ubes-gallery-animate-next{
    animation:ubesRouteGalleryNext .28s cubic-bezier(.22,.7,.28,1) both!important;
  }

  .ubes-gallery-animate-prev{
    animation:ubesRouteGalleryPrev .28s cubic-bezier(.22,.7,.28,1) both!important;
  }

  @media(prefers-reduced-motion:reduce){
    .ubes-gallery-animate-next,
    .ubes-gallery-animate-prev{
      animation:none!important;
    }
  }
}

/* rc27 form: one permanent source guidance panel; no source chooser. */
.ubes-route-form .ubes-source-guidance{
  margin-top:2px;
  padding:12px 14px;
  border-left:4px solid var(--ubes-route-accent);
  background:#f5f3ee;
  line-height:1.5;
}

.ubes-route-form .ubes-source-guidance a{
  display:inline-block;
  margin-left:5px;
}
.ubes-route-form .ubes-gpx-help{
  margin-top:10px;
  padding-top:8px;
  border-top:1px solid rgba(36,72,63,.16);
}
.ubes-route-form .ubes-gpx-help summary{
  width:max-content;
  max-width:100%;
  color:var(--ubes-route-accent-dark,#24483f);
  font-weight:700;
  cursor:pointer;
}
.ubes-route-form .ubes-gpx-help>div{
  margin-top:8px;
}
.ubes-route-form .ubes-gpx-help p{
  margin:0 0 7px!important;
  line-height:1.5;
}
.ubes-route-form .ubes-gpx-help p:last-child{
  margin-bottom:0!important;
}
/* =========================================================
   v1.0.0-rc28 — keep route title clear of right-hand panel
   ========================================================= */
@media (min-width:1201px) and (hover:hover) and (pointer:fine), (min-width:1367px){

  /* Leave a real gutter before Region/Search rather than merely relying on
     stacking order. The title surface itself cannot extend into that column. */
  .ubes-map-overlay-head,
  .ubes-route-map-wrap:fullscreen .ubes-map-overlay-head,
  .ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-head{
    right:calc(var(--ubes-right-panel-width) + 16px)!important;
    width:auto!important;
    max-width:none!important;
    min-width:0!important;
    overflow:visible!important;
    box-sizing:border-box!important;
  }

  .ubes-map-overlay-head .ubes-route-frame-title{
    min-width:0!important;
    max-width:100%!important;
    overflow:hidden!important;
  }

  .ubes-map-overlay-head .ubes-route-frame-title h2{
    display:block!important;
    width:100%!important;
    max-width:100%!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
    word-break:normal!important;
    hyphens:auto;
  }

  .ubes-map-overlay-head .ubes-route-meta-line,
  .ubes-map-overlay-head .ubes-route-date-submit{
    max-width:100%!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
  }

  /* On the narrower desktop/tablet range there is less horizontal room
     because the right panel is deliberately wider. Let the title use a
     slightly smaller type size instead of colliding with the search card. */
  @media(max-width:900px){
    .ubes-map-overlay-head .ubes-route-frame-title h2{
      font-size:20px!important;
      line-height:1.08!important;
    }

    .ubes-map-overlay-head .ubes-route-meta-line{
      font-size:11px!important;
    }

    .ubes-map-overlay-head .ubes-route-stats{
      gap:7px!important;
    }

    .ubes-map-overlay-head .ubes-route-stats strong,
    .ubes-map-overlay-head .ubes-route-stats span{
      font-size:11.5px!important;
    }
  }
}
/* =========================================================
   v1.0.0-rc30 — definitive expanded-mode title/search separation
   Older fullscreen rules use right offsets; expanded mode now uses
   explicit geometry so the two surfaces cannot occupy the same space.
   ========================================================= */

@media(min-width:901px){

  .ubes-route-map-wrap:fullscreen,
  .ubes-route-map-wrap.ubes-css-fullscreen{
    --ubes-expanded-search-width:430px;
    --ubes-expanded-title-left:58px;
    --ubes-expanded-title-gap:16px;
  }

  .ubes-route-map-wrap:fullscreen .ubes-map-search,
  .ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-search{
    top:0!important;
    right:0!important;
    left:auto!important;
    width:var(--ubes-expanded-search-width)!important;
    min-width:var(--ubes-expanded-search-width)!important;
    max-width:var(--ubes-expanded-search-width)!important;
    box-sizing:border-box!important;
  }

  .ubes-route-map-stage.has-selection
  .ubes-route-map-wrap:fullscreen
  .ubes-map-overlay-head,
  .ubes-route-map-stage.has-selection
  .ubes-route-map-wrap.ubes-css-fullscreen
  .ubes-map-overlay-head,
  .ubes-route-map-wrap:fullscreen .ubes-map-overlay-head,
  .ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-head{
    top:0!important;
    left:var(--ubes-expanded-title-left)!important;
    right:auto!important;

    width:calc(
      100% -
      var(--ubes-expanded-title-left) -
      var(--ubes-expanded-search-width) -
      var(--ubes-expanded-title-gap)
    )!important;

    max-width:calc(
      100% -
      var(--ubes-expanded-title-left) -
      var(--ubes-expanded-search-width) -
      var(--ubes-expanded-title-gap)
    )!important;

    min-width:0!important;
    box-sizing:border-box!important;
    overflow:hidden!important;
  }

  .ubes-route-map-wrap:fullscreen .ubes-map-overlay-head .ubes-route-frame-title,
  .ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-head .ubes-route-frame-title{
    min-width:0!important;
    width:100%!important;
    max-width:100%!important;
    overflow:hidden!important;
  }

  .ubes-route-map-wrap:fullscreen .ubes-map-overlay-head .ubes-route-frame-title h2,
  .ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-head .ubes-route-frame-title h2{
    width:100%!important;
    max-width:100%!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
  }
}

/* At compact expanded widths, preserve the same non-overlap rule but
   reduce the reserved search column slightly rather than letting it collide. */
@media (min-width:1201px) and (max-width:1366px) and (hover:hover) and (pointer:fine){

  .ubes-route-map-wrap:fullscreen,
  .ubes-route-map-wrap.ubes-css-fullscreen{
    --ubes-expanded-search-width:min(330px, 42%);
    --ubes-expanded-title-left:48px;
    --ubes-expanded-title-gap:12px;
  }

  .ubes-route-map-wrap:fullscreen .ubes-map-search,
  .ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-search{
    top:0!important;
    right:0!important;
    left:auto!important;
    width:var(--ubes-expanded-search-width)!important;
    max-width:var(--ubes-expanded-search-width)!important;
  }

  .ubes-route-map-stage.has-selection
  .ubes-route-map-wrap:fullscreen
  .ubes-map-overlay-head,
  .ubes-route-map-stage.has-selection
  .ubes-route-map-wrap.ubes-css-fullscreen
  .ubes-map-overlay-head,
  .ubes-route-map-wrap:fullscreen .ubes-map-overlay-head,
  .ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-head{
    left:var(--ubes-expanded-title-left)!important;
    right:auto!important;

    width:calc(
      100% -
      var(--ubes-expanded-title-left) -
      var(--ubes-expanded-search-width) -
      var(--ubes-expanded-title-gap)
    )!important;

    max-width:calc(
      100% -
      var(--ubes-expanded-title-left) -
      var(--ubes-expanded-search-width) -
      var(--ubes-expanded-title-gap)
    )!important;

    min-width:0!important;
    overflow:hidden!important;
  }
}


/* rc32 — selected region boundary should not compete with map labels */
.ubes-route-master-map .leaflet-ubesRegionOutlinePane-pane{
  pointer-events:none!important;
  mix-blend-mode:multiply;
}

.ubes-route-master-map .ubes-region-outline-path{
  stroke-linecap:round;
  stroke-linejoin:round;
  vector-effect:non-scaling-stroke;
}


/* =========================================================
   v0.9.14 — gallery arrows pinned to image edges
   Prevent chevrons floating over the middle of the photo.
   ========================================================= */

@media (min-width:1201px) and (hover:hover) and (pointer:fine), (min-width:1367px){

  /* Allow the side-edge buttons to sit comfortably over the active image. */
  .ubes-route-side-band .ubes-map-overlay-photo,
  .ubes-route-map-wrap:fullscreen .ubes-route-side-band .ubes-map-overlay-photo,
  .ubes-route-map-wrap.ubes-css-fullscreen .ubes-route-side-band .ubes-map-overlay-photo{
    overflow:visible!important;
  }

  /* Side buttons, vertically centred, instead of top/bottom buttons sitting
     over the picture content. */
  .ubes-photo-gallery-arrow,
  .ubes-route-map-wrap:fullscreen .ubes-photo-gallery-arrow,
  .ubes-route-map-wrap.ubes-css-fullscreen .ubes-photo-gallery-arrow{
    top:50%!important;
    bottom:auto!important;
    width:40px!important;
    height:40px!important;
    min-width:40px!important;
    min-height:40px!important;
    border-radius:999px!important;
    background:rgba(255,255,255,.92)!important;
    box-shadow:0 4px 14px rgba(0,0,0,.16)!important;
    transform:translateY(-50%)!important;
  }

  /* Align to the actual left/right edges of the currently rendered active
     photo, even when the gallery area is wider than the photo itself. */
  .ubes-photo-gallery-prev,
  .ubes-route-map-wrap:fullscreen .ubes-photo-gallery-prev,
  .ubes-route-map-wrap.ubes-css-fullscreen .ubes-photo-gallery-prev{
    left:max(8px, calc(100% - min(var(--ubes-active-photo-width), 100%) + 8px))!important;
    right:auto!important;
  }

  .ubes-photo-gallery-next,
  .ubes-route-map-wrap:fullscreen .ubes-photo-gallery-next,
  .ubes-route-map-wrap.ubes-css-fullscreen .ubes-photo-gallery-next{
    right:8px!important;
    left:auto!important;
  }

  /* Convert the chevrons from old up/down behaviour to left/right. */
  .ubes-photo-gallery-prev svg{
    transform:rotate(180deg)!important;
  }

  .ubes-photo-gallery-next svg{
    transform:none!important;
  }

  .ubes-photo-gallery-arrow:hover,
  .ubes-photo-gallery-arrow:focus-visible{
    background:rgba(255,255,255,.98)!important;
    box-shadow:0 5px 16px rgba(0,0,0,.20)!important;
  }
}

/* =========================================================
   v1.0.0-rc37 — multi-day journey submission + navigation
   ========================================================= */

.ubes-route-structure-field select{
  max-width:420px;
}

.ubes-journey-details{
  margin-top:4px;
  padding:18px 18px 4px;
  border-left:4px solid var(--ubes-route-accent);
  background:#f5f3ee;
}

.ubes-stage-one-heading{
  margin-top:10px;
  padding-top:16px;
  border-top:1px solid rgba(47,93,80,.18);
}

.ubes-stage-one-heading h3,
.ubes-journey-stage-heading h3{
  margin:0!important;
  color:var(--ubes-route-accent-dark)!important;
  font-size:20px!important;
  line-height:1.2!important;
}

.ubes-stage-one-heading h3 span,
.ubes-journey-stage-heading h3 [data-stage-derived-label]{
  font-size:13px;
  font-weight:650;
  color:var(--ubes-route-muted);
}

.ubes-journey-extra-stages{
  display:grid;
  gap:18px;
  margin-top:18px;
}

.ubes-journey-stage-card{
  padding:20px;
  border:1px solid rgba(47,93,80,.20);
  border-radius:10px;
  background:#fbfcfa;
}

.ubes-journey-stage-heading{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  margin:0 0 18px;
  padding-bottom:12px;
  border-bottom:1px solid rgba(47,93,80,.14);
}

.ubes-journey-remove-stage,
.ubes-journey-add-stage{
  appearance:none;
  border:1px solid var(--ubes-route-accent);
  border-radius:7px;
  background:#fff;
  color:var(--ubes-route-accent-dark);
  padding:9px 13px;
  font:inherit;
  font-weight:700;
  cursor:pointer;
}

.ubes-journey-remove-stage:hover,
.ubes-journey-add-stage:hover{
  background:#f1f5f2;
}

.ubes-journey-remove-stage{
  border-color:#aeb5b0;
  color:#5f665f;
  font-size:13px;
}

.ubes-journey-actions{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:10px;
  margin-top:18px;
}

.ubes-journey-actions[hidden]{
  display:none!important;
}

.ubes-journey-finish{
  margin:0!important;
}

/* Journey navigator on selected map route. */
.ubes-journey-nav{
  margin:0 0 12px;
  padding:0 0 12px;
  border-bottom:1px solid rgba(47,93,80,.16);
}

.ubes-journey-nav>strong{
  display:block;
  margin:0 0 7px;
  color:var(--ubes-route-accent-dark);
  font-size:12px;
  line-height:1.3;
}

.ubes-journey-nav-buttons{
  display:flex;
  flex-wrap:wrap;
  gap:5px;
}

.ubes-journey-nav-buttons button{
  appearance:none;
  border:1px solid #c8ceca;
  border-radius:6px;
  background:#fff;
  color:#4f5752;
  padding:5px 7px;
  font:inherit;
  font-size:10.5px;
  font-weight:700;
  line-height:1.15;
  cursor:pointer;
}

.ubes-journey-nav-buttons button:hover{
  border-color:#809087;
  color:#24483f;
}

.ubes-journey-nav-buttons button.is-active{
  border-color:#24483f;
  background:#24483f;
  color:#fff;
}

.ubes-journey-nav-mobile{
  margin:0 0 12px;
  padding:12px 0;
  border-top:1px solid rgba(47,93,80,.12);
  border-bottom:1px solid rgba(47,93,80,.12);
}

@media (max-width:1200px), (max-width:1366px) and (any-pointer:coarse), (max-width:1366px) and (hover:none){
  .ubes-journey-details,
  .ubes-journey-stage-card{
    padding:14px;
  }

  .ubes-journey-stage-heading{
    align-items:flex-start;
  }

  .ubes-journey-actions{
    display:grid;
    grid-template-columns:1fr;
  }

  .ubes-journey-add-stage,
  .ubes-journey-finish{
    width:100%;
  }

  .ubes-journey-nav-buttons{
    flex-wrap:nowrap;
    overflow-x:auto;
    padding-bottom:3px;
  }

  .ubes-journey-nav-buttons button{
    flex:0 0 auto;
    font-size:11px;
    padding:7px 9px;
  }
}


/* =========================================================
   1.0.0-rc39 — progressive journeys + mobile expedition UI
   ========================================================= */

.ubes-journey-save-status{
  margin:14px 0 0;
  padding:11px 13px;
  border:1px solid rgba(47,93,80,.22);
  border-radius:9px;
  background:#f7faf8;
  color:#4d5751;
  font-size:13px;
  line-height:1.45;
}

.ubes-journey-save-status[hidden]{
  display:none!important;
}

.ubes-journey-save-status.is-working{
  border-color:#a99861;
  background:#fffaf0;
  color:#66572d;
}

.ubes-journey-save-status.is-saved{
  border-color:rgba(47,93,80,.42);
  background:#eef6f1;
  color:#24483f;
  font-weight:600;
}

.ubes-journey-save-status.is-error{
  border-color:#c78d8d;
  background:#fff5f5;
  color:#8a3030;
}

.ubes-stage-saved-badge{
  display:inline-flex;
  align-items:center;
  margin-left:8px;
  padding:3px 7px;
  border-radius:999px;
  background:#e3f0e8;
  color:#24483f;
  font-size:10px;
  font-weight:800;
  line-height:1;
  vertical-align:middle;
}

.ubes-journey-stage-card.is-saved{
  border-color:rgba(47,93,80,.28);
  background:#f8fbf9;
}

.ubes-journey-stage-card.is-saved input,
.ubes-journey-stage-card.is-saved select,
.ubes-journey-stage-card.is-saved textarea{
  opacity:1;
}

.ubes-stage-saved-badge.is-pending{
  background:#fff3d6;
  color:#75581b;
}

@media (max-width:1200px), (max-width:1366px) and (any-pointer:coarse), (max-width:1366px) and (hover:none){

  /* Journey navigation is part of the information below the map on phones. */
  .ubes-route-mobile-details .ubes-journey-nav-mobile:not([hidden]){
    display:block!important;
  }

  /* Route photos never return to the map overlay on mobile. */
  .ubes-route-map-wrap .ubes-map-overlay-photo,
  .ubes-route-map-wrap [data-route-frame-photo]{
    display:none!important;
  }

  /* Horizontal click/swipe carousel below the route information. */
  .ubes-route-mobile-gallery:not([hidden]){
    position:relative!important;
    display:block!important;
    width:100%;
    margin-top:12px;
    overflow:hidden;
    border-radius:12px;
    background:#fff;
    border:1px solid rgba(36,72,63,.14);
    box-shadow:0 2px 10px rgba(0,0,0,.10);
  }

  .ubes-mobile-gallery-viewport{
    display:flex;
    align-items:center;
    justify-content:center;
    width:100%;
    min-height:220px;
    max-height:440px;
    background:#f5f5f2;
    overflow:hidden;
  }

  .ubes-route-mobile-gallery .ubes-mobile-gallery-viewport img{
    display:block!important;
    width:100%!important;
    height:auto!important;
    max-width:100%!important;
    max-height:440px!important;
    min-height:0!important;
    object-fit:contain!important;
    object-position:center!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
    background:#f5f5f2;
    margin:0!important;
  }

  .ubes-mobile-gallery-arrow{
    position:absolute;
    top:50%;
    z-index:5;
    width:40px;
    height:40px;
    margin:0;
    padding:0;
    transform:translateY(-50%);
    border:1px solid rgba(36,72,63,.16);
    border-radius:999px;
    background:rgba(255,255,255,.94);
    color:#24483f;
    box-shadow:0 2px 10px rgba(0,0,0,.16);
    font-size:29px;
    line-height:36px;
    font-weight:500;
    text-align:center;
    cursor:pointer;
  }

  .ubes-mobile-gallery-prev{left:9px;}
  .ubes-mobile-gallery-next{right:9px;}

  .ubes-mobile-gallery-arrow[hidden]{
    display:none!important;
  }

  .ubes-mobile-gallery-position{
    position:absolute;
    right:10px;
    bottom:9px;
    z-index:5;
    padding:4px 7px;
    border-radius:999px;
    background:rgba(255,255,255,.92);
    color:#24483f;
    font-size:10px;
    font-weight:800;
    line-height:1;
    box-shadow:0 1px 5px rgba(0,0,0,.10);
  }

  .ubes-mobile-gallery-position[hidden]{
    display:none!important;
  }

  @keyframes ubesMobileGalleryNext{
    from{opacity:.2;transform:translateX(18px);}
    to{opacity:1;transform:translateX(0);}
  }

  @keyframes ubesMobileGalleryPrev{
    from{opacity:.2;transform:translateX(-18px);}
    to{opacity:1;transform:translateX(0);}
  }

  .ubes-mobile-gallery-next-in{
    animation:ubesMobileGalleryNext .24s ease both;
  }

  .ubes-mobile-gallery-prev-in{
    animation:ubesMobileGalleryPrev .24s ease both;
  }
}

@media(prefers-reduced-motion:reduce){
  .ubes-mobile-gallery-next-in,
  .ubes-mobile-gallery-prev-in{
    animation:none!important;
  }
}


/* =========================================================
   rc40 — previous / next stage navigation during multi-day upload
   ========================================================= */

.ubes-stage-one-heading,
.ubes-journey-stage-heading{
  scroll-margin-top:24px;
}

.ubes-stage-one-heading{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}

/* Respect the form mode. Author CSS with display:flex otherwise overrides
   the HTML hidden attribute and exposes “Stage 1” on single-walk forms. */
.ubes-stage-one-heading[hidden]{
  display:none!important;
}

.ubes-stage-one-heading h3{
  margin:0!important;
}

.ubes-journey-stage-heading-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:9px;
  flex-wrap:wrap;
}

.ubes-journey-stage-nav{
  display:inline-flex;
  align-items:center;
  gap:7px;
}

.ubes-journey-stage-nav-button{
  appearance:none;
  border:1px solid rgba(47,93,80,.26);
  border-radius:8px;
  background:rgba(255,255,255,.94);
  color:#24483f;
  min-height:36px;
  padding:7px 11px;
  font:inherit;
  font-size:12px;
  font-weight:700;
  line-height:1;
  cursor:pointer;
}

.ubes-journey-stage-nav-button:hover,
.ubes-journey-stage-nav-button:focus-visible{
  border-color:rgba(47,93,80,.55);
  background:#f3f7f5;
}

.ubes-journey-stage-nav-button[hidden]{
  display:none!important;
}

.ubes-journey-stage-focus{
  animation:ubesJourneyStageFocus .9s ease;
}

@keyframes ubesJourneyStageFocus{
  0%,100%{box-shadow:inherit}
  35%{box-shadow:0 0 0 4px rgba(47,93,80,.15)}
}

@media (max-width:1200px), (max-width:1366px) and (any-pointer:coarse), (max-width:1366px) and (hover:none){
  .ubes-stage-one-heading,
  .ubes-journey-stage-heading{
    align-items:flex-start!important;
  }

  .ubes-stage-one-heading,
  .ubes-journey-stage-heading-actions{
    flex-direction:column;
  }

  .ubes-journey-stage-heading-actions{
    align-items:flex-end;
  }

  .ubes-journey-stage-nav-button{
    min-height:40px;
  }
}


/* =========================================================
   rc41 — saved multi-day stages remain editable
   ========================================================= */

.ubes-journey-stage-card.is-saved{
  background:#fbfdfc;
}

.ubes-journey-stage-card.is-saved input:not([type="radio"]):not([type="checkbox"]),
.ubes-journey-stage-card.is-saved select,
.ubes-journey-stage-card.is-saved textarea{
  cursor:text;
}

.ubes-journey-stage-card.is-saved select{
  cursor:pointer;
}

.ubes-stage-saved-badge{
  transition:background .15s ease,color .15s ease;
}


/* =========================================================
   rc42 — multi-day submit cleanup + polished photo carousel
   ========================================================= */

/* Multi-day journeys must only use Add another stage / Finish trip. */
.ubes-route-form.is-multi-day-journey [data-single-submit],
.ubes-route-form.is-multi-day-journey .ubes-single-route-submit,
.ubes-route-form [data-single-submit][hidden]{
  display:none!important;
  visibility:hidden!important;
}

/* -------- Desktop / expanded map gallery -------- */
@media (min-width:1201px) and (hover:hover) and (pointer:fine), (min-width:1367px){
  .ubes-photo-gallery-arrow,
  .ubes-route-map-wrap:fullscreen .ubes-photo-gallery-arrow,
  .ubes-route-map-wrap.ubes-css-fullscreen .ubes-photo-gallery-arrow{
    width:40px!important;
    height:40px!important;
    min-width:40px!important;
    min-height:40px!important;
    border:1px solid rgba(36,72,63,.16)!important;
    border-radius:999px!important;
    background:rgba(255,255,255,.92)!important;
    color:#24483f!important;
    box-shadow:0 5px 16px rgba(0,0,0,.15)!important;
    backdrop-filter:blur(7px);
    -webkit-backdrop-filter:blur(7px);
    transition:
      background .18s ease,
      border-color .18s ease,
      box-shadow .18s ease,
      transform .18s ease!important;
  }

  .ubes-photo-gallery-arrow svg{
    width:17px!important;
    height:17px!important;
  }

  .ubes-photo-gallery-arrow path{
    stroke-width:2.15!important;
  }

  .ubes-photo-gallery-prev:hover,
  .ubes-photo-gallery-prev:focus-visible{
    background:#fff!important;
    border-color:rgba(36,72,63,.30)!important;
    box-shadow:0 7px 20px rgba(0,0,0,.18)!important;
    transform:translateY(-50%) translateX(-2px)!important;
  }

  .ubes-photo-gallery-next:hover,
  .ubes-photo-gallery-next:focus-visible{
    background:#fff!important;
    border-color:rgba(36,72,63,.30)!important;
    box-shadow:0 7px 20px rgba(0,0,0,.18)!important;
    transform:translateY(-50%) translateX(2px)!important;
  }

  /* Existing JS already applies these classes on each previous/next click.
     Increase the travel so the transition reads as a true carousel slide. */
  @keyframes ubesRouteGalleryNext{
    from{
      opacity:.18;
      transform:translateX(46px) scale(.985);
    }
    to{
      opacity:1;
      transform:translateX(0) scale(1);
    }
  }

  @keyframes ubesRouteGalleryPrev{
    from{
      opacity:.18;
      transform:translateX(-46px) scale(.985);
    }
    to{
      opacity:1;
      transform:translateX(0) scale(1);
    }
  }

  .ubes-gallery-animate-next{
    animation:ubesRouteGalleryNext .34s cubic-bezier(.22,.61,.36,1) both!important;
  }

  .ubes-gallery-animate-prev{
    animation:ubesRouteGalleryPrev .34s cubic-bezier(.22,.61,.36,1) both!important;
  }
}

/* -------- Mobile carousel below route information -------- */
@media (max-width:1200px), (max-width:1366px) and (any-pointer:coarse), (max-width:1366px) and (hover:none){
  .ubes-mobile-gallery-arrow{
    width:38px!important;
    height:38px!important;
    min-width:38px!important;
    min-height:38px!important;
    border:1px solid rgba(36,72,63,.16)!important;
    border-radius:999px!important;
    background:rgba(255,255,255,.94)!important;
    color:#24483f!important;
    box-shadow:0 4px 14px rgba(0,0,0,.15)!important;
    font-family:inherit!important;
    font-size:25px!important;
    line-height:34px!important;
    font-weight:400!important;
    transition:
      background .18s ease,
      box-shadow .18s ease,
      transform .18s ease!important;
  }

  .ubes-mobile-gallery-prev:active{
    transform:translateY(-50%) translateX(-2px)!important;
  }

  .ubes-mobile-gallery-next:active{
    transform:translateY(-50%) translateX(2px)!important;
  }

  @keyframes ubesMobileGalleryNext{
    from{
      opacity:.18;
      transform:translateX(42px) scale(.99);
    }
    to{
      opacity:1;
      transform:translateX(0) scale(1);
    }
  }

  @keyframes ubesMobileGalleryPrev{
    from{
      opacity:.18;
      transform:translateX(-42px) scale(.99);
    }
    to{
      opacity:1;
      transform:translateX(0) scale(1);
    }
  }

  .ubes-mobile-gallery-next-in{
    animation:ubesMobileGalleryNext .34s cubic-bezier(.22,.61,.36,1) both!important;
  }

  .ubes-mobile-gallery-prev-in{
    animation:ubesMobileGalleryPrev .34s cubic-bezier(.22,.61,.36,1) both!important;
  }
}

@media(prefers-reduced-motion:reduce){
  .ubes-gallery-animate-next,
  .ubes-gallery-animate-prev,
  .ubes-mobile-gallery-next-in,
  .ubes-mobile-gallery-prev-in{
    animation:none!important;
  }
}


/* =========================================================
   rc43 — responsive Walks list pagination / mobile table
   ========================================================= */

/* Desktop/laptop table remains the complete route database view. */
@media (min-width:1201px) and (hover:hover) and (pointer:fine), (min-width:1367px){
  .ubes-route-table{
    table-layout:auto;
  }

  .ubes-route-table .ubes-col-route{
    min-width:180px;
  }

  .ubes-logbook-pagination{
    display:flex;
  }

  .ubes-logbook-pagination[hidden]{
    display:none!important;
  }
}

/* Mobile is deliberately a compact walks index: Route · Region · Date. */
@media (max-width:1200px), (max-width:1366px) and (any-pointer:coarse), (max-width:1366px) and (hover:none){
  .ubes-table-scroll{
    overflow:visible!important;
  }

  .ubes-route-table{
    width:100%!important;
    min-width:0!important;
    table-layout:fixed!important;
  }

  .ubes-route-table .ubes-col-terrain,
  .ubes-route-table .ubes-col-trip-type,
  .ubes-route-table .ubes-col-rating,
  .ubes-route-table .ubes-col-elapsed,
  .ubes-route-table .ubes-col-distance,
  .ubes-route-table .ubes-col-ascent{
    display:none!important;
  }

  .ubes-route-table .ubes-col-route{
    width:48%!important;
  }

  .ubes-route-table .ubes-col-region{
    width:30%!important;
  }

  .ubes-route-table .ubes-col-date{
    width:22%!important;
  }

  .ubes-route-table th,
  .ubes-route-table td{
    padding:10px 7px!important;
    font-size:12px!important;
    line-height:1.3!important;
    vertical-align:middle!important;
    white-space:normal!important;
    overflow-wrap:anywhere;
  }

  .ubes-route-table th{
    font-size:11px!important;
  }

  .ubes-route-table .ubes-col-date{
    white-space:nowrap!important;
    overflow-wrap:normal!important;
  }

  .ubes-logbook-pagination{
    margin-top:12px;
    gap:4px;
  }

  .ubes-logbook-page-nav{
    min-width:0!important;
    width:auto!important;
    height:34px!important;
    padding:0 9px!important;
    font-size:11px!important;
  }

  .ubes-logbook-page-number{
    min-width:32px!important;
    width:32px!important;
    height:34px!important;
    padding:0!important;
    font-size:11px!important;
  }

  .ubes-logbook-page-ellipsis{
    min-width:16px!important;
    height:34px!important;
  }

  .ubes-logbook-count{
    font-size:12px!important;
  }
}


/* =========================================================
   rc44 — authoritative 3-column mobile Walks table
   ========================================================= */

@media (max-width:1200px), (max-width:1366px) and (any-pointer:coarse), (max-width:1366px) and (hover:none){
  /* Route (1), Region (2), Date (6) are the ONLY mobile columns.
     nth-child rules are intentional: they defeat old theme/plugin table-cell
     declarations even if a stale class-based rule survives elsewhere. */
  .ubes-route-logbook-table .ubes-route-table th:nth-child(3),
  .ubes-route-logbook-table .ubes-route-table td:nth-child(3),
  .ubes-route-logbook-table .ubes-route-table th:nth-child(4),
  .ubes-route-logbook-table .ubes-route-table td:nth-child(4),
  .ubes-route-logbook-table .ubes-route-table th:nth-child(5),
  .ubes-route-logbook-table .ubes-route-table td:nth-child(5),
  .ubes-route-logbook-table .ubes-route-table th:nth-child(7),
  .ubes-route-logbook-table .ubes-route-table td:nth-child(7),
  .ubes-route-logbook-table .ubes-route-table th:nth-child(8),
  .ubes-route-logbook-table .ubes-route-table td:nth-child(8),
  .ubes-route-logbook-table .ubes-route-table th:nth-child(9),
  .ubes-route-logbook-table .ubes-route-table td:nth-child(9){
    display:none!important;
    width:0!important;
    min-width:0!important;
    max-width:0!important;
    padding:0!important;
    border:0!important;
  }

  .ubes-route-logbook-table .ubes-route-table th:nth-child(1),
  .ubes-route-logbook-table .ubes-route-table td:nth-child(1){
    display:table-cell!important;
    width:48%!important;
  }

  .ubes-route-logbook-table .ubes-route-table th:nth-child(2),
  .ubes-route-logbook-table .ubes-route-table td:nth-child(2){
    display:table-cell!important;
    width:30%!important;
  }

  .ubes-route-logbook-table .ubes-route-table th:nth-child(6),
  .ubes-route-logbook-table .ubes-route-table td:nth-child(6){
    display:table-cell!important;
    width:22%!important;
    white-space:nowrap!important;
  }
}


/* =========================================================
   rc45 — quieter professional gallery controls
   ========================================================= */

/* Desktop / fullscreen photo arrows:
   darker translucent controls with less visual weight. */
@media (min-width:1201px) and (hover:hover) and (pointer:fine), (min-width:1367px){
  .ubes-photo-gallery-arrow,
  .ubes-route-map-wrap:fullscreen .ubes-photo-gallery-arrow,
  .ubes-route-map-wrap.ubes-css-fullscreen .ubes-photo-gallery-arrow{
    width:36px!important;
    height:36px!important;
    min-width:36px!important;
    min-height:36px!important;

    border:1px solid rgba(255,255,255,.18)!important;
    background:rgba(31,45,41,.72)!important;
    color:rgba(255,255,255,.92)!important;

    box-shadow:0 3px 10px rgba(0,0,0,.18)!important;
    backdrop-filter:blur(8px)!important;
    -webkit-backdrop-filter:blur(8px)!important;

    opacity:.86!important;
  }

  .ubes-photo-gallery-arrow:hover,
  .ubes-photo-gallery-arrow:focus-visible{
    background:rgba(24,36,33,.86)!important;
    border-color:rgba(255,255,255,.28)!important;
    color:#fff!important;
    opacity:1!important;
    box-shadow:0 4px 12px rgba(0,0,0,.22)!important;
  }

  .ubes-photo-gallery-arrow svg{
    width:15px!important;
    height:15px!important;
  }

  .ubes-photo-gallery-arrow path{
    stroke-width:2!important;
  }

  .ubes-photo-gallery-position{
    right:7px!important;
    bottom:7px!important;
    padding:4px 7px!important;

    border:1px solid rgba(255,255,255,.15)!important;
    border-radius:999px!important;
    background:rgba(31,45,41,.68)!important;
    color:rgba(255,255,255,.88)!important;

    box-shadow:0 2px 8px rgba(0,0,0,.14)!important;
    backdrop-filter:blur(7px)!important;
    -webkit-backdrop-filter:blur(7px)!important;

    font-size:9.5px!important;
    font-weight:650!important;
    letter-spacing:.01em!important;
    line-height:1!important;
  }
}

/* Mobile carousel uses the same restrained visual language. */
@media (max-width:1200px), (max-width:1366px) and (any-pointer:coarse), (max-width:1366px) and (hover:none){
  .ubes-mobile-gallery-arrow{
    width:36px!important;
    height:36px!important;
    min-width:36px!important;
    min-height:36px!important;

    border:1px solid rgba(255,255,255,.18)!important;
    background:rgba(31,45,41,.74)!important;
    color:rgba(255,255,255,.92)!important;

    box-shadow:0 3px 10px rgba(0,0,0,.18)!important;
    opacity:.88!important;
  }

  .ubes-mobile-gallery-arrow:active{
    background:rgba(24,36,33,.90)!important;
    color:#fff!important;
    opacity:1!important;
  }

  .ubes-mobile-gallery-position{
    right:7px!important;
    bottom:7px!important;
    padding:4px 7px!important;

    border:1px solid rgba(255,255,255,.15)!important;
    border-radius:999px!important;
    background:rgba(31,45,41,.68)!important;
    color:rgba(255,255,255,.88)!important;

    box-shadow:0 2px 8px rgba(0,0,0,.14)!important;
    backdrop-filter:blur(7px)!important;
    -webkit-backdrop-filter:blur(7px)!important;

    font-size:9.5px!important;
    font-weight:650!important;
    line-height:1!important;
  }
}


/* =========================================================
   1.0.0-rc55 — consolidated title / search / gallery / mobile stats
   This replaces rc46–rc49 rather than layering on top of them.
   ========================================================= */

/* ---------- DESKTOP / LAPTOP TITLE + SEARCH ---------- */
@media (min-width:1201px) and (hover:hover) and (pointer:fine), (min-width:1367px){
  .ubes-route-map-wrap{
    --ubes-title-card-height:176px!important;
    --ubes-search-card-width:min(300px,31%)!important;
    --ubes-title-search-gap:14px!important;
  }

  .ubes-map-overlay-head,
  .ubes-route-map-stage.has-selection .ubes-map-overlay-head,
  .ubes-route-map-wrap:fullscreen .ubes-map-overlay-head,
  .ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-head,
  .ubes-route-map-stage.has-selection .ubes-route-map-wrap:fullscreen .ubes-map-overlay-head,
  .ubes-route-map-stage.has-selection .ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-head{
    top:0!important;
    left:58px!important;
    right:auto!important;
    width:calc(100% - 58px - var(--ubes-search-card-width) - var(--ubes-title-search-gap))!important;
    max-width:calc(100% - 58px - var(--ubes-search-card-width) - var(--ubes-title-search-gap))!important;

    height:var(--ubes-title-card-height)!important;
    min-height:var(--ubes-title-card-height)!important;
    max-height:var(--ubes-title-card-height)!important;

    display:grid!important;
    grid-template-columns:42px minmax(0,1fr) 42px!important;
    align-items:center!important;
    gap:8px!important;
    padding:8px 12px!important;
    overflow:hidden!important;
    box-sizing:border-box!important;
  }

  .ubes-map-overlay-head .ubes-route-frame-title{
    grid-column:2!important;
    width:100%!important;
    height:100%!important;
    min-width:0!important;
    min-height:0!important;

    display:flex!important;
    flex-direction:column!important;
    align-items:center!important;
    justify-content:center!important;
    gap:0!important;

    overflow:visible!important;
    text-align:center!important;
  }

  /* Simple centred vertical title stack. */
  .ubes-map-overlay-head .ubes-route-frame-title h2{
    display:block!important;

    width:100%!important;
    min-width:0!important;
    max-width:100%!important;
    margin:0 0 13px!important;
    padding:2px 0!important;

    overflow:visible!important;
    overflow-wrap:break-word!important;
    word-break:normal!important;

    color:#24483f!important;
    font-size:30px!important;
    font-weight:650!important;
    line-height:1.16!important;
    letter-spacing:.002em!important;
    text-align:center!important;
  }

  .ubes-map-overlay-head .ubes-route-frame-title .ubes-route-meta-line{
    width:100%!important;
    margin:0 0 7px!important;
    overflow:visible!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
    color:#6f746f!important;
    font-size:14px!important;
    line-height:1.25!important;
    text-align:center!important;
  }

  .ubes-map-overlay-head .ubes-route-frame-title .ubes-route-stats{
    width:100%!important;
    margin:0!important;
    display:flex!important;
    flex-wrap:nowrap!important;
    align-items:baseline!important;
    justify-content:center!important;
    gap:14px!important;
    overflow:visible!important;
    white-space:nowrap!important;
  }

  .ubes-map-overlay-head .ubes-route-frame-title .ubes-route-stats > div{
    flex:0 1 auto!important;
    min-width:0!important;
    padding:0!important;
  }

  .ubes-map-overlay-head .ubes-route-frame-title .ubes-route-stats strong,
  .ubes-map-overlay-head .ubes-route-frame-title .ubes-route-stats span{
    font-size:17px!important;
    line-height:1.18!important;
    font-weight:750!important;
  }

  .ubes-map-overlay-head .ubes-route-frame-title .ubes-route-date-submit{
    width:100%!important;
    margin:7px 0 0!important;
    padding:0!important;
    overflow:visible!important;
    text-overflow:ellipsis!important;
    white-space:nowrap!important;
    color:#24483f!important;
    font-size:13.5px!important;
    font-weight:650!important;
    line-height:1.2!important;
    text-align:center!important;
  }

  .ubes-region-route-arrow{
    width:36px!important;
    min-width:36px!important;
    height:58px!important;
    min-height:58px!important;
    padding:0!important;
    border-radius:10px!important;
    font-size:26px!important;
    line-height:1!important;
  }

  /* Search stands on its own at the right and vertically centres to title. */
  .ubes-map-search,
  .ubes-route-map-wrap:fullscreen .ubes-map-search,
  .ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-search{
    top:calc(var(--ubes-title-card-height) / 2)!important;
    right:0!important;
    bottom:auto!important;
    left:auto!important;
    transform:translateY(-50%)!important;

    width:var(--ubes-search-card-width)!important;
    max-width:var(--ubes-search-card-width)!important;
    min-width:0!important;
    height:auto!important;
    min-height:0!important;
    padding:9px 10px!important;
    border-radius:10px 0 0 10px!important;
    box-sizing:border-box!important;
  }

  .ubes-map-search-field + .ubes-map-search-field{margin-top:8px!important}
  .ubes-map-search-field label{margin:0 0 4px!important;font-size:8.5px!important}
  .ubes-map-search input,
  .ubes-map-search-row button{height:34px!important}


  /* ---------- PHOTO GALLERY ---------- */

  /* The flex item itself has NO surface. */
  .ubes-route-side-band .ubes-map-overlay-photo,
  .ubes-route-side-band [data-route-frame-photo],
  .ubes-route-map-wrap:fullscreen .ubes-route-side-band .ubes-map-overlay-photo,
  .ubes-route-map-wrap.ubes-css-fullscreen .ubes-route-side-band .ubes-map-overlay-photo{
    padding:0!important;
    border:0!important;
    outline:0!important;
    border-radius:0!important;
    background:transparent!important;
    box-shadow:none!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
    overflow:visible!important;
  }

  .ubes-route-side-band .ubes-photo-gallery-viewport,
  .ubes-route-side-band .ubes-map-overlay-photo.has-multiple-photos .ubes-photo-gallery-viewport,
  .ubes-route-side-band .ubes-map-overlay-photo.has-single-photo .ubes-photo-gallery-viewport,
  .ubes-route-map-wrap:fullscreen .ubes-route-side-band [data-route-gallery],
  .ubes-route-map-wrap.ubes-css-fullscreen .ubes-route-side-band [data-route-gallery]{
    position:absolute!important;
    inset:0!important;
    width:100%!important;
    height:100%!important;
    margin:0!important;
    padding:0!important;

    display:flex!important;
    align-items:center!important;
    justify-content:center!important;

    border:0!important;
    outline:0!important;
    border-radius:0!important;
    background:transparent!important;
    box-shadow:none!important;
    overflow:visible!important;
  }

  /*
   * Stable carousel stage:
   * the right-hand photo area keeps one fixed maximum size for every image.
   * Portrait/landscape images centre inside it; controls never move.
   */
  .ubes-photo-stage{
    position:absolute!important;
    inset:0!important;

    width:100%!important;
    height:100%!important;
    max-width:100%!important;
    max-height:100%!important;
    margin:0!important;
    padding:0!important;
    box-sizing:border-box!important;

    display:flex!important;
    align-items:center!important;
    justify-content:center!important;

    background:transparent!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
    overflow:visible!important;
  }

  .ubes-photo-stage > img,
  .ubes-route-side-band .ubes-photo-gallery-viewport .ubes-photo-stage > img{
    display:block!important;

    width:auto!important;
    height:auto!important;
    min-width:0!important;
    min-height:0!important;
    max-width:100%!important;
    max-height:100%!important;

    margin:auto!important;
    padding:0!important;

    object-fit:contain!important;
    object-position:center!important;

    background:#1f2d29!important;
    border:6px solid #1f2d29!important;
    border-radius:7px!important;
    box-sizing:border-box!important;
    box-shadow:0 5px 18px rgba(0,0,0,.20)!important;
    will-change:opacity,transform;
  }

  .ubes-photo-gallery-peek{display:none!important}

  /* Arrows are pinned to the fixed MAXIMUM photo area, not each image. */
  .ubes-photo-stage .ubes-photo-gallery-arrow{
    position:absolute!important;
    top:50%!important;
    bottom:auto!important;
    transform:translateY(-50%)!important;

    width:34px!important;
    height:34px!important;
    min-width:34px!important;
    min-height:34px!important;
    margin:0!important;
    padding:0!important;

    display:flex!important;
    align-items:center!important;
    justify-content:center!important;

    border:1px solid rgba(255,255,255,.17)!important;
    border-radius:999px!important;
    background:rgba(27,39,36,.72)!important;
    color:rgba(255,255,255,.92)!important;
    box-shadow:0 3px 10px rgba(0,0,0,.18)!important;
    backdrop-filter:blur(7px)!important;
    -webkit-backdrop-filter:blur(7px)!important;

    opacity:.88!important;
    z-index:20!important;
    transition:background .18s ease,opacity .18s ease,transform .18s ease!important;
  }

  .ubes-photo-stage .ubes-photo-gallery-prev{
    left:8px!important;
    right:auto!important;
  }

  .ubes-photo-stage .ubes-photo-gallery-next{
    left:auto!important;
    right:8px!important;
  }

  .ubes-photo-stage .ubes-photo-gallery-prev svg{transform:rotate(180deg)!important}
  .ubes-photo-stage .ubes-photo-gallery-next svg{transform:none!important}
  .ubes-photo-stage .ubes-photo-gallery-arrow svg{width:15px!important;height:15px!important}
  .ubes-photo-stage .ubes-photo-gallery-arrow path{stroke-width:2!important}

  .ubes-photo-stage .ubes-photo-gallery-arrow:hover,
  .ubes-photo-stage .ubes-photo-gallery-arrow:focus-visible{
    background:rgba(20,31,28,.88)!important;
    opacity:1!important;
  }

  .ubes-photo-stage .ubes-photo-gallery-position{
    position:absolute!important;
    right:8px!important;
    bottom:8px!important;
    z-index:21!important;
    margin:0!important;
    padding:4px 7px!important;

    border:1px solid rgba(255,255,255,.14)!important;
    border-radius:999px!important;
    background:rgba(27,39,36,.66)!important;
    color:rgba(255,255,255,.88)!important;
    box-shadow:0 2px 8px rgba(0,0,0,.14)!important;

    font-size:9.5px!important;
    font-weight:650!important;
    line-height:1!important;
  }

  /* Retain the directional carousel motion. */
  @keyframes ubesRouteGalleryNext{
    from{opacity:.18;transform:translateX(42px) scale(.987)}
    to{opacity:1;transform:translateX(0) scale(1)}
  }
  @keyframes ubesRouteGalleryPrev{
    from{opacity:.18;transform:translateX(-42px) scale(.987)}
    to{opacity:1;transform:translateX(0) scale(1)}
  }
  .ubes-gallery-animate-next{animation:ubesRouteGalleryNext .34s cubic-bezier(.22,.61,.36,1) both!important}
  .ubes-gallery-animate-prev{animation:ubesRouteGalleryPrev .34s cubic-bezier(.22,.61,.36,1) both!important}
}

/* Slightly tighter laptops, still horizontal rather than stacked. */
@media (min-width:1201px) and (max-width:1366px) and (hover:hover) and (pointer:fine){
  .ubes-route-map-wrap{
    --ubes-title-card-height:164px!important;
    --ubes-search-card-width:min(250px,32%)!important;
    --ubes-title-search-gap:10px!important;
  }

  .ubes-map-overlay-head,
  .ubes-route-map-stage.has-selection .ubes-map-overlay-head,
  .ubes-route-map-wrap:fullscreen .ubes-map-overlay-head,
  .ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-overlay-head{
    left:48px!important;
    width:calc(100% - 48px - var(--ubes-search-card-width) - var(--ubes-title-search-gap))!important;
    max-width:calc(100% - 48px - var(--ubes-search-card-width) - var(--ubes-title-search-gap))!important;
    grid-template-columns:31px minmax(0,1fr) 31px!important;
    gap:5px!important;
    padding:7px 8px!important;
  }

  .ubes-route-title-content-group{
    width:min(680px,100%)!important;
    max-width:680px!important;
    grid-template-columns:132px minmax(0,1fr)!important;
    gap:8px!important;
  }

  .ubes-route-title-region,
  .ubes-route-title-region select{
    width:132px!important;
    min-width:132px!important;
    max-width:132px!important;
  }
  .ubes-route-title-region label{font-size:9px!important}
  .ubes-route-title-region select{height:30px!important;font-size:11.5px!important}
  .ubes-map-overlay-head .ubes-route-frame-title h2{font-size:24px!important;line-height:1.15!important;padding:1px 0!important}
  .ubes-map-overlay-head .ubes-route-frame-title .ubes-route-meta-line{font-size:12.5px!important;margin-bottom:6px!important;line-height:1.2!important}
  .ubes-map-overlay-head .ubes-route-frame-title .ubes-route-stats{gap:8px!important}
  .ubes-map-overlay-head .ubes-route-frame-title .ubes-route-stats strong,
  .ubes-map-overlay-head .ubes-route-frame-title .ubes-route-stats span{font-size:15px!important;line-height:1.15!important}
  .ubes-map-overlay-head .ubes-route-frame-title .ubes-route-date-submit{font-size:12.5px!important;margin-top:6px!important;line-height:1.18!important}
  .ubes-region-route-arrow{width:29px!important;min-width:29px!important;height:50px!important;min-height:50px!important;font-size:22px!important}
}

/* ---------- MOBILE REGION / STATS / GALLERY ---------- */
@media (max-width:1200px), (max-width:1366px) and (any-pointer:coarse), (max-width:1366px) and (hover:none){
  .ubes-route-title-region-mobile{
    display:flex!important;
    justify-content:flex-start!important;
    align-items:center!important;
    gap:5px!important;
    margin:0 0 5px!important;
  }

  .ubes-route-title-region-mobile label{
    margin:0!important;
    color:#6f746f!important;
    font-size:9px!important;
    font-weight:800!important;
    line-height:28px!important;
    letter-spacing:.07em!important;
    text-transform:uppercase!important;
  }

  .ubes-route-title-region-mobile select{
    width:auto!important;
    max-width:190px!important;
    height:28px!important;
    margin:0!important;
    padding:3px 22px 3px 6px!important;
    border:1px solid rgba(47,93,80,.18)!important;
    border-radius:6px!important;
    background:#fff!important;
    color:#24483f!important;
    font:700 10.5px/1.1 inherit!important;
  }

  .ubes-route-mobile-stats[hidden]{display:none!important}
  .ubes-route-mobile-stats:not([hidden]){
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:7px 12px!important;
    margin:10px 0 12px!important;
    padding:11px 12px!important;
    border:1px solid rgba(47,93,80,.11)!important;
    border-radius:10px!important;
    background:rgba(255,255,255,.88)!important;
    box-shadow:0 2px 8px rgba(0,0,0,.055)!important;
  }

  .ubes-mobile-stat{min-width:0!important;padding:2px 0!important}
  .ubes-mobile-stat span,
  .ubes-mobile-submitted-by span{
    display:block!important;
    margin:0 0 2px!important;
    color:#727973!important;
    font-size:9px!important;
    font-weight:800!important;
    line-height:1.15!important;
    letter-spacing:.065em!important;
    text-transform:uppercase!important;
  }
  .ubes-mobile-stat strong{
    display:block!important;
    color:#24483f!important;
    font-size:14px!important;
    font-weight:750!important;
    line-height:1.2!important;
  }
  .ubes-mobile-submitted-by{
    grid-column:1 / -1!important;
    margin-top:3px!important;
    padding-top:8px!important;
    border-top:1px solid rgba(47,93,80,.09)!important;
  }
  .ubes-mobile-submitted-by strong{
    display:block!important;
    color:#3e4541!important;
    font-size:12.5px!important;
    font-weight:650!important;
    line-height:1.3!important;
  }

  .ubes-route-mobile-gallery:not([hidden]){
    background:transparent!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
    overflow:visible!important;
  }

  .ubes-mobile-gallery-viewport{
    background:transparent!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
    padding:7px!important;
  }

  .ubes-route-mobile-gallery .ubes-mobile-gallery-viewport img{
    background:#1f2d29!important;
    border:5px solid #1f2d29!important;
    border-radius:6px!important;
    box-sizing:border-box!important;
    box-shadow:0 4px 14px rgba(0,0,0,.18)!important;
  }

  .ubes-mobile-gallery-arrow{
    width:36px!important;
    height:36px!important;
    min-width:36px!important;
    min-height:36px!important;
    border:1px solid rgba(255,255,255,.18)!important;
    border-radius:999px!important;
    background:rgba(27,39,36,.74)!important;
    color:rgba(255,255,255,.92)!important;
    box-shadow:0 3px 10px rgba(0,0,0,.18)!important;
    opacity:.90!important;
  }

  .ubes-mobile-gallery-position{
    border:1px solid rgba(255,255,255,.14)!important;
    border-radius:999px!important;
    background:rgba(27,39,36,.66)!important;
    color:rgba(255,255,255,.88)!important;
    box-shadow:0 2px 8px rgba(0,0,0,.14)!important;
    font-size:9.5px!important;
    font-weight:650!important;
  }
}

@media(prefers-reduced-motion:reduce){
  .ubes-gallery-animate-next,
  .ubes-gallery-animate-prev,
  .ubes-mobile-gallery-next-in,
  .ubes-mobile-gallery-prev-in{
    animation:none!important;
  }
}


/* =========================================================
   rc52 — fullscreen/expanded photo carousel only
   Window mode already has the correct fixed-stage geometry.
   ========================================================= */

@media (min-width:1201px) and (hover:hover) and (pointer:fine), (min-width:1367px){

  /* Expanded view keeps one stable maximum-width photo column. */
  .ubes-route-map-stage.has-selection.has-photo
  .ubes-route-map-wrap:fullscreen
  .ubes-route-side-band
  [data-route-frame-photo],
  .ubes-route-map-stage.has-selection.has-photo
  .ubes-route-map-wrap.ubes-css-fullscreen
  .ubes-route-side-band
  [data-route-frame-photo]{
    display:block!important;
    visibility:visible!important;
    opacity:1!important;

    position:absolute!important;
    top:0!important;
    right:8px!important;
    bottom:0!important;
    left:auto!important;

    width:min(598px,calc(100% - 440px))!important;
    max-width:598px!important;
    height:auto!important;

    margin:0!important;
    padding:0!important;

    background:transparent!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;

    overflow:visible!important;
  }

  /* The carousel viewport fills that fixed photo column. */
  .ubes-route-map-stage.has-selection.has-photo
  .ubes-route-map-wrap:fullscreen
  .ubes-route-side-band
  [data-route-gallery],
  .ubes-route-map-stage.has-selection.has-photo
  .ubes-route-map-wrap.ubes-css-fullscreen
  .ubes-route-side-band
  [data-route-gallery]{
    display:flex!important;
    visibility:visible!important;
    opacity:1!important;

    position:absolute!important;
    inset:0!important;

    width:100%!important;
    height:100%!important;
    margin:0!important;
    padding:0!important;

    align-items:center!important;
    justify-content:center!important;

    background:transparent!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
    overflow:visible!important;
  }

  /* Fixed stage = fixed arrows. It never changes with image aspect ratio. */
  .ubes-route-map-stage.has-selection.has-photo
  .ubes-route-map-wrap:fullscreen
  .ubes-route-side-band
  [data-photo-stage],
  .ubes-route-map-stage.has-selection.has-photo
  .ubes-route-map-wrap.ubes-css-fullscreen
  .ubes-route-side-band
  [data-photo-stage]{
    position:absolute!important;
    inset:0!important;

    width:100%!important;
    height:100%!important;
    max-width:100%!important;
    max-height:100%!important;

    margin:0!important;
    padding:0!important;

    display:flex!important;
    align-items:center!important;
    justify-content:center!important;

    background:transparent!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
    overflow:visible!important;
  }

  /* Every landscape/portrait photo is centred inside the same stage. */
  .ubes-route-map-stage.has-selection.has-photo
  .ubes-route-map-wrap:fullscreen
  .ubes-route-side-band
  [data-photo-stage] > [data-gallery-active-img],
  .ubes-route-map-stage.has-selection.has-photo
  .ubes-route-map-wrap.ubes-css-fullscreen
  .ubes-route-side-band
  [data-photo-stage] > [data-gallery-active-img]{
    display:block!important;
    visibility:visible!important;
    opacity:1!important;

    width:auto!important;
    height:auto!important;
    min-width:0!important;
    min-height:0!important;
    max-width:100%!important;
    max-height:100%!important;

    margin:auto!important;
    padding:0!important;

    object-fit:contain!important;
    object-position:center!important;

    background:#1f2d29!important;
    border:6px solid #1f2d29!important;
    border-radius:7px!important;
    box-sizing:border-box!important;
    box-shadow:0 5px 18px rgba(0,0,0,.20)!important;
  }

  /* Navigation is tied to the STAGE edges, so it is identical for every photo. */
  .ubes-route-map-stage.has-selection.has-photo
  .ubes-route-map-wrap:fullscreen
  .ubes-route-side-band
  [data-photo-stage] .ubes-photo-gallery-arrow,
  .ubes-route-map-stage.has-selection.has-photo
  .ubes-route-map-wrap.ubes-css-fullscreen
  .ubes-route-side-band
  [data-photo-stage] .ubes-photo-gallery-arrow{
    position:absolute!important;
    top:50%!important;
    bottom:auto!important;

    width:34px!important;
    height:34px!important;
    min-width:34px!important;
    min-height:34px!important;

    margin:0!important;
    transform:translateY(-50%)!important;
    z-index:20!important;
  }

  .ubes-route-map-stage.has-selection.has-photo
  .ubes-route-map-wrap:fullscreen
  .ubes-route-side-band
  [data-photo-stage] .ubes-photo-gallery-prev,
  .ubes-route-map-stage.has-selection.has-photo
  .ubes-route-map-wrap.ubes-css-fullscreen
  .ubes-route-side-band
  [data-photo-stage] .ubes-photo-gallery-prev{
    left:8px!important;
    right:auto!important;
  }

  .ubes-route-map-stage.has-selection.has-photo
  .ubes-route-map-wrap:fullscreen
  .ubes-route-side-band
  [data-photo-stage] .ubes-photo-gallery-next,
  .ubes-route-map-stage.has-selection.has-photo
  .ubes-route-map-wrap.ubes-css-fullscreen
  .ubes-route-side-band
  [data-photo-stage] .ubes-photo-gallery-next{
    left:auto!important;
    right:8px!important;
  }

  .ubes-route-map-stage.has-selection.has-photo
  .ubes-route-map-wrap:fullscreen
  .ubes-route-side-band
  [data-photo-stage] .ubes-photo-gallery-position,
  .ubes-route-map-stage.has-selection.has-photo
  .ubes-route-map-wrap.ubes-css-fullscreen
  .ubes-route-side-band
  [data-photo-stage] .ubes-photo-gallery-position{
    position:absolute!important;
    right:8px!important;
    bottom:8px!important;
    left:auto!important;
    top:auto!important;
    z-index:21!important;
  }
}


/* rc53 title stack spacing — title first, everything else below it. */
@media (min-width:1201px) and (hover:hover) and (pointer:fine), (min-width:1367px){
  .ubes-map-overlay-head .ubes-route-frame-title > h2{
    order:1!important;
    margin:0 0 13px!important;
  }

  .ubes-map-overlay-head .ubes-route-frame-title > .ubes-route-meta-line{
    order:2!important;
    margin:0 0 6px!important;
  }

  .ubes-map-overlay-head .ubes-route-frame-title > .ubes-route-stats{
    order:3!important;
    margin:0!important;
  }

  .ubes-map-overlay-head .ubes-route-frame-title > .ubes-route-date-submit{
    order:4!important;
    margin:5px 0 0!important;
  }

  .ubes-map-overlay-head .ubes-route-frame-title > h2,
  .ubes-map-overlay-head .ubes-route-frame-title > .ubes-route-meta-line,
  .ubes-map-overlay-head .ubes-route-frame-title > .ubes-route-stats,
  .ubes-map-overlay-head .ubes-route-frame-title > .ubes-route-date-submit{
    flex:0 0 auto!important;
    width:100%!important;
    max-width:100%!important;
    text-align:center!important;
  }
}


/* =========================================================
   rc56 — route-selection interaction hardening
   ========================================================= */

/*
 * A selected photo uses a transparent fixed stage. That transparent rectangle
 * must NOT block the Leaflet map beneath it. Only the actual carousel buttons
 * need pointer interaction.
 */
.ubes-route-side-band [data-route-frame-photo],
.ubes-route-side-band [data-route-gallery],
.ubes-route-side-band [data-photo-stage],
.ubes-route-side-band [data-gallery-active-img],
.ubes-route-map-wrap:fullscreen .ubes-route-side-band [data-route-frame-photo],
.ubes-route-map-wrap:fullscreen .ubes-route-side-band [data-route-gallery],
.ubes-route-map-wrap:fullscreen .ubes-route-side-band [data-photo-stage],
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-route-side-band [data-route-frame-photo],
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-route-side-band [data-route-gallery],
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-route-side-band [data-photo-stage]{
  pointer-events:none!important;
}

.ubes-route-side-band .ubes-photo-gallery-arrow,
.ubes-route-map-wrap:fullscreen .ubes-route-side-band .ubes-photo-gallery-arrow,
.ubes-route-map-wrap.ubes-css-fullscreen .ubes-route-side-band .ubes-photo-gallery-arrow{
  pointer-events:auto!important;
}

/* Count badges are visual only. */
.ubes-route-side-band .ubes-photo-gallery-position{
  pointer-events:none!important;
}

/* The initial "Select a route" hint should never steal a map click. */
.ubes-selected-empty,
[data-selected-empty]{
  pointer-events:none!important;
}

/*
 * Home/Region clear state is structural as well as attribute-based.
 * If any old high-specificity overlay rule ignores `hidden`, losing
 * `.has-selection` still guarantees every selected-route surface disappears.
 */
.ubes-route-map-stage:not(.has-selection) [data-route-frame-head],
.ubes-route-map-stage:not(.has-selection) [data-route-frame-notes],
.ubes-route-map-stage:not(.has-selection) [data-route-frame-photo],
.ubes-route-map-stage:not(.has-selection) [data-route-frame-foot]{
  display:none!important;
  visibility:hidden!important;
  opacity:0!important;
  pointer-events:none!important;
}

/* Explicitly disabled selected Leaflet layers pass clicks to routes below. */
.ubes-route-master-map .ubes-route-click-through{
  pointer-events:none!important;
}


/* =========================================================
   rc57 — reliable map reset clicks + fullscreen notes scroll
   ========================================================= */

/*
 * Older fullscreen gallery rules deliberately changed the notes card to
 * overflow:visible. That makes long descriptions escape the available middle
 * band instead of scrolling. Keep the card bounded by the band and give it
 * its own vertical scroller.
 */
@media (min-width:1201px) and (hover:hover) and (pointer:fine), (min-width:1367px){
  .ubes-route-map-stage.has-selection
  .ubes-route-map-wrap:fullscreen
  .ubes-route-side-band
  [data-route-frame-notes],
  .ubes-route-map-stage.has-selection
  .ubes-route-map-wrap.ubes-css-fullscreen
  .ubes-route-side-band
  [data-route-frame-notes]{
    top:0!important;
    bottom:auto!important;
    transform:none!important;
    height:auto!important;
    min-height:0!important;
    max-height:100%!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    overscroll-behavior:contain!important;
    -webkit-overflow-scrolling:touch;
    touch-action:pan-y;
    pointer-events:auto!important;
  }
}

/* =========================================================
   1.0.0-rc60 — fixed map-search anchor
   Search results are a dropdown and do not contribute to the
   search card's measured height, so typing cannot move the card.
   ========================================================= */
@media (min-width:1201px) and (hover:hover) and (pointer:fine), (min-width:1367px){
  .ubes-map-search-results{
    position:absolute!important;
    top:100%!important;
    left:0!important;
    right:0!important;
    width:100%!important;
    margin:6px 0 0!important;
    z-index:20!important;
    box-sizing:border-box!important;
  }
}


/* =========================================================
   1.0.0-rc61 — stable Home clicks + fixed search position
   ========================================================= */

/*
 * Do not vertically centre this card using translateY(-50%). The browser
 * would recalculate the card's own height while search results are populated,
 * which makes the whole control jump upward. Anchor the card by its top edge;
 * only the absolutely-positioned results dropdown is allowed to grow.
 */
@media (min-width:1201px) and (hover:hover) and (pointer:fine), (min-width:1367px){
  .ubes-map-search,
  .ubes-route-map-wrap:fullscreen .ubes-map-search,
  .ubes-route-map-wrap.ubes-css-fullscreen .ubes-map-search{
    top:0!important;
    bottom:auto!important;
    transform:none!important;
  }

  .ubes-map-search-results{
    position:absolute!important;
    top:100%!important;
    left:0!important;
    right:0!important;
    width:100%!important;
    margin:6px 0 0!important;
  }
}


/* 1.0.0-rc62 — repeat route clicks after Home: marker DOM remains structurally stable. */


/* rc77 — the compact elevation panel is visual only. Let taps reach pins
   and route lines beneath it, including in native and CSS fullscreen. */
@media (max-width:1200px), (max-width:1366px) and (any-pointer:coarse), (max-width:1366px) and (hover:none){
  .ubes-route-map-stage .ubes-route-map-wrap [data-route-frame-foot],
  .ubes-route-map-stage .ubes-route-map-wrap [data-route-frame-foot] *{
    pointer-events:none!important;
  }
}


/* rc79 — selected overview pins pass taps to overlapping alternatives. */
.ubes-route-master-map .ubes-route-selected-pin,
.ubes-route-master-map .ubes-route-selected-pin *{
  pointer-events:none!important;
}
