/* ---------- Design tokens ---------- */
:root {
  --bg: #f6f4ef;
  --bg-elev: #ffffff;
  --bg-soft: #efe9df;
  --text: #23201c;
  --text-soft: #6b6459;
  --border: #e4ddd0;
  --primary: #d97706;      /* sycylijski amber */
  --primary-strong: #b45309;
  --accent: #0e7490;       /* morze */
  --accent-2: #15803d;     /* zieleń */
  --danger: #dc2626;
  --shadow: 0 6px 24px rgba(40, 30, 10, 0.08);
  --shadow-lg: 0 14px 40px rgba(40, 30, 10, 0.16);
  --radius: 16px;
  --radius-sm: 10px;
  --maxw: 1120px;
  --header-h: 64px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

html[data-theme="dark"] {
  --bg: #16130f;
  --bg-elev: #211c16;
  --bg-soft: #2a241c;
  --text: #f2ece1;
  --text-soft: #a99f8f;
  --border: #362f25;
  --primary: #f59e0b;
  --primary-strong: #fbbf24;
  --accent: #22d3ee;
  --accent-2: #4ade80;
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 14px 40px rgba(0, 0, 0, 0.55);
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ---------- Header ---------- */
.app-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  background: color-mix(in srgb, var(--bg-elev) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; }
.brand-logo { font-size: 1.5rem; }
.brand-name { white-space: nowrap; }
.brand-logo-img { height: 46px; width: auto; display: block; }
.header-search { flex: 1; display: flex; justify-content: center; }
.header-search input {
  width: min(480px, 100%);
  padding: 10px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  font-size: 0.95rem;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.header-search input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 25%, transparent); }
.theme-toggle {
  flex-shrink: 0;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--bg);
  cursor: pointer;
  font-size: 1.15rem;
  display: grid; place-items: center;
  transition: transform .15s, background .15s;
}
.theme-toggle:hover { transform: rotate(-15deg); background: var(--bg-soft); }

/* ---------- Layout ---------- */
.app-main { flex: 1; width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 24px 20px 48px; }
.app-footer { text-align: center; padding: 24px; color: var(--text-soft); font-size: .85rem; border-top: 1px solid var(--border); }
.loading { text-align: center; padding: 80px 0; color: var(--text-soft); }
.empty { text-align: center; padding: 60px 20px; color: var(--text-soft); }

/* ---------- Home ---------- */
.home-title { font-size: 1.9rem; margin: 6px 0 2px; }
.home-sub { color: var(--text-soft); margin: 0 0 24px; }

.hero-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin-bottom: 28px;
  min-height: 340px;
  display: flex;
  align-items: flex-end;
  cursor: pointer;
  transition: transform .2s;
}
.hero-card:hover { transform: translateY(-3px); }
.hero-card .cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-card .overlay {
  position: relative;
  width: 100%;
  padding: 28px;
  background: linear-gradient(to top, rgba(0,0,0,.78), rgba(0,0,0,.15) 70%, transparent);
  color: #fff;
}
.badge-new {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}
.hero-card h2 { margin: 0 0 8px; font-size: 1.8rem; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: .95rem; opacity: .95; }
.hero-meta span { display: inline-flex; align-items: center; gap: 6px; }

.trip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.trip-card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: transform .18s, box-shadow .18s;
}
.trip-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.trip-card .cover { height: 160px; object-fit: cover; width: 100%; background: var(--bg-soft); }
.trip-card .body { padding: 14px 16px 18px; }
.trip-card h3 { margin: 0 0 6px; font-size: 1.12rem; }
.trip-card .dest { color: var(--text-soft); font-size: .88rem; margin-bottom: 10px; }
.trip-card .meta { display: flex; flex-wrap: wrap; gap: 10px; font-size: .82rem; color: var(--text-soft); }
.trip-card .meta span { display: inline-flex; align-items: center; gap: 5px; }

/* ---------- Trip header ---------- */
.back-link { display: inline-flex; align-items: center; gap: 6px; color: var(--text-soft); margin-bottom: 14px; font-size: .9rem; }
.back-link:hover { color: var(--primary); }

