/*! ============================================================
 *  VENDOR CSS BUNDLE — DO NOT EDIT THIS BLOCK BY HAND.
 *  Regenerate when upgrading Leaflet / MarkerCluster:
 *    bash scripts/rebuild_vendor_css.sh
 *  Source files (kept in repo for upgrade diffs):
 *    assets/vendor/leaflet/leaflet.css
 *    assets/vendor/leaflet.markercluster/MarkerCluster.css
 *    assets/vendor/leaflet.markercluster/MarkerCluster.Default.css
 *    assets/fonts/fonts.css
 *  Bundled here so the browser issues ONE stylesheet request instead
 *  of five render-blocking requests in <head>.
 *  Our site overrides follow BELOW this block — they win the cascade
 *  because they come later in source order.
 * ============================================================ */

/* ── leaflet.css ── */
/* required styles */

.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,
.leaflet-layer {
	position: absolute;
	left: 0;
	top: 0;
	}
.leaflet-container {
	overflow: hidden;
	}
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow {
	-webkit-user-select: none;
	   -moz-user-select: none;
	        user-select: none;
	  -webkit-user-drag: none;
	}
/* Prevents IE11 from highlighting tiles in blue */
.leaflet-tile::selection {
	background: transparent;
}
/* Safari renders non-retina tile on retina better with this, but Chrome is worse */
.leaflet-safari .leaflet-tile {
	image-rendering: -webkit-optimize-contrast;
	}
/* hack that prevents hw layers "stretching" when loading new tiles */
.leaflet-safari .leaflet-tile-container {
	width: 1600px;
	height: 1600px;
	-webkit-transform-origin: 0 0;
	}
.leaflet-marker-icon,
.leaflet-marker-shadow {
	display: block;
	}
/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */
/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */
.leaflet-container .leaflet-overlay-pane svg {
	max-width: none !important;
	max-height: none !important;
	}
.leaflet-container .leaflet-marker-pane img,
.leaflet-container .leaflet-shadow-pane img,
.leaflet-container .leaflet-tile-pane img,
.leaflet-container img.leaflet-image-layer,
.leaflet-container .leaflet-tile {
	max-width: none !important;
	max-height: none !important;
	width: auto;
	padding: 0;
	}

.leaflet-container img.leaflet-tile {
	/* See: https://bugs.chromium.org/p/chromium/issues/detail?id=600120 */
	mix-blend-mode: plus-lighter;
}

.leaflet-container.leaflet-touch-zoom {
	-ms-touch-action: pan-x pan-y;
	touch-action: pan-x pan-y;
	}
.leaflet-container.leaflet-touch-drag {
	-ms-touch-action: pinch-zoom;
	/* Fallback for FF which doesn't support pinch-zoom */
	touch-action: none;
	touch-action: pinch-zoom;
}
.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom {
	-ms-touch-action: none;
	touch-action: none;
}
.leaflet-container {
	-webkit-tap-highlight-color: transparent;
}
.leaflet-container a {
	-webkit-tap-highlight-color: rgba(51, 181, 229, 0.4);
}
.leaflet-tile {
	filter: inherit;
	visibility: hidden;
	}
.leaflet-tile-loaded {
	visibility: inherit;
	}
.leaflet-zoom-box {
	width: 0;
	height: 0;
	-moz-box-sizing: border-box;
	     box-sizing: border-box;
	z-index: 800;
	}
/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */
.leaflet-overlay-pane svg {
	-moz-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 {
	behavior: url(#default#VML);
	display: inline-block;
	position: absolute;
	}


/* control positioning */

.leaflet-control {
	position: relative;
	z-index: 800;
	pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
	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;
	}


/* zoom and fade animations */

.leaflet-fade-anim .leaflet-popup {
	opacity: 0;
	-webkit-transition: opacity 0.2s linear;
	   -moz-transition: opacity 0.2s linear;
	        transition: opacity 0.2s linear;
	}
.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {
	opacity: 1;
	}
.leaflet-zoom-animated {
	-webkit-transform-origin: 0 0;
	    -ms-transform-origin: 0 0;
	        transform-origin: 0 0;
	}
svg.leaflet-zoom-animated {
	will-change: transform;
}

.leaflet-zoom-anim .leaflet-zoom-animated {
	-webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);
	   -moz-transition:    -moz-transform 0.25s cubic-bezier(0,0,0.25,1);
	        transition:         transform 0.25s cubic-bezier(0,0,0.25,1);
	}
.leaflet-zoom-anim .leaflet-tile,
.leaflet-pan-anim .leaflet-tile {
	-webkit-transition: none;
	   -moz-transition: none;
	        transition: none;
	}

.leaflet-zoom-anim .leaflet-zoom-hide {
	visibility: hidden;
	}


/* cursors */

.leaflet-interactive {
	cursor: pointer;
	}
.leaflet-grab {
	cursor: -webkit-grab;
	cursor:    -moz-grab;
	cursor:         grab;
	}
.leaflet-crosshair,
.leaflet-crosshair .leaflet-interactive {
	cursor: crosshair;
	}
.leaflet-popup-pane,
.leaflet-control {
	cursor: auto;
	}
.leaflet-dragging .leaflet-grab,
.leaflet-dragging .leaflet-grab .leaflet-interactive,
.leaflet-dragging .leaflet-marker-draggable {
	cursor: move;
	cursor: -webkit-grabbing;
	cursor:    -moz-grabbing;
	cursor:         grabbing;
	}

/* marker & overlays interactivity */
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-image-layer,
.leaflet-pane > svg path,
.leaflet-tile-container {
	pointer-events: none;
	}

.leaflet-marker-icon.leaflet-interactive,
.leaflet-image-layer.leaflet-interactive,
.leaflet-pane > svg path.leaflet-interactive,
svg.leaflet-image-layer.leaflet-interactive path {
	pointer-events: visiblePainted; /* IE 9-10 doesn't have auto */
	pointer-events: auto;
	}

/* visual tweaks */

.leaflet-container {
	background: #ddd;
	outline-offset: 1px;
	}
.leaflet-container a {
	color: #0078A8;
	}
.leaflet-zoom-box {
	border: 2px dotted #38f;
	background: rgba(255,255,255,0.5);
	}


/* general typography */
.leaflet-container {
	font-family: "Helvetica Neue", Arial, Helvetica, sans-serif;
	font-size: 12px;
	font-size: 0.75rem;
	line-height: 1.5;
	}


/* general toolbar styles */

.leaflet-bar {
	box-shadow: 0 1px 5px rgba(0,0,0,0.65);
	border-radius: 4px;
	}
.leaflet-bar a {
	background-color: #fff;
	border-bottom: 1px solid #ccc;
	width: 26px;
	height: 26px;
	line-height: 26px;
	display: block;
	text-align: center;
	text-decoration: none;
	color: black;
	}
.leaflet-bar a,
.leaflet-control-layers-toggle {
	background-position: 50% 50%;
	background-repeat: no-repeat;
	display: block;
	}
.leaflet-bar a:hover,
.leaflet-bar a:focus {
	background-color: #f4f4f4;
	}
.leaflet-bar a:first-child {
	border-top-left-radius: 4px;
	border-top-right-radius: 4px;
	}
.leaflet-bar a:last-child {
	border-bottom-left-radius: 4px;
	border-bottom-right-radius: 4px;
	border-bottom: none;
	}
.leaflet-bar a.leaflet-disabled {
	cursor: default;
	background-color: #f4f4f4;
	color: #bbb;
	}

.leaflet-touch .leaflet-bar a {
	width: 30px;
	height: 30px;
	line-height: 30px;
	}
.leaflet-touch .leaflet-bar a:first-child {
	border-top-left-radius: 2px;
	border-top-right-radius: 2px;
	}
.leaflet-touch .leaflet-bar a:last-child {
	border-bottom-left-radius: 2px;
	border-bottom-right-radius: 2px;
	}

/* zoom control */

.leaflet-control-zoom-in,
.leaflet-control-zoom-out {
	font: bold 18px 'Lucida Console', Monaco, monospace;
	text-indent: 1px;
	}

.leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out  {
	font-size: 22px;
	}


/* layers control */

.leaflet-control-layers {
	box-shadow: 0 1px 5px rgba(0,0,0,0.4);
	background: #fff;
	border-radius: 5px;
	}
.leaflet-control-layers-toggle {
	background-image: url(/assets/vendor/leaflet/images/layers.png);
	width: 36px;
	height: 36px;
	}
.leaflet-retina .leaflet-control-layers-toggle {
	background-image: url(/assets/vendor/leaflet/images/layers-2x.png);
	background-size: 26px 26px;
	}
.leaflet-touch .leaflet-control-layers-toggle {
	width: 44px;
	height: 44px;
	}
.leaflet-control-layers .leaflet-control-layers-list,
.leaflet-control-layers-expanded .leaflet-control-layers-toggle {
	display: none;
	}
.leaflet-control-layers-expanded .leaflet-control-layers-list {
	display: block;
	position: relative;
	}
.leaflet-control-layers-expanded {
	padding: 6px 10px 6px 6px;
	color: #333;
	background: #fff;
	}
.leaflet-control-layers-scrollbar {
	overflow-y: scroll;
	overflow-x: hidden;
	padding-right: 5px;
	}
.leaflet-control-layers-selector {
	margin-top: 2px;
	position: relative;
	top: 1px;
	}
.leaflet-control-layers label {
	display: block;
	font-size: 13px;
	font-size: 1.08333em;
	}
.leaflet-control-layers-separator {
	height: 0;
	border-top: 1px solid #ddd;
	margin: 5px -10px 5px -6px;
	}

/* Default icon URLs */
.leaflet-default-icon-path { /* used only in path-guessing heuristic, see L.Icon.Default */
	background-image: url(/assets/vendor/leaflet/images/marker-icon.png);
	}


/* attribution and scale controls */

.leaflet-container .leaflet-control-attribution {
	background: #fff;
	background: rgba(255, 255, 255, 0.8);
	margin: 0;
	}
.leaflet-control-attribution,
.leaflet-control-scale-line {
	padding: 0 5px;
	color: #333;
	line-height: 1.4;
	}
.leaflet-control-attribution a {
	text-decoration: none;
	}
.leaflet-control-attribution a:hover,
.leaflet-control-attribution a:focus {
	text-decoration: underline;
	}
.leaflet-attribution-flag {
	display: inline !important;
	vertical-align: baseline !important;
	width: 1em;
	height: 0.6669em;
	}
.leaflet-left .leaflet-control-scale {
	margin-left: 5px;
	}
.leaflet-bottom .leaflet-control-scale {
	margin-bottom: 5px;
	}
.leaflet-control-scale-line {
	border: 2px solid #777;
	border-top: none;
	line-height: 1.1;
	padding: 2px 5px 1px;
	white-space: nowrap;
	-moz-box-sizing: border-box;
	     box-sizing: border-box;
	background: rgba(255, 255, 255, 0.8);
	text-shadow: 1px 1px #fff;
	}
.leaflet-control-scale-line:not(:first-child) {
	border-top: 2px solid #777;
	border-bottom: none;
	margin-top: -2px;
	}
.leaflet-control-scale-line:not(:first-child):not(:last-child) {
	border-bottom: 2px solid #777;
	}

.leaflet-touch .leaflet-control-attribution,
.leaflet-touch .leaflet-control-layers,
.leaflet-touch .leaflet-bar {
	box-shadow: none;
	}
.leaflet-touch .leaflet-control-layers,
.leaflet-touch .leaflet-bar {
	border: 2px solid rgba(0,0,0,0.2);
	background-clip: padding-box;
	}

/* fyndling attribution override */
.leaflet-container .leaflet-control-attribution {
  background: rgba(243, 214, 168, 0.8) !important;
  margin: 0 12px !important;
  border-radius: 12px 12px 0 0 !important;
  padding: 2px 8px 20px 8px !important;
  box-shadow: 0 0 10px rgb(254, 240, 193) !important;
  color: #622a0e !important;
  font-family: "Crimson Text" !important;
  text-align: right !important;
  font-weight: bold !important;
  top: 18px !important;
}


/* popup */

.leaflet-popup {
	position: absolute;
	text-align: center;
	margin-bottom: 20px;
	}
.leaflet-popup-content-wrapper {
	padding: 1px;
	text-align: left;
	border-radius: 12px;
	}
.leaflet-popup-content {
	margin: 13px 24px 13px 20px;
	line-height: 1.3;
	font-size: 13px;
	font-size: 1.08333em;
	min-height: 1px;
	}
.leaflet-popup-content p {
	margin: 17px 0;
	margin: 1.3em 0;
	}
.leaflet-popup-tip-container {
	width: 40px;
	height: 20px;
	position: absolute;
	left: 50%;
	margin-top: -1px;
	margin-left: -20px;
	overflow: hidden;
	pointer-events: none;
	}
.leaflet-popup-tip {
	width: 17px;
	height: 17px;
	padding: 1px;

	margin: -10px auto 0;
	pointer-events: auto;

	-webkit-transform: rotate(45deg);
	   -moz-transform: rotate(45deg);
	    -ms-transform: rotate(45deg);
	        transform: rotate(45deg);
	}
.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
	background: white;
	color: #333;
	box-shadow: 0 3px 14px rgba(0,0,0,0.4);
	}
.leaflet-container a.leaflet-popup-close-button {
	position: absolute;
	top: 0;
	right: 0;
	border: none;
	text-align: center;
	width: 24px;
	height: 24px;
	font: 16px/24px Tahoma, Verdana, sans-serif;
	color: #757575;
	text-decoration: none;
	background: transparent;
	}
.leaflet-container a.leaflet-popup-close-button:hover,
.leaflet-container a.leaflet-popup-close-button:focus {
	color: #585858;
	}
.leaflet-popup-scrolled {
	overflow: auto;
	}

.leaflet-oldie .leaflet-popup-content-wrapper {
	-ms-zoom: 1;
	}
.leaflet-oldie .leaflet-popup-tip {
	width: 24px;
	margin: 0 auto;

	-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";
	filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);
	}

.leaflet-oldie .leaflet-control-zoom,
.leaflet-oldie .leaflet-control-layers,
.leaflet-oldie .leaflet-popup-content-wrapper,
.leaflet-oldie .leaflet-popup-tip {
	border: 1px solid #999;
	}


/* div icon */

.leaflet-div-icon {
	background: #fff;
	border: 1px solid #666;
	}


/* Tooltip */
/* Base styles for the element that has a tooltip */
.leaflet-tooltip {
	position: absolute;
	padding: 6px;
	background-color: #fff;
	border: 1px solid #fff;
	border-radius: 3px;
	color: #222;
	white-space: nowrap;
	-webkit-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
	pointer-events: none;
	box-shadow: 0 1px 3px rgba(0,0,0,0.4);
	}
.leaflet-tooltip.leaflet-interactive {
	cursor: pointer;
	pointer-events: auto;
	}
.leaflet-tooltip-top:before,
.leaflet-tooltip-bottom:before,
.leaflet-tooltip-left:before,
.leaflet-tooltip-right:before {
	position: absolute;
	pointer-events: none;
	border: 6px solid transparent;
	background: transparent;
	content: "";
	}

/* Directions */

.leaflet-tooltip-bottom {
	margin-top: 6px;
}
.leaflet-tooltip-top {
	margin-top: -6px;
}
.leaflet-tooltip-bottom:before,
.leaflet-tooltip-top:before {
	left: 50%;
	margin-left: -6px;
	}
.leaflet-tooltip-top:before {
	bottom: 0;
	margin-bottom: -12px;
	border-top-color: #fff;
	}
.leaflet-tooltip-bottom:before {
	top: 0;
	margin-top: -12px;
	margin-left: -6px;
	border-bottom-color: #fff;
	}
.leaflet-tooltip-left {
	margin-left: -6px;
}
.leaflet-tooltip-right {
	margin-left: 6px;
}
.leaflet-tooltip-left:before,
.leaflet-tooltip-right:before {
	top: 50%;
	margin-top: -6px;
	}
.leaflet-tooltip-left:before {
	right: 0;
	margin-right: -12px;
	border-left-color: #fff;
	}
.leaflet-tooltip-right:before {
	left: 0;
	margin-left: -12px;
	border-right-color: #fff;
	}

/* Printing */

@media print {
	/* Prevent printers from removing background-images of controls. */
	.leaflet-control {
		-webkit-print-color-adjust: exact;
		print-color-adjust: exact;
		}
	}

/* ── MarkerCluster.css ── */
.leaflet-cluster-anim .leaflet-marker-icon, .leaflet-cluster-anim .leaflet-marker-shadow {
	-webkit-transition: -webkit-transform 0.3s ease-out, opacity 0.3s ease-in;
	-moz-transition: -moz-transform 0.3s ease-out, opacity 0.3s ease-in;
	-o-transition: -o-transform 0.3s ease-out, opacity 0.3s ease-in;
	transition: transform 0.3s ease-out, opacity 0.3s ease-in;
}

.leaflet-cluster-spider-leg {
	/* stroke-dashoffset (duration and function) should match with leaflet-marker-icon transform in order to track it exactly */
	-webkit-transition: -webkit-stroke-dashoffset 0.3s ease-out, -webkit-stroke-opacity 0.3s ease-in;
	-moz-transition: -moz-stroke-dashoffset 0.3s ease-out, -moz-stroke-opacity 0.3s ease-in;
	-o-transition: -o-stroke-dashoffset 0.3s ease-out, -o-stroke-opacity 0.3s ease-in;
	transition: stroke-dashoffset 0.3s ease-out, stroke-opacity 0.3s ease-in;
}

/* ── MarkerCluster.Default.css ── */
.marker-cluster-small {
	background-color: rgba(181, 226, 140, 0.6);
	}
.marker-cluster-small div {
	background-color: rgba(110, 204, 57, 0.6);
	}

.marker-cluster-medium {
	background-color: rgba(241, 211, 87, 0.6);
	}
.marker-cluster-medium div {
	background-color: rgba(240, 194, 12, 0.6);
	}

.marker-cluster-large {
	background-color: rgba(253, 156, 115, 0.6);
	}
.marker-cluster-large div {
	background-color: rgba(241, 128, 23, 0.6);
	}

	/* IE 6-8 fallback colors */
.leaflet-oldie .marker-cluster-small {
	background-color: rgb(181, 226, 140);
	}
.leaflet-oldie .marker-cluster-small div {
	background-color: rgb(110, 204, 57);
	}

