/* Mobile production polish: keep the core desktop layout unchanged. */
@media (max-width: 900px) {
  .header-inner { width: min(100% - 28px, 1180px); }
  .hero { padding: 42px 16px 104px; }
  .app-shell { width: min(100% - 20px, 1220px); margin-top: -62px; }
  .workspace { grid-template-columns: 1fr; gap: 14px; }
  .control-card { position: static; }
  .results-card { min-height: 0; }
  #map { height: min(58vw, 390px); min-height: 280px; }
  .result-header { padding: 20px 18px 16px; flex-direction: column; }
  .result-score { width: 100%; min-width: 0; }
  .trip-summary { padding: 14px 18px 0; }
  .event-list { padding: 14px 18px 24px; }
  .watch-cta { margin-left: 18px; margin-right: 18px; }
}

@media (max-width: 560px) {
  .site-header { position: relative; }
  .header-inner { min-height: 60px; }
  .header-meta { font-size: .72rem; }
  .hero { padding: 34px 14px 92px; }
  .hero h1 { font-size: clamp(2.15rem, 12vw, 3.3rem); }
  .hero p { font-size: .96rem; line-height: 1.55; }
  .trust-row { gap: 8px 14px; margin-top: 18px; font-size: .78rem; }
  .app-shell { width: calc(100% - 12px); margin-top: -54px; }
  .control-card, .results-card { border-radius: 18px; }
  .control-card { padding: 12px; }
  .tabs { gap: 3px; }
  .tab { min-height: 42px; padding: 9px 4px; font-size: .75rem; }
  .tab-panel { padding-top: 18px; }
  .panel-heading h2 { font-size: 1.3rem; }
  .route-fields .field-with-marker { padding-left: 18px; }
  .field-with-marker::before { left: 1px; }
  .route-fields::before { left: 5px; }
  .swap-btn { right: 5px; top: 76px; width: 34px; height: 34px; }
  button.primary { min-height: 52px; margin-top: 14px; }
  .save-row { grid-template-columns: 1fr; flex-direction: column; }
  .save-row button { min-height: 42px; }
  .result-header { padding: 18px 15px 14px; }
  .result-intro p { font-size: .82rem; }
  .map-wrap { margin: 0 10px; }
  #map { height: 62vw; min-height: 250px; max-height: 330px; border-radius: 13px; }
  .map-legend { left: 8px; bottom: 8px; right: 8px; justify-content: center; font-size: .66rem; }
  .summary-grid { grid-template-columns: 1fr 1fr; }
  .summary-item { border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); }
  .summary-item:nth-child(2n) { border-right: 0; }
  .summary-item:nth-last-child(-n+2) { border-bottom: 0; }
  .trip-summary { padding: 12px 15px 0; }
  .watch-cta { margin: 12px 15px 0; padding: 14px; }
  .watch-cta button { min-height: 50px; font-size: .82rem; }
  .event-list { padding: 12px 15px 20px; }
  footer { padding-left: 15px; padding-right: 15px; }
  footer p { font-size: .72rem; line-height: 1.55; }
}

/* Make keyboard focus and touch targets clearly usable on mobile. */
button, a { -webkit-tap-highlight-color: transparent; }
@media (pointer: coarse) {
  button.primary, .watch-cta button, .tab, .swap-btn, .save-row button, button.link, .chip { min-height: 42px; }
  .place-suggestion { min-height: 48px; }
}

/* Compact hero on phones so the route form and "Route prüfen" button are above the fold (P2-4). */
@media (max-width: 560px) {
  .hero { padding: 20px 14px 66px; }
  .hero .eyebrow { font-size: .68rem; }
  .hero h1 { margin: 10px 0 0; font-size: clamp(1.7rem, 8.6vw, 2.15rem); line-height: 1.05; }
  .hero p { display: none; }
  .trust-row { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 12px; font-size: .74rem; }
  .app-shell { margin-top: -46px; }
  .tab-panel { padding-top: 12px; }
}