.trip-hero {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  min-height: 260px;
  display: flex;
  align-items: flex-end;
  box-shadow: var(--shadow-lg);
  margin-bottom: 20px;
}
.trip-hero .cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.trip-hero .overlay {
  position: relative; width: 100%; padding: 26px;
  background: linear-gradient(to top, rgba(0,0,0,.8), rgba(0,0,0,.1) 75%, transparent);
  color: #fff;
}
.trip-hero h1 { margin: 0 0 10px; font-size: 1.9rem; }
.trip-hero .facts { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.18);
  border: 1px solid rgba(255,255,255,.28);
  padding: 5px 12px; border-radius: 999px; font-size: .85rem;
  backdrop-filter: blur(4px);
}

/* ---------- Tabs ---------- */
.tabs {
  display: flex; gap: 6px; overflow-x: auto;
  border-bottom: 1px solid var(--border);
  margin-bottom: 22px;
  scrollbar-width: thin;
}
.tab-btn {
  flex-shrink: 0;
  border: none; background: none; cursor: pointer;
  padding: 12px 16px; font-size: .95rem; font-weight: 600;
  color: var(--text-soft);
  border-bottom: 3px solid transparent;
  transition: color .15s, border-color .15s;
  display: inline-flex; align-items: center; gap: 7px;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); }

.tab-panel { animation: fade .25s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Cards / generic ---------- */
.card {
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 18px; }
/* W siatkach karty nie powinny dostawać górnego marginesu (psuł wyrównanie) */
.grid-2 .card + .card,
.check-groups .card + .card,
.attr-grid .card + .card { margin-top: 0; }
.grid-2, .check-groups { align-items: stretch; }
.card h3 { margin: 0 0 12px; font-size: 1.1rem; display: flex; align-items: center; gap: 8px; }
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.card + .grid-2 { margin-top: 18px; }
.grid-2 + .card { margin-top: 18px; }
.section-title { font-size: 1.3rem; margin: 4px 0 16px; }
.lead { color: var(--text-soft); }

.kv { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--border); }
.kv:last-child { border-bottom: none; }
.kv .k { color: var(--text-soft); }
.kv .v { font-weight: 600; text-align: right; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { background: var(--bg-soft); border-radius: 999px; padding: 6px 12px; font-size: .85rem; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--primary); color: #fff;
  border: none; border-radius: var(--radius-sm);
  padding: 10px 16px; font-size: .9rem; font-weight: 600; cursor: pointer;
  transition: background .15s, transform .1s;
}
.btn:hover { background: var(--primary-strong); }
.btn:active { transform: scale(.98); }
.btn-ghost { background: var(--bg-soft); color: var(--text); }
.btn-ghost:hover { background: var(--border); }

/* ---------- Export box ---------- */
.export-card { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.export-info { min-width: 0; flex: 1; }
.export-info h3 { margin: 0 0 6px; }
.export-info .lead { margin: 0; }
.export-actions { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 560px) { .export-actions { width: 100%; } .export-actions .btn { flex: 1; justify-content: center; } }

/* ---------- Flights ---------- */
.flight {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  background: var(--bg-soft); border-radius: var(--radius-sm); padding: 16px; margin-top: 10px;
}
.flight .ap { text-align: center; }
.flight .ap .code { font-size: 1.3rem; font-weight: 800; }
.flight .ap .t { color: var(--text-soft); font-size: .85rem; }
.flight .arrow { color: var(--primary); font-size: 1.2rem; }

/* ---------- Day view ---------- */
.day-nav { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 18px; }
.day-chip {
  flex-shrink: 0; cursor: pointer;
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: 12px;
  padding: 10px 14px; text-align: center; min-width: 92px;
  transition: border-color .15s, transform .1s;
}
.day-chip:hover { transform: translateY(-2px); }
.day-chip.active { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 12%, var(--bg-elev)); }
.day-chip .dow { font-size: .72rem; text-transform: uppercase; color: var(--text-soft); }
.day-chip .dnum { font-size: 1.2rem; font-weight: 800; }
.day-chip .dlabel { font-size: .72rem; color: var(--text-soft); }

