    * { box-sizing: border-box; margin: 0; padding: 0; }

    body {
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
      height: 100vh;
      overflow: hidden;
      background: #f5f5f5;
    }

    /* Header */
    .header {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      height: 60px;
      background: white;
      box-shadow: 0 2px 8px rgba(0,0,0,0.1);
      z-index: 1000;
      display: flex;
      align-items: center;
      padding: 0 16px;
      gap: 12px;
    }

    .logo {
      font-weight: 800;
      font-size: 20px;
      color: #0066ff;
      white-space: nowrap;
      display: flex;
      align-items: center;
      gap: 8px;
    }

    .logo-icon {
      font-size: 24px;
    }

    .beta-badge {
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      color: white;
      font-size: 10px;
      padding: 2px 6px;
      border-radius: 4px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.5px;
    }

    .search-bar {
      flex: 1;
      max-width: 500px;
      position: relative;
    }

    .search-input {
      width: 100%;
      padding: 10px 100px 10px 14px;
      border: 2px solid #e0e0e0;
      border-radius: 8px;
      font-size: 15px;
      outline: none;
      transition: all 0.2s;
    }

    .search-input:focus {
      border-color: #0066ff;
      box-shadow: 0 0 0 3px rgba(0, 102, 255, 0.1);
    }

    .search-input::placeholder {
      color: #999;
    }

    .locate-btn {
      position: absolute;
      right: 8px;
      top: 50%;
      transform: translateY(-50%);
      background: #0066ff;
      color: white;
      border: none;
      padding: 6px 12px;
      border-radius: 6px;
      cursor: pointer;
      font-size: 13px;
      font-weight: 600;
      transition: all 0.2s;
      display: flex;
      align-items: center;
      gap: 4px;
    }

    .locate-btn:hover {
      background: #0052cc;
      transform: translateY(-50%) scale(1.05);
    }

    .locate-btn:disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }

    .header-actions {
      display: flex;
      gap: 8px;
      margin-left: auto;
    }

    .text-btn {
      background: #f5f5f5;
      border: none;
      height: 40px;
      padding: 0 12px;
      border-radius: 8px;
      font-weight: 600;
      font-size: 14px;
      cursor: pointer;
      color: #111827;
    }

    .text-btn:hover {
      background: #e5e7eb;
    }

    .more-wrap {
      position: relative;
    }

    .more-menu {
      position: absolute;
      top: 46px;
      right: 0;
      background: #fff;
      border: 1px solid #e5e7eb;
      border-radius: 10px;
      box-shadow: 0 8px 24px rgba(15, 23, 42, 0.12);
      min-width: 190px;
      z-index: 1100;
      padding: 6px;
    }

    .more-menu[hidden] {
      display: none;
    }

    .more-menu button {
      display: block;
      width: 100%;
      text-align: left;
      background: transparent;
      border: 0;
      padding: 10px 12px;
      border-radius: 8px;
      font: inherit;
      font-size: 14px;
      cursor: pointer;
      color: #111827;
    }

    .more-menu button:hover {
      background: #f3f4f6;
    }

    .more-menu button[hidden] {
      display: none;
    }

    .icon-btn {
      background: #f5f5f5;
      border: none;
      width: 40px;
      height: 40px;
      border-radius: 8px;
      cursor: pointer;
      font-size: 18px;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.2s;
      position: relative;
    }

    .icon-btn:hover {
      background: #e0e0e0;
      transform: scale(1.05);
    }

    .icon-btn.active {
      background: #0066ff;
      color: white;
    }

    .keyboard-hint {
      position: absolute;
      top: -24px;
      right: 0;
      background: #333;
      color: white;
      font-size: 10px;
      padding: 2px 6px;
      border-radius: 4px;
      white-space: nowrap;
      opacity: 0;
      transition: opacity 0.2s;
      pointer-events: none;
    }

    .icon-btn:hover .keyboard-hint {
      opacity: 1;
    }

    /* Favorites Section */
    .favorites-container {
      position: fixed;
      top: 70px;
      left: 16px;
      right: 16px;
      background: white;
      border-radius: 12px;
      padding: 12px;
      box-shadow: 0 2px 12px rgba(0,0,0,0.1);
      z-index: 999;
      max-width: 600px;
      margin: 0 auto;
      display: none;
    }

    .favorites-container.visible {
      display: block;
    }

    .favorites-header {
      display: flex;
      justify-content: space-between;
      align-items: center;
      margin-bottom: 8px;
    }

    .favorites-title {
      font-weight: 700;
      font-size: 14px;
      color: #333;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .favorites-clear {
      background: none;
      border: none;
      color: #666;
      font-size: 12px;
      cursor: pointer;
      padding: 4px 8px;
      border-radius: 4px;
    }

    .favorites-clear:hover {
      background: #f5f5f5;
      color: #333;
    }

    .favorites-list {
      display: flex;
      flex-direction: column;
      gap: 6px;
    }

    .favorite-item {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 10px;
      background: #f9f9f9;
      border-radius: 8px;
      cursor: pointer;
      transition: all 0.2s;
    }

    .favorite-item:hover {
      background: #f0f0f0;
      transform: translateX(2px);
    }

    .favorite-item-icon {
      font-size: 20px;
    }

    .favorite-item-details {
      flex: 1;
    }

    .favorite-item-name {
      font-weight: 600;
      font-size: 14px;
      color: #333;
    }

    .favorite-item-indicator {
      font-size: 12px;
      color: #666;
    }

    .favorite-item-remove {
      background: none;
      border: none;
      color: #999;
      font-size: 18px;
      cursor: pointer;
      padding: 4px;
      line-height: 1;
      opacity: 0;
      transition: all 0.2s;
    }

    .favorite-item:hover .favorite-item-remove {
      opacity: 1;
    }

    .favorite-item-remove:hover {
      color: #ef4444;
      transform: scale(1.1);
    }

    .favorites-empty {
      text-align: center;
      padding: 20px;
      color: #999;
      font-size: 14px;
    }

    /* Nearby Stops */
    .nearby-stop-card {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 12px;
      background: #f9f9f9;
      border-radius: 8px;
      cursor: pointer;
      transition: all 0.2s;
      border: 1px solid #e5e7eb;
    }

    .nearby-stop-card:hover {
      background: #f0f0f0;
      transform: translateX(2px);
      border-color: #0066ff;
    }

    .nearby-stop-icon {
      font-size: 24px;
    }

    .nearby-stop-details {
      flex: 1;
    }

    .nearby-stop-name {
      font-weight: 600;
      font-size: 14px;
      color: #333;
      margin-bottom: 2px;
    }

    .nearby-stop-indicator {
      font-size: 12px;
      color: #666;
      margin-bottom: 4px;
    }

    .nearby-stop-distance {
      display: flex;
      gap: 12px;
      font-size: 12px;
      color: #999;
    }

    .nearby-stop-arrow {
      font-size: 20px;
      color: #ccc;
    }

    /* Service Disruptions */
    .disruptions-banner {
      background: #fef3c7;
      border: 1px solid #fbbf24;
      border-radius: 8px;
      margin-bottom: 16px;
      overflow: hidden;
    }

    .disruptions-header {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 12px;
      cursor: pointer;
      user-select: none;
    }

    .disruptions-icon {
      font-size: 18px;
    }

    .disruptions-title {
      flex: 1;
      font-weight: 600;
      font-size: 14px;
      color: #92400e;
    }

    .disruptions-toggle {
      background: none;
      border: none;
      color: #92400e;
      font-size: 12px;
      cursor: pointer;
      padding: 4px 8px;
      border-radius: 4px;
      transition: background 0.2s;
    }

    .disruptions-toggle:hover {
      background: rgba(0, 0, 0, 0.05);
    }

    .disruptions-list {
      border-top: 1px solid #fbbf24;
      padding: 8px;
    }

    .disruption-item {
      display: flex;
      gap: 10px;
      padding: 10px;
      background: white;
      border-radius: 6px;
      margin-bottom: 8px;
    }

    .disruption-item:last-child {
      margin-bottom: 0;
    }

    .disruption-severity {
      padding: 4px 8px;
      border-radius: 4px;
      font-size: 11px;
      font-weight: 600;
      color: white;
      height: fit-content;
      white-space: nowrap;
    }

    .disruption-content {
      flex: 1;
    }

    .disruption-service {
      font-weight: 600;
      font-size: 13px;
      color: #333;
      margin-bottom: 4px;
    }

    .disruption-description {
      font-size: 12px;
      color: #666;
      line-height: 1.4;
    }

    .disruption-info {
      font-size: 11px;
      color: #999;
      margin-top: 4px;
      font-style: italic;
    }

    /* Journey Planner */
    .journey-modal {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.7);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 3000;
      padding: 16px;
    }

    .journey-modal-content {
      background: white;
      border-radius: 12px;
      width: 100%;
      max-width: 500px;
      max-height: 90vh;
      overflow-y: auto;
      box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    }

    .journey-modal-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 16px 20px;
      border-bottom: 1px solid #e5e7eb;
    }

    .journey-modal-header h2 {
      margin: 0;
      font-size: 18px;
      font-weight: 600;
    }

    .journey-close {
      background: none;
      border: none;
      font-size: 28px;
      color: #999;
      cursor: pointer;
      padding: 0;
      width: 32px;
      height: 32px;
      line-height: 1;
    }

    .journey-close:hover {
      color: #333;
    }

    .journey-modal-body {
      padding: 20px;
    }

    .journey-input-group {
      margin-bottom: 16px;
      position: relative;
    }

    .journey-input-group label {
      display: block;
      font-size: 14px;
      font-weight: 600;
      color: #333;
      margin-bottom: 6px;
    }

    .journey-input {
      width: 100%;
      padding: 12px;
      border: 2px solid #e5e7eb;
      border-radius: 8px;
      font-size: 14px;
      transition: border-color 0.2s;
    }

    .journey-input:focus {
      outline: none;
      border-color: #0066ff;
    }

    .journey-results {
      position: absolute;
      top: 100%;
      left: 0;
      right: 0;
      background: white;
      border: 1px solid #e5e7eb;
      border-radius: 8px;
      margin-top: 4px;
      max-height: 200px;
      overflow-y: auto;
      z-index: 10;
      box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    }

    .journey-result-item {
      padding: 10px 12px;
      cursor: pointer;
      transition: background 0.2s;
      border-bottom: 1px solid #f3f4f6;
    }

    .journey-result-item:last-child {
      border-bottom: none;
    }

    .journey-result-item:hover {
      background: #f9fafb;
    }

    .journey-result-name {
      font-size: 14px;
      font-weight: 600;
      color: #333;
    }

    .journey-result-indicator {
      font-size: 12px;
      color: #666;
      margin-top: 2px;
    }

    .journey-no-results {
      padding: 12px;
      text-align: center;
      color: #999;
      font-size: 13px;
    }

    .journey-swap {
      text-align: center;
      font-size: 20px;
      color: #666;
      cursor: pointer;
      margin: 8px 0;
      user-select: none;
    }

    .journey-swap:hover {
      color: #0066ff;
    }

    .journey-search-btn {
      width: 100%;
      padding: 14px;
      background: linear-gradient(135deg, #0066ff 0%, #0052cc 100%);
      color: white;
      border: none;
      border-radius: 8px;
      font-size: 15px;
      font-weight: 600;
      cursor: pointer;
      margin-top: 16px;
      transition: transform 0.2s;
    }

    .journey-search-btn:hover {
      transform: translateY(-1px);
    }

    .journey-results-container {
      margin-top: 20px;
    }

    .journey-routes-title {
      font-size: 14px;
      font-weight: 600;
      color: #333;
      margin-bottom: 12px;
    }

    .journey-route-card {
      background: #f9fafb;
      border: 1px solid #e5e7eb;
      border-radius: 8px;
      margin-bottom: 12px;
      overflow: hidden;
    }

    .journey-route-header {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 12px;
      background: white;
      border-bottom: 1px solid #e5e7eb;
    }

    .journey-route-number {
      font-weight: 600;
      font-size: 13px;
      color: #333;
    }

    .journey-route-time {
      padding: 4px 8px;
      background: #0066ff;
      color: white;
      border-radius: 4px;
      font-size: 12px;
      font-weight: 600;
    }

    .journey-route-transfers {
      font-size: 12px;
      color: #666;
      margin-left: auto;
    }

    .journey-route-legs {
      padding: 12px;
    }

    .journey-leg {
      display: flex;
      gap: 10px;
      margin-bottom: 12px;
      padding-bottom: 12px;
      border-bottom: 1px dashed #e5e7eb;
    }

    .journey-leg:last-child {
      margin-bottom: 0;
      padding-bottom: 0;
      border-bottom: none;
    }

    .journey-leg-icon {
      font-size: 20px;
    }

    .journey-leg-details {
      flex: 1;
    }

    .journey-leg-mode {
      font-weight: 600;
      font-size: 13px;
      color: #333;
      margin-bottom: 2px;
    }

    .journey-leg-info {
      font-size: 12px;
      color: #666;
      margin-bottom: 2px;
    }

    .journey-leg-duration {
      font-size: 11px;
      color: #999;
    }

    .journey-loading {
      text-align: center;
      padding: 20px;
      color: #666;
    }

    .journey-error {
      background: #fee2e2;
      border: 1px solid #fca5a5;
      color: #991b1b;
      padding: 12px;
      border-radius: 6px;
      text-align: center;
      font-size: 13px;
    }

    .journey-no-routes {
      text-align: center;
      padding: 20px;
      color: #666;
      font-size: 13px;
    }

    /* Map Container */
    #map {
      position: fixed;
      top: 60px;
      left: 0;
      right: 0;
      bottom: 0;
      z-index: 1;
    }

    /* Onboarding Overlay */
    .onboarding {
      position: fixed;
      inset: 0;
      background: rgba(0, 0, 0, 0.9);
      z-index: 2000;
      display: none;
      align-items: center;
      justify-content: center;
      animation: fadeIn 0.3s ease;
    }

    .onboarding.show {
      display: flex;
    }

    @keyframes fadeIn {
      from { opacity: 0; }
      to { opacity: 1; }
    }

    .onboarding-content {
      background: white;
      border-radius: 16px;
      max-width: 500px;
      width: 90%;
      padding: 32px;
      text-align: center;
      animation: slideUp 0.4s ease;
    }

    @keyframes slideUp {
      from { transform: translateY(30px); opacity: 0; }
      to { transform: translateY(0); opacity: 1; }
    }

    .onboarding-icon {
      font-size: 64px;
      margin-bottom: 16px;
    }

    .onboarding-title {
      font-size: 28px;
      font-weight: 800;
      color: #0066ff;
      margin-bottom: 12px;
    }

    .onboarding-text {
      font-size: 16px;
      color: #666;
      line-height: 1.6;
      margin-bottom: 24px;
    }

    .onboarding-features {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 16px;
      margin-bottom: 24px;
      text-align: left;
    }

    .feature-item {
      display: flex;
      align-items: start;
      gap: 8px;
    }

    .feature-icon {
      font-size: 20px;
      flex-shrink: 0;
    }

    .feature-text {
      font-size: 13px;
      color: #333;
    }

    .onboarding-btn {
      background: linear-gradient(135deg, #0066ff 0%, #0052cc 100%);
      color: white;
      border: none;
      padding: 14px 32px;
      border-radius: 8px;
      font-size: 16px;
      font-weight: 600;
      cursor: pointer;
      width: 100%;
      transition: transform 0.2s;
    }

    .onboarding-btn:hover {
      transform: scale(1.02);
    }

    /* Side Panel */
    .side-panel {
      position: fixed;
      top: 60px;
      right: 0;
      width: min(540px, 46vw);
      height: calc(100vh - 60px);
      background: white;
      box-shadow: -2px 0 12px rgba(0,0,0,0.1);
      z-index: 1001;
      transform: translateX(100%);
      transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      overflow-y: auto;
      display: flex;
      flex-direction: column;
    }

    .side-panel.open {
      transform: translateX(0);
    }

    .panel-header {
      padding: 20px;
      border-bottom: 1px solid #f0f0f0;
      background: linear-gradient(180deg, #fafafa 0%, white 100%);
      position: sticky;
      top: 0;
      z-index: 10;
    }

    .panel-title {
      font-size: 20px;
      font-weight: 700;
      color: #333;
      margin-bottom: 6px;
      padding-right: 40px;
      display: flex;
      align-items: center;
      gap: 8px;
      line-height: 1.25;
    }

    .favorite-btn {
      background: none;
      border: none;
      font-size: 20px;
      cursor: pointer;
      padding: 4px;
      line-height: 1;
      opacity: 0.6;
      transition: all 0.2s ease;
    }

    .favorite-btn:hover {
      opacity: 1;
      transform: scale(1.1);
    }

    .favorite-btn.favorited {
      opacity: 1;
    }

    .panel-subtitle {
      font-size: 14px;
      color: #666;
      display: flex;
      align-items: center;
      gap: 6px;
    }

    .panel-actions {
      display: flex;
      gap: 8px;
      margin-top: 12px;
    }

    .panel-btn {
      background: #f5f5f5;
      border: none;
      padding: 8px 14px;
      border-radius: 6px;
      font-size: 13px;
      font-weight: 500;
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 6px;
      transition: all 0.2s;
    }

    .panel-btn:hover {
      background: #e0e0e0;
    }

    .panel-btn.primary {
      background: #0066ff;
      color: white;
    }

    .panel-btn.primary:hover {
      background: #0052cc;
    }

    .close-panel {
      position: absolute;
      top: 20px;
      right: 20px;
      background: none;
      border: none;
      font-size: 24px;
      cursor: pointer;
      color: #999;
      padding: 0;
      width: 32px;
      height: 32px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: all 0.2s;
    }

    .close-panel:hover {
      background: #f0f0f0;
      color: #333;
      transform: scale(1.1);
    }

    .panel-content {
      padding: 22px 24px 28px;
      flex: 1;
    }

    /* Refresh Indicator */
    .refresh-indicator {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-size: 12px;
      color: #00c853;
      margin-top: 8px;
      padding: 4px 10px;
      background: #e8f5e9;
      border-radius: 12px;
    }

    .refresh-dot {
      width: 6px;
      height: 6px;
      background: #00c853;
      border-radius: 50%;
      animation: pulse 2s ease-in-out infinite;
    }

    @keyframes pulse {
      0%, 100% { opacity: 1; transform: scale(1); }
      50% { opacity: 0.4; transform: scale(1.2); }
    }

    /* Panel Tabs */
    .panel-tabs {
      display: flex;
      border-bottom: 2px solid #f0f0f0;
      background: white;
      position: sticky;
      top: 0;
      z-index: 10;
    }

    .panel-tab {
      flex: 1;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 6px;
      padding: 12px 6px;
      border: none;
      background: none;
      cursor: pointer;
      font-size: 13px;
      font-weight: 500;
      color: #666;
      transition: all 0.2s;
      border-bottom: 3px solid transparent;
    }

    .panel-tab:hover {
      background: #f9f9f9;
      color: #333;
    }

    .panel-tab.active {
      color: #0066ff;
      border-bottom-color: #0066ff;
      background: white;
    }

    .panel-tab span:first-child {
      font-size: 18px;
    }

    /* Live Map Container */
    .panel-map-container {
      flex: 1;
      position: relative;
      overflow: hidden;
    }

    #liveMap {
      width: 100%;
      height: 100%;
    }

    /* Departure Table */
    .departures-table {
      width: 100%;
      border-collapse: separate;
      border-spacing: 0 8px;
      table-layout: auto;
    }

    .departures-table thead {
      position: sticky;
      top: 0;
      background: white;
      z-index: 5;
    }

    .departures-table th {
      text-align: left;
      padding: 12px 8px;
      font-size: 11px;
      text-transform: uppercase;
      color: #999;
      font-weight: 600;
      letter-spacing: 0.5px;
    }

    .departures-table tbody tr {
      background: #fafafa;
      border-radius: 8px;
      transition: all 0.2s;
    }

    .departures-table tbody tr:hover {
      background: #f0f0f0;
      transform: translateX(2px);
    }

    .departures-table td {
      padding: 16px 10px;
      font-size: 15px;
      vertical-align: top;
    }

    .departures-table tbody tr td:first-child {
      border-radius: 8px 0 0 8px;
    }

    .departures-table tbody tr td:last-child {
      border-radius: 0 8px 8px 0;
      text-align: center;
    }

    .departures-table .route-cell {
      width: 1%;
      white-space: nowrap;
      padding-right: 6px;
    }

    .departures-table .destination {
      width: 99%;
    }

    .departures-table .time {
      width: 1%;
      white-space: nowrap;
      text-align: right;
      padding-left: 14px;
    }

    .departures-table .track-cell {
      width: 36px;
      padding-left: 4px;
      padding-right: 8px;
    }

    .dep-status {
      margin-top: 6px;
    }

    .track-btn {
      background: none;
      border: none;
      font-size: 16px;
      cursor: pointer;
      padding: 4px 8px;
      opacity: 0.5;
      transition: all 0.2s ease;
    }

    .track-btn:hover {
      opacity: 1;
      transform: scale(1.2);
    }

    .service-number {
      display: inline-block;
      background: linear-gradient(135deg, #0066ff 0%, #0052cc 100%);
      color: white;
      padding: 6px 12px;
      border-radius: 6px;
      font-weight: 700;
      font-size: 14px;
      min-width: 45px;
      text-align: center;
      box-shadow: 0 2px 4px rgba(0, 102, 255, 0.2);
    }

    .destination {
      font-weight: 500;
      color: #333;
      line-height: 1.4;
    }

    .dest-name {
      display: block;
      font-size: 16px;
      font-weight: 600;
      line-height: 1.3;
    }

    .dep-chips {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 6px;
      margin-top: 8px;
    }

    .dep-chips .last-badge {
      margin-left: 0;
    }

    .operator {
      display: block;
      font-size: 11px;
      color: #6b7280;
      font-weight: 500;
      margin-top: 2px;
    }

    .calling-at {
      display: inline-block;
      margin-top: 4px;
      padding: 0;
      border: 0;
      background: none;
      color: #2563eb;
      font: inherit;
      font-size: 12px;
      font-weight: 600;
      cursor: pointer;
    }

    .calling-at:hover { text-decoration: underline; }

    .departures-table tbody tr.trip-stops-row td,
    .departures-table tbody tr.trip-stops-row td:last-child {
      background: #eff6ff;
      border-radius: 8px;
      padding: 12px 14px;
      text-align: left;
    }

    .trip-stops {
      font-size: 15px;
      color: #1e3a8a;
      line-height: 1.35;
      text-align: left;
    }

    .trip-stops-label {
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      color: #64748b;
      margin-bottom: 6px;
    }

    .trip-stops-list {
      list-style: none;
      margin: 0;
      padding: 0;
      max-width: 340px;
      max-height: min(58vh, 480px);
      overflow-y: auto;
    }

    .trip-stop {
      display: grid;
      grid-template-columns: 14px minmax(0, 1fr) auto;
      column-gap: 10px;
      align-items: center;
      position: relative;
      padding: 8px 0;
      min-height: 36px;
    }

    .trip-stop:not(:last-child)::before {
      content: '';
      position: absolute;
      left: 6px;
      top: 26px;
      bottom: -8px;
      width: 2px;
      background: #93c5fd;
    }

    .trip-stop-rail {
      width: 10px;
      height: 10px;
      border-radius: 50%;
      background: #fff;
      border: 2px solid #2563eb;
      justify-self: center;
      z-index: 1;
    }

    .trip-stop-name {
      min-width: 0;
      color: #1e3a8a;
      font-weight: 600;
      text-align: left;
    }

    .trip-stop-name a {
      color: inherit;
      text-decoration: none;
    }

    .trip-stop-name a:hover {
      text-decoration: underline;
    }

    .trip-stop .tt-time {
      flex-shrink: 0;
      font-size: 13px;
      font-weight: 700;
      background: #fff;
      color: #1d4ed8;
    }

    .trip-stop-end .trip-stop-rail {
      background: #2563eb;
    }

    .trip-stop-end .trip-stop-name {
      font-weight: 700;
    }

    .trip-stops a {
      color: #1d4ed8;
      text-decoration: none;
    }

    .timetable-block {
      padding: 12px 0;
      border-bottom: 1px solid #f3f4f6;
    }

    .timetable-head {
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      gap: 8px;
      margin-bottom: 4px;
    }

    .timetable-head .service-number {
      margin-right: 8px;
    }

    .timetable-hours {
      font-size: 12px;
      color: #6b7280;
      margin-bottom: 8px;
    }

    .timetable-times {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
    }

    .tt-time {
      font-size: 12px;
      font-variant-numeric: tabular-nums;
      padding: 3px 6px;
      border-radius: 4px;
      background: #f3f4f6;
      color: #111827;
    }

    .tt-time.past {
      color: #9ca3af;
      background: transparent;
    }

    .tt-time.next {
      background: #dbeafe;
      color: #1d4ed8;
      font-weight: 700;
    }

    .time {
      font-weight: 600;
      color: #0066ff;
      font-variant-numeric: tabular-nums;
    }

    .time.due {
      color: #ff6b35;
      animation: blink 1.5s ease-in-out infinite;
    }

    @keyframes blink {
      0%, 100% { opacity: 1; }
      50% { opacity: 0.6; }
    }

    .time.live {
      color: #00c853;
    }

    .status-badge {
      display: inline-block;
      padding: 4px 10px;
      border-radius: 12px;
      font-size: 11px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.3px;
    }

    .status-badge.live {
      background: #e8f5e9;
      color: #2e7d32;
    }

    .status-badge.scheduled {
      background: #e3f2fd;
      color: #1565c0;
    }

    .status-badge.delayed {
      background: #fff3e0;
      color: #e65100;
    }

    /* Empty State */
    .empty-state {
      text-align: center;
      padding: 60px 20px;
    }

    .empty-state-icon {
      font-size: 64px;
      margin-bottom: 16px;
      opacity: 0.3;
    }

    .empty-state-title {
      font-size: 18px;
      font-weight: 600;
      color: #333;
      margin-bottom: 8px;
    }

    .empty-state-text {
      font-size: 14px;
      color: #999;
      line-height: 1.6;
    }

    /* Loading Skeleton */
    .loading-skeleton {
      padding: 20px;
    }

    .skeleton-line {
      height: 60px;
      background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
      background-size: 200% 100%;
      animation: shimmer 1.5s infinite;
      border-radius: 8px;
      margin-bottom: 12px;
    }

    @keyframes shimmer {
      0% { background-position: -200% 0; }
      100% { background-position: 200% 0; }
    }

    /* Error Message */
    .error-message {
      background: #ffebee;
      color: #c62828;
      padding: 16px;
      border-radius: 8px;
      font-size: 14px;
      display: flex;
      align-items: start;
      gap: 12px;
      border-left: 4px solid #d32f2f;
    }

    .error-icon {
      font-size: 20px;
      flex-shrink: 0;
    }

    .error-content {
      flex: 1;
    }

    .error-title {
      font-weight: 600;
      margin-bottom: 4px;
    }

    .error-text {
      font-size: 13px;
      opacity: 0.9;
    }

    .error-action {
      margin-top: 12px;
    }

    .error-btn {
      background: #d32f2f;
      color: white;
      border: none;
      padding: 8px 14px;
      border-radius: 6px;
      font-size: 13px;
      font-weight: 500;
      cursor: pointer;
    }

    /* Route Modal */
    .route-modal {
      position: fixed;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      background: rgba(0, 0, 0, 0.5);
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 10000;
      backdrop-filter: blur(4px);
      animation: fadeIn 0.2s ease-out;
    }

    @keyframes fadeIn {
      from { opacity: 0; }
      to { opacity: 1; }
    }

    .route-modal-content {
      background: white;
      border-radius: 12px;
      width: 96vw;
      height: 94vh;
      max-width: none;
      max-height: none;
      overflow: hidden;
      display: flex;
      flex-direction: column;
      box-shadow: 0 20px 60px rgba(0,0,0,0.3);
      animation: slideUp 0.3s ease-out;
    }

    @keyframes slideUp {
      from {
        transform: translateY(30px);
        opacity: 0;
      }
      to {
        transform: translateY(0);
        opacity: 1;
      }
    }

    .route-modal-header {
      padding: 20px;
      border-bottom: 1px solid #e5e7eb;
      display: flex;
      align-items: center;
      justify-content: space-between;
      background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
      color: white;
    }

    .route-modal-title {
      font-size: 20px;
      font-weight: 700;
      margin: 0;
    }

    .route-modal-close {
      background: rgba(255, 255, 255, 0.2);
      border: none;
      color: white;
      font-size: 24px;
      width: 36px;
      height: 36px;
      border-radius: 50%;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
      transition: background 0.2s;
    }

    .route-modal-close:hover {
      background: rgba(255, 255, 255, 0.3);
    }

    .route-modal-body {
      flex: 1;
      overflow: hidden;
      display: flex;
      flex-direction: row;
    }

    .route-modal-left {
      flex: 1;
      overflow-y: auto;
      padding: 20px;
      border-right: 1px solid #e5e7eb;
      min-height: 0;
    }

    .route-modal-right {
      flex: 1.35;
      position: relative;
      min-height: 0;
    }

    .route-map {
      width: 100%;
      height: 100%;
      min-height: 0;
    }

    @media (max-width: 768px) {
      .route-modal {
        padding: 0;
      }

      .route-modal-content {
        width: 100%;
        height: 100%;
        border-radius: 0;
        animation: none;
      }

      .route-modal-header {
        padding: 14px 16px;
      }

      .route-modal-title {
        font-size: 16px;
      }

      .route-modal-body {
        flex-direction: column;
      }

      .route-modal-right {
        flex: 0 0 48%;
        min-height: 48%;
        order: -1;
      }

      .route-modal-left {
        flex: 1;
        border-right: none;
        border-top: 1px solid #e5e7eb;
        padding: 16px;
      }

      .route-map {
        height: 100%;
        min-height: 0;
      }
    }

    .route-info {
      background: #f9fafb;
      padding: 16px;
      border-radius: 8px;
      margin-bottom: 20px;
    }

    .route-info-label {
      font-size: 12px;
      color: #6b7280;
      text-transform: uppercase;
      font-weight: 600;
      letter-spacing: 0.5px;
      margin-bottom: 4px;
    }

    .route-info-value {
      font-size: 16px;
      color: #111827;
      font-weight: 500;
    }

    .route-stops-list {
      list-style: none;
      padding: 0;
      margin: 0;
    }

    .route-stop-item {
      display: flex;
      align-items: center;
      padding: 12px;
      border-radius: 8px;
      margin-bottom: 8px;
      transition: background 0.2s;
      position: relative;
    }

    .route-stop-item:hover {
      background: #f0f4ff;
      cursor: pointer;
      border-left: 3px solid #667eea;
      padding-left: 9px;
    }

    .route-stop-item::before {
      content: '';
      position: absolute;
      left: 19px;
      top: 36px;
      bottom: -8px;
      width: 2px;
      background: #e5e7eb;
    }

    .route-stop-item:last-child::before {
      display: none;
    }

    .route-stop-marker {
      width: 24px;
      height: 24px;
      border-radius: 50%;
      background: white;
      border: 3px solid #667eea;
      flex-shrink: 0;
      margin-right: 12px;
      z-index: 1;
    }

    .route-stop-marker.first {
      background: #10b981;
      border-color: #10b981;
    }

    .route-stop-marker.last {
      background: #ef4444;
      border-color: #ef4444;
    }

    .route-stop-info {
      flex: 1;
    }

    .route-stop-name {
      font-size: 14px;
      font-weight: 600;
      color: #111827;
      margin-bottom: 2px;
    }

    .route-stop-code {
      font-size: 12px;
      color: #6b7280;
    }

    .service-number {
      cursor: pointer;
      text-decoration: underline;
      text-decoration-style: dotted;
      text-underline-offset: 2px;
    }

    .service-number:hover {
      color: #667eea;
    }

    /* Recent Searches */
    .recent-searches {
      position: absolute;
      top: 100%;
      left: 0;
      right: 0;
      background: white;
      border-radius: 0 0 8px 8px;
      box-shadow: 0 4px 12px rgba(0,0,0,0.1);
      margin-top: 4px;
      max-height: 300px;
      overflow-y: auto;
      display: none;
    }

    .recent-searches.show {
      display: block;
    }

    .recent-header {
      padding: 12px 14px;
      font-size: 11px;
      text-transform: uppercase;
      color: #999;
      font-weight: 600;
      letter-spacing: 0.5px;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .clear-recent {
      color: #0066ff;
      cursor: pointer;
      text-transform: none;
      font-weight: 500;
    }

    .clear-recent:hover {
      text-decoration: underline;
    }

    .recent-item {
      padding: 12px 14px;
      cursor: pointer;
      display: flex;
      align-items: center;
      gap: 10px;
      transition: background 0.2s;
      border-top: 1px solid #f5f5f5;
    }

    .recent-item:hover {
      background: #f5f5f5;
    }

    .recent-icon {
      color: #999;
      font-size: 16px;
    }

    .recent-text {
      flex: 1;
      font-size: 14px;
      color: #333;
    }

    /* Toast Notification */
    .toast {
      position: fixed;
      bottom: 24px;
      left: 50%;
      transform: translateX(-50%);
      background: #333;
      color: white;
      padding: 14px 20px;
      border-radius: 8px;
      box-shadow: 0 4px 12px rgba(0,0,0,0.3);
      z-index: 2000;
      opacity: 0;
      transition: opacity 0.3s;
      pointer-events: none;
      display: flex;
      align-items: center;
      gap: 10px;
      max-width: 90%;
    }

    .toast.show {
      opacity: 1;
    }

    .toast.error {
      background: #d32f2f;
    }

    .toast.success {
      background: #388e3c;
    }

    .toast-icon {
      font-size: 20px;
    }

    /* Help Panel */
    .help-panel {
      position: fixed;
      top: 60px;
      right: 0;
      width: 350px;
      height: calc(100vh - 60px);
      background: white;
      box-shadow: -2px 0 12px rgba(0,0,0,0.1);
      z-index: 1002;
      transform: translateX(100%);
      transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
      overflow-y: auto;
      padding: 24px;
    }

    .help-panel.open {
      transform: translateX(0);
    }

    .help-title {
      font-size: 20px;
      font-weight: 700;
      margin-bottom: 20px;
      color: #0066ff;
    }

    .help-section {
      margin-bottom: 24px;
    }

    .help-section-title {
      font-size: 14px;
      font-weight: 600;
      text-transform: uppercase;
      color: #999;
      margin-bottom: 12px;
      letter-spacing: 0.5px;
    }

    .help-item {
      display: flex;
      gap: 12px;
      margin-bottom: 16px;
    }

    .help-item-icon {
      font-size: 20px;
      flex-shrink: 0;
    }

    .help-item-content {
      flex: 1;
    }

    .help-item-title {
      font-size: 14px;
      font-weight: 600;
      margin-bottom: 4px;
      color: #333;
    }

    .help-item-text {
      font-size: 13px;
      color: #666;
      line-height: 1.5;
    }

    .keyboard-shortcuts {
      background: #f5f5f5;
      padding: 12px;
      border-radius: 8px;
      font-size: 12px;
    }

    .shortcut {
      display: flex;
      justify-content: space-between;
      padding: 6px 0;
    }

    .shortcut-key {
      background: white;
      padding: 2px 8px;
      border-radius: 4px;
      font-family: monospace;
      border: 1px solid #ddd;
    }

    /* Active stop marker */
    .bus-stop-marker.active-stop {
      background: #ff6b35;
      box-shadow: 0 3px 12px rgba(255, 107, 53, 0.7);
    }

    /* Route Filter */
    .route-filter {
      display: flex;
      gap: 6px;
      flex-wrap: wrap;
      margin-bottom: 12px;
    }

    .route-filter-btn {
      background: #f0f0f0;
      border: none;
      padding: 4px 12px;
      border-radius: 12px;
      font-size: 12px;
      font-weight: 600;
      cursor: pointer;
      transition: all 0.15s;
    }

    .route-filter-btn.active {
      background: #0066ff;
      color: white;
    }

    .route-filter-btn:hover:not(.active) {
      background: #e0e0e0;
    }

    /* Custom Leaflet Marker */
    .bus-stop-marker {
      background: #0066ff;
      color: white;
      border: 3px solid white;
      border-radius: 50%;
      width: 36px;
      height: 36px;
      display: flex;
      align-items: center;
      justify-content: center;
      font-size: 20px;
      box-shadow: 0 3px 10px rgba(0, 102, 255, 0.4);
      cursor: pointer;
      transition: all 0.2s;
    }

    .bus-stop-marker:hover {
      transform: scale(1.15);
      box-shadow: 0 5px 15px rgba(0, 102, 255, 0.6);
    }

    /* Mobile Responsive */
    @media (max-width: 768px) {
      .logo span {
        display: none;
      }

      .beta-badge {
        display: none;
      }

      .side-panel, .help-panel {
        width: 100%;
        height: 60vh;
        top: auto;
        bottom: 0;
        transform: translateY(100%);
      }

      .side-panel.open, .help-panel.open {
        transform: translateY(0);
      }

      .panel-header {
        border-bottom: 4px solid #f0f0f0;
      }

      .search-bar {
        max-width: none;
      }

      .onboarding-content {
        padding: 24px;
      }

      .onboarding-features {
        grid-template-columns: 1fr;
      }

      .text-btn {
        padding: 0 10px;
        font-size: 13px;
      }
    }

    /* Accessibility */
    .sr-only {
      position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      margin: -1px;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
      white-space: nowrap;
      border-width: 0;
    }

    /* Loading state */
    .map-loading {
      position: absolute;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      text-align: center;
      z-index: 10;
    }

    .map-spinner {
      width: 50px;
      height: 50px;
      border: 4px solid #f0f0f0;
      border-top-color: #0066ff;
      border-radius: 50%;
      animation: spin 0.8s linear infinite;
      margin: 0 auto 12px;
    }

    @keyframes spin {
      to { transform: rotate(360deg); }
    }

    .map-loading-text {
      font-size: 14px;
      color: #666;
    }

    /* Install Banner */
    .install-banner {
      position: fixed;
      bottom: 20px;
      left: 50%;
      transform: translateX(-50%);
      background: linear-gradient(135deg, #0066ff 0%, #0052cc 100%);
      color: white;
      padding: 16px 20px;
      border-radius: 12px;
      box-shadow: 0 8px 24px rgba(0, 102, 255, 0.3);
      z-index: 1500;
      display: none;
      align-items: center;
      gap: 16px;
      max-width: 90%;
      animation: slideUpBanner 0.4s ease;
    }

    .install-banner.show {
      display: flex;
    }

    @keyframes slideUpBanner {
      from { transform: translateX(-50%) translateY(100px); opacity: 0; }
      to { transform: translateX(-50%) translateY(0); opacity: 1; }
    }

    .install-icon {
      font-size: 32px;
      flex-shrink: 0;
    }

    .install-content {
      flex: 1;
    }

    .install-title {
      font-size: 15px;
      font-weight: 700;
      margin-bottom: 4px;
    }

    .install-text {
      font-size: 13px;
      opacity: 0.9;
    }

    .install-actions {
      display: flex;
      gap: 8px;
      flex-shrink: 0;
    }

    .install-btn-primary {
      background: white;
      color: #0066ff;
      border: none;
      padding: 10px 20px;
      border-radius: 8px;
      font-size: 14px;
      font-weight: 600;
      cursor: pointer;
      transition: transform 0.2s;
    }

    .install-btn-primary:hover {
      transform: scale(1.05);
    }

    .install-btn-dismiss {
      background: rgba(255, 255, 255, 0.2);
      color: white;
      border: none;
      padding: 10px 16px;
      border-radius: 8px;
      font-size: 14px;
      font-weight: 500;
      cursor: pointer;
      transition: background 0.2s;
    }

    .install-btn-dismiss:hover {
      background: rgba(255, 255, 255, 0.3);
    }

    @media (max-width: 768px) {
      .install-banner {
        flex-direction: column;
        text-align: center;
        bottom: 80px;
      }

      .install-actions {
        width: 100%;
      }

      .install-btn-primary, .install-btn-dismiss {
        flex: 1;
      }
    }

    /* Live Tracking Animations */
    @keyframes pulse {
      0%, 100% {
        transform: scale(1);
        opacity: 1;
      }
      50% {
        transform: scale(1.2);
        opacity: 0.7;
      }
    }

    @keyframes blink {
      0%, 100% {
        opacity: 1;
      }
      50% {
        opacity: 0.3;
      }
    }

    .live-tracking-overlay {
      background: rgba(255, 255, 255, 0.97);
      border-radius: 14px;
      padding: 16px 18px;
      box-shadow: 0 10px 28px rgba(0, 0, 0, 0.18);
      width: 320px;
      max-width: calc(100vw - 24px);
      margin: 12px;
      font-family: inherit;
      line-height: 1.35;
    }

    .live-tracking-overlay-title {
      font-weight: 800;
      font-size: 20px;
      color: #111827;
      margin-bottom: 10px;
      letter-spacing: -0.02em;
    }

    .live-tracking-overlay-sub {
      font-size: 12px;
      color: #6b7280;
      margin-top: 8px;
      line-height: 1.4;
    }

    .live-bus-banner {
      background: #ecfdf5;
      color: #047857;
      font-size: 13px;
      font-weight: 600;
      padding: 8px 16px;
      text-align: center;
    }

    .live-tracking-overlay .live-bus-banner {
      text-align: left;
      font-size: 15px;
      font-weight: 600;
      padding: 10px 12px;
      border-radius: 8px;
      line-height: 1.4;
    }

    .live-bus-banner.empty {
      background: #fff7ed;
      color: #c2410c;
    }

    .leaflet-marker-icon.live-bus-marker {
      background: transparent !important;
      border: none !important;
      transition: transform 1s linear;
    }

    .live-bus-pin {
      width: 36px;
      height: 48px;
      position: relative;
    }

    .live-bus-pin-head {
      width: 36px;
      height: 36px;
      background: #16a34a;
      border: 3px solid #fff;
      border-radius: 18px 18px 18px 4px;
      transform: rotate(-45deg);
      box-shadow: 0 4px 12px rgba(22, 163, 74, 0.45);
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .live-bus-pin-head span {
      transform: rotate(45deg);
      color: #fff;
      font-weight: 800;
      font-size: 11px;
      line-height: 1;
    }

    .leaflet-tooltip.live-bus-tooltip {
      background: #fff;
      border: none;
      border-radius: 12px;
      box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
      padding: 0;
      white-space: normal;
      max-width: 300px;
    }

    .live-bus-tooltip::before {
      border-top-color: #fff;
    }

    .live-bus-card {
      min-width: 240px;
      max-width: 300px;
      padding: 12px 14px;
      text-align: left;
    }

    .live-bus-card-top {
      display: flex;
      align-items: baseline;
      justify-content: space-between;
      gap: 10px;
      margin-bottom: 2px;
    }

    .live-bus-card-route {
      font-weight: 800;
      font-size: 18px;
      color: #15803d;
    }

    .live-bus-card-live {
      font-size: 11px;
      font-weight: 700;
      color: #16a34a;
      white-space: nowrap;
    }

    .live-bus-card-name {
      font-size: 12px;
      color: #4b5563;
      margin-bottom: 2px;
    }

    .live-bus-card-dest {
      font-size: 14px;
      font-weight: 600;
      color: #111827;
      margin-bottom: 8px;
    }

    .live-bus-rows {
      display: grid;
      gap: 5px;
    }

    .live-bus-row {
      display: flex;
      justify-content: space-between;
      gap: 12px;
      font-size: 12px;
      line-height: 1.35;
    }

    .live-bus-row span {
      color: #6b7280;
      flex: 0 0 auto;
    }

    .live-bus-row strong {
      color: #111827;
      font-weight: 600;
      text-align: right;
    }

    .live-bus-card-meta {
      font-size: 11px;
      color: #6b7280;
    }

    .panel-actions {
      flex-wrap: wrap;
    }

    .panel-btn.active {
      background: #111827;
      color: #fbbf24;
    }

    .last-badge {
      display: inline-block;
      margin-left: 6px;
      padding: 2px 6px;
      border-radius: 4px;
      background: #7c2d12;
      color: #ffedd5;
      font-size: 10px;
      font-weight: 800;
      letter-spacing: 0.4px;
      vertical-align: middle;
    }

    .dep-time {
      font-weight: 700;
    }

    .leave-now {
      margin-top: 4px;
      font-size: 11px;
      font-weight: 700;
    }

    .leave-now.soon {
      color: #047857;
    }

    .leave-now.now {
      color: #b45309;
    }

    .leave-now.late {
      color: #b91c1c;
    }

    .last-bus-banner {
      background: #111827;
      color: #fde68a;
      padding: 10px 12px;
      border-radius: 8px;
      margin-bottom: 14px;
      font-size: 13px;
      line-height: 1.45;
    }

    .side-panel.night-board {
      background: #0b1220;
      color: #f8fafc;
    }

    .side-panel.night-board .panel-header {
      background: #0b1220;
      border-bottom-color: #1f2937;
    }

    .side-panel.night-board .panel-title,
    .side-panel.night-board .panel-subtitle {
      color: #f8fafc;
    }

    .side-panel.night-board .close-panel {
      color: #e5e7eb;
    }

    .side-panel.night-board .close-panel:hover {
      background: #1f2937;
    }

    .side-panel.night-board .panel-btn {
      background: #1f2937;
      color: #f8fafc;
    }

    .side-panel.night-board .panel-btn.primary {
      background: #2563eb;
    }

    .side-panel.night-board .panel-btn.active {
      background: #fbbf24;
      color: #111827;
    }

    .side-panel.night-board .departures-table thead {
      background: #0b1220;
    }

    .side-panel.night-board .departures-table th {
      color: #94a3b8;
    }

    .side-panel.night-board .departures-table tbody tr {
      background: #111827;
    }

    .side-panel.night-board .departures-table tbody tr:hover {
      background: #1f2937;
    }

    .side-panel.night-board .destination,
    .side-panel.night-board .time {
      color: #f8fafc;
    }

    .side-panel.night-board .operator {
      color: #9ca3af;
    }

    .side-panel.night-board .calling-at {
      color: #93c5fd;
    }

    .side-panel.night-board .trip-stops-row td {
      background: #111827;
    }

    .side-panel.night-board .trip-stops {
      color: #dbeafe;
    }

    .side-panel.night-board .trip-stops-label {
      color: #9ca3af;
    }

    .side-panel.night-board .trip-stop:not(:last-child)::before {
      background: #374151;
    }

    .side-panel.night-board .trip-stop-rail {
      background: #111827;
      border-color: #93c5fd;
    }

    .side-panel.night-board .trip-stop-end .trip-stop-rail {
      background: #93c5fd;
    }

    .side-panel.night-board .trip-stop-name {
      color: #e5e7eb;
    }

    .side-panel.night-board .trip-stop .tt-time {
      background: #1f2937;
      color: #93c5fd;
    }

    .side-panel.night-board .tt-time {
      background: #111827;
      color: #e5e7eb;
    }

    .side-panel.night-board .tt-time.past {
      color: #6b7280;
      background: transparent;
    }

    .side-panel.night-board .timetable-block {
      border-bottom-color: #1f2937;
    }

    .side-panel.night-board .dep-time {
      font-size: 28px;
      line-height: 1.1;
    }

    .side-panel.night-board .leave-now {
      font-size: 14px;
    }

    .side-panel.night-board .leave-now.soon {
      color: #6ee7b7;
    }

    .side-panel.night-board .leave-now.now {
      color: #fbbf24;
    }

    .side-panel.night-board .leave-now.late {
      color: #fca5a5;
    }

    .side-panel.night-board .empty-state-title,
    .side-panel.night-board .empty-state-text {
      color: #e5e7eb;
    }

    .watch-bus-overlay {
      position: fixed;
      inset: 0;
      z-index: 11000;
      background: #070b14;
      color: #f8fafc;
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      text-align: center;
      padding: 32px 24px;
    }

    .watch-bus-overlay[hidden] {
      display: none;
    }

    .watch-bus-close {
      position: absolute;
      top: 18px;
      right: 18px;
      width: 44px;
      height: 44px;
      border: none;
      border-radius: 50%;
      background: #1f2937;
      color: #f8fafc;
      font-size: 28px;
      cursor: pointer;
    }

    .watch-bus-route {
      font-size: 42px;
      font-weight: 800;
      letter-spacing: -0.03em;
    }

    .watch-bus-dest {
      margin-top: 8px;
      font-size: 18px;
      color: #cbd5e1;
    }

    .watch-bus-eta {
      margin-top: 28px;
      font-size: 88px;
      font-weight: 800;
      line-height: 1;
    }

    .watch-bus-clock,
    .watch-bus-hint {
      margin-top: 12px;
      color: #94a3b8;
      font-size: 16px;
    }

    .watch-bus-leave {
      margin-top: 20px;
      font-size: 22px;
      font-weight: 800;
    }

    .watch-bus-leave.soon {
      color: #6ee7b7;
    }

    .watch-bus-leave.now {
      color: #fbbf24;
    }

    .watch-bus-leave.late {
      color: #fca5a5;
    }

    @media (max-width: 768px) {
      .side-panel.night-board,
      .side-panel.night-board.open {
        height: 85vh;
      }

      .watch-bus-eta {
        font-size: 72px;
      }
    }

    .home-dock {
      position: fixed;
      top: 72px;
      left: 12px;
      right: auto;
      bottom: auto;
      z-index: 500;
      width: min(320px, calc(100vw - 24px));
      max-height: min(420px, calc(100vh - 140px));
      overflow: auto;
      background: #fff;
      border: 1px solid #e5e7eb;
      border-radius: 12px;
      padding: 8px;
      box-shadow: 0 10px 28px rgba(15, 23, 42, 0.16);
    }

    .home-dock[hidden] { display: none; }

    .home-dock-title {
      font-size: 11px;
      text-transform: uppercase;
      letter-spacing: 0.06em;
      color: #6b7280;
      font-weight: 700;
      margin: 8px 8px 2px;
    }

    .home-dock-row {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 6px;
      width: 100%;
      text-align: left;
      background: transparent;
      border: 0;
      border-radius: 6px;
      padding: 8px 10px;
      margin: 0;
      cursor: pointer;
      font: inherit;
      font-size: 15px;
      line-height: 1.3;
    }

    .home-dock-row span:first-child {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    .home-dock-row span:last-child {
      flex-shrink: 0;
      color: #9ca3af;
      font-size: 10px;
    }

    .home-dock-row:hover { background: #eef2ff; }

    .seo-content[hidden] { display: none; }

    .seo-content.seo-home {
      position: fixed;
      left: auto;
      right: 12px;
      bottom: 10px;
      z-index: 440;
      width: min(360px, calc(100vw - 24px));
      max-height: none;
      overflow: visible;
      background: transparent;
      border: 0;
      border-radius: 0;
      padding: 0;
      box-shadow: none;
    }

    .seo-content.seo-home h1,
    .seo-content.seo-home > p {
      position: absolute;
      width: 1px;
      height: 1px;
      padding: 0;
      margin: -1px;
      overflow: hidden;
      clip: rect(0, 0, 0, 0);
      white-space: nowrap;
      border: 0;
    }

    .seo-towns {
      background: rgba(255, 255, 255, 0.94);
      border: 1px solid #e5e7eb;
      border-radius: 10px;
      box-shadow: 0 6px 18px rgba(15, 23, 42, 0.12);
    }

    .seo-towns summary {
      cursor: pointer;
      padding: 8px 12px;
      font-size: 13px;
      font-weight: 600;
      color: #374151;
    }

    .seo-towns .seo-place-links {
      max-height: 28vh;
      overflow: auto;
      padding: 0 12px 10px;
    }

    .seo-place-links {
      font-size: 12px;
      line-height: 1.6;
      color: #6b7280;
    }

    .seo-place-links a {
      color: #1d4ed8;
      text-decoration: none;
    }

    .seo-place-links a:hover { text-decoration: underline; }

    .seo-content.seo-article {
      position: fixed;
      left: 12px;
      top: 76px;
      z-index: 520;
      width: min(360px, calc(100vw - 24px));
      max-height: calc(100vh - 110px);
      overflow: auto;
      background: #fff;
      border: 1px solid #e5e7eb;
      border-radius: 12px;
      padding: 14px 16px 16px;
      box-shadow: 0 10px 28px rgba(15, 23, 42, 0.16);
    }

    .seo-content.seo-article h1 {
      font-size: 22px;
      line-height: 1.25;
      margin: 0 0 8px;
    }

    .seo-content.seo-article h2 {
      font-size: 15px;
      margin: 14px 0 6px;
    }

    .seo-content.seo-article p,
    .seo-content.seo-article li {
      font-size: 14px;
      color: #374151;
      line-height: 1.45;
    }

    .seo-content.seo-article a {
      color: #1d4ed8;
      text-decoration: none;
    }

    .seo-content.seo-article a:hover { text-decoration: underline; }

    .seo-crumbs {
      font-size: 12px;
      color: #6b7280;
      margin-bottom: 8px;
    }

    .seo-board,
    .seo-stop-list {
      list-style: none;
      padding: 0;
      margin: 10px 0 0;
    }

    .seo-board li,
    .seo-stop-list li {
      display: flex;
      justify-content: space-between;
      gap: 8px;
      padding: 7px 0;
      border-bottom: 1px solid #f3f4f6;
    }

    .seo-note {
      margin-top: 12px;
      font-size: 12px;
      color: #6b7280;
    }

    @media (max-width: 720px) {
      .seo-content.seo-home {
        left: 12px;
        right: 12px;
        width: auto;
      }

      .seo-content.seo-article {
        left: 8px;
        right: 8px;
        width: auto;
        max-height: 46vh;
      }
    }

    .chip-coach, .chip-then, .chip-delay, .chip-occ, .chip-access, .chip-fare {
      display: inline-block;
      font-size: 11px;
      font-weight: 700;
      letter-spacing: 0.02em;
      padding: 3px 7px;
      border-radius: 4px;
      margin-left: 0;
      vertical-align: middle;
    }

    .board-kind {
      display: inline-block;
      font-weight: 800;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      font-size: 12px;
      padding: 4px 8px;
      border-radius: 4px;
      margin-bottom: 6px;
    }

    .board-kind-live {
      background: #d1fae5;
      color: #065f46;
    }

    .board-kind-timetable {
      background: #f3f4f6;
      color: #374151;
    }

    .board-kind-note {
      margin: 0 0 14px;
      font-size: 13px;
      color: #4b5563;
      line-height: 1.4;
    }

    .side-panel.night-board .board-kind-note {
      color: #d1d5db;
    }

    .side-panel.night-board .board-kind-timetable {
      background: #374151;
      color: #f9fafb;
    }

    .chip-coach { background: #111827; color: #fff; }
    .chip-then { background: #e5e7eb; color: #374151; font-weight: 600; }
    .chip-delay { background: #fef3c7; color: #92400e; }
    .chip-occ { background: #ede9fe; color: #5b21b6; }
    .chip-access { background: #d1fae5; color: #065f46; }
    .chip-fare { background: #ecfdf5; color: #047857; }

    .status-badge.timetable {
      background: #f3f4f6;
      color: #4b5563;
    }

    .going-to {
      width: 100%;
      margin: 0 0 12px;
      padding: 8px 10px;
      border: 1px solid #e5e7eb;
      border-radius: 8px;
      font: inherit;
    }

    .opposite-banner, .service-note, .fare-banner {
      background: #eff6ff;
      border: 1px solid #bfdbfe;
      color: #1e3a8a;
      border-radius: 8px;
      padding: 10px 12px;
      margin-bottom: 12px;
      font-size: 13px;
    }

    .fare-banner {
      background: #ecfdf5;
      border-color: #a7f3d0;
      color: #065f46;
    }

    .journey-route-fare {
      margin-left: auto;
      padding: 4px 8px;
      background: #ecfdf5;
      color: #047857;
      border-radius: 4px;
      font-size: 12px;
      font-weight: 700;
    }

    .journey-route-fare.approx {
      background: #f3f4f6;
      color: #374151;
      font-weight: 600;
    }

    .opposite-banner button {
      margin-left: 8px;
      background: #2563eb;
      color: #fff;
      border: 0;
      border-radius: 6px;
      padding: 4px 8px;
      cursor: pointer;
      font: inherit;
    }

    .bay-pick {
      min-width: 180px;
      text-align: left;
    }

    .bay-pick button {
      display: block;
      width: 100%;
      text-align: left;
      margin-top: 6px;
      padding: 8px;
      border: 1px solid #e5e7eb;
      background: #fff;
      border-radius: 6px;
      cursor: pointer;
    }
