:root{--ink:#14283b;--muted:#41576a;--line:#d9e4e8;--purple:#245268;--pale:#e6f0f4;--teal:#00715f;--glass:#f9fcfdf7;--panel-shadow:0 8px 28px #1c3c5030;background:#e9f3f3}
body[data-launch]{height:100dvh;overflow:hidden;display:block}
body[data-launch] main{display:block;height:100%;min-height:0;padding:0}
body[data-launch] .map-area{position:absolute;inset:0;margin:0}
body[data-launch] .top{position:absolute;left:max(10px,env(safe-area-inset-left));top:max(10px,env(safe-area-inset-top));height:auto;min-height:0;z-index:650;display:grid;grid-template-columns:auto auto auto;gap:5px;padding:5px;background:var(--glass);color:var(--ink);border:1px solid #fff;border-radius:16px;box-shadow:var(--panel-shadow)}
body[data-launch] .identity{gap:9px;padding:0 5px;font-size:15px;white-space:nowrap}
body[data-launch] .logo{display:grid;place-items:center;width:34px;height:34px;border-radius:11px;background:#0b6359;color:#fff}
body[data-launch] .logo svg{width:22px;height:22px}
body[data-launch] .feed{position:fixed;right:max(10px,env(safe-area-inset-right));top:max(12px,env(safe-area-inset-top));padding:6px 9px;color:var(--ink);background:var(--glass);border:1px solid white;box-shadow:var(--panel-shadow);font-size:12px}
body[data-launch] .feed small{color:var(--muted)}
body[data-launch] .feed i{background:#9c7241}
body[data-launch] .feed[data-state=live] i{background:#008568}
.launch-icon{width:44px;height:44px;display:grid;place-items:center;border:0;background:#e8f2f4;color:#18465a;border-radius:11px}
.launch-icon svg{width:21px;height:21px}
body[data-launch] .sidebar{position:absolute;z-index:620;left:max(10px,env(safe-area-inset-left));top:76px;bottom:max(16px,env(safe-area-inset-bottom));width:clamp(305px,31vw,390px);height:auto;margin:0;border:1px solid #fff;background:var(--glass);border-radius:20px;box-shadow:var(--panel-shadow)}
body[data-launch] .intro{padding:14px 15px 11px}
body[data-launch] .intro h1{font-size:25px;letter-spacing:-.035em}
body[data-launch] .intro h1+p{margin:4px 0 10px}
body[data-launch] .results{padding-inline:15px}
body[data-launch] .tabs,body[data-launch] .bus-filters,body[data-launch] .detail-nav,body[data-launch] .sources{padding-inline:15px}
body[data-launch] .nav-action{color:#245268}
body[data-launch] .map-area .leaflet-control-zoom{margin-top:65px}
body[data-launch] .map-controls{top:164px;right:14px;left:auto;display:grid}
body[data-launch] .map-selection:not([hidden]),body[data-launch] .map-notice{left:calc(clamp(305px,31vw,390px) + 24px);top:72px}
body[data-launch] .map-selection:not([hidden])~.map-notice{top:127px}
body[data-launch] .code{background:#e1f1ea;color:#145d50}
body[data-launch] #sheet-handle,body[data-launch] #sheet-teaser,body[data-launch] .sheet-toggle{display:none}
.beta-notice{padding:7px 13px 8px;border-top:1px solid var(--line);font-size:11px;line-height:1.35;color:#41576a}
.beta-notice button{color:#164e65;background:none;border:0;text-decoration:underline;font-size:inherit;font-weight:750;padding:3px 0}
.bus-actions{display:flex;flex-wrap:wrap;gap:7px;margin:10px 0 12px}
.primary-action{min-height:44px;border:1px solid #00614f;border-radius:9px;color:#fff;background:#006954;font-weight:750;padding:7px 14px}
.bus-actions .nav-action{min-height:44px}
#sheet-teaser p{margin:3px 0;color:var(--muted);font-size:13px}
#sheet-teaser strong{display:block;overflow-wrap:anywhere;font-size:15px}
.report-dialog{color:var(--ink);border:1px solid var(--line);border-radius:18px;background:#fbfefe;width:min(475px,calc(100% - 24px));max-height:calc(100dvh - 24px);padding:0;box-shadow:var(--panel-shadow)}
.report-dialog::backdrop{background:#14283b88}
.report-dialog section{padding:15px}
.dialog-heading{display:flex;justify-content:space-between;gap:12px;align-items:center}
.dialog-heading h2{font-size:21px;margin:0}
.report-dialog form,.admin-shell form{display:grid;gap:10px;margin:12px 0}
.report-dialog label,.admin-shell label{display:grid;gap:4px;font-size:14px;font-weight:700}
.report-dialog :is(input,textarea,select),.admin-shell :is(input,textarea,select){border:1px solid #b9cbd3;border-radius:8px;padding:9px;min-height:44px;font:inherit;font-size:16px;background:white;min-width:0;color:var(--ink)}
.report-dialog label.report-trap{position:absolute;height:1px;width:1px;overflow:hidden;clip-path:inset(50%)}
#report-status{overflow-wrap:anywhere}
body[data-launch] .map-cluster{display:grid;place-items:center;border-radius:50%;color:white;background:var(--map-cluster);border:2px solid white;font:750 11px system-ui;box-shadow:0 2px 6px #173d5660}
body[data-launch][data-offline] .feed{background:#fff2dd}
@media(max-width:720px){
  body[data-launch] .top{grid-template-columns:auto auto auto}
  body[data-launch] .identity{font-size:13px;padding:0;gap:5px}
  body[data-launch] .identity strong{font-size:13px}
  body[data-launch] .feed{top:calc(max(10px,env(safe-area-inset-top)) + 58px);left:max(10px,env(safe-area-inset-left));right:auto;white-space:nowrap}
  body[data-launch] .feed small{display:none}
  body[data-launch] .sidebar{left:max(6px,env(safe-area-inset-left));right:max(6px,env(safe-area-inset-right));bottom:max(4px,env(safe-area-inset-bottom));top:auto;width:auto;height:var(--sheet-height,124px);max-height:calc(100dvh - 103px);transition:height 210ms cubic-bezier(.2,.75,.22,1);overflow:hidden}
  body[data-launch] .sidebar[data-snap=half]{--sheet-height:clamp(275px,49dvh,480px)}
  body[data-launch] .sidebar[data-snap=full]{--sheet-height:calc(100dvh - 103px - env(safe-area-inset-top) - env(safe-area-inset-bottom))}
  body[data-launch] .sidebar[data-dragging]{height:var(--drag-height);transition:none}
  body[data-launch] #sheet-handle{display:grid;flex:none;place-items:center;width:100%;height:28px;border:0;background:none;touch-action:none}
  #sheet-handle span{width:38px;height:5px;border-radius:5px;background:#a2bac5}
  body[data-launch] #sheet-teaser:not([hidden]){display:block;padding:0 13px 3px}
  body[data-launch] .sidebar[data-snap=collapsed] .intro,body[data-launch] .sidebar[data-snap=collapsed] .tabs,body[data-launch] .sidebar[data-snap=collapsed] .explore-content,body[data-launch] .sidebar[data-snap=collapsed] .sources{display:none}
  body[data-launch] .sidebar[data-snap=collapsed][data-selection=bus]{--sheet-height:163px}
  body[data-launch] .sidebar[data-snap=half][data-selection=bus] .intro,body[data-launch] .sidebar[data-snap=half][data-selection=bus] .tabs,
  body[data-launch] .sidebar[data-snap=full][data-selection=bus] .intro,body[data-launch] .sidebar[data-snap=full][data-selection=bus] .tabs{display:none}
  body[data-launch] .sidebar[data-snap=half] > .sources{display:none}
  body[data-launch] .sidebar[data-snap=half] #sheet-teaser,body[data-launch] .sidebar[data-snap=full] #sheet-teaser{display:none}
  body[data-launch] .intro{padding:3px 10px 0}
  body[data-launch] .tabs,body[data-launch] .bus-filters,body[data-launch] .detail-nav,body[data-launch] .results{padding-inline:10px}
  body[data-launch] .map-controls{top:110px;right:max(10px,env(safe-area-inset-right))}
  body[data-launch] .map-area .leaflet-control-zoom{margin-top:12px}
  body[data-launch] .map-selection:not([hidden]){display:none}
  body[data-launch] .map-notice,body[data-launch] .map-selection:not([hidden])~.map-notice{top:111px;left:10px}
  body[data-launch] .map-area .leaflet-bottom{bottom:calc(170px + env(safe-area-inset-bottom))}
  body[data-launch]:has(.sidebar[data-snap=half]) .map-area .leaflet-bottom{bottom:calc(49dvh + 6px)}
  body[data-launch]:has(.sidebar[data-snap=full]) .map-area .leaflet-bottom{display:none}
  body[data-keyboard][data-launch] .sidebar[data-sheet-open=true]{--sheet-height:calc(var(--app-height,100dvh) - 80px);height:var(--sheet-height)}
}
@media(prefers-reduced-motion:reduce){
  body[data-launch] .sidebar{transition:none}
}
.rider-edit-dialog { width:min(550px,calc(100% - 18px)); overscroll-behavior:contain; }
#rider-edit-fields { display:grid; gap:12px; }
#rider-edit-fields h3, #edit-context { margin:0; font-size:1rem; }
#edit-context { margin-top:8px; color:var(--muted); }
.edit-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
.edit-picker { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:6px; margin-top:6px; }
.edit-picker input { grid-column:1 / -1; }
.edit-picker select { width:100%; }
.edit-routes summary { padding:10px 0; font-weight:750; cursor:pointer; }
.edit-stop-list { margin:0; padding-inline-start:1.6rem; }
.edit-stop-list li { display:list-item; padding:3px 0; border-bottom:1px solid var(--line); }
.edit-stop-list span { display:inline-block; width:calc(100% - 132px); overflow-wrap:anywhere; vertical-align:middle; padding-right:4px; }
.edit-stop-list button { min-height:44px; width:44px; padding:0; vertical-align:middle; }
.edit-footer { display:flex; justify-content:flex-end; gap:8px; position:sticky; bottom:-1px; background:#fbfefe; padding-block:5px; }
#rider-edit-status { overflow-wrap:anywhere; }
#pin-edit-actions { position:fixed; z-index:800; bottom:max(16px,env(safe-area-inset-bottom)); left:50%; translate:-50% 0;
  width:min(455px,calc(100% - 20px)); padding:12px; border-radius:14px; background:#fbfefe; box-shadow:var(--panel-shadow); }
#pin-edit-actions p { margin:0 0 8px; }
#pin-edit-actions button { min-height:44px; margin-right:5px; }
body[data-pin-edit] :is(.sidebar,.map-dock,.beta-notice,.map-selection,.map-controls,#open-search) { visibility:hidden; }
body[data-pin-edit] :is(.leaflet-map-points-pane canvas,.leaflet-stop-focus-pane .leaflet-interactive) { pointer-events:none; }
.draft-pin { color:white; background:#006954; border:2px solid white; border-radius:50%; display:grid; place-items:center; }
.draft-pin svg { width:24px; height:24px; fill:none; stroke:currentColor; stroke-width:2; }