.day-layout { display: grid; grid-template-columns: 1.1fr .9fr; gap: 18px; align-items: start; }
@media (max-width: 820px) { .day-layout { grid-template-columns: 1fr; } }

/* Timeline */
.timeline { position: relative; margin: 4px 0 0; padding-left: 6px; }
.tl-item { position: relative; padding: 0 0 20px 40px; }
.tl-item:before {
  content: ""; position: absolute; left: 13px; top: 6px; bottom: -6px; width: 2px; background: var(--border);
}
.tl-item:last-child:before { display: none; }
.tl-dot {
  position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%;
  background: var(--bg-elev); border: 2px solid var(--primary);
  display: grid; place-items: center; font-size: .9rem; z-index: 1;
}
.tl-time { font-weight: 800; color: var(--primary); font-size: .9rem; }
.tl-title { font-weight: 700; margin: 2px 0; }
.tl-desc { color: var(--text-soft); font-size: .9rem; }

/* Map */
.map-wrap { position: relative; }
#dayMap { height: 380px; border-radius: var(--radius); z-index: 1; }
.map-actions { margin-top: 12px; display: flex; flex-wrap: wrap; gap: 8px; }
.leaflet-popup-content { font-size: .9rem; margin: 10px 12px; }
.popup-nav { display: inline-flex; align-items: center; gap: 5px; color: var(--accent); font-weight: 700; margin-top: 6px; }
.pin {
  display: grid; place-items: center; width: 30px; height: 30px;
  background: var(--primary); color: #fff; border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg); box-shadow: 0 2px 6px rgba(0,0,0,.4); border: 2px solid #fff;
}
.pin span { transform: rotate(45deg); font-size: .95rem; }

