:root {
  --bg: #ffffff;
  --surface: #f4f5f6;
  --surface-2: #eceeef;
  --ink: #111214;
  --muted: #6d7278;
  --line: #e0e3e6;
  --red: #70152e;
  --red-dark: #521021;
  --navy: #001f54;
  --navy-soft: #e8eef7;
  --green: #1a8f52;
  --amber: #b56f00;
  --shadow: 0 16px 40px rgba(18, 24, 31, 0.08);
  --radius: 22px;
}

* { box-sizing: border-box; }
html { background: var(--bg); }
body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: "Montserrat", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.hidden { display: none !important; }

.app-shell {
  width: min(100%, 860px);
  margin: 0 auto;
  padding: env(safe-area-inset-top) 18px calc(34px + env(safe-area-inset-bottom));
}

.topbar {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}
.brand-wrap { display: flex; align-items: center; gap: 11px; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px;
  background: #fff; color: var(--red); display: grid; place-items: center;
  border: 1.5px solid rgba(0,31,84,.18);
  box-shadow: 0 5px 16px rgba(0,31,84,.08);
}
.brand-mark svg { width: 25px; height: 25px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.brand-name { font-size: 17px; font-weight: 900; letter-spacing: .045em; }
.brand-sub { color: var(--muted); font-size: 11px; margin-top: 1px; font-weight: 450; }
.top-actions { display: flex; gap: 8px; }
.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line);
  background: white; color: var(--ink); display: grid; place-items: center;
  font-weight: 800; font-size: 18px;
}
.icon-btn:active { transform: scale(.97); }

main { padding-top: 30px; }
.hero-section { padding: 4px 2px 20px; }
.eyebrow {
  margin: 0 0 7px; color: var(--red); font-size: 11px; font-weight: 900;
  letter-spacing: .12em;
}
.hero-copy h1 { margin: 0; font-size: clamp(34px, 7vw, 54px); letter-spacing: -.045em; line-height: .98; }
.hero-question { margin: 10px 0 0; color: var(--muted); font-size: 18px; font-weight: 400; }
.status-line { display: flex; align-items: center; gap: 8px; margin-top: 18px; font-size: 13px; color: var(--muted); }
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); box-shadow: 0 0 0 4px rgba(109,114,120,.1); }
.status-ok { background: var(--green); box-shadow: 0 0 0 4px rgba(26,143,82,.1); }
.status-error { background: var(--red); box-shadow: 0 0 0 4px rgba(112,21,46,.1); }
.status-wait { background: var(--amber); box-shadow: 0 0 0 4px rgba(181,111,0,.1); }