.leaflet-oldie .marker-cluster-medium {
	background-color: rgb(241, 211, 87);
	}
.leaflet-oldie .marker-cluster-medium div {
	background-color: rgb(240, 194, 12);
	}

.leaflet-oldie .marker-cluster-large {
	background-color: rgb(253, 156, 115);
	}
.leaflet-oldie .marker-cluster-large div {
	background-color: rgb(241, 128, 23);
}

.marker-cluster {
	background-clip: padding-box;
	border-radius: 20px;
	}
.marker-cluster div {
	width: 30px;
	height: 30px;
	margin-left: 5px;
	margin-top: 5px;

	text-align: center;
	border-radius: 15px;
	font: 12px "Helvetica Neue", Arial, Helvetica, sans-serif;
	}
.marker-cluster span {
	line-height: 30px;
	}
/* ── fonts.css (self-hosted Crimson Text) ── */
/* Self-hosted fonts - replaces Google Fonts (fonts.googleapis.com / fonts.gstatic.com).
   Loaded via <link rel="stylesheet" href="/assets/fonts/fonts.css">.
   Covers latin + latin-ext subsets (sufficient for DE/AT/CH/EN content). */

/* ── Crimson Text - italic 400 ───────────────────────────────────────────── */
@font-face {
  font-family: 'Crimson Text';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/crimson-text-400-italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Crimson Text';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/crimson-text-400-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── Crimson Text - normal 400 ───────────────────────────────────────────── */
@font-face {
  font-family: 'Crimson Text';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/crimson-text-400-normal-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Crimson Text';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/crimson-text-400-normal-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── Crimson Text - normal 600 ───────────────────────────────────────────── */
@font-face {
  font-family: 'Crimson Text';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/crimson-text-600-normal-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                 U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Crimson Text';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/crimson-text-600-normal-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                 U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                 U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}


/*! =========== END VENDOR BUNDLE — site styles below =========== */




/* === Color Palette === */
:root {
  --color-gold: #8b6914;
  --color-border: #a0843a;
  --color-text-dark: #4a2e0a;
  --color-text: #3b2a1a;
  --color-text-muted: #7a5a2a;
  --color-text-heading: #5a3a1a;
  --color-parchment: #eddcb0;
  --color-parchment-warm: #eed4a2;
  --color-input-border: #c8a96e;
  --color-divider: #c4a45a;
}

/* === Reset & Base === */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* === Focus-visible - keyboard accessibility === */
*:focus-visible {
  outline: 2px solid #8C6E42;
  outline-offset: 2px;
}
/* Round outline for round buttons */
#panel-toggle:focus-visible,
#legend-toggle:focus-visible,
.list-modal-close:focus-visible,
.info-modal-close:focus-visible {
  outline-offset: 0;
  border-radius: 50%;
}
/* Remove default outline for mouse clicks */
*:focus:not(:focus-visible) {
  outline: none;
}

html, body {
  width: 100%;
  height: 100%;
  height: 100dvh; /* iOS Safari: dynamic viewport (no address bar shift) */
  overflow: hidden;
  background-color: var(--color-parchment); /* #eddcb0 */
  font-family: 'Crimson Text', Georgia, serif;
  color: var(--color-text);
  background-color: var(--color-parchment-warm); /* pergament warm - visible through translucent status bar in PWA */
}

/* === Fullscreen Map === */
.leaflet-container {
  background: var(--color-parchment) !important;
}
/* Tile pane background covers blank tile areas (before tiles load) so the
   SEO footer below in DOM order doesn't show through. */
.leaflet-tile-pane {
  background: var(--color-parchment);
}
#lcp-placeholder {
  /* Centered card with <img> backdrop (~400×300px = 120 000 px²).
     Must stay larger than Leaflet's bottomright zoom+attribution column
     (~412×210 px² on mobile) so the LCP trace event doesn't drift to it
     after Leaflet inits. Not viewport-filling → not subject to Chrome's
     loading-overlay exclusion. */
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 400px;
  max-width: 92vw;
  height: 300px;
  max-height: 48vh;
  z-index: 8500;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.5s ease;
  background: #eed4a2;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  box-shadow: 0 0 36px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
.lcp-bg {
  display: block;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
#lcp-placeholder::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(245, 230, 200, 0.6);
  pointer-events: none;
}
.lcp-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 16px;
  text-align: center;
}
.lcp-logo {
  display: block;
  width: 240px;
  height: auto;
  max-width: 100%;
}
.lcp-claim {
  font-family: 'Crimson Text', Georgia, serif;
  font-style: italic;
  font-size: 1.2rem;
  color: #3b2a1a;
  text-shadow: 0 1px 2px rgba(255, 255, 255, 0.6);
  line-height: 1.2;
}
/* opacity:0 would disqualify from LCP — use 0.001 (visually transparent, LCP-valid) */
#lcp-placeholder.fading { opacity: 0.001; }

#map {
  position: absolute;
  inset: 0;
  /* No z-index: do NOT create a stacking context here.
     Without z-index, Leaflet's internal panes (200-800) participate
     in the root stacking context alongside our other overlays. */
  user-select: none;
  -webkit-user-select: none;
  /* LCP anchor: CSS background-image on a div is NOT excluded by Chrome 108+
     loading-overlay heuristic (only <img> overlays are). LCP measures the
     element's viewport area regardless of z-index occlusion by other elements.
     The preloaded texture paints here at FCP time, becoming the LCP candidate
     before any Leaflet tile loads. */
  background-image: url('../assets/decos/pergament-textur.webp');
  background-size: cover;
  background-position: center;
}

/* === Pergament Texture (central) === */
.pergament {
  --perg-overlay: 0.6;
  background-color: var(--color-parchment);
  background-image:
    linear-gradient(rgba(245,230,200,var(--perg-overlay)), rgba(245,230,200,var(--perg-overlay))),
    url(../assets/decos/pergament-textur.webp);
  background-size: 100% 100%, 300px auto;
  background-position: center;
}

/* === Shared Panel Style (parchment) === */
.panel {
  border: 1px solid var(--color-border);
  border-radius: 6px;
  box-shadow:
    0 4px 16px rgba(60, 40, 10, 0.35),
    inset 0 0 30px rgba(139, 105, 20, 0.08);
  z-index: 1000;
}

/* === Title Bar === */
#title-bar {
  position: absolute;
  top: calc(12px + env(safe-area-inset-top));
  right: 12px;
  transition: top 0.2s ease;
  z-index: 1000;
  text-align: center;
  background-position: top left;
  border: 1px solid var(--color-border);
  border-radius: 6px;
  padding: 5px 14px 5px 8px;
  box-shadow:
    0 4px 16px rgba(60, 40, 10, 0.35),
    inset 0 0 30px rgba(139, 105, 20, 0.08);
  pointer-events: none;
}

#title-logo {
  display: block;
  height: 48px;
  width: auto;
}

#title-bar h1 {
  font-family: 'Crimson Text', serif;
  font-size: 1.8rem;
  color: var(--color-text-dark);
  letter-spacing: 0.05em;
  text-shadow: 1px 1px 2px rgba(139, 105, 20, 0.3);
  line-height: 1;
}

#title-bar .subtitle {
  font-family: 'Crimson Text', Georgia, serif;
  font-style: normal;
  font-size: 0.75rem; /* min 12px for Lighthouse SEO */
  color: var(--color-text-muted);
}

#btn-share {
  position: absolute;
  top: -4px;
  right: -4px;
  pointer-events: auto;
  background: none;
  border: none;
  cursor: pointer;
  padding: 14px; /* 14 + 15px icon + 14 = 43px tap target */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--color-gold);
  opacity: 0.6;
  transition: opacity 0.15s;
}
#btn-share:hover { opacity: 1; }
#btn-share svg { width: 15px; height: 15px; flex-shrink: 0; }

#share-feedback {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3000;
  background: var(--color-text-dark);
  color: #f5e6c8;
  font-family: 'Crimson Text', serif;
  font-size: 1rem;
  padding: 8px 20px;
  border-radius: 20px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s;
  white-space: nowrap;
}
#share-feedback.visible { opacity: 1; }

/* === Filter Panel === */
#filter-panel {
  position: absolute;
  top: calc(12px + env(safe-area-inset-top));
  left: max(12px, calc(env(safe-area-inset-left, 0px) - 8px));
  width: 360px;
  max-height: calc(100vh  - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom, 0px));
  max-height: calc(100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: top 0.2s ease, max-height 0.2s ease, width 0.3s ease;
  z-index: 1200; /* above #legend (1000) und über #welcome-float (1100) */
}

/* Suppress panel/legend transitions during initial state restore to avoid CLS */
.initializing #filter-panel,
.initializing #legend {
  transition: none !important;
}

#filter-panel.collapsed {
  width: auto;
}

#filter-panel.collapsed #panel-content {
  display: none;
}

#filter-panel.collapsed #panel-toggle {
  justify-content: center;
  padding: 0 12px;
}
#filter-panel.collapsed #panel-toggle svg {
  display: block;
  width: 20px;
  height: 20px;
}

#panel-toggle-row {
  display: flex;
  align-items: center;
}

#panel-toggle {
  display: block;
  width: auto;
  flex-shrink: 0;
  padding: 8px 12px;
  background: none;
  border: none;
  font-size: 1.3rem;
  color: var(--color-text-dark);
  cursor: pointer;
  text-align: left;
  font-family: 'Crimson Text', serif;
}

#panel-toggle:hover {
  color: var(--color-gold);
}

#panel-content {
  padding: 0 14px 14px;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}

#panel-content h2 {
  font-family: 'Crimson Text', serif;
  font-size: 1.3rem;
  color: var(--color-text-dark);
  margin-bottom: 12px;
  border-bottom: 1px solid var(--color-divider);
  padding-bottom: 6px;
}

/* === Filter Groups === */
.filter-group {
  margin-bottom: 14px;
}

.filter-group > label {
  display: block;
  font-family: 'Crimson Text', serif;
  font-size: 1rem;
  color: var(--color-text-heading);
  margin-bottom: 6px;
}

.button-group {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.filter-btn {
  padding: 5px 10px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: rgba(255, 248, 230, 0.3);
  color: var(--color-text-dark);
  font-family: 'Crimson Text', Georgia, serif;
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.filter-btn:hover {
  background: rgba(196, 164, 90, 0.3);
}

.filter-btn.active {
  background: rgba(139, 105, 20, 0.72);
  color: #fff8e6;
  border-color: #6b4f0a;
}

/* === Radius Control === */
.radius-control {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

#radius-slider {
  flex: 1;
  accent-color: var(--color-gold);
}

#radius-value {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--color-text-dark);
  min-width: 50px;
}

.radius-actions {
  display: flex;
  gap: 4px;
  margin-bottom: 4px;
}

.action-btn {
  padding: 4px 8px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: rgba(255, 248, 230, 0.3);
  color: var(--color-text-dark);
  font-family: 'Crimson Text', Georgia, serif;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.action-btn:hover {
  background: rgba(196, 164, 90, 0.3);
}

.hint {
  font-size: 0.75rem;
  color: #8a7040;
  font-style: italic;
}

/* === Checkboxes === */
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.checkbox-label {
  font-size: 0.9rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.checkbox-label input[type="checkbox"] {
  accent-color: var(--color-gold);
}

/* === Market Count === */
.market-count {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  font-style: italic;
  padding-top: 8px;
  border-top: 1px solid var(--color-divider);
  display: flex;
  flex-direction: column;
  gap: 1px;
}

/* === Legend === */
#legend {
  position: absolute;
  bottom: 12px;
  left: max(12px, calc(env(safe-area-inset-left, 0px) - 8px));
  background-position: top left;
  padding: 8px 12px;
  min-width: 34px;
  min-height: 34px;
}

#legend.collapsed #legend-content {
  display: none;
}

#legend-toggle {
  position: absolute;
  top: 8px;
  right: 12px;
  background: none;
  border: none;
  font-family: 'Crimson Text', serif;
  font-size: 1.1rem;
  color: var(--color-text-dark);
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

#legend-content h3 {
  font-family: 'Crimson Text', serif;
  font-size: 1rem;
  color: var(--color-text-dark);
  margin: 0 0 6px 0;
  padding-right: 20px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
  margin-bottom: 3px;
  overflow: hidden;
  max-height: 40px;
  transition: max-height 0.35s ease, margin-bottom 0.35s ease, opacity 0.35s ease;
}
.legend-item.legend-lazy {
  max-height: 0;
  margin-bottom: 0;
  opacity: 0;
  pointer-events: none;
}
#legend .checkbox-label {
  overflow: hidden;
  max-height: 40px;
  transition: max-height 0.35s ease, opacity 0.35s ease;
}
#legend .checkbox-label.legend-lazy {
  max-height: 0;
  opacity: 0;
  pointer-events: none;
}
.legend-item[data-toggle] {
  cursor: pointer;
  transition: opacity 0.18s;
  user-select: none;
}
.legend-item[data-toggle]:hover {
  opacity: 0.75;
}
.legend-item[data-toggle].inactive {
  opacity: 0.35;
}
.legend-item[data-toggle].inactive span:last-child {
  text-decoration: line-through;
}

.legend-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  flex-shrink: 0;
}

.legend-icon-default {
  background: var(--color-gold);
  border: 1.5px solid rgba(255,255,255,0.75);
}

.legend-icon-beerenweine {
  background: #722f6b;
  border: 1.5px solid rgba(255,255,255,0.75);
}

.legend-icon-mps {
  background: #1a6b3a;
  border: 1.5px solid rgba(255,255,255,0.75);
}

.legend-icon-christmas {
  background: #b02020;
  border: 1.5px solid rgba(255,255,255,0.75);
}
.legend-icon-concert {
  background: #5b2f8a;
  border: 1.5px solid rgba(255,255,255,0.75);
}
.legend-icon-festival {
  background: #8a4f10;
  border: 1.5px solid rgba(255,255,255,0.75);
}
.legend-icon-renfaire {
  background: #b5651d;
  border: 1.5px solid rgba(255,255,255,0.75);
}
.legend-icon-lh {
  background: #2a6496;
  border: 1.5px solid rgba(255,255,255,0.75);
}
.legend-icon-meadery {
  background: #d4a017;
  border: 1.5px solid rgba(255,255,255,0.75);
}
.legend-icon-ma-gastro {
  background: #9b4520;
  border: 1.5px solid rgba(255,255,255,0.75);
}
.legend-icon-burg {
  background: #5a6b7a;
  border: 1.5px solid rgba(255,255,255,0.75);
}
.legend-icon-burgerlebnis {
  background: #b8860b;
  border: 1.5px solid rgba(255,255,255,0.75);
}

/* === Unified cluster icon (conic-gradient pie chart) === */
.unified-cluster {
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,0.75);
  color: white;
  font-family: 'Crimson Text', Georgia, serif;
  font-size: 18px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 5px rgba(0,0,0,0.5);
  text-shadow: 0 0 4px rgba(0,0,0,0.9);
  opacity: 0.82;
}

/* === Concert popup badges === */
.popup-badge-concert {
  background: #5b2f8a;
  color: white;
}
.popup-badge-festival {
  background: #8a4f10;
  color: white;
}
.popup-badge-renfaire {
  background: #b5651d;
  color: white;
}

/* === Custom Marker Reset === */
.custom-marker {
  background: none !important;
  border: none !important;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0.82;
}
.custom-marker svg {
  pointer-events: none;
}

/* === Marker Cluster Overrides === */
.marker-cluster-small {
  background-color: rgba(139, 105, 20, 0.4) !important;
}
.marker-cluster-small div {
  background-color: rgba(139, 105, 20, 0.7) !important;
  color: #fff8e6 !important;
  font-family: 'Crimson Text', Georgia, serif !important;
}

.marker-cluster-medium {
  background-color: rgba(139, 105, 20, 0.5) !important;
}
.marker-cluster-medium div {
  background-color: rgba(139, 105, 20, 0.8) !important;
  color: #fff8e6 !important;
  font-family: 'Crimson Text', Georgia, serif !important;
}

.marker-cluster-large {
  background-color: rgba(139, 105, 20, 0.6) !important;
}
.marker-cluster-large div {
  background-color: rgba(139, 105, 20, 0.9) !important;
  color: #fff8e6 !important;
  font-family: 'Crimson Text', Georgia, serif !important;
}

/* === Leaflet Control Tap Targets === */
div.leaflet-bar {
  border-width: 0 !important;
  opacity: 0.8 !important;
}
div.leaflet-bar a.leaflet-disabled {
  opacity: 0.8 !important;
}
/* Zoom buttons: enlarge to ≥44px for mobile tap targets */
.leaflet-bar a {
  width: 48px !important;
  height: 48px !important;
  line-height: 46px !important;
  border-radius: 50% !important;
  margin-top: -1px;
}
.leaflet-control-fullscreen-btn {
  display: flex !important;
  align-items: center;
  justify-content: center;
}
.leaflet-control-fullscreen { margin-bottom: 0 !important; }

/* === Leaflet Popup Override === */
/* z-index auf popup-pane wird via JS gesetzt (siehe initMap),
   da leaflet-map-pane einen transform-Stacking-Context erzeugt. */

.leaflet-marker-icon > svg {
  filter: drop-shadow(0 0 2px rgba(0, 0, 0, 0.4));
}

.leaflet-marker-icon > svg > g > image {
  filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.5));
}

/* Popups MUST sit above all UI floats (legend, title-bar, btn-list, modals).
 * Vendor default is z-index: 700 (line ~130) — below #legend (1000) and
 * #btn-list (4001), which would hide the popup behind them. Bump to 4500 so
 * popups always win, matching the layering map in the codebase comments. */
.leaflet-popup-pane { z-index: 4500 !important; }

.leaflet-popup-content-wrapper {
  --perg-overlay: 0.55;
  background-color: var(--color-parchment) !important;
  background-image:
    linear-gradient(rgba(245,230,200,var(--perg-overlay)), rgba(245,230,200,var(--perg-overlay))),
    url(../assets/decos/pergament-textur.webp) !important;
  background-size: 100% 100%, 300px auto !important;
  background-position: center !important;
  border: 1px solid var(--color-border) !important;
  border-radius: 6px !important;
  box-shadow: 0 3px 10px rgba(60, 40, 10, 0.3) !important;
  min-width: 290px !important;
  /* Popups wie Burg Ehrenburg (viele Burgerlebnis-Events im parallel-Abschnitt)
     werden sonst so hoch wie der ganze Bildschirm. 700 px ist auf großen
     Monitoren die angenehmere Obergrenze; auf kleinen Screens begrenzt
     weiterhin die Viewport-Höhe. */
  max-height: calc(100vh - 100px);
  max-height: min(calc(100dvh - 100px), 700px);
  overflow-y: auto;
}

