#tools #route-toggle{font-size:.6875rem}
#route-toggle[aria-expanded=true]{color:var(--paper);background:var(--ink)}
#app[data-route]>footer{display:none}
.route-dock,.route-dialog{
  --route-font:.6875rem;
  --route-control:30px;
  color:var(--ink);background:var(--paper);
  font:var(--route-font)/1.35 system-ui,sans-serif;
  -webkit-text-size-adjust:100%;text-size-adjust:100%;
}
.route-dock{
  --route-axis:15px;
  --route-row:21px;
  z-index:610;flex:none;min-width:0;
  border-top:2px solid var(--ink);
  padding:5px var(--edge-end) max(5px,env(safe-area-inset-bottom)) var(--edge-start);
}
.route-heading{
  display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:4px 8px;
}
.route-heading-copy,.route-heading-actions,.route-metrics,.route-actions{
  display:flex;align-items:center;flex-wrap:wrap;gap:2px 6px;
}
.route-heading-actions{justify-content:flex-end;flex-wrap:nowrap}
.route-heading h2{margin:0;font-size:.8125rem;font-weight:750;line-height:1.2}
.route-dock button,.route-dialog button{
  min-height:var(--route-control);padding:3px 7px;border-radius:6px;
  font-size:inherit;white-space:nowrap;
}
.route-heading button[aria-label]{
  width:var(--route-control);padding:0;font-size:1rem;line-height:1;
}
.route-metrics{margin:0;color:var(--muted);font-variant-numeric:tabular-nums}
#route-distance{color:var(--ink);font-weight:750}
.route-actions{gap:4px;margin-top:5px}
#route-add,#route-run,#route-form button[type=submit]{background:var(--ink);color:var(--paper)}
.route-actions button:disabled{opacity:.55}
#route-form button[type=submit]{margin-inline-start:auto}
#route-status,#route-settings-status,#route-warning,#route-data-note{
  margin:3px 0 0;color:var(--muted);font-size:.625rem;
}
#route-warning{color:#853e23;font-weight:650}
.route-transport{
  display:grid;grid-template-columns:auto auto minmax(0,1fr) auto;
  align-items:center;gap:4px;margin:4px 0;
}
#route-play{background:var(--honey);width:var(--route-control);padding-inline:0}
#route-selected{
  min-width:0;font-variant-numeric:tabular-nums;font-weight:650;
}
.route-zoom,.route-display-label{display:flex;align-items:center;gap:4px;white-space:nowrap}
#route-zoom{width:clamp(34px,9vw,95px);margin:0;accent-color:var(--ink)}
.route-band{display:grid;grid-template-columns:max-content minmax(0,1fr);gap:4px}
.route-band-readings{
  display:grid;grid-template-rows:repeat(3,var(--route-row));margin:var(--route-axis) 0 0;
  border-radius:5px;overflow:hidden;background:var(--wash);
}
.route-band-readings div{
  display:flex;align-items:center;justify-content:space-between;gap:6px;padding:0 4px;
  box-shadow:inset 0 -1px var(--rule);
}
.route-band-readings dt,.route-band-readings dd{font-size:.625rem;white-space:nowrap}
.route-band-readings dd{margin:0;font-weight:750;min-width:5ch;text-align:right;font-variant-numeric:tabular-nums}
.route-heat-frame{position:relative;min-width:0}
#route-heat{
  display:flex;overflow:auto;scrollbar-width:none;touch-action:none;cursor:grab;
  border-radius:5px;background:#e8ecdf;user-select:none;
}
#route-heat:before,#route-heat:after{content:'';flex:0 0 50%}
#route-heat::-webkit-scrollbar{display:none}
#route-heat:focus-visible{outline:2px solid #8e421c;outline-offset:2px}
#route-heat[data-dragging]{cursor:grabbing}
#route-heat-track{flex:none;position:relative}
.route-heat-cursor{
  position:absolute;z-index:2;pointer-events:none;inset:0 auto 0 50%;
  border-left:2px solid #fff8d7;box-shadow:0 0 0 1px #173e35;border-radius:1px;
}
.route-heat-row{position:relative;height:var(--route-row);border-bottom:1px solid #fff5d977}
.route-heat-axis{position:relative;height:var(--route-axis);background:#e6eddd}
.route-heat-axis span{position:absolute;transform:translateX(-50%);white-space:nowrap;font-size:.59rem;color:#203b31}
.route-heat-axis b{color:#fff6dc;background:#173e35;border-radius:9px;padding:0 3px}
.route-heat-cell{
  position:absolute;inset-block:0;display:flex;align-items:center;justify-content:center;gap:2px;overflow:hidden;
  background:repeating-linear-gradient(135deg,#d9e0d3 0 4px,#e9eddf 4px 8px);
  border-inline-end:1px solid #fff5d966;font-size:.625rem;font-weight:700;white-space:nowrap;
  font-variant-numeric:tabular-nums;
}
.route-wind-arrow{display:inline-block;line-height:1}
.route-dialog{
  border:1px solid var(--rule);border-radius:10px;
  width:min(35rem,calc(100% - 24px));max-height:86dvh;overflow:auto;padding:0;
}
.route-dialog::backdrop{background:#17232965}
.route-dialog .route-heading{
  padding:6px 10px;border-bottom:1px solid var(--rule);
}
.route-dialog .route-heading h2{font-size:.875rem}
#route-settings-dialog{max-width:25rem}
#route-form{padding:7px 10px}
.route-settings{
  display:grid;grid-template-columns:minmax(0,1fr) minmax(3.1rem,.3fr) minmax(3.1rem,.3fr);
  align-items:end;gap:6px;
}
.route-settings label{display:grid;gap:3px;font-weight:650;min-width:0}
.route-settings input,.route-settings select,#route-coordinates input,#route-display{
  min-width:0;min-height:var(--route-control);padding:3px 5px;color:var(--ink);font:inherit;
  background:#fffdf5;border:1px solid #839784;border-radius:5px;
}
.route-settings :is(input,select),.route-coordinate-row input{width:100%}
#route-coord-details{margin-top:7px;border-top:1px solid var(--rule)}
#route-coord-details summary{cursor:pointer;font-weight:650;padding:5px 0}
#route-coordinates{display:grid;gap:3px}
#route-apply-coordinates{margin-top:4px}
.route-coordinate-row{
  display:grid;grid-template-columns:2ch repeat(2,minmax(0,1fr));
  align-items:center;gap:6px;font-variant-numeric:tabular-nums;
}
.route-coordinate-row strong{text-align:center}
.route-table-scroll{
  overflow:auto;max-height:55dvh;margin:6px 8px 0;
  border:1px solid var(--rule);border-radius:6px;
}
#route-table{
  border-collapse:separate;border-spacing:0;width:max-content;min-width:100%;
  font-size:inherit;font-variant-numeric:tabular-nums;
}
#route-table :is(th,td){white-space:nowrap;padding:3px 6px;border-bottom:1px solid #c5d0bd;text-align:center}
#route-table tbody tr:nth-child(even) td{background:#f0f3e9}
#route-table th:first-child{position:sticky;left:0;z-index:1;background:#e6eddd;text-align:left}
#route-table thead th{position:sticky;top:0;z-index:2;background:var(--wash)}
#route-table thead th:first-child{z-index:3}
#route-table thead button{display:grid;gap:1px;width:100%;padding:3px 4px;border:0;border-radius:4px}
#route-table thead button span{color:var(--muted);font-size:.625rem}
#route-table thead button[aria-pressed=true]{background:var(--honey)}
#route-data-note{padding:0 8px 7px}
.route-waypoint{
  display:grid;place-items:center;border:2px solid #ffe1a1;border-radius:50%;
  background:#173e35;color:#fff5ce;font:bold .8125rem system-ui,sans-serif;box-shadow:0 1px 4px #14292199;
}
.leaflet-tooltip.route-distance{
  padding:0 2px;border:0;background:transparent;color:#213c33;box-shadow:none;
  font:.625rem/1.2 system-ui,sans-serif;font-weight:650;
  font-variant-numeric:tabular-nums;text-shadow:0 0 2px #fff8e5,0 0 3px #fff8e5;
}
.leaflet-tooltip.route-total-mileage{font-weight:750}
@media (pointer:coarse){
  .route-dock,.route-dialog{--route-control:34px}
}
@media (max-width:315px){
  .route-settings{grid-template-columns:repeat(2,minmax(0,1fr))}
  .route-settings label:first-child{grid-column:1/-1}
}
@media (max-height:480px) and (orientation:landscape){
  .route-dock,.route-dialog{--route-control:27px}
  .route-dock{--route-axis:12px;--route-row:17px;padding-block:3px}
  .route-transport{margin:2px 0}
  .route-dialog .route-heading{padding-block:4px}
  .route-table-scroll{max-height:49dvh}
}
