:root {
  --forest: #1a1a1a;
  --forest-deep: #111111;
  --cream: #f4f1ee;
  --paper: #ffffff;
  --ink: #1a1a1a;
  --muted: #66615e;
  --line: rgba(26, 26, 26, .14);
  --coral: #e68560;
  --coral-soft: #f2b49b;
  --wine: #e68560;
  --nature: #778f72;
  --culture: #bf755b;
  --view: #6f858b;
  --leisure: #8b8179;
  --event: #d65f4a;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; overflow-x: hidden; }
body {
  background: var(--cream);
  color: var(--ink);
  font-family: Montserrat, Arial, Helvetica, sans-serif;
}
button, a { font: inherit; }
button { color: inherit; }
.skip-link { position: fixed; left: 12px; top: -50px; z-index: 2000; padding: 10px 14px; background: #fff; color: #000; border-radius: 6px; }
.skip-link:focus { top: 12px; }

.app-shell { display: grid; grid-template-columns: minmax(330px, 390px) 1fr; grid-template-rows: minmax(0, 1fr); height: 100vh; min-height: 640px; overflow: hidden; }
.sidebar { display: flex; min-width: 0; min-height: 0; height: 100%; flex-direction: column; background: var(--paper); border-right: 1px solid var(--line); z-index: 10; }
.hero { position: relative; padding: 32px 32px 23px; color: var(--ink); background: #fff; overflow: hidden; }
.hero::before, .hero::after { content: ""; position: absolute; z-index: 0; background: var(--coral); transform: skew(-12deg); pointer-events: none; }
.hero::before { width: 72px; height: 118px; right: 22px; top: -34px; opacity: .92; }
.hero::after { width: 54px; height: 96px; right: 72px; top: -28px; background: var(--coral-soft); opacity: .72; }
.hero > * { position: relative; z-index: 1; }
.eyebrow { display: flex; align-items: center; gap: 7px; margin-bottom: 18px; color: var(--coral); font-size: 10px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.hero h1 { margin: 0; font-size: clamp(39px, 4vw, 52px); font-weight: 500; line-height: .92; letter-spacing: -.045em; }
.hero h1 em { color: var(--coral); font-style: normal; font-weight: 400; }
.hero p { max-width: 300px; margin: 18px 0 22px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.hero-meta { display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); padding-top: 15px; color: var(--muted); font-size: 11px; letter-spacing: .03em; }
.hero-meta strong { color: var(--ink); font-size: 14px; font-weight: 500; }
.locate-button { border: 0; background: transparent; padding: 4px 0; color: var(--ink); cursor: pointer; font-size: 11px; font-weight: 500; text-decoration: underline; text-underline-offset: 4px; }
.locate-button:hover, .locate-button:focus-visible { color: var(--coral); }

.filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 15px 20px; overflow: visible; border-block: 1px solid var(--line); background: #faf8f6; }
.filter { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 6px; border: 1px solid #b9b3af; border-radius: 0; background: #fff; padding: 8px 11px; color: var(--ink); font-size: 10px; font-weight: 500; cursor: pointer; transition: .2s ease; }
.filter:hover { border-color: var(--coral); color: var(--coral); }
.filter.active { border-color: var(--coral); background: var(--coral); color: #fff; }
.dot { width: 7px; height: 7px; border-radius: 50%; }
.dot.wine { background: var(--wine); } .dot.nature { background: var(--nature); } .dot.culture { background: var(--culture); } .dot.view { background: var(--view); } .dot.leisure { background: var(--leisure); } .dot.event { background: var(--event); }

.place-list { flex: 1; overflow-y: auto; padding: 4px 20px 16px; scrollbar-color: rgba(230,133,96,.45) transparent; }
.place-card { border-bottom: 1px solid var(--line); }
.place-main { display: grid; width: 100%; grid-template-columns: 30px 1fr 22px; gap: 10px; align-items: start; border: 0; background: transparent; padding: 16px 2px; text-align: left; cursor: pointer; }
.place-main:hover .place-name, .place-main:focus-visible .place-name { color: var(--coral); text-decoration: underline; text-underline-offset: 4px; }
.place-card.active { margin: 0 -8px; padding: 0 8px; border-color: transparent; background: #f8ebe5; border-radius: 0; box-shadow: inset 4px 0 0 var(--coral); }
.place-index { display: grid; width: 25px; height: 25px; place-items: center; border-radius: 0; background: #f0ece9; color: var(--ink); font-size: 11px; font-weight: 500; }
.place-card.active .place-index { background: var(--coral); color: #fff; }
.place-copy { display: flex; min-width: 0; flex-direction: column; }
.place-category { margin-bottom: 4px; font-size: 9px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.place-category[data-category="wein"] { color: var(--wine); } .place-category[data-category="natur"] { color: var(--nature); } .place-category[data-category="kultur"] { color: var(--culture); } .place-category[data-category="aussicht"] { color: var(--view); } .place-category[data-category="freizeit"] { color: var(--leisure); } .place-category[data-category="veranstaltung"] { color: var(--event); }
.place-name { font-size: 15px; font-weight: 500; line-height: 1.25; }
.place-description { display: -webkit-box; margin-top: 5px; overflow: hidden; color: var(--muted); font-size: 11px; line-height: 1.45; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.place-arrow { padding-top: 14px; color: #9ca6a1; font-size: 13px; transition: transform .2s ease; }
.place-main:hover .place-arrow { transform: translate(2px,-2px); color: var(--ink); }
.empty-state { padding: 34px 12px; color: var(--muted); text-align: center; }
.sidebar-footer { display: flex; align-items: center; gap: 7px; border-top: 1px solid var(--line); padding: 11px 20px; color: #82908a; font-size: 10px; }
.sidebar-footer a { margin-left: auto; color: var(--ink); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }

.map-panel { position: relative; min-width: 0; min-height: 0; height: 100%; background: #d9dfd8; }
#map { width: 100%; height: 100%; overflow: hidden; background: #d9dfd8; }
.map-topbar { position: absolute; z-index: 600; top: 20px; left: 20px; right: 20px; display: flex; align-items: center; justify-content: space-between; pointer-events: none; }
.map-topbar > div, .fit-button { box-shadow: 0 8px 30px rgba(17,44,37,.12); backdrop-filter: blur(8px); }
.map-topbar > div { display: flex; flex-direction: column; border: 0; border-radius: 0; background: rgba(255,255,255,.94); padding: 11px 14px; box-shadow: inset 4px 0 0 var(--coral), 0 8px 30px rgba(26,26,26,.12); }
.map-kicker { color: var(--muted); font-size: 9px; font-weight: 750; letter-spacing: .12em; text-transform: uppercase; }
.map-title { font-size: 16px; font-weight: 500; }
.fit-button { pointer-events: auto; border: 0; border-radius: 0; background: var(--coral); padding: 11px 14px; color: #fff; font-size: 10px; font-weight: 500; cursor: pointer; }
.fit-button:hover { background: #cf704d; }
.map-note { position: absolute; z-index: 600; left: 50%; bottom: 28px; transform: translateX(-50%); border-radius: 0; background: rgba(26,26,26,.92); padding: 10px 16px; color: #fff; box-shadow: 0 8px 28px rgba(26,26,26,.2); font-size: 10px; white-space: nowrap; pointer-events: none; }
.legend { position: absolute; z-index: 600; right: 20px; bottom: 24px; border-radius: 0; background: rgba(255,255,255,.94); padding: 8px 11px; color: var(--muted); box-shadow: 0 5px 18px rgba(26,26,26,.1); font-size: 9px; }
.legend-line { display: inline-block; width: 16px; height: 2px; margin-right: 5px; vertical-align: middle; background: var(--forest); }

/* Leaflet core layout, kept local so the map remains correctly positioned even
   when a browser blocks third-party stylesheets. */
.leaflet-pane, .leaflet-tile, .leaflet-marker-icon, .leaflet-marker-shadow,
.leaflet-tile-container, .leaflet-pane > svg, .leaflet-pane > canvas,
.leaflet-zoom-box, .leaflet-image-layer { position: absolute; left: 0; top: 0; }
.leaflet-container { overflow: hidden; outline-offset: 1px; -webkit-tap-highlight-color: transparent; }
.leaflet-container img.leaflet-tile { max-width: none !important; max-height: none !important; width: 256px; height: 256px; padding: 0; }
.leaflet-tile { visibility: hidden; user-select: none; }
.leaflet-tile-loaded { visibility: inherit; }
.leaflet-marker-icon, .leaflet-marker-shadow { display: block; user-select: none; }
.leaflet-pane { z-index: 400; }
.leaflet-tile-pane { z-index: 200; }
.leaflet-overlay-pane { z-index: 400; }
.leaflet-shadow-pane { z-index: 500; }
.leaflet-marker-pane { z-index: 600; }
.leaflet-tooltip-pane { z-index: 650; }
.leaflet-popup-pane { z-index: 700; }
.leaflet-map-pane canvas { z-index: 100; }
.leaflet-map-pane svg { z-index: 200; }
.leaflet-vml-shape { width: 1px; height: 1px; }
.lvml { display: inline-block; position: absolute; }
.leaflet-control { position: relative; z-index: 800; pointer-events: auto; }
.leaflet-top, .leaflet-bottom { position: absolute; z-index: 1000; pointer-events: none; }
.leaflet-top { top: 0; } .leaflet-right { right: 0; } .leaflet-bottom { bottom: 0; } .leaflet-left { left: 0; }
.leaflet-control { float: left; clear: both; }
.leaflet-right .leaflet-control { float: right; }
.leaflet-top .leaflet-control { margin-top: 10px; }
.leaflet-bottom .leaflet-control { margin-bottom: 10px; }
.leaflet-left .leaflet-control { margin-left: 10px; }
.leaflet-right .leaflet-control { margin-right: 10px; }
.leaflet-control-zoom a { display: block; width: 30px; height: 30px; border-bottom: 1px solid #ccc; text-align: center; text-decoration: none; font: 700 18px/30px Arial,sans-serif; }
.leaflet-control-zoom a:last-child { border-bottom: 0; }
.leaflet-disabled { cursor: default; opacity: .45; }
.leaflet-control-attribution { margin: 0; padding: 0 5px; color: #333; line-height: 1.4; }
.leaflet-popup { position: absolute; margin-bottom: 20px; text-align: center; }
.leaflet-popup-content-wrapper { padding: 1px; text-align: left; }
.leaflet-popup-content { line-height: 1.3; }
.leaflet-popup-tip-container { position: absolute; left: 50%; width: 40px; height: 20px; margin-left: -20px; overflow: hidden; pointer-events: none; }
.leaflet-popup-tip { width: 17px; height: 17px; margin: -10px auto 0; transform: rotate(45deg); background: var(--paper); box-shadow: 3px 3px 6px rgba(0,0,0,.12); }
.leaflet-popup-close-button { position: absolute; z-index: 1; top: 0; right: 0; border: 0; background: transparent; padding: 4px 4px 0 0; color: #757575; text-decoration: none; }
.leaflet-zoom-animated { transform-origin: 0 0; }
.leaflet-zoom-anim .leaflet-zoom-animated { transition: transform .25s cubic-bezier(0,0,.25,1); }

.leaflet-control-zoom { border: 0 !important; box-shadow: 0 6px 20px rgba(20,50,43,.15) !important; }
.leaflet-control-zoom a { color: var(--ink) !important; background: var(--paper) !important; }
.leaflet-control-attribution { background: rgba(255,255,255,.78) !important; font-size: 9px !important; }
.poi-marker { display: grid; width: 34px; height: 34px; place-items: center; border: 3px solid #fff; border-radius: 50% 50% 50% 7px; transform: rotate(-45deg); color: #fff; box-shadow: 0 5px 14px rgba(26,26,26,.3); font: 600 11px Montserrat,Arial,sans-serif; }
.poi-marker span { transform: rotate(45deg); }
.poi-marker.wein { background: var(--wine); } .poi-marker.natur { background: var(--nature); } .poi-marker.kultur { background: var(--culture); } .poi-marker.aussicht { background: var(--view); } .poi-marker.freizeit { background: var(--leisure); } .poi-marker.veranstaltung { background: var(--event); }
.leaflet-popup-content-wrapper { border-radius: 0; background: var(--paper); box-shadow: 0 12px 32px rgba(26,26,26,.22); }
.leaflet-popup-content { width: 220px !important; margin: 16px 18px; }
.popup-category { display: block; margin-bottom: 5px; font-size: 9px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.popup-title { display: block; margin-bottom: 7px; color: var(--ink); font-size: 18px; font-weight: 500; line-height: 1.15; }
.popup-copy { margin: 0 0 12px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.popup-actions { display: flex; gap: 8px; }
.popup-actions a { border-radius: 0; background: var(--coral); padding: 8px 10px; color: #fff; font-size: 9px; font-weight: 500; text-decoration: none; }
.popup-actions a.secondary { border: 1px solid var(--ink); background: transparent; color: var(--ink); }

@media (max-width: 760px) {
  .app-shell { display: flex; width: 100%; max-width: 100vw; height: auto; min-height: 100vh; flex-direction: column; overflow: hidden; }
  .sidebar { order: 2; width: 100%; max-width: 100vw; height: auto; border-right: 0; }
  .hero { padding: 24px 22px 20px; }
  .hero h1 { font-size: 43px; }
  .hero p { margin: 13px 0 17px; }
  .map-panel { order: 1; width: 100%; max-width: 100vw; height: 54vh; min-height: 390px; }
  .map-topbar { top: 12px; left: 12px; right: 12px; }
  .fit-button span, .legend { display: none; }
  .map-note { bottom: 15px; max-width: calc(100% - 24px); overflow: hidden; text-overflow: ellipsis; }
  .place-list { overflow: visible; }
  .sidebar-footer { margin-top: 8px; }
}

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; } }
