.route-preferences {
  margin: 16px 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(247, 250, 249, .82);
}

.install-app-button {
  display: inline-flex;
  min-height: 38px;
  padding: 7px 11px;
  align-items: center;
  gap: 6px;
  color: #075f57;
  font-size: .7rem;
  font-weight: 800;
  border: 1px solid #bcded7;
  border-radius: 11px;
  background: #e8f7f3;
}

.install-app-button:hover { color: #064e48; background: #d9f1eb; }
.install-app-button[hidden] { display: none !important; }
.is-offline .live-dot { background: #98a5af; }

@media (display-mode: standalone) {
  .topbar { padding-top: env(safe-area-inset-top); }
  .app-footer { padding-bottom: max(18px, env(safe-area-inset-bottom)); }
}

.route-preferences > summary {
  display: flex;
  min-height: 48px;
  padding: 11px 13px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  cursor: pointer;
  list-style: none;
  font-size: .8rem;
  font-weight: 800;
}

.route-preferences > summary::-webkit-details-marker { display: none; }
.route-preferences > summary span { display: inline-flex; align-items: center; gap: 7px; }
.route-preferences > summary i { color: var(--teal-dark); }
.route-preferences > summary small { color: var(--ink-soft); font-size: .68rem; }
.route-preferences[open] > summary { border-bottom: 1px solid var(--line); }

.route-preferences-body { padding: 14px; }
.preference-grid { display: grid; gap: 11px; }
.preference-grid .form-label { margin-bottom: 5px; font-size: .7rem; font-weight: 750; }
.preference-grid .form-select { min-height: 42px; font-size: .78rem; border-color: var(--line); }

.transport-preferences {
  display: grid;
  margin: 14px 0 0;
  padding: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  border: 0;
}

.transport-preferences legend {
  margin-bottom: 7px;
  grid-column: 1 / -1;
  color: var(--ink-soft);
  font-size: .7rem;
  font-weight: 750;
}

.transport-preferences label {
  display: flex;
  padding: 8px 9px;
  align-items: center;
  gap: 7px;
  font-size: .72rem;
  font-weight: 700;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: white;
}

.transport-preferences .form-check-input:checked,
.accessible-preference .form-check-input:checked { background-color: var(--teal); border-color: var(--teal); }

.accessible-preference {
  display: flex;
  margin-top: 13px;
  padding: 11px;
  align-items: flex-start;
  gap: 9px;
  border: 1px solid #cfe5e0;
  border-radius: 11px;
  background: var(--teal-pale);
  cursor: pointer;
}

.accessible-preference input { flex: 0 0 auto; margin-top: 2px; }
.accessible-preference strong,
.accessible-preference small { display: block; }
.accessible-preference strong { font-size: .75rem; }
.accessible-preference small { margin-top: 2px; color: var(--ink-soft); font-size: .66rem; line-height: 1.35; }

.browser-memory { margin-top: 17px; }
.browser-memory-heading { display: flex; margin-bottom: 8px; align-items: center; justify-content: space-between; gap: 8px; }
.browser-memory-heading strong { font-size: .74rem; }
.browser-memory-heading strong i { margin-right: 4px; color: var(--teal-dark); }
.browser-memory-heading small { color: var(--ink-soft); font-size: .62rem; }
.browser-memory-list { display: grid; gap: 6px; }
.browser-memory-empty { margin: 0; padding: 9px 11px; color: var(--ink-soft); font-size: .68rem; border-radius: 10px; background: #f4f7f6; }

.browser-memory-item { display: flex; align-items: stretch; border: 1px solid var(--line); border-radius: 11px; background: white; overflow: hidden; }
.browser-memory-open { display: flex; min-width: 0; padding: 8px 10px; flex: 1; align-items: center; gap: 9px; text-align: left; border: 0; background: transparent; }
.browser-memory-open > i { flex: 0 0 auto; color: var(--teal-dark); }
.browser-memory-open > span { min-width: 0; }
.browser-memory-open strong,
.browser-memory-open small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.browser-memory-open strong { font-size: .72rem; }
.browser-memory-open small { margin-top: 2px; color: var(--ink-soft); font-size: .64rem; }
.browser-memory-open small i { margin-right: 3px; }
.browser-memory-open:hover { background: #f5faf8; }
.browser-memory-remove { width: 34px; color: var(--ink-soft); font-size: .65rem; border: 0; border-left: 1px solid var(--line); background: #fafcfb; }
.browser-memory-remove:hover { color: #a63f32; background: #fff0ed; }

.browser-favorite-button {
  display: inline-flex;
  min-height: 34px;
  padding: 7px 10px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--ink-soft);
  font-size: .68rem;
  font-weight: 800;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
}

.browser-favorite-button:hover,
.browser-favorite-button.is-favorite { color: #946700; border-color: #f1d38a; background: #fff8dc; }
#routeResults > .mb-2 { display: flex; align-items: center; gap: 8px; }
#routeResults > .mb-2 > .browser-favorite-button { margin-left: auto; }
.board-header > .browser-favorite-button { flex: 0 0 auto; }

.stop-date-time { margin: 14px 0; }
.stop-date-time .form-label { font-size: .72rem; font-weight: 750; }
.stop-date-time-row { display: flex; align-items: stretch; gap: 7px; }
.stop-date-time-row .input-with-icon { min-width: 0; flex: 1; }
.stop-date-time-row input { min-height: 44px; font-size: .76rem; }
.stop-date-time-row > button { padding: 0 10px; color: var(--teal-dark); font-size: .68rem; font-weight: 800; border: 1px solid #cfe5e0; border-radius: 10px; background: var(--teal-pale); }

.route-data-indicators { display: flex; margin-top: 9px; flex-wrap: wrap; gap: 6px; }
.route-data-indicators span,
.journey-leg-accessibility { display: inline-flex; align-items: center; gap: 5px; color: #4c6070; font-size: .65rem; font-weight: 750; }
.route-data-indicators .is-accessible,
.journey-leg-accessibility.is-accessible { color: #087f6f; }
.route-data-indicators .is-inaccessible,
.journey-leg-accessibility.is-inaccessible { color: #a14337; }
.route-data-indicators .is-partial { color: #7c661e; }

.route-result-labels { display: flex; margin-bottom: 10px; align-items: center; justify-content: space-between; gap: 8px; }
.route-proposal-label,
.route-wait-time { display: inline-flex; align-items: center; gap: 5px; font-size: .64rem; font-weight: 800; }
.route-proposal-label { padding: 4px 7px; border-radius: 7px; }
.route-proposal-label.is-recommended { color: #087f6f; background: #e5f7f3; }
.route-proposal-label.is-alternative { color: #536173; background: #eef2f5; }
.route-wait-time { color: #855c00; }

.route-following-departures { display: flex; margin-top: 11px; padding-top: 10px; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line); }
.route-following-departures > span { color: var(--ink-soft); font-size: .65rem; font-weight: 750; }
.route-following-departures > div { display: flex; gap: 6px; }
.route-following-departures button { display: flex; min-width: 58px; padding: 5px 8px; align-items: center; flex-direction: column; color: var(--ink); border: 1px solid #cfe5e0; border-radius: 9px; background: #f3faf8; }
.route-following-departures button:hover { border-color: var(--teal); background: #e4f6f2; }
.route-following-departures button strong { font-size: .72rem; }
.route-following-departures button small { color: var(--teal-dark); font-size: .58rem; font-weight: 750; }

.route-provided-alternatives { margin-top: 10px; padding: 9px 10px; border: 1px dashed #cfdae2; border-radius: 10px; background: #f8fafb; }
.route-provided-alternatives > span { display: inline-flex; align-items: center; gap: 5px; color: var(--ink-soft); font-size: .63rem; font-weight: 800; }
.route-provided-alternatives > div { display: flex; margin-top: 6px; flex-wrap: wrap; gap: 5px; }
.route-provided-alternatives > div span { padding: 3px 6px; color: #45576a; font-size: .61rem; font-weight: 700; border-radius: 6px; background: #eaf0f4; }

.journey-availability { display: grid; margin: 14px 0 22px; gap: 10px; }
.journey-accessibility,
.journey-fares { border: 1px solid var(--line); border-radius: 14px; background: white; }
.journey-accessibility { display: flex; padding: 13px 14px; align-items: center; gap: 11px; }
.journey-accessibility > i { font-size: 1.3rem; }
.journey-accessibility.is-accessible > i { color: var(--teal-dark); }
.journey-accessibility.is-inaccessible > i { color: #b44739; }
.journey-accessibility.is-partial > i { color: #a27a0d; }
.journey-accessibility strong,
.journey-accessibility small { display: block; }
.journey-accessibility strong { font-size: .8rem; }
.journey-accessibility small { margin-top: 2px; color: var(--ink-soft); font-size: .67rem; }
.journey-fares { padding: 13px 14px; }
.journey-fares-heading { display: flex; align-items: center; gap: 10px; }
.journey-fares-heading > i { color: var(--teal-dark); font-size: 1.15rem; }
.journey-fares-heading strong,
.journey-fares-heading small { display: block; }
.journey-fares-heading strong { font-size: .82rem; }
.journey-fares-heading small { color: var(--ink-soft); font-size: .66rem; }
.journey-fares ul { margin: 11px 0 0; padding: 0; list-style: none; }
.journey-fares li { display: flex; padding: 7px 0; align-items: center; justify-content: space-between; gap: 15px; border-top: 1px solid var(--line); font-size: .73rem; }
.journey-fares li span small { display: block; margin-top: 2px; color: var(--ink-soft); font-size: .62rem; }
.journey-fares li > strong { flex: 0 0 auto; }
.journey-fares p { margin: 8px 0 0; color: var(--ink-soft); font-size: .62rem; line-height: 1.4; }
.line-plan-header .line-accessibility { display: inline-flex; padding: 5px 8px; align-items: center; gap: 4px; font-size: .7rem; font-weight: 750; border-radius: 8px; background: #f2f6f5; }
.line-plan-header .line-accessibility.is-accessible { color: #087f6f; background: #e6f7f3; }
.line-plan-header .line-accessibility.is-inaccessible { color: #a14337; background: #fff0ed; }
.line-plan-header .line-accessibility.is-partial { color: #7c661e; background: #fff8dc; }

@media (max-width: 600px) {
  .transport-preferences { grid-template-columns: 1fr; }
  .browser-favorite-button span { display: none; }
  .browser-favorite-button { width: 36px; padding-inline: 0; }
  .stop-date-time-row { flex-direction: column; }
  .stop-date-time-row > button { min-height: 38px; }
  .route-result-labels,
  .route-following-departures { align-items: flex-start; flex-direction: column; }
  .install-app-button span { display: none; }
  .install-app-button { width: 38px; padding-inline: 0; justify-content: center; }
}
