:root {
  --ink: #17221f;
  --muted: #69746f;
  --paper: #f4f1e9;
  --white: #fffdf8;
  --lime: #d8ff3e;
  --green: #143f34;
  --line: rgba(23,34,31,.13);
  --orange: #f48751;
  --shadow: 0 20px 60px rgba(25,35,31,.14);
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body { font-family: "DM Sans", sans-serif; color: var(--ink); background: var(--paper); }
button, a { font: inherit; }
button { color: inherit; }
.topbar { height: 76px; display: flex; align-items: center; justify-content: space-between; padding: 0 34px; background: var(--white); border-bottom: 1px solid var(--line); position: relative; z-index: 20; }
.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50% 50% 44% 56%; background: var(--lime); font: 800 20px Manrope; transform: rotate(-8deg); }
.brand-mark::first-letter { transform: rotate(8deg); }
.brand strong, .brand small { display: block; }
.brand strong { font: 800 17px Manrope; letter-spacing: -.5px; }
.brand small { margin-top: 1px; color: var(--muted); font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; }
.topbar-meta { display: flex; align-items: center; gap: 26px; font-size: 13px; }
.season { font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.season i { width: 7px; height: 7px; display: inline-block; margin-right: 7px; border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 4px rgba(244,135,81,.15); }
.dates { color: var(--muted); }
.menu-button { display: none; border: 0; background: transparent; font-size: 22px; }
.app-shell { height: calc(100vh - 76px); display: grid; grid-template-columns: 390px 1fr; overflow: hidden; }
.route-panel { background: var(--green); color: white; padding: 35px 28px 0; display: flex; flex-direction: column; min-height: 0; position: relative; z-index: 10; }
.route-panel::before { content: ""; position: absolute; width: 180px; height: 180px; border: 1px solid rgba(216,255,62,.15); border-radius: 50%; right: -80px; top: 140px; }
.eyebrow { margin: 0 0 10px; color: #78837d; font-size: 10px; font-weight: 800; letter-spacing: 2px; }
.route-panel .eyebrow { color: var(--lime); }
h1 { margin: 0; font: 800 31px/1.08 Manrope; letter-spacing: -1.5px; }
h1 em { color: var(--lime); font-style: normal; }
.intro { width: 285px; margin: 14px 0 22px; color: rgba(255,255,255,.62); font-size: 12px; line-height: 1.55; }
.filter-row { display: flex; gap: 6px; margin-bottom: 15px; }
.filter { border: 1px solid rgba(255,255,255,.16); border-radius: 999px; padding: 7px 11px; background: transparent; color: rgba(255,255,255,.62); font-size: 10px; font-weight: 700; cursor: pointer; }
.filter.active { color: var(--green); background: var(--lime); border-color: var(--lime); }
.route-list { margin: 0 -12px; padding: 0 8px 20px 12px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: rgba(216,255,62,.4) transparent; }
.route-card { width: 100%; display: grid; grid-template-columns: 35px 1fr auto; gap: 10px; align-items: center; text-align: left; border: 0; border-bottom: 1px solid rgba(255,255,255,.09); padding: 13px 8px; background: transparent; color: white; cursor: pointer; transition: .2s ease; }
.route-card:hover { padding-left: 13px; background: rgba(255,255,255,.04); }
.route-card.active { background: var(--white); color: var(--ink); margin: 5px 0; border-radius: 8px; border: 0; box-shadow: 0 10px 24px rgba(0,0,0,.13); }
.route-number { color: rgba(255,255,255,.4); font: 700 10px Manrope; }
.route-card.active .route-number { color: var(--orange); }
.route-name { display: block; font-size: 12px; font-weight: 700; }
.route-sub { display: block; margin-top: 3px; color: rgba(255,255,255,.5); font-size: 9px; }
.route-card.active .route-sub { color: var(--muted); }
.route-days { padding: 4px 7px; border: 1px solid currentColor; border-radius: 10px; opacity: .55; font-size: 9px; }
.panel-footer { display: flex; justify-content: space-between; padding: 12px 0 13px; border-top: 1px solid rgba(255,255,255,.1); color: rgba(255,255,255,.35); font-size: 8px; letter-spacing: 1.3px; }
.workspace { min-width: 0; min-height: 0; display: grid; grid-template-rows: 54% 46%; }
.map-wrap { position: relative; min-height: 0; overflow: hidden; background: #d9dfd9; }
#map { width: 100%; height: 100%; border: 0; background: #d9dfd9; }
#map .leaflet-tile-pane { filter: saturate(.7) contrast(.92) sepia(.08); }
#map .leaflet-control-zoom { margin: 0 0 30px 28px; border: 0; box-shadow: var(--shadow); }
#map .leaflet-control-zoom a { color: var(--ink); background: var(--white); border-color: var(--line); }
#map .leaflet-control-attribution { font-size: 8px; background: rgba(255,255,255,.75); }
.route-marker { display: grid; place-items: center; width: 25px; height: 25px; border: 2px solid var(--white); border-radius: 50%; color: var(--white); background: var(--green); box-shadow: 0 3px 10px rgba(20,63,52,.3); font: 800 10px Manrope; }
.route-marker.start { color: var(--green); background: var(--lime); }
.leaflet-popup-content-wrapper { border-radius: 5px; font-family: "DM Sans", sans-serif; }
.leaflet-popup-content { margin: 10px 12px; font-size: 11px; font-weight: 700; }
.map-shade { pointer-events: none; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(16,39,33,.58) 0%, transparent 32%, transparent 70%, rgba(16,39,33,.2)); }
.map-header { position: absolute; top: 0; left: 0; right: 0; display: flex; justify-content: space-between; align-items: flex-start; padding: 28px 32px; color: white; pointer-events: none; }
.light { color: var(--lime); }
.map-header h2 { margin: 0; max-width: 560px; font: 800 27px/1.1 Manrope; letter-spacing: -1px; text-shadow: 0 2px 14px rgba(0,0,0,.3); }
.maps-link { pointer-events: auto; display: flex; gap: 12px; align-items: center; padding: 11px 14px; border-radius: 4px; color: var(--ink); background: var(--lime); text-decoration: none; font-size: 10px; font-weight: 800; box-shadow: var(--shadow); }
.maps-link span { font-size: 15px; }
.map-stats { position: absolute; left: 32px; bottom: 25px; display: flex; gap: 8px; pointer-events: none; }
.map-stat { min-width: 82px; padding: 10px 12px; border: 1px solid rgba(255,255,255,.42); border-radius: 5px; color: white; background: rgba(20,63,52,.88); backdrop-filter: blur(8px); }
.map-stat strong, .map-stat span { display: block; }
.map-stat strong { font: 800 16px Manrope; }
.map-stat span { margin-top: 2px; opacity: .62; font-size: 8px; letter-spacing: 1px; }
.route-progress { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: rgba(255,255,255,.35); }
.route-progress span { display: block; height: 100%; background: var(--lime); transition: width .35s; }
.detail-panel { min-height: 0; padding: 25px 32px 0; background: var(--white); overflow-y: auto; }
.detail-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 25px; }
.detail-heading h3 { margin: 0; font: 800 18px/1.25 Manrope; letter-spacing: -.5px; }
.trip-controls { display: flex; align-items: center; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 4px; }
.trip-controls button { width: 34px; height: 30px; border: 0; background: transparent; cursor: pointer; }
.trip-controls button:hover { background: var(--paper); }
.trip-controls span { padding: 0 9px; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: 1px; }
.timeline { display: flex; gap: 0; margin-top: 25px; min-width: max-content; }
.stop { position: relative; width: 220px; padding: 24px 25px 15px 0; border-top: 1px solid var(--line); }
.stop::before { content: ""; position: absolute; width: 9px; height: 9px; top: -5px; left: 0; border: 2px solid var(--white); border-radius: 50%; background: var(--orange); box-shadow: 0 0 0 1px var(--orange); }
.stop:last-child { width: 190px; }
.stop-date { color: var(--orange); font-size: 9px; font-weight: 800; letter-spacing: 1px; text-transform: uppercase; }
.stop h4 { margin: 7px 0 7px; font: 800 14px Manrope; }
.stop p { margin: 0; max-width: 190px; color: var(--muted); font-size: 10px; line-height: 1.45; }
.stop-tag { display: inline-flex; margin-top: 10px; padding: 4px 7px; border-radius: 2px; background: #edf0e9; color: #56615c; font-size: 8px; font-weight: 700; text-transform: uppercase; }
.detail-note { margin: 6px 0 22px; padding: 10px 13px; max-width: 760px; border-left: 2px solid var(--orange); color: var(--muted); background: #faf7ef; font-size: 10px; line-height: 1.45; }
@media (max-width: 900px) {
  .topbar { height: 64px; padding: 0 18px; }
  .topbar-meta { display: none; }
  .menu-button { display: block; }
  .app-shell { height: calc(100vh - 64px); display: block; overflow: auto; }
  .route-panel { position: fixed; inset: 64px auto 0 0; width: min(90vw,390px); transform: translateX(-102%); transition: transform .25s; box-shadow: var(--shadow); }
  .route-panel.open { transform: translateX(0); }
  .workspace { display: block; }
  .map-wrap { height: 52vh; min-height: 420px; }
  .detail-panel { min-height: 48vh; overflow-x: auto; padding: 23px 20px; }
  .map-header { padding: 22px 20px; }
  .map-header h2 { font-size: 22px; }
  .maps-link { font-size: 0; gap: 0; }
  .maps-link span { font-size: 17px; }
  .map-stats { left: 20px; bottom: 20px; }
}
@media (max-width: 520px) {
  .map-wrap { min-height: 370px; }
  .map-stat { min-width: 70px; padding: 8px; }
  .map-stat strong { font-size: 13px; }
  .detail-heading { display: block; }
  .trip-controls { margin-top: 14px; width: max-content; }
}