.leaflet-popup-content {
  font-family: 'Crimson Text', Georgia, serif !important;
  color: var(--color-text) !important;
  font-size: 0.9rem !important;
  line-height: 1.4 !important;
}

.leaflet-popup-content h3 {
  font-family: 'Crimson Text', serif;
  font-size: 1.1rem;
  color: var(--color-text-dark);
  margin-bottom: 4px;
}

.leaflet-popup-content a {
  color: var(--color-gold);
  text-decoration: none;
}

.leaflet-popup-content a:hover {
  text-decoration: underline;
}

.leaflet-popup-tip {
  background: #e8d5a3 !important;
  border: 1px solid var(--color-border) !important;
}

.popup-date {
  font-style: italic;
  color: var(--color-text-muted);
}

.popup-description {
  color: #6b5030;
  font-size: 0.9em;
  font-style: italic;
}
.popup-location {
  color: var(--color-text-heading);
}

.popup-sources {
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  opacity: 0.8;
}

.popup-links {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.popup-icon {
  width: 13px;
  height: 13px;
  vertical-align: -2px;
  flex-shrink: 0;
  display: inline-block;
}
/* Gold/brown - matches leaflet-popup-content a color var(--color-gold) */
.popup-icon-nav {
  filter: brightness(0) saturate(100%) invert(40%) sepia(60%) saturate(550%) hue-rotate(5deg) brightness(82%);
}
/* Same gold/brown as nav icons - matches popup link color var(--color-gold) */
.popup-icon-cal {
  filter: brightness(0) saturate(100%) invert(40%) sepia(60%) saturate(550%) hue-rotate(5deg) brightness(82%);
}

.ical-link {
  display: inline-block;
  font-size: 0.8rem;
  color: #5b2f8a;
  text-decoration: none;
  padding: 2px 4px;
  white-space: nowrap;
}
.ical-link:hover {
  text-decoration: underline;
}

.popup-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.75rem;
  font-weight: 600;
  margin-right: 4px;
}
.list-cat-badge {
  cursor: pointer;
  transition: opacity 0.15s;
}
.list-cat-badge:hover { opacity: 0.75; }
.list-also-badge { opacity: 0.55; cursor: default; }

.popup-badge-beerenweine {
  background: #722f6b;
  color: #fff;
}

.popup-badge-mps {
  background: #1a6b3a;
  color: #fff;
}

.popup-badge-no-dogs {
  background: #c0392b;
  color: #fff;
}

.popup-badge-regular {
  background: var(--color-gold);
  color: #fff;
}

.popup-badge-christmas {
  background: #b22222;
  color: #fff;
}

.popup-badge-living-history {
  background: #2a6496;
  color: #fff;
}
.popup-badge-meadery {
  background: #d4a017;
  color: #fff;
}
.popup-badge-ma-gastro {
  background: #9b4520;
  color: #fff;
}
.popup-badge-burg {
  background: #5a6b7a;
  color: #fff;
}
.popup-badge-burgerlebnis {
  background: #b8860b;
  color: #fff;
}
.popup-badge-evtype {
  background: rgba(184, 134, 11, 0.18);
  color: #7a5a08;
  border: 1px solid rgba(184, 134, 11, 0.35);
}
.popup-badge-sold-out {
  background: #8b0000;
  color: #fff;
  font-size: 0.78em;
  padding: 1px 7px;
  margin-left: 4px;
}
.badge-cancelled {
  display: inline-block;
  background: #9b2335;
  color: #fff;
  font-size: 0.72em;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 3px;
  margin-left: 6px;
  vertical-align: middle;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  white-space: nowrap;
}
.popup-cancelled-banner {
  background: #9b2335;
  color: #fff;
  padding: 6px 10px;
  border-radius: 4px;
  font-weight: 700;
  margin-bottom: 8px;
  text-align: center;
  font-size: 0.9em;
}
.parallel-badge-burgerlebnis {
  background: #b8860b;
  color: #fff;
}
.popup-price {
  font-weight: 600;
  color: #7a5a08;
  margin-top: 4px;
  font-size: 0.92em;
}

/* === Decoration Overlays === */
/* mix-blend-mode is set directly on the custom decoPane in JS */

/* === Radius Circle === */
.radius-circle {
  fill: rgba(139, 105, 20, 0.1);
  stroke: var(--color-gold);
  stroke-width: 2;
  stroke-dasharray: 8 4;
}

/* === Impressum Link === */
#panel-links {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(90, 58, 26, 0.15);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  font-family: 'Crimson Text', serif;
  font-size: 0.85rem;
}
#panel-links a {
  color: var(--color-text-heading);
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 0.2s;
}
#panel-links a:not(:last-child)::after {
  content: '·';
  margin: 0 6px;
  opacity: 0.5;
}
#panel-links a:hover { opacity: 1; }

/* SEO internal links - minimal, crawlable, visually understated */
#seo-links {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(90, 58, 26, 0.15);
  font-family: 'Crimson Text', serif;
  font-size: 0.78rem;
}
#seo-links > span:not([hidden]) {
  display: flex;
  flex-wrap: wrap;
  gap: 3px 0;
}
#seo-links a:not(:last-child)::after {
  content: '·';
  margin: 0 6px;
  opacity: 0.4;
}
#seo-links a {
  color: var(--color-text-heading);
  text-decoration: none;
  opacity: 0.45;
  transition: opacity 0.2s;
}
#seo-links a:hover { opacity: 0.85; }

/* Mobile-only elements hidden on desktop */
#btn-list-mobile { display: none; }
#btn-geolocation-mobile { display: none; }

#btn-termin-melden {
  font-family: 'Crimson Text', Georgia, serif;
  font-size: 0.85rem;
  color: #fff8e6;
  text-decoration: none;
  background: rgba(139, 105, 20, 0.88);
  border: 1px solid #6b4f0a;
  border-radius: 4px;
  padding: 5px 10px;
  margin: 4px 8px;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
  width: auto;
}
#btn-termin-melden:hover {
  background: #a07820;
}

/* Language dropdown switcher */
.lang-switcher {
  position: relative;
  display: none;
  margin-left: auto;
  padding-right: 7px;
}
/* Desktop: show desktop switcher in toggle row */
.lang-switcher-desktop { display: block; }
/* Mobile switcher hidden on desktop */
.lang-switcher-mobile { display: none; }
#lang-trigger,
.lang-trigger-desktop {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: 'Crimson Text', serif;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-gold);
  background: transparent;
  border: none;
  border-radius: 4px;
  padding: 3px 8px;
  cursor: pointer;
  min-height: 44px;
  min-width: 44px;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
#lang-trigger:hover,
.lang-trigger-desktop:hover { background: rgba(139,105,20,0.10); }
.lang-menu {
  position: fixed;
  top: auto;
  right: auto;
  background: #f5e9c8;
  border: 1px solid #c8a96e;
  border-radius: 4px;
  box-shadow: 0 4px 16px rgba(80,50,10,.25);
  z-index: 5200;
  min-width: 120px;
  overflow: hidden;
}
.lang-option {
  display: block;
  width: 100%;
  text-align: left;
  font-family: 'Crimson Text', serif;
  font-size: 0.85rem;
  color: var(--color-text-dark);
  background: transparent;
  border: none;
  padding: 6px 12px;
  cursor: pointer;
}
.lang-option:hover { background: rgba(139,105,20,0.12); }

/* Bibliotheks-Menü hinter dem Buch-Icon — analog zu .lang-menu */
.books-switcher {
  position: relative;
  display: inline-block;
}
.books-menu {
  position: fixed;
  top: auto;
  right: auto;
  background: #f5e9c8;
  border: 1px solid #c8a96e;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(80,50,10,.25);
  z-index: 9500; /* above #rezepte-viewer (9000); menu is a direct body child */
  min-width: 240px;
  overflow: hidden;
  padding: 4px 0;
}
.books-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  text-align: left;
  font-family: 'Crimson Text', serif;
  color: var(--color-text-dark);
  background: transparent;
  border: none;
  padding: 8px 12px;
  cursor: pointer;
  text-decoration: none;
}
.books-option:hover { background: rgba(139,105,20,0.12); }
.books-option-icon {
  font-size: 1.3rem;
  line-height: 1;
  flex-shrink: 0;
}
.books-option-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.books-option-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-text-dark);
}
.books-option-meta {
  font-size: 0.78rem;
  opacity: 0.65;
  margin-top: 1px;
}

/* === Mobile === */
@media (max-width: 640px) {
  /* Filter panel: Hintergrund komplett bis zum unteren Bildschirmrand, Inhalt
     per padding-bottom über dem Home-Indicator. Border-radius nur oben — die
     unteren Ecken laufen optisch in den safe-area-Streifen aus.
     Vorher: bottom: env(safe-area-inset-bottom) → Panel schwebte ~34px über
     dem Rand mit Map dazwischen; war optisch zu hoch im PWA-Modus. */
  #filter-panel {
    top: auto;
    bottom: 0;
    left: 12px;
    right: 12px;
    width: auto !important;
    max-width: 100%;
    max-height: 60vh;
    border-radius: 12px 12px 0 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }

  #filter-panel.collapsed {
    max-height: 44px;
    width: auto !important;
    overflow: hidden;
  }

  #panel-toggle-row {
    display: flex;
    align-items: center;
    width: 100%;
    height: 42px;
  }

  #panel-toggle {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    height: 42px;
    text-align: center;
    padding: 0 10px;
    font-size: 1.2rem;
    color: #3a2a0a;
    width: auto;
  }

  #btn-list-mobile {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    height: 42px;
    padding: 0 10px;
    font-family: 'Crimson Text', serif;
    font-size: 0.9rem;
    color: #3a2a0a;
    background: transparent;
    border: none;
    border-left: 1px solid rgba(139, 105, 20, 0.3);
    cursor: pointer;
    white-space: nowrap;
  }


  #panel-content {
    padding: 0 16px 16px;
    overflow-y: auto;
    max-height: calc(60vh - 48px);
  }

  /* Title bar: shifts down when badge active (iPhone: badge spans full width) */
  #title-bar {
    top: calc(10px + var(--badge-shift, 0px) + env(safe-area-inset-top, 0px));
    right: 10px;
    left: auto;
    padding: 6px 30px 6px 10px;
  }

  #title-logo {
    height: 36px;
  }

  #title-bar h1 {
    font-size: 1.2rem;
  }

  #title-bar .subtitle {
    display: none;
  }

  /* Legend: shifts down when badge active (iPhone: badge spans full width) */
  #legend {
    bottom: auto;
    top: calc(10px + var(--badge-shift, 0px) + env(safe-area-inset-top, 0px));
    left: 10px;
    transition: top 0.2s ease;
  }

  /* Bigger touch targets for filter buttons */
  .filter-btn, .action-btn {
    padding: 10px 14px;
    font-size: 0.95rem;
    min-height: 44px;
  }

  /* Radius slider easier to use */
  #radius-slider {
    height: 28px;
  }

  /* Leaflet attribution: über dem Bottom-Panel (44px Inhalt + safe-area-Padding
     für Home-Indicator). 44px Offset funktioniert für Safari (safe-area=0) und
     PWA (safe-area=~34px) gleichermaßen, weil das Panel safe-area mit-rechnet.
     Außerdem: top: 18px und padding-bottom: 20px aus der Desktop-Default-Regel
     neutralisieren — die sind für den dangling-Tab am Map-Boden gedacht und
     schieben das Element 18px nach unten, sobald wir den Container nach oben
     verschieben. */
  .leaflet-bottom.leaflet-right {
    bottom: calc(44px + env(safe-area-inset-bottom, 0px)) !important;
  }
  .leaflet-container .leaflet-control-attribution {
    top: 0 !important;
    padding-bottom: 4px !important;
  }

  /* Bottom bar: compact on mobile, safe-area for iPhone home indicator */
  #btn-termin-melden {
    flex: 1;
    text-align: center;
    font-size: 0.78rem;
    padding: 4px 6px;
    margin: -2px 0 0 0;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  /* Location shortcut icon in collapsed bar — mobile only */
  #btn-geolocation-mobile {
    display: flex;
    align-items: center;
    flex-shrink: 0;
    height: 42px;
    padding: 0 10px;
    background: transparent;
    border: none;
    border-left: 1px solid rgba(139, 105, 20, 0.3);
    color: #3a2a0a;
    cursor: pointer;
    transition: opacity 0.2s;
  }
  #btn-geolocation-mobile {
    transition: color 0.2s, opacity 0.2s;
  }
  #btn-geolocation-mobile.location-active {
    color: var(--color-gold, #8b6914);
    opacity: 1;
  }
  .lang-switcher-mobile {
    display: block;
    padding: 0 max(12px, env(safe-area-inset-right, 12px)) 0 6px;
    flex-shrink: 0;
  }
  .lang-switcher-desktop {
    display: none;
  }

  /* Popup max width + height - prevent overflow into bottom bar */
  .leaflet-popup-content-wrapper {
    max-width: 85vw;
    max-height: calc(100vh - 100px);
    max-height: calc(100dvh - 100px);
    overflow-y: auto;
  }


  /* Safe-area-insets for modals */
  .list-modal-content {
    padding-bottom: env(safe-area-inset-bottom, 0px);
    max-height: 90vh;
  }
  .termin-modal-content {
    padding-bottom: env(safe-area-inset-bottom, 0px);
    max-height: 90vh;
  }

  /* Termin modal: stack deco image below form on mobile */
  .termin-modal-inner {
    flex-direction: column;
  }
  .termin-modal-deco {
    display: none;
  }
}

/* Fullscreen API: offset panel to avoid Safari/iPadOS exit-fullscreen button */
:fullscreen #filter-panel,
:-webkit-full-screen #filter-panel {
  top: 70px;
  max-height: calc(100vh - 82px - env(safe-area-inset-bottom, 0px));
  max-height: calc(100dvh - 82px - env(safe-area-inset-bottom, 0px));
}
/* Dark gradient behind status bar for readability */
:fullscreen body::after,
:-webkit-full-screen body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 28px;
  background: linear-gradient(to bottom,
    rgba(60, 40, 10, 0.5) 0%,
    transparent 100%);
  z-index: 9999;
  pointer-events: none;
}
/* Fullscreen: safe-area for modals and zoom controls */
:fullscreen .list-modal-content,
:-webkit-full-screen .list-modal-content,
:fullscreen .termin-modal-content,
:-webkit-full-screen .termin-modal-content {
  padding-bottom: env(safe-area-inset-bottom, 0px);
}
:fullscreen .leaflet-bottom.leaflet-right,
:-webkit-full-screen .leaflet-bottom.leaflet-right {
  bottom: calc(54px + env(safe-area-inset-bottom, 0px)) !important;
}

/* PWA standalone: all screen sizes */
@media (display-mode: standalone) {
  /* Gradient over status bar area for readability of clock/system info */
  body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: calc(env(safe-area-inset-top, 0px) + 14px);
    background: linear-gradient(to bottom,
      rgba(238, 212, 162, 1) 0%,
      rgba(238, 212, 162, 1) 30%,
      rgba(238, 212, 162, 0.5) 70%,
      transparent 100%);
    z-index: 9999;
    pointer-events: none;
  }

  /* Bottom gap is iPadOS system chrome outside the web view.
     Black blends with the device bezel → gap becomes invisible. */
  html, body {
    background-color: #000;
  }

  /* Modal padding for home indicator */
  .list-modal-content,
  .termin-modal-content {
    padding-bottom: env(safe-area-inset-bottom, 0px);
  }
}

/* PWA standalone: mobile (iPhone) */
@media (max-width: 640px) and (display-mode: standalone) {
  body {
    /* Pergament texture - matches .pergament class exactly.
       Map covers everything except safe area strip at bottom. */
    background:
      linear-gradient(rgba(245,230,200,0.6), rgba(245,230,200,0.6)),
      url(../assets/decos/pergament-textur.webp) !important;
    background-color: var(--color-parchment) !important;
    background-size: 100% 100%, 300px auto !important;
    background-position: center !important;
  }
  #filter-panel {
    box-shadow: none;
    border-bottom: none;
  }
  /* Left/right border lines in safe area to match panel borders */
  body {
    box-shadow: inset 1px 0 0 var(--color-border), inset -1px 0 0 var(--color-border);
  }
}

/* ===  Liste-Button === */
#btn-list {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4001; /* above filter panel (1000); below popup-pane (4500) and modals (5100+) */
  background-position: top left;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 7px 18px;
  font-family: 'Crimson Text', serif;
  font-size: 0.9rem;
  color: #3a2a0a;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  transition: opacity 0.15s;
  display: flex;
  align-items: center;
  gap: 5px;
}
#btn-list:hover { opacity: 0.85; }
.btn-list-search-icon {
  width: 13px;
  height: 13px;
  margin-left: 4px;
  opacity: 0.7;
  position: relative;
  top: -2px;
  flex-shrink: 0;
}


@media (max-width: 640px) {
  #btn-list { display: none; }
  .btn-list-search-icon { top: 0; width: 18px; height: 18px; margin: 0; }
  #btn-list-mobile span { display: none; }
  #panel-toggle svg { opacity: 0.8; }
  /* Prevent iOS Safari auto-zoom on input focus (triggers when font-size < 16px) */
  input, select, textarea { font-size: 16px !important; }
}

/* === List Modal === */
.list-modal {
  position: fixed;
  inset: 0;
  z-index: 5100; /* above popup-pane (4500) */
  display: flex;
  align-items: center;
  justify-content: center;
}
.list-modal.hidden { display: none; }

/* Shared modal backdrop base */
.list-modal-backdrop,
.info-modal-backdrop {
  position: absolute;
  inset: 0;
}
.list-modal-backdrop {
  background: rgba(30, 18, 5, 0.45);
  cursor: pointer;
}

/* Shared modal content base */
.list-modal-content,
.termin-modal-content,
.info-modal-content {
  position: relative;
  --perg-overlay: 0.65;
  border: 1px solid var(--color-border);
  font-family: 'Crimson Text', Georgia, serif;
}

