:root { --bg:#0b0f13; --panel:#121820; --text:#eaf2ff; --muted:#9fb0c3; --brand:#6ee7b7; --accent:#60a5fa; }
.operations-banner { position: fixed; top: 0; left: 0; right: 0; background: var(--panel); border-bottom: 2px solid var(--accent); padding: 12px 20px; z-index: 1000; box-shadow: 0 2px 10px rgba(0,0,0,0.3); transition: transform 0.3s ease; }
.operations-banner.hidden { transform: translateY(-100%); }
.banner-content { display: flex; justify-content: space-between; align-items: center; max-width: 1200px; margin: 0 auto; }
.operations-btn { background: var(--accent); color: white; border: none; padding: 6px 12px; border-radius: 6px; cursor: pointer; font-weight: 600; margin-left: 8px; }
.operations-btn:hover { background: var(--brand); }
.dismiss-btn { background: none; border: none; color: var(--muted); font-size: 24px; cursor: pointer; padding: 0; width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; }
.dismiss-btn:hover { color: var(--text); }
.menu-dropdown { position: fixed; top: 72px; right: 20px; z-index: 1001; transition: top 0.3s ease; }
.menu-btn { background: var(--panel); border: 2px solid var(--accent); color: var(--text); width: 40px; height: 40px; border-radius: 8px; cursor: pointer; font-size: 18px; display: flex; align-items: center; justify-content: center; }
.menu-btn:hover { background: var(--accent); color: white; }
.menu-content { display: none; position: absolute; top: 50px; right: 0; background: var(--panel); border: 2px solid var(--accent); border-radius: 8px; min-width: 200px; box-shadow: 0 4px 16px rgba(0,0,0,0.3); }
.menu-content a { display: block; padding: 12px 16px; color: var(--text); text-decoration: none; border-bottom: 1px solid #2b3b4e; }
.menu-content a:last-child { border-bottom: none; }
.menu-content a:hover { background: var(--accent); color: white; }
.menu-dropdown.open .menu-content { display: block; }
*{box-sizing:border-box}
html, body { height: auto; margin: 0; padding: 0; }
body{margin:0; background:var(--bg); color:var(--text); font-family:system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Helvetica,Arial,sans-serif}
#instructions { padding: 40px; text-align: center; background: var(--panel); border-bottom: 1px solid #1f2b38; }
#instructions h1 { color: var(--brand); margin-bottom: 20px; }
#instructions .subtitle { color: var(--muted); font-size: 1.25rem; margin-bottom: 40px; }
#instructions .steps-container { display: grid; gap: 24px; max-width: 800px; margin: 0 auto; }
#instructions .step-box { background: #1b1f24; border: 2px solid #2b3b4e; border-radius: 16px; padding: 24px; text-align: left; box-shadow: 0 4px 16px #0003; transition: border 0.2s, box-shadow 0.2s; }
#instructions .step-box:hover { border-color: var(--accent); box-shadow: 0 8px 24px #60a5fa22; }
#instructions .transition-box .start-button { margin-top: 12px; background: var(--accent); color: #fff; border: none; padding: 12px 24px; border-radius: 12px; font-size: 1.1rem; font-weight: 700; cursor: pointer; transition: background 0.2s; }
#instructions .transition-box .start-button:hover { background: var(--brand); }
#instructions .step-num { background: var(--accent); color: #fff; font-weight: 700; font-size: 1.2rem; width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; box-shadow: 0 2px 8px #60a5fa33; }
#instructions .step-title { font-size: 1.3rem; font-weight: 700; margin-bottom: 8px; color: var(--brand); }
#instructions .step-desc { font-size: 1rem; color: var(--text); line-height: 1.5; }
#app{display:grid; grid-template-columns:360px 1fr; height:100vh}
#sidebar{background:var(--panel); border-right:1px solid #1f2b38; display:flex; flex-direction:column}
header{padding:16px; border-bottom:1px solid #1f2b38; display:flex; align-items:center; gap:10px}
header h1{font-size:18px; margin:0; letter-spacing:0.2px}
header .badge{font-size:11px; background:#1b2633; color:var(--muted); padding:2px 8px; border-radius:999px}
.controls{padding:12px 16px; display:grid; gap:12px}
.group{display:grid; gap:6px}
.label{font-size:12px; color:var(--muted)}
.label.ghost {
  background: transparent;
  border: 1.5px solid #2b3b4e;
  border-radius: 12px;
  padding: 10px 12px;
  color: var(--text);
  font-weight: 600;
  transition: background 0.15s, border 0.15s;
  margin-bottom: 2px;
}
.label.ghost:hover, .label.ghost:focus {
  background: #1b2633;
  border-color: var(--accent);
  color: var(--brand);
}
.row{display:flex; gap:8px; align-items:center}
input[type="number"], input[type="text"], select{width:100%; background:#0f141b; border:1px solid #283546; color:var(--text); padding:10px 12px; border-radius:12px}
button{background:var(--accent); color:white; border:none; padding:10px 12px; border-radius:12px; cursor:pointer; font-weight:600}
button.secondary{background:#1b2633; color:var(--text)}
button.ghost{background:transparent; border:1px solid #2b3b4e}
button.danger{background:#ef4444}
.muted{color:var(--muted)}
#map{height:100%; width:100%}
.sectionTitle{padding:8px 16px; font-size:12px; letter-spacing:.4px; color:var(--muted)}
.list{padding:8px 8px 24px 8px; overflow:auto}
.card{background:#0f141b; border:1px solid #243244; border-radius:16px; padding:12px; margin:8px; display:grid; gap:8px}
.pubTitle{font-weight:700}
.pill{font-size:11px; padding:3px 8px; border-radius:999px; background:#17202a; color:var(--muted)}
.flex{display:flex; align-items:center; gap:8px}
.space{justify-content:space-between}
.wrap{flex-wrap:wrap}
.tiny{font-size:11px}
.hr{height:1px; background:#1f2b38; margin:6px -12px}
.link{color:#93c5fd; text-decoration:none}
.footer{padding:8px 16px; border-top:1px solid #1f2b38; font-size:12px; color:var(--muted)}
#rideonSummary{padding:8px 16px; font-size:12px; color:var(--muted); border-top:1px solid #1f2b38;}
@media (max-width: 900px){ #app{grid-template-columns:1fr; grid-template-rows:48% 52%} #sidebar{order:2} #map{order:1} }
.toast{position:fixed; top:16px; left:50%; transform:translateX(-50%); background:#0f141b; color:var(--text); padding:10px 14px; border:1px solid #2b3b4e; border-radius:12px; z-index:10000; display:none}
.popupContent{font: 12px/1.4 system-ui;}
.popupContent .title{font-weight:700; font-size:14px;}
.popupContent .sub{color:#688199}

/* Make Leaflet Routing Machine text darker */
.leaflet-routing-container,
.leaflet-routing-container * {
  color: #222 !important;
}

#rideonDropdownContent {
  transition: max-height 0.25s cubic-bezier(.4,0,.2,1);
  overflow: hidden;
}

/* Mobile (phone) adjustments */
@media (max-width: 600px) {
  /* Layout */
  /* Map sits in the top row and sidebar below on small screens */
  #app { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  #map{order:1}
  #sidebar{order:2; width:100%; height:auto; border-right:none; border-bottom:1px solid #1f2b38; }
  header { padding:12px; }

  /* Controls and inputs */
  .controls { padding:12px; gap:10px; }
  .row { flex-direction:column; align-items:stretch; gap:10px; }
  input[type="text"], input[type="number"], select { padding:12px 14px; font-size:16px; }

  /* Buttons and touch targets */
  button, .button { width:100%; display:block; padding:12px 14px; font-size:16px; }
  button.ghost, .button.ghost { box-sizing:border-box; }

  /* Sidebar list and footer */
  .list { padding-bottom:48px; }
  .footer { padding:12px; font-size:13px; }

  /* Toast and overlays */
  .toast { left:16px; right:16px; transform:none; }

  #instructions { padding: 20px; }
  #instructions h1 { font-size: 1.5rem; }
  #instructions .subtitle { font-size: 1.1rem; margin-bottom: 24px; }
  #instructions .steps-container { gap: 16px; }
  #instructions .step-box { padding: 16px; }
  #instructions .step-num { width: 32px; height: 32px; font-size: 1rem; }
  #instructions .step-title { font-size: 1.1rem; }
  #instructions .step-desc { font-size: 0.95rem; }
  #instructions .transition-box { margin-top: 16px; }

  /* Mobile toolbar overlay: bottom third scrollable toolbar */
  .mobile-toolbar{display:block; position:fixed; bottom:0; left:0; right:0; height:33vh; z-index:99998; background:var(--panel); border-top:1px solid #1f2b38; box-shadow: 0 -6px 24px #0006; overflow-y:auto; -webkit-overflow-scrolling:touch;}
  .mobile-toolbar-inner{padding:12px 16px}
  .mobile-toolbar .controls{padding:8px 8px}
  /* make selected list scrollable inside the toolbar (if long) and style footer */
  .mobile-toolbar #selectedList{max-height:18vh; overflow:auto; margin-bottom:8px}
  .mobile-toolbar .footer{border-top:1px solid #17202a; padding-top:12px; margin-top:12px; color:var(--muted)}
  /* a small handle to reopen if collapsed */
  .mobile-toolbar-toggle{position:fixed; bottom:8px; right:12px; z-index:99999; background:#0f141b; border:1px solid #2b3b4e; color:var(--text); padding:6px 8px; border-radius:10px; font-weight:700}
}