:root {
  --bg: #f6f4ee;
  --surface: #ffffff;
  --ink: #1b2620;
  --muted: #5d6b63;
  --line: #e2ded2;
  --brand: #1d4a37;
  --brand-2: #2f6b50;
  --accent: #d9822b;
  --accent-ink: #8a4a0c;
  --soft: #e9efe9;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 40, 30, .06), 0 6px 20px rgba(20, 40, 30, .06);
  --head: "Fraunces", Georgia, "Times New Roman", serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111814; --surface: #18221c; --ink: #e8eee9; --muted: #9fb0a6; --line: #2a3830;
    --brand: #7cc4a0; --brand-2: #9ad6b6; --accent: #f0a45a; --accent-ink: #f0a45a; --soft: #1e2b24;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 20px rgba(0,0,0,.25);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--body); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-2); text-underline-offset: 2px; }
h1, h2, h3, .h3 { font-family: var(--head); font-weight: 650; line-height: 1.15; letter-spacing: -.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(1.9rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.75rem); margin-top: 1.6em; }
.h3 { font-size: 1.15rem; margin-top: 0; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 70ch; }
main { min-height: 60vh; padding-bottom: 48px; }

/* hlavička */
.top { background: var(--brand); color: #fff; position: sticky; top: 0; z-index: 1000; }
@media (prefers-color-scheme: dark) { .top { background: #0c1310; border-bottom: 1px solid var(--line); } }
.top-in { display: flex; align-items: center; gap: 16px; min-height: 60px; flex-wrap: wrap; }
.logo { display: flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; font-family: var(--head); font-weight: 700; font-size: 1.2rem; }
.logo svg { width: 28px; height: 28px; }
.top-search { flex: 1; min-width: 160px; position: relative; }
.top-search input { width: 100%; border: 0; border-radius: 999px; padding: 9px 16px; font: inherit; background: rgba(255,255,255,.14); color: #fff; }
.top-search input::placeholder { color: rgba(255,255,255,.7); }
.top-search input:focus { outline: 2px solid var(--accent); background: rgba(255,255,255,.22); }
.top-nav { display: flex; gap: 4px; }
.top-nav a { color: #fff; text-decoration: none; padding: 8px 10px; border-radius: 8px; font-weight: 500; }
.top-nav a:hover { background: rgba(255,255,255,.12); }
@media (max-width: 720px) {
  .top-in { padding-top: 8px; padding-bottom: 8px; gap: 8px; }
  .top-search { order: 3; flex-basis: 100%; }
  .top-nav { margin-left: auto; }
  .top-nav a { padding: 6px 7px; font-size: .92rem; }
  .top-nav a[href="/rozhledny-zdarma"] { display: none; }
}

/* našeptávač */
.sug { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); list-style: none; margin: 0; padding: 4px; z-index: 1100; max-height: 60vh; overflow: auto; }
.sug li a, .pl-sug li { display: block; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: inherit; cursor: pointer; }
.sug li a small, .pl-sug li small { color: var(--muted); margin-left: 6px; }
.sug li a:hover, .sug li a.act, .pl-sug li:hover, .pl-sug li.act { background: var(--soft); }

/* hero */
.hero { position: relative; color: #fff; background: #20392d var(--hero-sm, var(--hero, none)) center 40% / cover no-repeat; }
@media (min-width: 700px) { .hero { background-image: var(--hero, none); } }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,25,18,.35), rgba(10,25,18,.72)); }
.hero-in { position: relative; padding-top: clamp(56px, 10vw, 120px); padding-bottom: clamp(56px, 9vw, 110px); }
.hero h1 { font-size: clamp(2.3rem, 6vw, 4rem); max-width: 14ch; }
.hero .lead { color: rgba(255,255,255,.92); max-width: 56ch; }
.hero-search { display: flex; gap: 8px; max-width: 560px; margin: 24px 0 12px; position: relative; }
.hero-search input { flex: 1; min-width: 0; border: 0; border-radius: 12px; padding: 14px 16px; font: inherit; font-size: 1.05rem; }
.hero-search button, .btn { border: 0; border-radius: 12px; padding: 12px 20px; font: inherit; font-weight: 600; background: var(--accent); color: #1b1206; cursor: pointer; text-decoration: none; display: inline-block; text-align: center; }
.hero-search button:hover, .btn:hover { filter: brightness(1.06); }
.hero-links a { color: #fff; }
.hero-credit { position: absolute; right: 12px; bottom: 8px; font-size: .75rem; color: rgba(255,255,255,.75); text-decoration: none; max-width: 60%; text-align: right; }

.block { margin-top: 40px; }
.block-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.block-head h2 { margin-top: 0; }

/* mapa */
.map { border-radius: var(--radius); overflow: hidden; background: var(--soft); border: 1px solid var(--line); z-index: 0; }
.map-home { height: 460px; }
.map-list { height: 420px; margin: 20px 0 28px; }
.map-detail { height: 360px; margin-top: 16px; }
.map-full { height: calc(100vh - 150px); min-height: 420px; border-radius: 0; border-left: 0; border-right: 0; }
@media (max-width: 720px) { .map-home { height: 360px; } .map-full { height: calc(100vh - 230px); } }
.map-note { color: var(--muted); }
.leaflet-popup-content { font: 14px/1.4 var(--body); margin: 10px 12px; }
.leaflet-popup-content a.pop { display: block; text-decoration: none; color: #1b2620; }
.leaflet-popup-content img { width: 220px; height: 130px; object-fit: cover; border-radius: 8px; margin-bottom: 6px; }
.leaflet-popup-content strong { display: block; font-size: 15px; }
.leaflet-popup-content small { color: #5d6b63; }
.pin { background: var(--brand); border: 2px solid #fff; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); box-shadow: 0 1px 4px rgba(0,0,0,.35); }
.pin.free { background: #2f8f5b; }
.pin.closed { background: #8b8f8c; }
.pin.here { background: var(--accent); }
.cluster { background: rgba(29,74,55,.9); color: #fff; border: 3px solid rgba(255,255,255,.85); border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; box-shadow: 0 1px 6px rgba(0,0,0,.3); }

/* kraje */
.kraje { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.kraje a { display: flex; justify-content: space-between; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; text-decoration: none; color: var(--ink); font-weight: 500; }
.kraje a:hover { border-color: var(--brand-2); }
.kraje b { color: var(--brand-2); font-variant-numeric: tabular-nums; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0; }
.chips a { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 5px 12px; text-decoration: none; color: var(--ink); font-size: .93rem; }
.chips b { color: var(--brand-2); margin-left: 4px; }

/* karty */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.card { position: relative; display: flex; flex-direction: column; background: var(--surface); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .15s; }
.card:hover { transform: translateY(-2px); }
.card img, .card-noimg { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.card-noimg { display: grid; place-items: center; background: linear-gradient(160deg, var(--soft), var(--line)); color: var(--brand-2); }
.card-noimg svg { width: 56px; height: 56px; opacity: .55; }
.card-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 2px; }
.card-body strong { font-family: var(--head); font-size: 1.08rem; line-height: 1.25; }
.card-body small { color: var(--muted); }
.badge { position: absolute; top: 10px; left: 10px; background: #1f6b44; color: #fff; font-size: .75rem; font-weight: 600; padding: 3px 8px; border-radius: 999px; }
.badge-closed { background: #6b706d; }

/* detail */
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: .9rem; color: var(--muted); padding: 18px 0 8px; }
.crumbs a { color: var(--muted); }
.d-head { margin-bottom: 16px; }
.d-head h1 { margin-bottom: .2em; }
.d-sub { color: var(--muted); font-size: 1.08rem; margin: 0; }
.alert { background: #fdf0e1; color: #6d3a07; border-radius: 10px; padding: 10px 14px; }
@media (prefers-color-scheme: dark) { .alert { background: #3a2a18; color: #f5d3ae; } }
.d-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 32px; align-items: start; }
@media (max-width: 900px) { .d-grid { grid-template-columns: 1fr; } }
.d-photo { margin: 0 0 20px; }
.d-photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: var(--radius); }
.d-photo figcaption { font-size: .8rem; color: var(--muted); margin-top: 6px; }
.d-photo figcaption a { color: var(--muted); }
.facts { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin: 20px 0; }
.facts div { background: var(--surface); padding: 12px 14px; }
.facts dt { font-size: .8rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.facts dd { margin: 2px 0 0; font-weight: 600; font-size: 1.05rem; }
.prose { font-size: 1.05rem; }
.prose p { margin: 0 0 1em; }
.prose h2 { margin-top: 1.4em; }
.tips { padding-left: 1.2em; }
.tips li { margin-bottom: .4em; }
.d-side { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 900px) { .d-side { position: static; } }
.side-box { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.btn-block { display: block; width: 100%; }
.btn-ghost { background: transparent; color: var(--brand-2); border: 1.5px solid var(--line); }
.near { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.near small { display: block; color: var(--muted); }
.side-note { font-size: .92rem; color: var(--muted); }
.side-note p { margin: 0; }
.stops { list-style: none; padding: 0; margin: 0; display: grid; gap: 6px; }
.stops li { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.stops small { color: var(--muted); margin-left: 4px; }
.ico { margin-right: 6px; }

/* plánovač */
.planner { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 32px 0; scroll-margin-top: 80px; }
.planner h2 { margin-top: 0; }
.pl-form { display: grid; gap: 12px; }
.pl-form label { font-weight: 600; }
.pl-from { position: relative; display: flex; gap: 8px; }
.pl-from input { flex: 1; min-width: 0; border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 14px; font: inherit; background: var(--bg); color: var(--ink); }
.pl-from input:focus { outline: 2px solid var(--brand-2); border-color: transparent; }
.pl-geo { border: 1.5px solid var(--line); border-radius: 12px; background: var(--bg); color: var(--brand-2); padding: 0 12px; cursor: pointer; }
.pl-sug { position: absolute; left: 0; right: 52px; top: calc(100% + 4px); background: var(--surface); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); list-style: none; margin: 0; padding: 4px; z-index: 1100; }
.pl-modes { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.pl-modes button { border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 10px; padding: 10px 6px; font: inherit; font-weight: 600; cursor: pointer; }
.pl-modes button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
@media (prefers-color-scheme: dark) { .pl-modes button.on { color: #0c1310; } }
@media (max-width: 480px) { .pl-modes { grid-template-columns: repeat(2, 1fr); } }
.pl-out:empty { display: none; }
.pl-out { margin-top: 16px; }
.pl-sum { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: baseline; }
.pl-sum b { font-size: 1.6rem; font-family: var(--head); }
.pl-sum span { color: var(--muted); }
.pl-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pl-links a { font-size: .95rem; padding: 9px 14px; }
.pl-err { color: #a33; }
.pl-pt ol { padding-left: 1.2em; }
.pl-pt li { margin-bottom: .5em; }

/* žebříček */
.rank { list-style: none; padding: 0; margin: 20px 0; display: grid; gap: 8px; }
.rank li { display: grid; grid-template-columns: 36px 90px 1fr auto; gap: 14px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 8px 14px 8px 8px; }
.rank img, .rank-noimg { width: 90px; height: 60px; object-fit: cover; border-radius: 8px; }
.rank-noimg { display: grid; place-items: center; background: var(--soft); color: var(--brand-2); }
.rank-n { text-align: right; font-weight: 700; color: var(--muted); }
.rank a { text-decoration: none; color: var(--ink); display: flex; flex-direction: column; }
.rank a strong { font-family: var(--head); font-size: 1.05rem; }
.rank a small { color: var(--muted); }
.rank-v { font-size: 1.15rem; white-space: nowrap; color: var(--brand-2); }
@media (max-width: 560px) { .rank li { grid-template-columns: 28px 64px 1fr; } .rank img, .rank-noimg { width: 64px; height: 48px; } .rank-v { grid-column: 3; font-size: 1rem; } }

/* mapa – filtry */
.mapa-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; padding-top: 14px; padding-bottom: 14px; }
.mapa-filters h1 { font-size: 1.5rem; margin: 0 12px 0 0; }
.mapa-filters select { font: inherit; padding: 4px 6px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--ink); }
.mapa-count { color: var(--muted); margin-left: auto; }

/* patička */
.foot { background: #13251c; color: #cfdcd4; padding: 40px 0 24px; margin-top: 40px; }
.foot a { color: #cfdcd4; }
.foot-in { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 32px; }
.foot nav { display: flex; flex-direction: column; gap: 4px; }
.foot nav strong { color: #fff; margin-bottom: 4px; }
.foot nav a { text-decoration: none; font-size: .93rem; padding: 6px 0; }
.foot nav a:hover { text-decoration: underline; }
.foot .logo { color: #fff; }
.foot-note { font-size: .8rem; color: #8fa699; margin-top: 28px; border-top: 1px solid #24392e; padding-top: 16px; }
@media (max-width: 720px) { .foot-in { grid-template-columns: 1fr; } }

/* Leaflet dlaždice nesmí dědit img { max-width } */
.leaflet-container img { max-width: none !important; max-height: none !important; }
@media (max-width: 960px) and (min-width: 721px) {
  .top-search { order: 3; flex-basis: 100%; padding-bottom: 10px; }
  .top-nav { margin-left: auto; }
}
.facts { gap: 0; background: var(--surface); }
.facts div { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -1px -1px 0; }
.facts .wide { grid-column: 1 / -1; }
.facts dd br + * { margin-top: 2px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0 16px; margin-bottom: 8px; }
.faq summary { cursor: pointer; font-weight: 600; padding: 14px 0; }
.faq details p { margin-top: 0; }
.foot-note a { display: inline-block; padding: 4px 0; }
.map-start { position: relative; margin: 180px auto 0; display: block; border: 0; border-radius: 12px; padding: 12px 20px; font: inherit; font-weight: 600; background: var(--brand); color: #fff; cursor: pointer; }
.leaflet-container .map-start { display: none; }
