:root {
  /* Light only: soft greys and white, easy on the eyes. Red stays for buttons and highlights. */
  color-scheme: light;
  --bg: #f4f5f3; --surface: #ffffff; --surface-2: #eef0ed; --text: #2a2c29; --muted: #6d716b; --border: #e1e4df;
  --accent: #c8102e; --accent-ink: #ffffff; --accent-soft: #fbecee; --link: #a30d26;
  --green: #2e8b57; --blue: #3b78d8; --radius: 14px;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 6px 20px rgba(0,0,0,.05);
  --map-sea: #e9ebe7; --map-land: #ffffff; --map-line: #bfc4bc; --map-gem: #e4e7e2;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--link); }
img { display: block; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Header: sticky so the map controls stay reachable while scrolling long tables */
.site-header { position: sticky; top: 0; z-index: 1000; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 60px; }
.logo { display: flex; align-items: center; gap: 10px; font-weight: 700; text-decoration: none; color: var(--text); }
.site-header nav { display: flex; gap: 20px; }
.site-header nav a { text-decoration: none; color: var(--muted); font-weight: 500; font-size: .95rem; }
.site-header nav a:hover { color: var(--text); }
/* On phones the long site name is dropped; the paw icon stays as the home link */
@media (max-width: 640px) { .logo span { display: none; } .site-header nav { gap: 14px; } }

main { padding-bottom: 56px; }
main > section.wrap:first-child, .crumbs + section.wrap { padding-top: 8px; }
h1 { font-size: clamp(1.8rem, 4.2vw, 2.8rem); line-height: 1.12; margin: .3em 0 .35em; letter-spacing: -.02em; }
h2 { font-size: 1.35rem; margin-top: 2em; letter-spacing: -.01em; }
.lead { font-size: 1.12rem; color: var(--muted); max-width: 46em; }
.lead strong { color: var(--text); }
.small { font-size: .85rem; color: var(--muted); }
.crumbs { font-size: .88rem; color: var(--muted); padding-top: 18px; }
.crumbs a { color: var(--muted); }
.prose { max-width: 760px; }
.btn { display: inline-flex; align-items: center; gap: 8px; background: var(--accent); color: var(--accent-ink); padding: 12px 20px; border-radius: 10px; text-decoration: none; font-weight: 600; border: 0; font: inherit; font-weight: 600; cursor: pointer; }
.btn:hover { filter: brightness(1.08); }

/* Hero: copy left, map right on desktop; stacks with the map first-class on mobile */
.hero { padding: 32px 0 28px; background: radial-gradient(1200px 400px at 85% 0%, var(--accent-soft), transparent 70%); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 32px; align-items: start; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 18px; } }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 700; color: var(--accent); margin: 0; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin: 20px 0 16px; }
.hero-actions select { flex: 1 1 200px; min-height: 48px; padding: 0 14px; font: inherit; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); }
.map { height: 460px; border-radius: var(--radius); border: 1px solid var(--border); margin: 20px 0 8px; z-index: 0; box-shadow: var(--shadow); background: var(--surface-2); }
.map-hero { height: 560px; margin-top: 0; }
@media (max-width: 900px) { .map-hero { height: 420px; } }
@media (max-width: 600px) { .map { height: 340px; } }
.legend { font-size: .85rem; color: var(--muted); display: flex; gap: 6px 16px; flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; }
.dot.zone { background: var(--green); } .dot.auslauf { background: var(--blue); } .dot.verbot { background: #c8102e; }

/* Side panel listing Gemeinden of the selected Bundesland */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.panel-hint { margin: 0 0 10px; color: var(--muted); font-size: .92rem; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { font: inherit; font-size: .9rem; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); border-radius: 999px; padding: 6px 12px; cursor: pointer; }
.chip span { color: var(--muted); margin-left: 4px; }
.chip:hover { border-color: var(--accent); }
.panel-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: baseline; margin-bottom: 8px; }
.panel-head a { margin-left: auto; font-weight: 600; font-size: .92rem; }
.gem-list { list-style: none; margin: 0; padding: 0; columns: 2; column-gap: 20px; }
@media (max-width: 480px) { .gem-list { columns: 1; } }
.gem-list li { display: flex; justify-content: space-between; gap: 8px; padding: 3px 0; break-inside: avoid; font-size: .95rem; }
.gem-list span { color: var(--muted); font-variant-numeric: tabular-nums; }
.panel-more { margin: 6px 0 0; font-size: .85rem; color: var(--muted); }