.list-modal-content {
  background-color: #fdf6e3;
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
  width: min(680px, 94vw);
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.list-modal-header {
  padding: 14px 16px 0;
  border-bottom: 1px solid #d4a853;
  flex-shrink: 0;
}
.list-header-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.list-header-row .list-modal-close {
  position: static;
  margin-left: 4px;
  flex-shrink: 0;
}
.list-modal-header h2 {
  font-family: 'Crimson Text', serif;
  font-size: 1.1rem;
  color: #3a2a0a;
  margin: 0;
  flex-shrink: 0;
}
#list-count {
  font-size: 0.8rem;
  color: #7a6030;
  font-style: italic;
  font-family: 'Crimson Text', serif;
}

.list-modal-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #7a6030;
  cursor: pointer;
  line-height: 1;
  padding: 0 4px;
}
.list-modal-close:hover { color: #3a2a0a; }

/* Category tabs */
.list-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: -1px;
}
.list-tab {
  background: rgba(237, 224, 181, 0.65);
  border: 1px solid #c4a030;
  border-bottom: none;
  border-radius: 6px 6px 0 0;
  padding: 5px 14px;
  font-family: 'Crimson Text', serif;
  font-size: 0.9rem;
  color: #5a4010;
  cursor: pointer;
}
.list-tab.hidden { display: none; }
.list-tab.active {
  background: rgba(253, 246, 227, 0.55);
  color: #3a2a0a;
  font-weight: 600;
}
.list-tab:hover:not(.active) { background: rgba(245, 232, 192, 0.65); }

/* Tab scroll wrapper + fade indicators */
.list-tabs-wrap { position: relative; padding: 0; overflow: visible; }
.list-tabs {
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-overflow-scrolling: touch;
}
.list-tabs::-webkit-scrollbar { display: none; }
.list-tabs-fade {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 0; bottom: 0;
  width: 18px;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
  z-index: 1;
  font-size: 22px;
  font-weight: 700;
  color: #3a2510;
  background: none;
}
.list-tabs-fade-left {
  left: 0;
}
.list-tabs-fade-left::after { content: '▸'; color: #8C6E42; position: absolute; left: -10px; display: block; transform: scaleX(-1); }
.list-tabs-fade-right {
  right: 0;
}
.list-tabs-fade-right::after { content: '▸'; color: #8C6E42; position: absolute; right: -10px; display: block }
.list-tabs-fade.visible { opacity: 1; }

@media (max-width: 640px) {
  .list-tab {
    flex-shrink: 0;
    padding: 5px 10px;
    font-size: 0.85rem;
  }
}

/* Scrollable list */
.list-search {
  padding: 6px 14px 4px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
}
.list-search-wrap {
  position: relative;
}
.list-search > .list-search-wrap {
  flex: 1 1 0;
  min-width: 0;
}
.list-search-wrap input {
  width: 100%;
  box-sizing: border-box;
  padding: 5px 28px 5px 10px;
  border: 1px solid var(--color-border);
  border-radius: 4px;
  background: rgba(255, 248, 230, 0.8);
  color: var(--color-text-dark);
  font-family: 'Crimson Text', Georgia, serif;
  font-size: 0.9rem;
}
.list-search-wrap input:focus {
  outline: none;
  border-color: var(--color-gold);
}
.list-search-clear {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-gold);
  font-size: 0.8rem;
  padding: 2px 4px;
  line-height: 1;
  opacity: 0.5;
  display: none;
}
.list-search-clear:hover { opacity: 1; }
.list-search-wrap.has-value .list-search-clear { display: block; }

.btn-share-list {
  flex: 0 0 auto;
  margin-left: 6px;
  background: none;
  border: 1px solid #b8a88a;
  border-radius: 4px;
  cursor: pointer;
  padding: 3px 5px;
  box-sizing: border-box;
  height: 31px;
  color: #6b5b3a;
  line-height: 0;
  opacity: 0.55;
  transition: opacity .2s, background .2s;
}
.btn-share-list:hover { opacity: 1; background: rgba(0,0,0,.05); }
.btn-share-list.copied { background: #c0dead; border-color: #7a9a5a; opacity: 1; }

.list-filter-hint {
  width: 100%;
  margin: 4px 0 0;
  padding: 0 2px;
  font-size: .72rem;
  color: #8b7355;
  line-height: 1.3;
}

/* === "Alle Termine" toggle switch in list header === */
.list-radius-toggle {
  display: none;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  margin-left: auto;
  flex-shrink: 0;
}
.list-radius-toggle.visible { display: flex; }

.list-radius-toggle #list-ignore-radius {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}
.toggle-switch {
  width: 32px;
  height: 18px;
  background: #c8b078;
  border-radius: 9px;
  position: relative;
  transition: background 0.2s;
  flex-shrink: 0;
}
.toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  background: white;
  border-radius: 50%;
  transition: transform 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.25);
}
#list-ignore-radius:checked + .toggle-switch {
  background: rgba(139, 105, 20, 0.72);
}
#list-ignore-radius:checked + .toggle-switch .toggle-thumb {
  transform: translateX(14px);
}
.toggle-label {
  font-family: 'Crimson Text', Georgia, serif;
  font-size: 0.88rem;
  color: #5a3e1b;
}
.list-radius-toggle.toggle-disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.list-radius-toggle.toggle-disabled .toggle-switch {
  pointer-events: none;
}

.list-modal-body {
  overflow-y: auto;
  flex: 1;
  padding: 8px 0;
}

/* Individual list items */
.list-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 20px 9px 16px;
  border-bottom: 1px solid rgba(139, 90, 43, 0.25);
  cursor: pointer;
  transition: background 0.1s;
}
.list-item:hover { background: rgba(120, 80, 10, 0.08); }
.list-item:last-child { border-bottom: none; }

.list-item-pin {
  flex-shrink: 0;
  pointer-events: none;
}
.list-item-pin-col {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  min-width: 32px;
}

.list-item-main { flex: 1; min-width: 0; }

.list-item-name {
  font-size: 0.95rem;
  color: #2a1a04;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.list-item.cancelled .list-item-name {
  text-decoration: line-through;
  color: #7a3a3a;
  opacity: 0.8;
}
.list-item.cancelled .list-item-date {
  text-decoration: line-through;
  opacity: 0.7;
}
.list-item-meta {
  font-size: 0.82rem;
  color: #6a5020;
  margin-top: 1px;
}

.list-item > .list-item-right {
  flex-shrink: 0;
  text-align: right;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}
