/* Dark only, by product decision. Brand tokens as on the Mikołajki and marketing pages. */
:root {
  --bg: #0A0F16;
  --bg-hi: #14233A;
  --text: #F0F5FA;
  --dim: rgba(240, 245, 250, 0.72);
  --sheet: #111923;
  --line: rgba(118, 205, 255, 0.18);
  --land: #123A66;
  --land-line: #76CDFF;
  --blue: #76CDFF;
  --brand: #4da8e0;
  --gold: #FAC775;
  --tint: #0f2435;
  --tint-line: rgba(0, 163, 255, 0.45);
  --on-brand: #06121d;
  --bar-h: 62px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: radial-gradient(120% 60vh at 50% 0, var(--bg-hi) 0, var(--bg) 100%) no-repeat, var(--bg);
  color: var(--text);
  font: 400 16px/1.45 "Barlow", system-ui, sans-serif;
  -webkit-tap-highlight-color: transparent;
  padding-bottom: calc(var(--bar-h) + env(safe-area-inset-bottom));
}
button { font: inherit; color: inherit; }
a { color: inherit; }
ul { list-style: none; margin: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.top {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(12px + env(safe-area-inset-top)) 16px 8px;
  max-width: 1120px; margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; font: 400 24px/1 "Bebas Neue", sans-serif; letter-spacing: .5px; }
.brand img { object-fit: contain; }
.brand em { font-style: normal; color: var(--blue); }
.top-link {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px;
  font-weight: 500; font-size: 15px; text-decoration: none; color: var(--blue);
}

.page { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.hero { padding: 12px 0 16px; }
.hero h1 { margin: 0; font: 400 44px/1 "Bebas Neue", sans-serif; letter-spacing: .5px; }
.hero p { margin: 6px 0 0; color: var(--dim); }

.switch {
  display: grid; grid-template-columns: 1fr 1fr; padding: 4px;
  background: var(--sheet); border: 1px solid var(--line); border-radius: 12px;
  max-width: 420px; margin-bottom: 16px;
}
.switch-btn {
  min-height: 44px; border: 0; border-radius: 9px; background: transparent;
  font: 600 18px/1 "Barlow Condensed", sans-serif; letter-spacing: .3px; color: var(--dim); cursor: pointer;
  transition: background-color .2s, color .2s;
}
.switch-btn.active { background: var(--brand); color: var(--on-brand); }

.map-card {
  background: var(--sheet); border: 1px solid var(--line); border-radius: 14px;
  padding: 10px 10px 6px; margin-bottom: 16px; position: relative;
}
.map-card.collapsed { display: none; }
.map-hint { margin: 0; font-size: 13px; color: var(--dim); position: absolute; left: 14px; top: 10px; }
.map { display: block; width: 100%; height: 264px; }
.land { fill: var(--land); stroke: var(--land-line); stroke-width: 1.5; stroke-linejoin: round; }
.region-pin { cursor: pointer; outline: none; }
.region-pin .hit { fill: transparent; }
.region-pin .dot { fill: var(--gold); stroke: var(--bg); transition: fill .15s; }
.region-pin text { fill: var(--on-brand); font-family: "Barlow", sans-serif; font-weight: 600; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
.region-pin:hover .dot, .region-pin:focus-visible .dot { fill: #fff; }

.filters { display: flex; flex-wrap: wrap; margin: -4px 0 8px; }
.filters > * { margin: 4px 8px 4px 0; }
.chip {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px;
  background: var(--tint); border: 1px solid var(--tint-line); border-radius: 20px;
  font-size: 14px; font-weight: 500; cursor: pointer; color: var(--text);
}
.chip.off { background: transparent; border-color: var(--line); color: var(--dim); }
.chip b { font-weight: 500; margin-left: 8px; font-size: 18px; line-height: 1; color: var(--blue); }
.result-count { margin: 0 0 8px; font-size: 14px; color: var(--dim); }

.card {
  display: block; width: 100%; text-align: left; cursor: pointer; padding: 12px;
  background: var(--sheet); border: 1px solid var(--line); border-radius: 14px;
  transition: transform .12s ease, border-color .15s;
}
.card:hover { border-color: var(--tint-line); }
.card:active { transform: scale(.985); }
.cards > li + li { margin-top: 12px; }
.card-title { display: block; font: 600 20px/1.15 "Barlow Condensed", sans-serif; letter-spacing: .2px; margin: 0; }
.card-meta { display: block; margin: 3px 0 0; font-size: 14px; color: var(--dim); }
.route-shape { display: block; width: 100%; height: 78px; margin-bottom: 8px; }
.shape-seen { fill: none; stroke: var(--blue); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }
.shape-hidden { fill: none; stroke: var(--blue); stroke-opacity: .25; stroke-width: 3.5; stroke-linecap: round; stroke-dasharray: 2 9; }
.shape-end { fill: var(--gold); }

.spot-card { display: flex; align-items: center; }
.spot-photo {
  flex: none; width: 92px; height: 92px; border-radius: 10px; object-fit: cover; margin-right: 12px;
  background: var(--tint); display: block;
}
.spot-text { min-width: 0; }
.rating { color: var(--gold); font-weight: 500; }

.card-enter { animation: card-in .36s ease both; animation-delay: var(--enter-delay, 0ms); }
@keyframes card-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

.empty { text-align: center; padding: 32px 16px; background: var(--sheet); border: 1px dashed var(--line); border-radius: 14px; }
.empty p { margin: 0; }
.empty .empty-title { font: 600 20px/1.2 "Barlow Condensed", sans-serif; }
.empty .empty-sub { color: var(--dim); font-size: 14px; margin-top: 4px; }

.stores { margin: 32px 0 20px; padding: 20px 16px; border: 1px solid var(--tint-line); background: var(--tint); border-radius: 14px; scroll-margin-top: 16px; }
.stores h2 { margin: 0 0 10px; font: 400 30px/1.05 "Bebas Neue", sans-serif; letter-spacing: .4px; }
.perks li { padding-left: 22px; position: relative; margin-top: 4px; color: var(--dim); }
.perks li::before { content: ""; position: absolute; left: 2px; top: .45em; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); }
.store-row { display: grid; grid-template-columns: 1fr 1fr; margin-top: 16px; }
.store-row > * + * { margin-left: 10px; }
.store {
  display: flex; flex-direction: column; justify-content: center; min-height: 56px; padding: 6px 14px;
  border: 1px solid var(--tint-line); border-radius: 10px; background: var(--bg);
  font-weight: 600; font-size: 16px; line-height: 1.15; text-decoration: none;
}
.store small { font-weight: 400; font-size: 12px; color: var(--dim); }
.store:active { transform: scale(.98); }
.web-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: 6px; font-size: 14px; color: var(--blue); }

.foot {
  max-width: 1120px; margin: 0 auto; padding: 4px 16px 20px;
  display: flex; flex-wrap: wrap; justify-content: space-between; font-size: 13px; color: var(--dim);
}
.foot > * { margin: 4px 16px 4px 0; }

.app-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between;
  min-height: var(--bar-h); padding: 8px 16px calc(8px + env(safe-area-inset-bottom));
  background: var(--sheet); border-top: 1px solid var(--line);
  font-size: 14px; color: var(--dim);
}
.app-bar-btn {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; margin-left: 12px; flex: none;
  background: var(--brand); color: var(--on-brand); border-radius: 10px; font-weight: 600; text-decoration: none;
}
.app-bar-btn:active { transform: scale(.97); }

.backdrop { position: fixed; inset: 0; z-index: 30; background: rgba(4, 8, 13, .62); animation: fade-in .2s ease both; }
.backdrop[hidden], .sheet[hidden] { display: none; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 31;
  max-width: 560px; margin: 0 auto; max-height: 88vh; overflow-y: auto; overscroll-behavior: contain;
  background: var(--sheet); border: 1px solid var(--line); border-bottom: 0; border-radius: 18px 18px 0 0;
  padding: 8px 16px calc(16px + env(safe-area-inset-bottom));
  animation: sheet-up .28s ease both;
}
@keyframes sheet-up { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.sheet.dragging { animation: none; transition: none; }
.grip { width: 44px; height: 5px; border-radius: 5px; background: rgba(240, 245, 250, .3); margin: 2px auto 10px; }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; }
.sheet-title { margin: 0; font: 400 32px/1.05 "Bebas Neue", sans-serif; letter-spacing: .4px; }
.close {
  flex: none; width: 44px; height: 44px; margin: -6px -8px 0 8px; border: 0; background: transparent;
  font-size: 26px; line-height: 1; color: var(--dim); cursor: pointer;
}
.sheet-sub { margin: 2px 0 10px; color: var(--dim); }
/* The hub serves the 150 px thumbnail (SpotLimits.ThumbnailMaxDimension): never stretch it. */
.sheet-photo { display: block; max-width: 150px; max-height: 150px; border-radius: 12px; background: var(--tint); margin-bottom: 10px; }
.sheet-shape { display: block; width: 100%; height: 130px; margin: 2px 0 8px; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 4px 0 8px; }
.stats b { display: block; font: 600 22px/1.1 "Barlow Condensed", sans-serif; }
.stats span { font-size: 13px; color: var(--dim); }
.locked { margin: 8px 0 0; font-size: 14px; color: var(--dim); }
.cta {
  display: flex; align-items: center; justify-content: center; min-height: 50px; margin-top: 12px;
  background: var(--brand); color: var(--on-brand); border-radius: 10px; font-weight: 600; text-decoration: none;
}
.cta:active { transform: scale(.98); }
.sheet .store-row { margin-top: 12px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (min-width: 900px) {
  .layout { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; }
  .map-card { margin: 0 24px 0 0; position: sticky; top: 16px; }
  .map { height: 420px; }
  .map-card.collapsed { display: block; }
  .stores { max-width: 620px; }
  .app-bar { display: none; }
  body { padding-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card-enter, .sheet, .backdrop { animation: none; }
}