/* Marquee of stats and data sources; pauses for reduced-motion users */
.marquee { overflow: hidden; border-block: 1px solid var(--border); background: var(--surface); padding: 14px 0; }
.mq-track { display: flex; gap: 48px; width: max-content; animation: mq 40s linear infinite; }
.marquee:hover .mq-track { animation-play-state: paused; }
.mq-item { white-space: nowrap; color: var(--muted); }
.mq-item strong { color: var(--text); font-size: 1.15rem; margin-right: 4px; }
.mq-item.src::before { content: "●"; color: var(--accent); margin-right: 10px; font-size: .7em; vertical-align: middle; }
@keyframes mq { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .mq-track { animation: none; flex-wrap: wrap; width: auto; justify-content: center; } }

/* Features: 3 columns on desktop, 1 on phones */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 40px; }
@media (max-width: 800px) { .features { grid-template-columns: 1fr; } }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; }
.feature h2 { font-size: 1.1rem; margin: 12px 0 6px; }
.feature p { margin: 0; color: var(--muted); font-size: .97rem; }
.icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.icon svg { width: 24px; height: 24px; }
.section-title { margin-top: 48px; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; text-decoration: none; color: var(--text); display: block; transition: border-color .15s, transform .15s; }
.card:hover { border-color: var(--accent); transform: translateY(-1px); }
.card-title { font-weight: 600; display: block; }
.card .nr { color: var(--accent); }
.card .meta { display: block; font-size: .85rem; color: var(--muted); }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
td:first-child { white-space: normal; min-width: 180px; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: var(--surface-2); }
tr:last-child td { border-bottom: 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.ad { display: flex; align-items: baseline; gap: 10px; margin: 24px 0; padding: 10px 14px; border-radius: 10px; background: var(--surface-2); font-size: .9rem; color: var(--muted); }
.ad p { margin: 0; }
.ad a { color: var(--muted); text-decoration-color: var(--border); text-underline-offset: 3px; }
.ad a:hover { color: var(--text); }
.ad-label { flex: none; font-size: .68rem; text-transform: uppercase; letter-spacing: .06em; border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px; }
.pager { display: flex; justify-content: space-between; gap: 12px; margin-top: 32px; }

.site-footer { border-top: 1px solid var(--border); background: var(--surface); padding: 36px 0 24px; font-size: .9rem; color: var(--muted); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 28px; }
@media (max-width: 700px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }
.footer-brand { display: flex; align-items: center; gap: 8px; font-weight: 700; color: var(--text); margin-top: 0; }
.footer-head { font-weight: 700; color: var(--text); margin-top: 0; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 4px 0; }
.site-footer a { color: var(--muted); text-decoration: none; }
.site-footer a:hover { color: var(--text); }
.footer-legal { border-top: 1px solid var(--border); margin-top: 24px; padding-top: 16px; font-size: .8rem; }
.leaflet-container { font: inherit; }
.leaflet-container a { color: var(--link); }

/* Own SVG map of Austria on the homepage: no tiles, no wheel zoom, just shapes and dots */
.atmap { position: relative; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow); overflow: hidden; margin-bottom: 8px; }
.atmap svg { display: block; width: 100%; height: auto; aspect-ratio: 525 / 273; touch-action: manipulation; }
.atmap .land { fill: var(--map-land); stroke: var(--map-line); stroke-width: 1.2; vector-effect: non-scaling-stroke; cursor: pointer; transition: fill .2s, opacity .2s; }
.atmap .land:hover { fill: #f7f8f6; }
.atmap .land.active { fill: var(--map-land); cursor: default; }
.atmap .land.dim { opacity: .45; }
.atmap .gem { fill: transparent; stroke: var(--map-gem); stroke-width: .7; vector-effect: non-scaling-stroke; cursor: pointer; }
.atmap .gem.has { fill: color-mix(in srgb, var(--green) 7%, transparent); }
.atmap .gem:hover { fill: #f2f4f1; }
.atmap .gem.active { fill: transparent; stroke: var(--accent); stroke-width: 1.5; cursor: default; }
.atmap circle { stroke: var(--surface); stroke-width: 1.2; vector-effect: non-scaling-stroke; cursor: pointer; }
.atmap circle:hover, .atmap circle.sel { stroke: var(--text); stroke-width: 2.5; }
.atmap circle:focus { outline: none; stroke: var(--text); stroke-width: 2.5; }
.atmap .dot-zone { fill: var(--green); } .atmap .dot-auslauf { fill: var(--blue); } .atmap .dot-verbot { fill: #c8102e; }
.atmap-back { position: absolute; top: 10px; left: 10px; font: inherit; font-size: .88rem; font-weight: 600; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); cursor: pointer; box-shadow: var(--shadow); }
.map-card { position: absolute; left: 10px; right: 10px; bottom: 10px; max-width: 360px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 40px 12px 14px; box-shadow: 0 6px 24px rgba(0,0,0,.18); }
.map-card[hidden], .atmap-back[hidden] { display: none; }
.card-facts { margin: 2px 0 10px; font-size: .88rem; color: var(--muted); }
.card-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.card-close { position: absolute; top: 6px; right: 8px; border: 0; background: none; color: var(--muted); font-size: 1.4rem; line-height: 1; cursor: pointer; padding: 4px; }
.btn-sm { padding: 8px 14px; font-size: .9rem; }
.btn-ghost { font-weight: 600; font-size: .9rem; }
.linkish { font: inherit; background: none; border: 0; padding: 0; color: var(--link); cursor: pointer; text-align: left; text-decoration: underline; text-underline-offset: 3px; }
.gem-list.single { columns: 1; }
.popup-gmaps { font-weight: 600; }
.atmap svg.overview circle { pointer-events: none; }

/* Dog schools & clubs: own category, purple */
.dot.schule { background: #7c4dcc; }
.atmap .dot-schule { fill: #7c4dcc; }
.panel-sub { display: flex; align-items: center; gap: 6px; margin: 12px 0 4px; font-size: .85rem; font-weight: 600; color: var(--muted); }
.card-note { margin: -6px 0 10px; font-size: .82rem; color: var(--muted); }

/* Free zoom on the homepage map: drag, pinch, +/−, Ctrl + wheel */
.atmap svg { touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; }
.atmap svg.dragging { cursor: grabbing; }
.atmap-zoom { position: absolute; top: 10px; right: 10px; display: flex; flex-direction: column; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.atmap-zoom button { width: 36px; height: 36px; border: 0; background: none; color: var(--text); font-size: 1.25rem; line-height: 1; cursor: pointer; }
.atmap-zoom button + button { border-top: 1px solid var(--border); }
.atmap-zoom button:hover { background: var(--surface-2); }
.atmap-hint { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.45); color: #fff; font-weight: 600; pointer-events: none; text-align: center; padding: 16px; }
.atmap-hint[hidden] { display: none; }

/* Legend doubles as category toggles on the homepage */
.legend-toggle label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; user-select: none; }
.legend-toggle input { margin: 0; accent-color: var(--accent); }

/* Explorer: the homepage map fills the screen; intro + list sit in a white side column */
.explorer { display: grid; grid-template-columns: 380px minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr);
  grid-template-areas: "intro map" "panel map"; height: calc(100vh - 61px); height: calc(100dvh - 61px); min-height: 560px; max-height: 960px;
  border-bottom: 1px solid var(--border); }
.explorer-intro { grid-area: intro; padding: 28px 24px 8px; background: var(--surface); border-right: 1px solid var(--border); }
.explorer-intro h1 { margin: .2em 0 .2em; }
.explorer-intro .lead { margin: 0; font-size: 1.02rem; }
.explorer-intro .hero-actions { margin: 18px 0 8px; }
.explorer-panel { grid-area: panel; overflow-y: auto; border: 0; border-radius: 0; box-shadow: none; padding: 8px 24px 24px;
  border-right: 1px solid var(--border); }
.explorer-map { grid-area: map; position: relative; min-height: 0; }
.explorer .atmap { position: absolute; inset: 0; border: 0; border-radius: 0; box-shadow: none; margin: 0; background: var(--map-sea); }
.explorer .atmap svg { width: 100%; height: 100%; aspect-ratio: auto; }
.explorer .legend-toggle { position: absolute; left: 12px; bottom: 12px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: 6px 14px; box-shadow: var(--shadow); color: var(--text); font-size: .85rem; }
.explorer .map-card { bottom: 60px; }
.explorer .atmap-back { top: 12px; left: 12px; }
.explorer .atmap-zoom { top: 12px; right: 12px; }
/* Phones/tablets: intro, then a tall map, then the list */
@media (max-width: 1100px) {
  /* Austria is wide: below this width a side column would leave the map taller than wide */
  .explorer { grid-template-columns: 1fr; grid-template-rows: auto clamp(300px, 80vw, 62vh) auto; grid-template-areas: "intro" "map" "panel";
    height: auto; max-height: none; min-height: 0; }
  .explorer-intro, .explorer-panel { border-right: 0; padding-left: 16px; padding-right: 16px; }
  .explorer-panel { overflow: visible; padding-top: 16px; }
  .explorer .legend-toggle { left: 8px; right: 8px; bottom: 8px; justify-content: center; flex-wrap: nowrap; gap: 10px; padding: 5px 10px; font-size: .76rem; }
  .explorer .legend-toggle input { width: 13px; height: 13px; }
  .explorer .map-card { bottom: 48px; }
}
.marquee { background: var(--surface); }
/* Street maps on detail pages: greyed tiles so they match the calm look */
.leaflet-tile-pane { filter: grayscale(1) brightness(1.04) contrast(.92); }

/* Nearby list and FAQ on location pages */
.nearby { padding-left: 1.1em; }
.nearby li { margin: 4px 0; }
.muted { color: var(--muted); }
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; margin: 8px 0; }
.faq summary { font-weight: 600; cursor: pointer; }
.faq details p { margin: 8px 0 2px; color: var(--muted); }