.card {
  border: 1px solid var(--line); border-radius: var(--radius); background: white;
  box-shadow: var(--shadow);
}
.search-card { padding: 18px; }
.field-label-row, .section-title-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.field-label-row label { font-weight: 800; font-size: 14px; }
.info-mini {
  width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--surface); color: var(--muted); font-weight: 800;
}
.search-input-wrap {
  margin-top: 10px; display: grid; grid-template-columns: 30px 1fr 32px; align-items: center;
  border: 1.5px solid #cfd3d7; border-radius: 15px; padding: 0 10px; min-height: 56px;
  transition: border-color .2s, box-shadow .2s;
}
.search-input-wrap:focus-within { border-color: var(--navy); box-shadow: 0 0 0 4px rgba(0,31,84,.08); }
.search-symbol { font-size: 23px; color: var(--navy); transform: translateY(-1px); }
.search-input-wrap input { border: 0; outline: 0; width: 100%; font-size: 16px; background: transparent; color: var(--ink); }
.search-input-wrap input::placeholder { color: #9aa0a6; }
.clear-btn { border: 0; background: transparent; color: var(--muted); font-size: 22px; }
.suggestions {
  margin-top: 8px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; background: white;
}
.suggestion {
  width: 100%; border: 0; border-bottom: 1px solid var(--line); background: white; padding: 13px 14px;
  text-align: left; display: flex; gap: 11px; align-items: flex-start;
}
.suggestion:last-child { border-bottom: 0; }
.suggestion:hover { background: var(--surface); }
.suggestion-icon { color: var(--red); font-weight: 900; width: 18px; }
.suggestion-main { font-weight: 750; font-size: 14px; }
.suggestion-sub { color: var(--muted); font-size: 12px; margin-top: 2px; }


.destination-tools { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 9px; }
.destination-tool { border: 1px solid var(--line); background: white; color: var(--navy); min-height: 34px; border-radius: 999px; padding: 0 11px; font-size: 10px; font-weight: 850; }

.quick-section-label { margin-top: 17px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .12em; }
.quick-places { display: grid; grid-template-columns: repeat(2,1fr); gap: 9px; margin-top: 8px; }
.quick-place {
  border: 1px solid var(--line); background: #fff; border-radius: 15px; padding: 12px;
  display: flex; align-items: flex-start; gap: 10px; text-align: left; color: #25292d; min-height: 86px;
  transition: border-color .18s, transform .18s, box-shadow .18s;
}
.quick-place:hover { border-color: rgba(0,31,84,.35); box-shadow: 0 7px 18px rgba(0,31,84,.07); }
.quick-place:active { transform: translateY(1px); }
.quick-place-icon { flex: 0 0 34px; width: 34px; height: 34px; border-radius: 10px; background: var(--navy-soft); color: var(--navy); display: grid; place-items: center; font-size: 15px; font-weight: 900; }
.quick-place-copy { min-width: 0; display: block; }
.quick-place-copy strong { display: block; font-size: 12px; line-height: 1.25; font-weight: 800; }
.quick-place-copy small { display: block; margin-top: 5px; color: var(--muted); font-size: 9.5px; line-height: 1.35; font-weight: 450; }
.quick-utility-row { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 9px; }
.quick-utility { min-height: 40px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--navy); display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 11px; font-weight: 800; }
.advanced-row { margin-top: 13px; }
.text-btn { border: 0; padding: 5px 0; background: transparent; color: var(--navy); font-weight: 800; font-size: 13px; }
.advanced-options { margin-top: 8px; display: grid; grid-template-columns: repeat(3,1fr); gap: 9px; }
.select-label { font-size: 11px; color: var(--muted); font-weight: 750; }
.select-label select, .select-label input {
  display: block; width: 100%; margin-top: 5px; border: 1px solid var(--line); border-radius: 11px;
  background: var(--surface); min-height: 42px; padding: 0 10px; color: var(--ink); outline: 0;
}
.primary-btn {
  margin-top: 14px; width: 100%; min-height: 54px; border: 0; border-radius: 15px; background: var(--red); color: white;
  font-weight: 900; letter-spacing: .035em; display: flex; align-items: center; justify-content: space-between; padding: 0 18px;
}
.primary-btn:disabled { opacity: .38; cursor: not-allowed; }
.primary-btn:not(:disabled):active { background: var(--red-dark); transform: translateY(1px); }

