/* ============================================================
   Rowerowy Szczyrk — Styles (Mobile-First)
   Light / Dark theme — WCAG 2.1 AA contrast
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overscroll-behavior-y: contain; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh; min-height: 100dvh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  transition: background 0.3s, color 0.3s;
}
body.has-active-filters {
  padding-bottom: calc(128px + env(safe-area-inset-bottom, 0px));
}

/* ── DARK THEME (default) ─────────────────────────────────── */
/* Contrast targets:
   --text-primary on --bg-primary:  #f1f5f9 on #0f1923 ≈ 14.5:1  ✓ AAA
   --text-secondary on --bg-card:   #c5cdd5 on #1a2738 ≈  8.2:1  ✓ AAA
   --text-label on --bg-card:       #90a4ae on #1a2738 ≈  5.3:1  ✓ AA
   --text-label on --bg-primary:    #90a4ae on #0f1923 ≈  5.8:1  ✓ AA  */
:root, [data-theme="dark"] {
  --bg-primary: #0f1923;
  --bg-secondary: #162032;
  --bg-card: #1a2738;
  --bg-card-alt: #1e2d40;
  --bg-surface: rgba(255,255,255,0.05);
  --bg-surface-hover: rgba(255,255,255,0.10);

  --accent: #FC4C02;
  --accent-hover: #e04400;
  --accent-bg: rgba(252,76,2,0.12);

  --trail-green: #22c55e; --trail-green-bg: rgba(34,197,94,0.15);
  --trail-blue: #3b82f6;  --trail-blue-bg: rgba(59,130,246,0.15);
  --trail-red: #ef4444;   --trail-red-bg: rgba(239,68,68,0.15);
  --trail-black: #a1a1aa; --trail-black-bg: rgba(161,161,170,0.15);

  --text-primary: #f1f5f9;
  --text-secondary: #c5cdd5;
  --text-label: #90a4ae;

  --border: rgba(255,255,255,0.08);
  --border-active: rgba(255,255,255,0.20);

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.3);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.4);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.5);

  --nav-bg: #0c1520;
  --nav-border: rgba(255,255,255,0.10);
  --nav-active-bg: rgba(252,76,2,0.08);
  --nav-divider: rgba(255,255,255,0.06);

  --logo-filter: brightness(0) invert(1);
  --ebike-bg: rgba(5,150,105,0.18);
  --ebike-color: #34d399;
  --ebike-border: rgba(52,211,153,0.25);
  --cta-gradient: linear-gradient(135deg,#1e3a5f 0%,#1e40af 100%);
}

/* ── LIGHT THEME ──────────────────────────────────────────── */
/* Contrast targets:
   --text-primary on --bg-primary:  #111827 on #f4f5f7 ≈ 15.5:1  ✓ AAA
   --text-secondary on --bg-card:   #3f4a5a on #ffffff ≈  9.0:1  ✓ AAA
   --text-label on --bg-card:       #546e7a on #ffffff ≈  5.6:1  ✓ AA
   --text-label on --bg-primary:    #546e7a on #f4f5f7 ≈  5.1:1  ✓ AA  */
