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

    :root {
      --bg: #f2f4f7;
      --surface: #ffffff;
      --surface2: #ffffff;
      --border: #e2e8f0;
      --border2: #cbd5e1;
      --text: #111827;
      --dim: #475569;
      --muted: #94a3b8;
      --accent: #2563eb;
      --red: #ef4444;
      --safe-t: env(safe-area-inset-top, 0px);
      --safe-b: env(safe-area-inset-bottom, 0px);
    }

    html,
    body {
      height: 100%;
      background: var(--bg);
      color: var(--text);
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
      -webkit-tap-highlight-color: transparent;
      overscroll-behavior: none
    }

    body {
      display: flex;
      flex-direction: column;
      padding-top: var(--safe-t);
      padding-bottom: var(--safe-b)
    }

    /* header */
    header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 14px 18px 12px;
      border-bottom: 1px solid var(--border);
      flex-shrink: 0
    }

    .brand {
      display: flex;
      align-items: center;
      gap: 10px
    }

    .brand-name {
      font-weight: 800;
      font-size: 20px;
      letter-spacing: -0.03em;
      letter-spacing: .05em;
      text-transform: uppercase
    }

    .brand-sub {
      
      font-size: 10px;
      color: var(--muted);
      letter-spacing: .1em;
      margin-top: 1px
    }

    .live-pill {
      display: flex;
      align-items: center;
      gap: 6px;
      background: rgba(255, 79, 110, .08);
      border: 1px solid rgba(255, 79, 110, .2);
      border-radius: 100px;
      padding: 5px 11px 5px 8px;
      
      font-size: 10px;
      font-weight: 700;
      color: var(--red);
      letter-spacing: .1em
    }

    .live-dot {
      width: 6px;
      height: 6px;
      border-radius: 50%;
      background: var(--red);
      animation: pulse 1.5s ease-in-out infinite
    }

    @keyframes pulse {

      0%,
      100% {
        opacity: 1
      }

      50% {
        opacity: .25
      }
    }

    /* tabs */
    .tabs {
      display: flex;
      border-top: 1px solid var(--border);
      flex-shrink: 0;
      background: var(--surface);
      padding-bottom: var(--safe-b);
      box-shadow: 0 -2px 10px rgba(0,0,0,0.03);
      justify-content: space-around;
      position: fixed; bottom: 0; width: 100%; z-index: 1000;
    }

    .tab {
      flex: 1;
      padding: 18px 0;
      text-align: center;
      font-size: 13px;
      font-weight: 600;
      color: var(--dim);
      cursor: pointer;
      border-bottom: 2px solid transparent;
      transition: color .15s, border-color .15s;
      letter-spacing: .03em;
      user-select: none
    }

    .tab.active {
      color: var(--accent);
      border-top: 3px solid var(--accent); /* Move indicator to top since tabs are at bottom */
      transform: translateY(-2px);
    }

    /* panels */
    .panel {
      display: none;
      flex-direction: column;
      flex: 1;
      overflow: hidden;
      min-height: 0
    }

    .panel.active {
      display: flex
    }

    /* ── SEARCH TAB ── */
    .search-pad {
      padding: 14px 14px 0;
      flex-shrink: 0
    }

    .search-row {
      display: flex;
      gap: 8px;
      align-items: center
    }

    .input-wrap {
      flex: 1;
      position: relative
    }

    .s-icon {
      position: absolute;
      left: 13px;
      top: 50%;
      transform: translateY(-50%);
      color: var(--muted);
      font-size: 16px;
      pointer-events: none;
      line-height: 1
    }

    #stop-input {
      width: 100%;
      background: var(--surface);
      border: 1.5px solid var(--border2);
      border-radius: 16px;
      padding: 13px 13px 13px 40px;
      color: var(--text);
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
      font-size: 16px;
      outline: none;
      -webkit-appearance: none;
      transition: border-color .15s
    }

    #stop-input:focus {
      border-color: var(--accent)
    }

    #stop-input::placeholder {
      color: var(--muted)
    }

    #stop-input:disabled {
      opacity: .4
    }

    #locate-btn {
      background: var(--surface);
      border: 1.5px solid var(--border2);
      border-radius: 16px;
      width: 50px;
      height: 50px;
      display: flex;
      align-items: center;
      justify-content: center;
      color: var(--dim);
      font-size: 21px;
      cursor: pointer;
      flex-shrink: 0;
      transition: border-color .15s, color .15s, background .15s
    }

    #locate-btn:active {
      background: var(--surface2);
      border-color: var(--accent);
      color: var(--accent)
    }

    /* autocomplete */
    #autocomplete {
      margin-top: 6px;
      background: var(--surface2);
      border: 1px solid var(--border2);
      border-radius: 18px;
      overflow: hidden;
      box-shadow: 0 12px 40px rgba(0, 0, 0, .5);
      display: none
    }

    .ac-item {
      display: flex;
      align-items: center;
      gap: 10px;
      padding: 11px 14px;
      cursor: pointer;
      border-bottom: 1px solid var(--border);
      transition: background .1s
    }

    .ac-item:last-child {
      border-bottom: none
    }

    .ac-item:active {
      background: var(--surface)
    }

    .ac-num {
      font-size: 14px;
      font-weight: 700;
      color: var(--accent);
      min-width: 38px;
      flex-shrink: 0
    }

    .ac-name {
      flex: 1;
      font-size: 14px;
      font-weight: 500;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis
    }

    .ac-name mark,
    .stop-name mark {
      background: rgba(232, 160, 32, .18);
      color: var(--accent);
      border-radius: 3px;
      font-style: normal
    }

    .ac-badges {
      display: flex;
      gap: 3px;
      flex-shrink: 0
    }

    .ac-badge,
    .stop-badge {
      
      font-size: 9px;
      font-weight: 700;
      padding: 2px 5px;
      border-radius: 4px;
      background: var(--border2);
      color: var(--dim)
    }

    .no-res {
      padding: 18px;
      text-align: center;
      color: var(--muted);
      font-size: 14px
    }

    .ac-header {
      padding: 8px 14px 6px;
      
      font-size: 10px;
      font-weight: 700;
      letter-spacing: .1em;
      color: var(--muted);
      text-transform: uppercase;
      border-bottom: 1px solid var(--border);
      background: var(--surface)
    }

    /* search empty hint */
    .hint {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      flex: 1;
      padding: 48px 32px;
      text-align: center;
      color: var(--muted)
    }

    .hint-icon {
      font-size: 46px;
      margin-bottom: 14px;
      opacity: .18
    }

    .hint p {
      font-size: 14px;
      line-height: 1.7
    }

    /* ── LIST TAB ── */
    .list-filter-wrap {
      padding: 14px 14px 10px;
      flex-shrink: 0
    }

    #list-filter {
      width: 100%;
      background: var(--surface);
      border: 1.5px solid var(--border2);
      border-radius: 16px;
      padding: 12px 14px;
      color: var(--text);
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
      font-size: 16px;
      outline: none;
      -webkit-appearance: none;
      transition: border-color .15s
    }

    #list-filter:focus {
      border-color: var(--accent)
    }

    #list-filter::placeholder {
      color: var(--muted)
    }

    #stops-list {
      flex: 1;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch
    }

    .stop-row {
      display: flex;
      align-items: center;
      gap: 12px;
      padding: 18px 14px;
      cursor: pointer;
      border-bottom: 1px solid var(--border);
      transition: background .1s
    }

    .stop-row:active {
      background: var(--surface)
    }

    .stop-num {
      
      font-size: 13px;
      font-weight: 700;
      color: var(--accent);
      min-width: 38px;
      flex-shrink: 0
    }

    .stop-name {
      flex: 1;
      font-size: 14px;
      font-weight: 500;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis
    }

    .stop-badges {
      display: flex;
      gap: 3px;
      flex-shrink: 0;
      flex-wrap: wrap;
      max-width: 80px;
      justify-content: flex-end
    }

    /* ── ARRIVALS TAB ── */
    #arrivals-scroll {
      flex: 1;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
      padding: 14px 14px 4px
    }

    .stop-header {
      display: flex;
      align-items: flex-start;
      gap: 12px;
      margin-bottom: 14px
    }

    .stop-id-badge {
      
      font-weight: 700;
      font-size: 13px;
      background: rgba(232, 160, 32, .08);
      border: 1px solid rgba(232, 160, 32, .22);
      border-radius: 8px;
      padding: 7px 10px;
      color: var(--accent);
      flex-shrink: 0;
      margin-top: 2px
    }

    .stop-title {
      font-weight: 700;
      font-size: 20px;
      letter-spacing: -0.02em;
      line-height: 1.2
    }

    .stop-lines-row {
      display: flex;
      flex-wrap: wrap;
      gap: 5px;
      margin-top: 6px
    }

    .line-chip {
      
      font-weight: 700;
      font-size: 10px;
      padding: 3px 7px;
      border-radius: 5px;
      letter-spacing: .03em
    }

    .arrival-card {
      display: flex;
      align-items: center;
      gap: 12px;
      background: var(--surface);
      border: 1px solid var(--border);
      border-radius: 18px;
      padding: 18px 14px;
      box-shadow: 0 2px 6px rgba(0,0,0,0.05);
      margin-bottom: 8px;
      animation: fadein .2s ease both
    }

    @keyframes fadein {
      from {
        opacity: 0;
        transform: translateY(5px)
      }

      to {
        opacity: 1;
        transform: translateY(0)
      }
    }

    .arrival-card.is-now {
      border-color: rgba(255, 79, 110, .28);
      background: rgba(255, 79, 110, .05)
    }

    .line-badge {
      font-weight: 700;
      font-size: 16px;
      padding: 9px 10px;
      border-radius: 10px;
      min-width: 44px;
      text-align: center;
      flex-shrink: 0;
      letter-spacing: .04em
    }

    .arr-info {
      flex: 1;
      min-width: 0
    }

    .arr-dest {
      font-size: 13px;
      font-weight: 600;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      text-transform: uppercase;
      letter-spacing: .04em
    }

    .arr-occ {
      display: flex;
      align-items: center;
      gap: 5px;
      margin-top: 4px;
      font-size: 11px;
      
    }

    .arr-time {
      font-weight: 700;
      font-size: 20px;
      letter-spacing: -0.02em;
      flex-shrink: 0
    }

    .t-now {
      color: var(--red);
      font-size: 13px;
      letter-spacing: .06em;
      animation: pulse 1s ease-in-out infinite
    }

    .t-soon {
      color: var(--accent)
    }

    .t-ok {
      color: var(--text)
    }

    .status-bar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 8px 14px 12px;
      flex-shrink: 0
    }

    #last-updated {
      
      font-size: 10px;
      color: var(--muted);
      letter-spacing: .05em
    }

    #refresh-btn {
      background: none;
      border: none;
      color: var(--muted);
      font-size: 20px;
      cursor: pointer;
      padding: 4px 8px;
      border-radius: 8px;
      transition: color .15s;
      line-height: 1
    }

    #refresh-btn:active {
      color: var(--accent)
    }

    #refresh-btn.spin {
      animation: spin .5s ease-in-out
    }

    @keyframes spin {
      from {
        transform: rotate(0)
      }

      to {
        transform: rotate(360deg)
      }
    }

    /* skeletons */
    .sk {
      background: linear-gradient(90deg, var(--surface) 25%, var(--surface2) 50%, var(--surface) 75%);
      background-size: 200% 100%;
      animation: shimmer 1.3s ease-in-out infinite;
      border-radius: 8px
    }

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

      100% {
        background-position: -200% 0
      }
    }

    .loading-wrap {
      display: flex;
      flex-direction: column;
      align-items: center;
      padding: 80px 32px;
      color: var(--muted)
    }

    .spinner {
      width: 26px;
      height: 26px;
      border: 2px solid var(--border2);
      border-top-color: var(--accent);
      border-radius: 50%;
      animation: spin .8s linear infinite;
      margin-bottom: 12px
    }

    .loading-wrap p {
      font-size: 11px;
      
      letter-spacing: .08em
    }

    .err-state {
      text-align: center;
      padding: 40px 24px;
      color: var(--muted);
      font-size: 14px;
      line-height: 1.6
    }

    .err-state button {
      margin-top: 14px;
      background: var(--surface2);
      border: 1px solid var(--border2);
      color: var(--accent);
      padding: 9px 18px;
      border-radius: 10px;
      cursor: pointer;
      font-size: 14px;
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
      font-weight: 600;
      display: inline-block
    }
    
    /* alert banner */
    #alert-banner { display:none; background:rgba(255,79,110,.1); border-bottom:1px solid rgba(255,79,110,.2); padding:10px 18px; font-size:12px; color:var(--red); line-height:1.4; }
    .alert-title { font-weight:700; margin-bottom:2px; display:flex; align-items:center; gap:6px; }
    .alert-msg { font-weight:500; opacity:0.9; }

    /* map & lines */
    #map { width:100%; height:100%; background:var(--surface2); z-index:0; }
    .leaflet-popup-content-wrapper { background:var(--surface); color:var(--text); border-radius:12px; border:1px solid var(--border2); }
    .leaflet-popup-tip { background:var(--border2); }
    .map-popup-title {  font-weight:700; font-size:14px; margin-bottom:4px; line-height:1.2; color:var(--accent); }
    .map-popup-btn { background:var(--surface2); color:var(--text); border:1px solid var(--border2); border-radius:6px; padding:8px 12px; font-weight:600; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; cursor:pointer; margin-top:6px; width:100%; transition:border-color 0.1s; }
    .map-popup-btn:active { border-color:var(--accent); color:var(--accent); }

    #lines-list { flex:1; overflow-y:auto; -webkit-overflow-scrolling:touch; padding:14px; }
    .line-row { display:flex; align-items:center; gap:12px; padding:12px 14px; background:var(--surface); border:1px solid var(--border); border-radius:14px; margin-bottom:8px; cursor:pointer; transition:background .15s; }
    .line-row:active { background:var(--surface2); }
    .line-num {  font-size:16px; font-weight:700; width:44px; height:44px; display:flex; align-items:center; justify-content:center; border-radius:10px; flex-shrink:0; box-shadow:inset 0 0 0 1px rgba(0,0,0,0.2); }
    .line-name { flex:1; font-size:14px; font-weight:600; line-height:1.3; }
    
    .line-detail-wrap { position: sticky; top: 0; background: var(--bg); z-index: 10; margin: -14px -14px 14px -14px; border-bottom: 1px solid var(--border); }
    .line-detail-header { padding: 14px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
    .route-toggles { display: flex; gap: 8px; padding: 0 14px 14px; overflow-x: auto; scrollbar-width: none; }
    .route-toggles::-webkit-scrollbar { display: none; }
    .route-pill { background: var(--surface); padding: 6px 14px; border-radius: 100px; font-size: 13px; font-weight: 600; cursor: pointer; border: 1px solid var(--border2); color: var(--dim); white-space: nowrap; transition: all 0.15s; user-select: none; }
    .route-pill.active { background: rgba(232,160,32,.1); color: var(--accent); border-color: rgba(232,160,32,.3); }
    
    .var-select-wrap { padding: 0 14px 10px; }
    .var-select { width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border2); background: var(--surface2); color: var(--text); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"; font-size: 13px; font-weight: 600; outline: none; }
    
    .back-btn { background: var(--surface2); border: none; color: var(--text); padding: 8px 12px; border-radius: 8px; font-weight: 600; cursor: pointer; }
    .back-btn:active { background: var(--border); }
    .map-btn { background: rgba(232,160,32,.18); color: var(--accent); border: 1px solid rgba(232,160,32,.4); padding: 8px 12px; border-radius: 8px; font-weight: 600; cursor: pointer; }
    .map-btn:active { background: rgba(232,160,32,.3); }


/* ── MAP SEARCH OVERLAY ── */
#panel-map { position: relative; }
.map-search-overlay { position: absolute; top: 14px; left: 14px; right: 14px; z-index: 500; pointer-events: none; }
.map-search-wrap { display: flex; align-items: center; background: var(--surface); border-radius: 14px; box-shadow: 0 4px 20px rgba(0,0,0,0.15); border: 1px solid var(--border); padding: 0 14px; pointer-events: all; }
.map-search-icon { font-size: 18px; color: var(--dim); margin-right: 8px; }
#map-stop-search { flex: 1; padding: 13px 0; border: none; background: transparent; font-size: 15px; font-family: inherit; color: var(--text); outline: none; }
#map-stop-search::placeholder { color: var(--dim); }
.map-search-results { background: var(--surface); border-radius: 14px; box-shadow: 0 4px 20px rgba(0,0,0,0.15); border: 1px solid var(--border); margin-top: 8px; max-height: 240px; overflow-y: auto; display: none; pointer-events: all; }
.map-search-results.show { display: block; }
.map-stop-result { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); cursor: pointer; -webkit-tap-highlight-color: transparent; transition: background 0.15s; }
.map-stop-result:last-child { border-bottom: none; }
.map-stop-result:active { background: var(--bg); }
.map-stop-result .stop-num { background: var(--accent); color: white; border-radius: 8px; padding: 4px 8px; font-size: 12px; font-weight: 700; min-width: 38px; text-align: center; flex-shrink: 0; }
.map-stop-result .stop-name { font-size: 14px; font-weight: 600; color: var(--text); }

