html, body { height: 100%; overflow: hidden; }
body { color: #1c2333; }
.navbar { height: 56px; }
.navbar-brand { font-size: 1.05rem; }
#main-row { display: flex; height: calc(100dvh - 56px); }
#sidebar { width: 380px; flex: 0 0 380px; border-right: 1px solid #dee2e6; background: #fff; z-index: 1000; }
#sidebar-inner { height: 100%; overflow-y: auto; padding: 1rem; }
#map { flex: 1; min-width: 0; height: 100%; position: relative; }
#stop-list { padding-bottom: 1rem; }
.stop-item { width: 100%; text-align: left; border: 0; border-bottom: 1px solid #edf0f2; background: #fff; padding: .7rem .5rem; }
.stop-item:hover, .stop-item:focus { background: #f0f5ff; }
.stop-title { display: block; font-weight: 600; }
.stop-meta { display: block; color: #6c757d; font-size: .8rem; margin-top: .1rem; }
.transport-type { display: inline-block; border-radius: 1rem; padding: .15rem .55rem; background: #e9ecef; color: #343a40; font-size: .78rem; font-weight: 600; }
.atco-card { border-radius: .5rem; color: #fff; background: #0f1c2e; padding: .85rem 1rem; }
.atco-card code { color: #b9edac; font-size: 1.35rem; font-weight: 700; letter-spacing: .03em; }
.atco-card .text-uppercase { color: #b9c3cf; font-size: .7rem; letter-spacing: .08em; }
.route-card { border-left: 3px solid #0d6efd; padding: .45rem .6rem; margin: .45rem 0; background: #f8f9fa; }
.route-ref { font-weight: 700; margin-right: .35rem; }
.tag-list { display: grid; grid-template-columns: minmax(7rem, auto) 1fr; gap: .25rem .6rem; overflow-wrap: anywhere; }
.tag-list dt, .tag-list dd { margin: 0; }
.tag-list dt { font-family: monospace; color: #495057; }
.leaflet-container { font-family: inherit; }
.selected-stop-marker { animation: selected-stop-pulse 1.5s ease-in-out infinite; }
.hovered-stop-marker { filter: drop-shadow(0 0 3px rgba(13, 202, 240, .9)); }
@keyframes selected-stop-pulse {
  0%, 100% { stroke-opacity: 1; fill-opacity: .25; stroke-width: 5; }
  50% { stroke-opacity: .55; fill-opacity: .08; stroke-width: 8; }
}
@media (prefers-reduced-motion: reduce) {
  .selected-stop-marker { animation: none; }
}
#panel-button { position: absolute; z-index: 900; right: 12px; bottom: 42px; border: 0; border-radius: 24px; padding: .65rem 1rem; background: #fff; box-shadow: 0 2px 9px #0005; font-weight: 600; }
#map-status { position: absolute; z-index: 900; top: 12px; left: 50%; transform: translateX(-50%); max-width: calc(100% - 100px); border-radius: 5px; padding: .4rem .7rem; background: rgba(255,255,255,.94); box-shadow: 0 1px 5px #0004; color: #495057; font-size: .8rem; text-align: center; }
#mobile-handle { height: 25px; align-items: center; justify-content: center; }
#mobile-handle span { width: 38px; height: 4px; border-radius: 2px; background: #ced4da; }

@media (max-width: 767.98px) {
  #sidebar { position: fixed; width: 100%; height: 68dvh; left: 0; right: 0; bottom: 0; border: 0; border-radius: 16px 16px 0 0; box-shadow: 0 -4px 18px #0003; transform: translateY(100%); transition: transform .25s ease; padding-bottom: env(safe-area-inset-bottom); }
  #sidebar.panel-open { transform: translateY(0); }
  #mobile-handle { display: flex !important; cursor: pointer; }
  #sidebar-inner { height: calc(100% - 25px); padding-top: .4rem; }
  #map { width: 100%; flex: 0 0 100%; }
}