.list-item-date {
  font-size: 0.82rem;
  color: #5a4010;
  white-space: nowrap;
}
/* Entfernungslabel unterhalb des Pins in der linken Spalte. */
.list-item-dist {
  font-size: 0.68rem;
  line-height: 1;
  color: var(--color-text-muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  text-align: center;
}
.list-item-right .popup-badge {
  font-size: 0.65rem;
  margin-right: 0;
  margin-left: auto;
  white-space: nowrap;
}

.list-empty {
  text-align: center;
  padding: 32px 16px;
  color: #8a7040;
  font-style: italic;
}

.list-incomplete-info {
  font-size: 0.82rem;
  color: #6b4a1a;
  font-style: italic;
  padding: 9px 14px;
  margin: 8px 10px 6px;
  background: rgba(210, 170, 90, 0.15);
  border: 1px solid rgba(200, 160, 80, 0.45);
  border-radius: 5px;
}
.list-item--incomplete { cursor: default; }
.list-item--incomplete:hover { background: rgba(180, 100, 10, 0.06); }

.btn-ergaenzen {
  flex-shrink: 0;
  margin-left: 8px;
  padding: 4px 10px;
  font-size: 0.78rem;
  background: #7a5c1e;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  white-space: nowrap;
}
.btn-ergaenzen:hover { background: #5a3e0e; }

/* ── Parallel events ─────────────────────────────────────────────────────── */
.popup-parallel {
  margin-top: 6px;
}
.popup-parallel-divider {
  text-align: center;
  color: rgba(160,120,40,0.3);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.popup-parallel-heading {
  font-family: 'Crimson Text', serif;
  font-size: 0.78rem;
  color: var(--color-text-muted);
  margin-bottom: 4px;
}

/* Concurrent block */
.popup-parallel-same-time {
  border: 1px solid rgba(139,90,43,0.15);
  border-radius: 4px;
  background: rgba(194,154,89,0.07);
  padding: 4px 6px 0;
  margin-bottom: 5px;
}
.popup-parallel-group-label {
  font-size: 0.68rem;
  color: #a08050;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 2px;
  opacity: 0.85;
}

/* Carousel (past / future) */
.popup-parallel-carousel {
  border: 1px solid rgba(139,90,43,0.12);
  border-radius: 4px;
  overflow: hidden;
}
.pp-tabs {
  display: flex;
  border-bottom: 1px solid rgba(139,90,43,0.12);
}
.pp-tab {
  flex: 1;
  background: none;
  border: none;
  padding: 3px 6px;
  font-family: 'Crimson Text', serif;
  font-size: 0.72rem;
  color: #9a7a4a;
  cursor: pointer;
  text-align: center;
  transition: background 0.15s;
}
.pp-tab + .pp-tab {
  border-left: 1px solid rgba(139,90,43,0.12);
}
.pp-tab-active {
  color: #5a3a10;
  background: rgba(194,154,89,0.08);
  font-weight: bold;
}
.pp-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.pp-track::-webkit-scrollbar { display: none; }
.pp-panel {
  flex: 0 0 100%;
  scroll-snap-align: start;
  padding: 0 6px;
  background: rgba(194,154,89,0.03);
}

/* Event rows (used in all groups) */
.btn-parallel-event {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: baseline;
  column-gap: 3px;
  width: calc(100% + 12px);
  margin-left: -6px;
  margin-right: -6px;
  text-align: left;
  background: none;
  border: none;
  border-top: 1px solid rgba(139,90,43,0.08);
  padding: 4px 8px;
  cursor: pointer;
  font-family: inherit;
  color: #3a2a10;
  line-height: 1.3;
}
.btn-parallel-event:first-child {
  border-top: none;
}
.btn-parallel-event:hover {
  background: rgba(74,47,26,0.06);
}
.parallel-event-date {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  white-space: nowrap;
}
.parallel-event-name {
  font-size: 0.82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Geschätzte Luftlinien-Entfernung ganz rechts in der Zeile — macht
   klar, dass der Event NICHT direkt am Anker-POI stattfindet. */
.parallel-event-dist {
  grid-column: 4;
  font-size: 0.70rem;
  color: var(--color-text-muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  padding-left: 4px;
}
.parallel-badge { grid-column: 3; }
.parallel-badge {
  font-size: 0.62rem;
  padding: 1px 4px;
  border-radius: 3px;
  white-space: nowrap;
  line-height: 1.4;
}
.parallel-badge-concert {
  background: rgba(91,47,138,0.12);
  color: #5b2f8a;
}
.parallel-badge-lh {
  background: rgba(122,42,16,0.12);
  color: #7a2a10;
}
.parallel-badge-meadery {
  background: rgba(212,160,23,0.15);
  color: #9a7510;
}
.parallel-badge-renfaire {
  background: rgba(181,101,29,0.12);
  color: #7a3a00;
}
.parallel-badge-metkellerei {
  background: rgba(212,160,23,0.15);
  color: #9a7510;
}
.parallel-badge-ma-gastro {
  background: rgba(155,69,32,0.12);
  color: #6a2a0a;
}
.popup-nearby-dist {
  color: #999;
  font-size: 0.68rem;
}

.popup-korrektur-row {
  margin-top: 4px;
  display: flex;
  justify-content: center;
  align-items: center;
  column-gap: 6px;
  flex-wrap: wrap;
}
.popup-korrektur-row::before {
  content: '──── ✦ ────';
  display: block;
  flex-basis: 100%;
  text-align: center;
  color: rgba(160, 120, 40, 0.3);
  font-size: 0.7rem;
  letter-spacing: 0.05em;
  margin-bottom: 6px;
}
.btn-korrektur-popup,
.btn-share-popup,
.btn-band-dates {
  font-family: inherit;
  font-size: 0.72rem;
  color: #8a6020;
  background: none;
  border: 1px solid rgba(160, 120, 40, 0.4);
  border-radius: 4px;
  padding: 2px 8px;
  cursor: pointer;
  opacity: 0.8;
}
.btn-korrektur-popup:hover,
.btn-share-popup:hover,
.btn-band-dates:hover {
  opacity: 1;
  background: rgba(160, 120, 40, 0.1);
}
.btn-share-popup.btn-share-copied {
  opacity: 1;
  color: #3a7d3a;
  font-size: 0.85rem;
  line-height: 1;
  font-weight: bold;
}

/* === Termin melden Modal Layout === */
.termin-modal-content {
  max-width: 700px;
}
.termin-modal-inner {
  display: flex;
  align-items: stretch;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
}
.termin-modal-form {
  flex: 1;
  padding: 16px 20px;
  min-width: 0;
}
.termin-intro {
  font-family: 'Crimson Text', Georgia, serif;
  font-size: 1rem;
  color: #5a3e1b;
  margin: 0 0 16px;
}
.termin-modal-deco {
  width: 160px;
  flex-shrink: 0;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 8px 12px;
  overflow: hidden;
}
.termin-modal-deco img {
  width: 100%;
  max-height: 340px;
  object-fit: contain;
  object-position: bottom center;
  opacity: 0.88;
}
@media (max-width: 640px) {
  .termin-modal-content { max-width: 95vw; }
  .termin-modal-deco { display: none; }
}

/* === Termin melden Success === */
.termin-success {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 28px 40px 36px;
  gap: 12px;
}
.termin-success.hidden { display: none; }
.termin-success img {
  width: 200px;
  height: auto;
  animation: taube-flug 0.6s ease-out;
}
@keyframes taube-flug {
  from { opacity: 0; transform: translateX(-30px) translateY(10px); }
  to   { opacity: 1; transform: translateX(0) translateY(0); }
}
.termin-success h3 {
  font-family: 'Crimson Text', serif;
  font-size: 1.5rem;
  color: #3a2208;
  margin: 0;
}
.termin-success p {
  font-family: 'Crimson Text', Georgia, serif;
  font-size: 1.05rem;
  color: #5a3e1b;
  margin: 0;
  max-width: 320px;
}

/* === Termin melden Form === */
.termin-form .form-row {
  margin-bottom: 12px;
}
.termin-form .form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.termin-form .form-row-2 > div {
  min-width: 0;
}
.termin-form .form-row-3 {
  display: grid;
  grid-template-columns: 1.6fr 0.9fr 1.5fr;
  gap: 10px;
}
.termin-form .form-row-3 > div {
  min-width: 0;
}
.termin-form label {
  display: block;
  font-family: 'Crimson Text', serif;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin-bottom: 3px;
}
.termin-form input,
.termin-form select,
.termin-form textarea {
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
  padding: 7px 10px;
  font-family: 'Crimson Text', serif;
  font-size: 0.95rem;
  background: rgba(253, 246, 227, 0.3);
  border: 1px solid var(--color-input-border);
  border-radius: 4px;
  color: #3a2a10;
  outline: none;
}
.termin-form select {
  padding: 9px 28px 8px 10px;
  -webkit-appearance: none;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%238b6914'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  line-height: 1.2;
  cursor: pointer;
}
.termin-form input:focus,
.termin-form select:focus,
.termin-form textarea:focus {
  border-color: var(--color-gold);
  box-shadow: 0 0 0 2px rgba(139,105,20,0.15);
}
.termin-form textarea { resize: vertical; }
.date-clip {
  position: relative;
  height: 34px;
  overflow: hidden;
  border: 1px solid var(--color-input-border);
  border-radius: 4px;
  background: rgba(253, 246, 227, 0.3);
}
.date-clip:focus-within {
  border-color: var(--color-gold);
  box-shadow: 0 0 0 2px rgba(139,105,20,0.15);
}
.date-clip input[type="date"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none !important;
  background: transparent;
  box-shadow: none !important;
  padding: 0 10px;
  box-sizing: border-box;
}
.form-row-flags label { margin-bottom: 0; }
.form-row-flags .flag-check { display: inline-flex; align-items: center; }
.flags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 4px;
}
.flag-check {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: .9rem;
  color: var(--color-text, #3a2a1a);
  cursor: pointer;
  font-family: 'Crimson Text', serif;
}
.flag-check input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--color-gold);
  cursor: pointer;
  flex-shrink: 0;
}
.flag-check span {
  line-height: 1.2;
  margin-top: 2px;
}
.form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 4px;
}
.termin-feedback {
  font-family: 'Crimson Text', serif;
  font-size: 0.95rem;
}
.termin-feedback.success { color: #4a7a2a; }
.termin-feedback.error   { color: #9a2a2a; }
.termin-feedback.hidden  { display: none; }


/* === About / Changelog Info Modals === */
/* === Welcome Float === */
#welcome-float {
  position: fixed;
  /* safe-area-inset-bottom für iPhone PWA: sonst sitzt der Chip auf gleicher
     Höhe wie die Leaflet-Attribution (die ihrerseits über dem Bottom-Panel
     mit safe-area-Padding sitzt). Auf Safari/Desktop ist safe-area = 0,
     bleibt also bei den bisherigen 90px. */
  bottom: calc(90px + env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 1100;
  display: flex;
  align-items: center;
  background-color: var(--color-parchment, #eed4a2);
  background-image:
    linear-gradient(rgba(245,230,200,0.6), rgba(245,230,200,0.6)),
    url(../assets/decos/pergament-textur.webp);
  background-size: 100% 100%, 300px auto;
  background-position: center;
  border: 1px solid var(--color-border);
  border-radius: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  padding: 0;
  overflow: hidden;
}
#welcome-float.hidden { display: none; }
.welcome-float-open {
  display: flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Crimson Text', Georgia, serif;
  font-size: 1rem;
  color: var(--color-ink, #3b2a1a);
  padding: 8px 10px 8px 14px;
  line-height: 1;
}
.welcome-float-open:hover { opacity: 0.8; }
.welcome-float-close {
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  border-left: 1px solid rgba(59,42,26,0.15);
  cursor: pointer;
  color: var(--color-ink, #3b2a1a);
  opacity: 0.55;
  padding: 8px 12px;
  line-height: 1;
}
.welcome-float-close:hover { opacity: 0.9; }

.info-modal {
  position: fixed;
  inset: 0;
  z-index: 5100; /* above popup-pane (4500) */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.info-modal.hidden { display: none; }

.info-modal-backdrop {
  background: rgba(40, 25, 5, 0.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.info-modal-content {
  z-index: 1;
  max-width: 560px;
  width: 100%;
  max-height: 85vh;
  overflow-y: auto;
  background-color: #f5e9c8;
  border-radius: 6px;
  box-shadow: 0 8px 32px rgba(60,35,10,0.45);
  padding: 36px 40px 32px;
}

.info-modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--color-gold);
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.15s;
  padding: 2px 6px;
}
.info-modal-close:hover { opacity: 1; }

.info-modal-content h2 {
  font-family: 'Crimson Text', serif;
  font-size: 1.25rem;
  color: var(--color-text-dark);
  margin: 0 0 10px;
  padding-right: 24px;
}
.info-modal-content h2 + h2 {
  margin-top: 22px;
}
.info-modal-content p {
  font-family: 'Crimson Text', serif;
  font-size: 1rem;
  color: #3a2a10;
  line-height: 1.65;
  margin: 0 0 10px;
}
.info-modal-content em { font-style: italic; }
.info-modal-content strong { font-weight: 600; }
.about-links {
  margin-top: 18px !important;
  font-size: 0.9rem !important;
  opacity: 0.8;
}
.about-links a {
  color: var(--color-gold);
  text-decoration: none;
}
.about-links a:hover { text-decoration: underline; }

/* Welcome modal */
#welcome-modal { z-index: 5300; }
.welcome-modal-content { max-width: 520px; }
.welcome-logo {
  height: 1.65em;
  width: auto;
  display: inline;
  vertical-align: middle;
  margin-left: 1px;
  position: relative;
  top: -0.22em;
}

.welcome-updates {
  margin: 14px 0 12px;
  padding: 11px 14px;
  background: rgba(139, 105, 20, 0.07);
  border-left: 3px solid var(--color-gold);
  border-radius: 0 4px 4px 0;
}
.welcome-updates-heading {
  font-weight: 600;
  color: var(--color-text-dark);
  margin: 0 0 8px;
  font-size: .95rem;
}
.welcome-updates ul {
  margin: 0;
  padding-left: 18px;
}
.welcome-updates li {
  margin-bottom: 6px;
  font-size: .88rem;
  color: #3a2a1a;
  line-height: 1.4;
}
.welcome-updates li:last-child { margin-bottom: 0; }
.welcome-btn {
  display: block;
  margin: 22px auto 4px;
  padding: 10px 32px;
  background: var(--color-gold);
  color: #fff;
  border: none;
  border-radius: 4px;
  font-family: 'Crimson Text', serif;
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.15s;
}
.welcome-btn:hover { background: #6a4e10; }

/* Changelog specific */
.changelog-entries { margin-top: 6px; }
.changelog-entry { margin-bottom: 18px; }
.changelog-date {
  display: block;
  font-family: 'Crimson Text', serif;
  font-size: 0.95rem;
  color: var(--color-text-muted);
  font-style: italic;
  margin-bottom: 4px;
}
.changelog-entry ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.changelog-entry li {
  font-family: 'Crimson Text', serif;
  font-size: 0.95rem;
  color: #3a2a10;
  line-height: 1.55;
  padding: 1px 0 1px 14px;
  position: relative;
}
.changelog-entry li::before {
  content: '·';
  position: absolute;
  left: 4px;
  color: var(--color-border);
}

/* Mobile adjustments */
@media (max-width: 640px) {
  .info-modal-content {
    padding: 28px 20px 24px;
    max-height: 90vh;
  }
}

/* ── ICS Kalender-Abo Button ─────────────────────────────────────────────── */
.action-btn-icon { padding: 4px 7px; }
.btn-ics-icon { width: 15px; height: 15px; vertical-align: -2px; }

/* ── ICS Modal Titel ─────────────────────────────────────────────────────── */
.ics-modal-heading {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ics-title-icon {
  width: 20px;
  height: 20px;
  vertical-align: middle;
  flex-shrink: 0;
}

/* ── ICS Kalender-Abo Modal ──────────────────────────────────────────────── */
.ics-modal-content { max-width: 500px; }

.ics-cat-toggles {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 12px 0 8px;
}
.ics-cat-toggles .filter-btn { font-size: .8rem; }

.ics-filter-summary {
  font-size: .85rem;
  color: #6b5030;
  background: rgba(139, 105, 20, 0.08);
  border: 1px solid var(--color-input-border);
  border-radius: 4px;
  padding: 7px 12px;
  margin: 12px 0 16px;
  font-family: 'Crimson Text', serif;
}

.ics-no-location p {
  font-size: .85rem;
  color: #8b4513;
  background: rgba(139, 69, 19, 0.08);
  border: 1px solid var(--color-input-border);
  border-radius: 4px;
  padding: 8px 12px;
  margin: 12px 0;
}

.ics-url-box {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}
.ics-url-box input[type="text"] {
  flex: 1;
  font-size: .78rem;
  font-family: monospace;
  padding: 7px 10px;
  border: 1px solid var(--color-input-border);
  border-radius: 4px;
  background: rgba(253, 246, 227, 0.7);
  color: #3a2a1a;
  min-width: 0;
}
.ics-copy-btn {
  background: none;
  border: 1px solid var(--color-input-border);
  border-radius: 4px;
  padding: 6px 9px;
  cursor: pointer;
  color: var(--color-gold);
  transition: background .15s, color .15s;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.ics-copy-btn svg { stroke: var(--color-gold); transition: stroke .15s; }
.ics-copy-btn:hover { background: rgba(139, 105, 20, 0.12); }
.ics-copy-btn:hover svg { stroke: #5a3e08; }

.ics-copy-feedback {
  display: inline-block;
  font-size: .8rem;
  color: #5a7a2a;
  margin-bottom: 10px;
}
.ics-copy-feedback.hidden { display: none; }
.ics-no-location.hidden   { display: none; }
.ics-no-cat.hidden        { display: none; }
.ics-url-section.hidden   { display: none; }
.ics-filter-summary.hidden { display: none; }

.action-btn-disabled {
  opacity: .4;
  cursor: not-allowed;
  pointer-events: none;
}
.ics-url-box input:disabled { opacity: .4; }
.ics-copy-btn:disabled      { opacity: .4; cursor: not-allowed; }

.ics-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}
.ics-actions .action-btn {
  flex: 1;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  justify-content: center;
}
.ics-actions .action-btn svg { flex-shrink: 0; }

@media (max-width: 480px) {
  .ics-actions { flex-direction: column; }
  .ics-actions .action-btn { flex: unset; }
}

/* Info pages (datenschutz, impressum) */
code { font-size: 0.85em; }

/* ── Tooltip-System (#tooltip, JS-positioniert, fixed - kein Viewport-Clipping) ── */
/* Buttons mit Tooltip: keine Textauswahl / kein iOS-Callout bei Long-Press */
[data-tip] {
  -webkit-touch-callout: none;
  -webkit-user-select: none;
  user-select: none;
}
#tooltip {
  position: fixed;
  z-index: 9999;
  max-width: 220px;
  padding: 7px 11px;
  background: #2d1f0e;
  color: #fdf6e3;
  font-size: .75rem;
  font-family: 'Crimson Text', serif;
  line-height: 1.45;
  border-radius: 4px;
  pointer-events: none;
  white-space: normal;
  text-align: left;
  opacity: 0;
  transition: opacity .15s;
}

/* ── ICS Kontextueller Hint ──────────────────────────────────────────────── */
.ics-hint {
  font-size: .82rem;
  color: #6b4e1e;
  border-radius: 4px;
  margin: 8px 0 4px;
}
/* Border/background only when actually shown */
.ics-hint.visible,
#ics-no-location:not([hidden]),
#ics-search-hint:not([hidden]) {
  background: rgba(139, 110, 19, 0.08);
  border: 1px solid var(--color-input-border);
  padding: 6px 10px;
}
.ics-hint.visible { opacity: 1; }

/* ── Map filter badge ────────────────────────────────────────────────────── */
/* Badge shift: on desktop logo+filter are left/right, badge is centered → no collision.
   On mobile (≤640px) badge spans full width → title-bar and legend need to shift down.
   Filter-panel is a bottom sheet on mobile → never collides with top badge. */
@media (max-width: 640px) {
  body.map-filter-active { --badge-shift: 40px; }
}

#map-filter-badge {
  position: fixed;
  top: calc(12px + env(safe-area-inset-top, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 1500;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 5px 8px 5px 12px;
  background: #9B1C1C;
  border-radius: 20px;
  color: #fff;
  font-family: var(--font-body);
  font-size: 0.85rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.35);
  max-width: calc(100vw - 24px);
  overflow: hidden;
}
#map-filter-badge[hidden] { display: none; }
.map-filter-icon { flex-shrink: 0; }
#map-filter-chips {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}
#map-filter-clear {
  background: none;
  border: none;
  color: rgba(255,255,255,0.7);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
  flex-shrink: 0;
}
#map-filter-clear:hover { color: #fff; }

/* ── Filter chips (shared base) ─────────────────────────────────────────── */
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  border-radius: 12px;
  white-space: nowrap;
  flex-shrink: 1;
  min-width: 0;
}
.filter-chip__label {
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}
.filter-chip__remove {
  -webkit-appearance: none;
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  line-height: 1;
  flex-shrink: 0;
  /* System font: Crimson Text's × has different vertical metrics → renders low in Firefox */
  font-family: Arial, sans-serif;
}

/* Badge variant — white-on-dark inside the red badge */
.filter-chip--badge {
  padding: 2px 5px 2px 8px;
  background: rgba(255,255,255,0.18);
  border: 1px solid rgba(255,255,255,0.3);
  font-size: 0.8rem;
  color: #fff;
}
.filter-chip--badge .filter-chip__remove {
  color: rgba(255,255,255,0.65);
  font-size: 0.9rem;
}
.filter-chip--badge .filter-chip__remove:hover { color: #fff; }
.filter-chip--badge.filter-chip--negate {
  background: rgba(0,0,0,0.25);
  border-color: rgba(255,255,255,0.2);
}

/* Context chips (location / time) — gold-toned variant */
.filter-chip--context {
  background: rgba(100, 80, 20, 0.75);
  border-color: rgba(200, 169, 110, 0.5);
}
.filter-chip--context .filter-chip__remove {
  color: rgba(238, 212, 162, 0.85);
}
.filter-chip--context .filter-chip__remove:hover { color: #fff; }

/* Calendar icon inside filter chips — white to match chip text */
.filter-chip-cal-icon {
  width: 13px;
  height: 13px;
  vertical-align: -2px;
  display: inline-block;
  margin-right: 4px;
  flex-shrink: 0;
  filter: brightness(0) invert(1);
}

/* Ghost popup — parchment-compatible warm brown styling */
.ghost-popup-reason {
  display: block;
  font-size: 0.8rem;
  color: var(--color-text-muted, #7a5c28);
  margin: 3px 0 8px;
}
.ghost-popup-clear {
  display: block;
  width: 100%;
  padding: 6px 12px;
  border-radius: 5px;
  background: rgba(139, 105, 20, 0.15);
  color: var(--color-dark-brown, #3a2a0a);
  border: 1px solid rgba(139, 105, 20, 0.45);
  cursor: pointer;
  font-size: 0.82rem;
  text-align: center;
  font-family: var(--font-body);
  transition: background 0.15s;
}
.ghost-popup-clear:hover { background: rgba(139, 105, 20, 0.3); }

/* List variant — warm parchment style inside the modal */
.filter-chip--list {
  padding: 3px 6px 3px 10px;
  background: rgba(139,100,20,0.10);
  border: 1px solid rgba(160,120,40,0.45);
  font-family: var(--font-body);
  font-size: 0.82rem;
  color: var(--color-dark-brown);
}
.filter-chip--list .filter-chip__remove {
  color: rgba(80,40,0,0.45);
  font-size: 0.85rem;
}
.filter-chip--list .filter-chip__remove:hover { color: var(--color-dark-brown); }
.filter-chip--list.filter-chip--negate {
  background: rgba(155,28,28,0.08);
  border-color: rgba(155,28,28,0.3);
}

/* Read-only chips — no × button, slightly less padding on the right */
.filter-chip--readonly { padding-right: 8px; }

/* ICS modal: search filter hint with inline chips */
.ics-search-hint-chips {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}
.ics-search-label {
  font-size: 0.82rem;
  color: var(--color-dark-brown);
  opacity: 0.75;
  white-space: nowrap;
}

/* Badge: plain text part (free-text tokens shown before structured chips) */
.map-filter-text-part {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 140px;
  flex-shrink: 1;
}

/* List: clickable city / country tags in result rows */
.list-loc-tag {
  cursor: pointer;
  border-radius: 3px;
  padding: 0 2px;
  transition: background 0.12s, color 0.12s;
}
.list-loc-tag:hover {
  background: rgba(139,100,20,0.15);
  color: var(--color-dark-brown);
}

/* List search chips row */
.list-search-chips-row {
  flex: 0 0 100%;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
  padding: 3px 0 2px;
}
.list-search-chips-row[hidden] { display: none; }

/* ── List-Modal Footer ───────────────────────────────────────────────────── */
.list-modal-footer {
  padding: 10px 20px;
  border-top: 1px solid rgba(200, 169, 110, .35);
  display: flex;
  justify-content: center;
}
.list-ics-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: 'Crimson Text', serif;
  font-size: .88rem;
  color: var(--color-text-dark, #6b4c1e);
  opacity: .75;
  padding: 4px 0;
  transition: opacity .15s;
}
.list-ics-link:hover { opacity: 1; }
.list-ics-link .btn-ics-icon { width: 13px; height: 13px; opacity: .8; }

/* === Loading Progress Bar === */
#load-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 9999;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.4s ease 0.1s;
}
#load-progress.done {
  opacity: 0;
}
#load-progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--color-gold), #c9a227, #e8c45a);
  transition: width 0.2s ease;
  box-shadow: 0 0 8px rgba(200, 160, 30, 0.5);
}

/* === Site Footer (SEO content, behind map layer) === */
#site-footer {
  /* Visually hidden — stays in DOM for crawlers/screen readers,
     completely invisible and non-interactive for users.
     clip-path: inset(100%) shrinks to 0×0 visible area. */
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: 0;
  overflow: hidden;
  clip-path: inset(100%);
  white-space: nowrap;
  pointer-events: none;
}
.footer-inner {
  max-width: 720px;
  margin: 0 auto;
}
#site-footer h2 {
  font-family: 'IM FELL English', Georgia, serif;
  font-size: 1.1rem;
  color: var(--color-text-heading);
  margin-bottom: 0.75rem;
}
#site-footer p {
  font-family: 'Crimson Text', Georgia, serif;
  font-size: 0.95rem;
  color: var(--color-text);
  line-height: 1.6;
  margin-bottom: 1rem;
}
.footer-chronicle {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.2rem;
  margin-bottom: 0.75rem;
}
.footer-chronicle li cite {
  font-family: 'IM FELL English', Georgia, serif;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--color-text-muted);
}
.footer-source {
  font-size: 0.8rem !important;
  color: var(--color-text-muted) !important;
}

/* === Deep-link Loading Overlay === */
#deep-link-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(30, 20, 10, 0.65);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  transition: opacity 0.3s ease;
  pointer-events: none; /* purely visual — map stays interactive underneath */
}
#deep-link-overlay[hidden] { display: none; }
#deep-link-overlay.fading {
  opacity: 0;
}
.dl-text {
  color: #c5a23f;
  font-family: 'IM FELL English', Georgia, serif;
  font-size: 1.6rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-shadow: 1px 1px 0 rgb(69, 53, 33);
  text-align: center;
  max-width: 85vw;
}
.dl-caption {
  color: #c5a23f;
  font-family: 'IM FELL English', Georgia, serif;
  font-size: 0.85rem;
  font-style: italic;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: center;
  text-shadow: 1px 1px 0 rgb(69, 53, 33);
  min-height: 1.2em;
  opacity: 1;
  transition: opacity 0.2s ease;
  max-width: 280px;
}
.dl-caption-ghost {
  position: fixed;
  z-index: 8999;
  pointer-events: none;
  font-family: 'IM FELL English', Georgia, serif;
  font-size: 0.85rem;
  font-style: italic;
  color: #c5a23f;
  white-space: nowrap;
  transform-origin: left top;
  animation: dl-ghost-fly 9s ease-in-out forwards;
}
@keyframes dl-ghost-fly {
  0%   { opacity: 0.5; transform: translate(-50%, 0) translate(0, 0)                                           scale(1); }
  60%  { opacity: 0.2; transform: translate(-50%, 0) translate(calc(var(--dx) * 0.8), calc(var(--dy) * 0.8))  scale(3.5); }
  100% { opacity: 0;   transform: translate(-50%, 0) translate(var(--dx), var(--dy))                           scale(5); }
}
.dl-progress-wrap {
  width: 200px;
  height: 5px;
  background: rgba(200, 162, 45, 0.2);
  border-radius: 3px;
  overflow: hidden;
  box-shadow: 1px 1px 0 rgb(69, 53, 33);
}
.dl-progress-fill {
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, var(--color-gold), #e8c45a);
  border-radius: 3px;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.25s ease;
}

/* ── Touch / coarse-pointer overrides ───────────────────────────────────── */
/* Applied on phones and tablets (iPad etc.) — anything without a fine pointer */
@media (pointer: coarse) {

  /* List items: larger text for readability + touch */
  .list-item {
    padding: 11px 16px 11px 14px;
    gap: 12px;
  }
  .list-item-name {
    font-size: 1.05rem;
  }
  .list-item-meta {
    font-size: 0.92rem;
    margin-top: 3px;
  }
  .list-item-date {
    font-size: 0.92rem;
  }
  .list-item-right .popup-badge {
    font-size: 0.72rem;
  }
  /* City/country + band tags: bigger tap target, negative margin cancels visual offset */
  .list-loc-tag {
    padding: 3px 5px;
    margin: -3px -3px;
    border-radius: 4px;
  }
  .list-item-right .popup-badge {
    font-size: 0.8rem;
    padding: 2px 6px;
  }

  /* Search input: prevent iOS auto-zoom (requires ≥16px) + bigger tap area */
  .list-search-wrap input {
    font-size: 1rem;
    padding: 9px 36px 9px 12px;
  }
  .list-search-clear {
    right: 4px;
    font-size: 1rem;
    padding: 6px 8px;
  }

  /* Chips: compact visually, touch area on × via pseudo-element */
  .filter-chip--list {
    font-size: 0.88rem;
    padding: 3px 4px 3px 10px;
    border-radius: 12px;
    position: relative;
  }
  .filter-chip--badge {
    font-size: 0.85rem;
    padding: 2px 4px 2px 8px;
    position: relative;
  }

  /* × button: visually normal size, tap target expanded via ::after pseudo-element */
  .filter-chip__remove,
  .filter-chip--list .filter-chip__remove,
  .filter-chip--badge .filter-chip__remove {
    min-width: unset;
    min-height: unset;
    font-size: 1.1rem;
    margin-left: 2px;
    position: relative;
  }
  .filter-chip__remove::after {
    content: '';
    position: absolute;
    inset: -10px -8px;
  }

  /* Map filter badge: compact height (same as desktop), bigger font/icon only */
  #map-filter-badge {
    padding: 5px 2px 5px 14px;
    font-size: 0.95rem;
    gap: 6px;
  }
  .map-filter-icon {
    width: 17px;
    height: 17px;
  }
  /* Touch target via ::after — keeps badge height compact */
  #map-filter-clear {
    position: relative;
    font-size: 1.3rem;
    padding: 0 6px;
    min-width: unset;
    min-height: unset;
  }
  #map-filter-clear::after {
    content: '';
    position: absolute;
    inset: -12px -10px;
  }
}

