/* City Bus page (/city-bus/) — map + panel; phones get the map first, then the panel */
.cb { padding: clamp(22px, 3vw, 40px) 0 clamp(40px, 6vw, 80px); }
.cb .cb__status { margin-bottom: 16px; }
.cb__grid { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 18px; align-items: start; }
.cb__mapbox { position: sticky; top: 96px; height: min(72vh, 720px); overflow: hidden; border-radius: 16px; background: #dfe7e1; box-shadow: 0 0 0 1px var(--line); }
.cb__map { position: absolute; inset: 0; }
.cb__map.is-off::after { content: 'The map could not load. The lines and times are on the right.'; position: absolute; inset: 0; display: grid; place-items: center; padding: 24px; color: var(--alpine); font-weight: 700; text-align: center; }
.cb__legend { position: absolute; left: 12px; bottom: 12px; z-index: 500; display: flex; flex-wrap: wrap; gap: 6px 12px; padding: 8px 12px; border-radius: 10px; background: rgb(255 255 255 / 0.94); box-shadow: 0 2px 10px rgb(0 0 0 / 0.12); font-size: 12px; font-weight: 800; }
.cb__legend span { display: inline-flex; align-items: center; gap: 6px; }
.cb__legend i { width: 16px; height: 6px; border-radius: 3px; }
.cb__legend i.is-parked { background: #b8b0a8; }
.cb__legend:empty { display: none; }
.cb__locate-fab { position: absolute; right: 12px; bottom: 12px; z-index: 500; display: grid; place-items: center; width: 46px; height: 46px; border: 0; border-radius: 50%; background: #fff; color: var(--alpine); box-shadow: 0 4px 14px rgb(0 0 0 / 0.2); cursor: pointer; transition: transform 0.4s var(--spring); }
.cb__locate-fab:hover { transform: translateY(-2px); }
.cb__noscript { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; padding: 20px; text-align: center; }

.cb__panel { display: flex; flex-direction: column; max-height: min(72vh, 720px); overflow: hidden; border-radius: 16px; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.cb__tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 6px; border-bottom: 1px solid var(--line); }
.cb__tabs button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border: 0; border-radius: 10px; background: none; color: #6b6259; font: inherit; font-size: 14px; font-weight: 800; cursor: pointer; transition: background-color 0.2s ease, color 0.2s ease; }
.cb__tabs button[aria-selected='true'] { background: var(--alpine); color: #fff; }
.cb__tabs button[aria-selected='true'] .ic { color: var(--gold); }
.cb__pane { flex: 1; min-height: 0; overflow-y: auto; padding: 16px; overscroll-behavior: contain; }
.cb__route { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 10px; margin: 14px 2px 6px; font-weight: 800; }
.cb__route small { color: #8a8178; font-size: 12.5px; font-weight: 700; }

/* Timeline: one stop per row, the line runs down the left */
.cb__tl { margin: 0; padding: 0; list-style: none; }
.cb__st { position: relative; }
.cb__st::before { content: ''; position: absolute; left: 13px; top: 0; bottom: 0; width: 4px; background: var(--c); opacity: 0.85; }
.cb__st.is-first::before { top: 50%; }
.cb__st.is-last::before { bottom: 50%; }
.cb__st-btn { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 6px 4px 6px 0; border: 0; border-radius: 10px; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.cb__st-btn:hover { background: var(--warm); }
.cb__st-dot { position: relative; z-index: 1; flex: none; width: 14px; height: 14px; margin-left: 8px; border: 3px solid var(--c); border-radius: 50%; background: #fff; }
.cb__st.is-first .cb__st-dot, .cb__st.is-last .cb__st-dot { width: 18px; height: 18px; margin-left: 6px; }
.cb__st-name { flex: 1; font-size: 14.5px; font-weight: 700; line-height: 1.3; }
.cb__busrow { position: relative; display: flex; align-items: center; gap: 10px; min-height: 38px; padding-left: 0; color: var(--ink); font-size: 13px; font-weight: 700; }
.cb__busrow::before { content: ''; position: absolute; left: 13px; top: 0; bottom: 0; width: 4px; background: var(--c); opacity: 0.85; }
.cb__busrow-ic { position: relative; z-index: 1; display: grid; place-items: center; width: 30px; height: 26px; border: 2px solid #fff; border-radius: 999px; background: var(--c); color: var(--k, #fff); box-shadow: 0 2px 8px rgb(0 0 0 / 0.2); }
.cb__busrow small { color: #8a8178; font-weight: 700; }

/* Nearby */
.cb__locate { display: grid; gap: 14px; padding: 18px; border-radius: 12px; background: var(--stone); color: var(--stone-ink); }
.cb__locate p { margin: 0; font-size: 14px; line-height: 1.5; }
.cb__locate .btn { justify-content: center; }
.cb__locate.is-busy .btn { opacity: 0.6; pointer-events: none; }
.cb__near { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.cb__near:not(:empty) { margin-top: 2px; }
.cb__nstop { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 10px; padding: 12px; border-radius: 12px; box-shadow: 0 0 0 1px var(--line); }
.cb__nstop-main { display: grid; gap: 4px; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.cb__nstop-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cb__nstop-top b { font-size: 15px; }
.cb__nstop-top em { color: #8a8178; font-size: 12.5px; font-style: normal; font-weight: 700; }
.cb__nstop small { color: #6b7280; font-size: 12.5px; }
.cb__nstop-eta { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; }
.cb__walk { display: grid; place-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; background: var(--alpine); color: #fff; font-size: 12.5px; font-weight: 800; text-decoration: none; white-space: nowrap; }
.cb__near-err { padding: 12px; border-radius: 10px; background: #fbeaea; color: #8a1f1f; font-size: 14px; }
.cb__note { display: flex; align-items: center; gap: 8px; margin: 16px 2px 0; color: #6b6259; font-size: 13px; }
.cb__note .ic { flex: none; color: var(--gold-2); }

@media (max-width: 1080px) { .cb__grid { grid-template-columns: minmax(0, 1fr) 340px; } }
@media (max-width: 900px) {
  .cb__grid { grid-template-columns: 1fr; }
  .cb__mapbox { position: relative; top: 0; height: 58vh; min-height: 320px; }
  .cb__panel { max-height: none; }
  .cb__pane { overflow: visible; }
}
@media (max-width: 560px) {
  .cb__mapbox { height: 52vh; border-radius: 12px; }
  .cb__status { font-size: 13.5px; }
  .cb__chip span { font-size: 12.5px; }
}