.section-block { margin-top: 32px; }
.section-title-row h2 { margin: 0; font-size: 24px; letter-spacing: -.03em; }
.section-intro { margin: 7px 0 14px; color: var(--muted); font-size: 13px; line-height: 1.45; font-weight: 400; }
.data-badge, .system-state {
  display: inline-flex; align-items: center; min-height: 28px; border-radius: 999px; padding: 0 10px;
  background: var(--navy-soft); color: var(--navy); font-size: 10px; font-weight: 900; letter-spacing: .07em;
}
.data-badge.live { color: var(--green); background: #e9f7ef; }

.nearby-list, .route-results, .saved-list { display: grid; gap: 10px; }
.stop-card, .route-card, .saved-item {
  border: 1px solid var(--line); border-radius: 18px; background: white; padding: 15px;
}
.stop-card-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.stop-name { font-weight: 900; font-size: 16px; line-height: 1.2; }
.stop-distance { color: var(--muted); font-size: 12px; margin-top: 4px; }
.walk-chip { flex: none; background: var(--surface); border-radius: 999px; padding: 7px 9px; font-size: 11px; font-weight: 800; }
.line-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.line-pill {
  min-width: 31px; height: 31px; padding: 0 8px; border-radius: 9px; display: inline-grid; place-items: center;
  background: var(--navy); color: white; font-weight: 900; font-size: 12px;
}
.departures { margin-top: 12px; display: grid; gap: 7px; }
.departure-row { display: grid; grid-template-columns: 42px 1fr auto; align-items: center; gap: 9px; font-size: 12px; }
.departure-line { font-weight: 900; color: var(--navy); }
.departure-destination { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #42464b; }
.departure-time { font-weight: 900; }
.live-dot { color: var(--green); font-size: 9px; margin-right: 4px; }

.route-summary {
  margin: 13px 0 10px; padding: 16px; border-left: 4px solid var(--red); border-radius: 0 14px 14px 0; background: #f7f8fa;
  color: #30353a; font-size: 13px;
}
.route-summary-leave { color: var(--red); font-size: 15px; font-weight: 900; letter-spacing: .02em; }
.route-summary-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-top: 12px; }
.route-summary-item { padding: 10px; border-radius: 11px; background: #fff; border: 1px solid var(--line); }
.route-summary-item span { display: block; color: var(--muted); font-size: 8px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.route-summary-item strong { display: block; margin-top: 3px; font-size: 14px; font-weight: 900; color: var(--ink); }
.route-summary-item small { display: block; margin-top: 3px; color: var(--muted); font-size: 8.5px; line-height: 1.3; font-weight: 450; }
.route-card { position: relative; overflow: hidden; }
.route-card.recommended { border: 2px solid var(--red); animation: recommendedPulse 2.15s ease-in-out infinite; }
@keyframes recommendedPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(112,21,46,.10), 0 8px 22px rgba(18,24,31,.05); }
  50% { box-shadow: 0 0 0 7px rgba(112,21,46,.13), 0 12px 30px rgba(112,21,46,.10); }
}
@media (prefers-reduced-motion: reduce) { .route-card.recommended { animation: none; } }
.recommended-guide { margin-top: 14px; padding: 12px; border-radius: 13px; background: #fff7f7; border: 1px solid rgba(112,21,46,.18); }
.recommended-guide-title { color: var(--red); font-size: 9px; font-weight: 900; letter-spacing: .09em; }
.recommended-guide-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; margin-top: 9px; }
.recommended-guide-item { min-width: 0; }
.recommended-guide-item span { display: block; color: var(--muted); font-size: 8px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.recommended-guide-item strong { display: block; margin-top: 3px; color: var(--ink); font-size: 12px; font-weight: 900; }
.recommended-guide-item small { display: block; margin-top: 3px; color: var(--muted); font-size: 8px; line-height: 1.25; font-weight: 450; }
.route-ribbon { position: absolute; top: 0; right: 0; background: var(--red); color: white; padding: 6px 11px; border-radius: 0 16px 0 12px; font-size: 9px; font-weight: 900; letter-spacing: .08em; }
.route-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.route-label { font-size: 11px; color: var(--red); font-weight: 900; letter-spacing: .08em; }
.route-time { font-size: 25px; font-weight: 950; letter-spacing: -.04em; margin-top: 3px; }
.route-meta { color: var(--muted); font-size: 12px; margin-top: 4px; }
.route-arrival { text-align: right; }
.route-arrival strong { display: block; font-size: 17px; }
.route-arrival span { color: var(--muted); font-size: 11px; }
.route-card.recommended .route-arrival {
  padding-top: 28px;
  min-width: 86px;
}
.leg-strip { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin-top: 15px; }
.leg-chip { display: inline-flex; align-items: center; gap: 5px; min-height: 31px; padding: 0 9px; border-radius: 9px; background: var(--surface); font-size: 11px; font-weight: 800; }
.leg-chip.bus { background: var(--navy); color: white; }
.leg-arrow { color: #9aa0a6; font-size: 12px; }
.route-stats { margin-top: 13px; display: grid; grid-template-columns: repeat(3,1fr); gap: 6px; }
.route-stat { background: var(--surface); border-radius: 10px; padding: 8px; }
.route-stat span { display: block; font-size: 9px; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; font-weight: 800; }
.route-stat strong { display: block; margin-top: 2px; font-size: 12px; }
.route-actions { margin-top: 13px; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.secondary-btn, .ghost-btn {
  min-height: 42px; border-radius: 11px; font-weight: 850; border: 1px solid var(--line); background: white; color: var(--navy);
}
.secondary-btn.primary-small { background: var(--navy); color: white; border-color: var(--navy); }
.ghost-btn { min-height: 38px; padding: 0 13px; }

.journey-panel {
  margin-top: 24px; border-radius: 22px; padding: 18px; background: var(--navy); color: white;
  box-shadow: 0 18px 50px rgba(0,31,84,.24);
}
.journey-panel .eyebrow { color: var(--red); background: #fff; display: inline-flex; align-items: center; min-height: 24px; padding: 0 9px; border-radius: 999px; letter-spacing: .11em; }
.journey-panel-head { display: flex; justify-content: space-between; gap: 12px; }
.journey-panel h2 { margin: 0; font-size: 22px; }
.journey-panel .ghost-btn { color: white; border-color: rgba(255,255,255,.25); background: rgba(255,255,255,.08); }
.journey-now { margin-top: 16px; background: rgba(255,255,255,.08); border-radius: 16px; padding: 15px; }
.journey-now strong { font-size: 18px; display: block; }
.journey-now span { margin-top: 5px; color: rgba(255,255,255,.94); display: block; font-size: 12px; }
.journey-progress { height: 5px; border-radius: 999px; background: rgba(255,255,255,.18); margin-top: 14px; overflow: hidden; }
.journey-progress span { height: 100%; width: 0; display: block; background: white; border-radius: inherit; transition: width .5s; }
.journey-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 13px; }
.journey-actions .secondary-btn { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.2); color: white; }

.saved-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.saved-main { min-width: 0; }
.saved-name { font-weight: 900; }
.saved-address { color: var(--muted); font-size: 12px; margin-top: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.saved-actions { display: flex; gap: 6px; flex: none; }
.small-square { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); font-weight: 900; color: var(--navy); }

.system-card { margin-top: 34px; overflow: hidden; box-shadow: none; }
.system-row { padding: 13px 15px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.system-row:last-child { border-bottom: 0; }
.system-row strong { display: block; font-size: 12px; }
.system-row span:not(.system-state) { display: block; margin-top: 2px; font-size: 10px; color: var(--muted); }
.footer { margin-top: 25px; border-top: 1px solid var(--line); padding-top: 18px; text-align: center; color: var(--muted); font-size: 10px; line-height: 1.55; }
.footer p { margin: 3px 0; }
.footer a { text-decoration: underline; }

.skeleton-card { height: 142px; border-radius: 18px; background: linear-gradient(90deg,#f1f2f3,#fafafa,#f1f2f3); background-size: 200% 100%; animation: shimmer 1.4s infinite; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.spinner { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: spin .75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.toast {
  position: fixed; z-index: 80; left: 50%; bottom: calc(22px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: #14171a; color: white; border-radius: 999px; padding: 11px 15px; font-size: 12px; font-weight: 750;
  box-shadow: 0 12px 30px rgba(0,0,0,.2); max-width: calc(100% - 30px); text-align: center;
}
.modal-backdrop {
  position: fixed; inset: 0; z-index: 100; background: rgba(10,12,15,.46); display: flex; align-items: flex-end; justify-content: center;
  padding: 14px;
}
.modal { width: min(100%,700px); max-height: 84vh; overflow: auto; background: white; border-radius: 24px; padding: 18px; box-shadow: 0 24px 70px rgba(0,0,0,.25); }
.modal-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.modal-header h2 { margin: 0; font-size: 24px; }
.modal-body { margin-top: 14px; color: #40454a; font-size: 14px; line-height: 1.55; }
.modal-body p:first-child { margin-top: 0; }
.modal-body .detail-leg { border: 1px solid var(--line); border-radius: 14px; padding: 12px; margin: 8px 0; }
.modal-body .detail-leg strong { display: block; color: var(--ink); }
.modal-body .detail-leg span { display: block; color: var(--muted); margin-top: 3px; font-size: 12px; }
.modal-actions { margin-top: 16px; display: grid; gap: 8px; }
.modal-actions .primary-btn { margin: 0; }

.empty-state { border: 1px dashed #cfd3d7; border-radius: 16px; padding: 18px; text-align: center; color: var(--muted); font-size: 13px; }
.error-card { border-color: #f0c6c8; background: #fff7f7; }
.error-card strong { color: var(--red); }


.status-wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.location-fallback-btn {
  border: 0; background: transparent; color: var(--navy); font-weight: 850; font-size: 11px;
  text-decoration: underline; text-underline-offset: 3px; padding: 5px 0;
}
.manual-start-box { display: grid; gap: 10px; margin-top: 10px; }
.manual-start-box input { width: 100%; min-height: 48px; border: 1px solid var(--line); border-radius: 12px; padding: 0 13px; font: inherit; color: var(--ink); background: white; }
.manual-result-list { display: grid; gap: 7px; }
.manual-result { border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 11px 12px; text-align: left; color: var(--ink); }
.manual-result strong, .manual-result span { display: block; }
.manual-result span { margin-top: 3px; color: var(--muted); font-size: 11px; }
.cache-note { margin: 0 0 10px; padding: 9px 11px; border-radius: 10px; background: #fff7e8; color: #795300; font-size: 11px; font-weight: 750; }

@media (max-width: 620px) {
  .app-shell { padding-left: 14px; padding-right: 14px; }
  .topbar { min-height: 70px; }
  main { padding-top: 24px; }
  .quick-places { grid-template-columns: repeat(2,1fr); }
  .advanced-options { grid-template-columns: 1fr; }
  .route-stats { grid-template-columns: repeat(3,1fr); }
}

@media (max-width: 390px) {
  .brand-sub { display: none; }
  .quick-place { min-height: 82px; padding: 10px; }
  .quick-place-copy small { font-size: 8.7px; }
  .route-summary-grid, .recommended-guide-grid { grid-template-columns: 1fr; }
  .route-actions, .journey-actions { grid-template-columns: 1fr; }
}

/* MAX BUS — szczegółowa oś podróży */
.recommended-guide.timeline-guide {
  padding: 14px;
  background: linear-gradient(180deg, #fff8f8 0%, #ffffff 100%);
}
.travel-timeline { margin-top: 12px; display: grid; gap: 0; }
.travel-step {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  position: relative;
  min-width: 0;
}
.travel-step:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 20px;
  top: 40px;
  bottom: -4px;
  width: 2px;
  background: #dfe3e8;
}
.travel-step-icon {
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: #fff;
  border: 1px solid var(--line);
  font-size: 20px;
  z-index: 1;
}
.travel-step.bus .travel-step-icon { background: var(--navy); border-color: var(--navy); }
.travel-step.walk .travel-step-icon { background: #fff; }
.travel-step.destination .travel-step-icon { background: var(--red); border-color: var(--red); }
.travel-step-content { padding: 3px 0 17px; min-width: 0; }
.travel-step-kicker { color: var(--muted); font-size: 8px; font-weight: 900; letter-spacing: .09em; text-transform: uppercase; }
.travel-step-title { margin-top: 2px; color: var(--ink); font-size: 13px; line-height: 1.35; font-weight: 900; }
.travel-step-sub { margin-top: 3px; color: var(--muted); font-size: 10px; line-height: 1.4; font-weight: 500; }
.travel-step-time { color: var(--red); font-weight: 900; }
.bus-stop-list {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.bus-stop-row {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 8px 9px;
  border-bottom: 1px solid #eef0f2;
  min-width: 0;
}
.bus-stop-row:last-child { border-bottom: 0; }
.bus-stop-dot { width: 9px; height: 9px; border-radius: 50%; background: #aeb4bb; justify-self: center; }
.bus-stop-row.board .bus-stop-dot { background: var(--navy); box-shadow: 0 0 0 4px rgba(0,47,108,.10); }
.bus-stop-row.alight .bus-stop-dot { background: var(--red); box-shadow: 0 0 0 4px rgba(112,21,46,.10); }
.bus-stop-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #34383d; font-size: 9.5px; font-weight: 650; }
.bus-stop-row.board .bus-stop-name, .bus-stop-row.alight .bus-stop-name { color: var(--ink); font-weight: 900; }
.bus-stop-time { color: var(--muted); font-size: 9px; font-weight: 800; white-space: nowrap; }
.bus-stop-tag { margin-left: 5px; color: var(--red); font-size: 7px; font-weight: 950; letter-spacing: .05em; }

.journey-distance-card {
  margin-top: 12px;
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 11px;
  align-items: center;
  padding: 13px;
  border-radius: 16px;
  background: rgba(255,255,255,.11);
  border: 1px solid rgba(255,255,255,.13);
  position: relative;
  overflow: hidden;
}
.journey-distance-icon {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,.12);
  font-size: 23px;
}
.journey-distance-copy { min-width: 0; }
.journey-distance-label { display: block; font-size: 8px; letter-spacing: .11em; font-weight: 900; color: rgba(255,255,255,.92); }
.journey-distance-copy strong { display: block; margin-top: 2px; font-size: 26px; line-height: 1; letter-spacing: -.035em; }
.journey-distance-copy small { display: block; margin-top: 5px; color: rgba(255,255,255,.90); font-size: 9px; line-height: 1.35; }
.journey-distance-track { grid-column: 1 / -1; height: 4px; border-radius: 999px; background: rgba(255,255,255,.16); overflow: hidden; }
.journey-distance-track span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--red); transition: width .7s ease; }
.journey-progress-wrap { margin-top: 13px; }
.journey-progress-label { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: rgba(255,255,255,.7); font-size: 8px; font-weight: 750; }
.journey-progress-label strong { color: white; font-size: 9px; }
.journey-progress-wrap .journey-progress { margin-top: 6px; }

.journey-live-timeline {
  margin-top: 15px;
  display: grid;
  gap: 8px;
}
.live-step {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 10px;
  padding: 11px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.11);
  background: rgba(255,255,255,.055);
  opacity: .58;
  transition: opacity .25s, background .25s, border-color .25s, transform .25s;
}
.live-step.current {
  opacity: 1;
  background: rgba(255,255,255,.13);
  border-color: rgba(255,255,255,.34);
  transform: translateY(-1px);
}
.live-step.done { opacity: .38; }
.live-step-icon {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: rgba(255,255,255,.10);
  display: grid;
  place-items: center;
  font-size: 17px;
}
.live-step.current .live-step-icon { background: var(--red); }
.live-step-copy { min-width: 0; }
.live-step-copy strong { display: block; font-size: 11px; line-height: 1.3; }
.live-step-copy span { display: block; margin-top: 3px; font-size: 9px; line-height: 1.4; color: rgba(255,255,255,.90); }
.live-stop-list { margin-top: 8px; display: grid; gap: 4px; }
.live-stop {
  display: grid;
  grid-template-columns: 13px 1fr auto;
  gap: 6px;
  align-items: center;
  color: rgba(255,255,255,.78);
  font-size: 8.5px;
  min-width: 0;
}
.live-stop::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.32); justify-self: center; }
.live-stop.passed { color: rgba(255,255,255,.56); text-decoration: line-through; text-decoration-thickness: .5px; }
.live-stop.current { color: #fff; font-weight: 900; }
.live-stop.current::before { width: 9px; height: 9px; background: var(--red); box-shadow: 0 0 0 4px rgba(112,21,46,.22); }
.live-stop.upcoming { color: rgba(255,255,255,.94); }
.live-stop-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-stop-time { white-space: nowrap; color: inherit; }
.live-gps-note { margin-top: 7px; color: rgba(255,255,255,.92); font-size: 8.5px; font-weight: 750; }

@media (max-width: 390px) {
  .travel-step { grid-template-columns: 38px 1fr; gap: 8px; }
  .travel-step-icon { width: 38px; height: 38px; border-radius: 12px; font-size: 18px; }
  .travel-step:not(:last-child)::after { left: 18px; top: 37px; }
  .bus-stop-row { grid-template-columns: 15px 1fr auto; gap: 6px; padding: 7px 7px; }
  .bus-stop-name { font-size: 8.8px; }
  .bus-stop-time { font-size: 8.2px; }
}

/* MAX BUS V1.3 — panel TERAZ + profesjonalne ikony monochromatyczne */
.now-card {
  margin-bottom: 22px;
  padding: 17px;
  display: grid;
  grid-template-columns: minmax(126px, .72fr) 1.8fr;
  gap: 16px;
  align-items: stretch;
  box-shadow: 0 10px 28px rgba(0,31,84,.07);
}
.now-time-block {
  min-height: 112px;
  border-radius: 17px;
  background: var(--navy);
  color: #fff;
  padding: 15px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.now-kicker { color: rgba(255,255,255,.92); font-size: 9px; font-weight: 900; letter-spacing: .12em; }
.now-time { display: block; margin-top: 3px; font-size: clamp(34px, 8vw, 48px); line-height: .98; letter-spacing: -.055em; font-weight: 900; }
.now-date { display: block; margin-top: 8px; color: rgba(255,255,255,.96); font-size: 10px; line-height: 1.4; font-weight: 500; }
.now-context-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.now-context-item {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  padding: 13px;
  display: flex;
  align-items: center;
  gap: 11px;
}
.now-context-icon {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: var(--navy-soft);
  color: var(--navy);
}
.now-context-icon svg, .mono-icon, .ui-icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.now-context-copy { min-width: 0; }
.now-context-copy > span { display: block; color: var(--muted); font-size: 8px; font-weight: 900; letter-spacing: .1em; }
.now-context-copy > strong { display: block; margin-top: 3px; color: var(--ink); font-size: 13px; line-height: 1.25; font-weight: 900; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.now-context-copy > small { display: block; margin-top: 4px; color: var(--muted); font-size: 8.5px; line-height: 1.35; font-weight: 450; }
.weather-item .now-context-icon { background: #fff0f1; color: var(--red); }
.weather-item .now-context-copy > strong { color: var(--red); font-size: 19px; letter-spacing: -.025em; }

.travel-step-icon, .live-step-icon, .journey-distance-icon { color: var(--navy); }
.travel-step-icon .ui-icon, .travel-step-icon .mono-icon { width: 21px; height: 21px; }
.travel-step.bus .travel-step-icon, .travel-step.destination .travel-step-icon { color: #fff; }
.journey-distance-icon { color: #fff; }
.journey-distance-icon .mono-icon { width: 23px; height: 23px; }
.live-step-icon { color: #fff; }
.live-step-icon .ui-icon { width: 18px; height: 18px; }
.inline-ui-icon {
  display: inline-flex;
  vertical-align: -3px;
  margin-right: 4px;
  color: currentColor;
}
.inline-ui-icon .ui-icon { width: 15px; height: 15px; }
.leg-chip .inline-ui-icon { margin-right: 1px; vertical-align: -2px; }
.journey-now-title {
  display: flex;
  align-items: center;
  gap: 8px;
}
.journey-now-title .ui-icon { width: 20px; height: 20px; flex: none; }

@media (max-width: 620px) {
  .now-card { grid-template-columns: 1fr; gap: 10px; padding: 13px; }
  .now-time-block { min-height: 94px; }
  .now-context-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 390px) {
  .now-context-grid { grid-template-columns: 1fr; }
  .now-context-item { min-height: 70px; }
}


/* MAX BUS V1.4 — głębszy granat, bordowy akcent i wysoki kontrast */
.journey-panel, .now-time-block { --panel-text: #ffffff; }
.journey-panel h2, .journey-now strong, .journey-panel-head h2, .journey-progress-label, .live-step-copy strong { color: #fff; }
.journey-now span, .live-step-copy span, .live-stop, .live-stop.upcoming, .live-gps-note { color: rgba(255,255,255,.92); }
.live-stop.passed { color: rgba(255,255,255,.58); }
.now-kicker, .now-date { color: #fff; }


.route-favorite-btn {
  width: 100%;
  margin-top: 9px;
  min-height: 42px;
  border-radius: 11px;
  border: 1px solid rgba(112,21,46,.28);
  background: #fff;
  color: var(--red);
  font-weight: 850;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.route-favorite-btn .fav-star {
  font-size: 17px;
  line-height: 1;
}
.route-favorite-btn:active { transform: translateY(1px); }