/* === Combat Gag Overlay === */
/* Sticky am unteren Rand des scrollenden Popup-Wrappers — bleibt also
   auch bei langen Popups (viele Konzerte am gleichen Ort) sichtbar.
   Negativer margin-top kompensiert die Flow-Höhe → überlagert kurz die
   letzten Zeilen, nimmt aber keinen dauerhaften Platz weg. */
.combat-overlay {
  --combat-frame: 40px;
  position: sticky;
  bottom: 0;
  left: 0;
  right: 0;
  height: calc(var(--combat-frame) + 8px);
  margin-top: calc(-1 * (var(--combat-frame) + 8px));
  pointer-events: none;
  overflow: hidden;
  z-index: 5;
  transition: height 500ms ease-in-out, margin-top 500ms ease-in-out;
}

.combat-overlay.is-collapsing {
  height: 0 !important;
  margin-top: 0 !important;
}

.combat-fighter {
  position: absolute;
  bottom: 0;
  width: var(--combat-frame);
  height: var(--combat-frame);
  display: inline-block;
  animation: combat-hop 280ms ease-in-out infinite;
  transition: left 2500ms linear, right 2500ms linear, opacity 400ms ease-out;
  opacity: 1;
}

.combat-fighter > img {
  width: 100%;
  height: 100%;
  display: block;
  image-rendering: pixelated;
}

.combat-fighter-left  { left: 0; }
.combat-fighter-right { right: 0; animation-delay: -140ms; }
.combat-fighter-right > img { transform: scaleX(-1); }

.combat-fighter.is-walking-left  { left:  calc(50% - var(--combat-frame) / 2); }
.combat-fighter.is-walking-right { right: calc(50% - var(--combat-frame) / 2); }

.combat-fighter.is-fading {
  opacity: 0;
  animation-play-state: paused;
}

@keyframes combat-hop {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-3px); }
}

.combat-clash {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: var(--combat-frame);
  height: var(--combat-frame);
  image-rendering: pixelated;
  transition: opacity 500ms ease-out;
  opacity: 1;
  pointer-events: none;
}
.combat-clash.is-fading { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  .combat-overlay { display: none; }
}

/* === Schedelsche Weltchronik Viewer === */
/* === Rezepte-Viewer ============================================================
   Eigenständiger Overlay analog zum Schedel-Viewer — aber für textlastige
   Rezept-Inhalte angepasst: Single-Column Content mit prominentem Scan oben,
   sticky Pager-Buttons links/rechts, optionale TOC-Sidebar mit Rezept-Liste.
   ============================================================================== */
#rezepte-viewer {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  background: rgba(74, 46, 10, 0.94);
  color: #eed4a2;
  font-family: 'Crimson Text', Georgia, serif;
}
#rezepte-viewer.hidden { display: none; }
.rezepte-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(8px + env(safe-area-inset-top, 0px)) 14px 8px;
  background: #4a2e0a;
  border-bottom: 1px solid rgba(238, 212, 162, 0.18);
  flex-shrink: 0;
}
#rezepte-title {
  flex: 1;
  font-weight: 600;
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rezepte-toc-toggle, .rezepte-text-toggle, .rezepte-books-toggle {
  background: none;
  border: 0;
  color: inherit;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 6px;
  display: flex;
  align-items: center;
}
.rezepte-toc-toggle:hover, .rezepte-text-toggle:hover, .rezepte-books-toggle:hover { background: rgba(238, 212, 162, 0.1); }
.rezepte-books-toggle { margin-left: auto; }
.rezepte-close {
  background: none;
  border: 0;
  color: inherit;
  font-size: 1.8rem;
  line-height: 1;
  padding: 4px 10px;
  cursor: pointer;
  border-radius: 8px;
}
.rezepte-close:hover { background: rgba(238, 212, 162, 0.1); }
.rezepte-body {
  flex: 1;
  display: flex;
  position: relative;
  overflow: hidden;
}
.rezepte-toc {
  display: none;
  width: 280px;
  background: #3a2208;
  border-right: 1px solid rgba(238, 212, 162, 0.18);
  overflow-y: auto;
  padding: 10px 0;
  flex-shrink: 0;
}
#rezepte-viewer.toc-open .rezepte-toc { display: block; }
.rezepte-toc h3 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.6;
  margin: 8px 16px 6px;
}
.rezepte-toc-list { list-style: none; padding: 0; margin: 0; }
.rezepte-toc-list li button {
  display: grid;
  grid-template-columns: 32px 1fr;
  column-gap: 4px;
  width: 100%;
  background: none;
  border: 0;
  text-align: left;
  padding: 7px 16px 7px 13px;
  color: inherit;
  font-family: inherit;
  font-size: 0.92rem;
  cursor: pointer;
  border-left: 3px solid transparent;
  line-height: 1.35;
}
.rezepte-toc-list li button:hover { background: rgba(238, 212, 162, 0.07); }
.rezepte-toc-list li button.active {
  background: rgba(238, 212, 162, 0.12);
  border-left-color: #f5d88a;
  color: #f5d88a;
}
.rezepte-toc-list .rezepte-toc-num {
  opacity: 0.55;
  font-variant-numeric: tabular-nums;
  text-align: right;
  padding-right: 2px;
}
.rezepte-toc-list .rezepte-toc-meta {
  display: block;
  grid-column: 2;
  font-size: 0.75rem;
  opacity: 0.55;
  margin-top: 1px;
}
.rezepte-toc-list li button.rezepte-toc-vorwort {
  border-bottom: 1px solid rgba(238, 212, 162, 0.12);
  margin-bottom: 4px;
  padding-bottom: 10px;
}
.rezepte-toc-list li button.rezepte-toc-vorwort .rezepte-toc-num {
  text-align: center;
  opacity: 0.85;
  font-size: 1rem;
}
.rezepte-stage {
  flex: 1;
  position: relative;
  overflow-y: auto;
  display: flex;
  justify-content: center;
}
.rezepte-content {
  max-width: 1200px;
  width: 100%;
  padding: 20px 60px 0;
  line-height: 1.6;
}
/* Safari flex+overflow-y swallows padding-bottom on flex children.
   ::after creates a real block node that forces scroll space instead. */
.rezepte-content::after {
  content: '';
  display: block;
  height: 80px;
  flex-shrink: 0;
}
/* Split-Layout: Header full-width oben, drunter 2 Spalten (Scan links sticky,
   Text rechts) ab Desktop ≥980px. Mobile/Tablet: Single-Column wie zuvor. */