[data-theme="light"] {
  --bg-primary: #f4f5f7;
  --bg-secondary: #ecedef;
  --bg-card: #ffffff;
  --bg-card-alt: #f9fafb;
  --bg-surface: rgba(0,0,0,0.04);
  --bg-surface-hover: rgba(0,0,0,0.07);

  --accent: #e04400;
  --accent-hover: #c73d00;
  --accent-bg: rgba(224,68,0,0.08);

  --trail-green: #15803d; --trail-green-bg: rgba(21,128,61,0.10);
  --trail-blue: #1d4ed8;  --trail-blue-bg: rgba(29,78,216,0.10);
  --trail-red: #b91c1c;   --trail-red-bg: rgba(185,28,28,0.08);
  --trail-black: #3f3f46; --trail-black-bg: rgba(63,63,70,0.10);

  --text-primary: #111827;
  --text-secondary: #3f4a5a;
  --text-label: #546e7a;

  --border: rgba(0,0,0,0.09);
  --border-active: rgba(0,0,0,0.20);

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 32px rgba(0,0,0,0.10);

  --nav-bg: #ffffff;
  --nav-border: rgba(0,0,0,0.10);
  --nav-active-bg: rgba(224,68,0,0.06);
  --nav-divider: rgba(0,0,0,0.06);

  --logo-filter: none;
  --ebike-bg: rgba(5,150,105,0.10);
  --ebike-color: #0d7c52;
  --ebike-border: rgba(5,150,105,0.20);
  --cta-gradient: linear-gradient(135deg,#1e40af 0%,#2563eb 100%);
}

/* ── Shared design tokens ─────────────────────────────────── */
:root {
  --radius-sm: 10px;  --radius-md: 14px;
  --radius-lg: 16px;  --radius-xl: 20px;
  --radius-full: 9999px;
  --space-xs: 4px;  --space-sm: 8px;  --space-md: 12px;
  --space-lg: 16px; --space-xl: 20px; --space-2xl: 28px;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

::-webkit-scrollbar { width: 0; height: 0; }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Layout ───────────────────────────────────────────────── */
#app { max-width: 100%; overflow-x: hidden; }
.container { max-width: 640px; margin: 0 auto; padding: 0 var(--space-lg); }

/* ── Header ───────────────────────────────────────────────── */
.header {
  padding: calc(var(--safe-top) + var(--space-xl)) var(--space-lg) var(--space-md);
  max-width: 640px; margin: 0 auto;
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}
.header__left { flex: 1; }
.header__logo {
  height: 28px; width: auto;
  filter: var(--logo-filter);
  opacity: 0.85; margin-bottom: 10px; display: block;
}
.header__title {
  font-size: 26px; font-weight: 900; color: var(--text-primary);
  letter-spacing: -0.5px; line-height: 1.2;
}
.header__subtitle { font-size: 14px; color: var(--text-label); display: none; }

/* Theme toggle */
.theme-toggle {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--border); background: var(--bg-surface);
  color: var(--text-primary); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0; margin-top: 4px;
  transition: background 0.2s, border-color 0.2s;
}
.theme-toggle:active { transform: scale(0.9); }

/* ── Search ───────────────────────────────────────────────── */
.search { position: relative; margin-bottom: var(--space-md); }
.search__icon {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  font-size: 16px; pointer-events: none; color: var(--text-label);
}
.search__input {
  width: 100%; padding: 15px 48px 15px 46px;
  border-radius: var(--radius-md); border: 1px solid var(--border);
  background: var(--bg-surface); color: var(--text-primary);
  font-size: 16px; font-family: inherit; outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.search__input::placeholder { color: var(--text-label); }
.search__input:focus { border-color: var(--accent); background: var(--bg-surface-hover); }
.search__clear {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--text-label);
  cursor: pointer; font-size: 20px; padding: 10px; display: none; line-height: 1;
}
.search__clear--visible { display: block; }

/* ── Filter Chips ─────────────────────────────────────────── */
.chips-row {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px;
  margin-bottom: var(--space-sm); scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.chips-row::-webkit-scrollbar { display: none; }

.chip {
  flex-shrink: 0; border: 1px solid var(--border); cursor: pointer;
  white-space: nowrap; padding: 10px 18px; border-radius: var(--radius-full);
  font-size: 14px; font-weight: 600; font-family: inherit;
  transition: all 0.2s ease; background: var(--bg-surface);
  color: var(--text-secondary); scroll-snap-align: start;
  min-height: 44px; display: flex; align-items: center; gap: 5px;
}
.chip:active { transform: scale(0.95); }
.chip--active { background: var(--accent); color: #fff; border-color: var(--accent); }
.chip--diff-green.chip--active { background: var(--trail-green); border-color: var(--trail-green); color: #fff; }
.chip--diff-blue.chip--active  { background: var(--trail-blue); border-color: var(--trail-blue); color: #fff; }
.chip--diff-red.chip--active   { background: var(--trail-red); border-color: var(--trail-red); color: #fff; }
.chip--diff-black.chip--active { background: #52525b; border-color: #52525b; color: #fff; }
.chip--ebike.chip--active      { background: #059669; border-color: #059669; color: #fff; }

/* ── Sort & Results ───────────────────────────────────────── */
.toolbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--space-md); padding: 0 2px; flex-wrap: wrap; gap: 6px;
}
.toolbar__count { font-size: 14px; color: var(--text-label); font-weight: 500; }
.toolbar__sort { display: flex; align-items: center; gap: 4px; }
.toolbar__sort-label { font-size: 13px; color: var(--text-label); margin-right: 2px; }
.sort-btn {
  border: none; cursor: pointer; padding: 8px 12px;
  border-radius: var(--radius-full); font-size: 13px; font-weight: 600;
  font-family: inherit; background: transparent; color: var(--text-label);
  transition: all 0.2s; min-height: 36px;
}
.sort-btn:active { transform: scale(0.95); }
.sort-btn--active { background: var(--accent-bg); color: var(--accent); }

/* ── Trail Cards ──────────────────────────────────────────── */
.trail-list { display: flex; flex-direction: column; gap: 10px; padding-bottom: var(--space-lg); }

.trail-card {
  background: var(--bg-card); border-radius: var(--radius-lg);
  border: 1px solid var(--border); cursor: pointer;
  transition: all 0.25s ease; overflow: hidden;
}
.trail-card:active { transform: scale(0.985); }
.trail-card--open { border-color: var(--border-active); box-shadow: var(--shadow-md); }

.trail-card__header { padding: 16px; display: flex; align-items: center; gap: 14px; }

.trail-card__dot-wrap {
  width: 48px; height: 48px; border-radius: var(--radius-md);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.trail-card__dot { width: 20px; height: 20px; border-radius: 50%; }

.trail-card__info { flex: 1; min-width: 0; }
.trail-card__name-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.trail-card__name { font-size: 16px; font-weight: 700; color: var(--text-primary); line-height: 1.3; }
.trail-card__ebike {
  font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 5px;
  background: var(--ebike-bg); color: var(--ebike-color);
  border: 1px solid var(--ebike-border); white-space: nowrap;
}
.trail-card__meta { font-size: 14px; color: var(--text-secondary); margin-top: 3px; line-height: 1.4; }

.trail-card__arrow {
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  background: var(--bg-surface); display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: transform 0.25s ease; font-size: 12px; color: var(--text-label);
}
.trail-card--open .trail-card__arrow { transform: rotate(180deg); }

/* Card Details */
.trail-card__details { padding: 0 16px 18px; animation: fadeIn 0.25s ease; }
.trail-card__divider { height: 1px; background: var(--border); margin-bottom: 14px; }
.trail-card__type { font-size: 12px; font-weight: 600; color: var(--text-label); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 6px; }
.trail-card__desc { font-size: 15px; line-height: 1.65; color: var(--text-secondary); margin-bottom: 16px; }

.trail-card__stats { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-bottom: 14px; }
.trail-card__stat { background: var(--bg-surface); border-radius: var(--radius-sm); padding: 12px; }
.trail-card__stat-label { font-size: 11px; font-weight: 600; color: var(--text-label); text-transform: uppercase; letter-spacing: 0.4px; }
.trail-card__stat-value { font-size: 14px; font-weight: 700; color: var(--text-primary); margin-top: 3px; }

.trail-card__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.trail-card__tag { font-size: 12px; padding: 4px 10px; border-radius: var(--radius-full); font-weight: 600; }

.trail-card__who { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.trail-card__who-tag { font-size: 12px; padding: 4px 10px; border-radius: var(--radius-full); background: var(--bg-surface); color: var(--text-secondary); font-weight: 500; }

.trail-card__links { display: flex; flex-wrap: wrap; gap: 8px; }
.trail-card__link {
  display: inline-flex; align-items: center; gap: 5px; font-size: 13px;
  font-weight: 700; padding: 10px 16px; border-radius: var(--radius-sm);
  text-decoration: none; transition: opacity 0.2s; min-height: 44px;
}
.trail-card__link:active { opacity: 0.8; }
.trail-card__link--bikepark { background: var(--accent); color: #fff; }
.trail-card__link--trailforks { background: #0d9488; color: #fff; }
.trail-card__link--strava { background: #FC4C02; color: #fff; }
.trail-card__link--komoot { background: #65a30d; color: #fff; }

/* Bike Type Badge */
.bike-types-row { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.bike-type-badge {
  font-size: 12px; padding: 4px 10px; border-radius: var(--radius-full);
  background: var(--bg-surface); color: var(--text-secondary);
  font-weight: 600; display: inline-flex; align-items: center; gap: 3px;
}

/* Empty State */
.empty-state { text-align: center; padding: 48px 20px; color: var(--text-secondary); }
.empty-state__icon { font-size: 48px; margin-bottom: 12px; display: block; }
.empty-state__text { font-size: 16px; font-weight: 500; }
.empty-state__hint { font-size: 14px; color: var(--text-label); margin-top: 4px; }

/* ── Active Filters Bar (sticky above bottom nav) ─────────── */
.active-filters {
  position: fixed; bottom: calc(62px + var(--safe-bottom)); left: 0; right: 0;
  background: var(--nav-bg); border-top: 1px solid var(--nav-border);
  z-index: 99; padding: 8px 16px;
  display: flex; align-items: center; gap: 8px;
  max-width: 100%;
}
.active-filters__tags {
  display: flex; gap: 6px; overflow-x: auto; flex: 1;
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.active-filters__tags::-webkit-scrollbar { display: none; }

.active-filters__tag {
  flex-shrink: 0; font-size: 12px; font-weight: 600;
  padding: 6px 12px; border-radius: var(--radius-full);
  background: var(--accent-bg); color: var(--accent);
  white-space: nowrap;
}

.active-filters__clear {
  flex-shrink: 0; border: none; cursor: pointer;
  padding: 8px 14px; border-radius: var(--radius-full);
  font-size: 13px; font-weight: 700; font-family: inherit;
  background: var(--accent); color: #fff;
  min-height: 36px; display: flex; align-items: center; gap: 4px;
  transition: opacity 0.2s;
}
.active-filters__clear:active { opacity: 0.8; }

/* ── CTA Banner ───────────────────────────────────────────── */
.cta-banner {
  background: var(--cta-gradient); border-radius: var(--radius-xl);
  padding: 24px; border: 1px solid rgba(255,255,255,0.08); margin: var(--space-xl) 0;
}
.cta-banner__logo { height: 32px; width: auto; filter: brightness(0) invert(1); opacity: 0.85; margin-bottom: 14px; display: block; }
.cta-banner__title { font-size: 20px; font-weight: 800; color: #fff; margin-bottom: 8px; }
.cta-banner__desc { font-size: 14px; color: #bfdbfe; line-height: 1.6; margin-bottom: 18px; }
.cta-banner__buttons { display: flex; gap: 10px; flex-wrap: wrap; }
.cta-banner__btn {
  padding: 13px 24px; border-radius: var(--radius-md); font-weight: 700;
  font-size: 14px; text-decoration: none; font-family: inherit;
  min-height: 48px; display: inline-flex; align-items: center; transition: opacity 0.2s;
}
.cta-banner__btn:active { opacity: 0.85; }
.cta-banner__btn--primary { background: #fff; color: #1e40af; }
.cta-banner__btn--secondary { background: rgba(255,255,255,0.15); color: #fff; border: 1px solid rgba(255,255,255,0.25); }

/* ── Trip Cards ───────────────────────────────────────────── */
.trip-list { display: flex; flex-direction: column; gap: 12px; padding-bottom: var(--space-lg); margin-top: 8px; }

.trip-card {
  background: var(--bg-card); border-radius: var(--radius-lg);
  border: 1px solid var(--border); overflow: hidden;
  transition: all 0.25s ease; cursor: pointer;
}
.trip-card:active { transform: scale(0.985); }
.trip-card--open { border-color: var(--accent); box-shadow: var(--shadow-md); }

.trip-card__header { padding: 18px; }
.trip-card__name { font-size: 17px; font-weight: 800; color: var(--text-primary); margin-bottom: 4px; }
.trip-card__meta { font-size: 13px; color: var(--text-secondary); display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.trip-card__meta-tag {
  display: inline-flex; align-items: center; gap: 3px;
  background: var(--bg-surface); padding: 3px 10px; border-radius: var(--radius-full);
  font-size: 12px; font-weight: 600; color: var(--text-secondary);
}
.trip-card__summary { font-size: 14px; color: var(--text-secondary); line-height: 1.55; padding-right: 44px; }
.trip-card__arrow {
  float: right; margin-top: -32px; margin-right: 0; width: 36px; height: 36px;
  border-radius: var(--radius-sm); background: var(--bg-surface);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; color: var(--text-label); transition: transform 0.25s;
}
.trip-card--open .trip-card__arrow { transform: rotate(180deg); }

.trip-card__details { padding: 0 18px 18px; animation: fadeIn 0.25s ease; }
.trip-card__highlights { list-style: none; padding: 0; margin: 0 0 16px; }
.trip-card__highlight {
  font-size: 14px; color: var(--text-secondary); line-height: 1.5;
  padding: 4px 0; padding-left: 20px; position: relative;
}
.trip-card__highlight::before {
  content: '\2713'; position: absolute; left: 0; color: var(--accent); font-weight: 700;
}

.trip-day {
  background: var(--bg-surface); border-radius: var(--radius-md);
  padding: 16px; margin-bottom: 10px;
}
.trip-day__title { font-size: 15px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.trip-day__drive { font-size: 12px; color: var(--accent); font-weight: 600; margin-bottom: 10px; }

.trip-day__section { margin-bottom: 10px; }
.trip-day__section:last-child { margin-bottom: 0; }
.trip-day__label { font-size: 11px; font-weight: 700; color: var(--text-label); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.trip-day__note { font-size: 14px; color: var(--text-secondary); line-height: 1.5; }
.trip-day__trails { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }
.trip-day__trail-chip {
  font-size: 12px; font-weight: 600; padding: 3px 10px;
  border-radius: var(--radius-full); cursor: pointer;
  text-decoration: none; transition: opacity 0.2s;
}
.trip-day__trail-chip:active { opacity: 0.7; }
.trip-day__activities { font-size: 13px; color: var(--text-label); line-height: 1.5; }

/* ── Bottom Navigation ────────────────────────────────────── */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0;
  background: var(--nav-bg); border-top: 1px solid var(--nav-border);
  display: flex; justify-content: center;
  padding-bottom: var(--safe-bottom); z-index: 100;
}
.bottom-nav__inner { display: flex; width: 100%; max-width: 640px; }

.bottom-nav__item {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  justify-content: center; padding: 8px 0 10px; background: none; border: none;
  border-right: 1px solid var(--nav-divider); cursor: pointer;
  color: var(--text-label); font-size: 11px; font-weight: 600; font-family: inherit;
  transition: all 0.2s; min-height: 62px; gap: 4px; position: relative;
}
.bottom-nav__item:last-child { border-right: none; }
.bottom-nav__item:active { background: var(--bg-surface); }
.bottom-nav__item--active { color: var(--accent); background: var(--nav-active-bg); }
.bottom-nav__item--active::before {
  content: ''; position: absolute; top: 0; left: 20%; right: 20%;
  height: 3px; background: var(--accent); border-radius: 0 0 3px 3px;
}
.bottom-nav__icon { font-size: 24px; line-height: 1; }
.bottom-nav__label { font-size: 11px; letter-spacing: 0.3px; }

/* ── Section Title ────────────────────────────────────────── */
.section-title { padding: 20px 0 12px; }
.section-title__heading { font-size: 22px; font-weight: 800; color: var(--text-primary); }
.section-title__sub { font-size: 14px; color: var(--text-label); margin-top: 4px; }

/* ── Place Cards ──────────────────────────────────────────── */
.place-card { background: var(--bg-card); border-radius: var(--radius-lg); border: 1px solid var(--border); padding: 18px; }
.place-card__header { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 10px; }
.place-card__icon { font-size: 24px; width: 48px; height: 48px; border-radius: var(--radius-md); background: var(--bg-surface); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.place-card__title { font-size: 16px; font-weight: 700; color: var(--text-primary); line-height: 1.3; }
.place-card__area { font-size: 13px; color: var(--text-label); margin-top: 2px; }
.place-card__desc { font-size: 14px; color: var(--text-secondary); line-height: 1.55; margin-bottom: 12px; }
.place-card__footer { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.place-card__drive {
  font-size: 13px; font-weight: 700; color: var(--accent);
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent-bg); padding: 8px 14px;
  border-radius: var(--radius-full); min-height: 40px;
}
.place-card__website {
  font-size: 13px; font-weight: 700; color: #fff; text-decoration: none;
  background: var(--trail-blue); padding: 8px 16px;
  border-radius: var(--radius-sm); min-height: 40px;
  display: inline-flex; align-items: center; gap: 5px;
}
.place-card__website:active { opacity: 0.8; }
.place-list { display: flex; flex-direction: column; gap: 10px; padding-bottom: var(--space-lg); }

/* ── Info Tab ─────────────────────────────────────────────── */
.info-section { background: var(--bg-card); border-radius: var(--radius-lg); border: 1px solid var(--border); padding: 20px; margin-bottom: var(--space-md); }
.info-section__title { font-size: 17px; font-weight: 700; color: var(--text-primary); margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.info-section__icon { font-size: 22px; }
.info-section__text { font-size: 14px; color: var(--text-secondary); line-height: 1.65; margin-bottom: 12px; }
.info-section__text:last-child { margin-bottom: 0; }

.distances-list { display: flex; flex-direction: column; }
.distance-row { display: flex; justify-content: space-between; align-items: center; padding: 13px 0; border-bottom: 1px solid var(--border); }
.distance-row:last-child { border-bottom: none; padding-bottom: 0; }
.distance-row__place { font-size: 14px; color: var(--text-secondary); flex: 1; }
.distance-row__km { font-size: 13px; color: var(--text-label); margin-right: 14px; }
.distance-row__time { font-size: 15px; font-weight: 700; color: var(--accent); white-space: nowrap; }

.amenities-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.amenity-card { background: var(--bg-surface); border-radius: var(--radius-md); padding: 16px; }
.amenity-card__icon { font-size: 26px; margin-bottom: 8px; display: block; }
.amenity-card__name { font-size: 14px; font-weight: 700; color: var(--text-primary); line-height: 1.3; }
.amenity-card__desc { font-size: 12px; color: var(--text-label); margin-top: 4px; line-height: 1.45; }

.info-list { list-style: none; padding: 0; }
.info-list__item { font-size: 14px; color: var(--text-secondary); line-height: 1.6; padding: 8px 0; border-bottom: 1px solid var(--border); display: flex; align-items: flex-start; gap: 10px; }
.info-list__item:last-child { border-bottom: none; }
.info-list__icon { flex-shrink: 0; font-size: 16px; margin-top: 2px; }

.diff-legend-item { display: flex; align-items: flex-start; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.diff-legend-item:last-child { border-bottom: none; }
.diff-legend__dot { width: 22px; height: 22px; border-radius: 50%; flex-shrink: 0; margin-top: 2px; }
.diff-legend__name { font-size: 15px; font-weight: 700; color: var(--text-primary); }
.diff-legend__desc { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }

/* ── Scroll to Top ────────────────────────────────────────── */
.scroll-top {
  position: fixed; bottom: calc(84px + var(--safe-bottom)); right: 16px;
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--accent); color: #fff; border: none; cursor: pointer;
  display: none; align-items: center; justify-content: center;
  font-size: 20px; box-shadow: var(--shadow-lg); z-index: 50;
  transition: transform 0.2s, opacity 0.2s;
}
.scroll-top--visible { display: flex; }
.scroll-top:active { transform: scale(0.9); }
body.has-active-filters .scroll-top { bottom: calc(136px + var(--safe-bottom)); }

/* ── Trail Heart (favorite) ────────────────────────────────── */
.trail-card__heart {
  background: none; border: none; cursor: pointer;
  color: var(--text-label); padding: 4px 6px;
  transition: color 0.2s, transform 0.2s; line-height: 1; flex-shrink: 0;
  display: inline-flex; align-items: center;
}
.trail-card__heart .heart-icon {
  width: 18px; height: 18px; fill: currentColor;
}
.trail-card__heart:active { transform: scale(1.3); }
.trail-card__heart--active { color: #ef4444; }

/* Favorites chip */
.chip--favs.chip--active { background: #ef4444; border-color: #ef4444; color: #fff; }

/* ── Trip Star (favorite) ─────────────────────────────────── */
.trip-card__fav {
  background: none; border: none; cursor: pointer;
  font-size: 24px; color: var(--text-label); padding: 4px;
  transition: color 0.2s; flex-shrink: 0; line-height: 1;
}
.trip-card__fav--active { color: #fbbf24; }

/* ── Moja Wycieczka (favorite trip section) ───────────────── */
.fav-trip-section {
  background: var(--bg-card); border: 2px solid var(--accent);
  border-radius: var(--radius-lg); padding: 18px; margin-bottom: 16px;
}
.fav-trip-section__header {
  display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
}
.fav-trip-section__icon { font-size: 20px; }
.fav-trip-section__title {
  font-size: 13px; font-weight: 700; color: var(--accent);
  text-transform: uppercase; letter-spacing: 1px; flex: 1;
}
.fav-trip-section__remove {
  background: none; border: 1px solid var(--border); border-radius: 50%;
  width: 36px; height: 36px; color: var(--text-label); cursor: pointer;
  font-size: 18px; display: flex; align-items: center; justify-content: center;
}
.fav-trip-section__remove:active { background: var(--bg-surface); }

/* Completed trail checkbox */
.fav-trail-check {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  padding: 2px 0;
}
.fav-trail-check input[type="checkbox"] {
  width: 20px; height: 20px; accent-color: var(--accent); cursor: pointer;
  flex-shrink: 0;
}
.fav-trail-check--done .trip-day__trail-chip {
  opacity: 0.5; text-decoration: line-through;
}

/* ── Difficulty color utilities ────────────────────────────── */
.diff-green  { --diff-color: var(--trail-green); --diff-bg: var(--trail-green-bg); }
.diff-blue   { --diff-color: var(--trail-blue);  --diff-bg: var(--trail-blue-bg); }
.diff-red    { --diff-color: var(--trail-red);   --diff-bg: var(--trail-red-bg); }
.diff-black  { --diff-color: var(--trail-black); --diff-bg: var(--trail-black-bg); }

.trail-card__dot-wrap { background: var(--diff-bg); }
.trail-card__dot { background: var(--diff-color); box-shadow: 0 0 8px var(--diff-color); }
.trail-card__tag { background: var(--diff-bg); color: var(--diff-color); }
.trail-card--open { border-color: var(--diff-color); box-shadow: 0 4px 20px rgba(0,0,0,0.15); }

/* ── Desktop ──────────────────────────────────────────────── */
@media (min-width: 768px) {
  .container { max-width: 680px; }
  .header { max-width: 680px; }
  .header__title { font-size: 32px; }
  .trail-card:hover { border-color: var(--border-active); box-shadow: var(--shadow-sm); }
  .chip:hover { background: var(--bg-surface-hover); }
  .chip--active:hover { opacity: 0.9; }
  .bottom-nav { top: 0; bottom: auto; border-top: none; border-bottom: 1px solid var(--nav-border); }
  body { padding-bottom: 0; padding-top: 64px; }
  body.has-active-filters { padding-bottom: 0; padding-top: 64px; }
  .active-filters { bottom: auto; top: 62px; border-top: none; border-bottom: 1px solid var(--nav-border); }
  .bottom-nav__inner { max-width: 640px; margin: 0 auto; }
  .bottom-nav__item { flex-direction: row; gap: 8px; font-size: 14px; min-height: 56px; }
  .bottom-nav__item--active::before { top: auto; bottom: 0; border-radius: 3px 3px 0 0; }
  .bottom-nav__icon { font-size: 20px; }
}