@keyframes markerPulse {
  0%   { transform: scale(1);   opacity: 1; }
  50%  { transform: scale(2.2); opacity: 0.5; }
  100% { transform: scale(1);   opacity: 1; }
}

/* Locate buttons */
.locate-btn { flex-shrink: 0; width: 46px; height: 46px; border-radius: 12px; border: 1.5px solid var(--border2); background: var(--surface); color: var(--accent); font-size: 20px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.15s; -webkit-tap-highlight-color: transparent; outline: none; }
.locate-btn:active { background: var(--bg); transform: scale(0.95); }
.locate-btn.loading { animation: spin 0.9s linear infinite; color: var(--dim); }
@keyframes spin { to { transform: rotate(360deg); } }

.map-locate-fab { position: absolute; bottom: 90px; right: 14px; z-index: 500; width: 46px; height: 46px; border-radius: 50%; border: none; background: var(--surface); box-shadow: 0 2px 12px rgba(0,0,0,0.18); color: var(--accent); font-size: 22px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: all 0.15s; -webkit-tap-highlight-color: transparent; outline: none; }
.map-locate-fab:active { transform: scale(0.93); box-shadow: 0 1px 6px rgba(0,0,0,0.12); }
.map-locate-fab.loading { animation: spin 0.9s linear infinite; color: var(--dim); }
.routes-form { background: var(--surface); border-radius: 18px; padding: 14px; margin-bottom: 8px; border: 1px solid var(--border); box-shadow: 0 4px 12px rgba(0,0,0,0.03); }
.r-inputs { display: flex; flex-direction: column; gap: 8px; position: relative; }
.r-input { width: 100%; padding: 14px 16px; border-radius: 12px; border: 1.5px solid var(--border2); font-size: 15px; font-family: inherit; background: var(--bg); color: var(--text); outline: none; transition: border-color 0.1s; }
.r-input:focus { border-color: var(--accent); }
.route-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 16px; margin-bottom: 12px; box-shadow: 0 2px 6px rgba(0,0,0,0.04); }
.rc-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.rc-time { font-size: 18px; font-weight: 700; color: var(--text); }
.rc-walk { font-size: 13px; color: var(--dim); font-weight: 500; }
.rc-steps { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--text); flex-wrap: wrap; }
.rc-step-icon { color: var(--muted); }