.rezepte-split { display: block; }
.rezepte-col-scan, .rezepte-col-text { display: block; }
@media (min-width: 980px) {
  .rezepte-split.has-scan {
    display: grid;
    grid-template-columns: minmax(280px, 42%) 1fr;
    gap: 24px;
    align-items: start;
  }
  .rezepte-split.has-scan .rezepte-col-scan {
    position: sticky;
    top: 12px;
    align-self: start;
  }
  .rezepte-split.has-scan .rezepte-col-scan > .rezepte-section:first-child,
  .rezepte-split.has-scan .rezepte-col-text > .rezepte-section:first-child {
    margin-top: 0;
  }
}
.rezepte-loading { opacity: 0.6; text-align: center; padding: 40px 0; }
.rezepte-content h1 {
  font-size: 1.7rem;
  margin: 4px 0 8px;
}
.rezepte-content .rezepte-sub {
  opacity: 0.65;
  font-style: italic;
  margin: 0 0 14px;
  font-size: 0.95rem;
}
.rezepte-badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.rezepte-badge {
  font-size: 0.78rem;
  padding: 3px 10px;
  border-radius: 4px;
  font-weight: 600;
}
.rezepte-badge.course { background: rgba(180,120,60,0.25); border: 1px solid rgba(220,160,80,0.35); color: #f0c87a; }
.rezepte-badge.lager { background: rgba(100,200,100,0.18); border: 1px solid rgba(100,200,100,0.4); color: #b8e8b8; }
.rezepte-badge.diff { background: rgba(238,212,162,0.10); border: 1px solid rgba(238,212,162,0.22); }
.rezepte-badge.warn { background: rgba(220,150,60,0.20); border: 1px solid rgba(220,150,60,0.4); color: #f0c87a; }
.rezepte-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 16px;
  font-size: 0.85rem;
  opacity: 0.75;
  margin-bottom: 14px;
}
.rezepte-section {
  background: rgba(238, 212, 162, 0.06);
  border: 1px solid rgba(238, 212, 162, 0.12);
  border-radius: 8px;
  padding: 14px 18px;
  margin: 14px 0;
}
.rezepte-section h2 { font-size: 1.05rem; margin: 0 0 8px; }
.rezepte-editors {
  background: rgba(220, 180, 80, 0.10);
  border: 1px solid rgba(220, 180, 80, 0.30);
  border-left-width: 4px;
  border-radius: 4px;
  padding: 12px 16px;
  margin: 14px 0;
  font-size: 0.92rem;
  font-style: italic;
}
.rezepte-scan figure {
  margin: 0;
  isolation: isolate;
  background-color: #f3dcab;
  background-image: linear-gradient(rgba(245,230,200,0.6),rgba(245,230,200,0.6)),url('/assets/decos/pergament-textur.webp');
  background-size: 100% 100%, 300px auto;
  border: 1px solid rgba(0,0,0,0.3);
  border-radius: 3px;
  padding: 4px;
}
.rezepte-scan img {
  display: block;
  max-width: 100%;
  height: auto;
  mix-blend-mode: multiply;
}
/* Pager + Caption in einer Zeile: figcaption dient als Pager-Bar.
   Dreieck links · Caption-Text mittig (klick = reset) · Dreieck rechts.
   Für Edge-Cases wie Schusterjunge (Rezept läuft über Seitengrenze). */
.rz-scan-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 4px 0 2px;
  font-size: 0.85rem;
  color: #5a3e1c;
}
.rz-scan-pager button {
  width: 44px; height: 44px;
  background: none; border: 0; padding: 0;
  cursor: pointer;
  color: #3a2a0a;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.rz-scan-pager button:hover { color: #1a1004; }
.rz-scan-pager button[disabled] { opacity: 0.18; cursor: default; }
.rz-scan-pager button svg { width: 28px; height: 28px; display: block; fill: currentColor; }
.rz-scan-caption-reset {
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  text-align: center;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rz-scan-caption-reset:hover { text-decoration: underline; }
/* figcaption sitzt INNERHALB der figure auf dem Pergament-Hintergrund —
   helle Body-Schriftfarbe wäre dort unsichtbar. Dunkles Sepia + leichte
   Transparenz passend zum Pergament-Look. */
.rezepte-scan figcaption {
  font-size: 0.78rem;
  color: rgba(74, 46, 10, 0.75);
  margin-top: 0;
  padding: 4px 8px 6px;
  text-align: center;
  font-style: italic;
}
.rezepte-content table.zutaten {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.rezepte-content table.zutaten th {
  text-align: left;
  font-size: 0.78rem;
  opacity: 0.65;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 10px 4px 0;
  border-bottom: 1px solid rgba(238,212,162,0.18);
}
.rezepte-content table.zutaten td {
  padding: 6px 10px 6px 0;
  vertical-align: top;
  border-bottom: 1px solid rgba(238,212,162,0.07);
}
.rezepte-content table.zutaten td:first-child { color: #f5d88a; font-style: italic; }
.rezepte-glossary dt { display: inline; font-weight: 600; color: #f5d88a; }
.rezepte-glossary dd { display: inline; margin: 0 0 0 6px; opacity: 0.88; }
.rezepte-glossary dd::after { content: ''; display: block; margin-bottom: 6px; }
.rezepte-lesarten-intro { font-size: 0.9rem; opacity: 0.8; margin: 0 0 12px; }
.rezepte-lesart { border-left: 3px solid rgba(245,216,138,0.4); padding: 8px 12px; margin: 10px 0; background: rgba(245,216,138,0.04); border-radius: 0 4px 4px 0; }
.rezepte-lesart-term { margin: 0 0 4px; font-size: 0.95rem; }
.rezepte-lesart-primary { margin: 2px 0; font-size: 0.9rem; }
.rezepte-lesart-alt-label { margin: 6px 0 2px; font-size: 0.85rem; opacity: 0.85; }
.rezepte-lesarten-alt { margin: 2px 0 4px 18px; padding: 0; font-size: 0.88rem; opacity: 0.9; }
.rezepte-lesarten-alt li { margin: 2px 0; }
.rezepte-overview-head { margin-bottom: 8px; }
.rezepte-vorwort {
  background: linear-gradient(135deg, rgba(245,216,138,0.10), rgba(238,212,162,0.05));
  border: 1px solid rgba(245,216,138,0.20);
  border-left: 4px solid rgba(245,216,138,0.50);
  border-radius: 6px;
  padding: 18px 24px;
  margin: 16px 0 24px;
  line-height: 1.65;
}
.rezepte-vorwort h2 { font-size: 1.2rem; margin: 0 0 10px; color: #f5d88a; }
.rezepte-vorwort h3 { font-size: 1rem; margin: 16px 0 6px; color: #f5d88a; opacity: 0.92; }
.rezepte-vorwort p { margin: 8px 0; }
.rezepte-vorwort em { font-style: italic; color: #f0c87a; }
.rezepte-vorwort strong { color: #f5d88a; }
.rezepte-vorwort-promises { margin: 8px 0 8px 22px; padding: 0; }
.rezepte-vorwort-promises li { margin: 10px 0; padding-left: 6px; }
.rezepte-vorwort-sig { margin-top: 16px; text-align: right; font-style: italic; opacity: 0.7; font-size: 0.9rem; }
.rezepte-vorwort-cta {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(245,216,138,0.18);
  font-size: 0.95rem;
  opacity: 0.9;
}
.rezepte-vorwort-cta a { color: #f5d88a; text-decoration: underline; cursor: pointer; }
.rezepte-grundlagen {
  background: linear-gradient(135deg, rgba(245,216,138,0.08), rgba(238,212,162,0.04));
  border: 1px solid rgba(245,216,138,0.18);
  border-left: 4px solid rgba(245,216,138,0.45);
  border-radius: 6px;
  padding: 18px 24px;
  margin: 16px 0 24px;
  line-height: 1.65;
}
.rezepte-grundlagen h2 { font-size: 1.25rem; margin: 0 0 12px; color: #f5d88a; }
.rezepte-grundlagen h3 {
  font-size: 1.05rem;
  margin: 22px 0 8px;
  color: #f5d88a;
  border-bottom: 1px solid rgba(245,216,138,0.18);
  padding-bottom: 4px;
}
.rezepte-grundlagen h4 { font-size: 0.96rem; margin: 14px 0 4px; color: #f0c87a; }
.rezepte-grundlagen p { margin: 8px 0; }
.rezepte-grundlagen em { font-style: italic; color: #f0c87a; }
.rezepte-grundlagen strong { color: #f5d88a; }
.rezepte-grundlagen a { color: #f5d88a; text-decoration: underline; }
.rezepte-grundlagen a:hover { color: #f0c87a; }
.rezepte-content a { color: #f5d88a; text-decoration: underline; }
.rezepte-content a:hover { color: #f0c87a; }
.rezepte-grundlagen-list { margin: 6px 0 10px 22px; padding: 0; }
.rezepte-grundlagen-list li { margin: 4px 0; padding-left: 4px; }
.rezepte-grundlagen-sig { margin-top: 16px; text-align: right; font-style: italic; opacity: 0.7; font-size: 0.9rem; }
.rezepte-mini-rezept {
  background: rgba(180,120,60,0.10);
  border: 1px solid rgba(220,160,80,0.28);
  border-left: 3px solid rgba(220,160,80,0.55);
  border-radius: 0 6px 6px 0;
  padding: 10px 16px;
  margin: 10px 0 14px;
  font-size: 0.93rem;
}
.rezepte-mini-rezept h4 { margin: 0 0 4px; color: #f0c87a; font-size: 0.92rem; font-weight: 600; }
.rezepte-mini-rezept p { margin: 4px 0; line-height: 1.55; }
.rezepte-poudres-tabelle {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0;
  font-size: 0.92rem;
}
.rezepte-poudres-tabelle th {
  text-align: left;
  font-size: 0.78rem;
  opacity: 0.75;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 6px 10px 6px 0;
  border-bottom: 1px solid rgba(245,216,138,0.3);
  color: #f5d88a;
}
.rezepte-poudres-tabelle td {
  padding: 8px 10px 8px 0;
  vertical-align: top;
  border-bottom: 1px solid rgba(238,212,162,0.10);
  line-height: 1.5;
}
.rezepte-poudres-tabelle td:first-child { color: #f5d88a; white-space: nowrap; }
.rezepte-overview-grid-wrap h2 { margin-top: 26px; }
.rezepte-overview-progress { font-size: 0.85rem; opacity: 0.7; margin: 4px 0 14px; }
.rezepte-overview-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.rezepte-overview-card {
  background: rgba(238,212,162,0.06);
  border: 1px solid rgba(238,212,162,0.14);
  border-radius: 8px;
  padding: 12px 14px;
  text-align: left;
  cursor: pointer;
  color: inherit;
  font-family: inherit;
  display: flex;
  flex-direction: column;
  gap: 4px;
  transition: background 0.12s, border-color 0.12s;
}
.rezepte-overview-card:hover { background: rgba(238,212,162,0.12); border-color: rgba(245,216,138,0.35); }
.rezepte-overview-num {
  font-size: 0.78rem;
  opacity: 0.6;
  font-variant-numeric: tabular-nums;
}
.rezepte-overview-title { font-size: 1rem; font-weight: 600; color: #f5d88a; line-height: 1.3; }
.rezepte-overview-meta { font-size: 0.78rem; opacity: 0.7; }
details.rezepte-faq {
  border-bottom: 1px solid rgba(238,212,162,0.10);
  padding: 8px 0;
}
details.rezepte-faq summary {
  cursor: pointer;
  font-weight: 600;
  color: #f5d88a;
  list-style: none;
}
details.rezepte-faq summary::-webkit-details-marker { display: none; }
details.rezepte-faq summary::before { content: '▶ '; font-size: 0.75em; opacity: 0.7; }
details.rezepte-faq[open] summary::before { content: '▼ '; }
details.rezepte-faq p { margin: 8px 0 4px; opacity: 0.9; }
.rezepte-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9100;
  background: rgba(238, 212, 162, 0.85);
  border: 1px solid rgba(59, 42, 26, 0.3);
  color: #3b2a1a;
  font-size: 2rem;
  line-height: 1;
  width: 44px;
  height: 60px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  /* ‹ und › sitzen optisch knapp unter der typografischen Mittellinie —
     asymmetrisches Padding hebt sie ein paar Pixel an. box-sizing: border-box
     greift global, daher aendert sich die 60px-Klickflaeche nicht. */
  padding-top: 0;
  padding-bottom: 6px;
  transition: background 0.15s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.rezepte-nav:hover:not(:disabled) { background: rgba(238, 212, 162, 1); }
.rezepte-nav:disabled { opacity: 0.3; cursor: default; }
.rezepte-prev { left: 12px; }
.rezepte-next { right: 12px; }
/* Wenn TOC sichtbar ist, prev-Button hinter die Sidebar verlegen
   (TOC = 280px breit + 12px gap = 292px) */
#rezepte-viewer.toc-open .rezepte-prev { left: 292px; }
@media (max-width: 720px) {
  .rezepte-content { padding: 16px 14px 80px; }
  .rezepte-toc { position: absolute; inset: 0; width: 100%; z-index: 5; }
  /* Mobile: Buttons verdecken den Inhalt — Navigation via Swipe (links/rechts) */
  .rezepte-nav { display: none; }
  #rezepte-viewer.toc-open .rezepte-stage { display: none; }
}
@media (min-width: 721px) {
  /* Desktop: TOC immer sichtbar, kein Toggle nötig */
  .rezepte-toc { display: block; }
  .rezepte-toc-toggle { display: none; }
  /* prev-Button immer rechts von der 280px-TOC-Sidebar */
  #rezepte-viewer .rezepte-prev { left: 292px; }
}

/* ── Rezepte-Viewer: Buch-Dropdown & Suchpanel ─────────────────────────────── */

/* Buch-Select oben in der TOC-Sidebar */
/* .rezepte-book-nav / .rezepte-book-select removed — Buch-Auswahl läuft jetzt
   über das globale #books-menu (Buch-Icon im Viewer-Header) */

/* Such-Button im Header */
.rezepte-search-btn {
  background: none;
  border: 0;
  color: inherit;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 6px;
  display: flex;
  align-items: center;
}
.rezepte-search-btn:hover { background: rgba(238, 212, 162, 0.1); }
#rezepte-viewer.search-active .rezepte-search-btn {
  background: rgba(139, 105, 20, 0.45);
  color: #f5d88a;
}

/* Suchpanel-Wrapper (füllt die TOC) */
.rz-search-wrap {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

/* Eingabezeile */
.rz-search-input-row {
  padding: 10px 12px 6px;
  flex-shrink: 0;
}
.rz-search-input {
  width: 100%;
  box-sizing: border-box;
  background: rgba(238, 212, 162, 0.08);
  border: 1px solid rgba(238, 212, 162, 0.3);
  border-radius: 8px;
  color: #eed4a2;
  font-family: inherit;
  font-size: 0.95rem;
  padding: 8px 12px;
}
.rz-search-input:focus { outline: 2px solid #8b6914; outline-offset: 1px; }
.rz-search-input::placeholder { color: rgba(238, 212, 162, 0.45); }
.rz-search-input::-webkit-search-cancel-button { filter: invert(1) opacity(.5); }

/* Filter-Chip-Zeilen */
.rz-search-chips-wrap {
  padding: 4px 10px 4px;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(238, 212, 162, 0.12);
}
.rz-chips-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-bottom: 4px;
}
.rz-chips-label {
  font-size: 0.68rem;
  color: rgba(238, 212, 162, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
  min-width: 44px;
  padding-right: 2px;
}
.rz-chip {
  background: rgba(238, 212, 162, 0.08);
  border: 1px solid rgba(238, 212, 162, 0.2);
  border-radius: 12px;
  color: #eed4a2;
  font-family: inherit;
  font-size: 0.75rem;
  padding: 3px 9px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.12s, border-color 0.12s;
}
.rz-chip:hover { background: rgba(238, 212, 162, 0.15); border-color: rgba(238, 212, 162, 0.4); }
.rz-chip.active {
  background: #8b6914;
  border-color: #8b6914;
  color: #fff5d4;
  font-weight: 600;
}

/* Ergebnis-Liste */
.rz-search-results {
  flex: 1;
  overflow-y: auto;
  padding: 6px 0;
}
.rz-search-count {
  font-size: 0.75rem;
  opacity: 0.55;
  padding: 2px 14px 6px;
  margin: 0;
}
.rz-search-group { margin-bottom: 4px; }
.rz-search-group-head {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  opacity: 0.5;
  padding: 4px 14px 2px;
}
.rz-search-result {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: start;
  width: 100%;
  background: none;
  border: 0;
  border-left: 3px solid transparent;
  border-bottom: 1px solid rgba(238, 212, 162, 0.07);
  color: inherit;
  font-family: inherit;
  font-size: 0.9rem;
  text-align: left;
  padding: 6px 14px 6px 11px;
  cursor: pointer;
  line-height: 1.3;
}
.rz-search-result:last-child { border-bottom: 0; }
.rz-search-result:hover { background: rgba(238, 212, 162, 0.07); border-left-color: rgba(238, 212, 162, 0.3); }
.rz-result-icon { font-size: 0.85rem; text-align: center; opacity: 0.75; padding-top: 1px; }
.rz-result-title { display: block; }
.rz-search-empty, .rz-search-error, .rz-search-loading {
  font-size: 0.85rem;
  opacity: 0.55;
  padding: 14px 14px;
  text-align: center;
}
.rz-search-error { color: #f5a0a0; opacity: 1; }
.rezepte-share-btn {
  background: none;
  border: none;
  cursor: pointer;
  color: #f5d88a;
  font-size: .85rem;
  opacity: .7;
  padding: 0;
  font-family: inherit;
  transition: opacity .15s;
}
.rezepte-share-btn:hover { opacity: 1; }

.rezepte-translate-btn {
  float: right; margin: 4px 0 0 12px;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 11px; border-radius: 5px;
  background: rgba(238,212,162,0.10);
  border: 1px solid rgba(238,212,162,0.3);
  color: rgba(238,212,162,0.75);
  font-size: 0.82rem; text-decoration: none;
  transition: background 0.15s, color 0.15s;
}
.rezepte-translate-btn:hover { background: rgba(238,212,162,0.18); color: #eed4a2; }

#schedel-viewer {
  position: fixed;
  inset: 0;
  z-index: 9000;
  display: flex;
  flex-direction: column;
  /* dark brown from the palette at 0.9 so the map behind shows through
     faintly — reminds the reader the book is floating over Fyndling. */
  background: rgba(74, 46, 10, 0.9);
  color: var(--color-parchment-warm, #eed4a2);
  /* Block iOS Safari's system pinch-zoom while the viewer is open — it
     was fighting with our tap-to-zoom and scaling the whole UI. pan-x/y
     keeps swipe navigation and stage scrolling intact. */
  touch-action: pan-x pan-y;
  -webkit-user-select: none;
  user-select: none;
}
#schedel-viewer.hidden { display: none; }
.schedel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  padding-top: calc(10px + env(safe-area-inset-top, 0px));
  font-family: 'Crimson Text', Georgia, serif;
  font-size: 1.05rem;
  letter-spacing: 0.03em;
  border-bottom: 1px solid rgba(238, 212, 162, 0.2);
}
.schedel-year {
  opacity: 0.6;
  font-style: italic;
}
.schedel-close {
  background: none;
  border: 0;
  color: inherit;
  font-size: 1.8rem;
  line-height: 1;
  padding: 4px 10px;
  cursor: pointer;
  border-radius: 8px;
}
.schedel-close:hover { background: rgba(238, 212, 162, 0.1); }
.schedel-toc-toggle,
.schedel-text-toggle,
.schedel-credits-toggle,
.schedel-books-toggle {
  background: none;
  border: 0;
  color: inherit;
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 6px;
  display: flex;
  align-items: center;
}
.schedel-toc-toggle:hover,
.schedel-text-toggle:hover,
.schedel-credits-toggle:hover,
.schedel-books-toggle:hover { background: rgba(238, 212, 162, 0.1); }
.schedel-credits-toggle { margin-left: auto; }

/* Credits modal: fullscreen-backdrop + inner card.
   Tap auf den Backdrop schließt (siehe JS), Escape schließt ebenfalls.
   Auf Mobile nimmt die Karte fast die volle Breite ein, Card-Höhe ist
   gedeckelt und ihr Inhalt scrollt intern — so bleibt der Close-Button
   (×) oben rechts sichtbar, ohne dass man ans Ende scrollen muss. */
.schedel-credits {
  position: fixed;
  inset: 0;
  z-index: 9200;
  background: rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.schedel-credits.hidden { display: none; }

.schedel-credits-card {
  position: relative;
  width: 100%;
  max-width: 560px;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow-y: auto;
  background: rgba(74, 46, 10, 0.98);
  color: var(--color-parchment-warm, #eed4a2);
  border: 1px solid rgba(238, 212, 162, 0.25);
  border-radius: 14px;
  padding: 22px 24px 18px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  font-family: 'Crimson Text', Georgia, serif;
  font-size: 0.95rem;
  line-height: 1.5;
  -webkit-overflow-scrolling: touch;
}
.schedel-credits-card h3 {
  font-size: 1.3rem;
  margin: 0 0 10px;
  padding-right: 40px;  /* Platz für das × */
}
.schedel-credits-card p { margin: 0 0 10px; }
.schedel-credits-card a { color: #f5d88a; }

.schedel-credits-x {
  position: sticky;
  float: right;
  top: 0;
  margin: -6px -8px 0 10px;
  width: 36px;
  height: 36px;
  border: 0;
  background: rgba(238, 212, 162, 0.12);
  color: inherit;
  font-size: 1.6rem;
  line-height: 1;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.schedel-credits-x:hover { background: rgba(238, 212, 162, 0.25); }

.schedel-credits-foot {
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
}
.schedel-credits-close {
  background: rgba(238, 212, 162, 0.12);
  border: 1px solid rgba(238, 212, 162, 0.25);
  color: inherit;
  font: inherit;
  padding: 8px 18px;
  border-radius: 8px;
  cursor: pointer;
}
.schedel-credits-close:hover { background: rgba(238, 212, 162, 0.22); }

@media (max-width: 640px) {
  .schedel-credits { padding: 10px; }
  .schedel-credits-card {
    max-width: 100%;
    padding: 18px 18px 14px;
    font-size: 1rem;
  }
}
.schedel-header { gap: 8px; }

/* Main flex row: TOC sidebar | stage | OCR text sidebar */
.schedel-body {
  flex: 1;
  min-height: 0;
  display: flex;
  position: relative;
}
/* TOC panel — desktop: fixed-width left column; mobile: slides over stage */
.schedel-toc {
  width: 240px;
  flex-shrink: 0;
  overflow-y: auto;
  padding: 16px 8px 16px 16px;
  border-right: 1px solid rgba(238, 212, 162, 0.15);
  display: none;  /* toggled via .toc-open on viewer */
  font-family: 'Crimson Text', Georgia, serif;
  font-size: 0.92rem;
  line-height: 1.35;
}
#schedel-viewer.toc-open .schedel-toc { display: block; }
.schedel-toc h4 {
  margin: 10px 0 4px;
  font-size: 1rem;
  color: var(--color-parchment-warm);
  border-bottom: 1px dashed rgba(238, 212, 162, 0.2);
  padding-bottom: 3px;
}
.schedel-toc h4 button {
  background: none; border: 0; color: inherit;
  text-align: left; cursor: pointer; padding: 4px 0;
  font: inherit;
  width: 100%;
  display: flex; justify-content: space-between; align-items: baseline;
}
.schedel-toc h4 button:hover { color: #fff; }
.schedel-toc ul { list-style: none; padding-left: 10px; margin: 0 0 8px; }
.schedel-toc li button {
  background: none; border: 0; color: inherit;
  font: inherit; text-align: left; cursor: pointer;
  padding: 3px 0;
  width: 100%;
  display: flex; justify-content: space-between; gap: 8px;
  opacity: 0.85;
}
.schedel-toc li button:hover { opacity: 1; color: #fff; }
.schedel-toc .toc-pno { opacity: 0.5; font-size: 0.85em; }

/* OCR text panel — desktop: fixed-width right column; mobile: slides over */
.schedel-text {
  width: 320px;
  flex-shrink: 0;
  overflow-y: auto;
  padding: 16px;
  border-left: 1px solid rgba(238, 212, 162, 0.15);
  display: none;
  font-family: 'Crimson Text', Georgia, serif;
  font-size: 0.95rem;
  line-height: 1.5;
  background: rgba(30, 18, 6, 0.4);
}
#schedel-viewer.text-open .schedel-text { display: flex; flex-direction: column; }
.schedel-text-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px;
  padding-bottom: 8px;
  border-bottom: 1px dashed rgba(238, 212, 162, 0.2);
  flex-wrap: wrap;
  gap: 8px;
}
.schedel-text-tabs { display: flex; gap: 4px; }
.schedel-text-tab {
  background: none;
  border: 1px solid rgba(238, 212, 162, 0.2);
  border-radius: 6px;
  color: inherit;
  font: inherit;
  font-size: 0.85rem;
  padding: 4px 10px;
  cursor: pointer;
  opacity: 0.75;
  transition: background 0.15s, opacity 0.15s;
}
.schedel-text-tab small { opacity: 0.6; margin-left: 4px; font-size: 0.85em; }
.schedel-text-tab:hover { opacity: 1; }
.schedel-text-tab.is-active {
  background: rgba(238, 212, 162, 0.18);
  border-color: rgba(238, 212, 162, 0.45);
  opacity: 1;
}
.schedel-text-meta { opacity: 0.5; font-size: 0.78em; font-style: italic; }
.schedel-text-body { overflow-y: auto; white-space: pre-wrap; }
.schedel-text-body em { color: rgba(238, 212, 162, 0.7); font-style: italic; }
/* Modern-translation annotation: underlined term + tooltip via <details> */
.schedel-ann {
  border-bottom: 1px dotted rgba(245, 216, 138, 0.5);
  cursor: help;
  position: relative;
}
.schedel-ann[data-open] {
  background: rgba(245, 216, 138, 0.15);
  border-radius: 3px;
}
.schedel-ann-note {
  display: block;
  font-size: 0.85em;
  font-style: italic;
  color: rgba(238, 212, 162, 0.85);
  margin: 4px 0 12px;
  padding-left: 12px;
  border-left: 2px solid rgba(245, 216, 138, 0.35);
}
.schedel-text-annotations {
  margin-top: 18px;
  padding-top: 12px;
  border-top: 1px dashed rgba(238, 212, 162, 0.2);
  font-size: 0.88rem;
}
.schedel-text-annotations h4 { margin: 0 0 8px; font-size: 0.95rem; opacity: 0.8; }
.schedel-text-annotations dl { margin: 0; }
.schedel-text-annotations dt {
  display: inline;
  font-weight: 600;
  color: #f5d88a;
  text-transform: uppercase;
}
.schedel-text-annotations dd {
  display: inline;
  margin: 0 0 0 6px;
  opacity: 0.85;
}
.schedel-text-annotations dd::after { content: ''; display: block; margin-bottom: 6px; }

/* Mobile: TOC + text panels overlay the stage as a slide-in sheet with
   slight transparency + blur so the page underneath is still recognisable. */
@media (max-width: 900px) {
  .schedel-toc,
  .schedel-text {
    position: absolute;
    top: 0; bottom: 0;
    z-index: 3;
    background: rgba(74, 46, 10, 0.78);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    width: min(320px, 85vw);
  }
  .schedel-toc { left: 0; border-right: 1px solid rgba(238, 212, 162, 0.2); }
  .schedel-text { right: 0; border-left: 1px solid rgba(238, 212, 162, 0.2); }
}

/* Desktop: when a sidebar panel is open, shift the nav arrows so they
   don't overlap the TOC / text columns. */
#schedel-viewer.toc-open .schedel-prev { left: 252px; }
#schedel-viewer.text-open .schedel-next { right: 332px; }
@media (max-width: 900px) {
  #schedel-viewer.toc-open .schedel-prev,
  #schedel-viewer.text-open .schedel-next { left: auto; right: auto; }
  #schedel-viewer.toc-open .schedel-prev { left: 12px; }
  #schedel-viewer.text-open .schedel-next { right: 12px; }
}

.schedel-stage {
  flex: 1;
  min-height: 0;
  position: relative;
  overflow: auto;          /* scrollbars appear on zoomed pages */
  padding: 18px 18px 4px 18px;
  display: flex;
  /* `safe` keeps the content reachable when it overflows: browser falls
     back to flex-start so scroll can reach the left/top edge. Normal
     `center` would clip the overflow side and make it unreachable. */
  align-items: safe center;
  justify-content: safe center;
}
/* Während des Blätterns bzw. Swipes ragt das rotierende Paper kurz über
   den Stage-Rand hinaus → der Browser blendet Scrollbars ein und sie
   flackern beim Flip-Ende wieder weg. Stage während aller Animations-
   Phasen auf overflow:hidden zwingen; Zoom-Pan ist davon nicht betroffen
   (Zoom setzt keine dieser Klassen). Flip-Klassen sitzen auf #schedel-viewer,
   Swipe-Klassen auf .schedel-page-wrap (Kind von .schedel-stage), darum
   :has() für die Swipe-Erkennung. */
#schedel-viewer.flipping-forward .schedel-stage,
#schedel-viewer.flipping-back    .schedel-stage,
#schedel-viewer.flip-fwd-land    .schedel-stage,
#schedel-viewer.flip-back-land   .schedel-stage,
.schedel-stage:has(.schedel-page-wrap.is-swiping),
.schedel-stage:has(.schedel-page-wrap.is-settling),
.schedel-stage:has(.schedel-page-wrap.is-swipe-snap) {
  overflow: hidden;
}
.schedel-page-wrap {
  display: flex;
  align-items: safe center;
  justify-content: safe center;
  gap: 0;
  /* full stage size so paper's max-height/max-width:100% resolve */
  width: 100%;
  height: 100%;
  /* contain the imgs' mix-blend-mode so multiply only combines with each
     paper's own pergament background, not with the viewer backdrop behind. */
  isolation: isolate;
  margin: auto;
  /* 3D-Kontext für den Umblätter-Effekt: je tiefer, desto flacher/linear
     die Rotation. 1600px ist ein guter Kompromiss für Buch-Feeling ohne
     extremes Fluchtpunkt-Verzerren. */
  perspective: 1600px;
}
/* Each book page has its own paper wrap. The wrap holds the lighter
   pergament backdrop; the img sits on top with mix-blend-mode multiply so
   the scan's white paper picks up the parchment fibres underneath while
   ink/woodcut stays fully black. */
.schedel-paper {
  position: relative;
  isolation: isolate;
  min-height: 0;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  /* Explicit height so the inner img's height:100% resolves. max-height
     alone does not give a definite height, so img could not be clamped.
     Zoom removes this via :has(.zoomed). */
  height: 100%;
  /* Pergament-Aufheller wie in .pergament und .chronik-images: linearer
     60%-Creme-Gradient als Overlay über einer bei 300px natürlich
     kachelnden Textur. Vorher `center/cover` → Textur wurde auf
     Panel-Breite gestreckt und wirkte grob-pixelig auf großen Displays. */
  background-color: #fbeecb;
  background-image:
    linear-gradient(rgba(245, 230, 200, 0.6), rgba(245, 230, 200, 0.6)),
    url('../assets/decos/pergament-textur.webp');
  background-size: 100% 100%, 300px auto;
  background-position: center;
  box-shadow: 0 6px 32px rgba(0, 0, 0, 0.55);
}
/* Spread mode: two papers, each gets half the viewport */
.mode-spread .schedel-paper { max-width: calc(50vw - 22px); }
/* Single mode: one paper, full width */
.mode-single .schedel-paper { max-width: calc(100vw - 40px); }
.mode-single.half-l .schedel-paper-r { display: none; }
.mode-single.half-r .schedel-paper-l { display: none; }

/* Peek-Paper: liegt hinter den aktiven Papern (z-index 0) und ist im
   Leerlauf unsichtbar. Während eines Touch-Swipes wird per JS die Klasse
   `is-peeking` am Wrap gesetzt + die Peek-Src passend gefüllt, sodass
   die anfahrende Seite unter dem weggeschobenen Finger sichtbar wird.
   Positionierung exakt über dem Stage-Zentrum, gleiche Max-Breite wie
   die aktiven Paper — so wirkt es, als läge die Zielseite darunter. */
.schedel-paper-peek {
  position: absolute;
  inset: 0;
  margin: auto;
  z-index: 0;
  display: none;
  pointer-events: none;
}
.mode-single .schedel-paper-peek { max-width: calc(100vw - 40px); }
.mode-spread .schedel-paper-peek { max-width: calc(50vw - 22px); }
.schedel-page-wrap.is-peeking .schedel-paper-peek { display: flex; }
.schedel-paper-l, .schedel-paper-r { position: relative; z-index: 1; }

/* Während des Touch-Drags hebt sich das aktive Paper proportional zum
   Finger-Weg — wie ein echtes Blatt, das man am Rand anhebt. JS setzt:
     --swipe-rot      aktuelle Rotation (z.B. -45deg für halb angehoben
                      beim Vorwärts-Wischen)
     --swipe-origin   Drehachse: "left center" bei Vorwärts (Blatt
                      klappt am linken Rand auf), "right center" bei
                      Rückwärts
     --swipe-progress 0..1 für dezente Opacity-/Filter-Abnahme
   Beim Loslassen fährt die Transition entweder zurück auf 0 oder
   komplett auf ±90deg durch, dann erfolgt der Src-Swap. */
.schedel-page-wrap.is-swiping .schedel-paper-l,
.schedel-page-wrap.is-swiping .schedel-paper-r,
.schedel-page-wrap.is-settling .schedel-paper-l,
.schedel-page-wrap.is-settling .schedel-paper-r {
  transform: rotateY(var(--swipe-rot, 0deg));
  transform-origin: var(--swipe-origin, center center);
  backface-visibility: hidden;
}
.schedel-page-wrap.is-swiping .schedel-paper-l,
.schedel-page-wrap.is-swiping .schedel-paper-r {
  transition: none;
}
.schedel-page-wrap.is-settling .schedel-paper-l,
.schedel-page-wrap.is-settling .schedel-paper-r {
  transition: transform 200ms cubic-bezier(.25, .6, .2, 1);
}

.schedel-page {
  display: block;
  /* Fix height to paper; width follows via aspect ratio, capped by
     max-width. Setting both width/height to 100% on an img with an
     intrinsic aspect ratio fights the layout; single-axis height:100%
     plus width:auto is the reliable way to fit the img inside paper. */
  width: auto;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  /* Lock layout aspect ratio so the box-size of the IMG is stable from
     first paint, BEFORE the natural dimensions are decoded. Schedel
     scans cluster around 2:3 (≈0.667). object-fit:contain handles the
     residual mismatch (≤5%) by letterboxing within the locked box,
     so we never see a flex-driven container reflow when the user
     navigates between pages with slightly different scans. */
  aspect-ratio: 2 / 3;
  object-fit: contain;
  cursor: zoom-in;
  user-select: none;
  -webkit-user-select: none;
  transition: opacity 0.3s ease, transform 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  mix-blend-mode: multiply;
}

/* Zoomed: img paints at natural size. Paper + wrap must NOT flex-shrink
   or the flex container would squeeze them back down. Stage's
   overflow:auto + safe center then gives scrollbars that reach every
   edge of the enlarged spread. */
.schedel-page.zoomed {
  cursor: zoom-out;
  /* Zoom: drop size constraints so img paints at natural resolution and
     paper grows to match (see :has(.zoomed) rules below). aspect-ratio: auto
     reverts to the natural aspect of the loaded image so the 2:3 layout-lock
     (used for stable navigation) doesn't crop tall woodcut pages in zoom. */
  width: auto;
  height: auto;
  max-width: none;
  max-height: none;
  aspect-ratio: auto;
  flex-shrink: 0;
}
.schedel-paper:has(.schedel-page.zoomed) {
  max-width: none;
  max-height: none;
  height: auto;
  flex-shrink: 0;
}
.schedel-page-wrap:has(.schedel-page.zoomed) {
  flex-shrink: 0;
  margin: 0;
}

/* === Page-flip Animation ============================================
   Wird via JS ausgelöst: .flipping-forward / .flipping-back auf
   #schedel-viewer. Phase 1 (Klasse gesetzt): Paper rotiert 90° aus der
   Sicht + fadet leicht → JS tauscht die Src aus. Phase 2 (Klasse
   entfernt): Paper rotiert zurück mit neuer Seite.
   Forward (nächste Seite): rechte Buchseite klappt an ihrem linken Rand
   nach hinten/links weg — wie beim echten Umblättern nach rechts.
   Back (vorige Seite): linke Buchseite klappt an ihrem rechten Rand
   nach hinten/rechts weg.
   Im Single-Mode nutzen beide Richtungen dasselbe Paper (nur eines ist
   sichtbar), die Richtung unterscheidet sich dann nur in Origin/Sign.
   =================================================================== */
.schedel-paper {
  transition: transform 220ms cubic-bezier(.4, 0, .25, 1);
  backface-visibility: hidden;
  will-change: transform;
}
/* Spread-Modus: beide Paper bekommen feste Dreh-Ursprünge damit die
   Return-Animation nach dem Src-Swap denselben Pivot nutzt wie Phase 1.
   Ohne diese Basisregel würde beim Entfernen der Flip-/Landing-Klassen
   der Ursprung auf center/center zurückfallen und die Transition sieht
   verschoben aus. */
.mode-spread .schedel-paper-r { transform-origin: left center; }
.mode-spread .schedel-paper-l { transform-origin: right center; }

/* Phase 1: nur das wegblätternde Paper rotiert weg. */
.mode-spread.flipping-forward .schedel-paper-r { transform: rotateY(-92deg); }
.mode-spread.flipping-back   .schedel-paper-l  { transform: rotateY(92deg);  }
/* Single-Modus (Mobile / schmaler Viewport): aktive Seite flippt je
   nach Richtung an der zuwendenden Kante weg. */
.mode-single.flipping-forward .schedel-paper {
  transform-origin: left center;
  transform: rotateY(-92deg);
}
.mode-single.flipping-back .schedel-paper {
  transform-origin: right center;
  transform: rotateY(92deg);
}
/* Phase-2 landing: nur im SINGLE-Mode wird zur Gegenseite teleportiert,
   damit der Flip optisch in EINER Richtung durchläuft.
   Im SPREAD-Mode sieht das "Reinschwingen von der anderen Seite" unnatürlich
   aus (echtes Buch-Blättern hat nicht zwei Pivot-Punkte). Stattdessen
   schwingt das Paper einfach zurück zu 0° auf derselben Seite — wirkt
   wie ein dezentes "Auf-und-Zurück-Klappen" mit neuer Seite drauf. */
.mode-single.flip-fwd-land  .schedel-paper  { transform: rotateY(92deg);  transform-origin: left center;  transition: none; }
.mode-single.flip-back-land .schedel-paper  { transform: rotateY(-92deg); transform-origin: right center; transition: none; }

/* Swipe-Snap (Single-Mode): nach dem Swipe-Settle kein Return-Flip —
   Paper springt sofort auf 0°. Spezifisch genug um is-settling + .schedel-paper
   Basis-Transition zu überschreiben. */
.schedel-page-wrap.is-swipe-snap .schedel-paper-l,
.schedel-page-wrap.is-swipe-snap .schedel-paper-r { transition: none; }

/* Niemand mag Motion auf dem falschen Fuß erwischt zu werden */
@media (prefers-reduced-motion: reduce) {
  .schedel-paper { transition: none; }
  .mode-spread.flipping-forward .schedel-paper-r,
  .mode-spread.flipping-back .schedel-paper-l,
  .mode-single.flipping-forward .schedel-paper,
  .mode-single.flipping-back .schedel-paper {
    transform: none;
  }
}
.schedel-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  z-index: 9100;
  background: rgba(238, 212, 162, 0.85);
  border: 1px solid rgba(59, 42, 26, 0.3);
  color: #3b2a1a;
  font-size: 2rem;
  line-height: 1;
  width: 44px;
  height: 60px;
  border-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  /* ‹ und › sitzen optisch knapp unter der typografischen Mittellinie
     (Glyph-Höhe deckt nur den oberen Halbbereich ab). Asymmetrisches
     Padding hebt sie ein paar Pixel an, sodass die Pfeile optisch
     auf der Mittelhöhe der Buttons stehen. box-sizing: border-box
     greift global, daher ändert sich die 60px-Klick-Fläche nicht. */
  padding-top: 0;
  padding-bottom: 6px;
  transition: background 0.15s;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.schedel-nav:hover:not(:disabled) { background: rgba(238, 212, 162, 1); }
.schedel-nav:disabled { opacity: 0.3; cursor: not-allowed; }
.schedel-prev { left: 12px; }
.schedel-next { right: 12px; }
.schedel-footer {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
  border-top: 1px solid rgba(245, 230, 194, 0.15);
  font-family: 'Crimson Text', Georgia, serif;
}
.schedel-pageno {
  font-size: 0.95rem;
  min-width: 70px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.schedel-slider {
  flex: 1;
  accent-color: #a0843a;
}

/* Mobile: hide side nav arrows (use swipe instead) */
@media (max-width: 640px) {
  .schedel-nav { display: none; }
  .schedel-header { font-size: 0.95rem; }
  /* Anchor pages to top to prevent vertical CLS when consecutive pages have
     slightly different aspect ratios. In single mode the paper max-width
     (100vw - 40px) is narrower than a height:100% image would compute, so
     object-fit:contain letterboxes with varying top/bottom gaps → image
     shifts down on every flip. Fix: fill width, auto-height from top.
     max-height: cap the paper so a new (taller) image can never enlarge the
     parchment container. 56px ≈ header height; 4px = bottom padding of stage.
     :has(.zoomed) already overrides max-height: none for zoom mode. */
  .schedel-paper {
    align-items: flex-start;
    max-height: calc(100dvh - 60px);
  }
  .schedel-page {
    width: 100%;
    height: auto;
    max-height: calc(100dvh - 60px); /* belt-and-suspenders */
  }
}

/* Bibliotheks-Button (Buch-Icon) in der Filter-Panel-Toolbar */
#btn-books {
  background: none;
  border: 0;
  color: #3a2a0a;
  cursor: pointer;
  padding: 0 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.15s;
  flex-shrink: 0;
}
#btn-books:hover { opacity: 0.7; }
#btn-books svg { width: 18px; height: 18px; }
.books-switcher { display: inline-flex; align-items: center; }

/* Radio-BOB-Stream-Player — rechts mittig, einklappbar */
#radio-player {
  position: fixed;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 5300;
  display: flex;
  flex-direction: row-reverse;
  align-items: center;
  font-family: 'Crimson Text', serif;
  pointer-events: none;
}
#radio-player > * { pointer-events: auto; }

.radio-player-handle {
  background-color: var(--color-parchment);
  background-image:
    linear-gradient(rgba(245,230,200,0.6), rgba(245,230,200,0.6)),
    url(../assets/decos/pergament-textur.webp);
  background-size: 100% 100%, 300px auto;
  background-position: center;
  border: 1px solid #c8a96e;
  border-right: 0;
  border-radius: 8px 0 0 8px;
  color: #3a2a0a;
  cursor: pointer;
  padding: 8px 6px;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: -2px 2px 8px rgba(80,50,10,.25);
  transition: opacity .15s;
}
.radio-player-handle:hover { opacity: 0.85; }

.radio-player-body {
  background-color: var(--color-parchment);
  background-image:
    linear-gradient(rgba(245,230,200,0.6), rgba(245,230,200,0.6)),
    url(../assets/decos/pergament-textur.webp);
  background-size: 100% 100%, 300px auto;
  background-position: center;
  border: 1px solid #c8a96e;
  border-right: 0;
  border-radius: 8px 0 0 8px;
  box-shadow: -2px 2px 12px rgba(80,50,10,.28);
  width: 280px;
  max-width: calc(100vw - 16px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.radio-player-body .radio-player-bar,
.radio-player-body .radio-player-embed,
.radio-player-body .radio-bob-card,
.radio-player-body .radio-player-notice {
  background: transparent;
}

.radio-player-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 4px 4px 10px;
  background: rgba(139,105,20,0.10);
  border-bottom: 1px solid rgba(139,105,20,0.20);
}
.radio-player-title {
  flex: 1;
  font-family: 'Crimson Text', serif;
  font-weight: bold;
  color: #3a2a0a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.radio-player-collapse {
  background: none;
  border: 0;
  color: #3a2a0a;
  font-size: 1.4rem;
  line-height: 1;
  padding: 2px 8px 6px;
  cursor: pointer;
  border-radius: 4px;
}
.radio-player-collapse:hover { background: rgba(139,105,20,0.15); }

.radio-player-embed {
  padding: 0;
  display: flex;
  justify-content: center;
}
.radio-bob-card {
  text-align: center;
  border: 0;
  padding: 10px 0 0 0;
  border-radius: 0;
  width: 100%;
}
.radio-bob-logo {
  display: block;
  width: 100%;
  max-width: 120px;
  height: auto;
  margin: 0 auto;
  border-radius: 5px;
}
.radio-bob-title {
  font-family: 'Crimson Text', serif;
  font-weight: bold;
  color: #3a2a0a;
  margin: 0;
}
.radio-bob-nowplaying {
  font-family: 'Crimson Text', serif;
  font-size: 0.85rem;
  font-style: italic;
  color: #5a4014;
  margin: 4px 8px 8px;
  line-height: 1.3;
}
.radio-player-audio { display: none; }

.radio-bob-link { color: #3a2a0a; text-decoration: none; }
.radio-bob-link:hover { text-decoration: underline; }
.radio-bob-link-img { display: inline-block; }
.radio-bob-link-img:hover { text-decoration: none; opacity: 0.85; }

.radio-bob-controls {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
}
#radio-player.is-no-volume .radio-bob-controls {
  justify-content: center;
  gap: 40px;
  padding: 16px 12px;
}
#radio-player.is-no-volume .radio-bob-btn { padding: 10px; }
#radio-player.is-no-volume .radio-bob-btn svg { width: 40px; height: 40px; }
.radio-bob-btn {
  flex: 0 0 auto;
  background: none;
  border: 0;
  color: #3a2a0a;
  cursor: pointer;
  padding: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: background .15s;
}
.radio-bob-btn:hover { background: rgba(139,105,20,0.15); }
.radio-bob-btn svg { display: block; }
.radio-bob-btn svg[hidden],
.radio-player-handle svg[hidden] { display: none; }
.radio-bob-volume {
  flex: 1;
  min-width: 0;
  accent-color: #8b6914;
  cursor: pointer;
}
.radio-player-notice {
  margin: 0;
  padding: 6px 10px;
  font-size: 0.72rem;
  line-height: 1.3;
  color: #6b5418;
  background: rgba(139,105,20,0.08);
  border-top: 1px solid rgba(139,105,20,0.20);
}

#radio-player.is-collapsed .radio-player-body { display: none; }
#radio-player.is-collapsed .radio-player-handle { display: flex; }
