:root {
  --ink: #0e0e0e;
  --muted: #444444;
  --accent: #ff5f00;
  --line: #e1e1e1;
  --soft: #fafafa;
}
* { box-sizing: border-box; }
body { margin: 0; background: #fff; color: var(--ink); font: 14px/1.7 Poppins, sans-serif; }
a { color: inherit; text-underline-offset: 4px; }
button, input { font: inherit; }
button, a, input { touch-action: manipulation; }
button:focus-visible, a:focus-visible, input:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
header { min-height: 88px; padding: 16px 30px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: flex; align-items: center; gap: 13px; text-decoration: none; }
.brand-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 12px; background: var(--accent); color: #fff; flex-shrink: 0; }
.brand-icon svg { width: 27px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.brand strong { font-size: 19px; letter-spacing: -.6px; }
.brand strong span { color: var(--accent); }
.brand small { display: block; font-size: 11px; color: var(--muted); }
.back-link { font-size: 12px; font-weight: 600; text-decoration: none; }
.back-link:hover { text-decoration: underline; }
main { max-width: 1180px; margin: auto; padding: 0 28px; }
.breadcrumbs { display: flex; gap: 12px; margin-top: 28px; color: var(--muted); font-size: 11px; }
.intro { padding: 30px 0 36px; }
.eyebrow { font-size: 10px; letter-spacing: 1.8px; font-weight: 600; color: var(--muted); margin: 0 0 10px; }
h1 { font-size: clamp(30px,4vw,48px); line-height: 1.25; letter-spacing: -1.6px; margin: 0 0 18px; font-weight: 600; }
.intro > p:not(.eyebrow) { max-width: 660px; color: var(--muted); font-size: 14px; }
.intro-actions, #start-links, #transfer-links { display: flex; flex-wrap: wrap; gap: 10px; }
.intro-actions { margin-top: 24px; }
button, .intro-actions a, .stop-actions a, .leaflet-popup-content a, #start-links a, #transfer-links a { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; border: 1px solid var(--line); padding: 10px 16px; border-radius: 8px; background: #fff; color: var(--ink); font-weight: 500; font-size: 12px; line-height: 1.5; text-decoration: none; cursor: pointer; }
button:hover, .intro-actions a:hover, .stop-actions a:hover, .leaflet-popup-content a:hover, #start-links a:hover, #transfer-links a:hover { border-color: #a3a3a3; background: #f4f4f4; }
#save-route { background: #242424; border-color: #242424; color: #fff; }
#save-route:hover { background: #444; }
button[hidden], #start-links[hidden], #transfer-links[hidden] { display: none; }
button:disabled { opacity: .5; cursor: default; }
.route-overview { display: grid; grid-template-columns: minmax(0,1fr) 290px; gap: 28px; align-items: start; padding-bottom: 26px; border-bottom: 1px solid var(--line); }
.route-map-section { min-width: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.map-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 12px; background: var(--soft); }
.map-toolbar p { flex: 1 1 100%; font-size: 11px; color: var(--muted); margin: 0; }
.map-toolbar button { padding: 8px 12px; }
#route-map { height: 420px; background: #e8e8e8; }
#map-status { margin: 0; padding: 12px 16px; font-size: 11px; color: var(--muted); }
h2 { margin: 0 0 12px; font-size: 26px; line-height: 1.3; letter-spacing: -.8px; font-weight: 600; }
.route-summary { padding: 22px; border-radius: 12px; background: var(--soft); }
.route-summary h2 { font-size: 18px; letter-spacing: -.4px; }
.route-endpoints { font-size: 12px; margin: 0 0 20px; }
.route-endpoints span { color: #929292; margin: 0 4px; }
.facts { display: grid; gap: 18px; padding: 20px 0; border-block: 1px solid var(--line); }
.facts span { display: block; font-size: 9px; letter-spacing: 1px; color: var(--muted); }
.facts strong { font-size: 25px; font-weight: 600; }
.note { font-size: 11px; color: var(--muted); line-height: 1.8; }
#load-status { font-size: 12px; color: var(--muted); margin-top: 18px; }
.section-heading { margin: 44px 0 24px; }
.section-heading > p:last-child { color: var(--muted); font-size: 13px; }
#stop-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
#stop-list li { display: grid; grid-template-columns: 180px minmax(0,1fr) auto; align-items: center; gap: 24px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; scroll-margin-top: 24px; }
#stop-list li.selected { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.stop-preview { display: block; border: 0; padding: 0; overflow: hidden; border-radius: 8px; width: 100%; }
.stop-photo { width: 100%; height: 128px; object-fit: cover; display: block; }
.photo-missing { height: 128px; display: grid; place-items: center; background: var(--soft); color: var(--muted); font-size: 11px; }
.stop-content { min-width: 0; }
.stop-content h3 { font-size: 17px; font-weight: 600; margin: 0 0 8px; line-height: 1.45; }
.stop-content p { font-size: 12px; color: var(--muted); margin: 0; }
.stop-content .stop-leg { font-size: 11px; margin-top: 14px; }
.stop-actions { padding-right: 8px; }
.stop-actions a { border-color: #dddddd; background: #f9f9f9; }
.stop-actions a:hover { border-color: var(--accent); background: #f2f2f2; }
.photo-marker { background: none; border: none; }
.photo-pin { position: relative; display: block; width: 54px; height: 54px; background: var(--soft); border: 3px solid white; border-radius: 12px; box-shadow: 0 3px 12px #24242433; }
.photo-pin img { width: 100%; height: 100%; object-fit: cover; border-radius: 8px; }
.photo-pin b { position: absolute; right: -9px; bottom: -9px; background: #242424; color: #fff; border: 2px solid white; border-radius: 50%; width: 25px; height: 25px; text-align: center; line-height: 21px; font-size: 12px; }
.photo-pin:after { content: ''; position: absolute; bottom: -10px; left: 16px; border: 6px solid transparent; border-top-color: white; }
.popup-photo { width: 190px; height: 110px; object-fit: cover; border-radius: 6px; }
.transfer { margin: 48px 0; padding: 28px; background: var(--soft); border: 1px solid var(--line); border-radius: 12px; }
.transfer > p:not(.eyebrow):not(.note) { max-width: 700px; font-size: 13px; color: var(--muted); }
.transfer label { display: block; margin-top: 22px; font-size: 12px; font-weight: 600; }
.transfer input { display: block; width: min(100%,500px); padding: 12px; border: 1px solid #b3b3b3; border-radius: 8px; margin: 8px 0 12px; background: #fff; }
.transfer-options { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; margin: 24px 0; padding-top: 20px; border-top: 1px solid var(--line); }
.transfer-options h3 { margin: 0 0 12px; font-size: 14px; font-weight: 600; }
.transfer-options p, #location-status { font-size: 12px; color: var(--muted); }
footer { padding: 24px; border-top: 1px solid var(--line); text-align: center; font-size: 12px; }
footer a { text-decoration: none; }
footer a:hover { text-decoration: underline; }
@media(max-width:900px) {
  .route-overview { grid-template-columns: 1fr; gap: 18px; }
  .facts { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .route-summary { padding: 20px; }
  #stop-list li { grid-template-columns: 150px minmax(0,1fr); gap: 16px; }
  .stop-actions { grid-column: 2; padding: 0; }
  .stop-preview { grid-row: span 2; }
}
@media(max-width:600px) {
  header { padding: 14px 16px; flex-wrap: wrap; gap: 12px; }
  .brand strong { font-size: 14px; }
  .brand small { font-size: 9px; }
  .brand-icon { width: 38px; height: 38px; }
  main { padding: 0 16px; }
  .breadcrumbs { margin-top: 20px; }
  .intro { padding: 24px 0; }
  h1 { letter-spacing: -1px; }
  .intro-actions a { flex: 1 1 auto; }
  #save-route { flex-basis: 100%; }
  #route-map { height: 350px; }
  .facts { gap: 16px; grid-template-columns: 1fr; }
  .facts > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
  .facts strong { font-size: 22px; white-space: nowrap; }
  #stop-list li { grid-template-columns: 84px minmax(0,1fr); padding: 12px; gap: 12px; align-items: start; }
  .stop-photo, .photo-missing { height: 90px; }
  .stop-preview { grid-row: 1; }
  .stop-content h3 { font-size: 15px; }
  .stop-actions { grid-column: 2; }
  .transfer { padding: 20px; }
  .transfer-options { grid-template-columns: 1fr; gap: 24px; }
  .transfer input { font-size: 16px; }
  h2 { font-size: 23px; }
}
@media(prefers-reduced-motion:reduce) { *, *:before, *:after { scroll-behavior: auto !important; transition: none !important; } }