.autocomplete-box { position: absolute; top: 100%; left: 0; right: 0; background: var(--surface); border: 1px solid var(--border); border-top: none; border-bottom-left-radius: 12px; border-bottom-right-radius: 12px; box-shadow: 0 8px 16px rgba(0,0,0,0.1); z-index: 100; max-height: 250px; overflow-y: auto; display: none; }
.autocomplete-box.show { display: block; }
.sg-item { padding: 14px 16px; font-size: 14px; color: var(--text); border-bottom: 1px solid var(--border); cursor: pointer; display: flex; align-items: center; gap: 8px;}
.sg-item:last-child { border-bottom: none; }
.sg-item:active { background: var(--bg); }

/* EXPLORE MODAL */
.segmented-control { display: flex; gap: 6px; background: var(--surface2); padding: 4px; border-radius: 12px; }
.sc-btn { flex: 1; padding: 10px; border-radius: 8px; border: none; font-size: 14px; font-weight: 600; color: var(--dim); background: transparent; cursor: pointer; transition: all 0.2s; outline: none; -webkit-tap-highlight-color: transparent; }
.sc-btn.active { background: var(--surface); color: var(--text); box-shadow: 0 2px 8px rgba(0,0,0,0.06); }

.modal { position: fixed; bottom: 0; left: 0; right: 0; height: 85vh; background: var(--surface); z-index: 2000; border-radius: 20px 20px 0 0; box-shadow: 0 -4px 24px rgba(0,0,0,0.15); transform: translateY(100%); transition: transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1); display: flex; flex-direction: column; overflow: hidden; border-top: 1px solid var(--border); }
.modal.show { transform: translateY(0); }
.modal-handle-wrap { width: 100%; padding: 12px; display: flex; justify-content: center; cursor: pointer; background: var(--surface); }
.modal-handle { width: 40px; height: 5px; background: var(--border2); border-radius: 3px; }
.modal-backdrop { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.4); z-index: 1999; opacity: 0; visibility: hidden; transition: all 0.3s; }
.modal-backdrop.show { opacity: 1; visibility: visible; }