/* Weather */
.weather-card { background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #1e3a8a)); color: #fff; border: none; }
.weather-card h3 { color: #fff; }
.wx-now { display: flex; align-items: center; gap: 14px; }
.wx-emoji { font-size: 3rem; line-height: 1; }
.wx-temp { font-size: 2.4rem; font-weight: 800; }
.wx-desc { opacity: .92; }
.wx-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.wx-tile { background: rgba(255,255,255,.15); border-radius: 10px; padding: 10px; text-align: center; }
.wx-tile .l { font-size: .72rem; opacity: .85; }
.wx-tile .v { font-weight: 700; }
.wx-note { margin-top: 12px; font-size: .8rem; opacity: .8; }

/* ---------- Attractions ---------- */
.attr-search { margin-bottom: 18px; }
.attr-search input {
  width: 100%; padding: 12px 16px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: var(--bg-elev); color: var(--text); font-size: .95rem;
}
.attr-area + .attr-area { margin-top: 34px; }
.attr-area-title {
  display: flex; align-items: baseline; gap: 10px; margin: 0 0 16px;
  padding-bottom: 8px; border-bottom: 2px solid var(--border); font-size: 1.15rem;
}
.attr-area-count {
  font-size: .72rem; font-weight: 700; color: var(--primary);
  background: var(--bg-soft); border-radius: 999px; padding: 3px 9px;
}
.attr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.attr-card {
  background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.attr-card .photo { height: 180px; width: 100%; object-fit: cover; background: var(--bg-soft); }
.attr-card .body { padding: 16px; display: flex; flex-direction: column; flex: 1; }
.attr-cat { font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; color: var(--primary); font-weight: 700; }
.attr-card h3 { margin: 4px 0 8px; }
.attr-card .short { color: var(--text-soft); font-size: .9rem; flex: 1; }
.attr-actions { display: flex; gap: 8px; margin-top: 14px; }
.facts { margin: 12px 0 0; padding: 0; list-style: none; display: none; }
.facts.open { display: block; animation: fade .2s; }
.facts li { position: relative; padding: 6px 0 6px 22px; font-size: .88rem; color: var(--text); border-top: 1px dashed var(--border); }
.facts li:before { content: "💡"; position: absolute; left: 0; top: 6px; font-size: .8rem; }

/* ---------- Budget ---------- */
.budget-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat { background: var(--bg-elev); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.stat .l { color: var(--text-soft); font-size: .82rem; }
.stat .v { font-size: 1.5rem; font-weight: 800; margin-top: 4px; }
.stat.hl .v { color: var(--primary); }
.budget-table { width: 100%; border-collapse: collapse; }
.budget-table th, .budget-table td { padding: 12px 10px; text-align: left; border-bottom: 1px solid var(--border); }
.budget-table th { font-size: .78rem; text-transform: uppercase; color: var(--text-soft); letter-spacing: .03em; }
.budget-table td.amount { text-align: right; font-weight: 700; white-space: nowrap; }
.tag { font-size: .72rem; padding: 3px 9px; border-radius: 999px; font-weight: 700; }
.tag.paid { background: color-mix(in srgb, var(--accent-2) 20%, transparent); color: var(--accent-2); }
.tag.est { background: color-mix(in srgb, var(--primary) 18%, transparent); color: var(--primary-strong); }
.tag.opt { background: var(--bg-soft); color: var(--text-soft); }

/* ---------- Checklist ---------- */
.check-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.check-group h3 { font-size: 1.05rem; }
.check-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; cursor: pointer; }
.check-item input { width: 18px; height: 18px; accent-color: var(--primary); cursor: pointer; flex-shrink: 0; }
.check-item span { transition: opacity .15s; }
.check-item.done span { text-decoration: line-through; opacity: .5; }
.progress { height: 8px; background: var(--bg-soft); border-radius: 999px; overflow: hidden; margin: 8px 0 18px; }
.progress > div { height: 100%; background: var(--accent-2); width: 0; transition: width .3s; }

/* Tabela budżetu — poziome przewijanie na wąskich ekranach */
.table-scroll { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-scroll .budget-table { min-width: 520px; }

/* ---------- Responsywność / mobile ---------- */
@media (max-width: 900px) {
  #dayMap { height: 320px; }
}
@media (max-width: 720px) {
  .app-header { gap: 10px; padding: 0 12px; }
  .app-main { padding: 18px 14px 40px; }
  .header-search input { padding: 9px 14px; font-size: .9rem; }
  .hero-card { min-height: 240px; }
  .hero-card h2 { font-size: 1.4rem; }
  .hero-card .overlay, .trip-hero .overlay { padding: 18px; }
  .trip-hero { min-height: 200px; }
  .trip-grid, .attr-grid { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
  .card { padding: 16px; }
  .tab-btn { padding: 11px 12px; font-size: .9rem; }
  .day-layout { gap: 14px; }
  #dayMap { height: 300px; }
  .budget-summary { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .brand-name { display: none; }
  .brand-logo { font-size: 1.35rem; }
  .brand-logo-img { height: 40px; }
  .home-title { font-size: 1.4rem; }
  .home-sub { font-size: .9rem; }
  .trip-hero h1 { font-size: 1.35rem; }
  .section-title { font-size: 1.1rem; }
  .trip-grid, .attr-grid { grid-template-columns: 1fr; }
  .hero-meta { gap: 8px; font-size: .85rem; }
  .flight { grid-template-columns: 1fr auto 1fr; padding: 12px; gap: 6px; }
  .flight .ap .code { font-size: 1.05rem; }
  .pill { font-size: .78rem; padding: 4px 10px; }
  .budget-summary { grid-template-columns: 1fr; }
  .check-groups { grid-template-columns: 1fr; }
  /* Większe cele dotykowe */
  .check-item { padding: 11px 0; }
  .btn, .btn-ghost { padding: 11px 16px; }
  .day-chip { min-width: 78px; padding: 9px 11px; }
}
@media (max-width: 380px) {
  .app-header { gap: 8px; padding: 0 8px; }
  .header-search input { padding: 8px 12px; }
}

/* ---------- Food / Jedzenie ---------- */
.food-price { color: var(--accent-2); font-weight: 700; }
.food-town { color: var(--text-soft); font-size: .82rem; display: inline-flex; align-items: center; gap: 4px; }
.attr-card .food-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }

.musttry-band {
  background: linear-gradient(135deg, color-mix(in srgb, var(--primary) 16%, var(--bg-elev)), var(--bg-elev));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 24px;
}
.musttry-band h2 { margin: 0 0 4px; font-size: 1.25rem; }
.musttry-band .lead { margin: 0 0 16px; }
.musttry-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.musttry {
  display: flex; flex-direction: column;
  background: var(--bg); border: 1px solid var(--border); border-radius: 14px; overflow: hidden;
  box-shadow: var(--shadow);
}
.musttry img { width: 100%; height: 150px; object-fit: cover; display: block; background: var(--bg-soft); }
.musttry .mt-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; }
.musttry .mt-name { font-weight: 700; font-size: 1rem; display: flex; align-items: center; gap: 6px; }
.musttry .mt-where { font-size: .78rem; color: var(--primary-strong); }
.musttry .mt-desc { font-size: .84rem; color: var(--text-soft); line-height: 1.4; }

.food-section-head {
  display: flex; align-items: center; gap: 12px;
  margin: 30px 0 16px;
  padding: 14px 18px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 55%, #0e3a5a));
  color: #fff;
  box-shadow: var(--shadow);
}
.food-section-head .fh-icon { font-size: 1.8rem; line-height: 1; }
.food-section-head .fh-title { font-size: 1.2rem; font-weight: 800; }
.food-section-head .fh-sub { font-size: .8rem; opacity: .9; }

/* Segmentowy przełącznik (Jedzenie: Musisz spróbować / Gdzie zjeść) */
.seg-toggle { display: inline-flex; background: var(--bg-soft); border-radius: 999px; padding: 4px; gap: 4px; margin-bottom: 18px; }
.seg-toggle button {
  border: none; background: none; cursor: pointer; color: var(--text-soft);
  padding: 9px 18px; border-radius: 999px; font-weight: 700; font-size: .92rem;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  transition: background .15s, color .15s;
}
.seg-toggle button.active { background: var(--bg-elev); color: var(--text); box-shadow: var(--shadow); }
.seg-toggle .lbl-short { display: none; }
@media (max-width: 560px) {
  .seg-toggle { display: flex; width: 100%; }
  .seg-toggle button { flex: 1; padding: 10px 6px; font-size: .9rem; }
  .seg-toggle .lbl-full { display: none; }
  .seg-toggle .lbl-short { display: inline; }
}

/* ---------- Mapa (parkingi + POI) ---------- */
.map-filter { display: inline-flex; background: var(--bg-soft); border-radius: 999px; padding: 4px; gap: 4px; margin-bottom: 16px; flex-wrap: wrap; }
.map-filter .lbl-short { display: none; }
.map-filter button {
  border: none; background: none; cursor: pointer; color: var(--text-soft);
  padding: 8px 16px; border-radius: 999px; font-weight: 600; font-size: .9rem;
  display: inline-flex; align-items: center; gap: 6px; transition: background .15s, color .15s;
}
.map-filter button.active { background: var(--bg-elev); color: var(--text); box-shadow: var(--shadow); }
.legend { display: flex; gap: 16px; margin: 12px 0 0; font-size: .85rem; color: var(--text-soft); flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend .dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,.15); }
.dot-attr { background: #7c3aed; }
.dot-free { background: #15803d; }
.dot-paid { background: #d97706; }
.dot-inpost { background: #ffcc00; }
.dot-lidl { background: #0050aa; }
.dot-spar { background: #0a8a3c; }
.dot-fuel { background: #dc2626; }
.map-status { margin-top: 6px; font-size: .82rem; color: var(--text-soft); }
#tripMap { height: 460px; border-radius: var(--radius); z-index: 1; }
.fuel-rank {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; margin-right: 6px; border-radius: 999px;
  background: var(--primary); color: #fff; font-size: .7rem; font-weight: 800;
}
.fuel-tag {
  margin-left: 6px; padding: 1px 7px; border-radius: 999px;
  background: var(--bg-soft); font-size: .72rem; font-weight: 700; color: var(--accent);
}
.fuel-src { margin-top: 6px; font-size: .76rem; color: var(--text-soft); }
.paid-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.paid-row {
  display: flex; flex-direction: column; gap: 3px;
  background: var(--bg-soft); border-radius: 10px; padding: 12px 14px;
  min-width: 0; overflow-wrap: anywhere;
}
.paid-row .pr-name { font-weight: 700; overflow-wrap: anywhere; }
.paid-row .pr-name a { color: inherit; }
.paid-row .pr-name a:hover { color: var(--primary); }
.paid-row .pr-price { color: var(--primary-strong); font-weight: 800; }
.paid-row .pr-info { font-size: .82rem; color: var(--text-soft); overflow-wrap: anywhere; }
.pin-attr { background: #7c3aed !important; }
.pin-free { background: #15803d !important; }
.pin-paid { background: #d97706 !important; }
.pin-inpost { background: #ffcc00 !important; color: #1a1a1a !important; }
.pin-lidl { background: #0050aa !important; }
.pin-spar { background: #0a8a3c !important; }
.pin-fuel { background: #dc2626 !important; }
@media (max-width: 560px) {
  #tripMap { height: 360px; }
  .musttry-grid { grid-template-columns: 1fr; }
  .paid-list { grid-template-columns: 1fr; }
  /* Filtry mapy: krótkie etykiety, po kilka w rzędzie */
  .map-filter { display: flex; flex-wrap: wrap; width: 100%; }
  .map-filter button { flex: 1 1 30%; padding: 8px 6px; font-size: .85rem; justify-content: center; }
  .map-filter .lbl-full { display: none; }
  .map-filter .lbl-short { display: inline; }
}

/* ---------- Splash / intro ---------- */
.splash {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 50% 42%, #f7f1e4 0%, #efe6d3 55%, #e4d8bf 100%);
  opacity: 1;
  transition: opacity .55s ease, visibility .55s ease;
}
html[data-theme="dark"] .splash {
  background: radial-gradient(circle at 50% 42%, #241f17 0%, #16130f 70%);
}
html.no-splash .splash { display: none !important; }
.splash.hide { opacity: 0; visibility: hidden; pointer-events: none; }

.splash-inner { display: flex; flex-direction: column; align-items: center; gap: 22px; }
.splash-logo {
  /* logo3 jest pionowe (937x1024) — limitujemy wysokością, żeby nie wychodziło poza ekran */
  width: auto;
  height: min(520px, 58vh);
  max-width: 86vw;
  filter: drop-shadow(0 18px 40px rgba(0, 0, 0, .28));
  animation: splash-pop .9s cubic-bezier(.2, .8, .25, 1) both, splash-float 3s ease-in-out .9s infinite;
}
/* UWAGA: te warianty muszą stać PO regule bazowej. Media query nie podbija specyficzności,
   więc `.splash-logo` zdefiniowane wyżej w pliku i tak by je nadpisało. */
@media (max-width: 560px) {
  .splash-logo { height: min(300px, 40vh); max-width: 68vw; }
}
@media (max-width: 380px) {
  .splash-logo { height: min(260px, 38vh); max-width: 64vw; }
}
/* Telefon w poziomie albo niskie okno — tam wiąże wysokość, nie szerokość. */
@media (max-height: 620px) {
  .splash-logo { height: min(240px, 52vh); max-width: 58vw; }
  .splash-inner { gap: 14px; }
}
@keyframes splash-pop {
  0%   { opacity: 0; transform: scale(.72) translateY(14px) rotate(-4deg); }
  60%  { opacity: 1; transform: scale(1.04) translateY(0) rotate(1deg); }
  100% { opacity: 1; transform: scale(1) translateY(0) rotate(0); }
}
@keyframes splash-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-9px); }
}
.splash-dots { display: flex; gap: 10px; }
.splash-dots span {
  width: 11px; height: 11px; border-radius: 50%;
  background: var(--primary, #d97706);
  animation: splash-bounce 1.1s ease-in-out infinite;
}
.splash-dots span:nth-child(2) { animation-delay: .18s; }
.splash-dots span:nth-child(3) { animation-delay: .36s; }
@keyframes splash-bounce {
  0%, 80%, 100% { transform: scale(.5); opacity: .4; }
  40%           { transform: scale(1);  opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  .splash-logo, .splash-dots span { animation: none; }
}