/* ── FAVOURITES ── */
.section-label { padding: 14px 16px 6px; font-size: 12px; font-weight: 700; color: var(--dim); letter-spacing: .08em; text-transform: uppercase; }
.section-divider { height: 1px; background: var(--border); margin: 8px 0; }
.fav-card { background: var(--surface); border-radius: 14px; margin: 6px 12px; padding: 12px 14px; box-shadow: 0 2px 8px rgba(0,0,0,0.05); border: 1px solid var(--border); cursor: pointer; transition: box-shadow 0.15s; }
.fav-card:active { box-shadow: 0 1px 3px rgba(0,0,0,0.07); }
.fav-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.fav-card-stop { display: flex; align-items: center; gap: 8px; }
.fav-next { display: flex; gap: 6px; flex-wrap: wrap; min-height: 20px; }
.fav-chip { display: inline-flex; align-items: center; gap: 4px; border-radius: 6px; padding: 4px 8px; font-size: 12px; font-weight: 600; }
.star-btn { background: none; border: none; font-size: 18px; color: var(--dim); cursor: pointer; padding: 4px 6px; border-radius: 8px; line-height: 1; transition: transform 0.15s, color 0.15s; -webkit-tap-highlight-color: transparent; }
.star-btn.fav-active { color: #f5c518; }
.star-btn:active { transform: scale(1.3); }
.fav-btn { background: none; border: none; font-size: 20px; color: var(--dim); cursor: pointer; padding: 4px 8px; line-height: 1; transition: transform 0.15s, color 0.15s; }
.fav-btn.fav-active { color: #f5c518; }
.fav-btn:active { transform: scale(1.25); }

/* ── PWA INSTALL ── */
header { display: flex; align-items: center; justify-content: space-between; }
.pwa-header-btn { display: none; align-items: center; gap: 6px; background: var(--accent); color: white; border: none; border-radius: 10px; padding: 8px 13px; font-size: 13px; font-weight: 700; cursor: pointer; font-family: inherit; white-space: nowrap; transition: opacity 0.15s; }
.pwa-header-btn:active { opacity: 0.8; }
.ios-tip { display: none; align-items: center; justify-content: space-between; gap: 10px; background: #1a2035; border-bottom: 1px solid var(--border); padding: 10px 14px; font-size: 13px; color: var(--text); animation: slideDown 0.3s ease; }
.ios-tip button { background: none; border: none; color: var(--dim); font-size: 16px; cursor: pointer; padding: 2px 6px; }
@keyframes slideDown { from { transform: translateY(-100%); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

