/*
 * Eigene Story „Genuss-Haltestelle: Köck am Bahnhof Mürz“ (Heft 2605, S. 15)
 * Namensraum .koeck-bh, Präfix bh-. Vorlage template-parts/stories/eigen/bahnhof.php, Script js/stories/bahnhof.js.
 * Weiß wie die Magazinseite, Fotos groß; der Fahrplan im Köck-Blau der Eingangstafel, aufgebaut wie ein ÖBB-Abfahrtsmonitor
 * (Uhr, Spalten, ruhig gestreifte Zeilen) – ohne Klappanzeige und Lauftext. Rosa nur als Balken der „jetzt“-Zeile.
 * Keine Verläufe, keine Schatten. Bewegt wird nur transform und opacity. Ohne Script: alles sichtbar, Tafel ohne Uhr.
 * Über 1440 px wächst alles mit --bh-k (= --sm-x der Stories), die großen Fotos treten bis an den Bildschirmrand.
 */
.koeck-bh {
	--bh-blau: #2a27a0;      /* Eingangstafel der Filiale („KÖCK Bäckerei & Café“) */
	--bh-hell: #c3d2ef;      /* Hellblau der Kaffeetafel – auf dem Blau 7,3 : 1 */
	--bh-rosa: #ed6c84;
	--bh-grau: #555;
	--bh-k: 1;
	--bh-rand: max(22px, env(safe-area-inset-left), env(safe-area-inset-right));
	--bh-ease: cubic-bezier(.23, 1, .32, 1);
	container-type: inline-size;
	background: #fff;
	color: #000;
	font: 300 17px/1.6 var(--sans);
	overflow-x: clip;
	-webkit-text-size-adjust: 100%;
	text-size-adjust: 100%;
}
body:has(.koeck-bh) .sm-fortschritt i { background: var(--bh-blau); }
.koeck-bh p { margin: 0; text-wrap: pretty; overflow-wrap: break-word; }
.koeck-bh figure { margin: 0; }
.koeck-bh img { display: block; width: 100%; height: 100%; object-fit: cover; font: 400 13px/1.4 var(--sans); color: var(--bh-grau); } /* fehlt ein Foto: Alt-Text klein und ruhig */
.koeck-bh h1, .koeck-bh h2 { margin: 0; font-weight: 400; }
.koeck-bh :focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }
.koeck-bh .bh-weg { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.koeck-bh .bh-rahmen { overflow: hidden; background: #eef1f6; }
.koeck-bh .bh-bu { padding: 10px var(--bh-rand) 0; font: 400 calc(14px * var(--bh-k))/1.45 var(--sans); color: var(--bh-grau); }
.koeck-bh .bh-text { font-size: calc(17px * var(--bh-k)); max-width: 26em; } /* ca. 60–70 Zeichen je Zeile */

/* Einblenden (Abschnitt 3a): Text früh, Fotos an der Leselinie; ruhig hinein, zügig zurück */
.koeck-bh.bh-js [data-bh-auf] { opacity: 0; transform: translateY(24px); transition: opacity .45s ease, transform .6s var(--bh-ease); }
.koeck-bh.bh-js [data-bh-auf].bh-da { opacity: 1; transform: none; transition: opacity 1.1s ease calc(var(--sm-stufe, 0) * 100ms), transform 1.4s var(--bh-ease) calc(var(--sm-stufe, 0) * 100ms); }

/* ---------------- 1 · Einstieg ---------------- */
.koeck-bh .bh-kopf { padding: calc(88px + env(safe-area-inset-top, 0px)) 0 0; }
.koeck-bh .bh-kopf-text { padding: 0 var(--bh-rand); }
.koeck-bh .bh-titel { font: 400 clamp(34px, 10.4cqi, 58px)/1.04 var(--serif); letter-spacing: -.02em; text-wrap: balance; hyphens: manual; max-width: 11em; }
.koeck-bh .bh-ort { margin-top: 16px; font: 500 calc(15px * var(--bh-k))/1.35 var(--sans); }
.koeck-bh .bh-halle { margin-top: 30px; }
.koeck-bh .bh-halle .bh-rahmen { aspect-ratio: 4 / 5; }
.koeck-bh .bh-halle img { object-position: 36% 50%; transform: scale(var(--bh-z, 1)); transform-origin: 40% 60%; }

/* ---------------- 2 · Ein Ort zum Verweilen ---------------- */
.koeck-bh .bh-intro { padding: 72px var(--bh-rand) 0; display: grid; gap: 22px; }
.koeck-bh .bh-h2 { font: 400 clamp(26px, 7.4cqi, 34px)/1.18 var(--serif); letter-spacing: -.01em; max-width: 16em; text-wrap: balance; }
.koeck-bh .bh-h2 strong { font-weight: 700; }
.koeck-bh .bh-raum { margin-top: 56px; }
.koeck-bh .bh-raum .bh-rahmen { aspect-ratio: 4 / 3; }
.koeck-bh .bh-raum img { object-position: 46% 62%; transform: translateY(var(--bh-y, 0px)) scale(1.08); }

/* ---------------- 3 · Fahrplan ---------------- */
.koeck-bh .bh-fp { padding: 96px var(--bh-rand) 0; display: grid; gap: 48px; }
.koeck-bh .bh-lead { font: 400 clamp(24px, 6.6cqi, 30px)/1.2 var(--serif); letter-spacing: -.01em; margin-bottom: 22px; max-width: 18em; text-wrap: balance; }
.koeck-bh .bh-tafel { background: var(--bh-blau); color: #fff; border-radius: 6px; overflow: hidden; font-family: var(--sans); font-variant-numeric: tabular-nums; }
.koeck-bh .bh-t-kopf { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 16px 14px; border-bottom: 1px solid rgba(255, 255, 255, .24); }
.koeck-bh .bh-t-name { display: grid; gap: 4px; min-width: 0; }
.koeck-bh .bh-t-titel { font: 700 24px/1.05 var(--sans); }
.koeck-bh .bh-t-halt { font: 400 13px/1.3 var(--sans); color: var(--bh-hell); }
.koeck-bh .bh-t-uhr { font: 600 28px/1 var(--sans); letter-spacing: .01em; white-space: nowrap; }
.koeck-bh .bh-t-uhr time:empty { display: none; }
.koeck-bh .bh-t { width: 100%; border-collapse: collapse; table-layout: fixed; }
.koeck-bh .bh-t th, .koeck-bh .bh-t td { padding: 12px 0 12px 12px; text-align: left; vertical-align: baseline; font-weight: 400; }
.koeck-bh .bh-t th:first-child, .koeck-bh .bh-t td:first-child { padding-left: 11px; width: 31%; border-left: 5px solid transparent; }
.koeck-bh .bh-t th:last-child, .koeck-bh .bh-t td:last-child { padding-right: 16px; }
.koeck-bh .bh-t thead th { padding-top: 10px; padding-bottom: 8px; font: 500 13px/1.2 var(--sans); color: var(--bh-hell); }
.koeck-bh .bh-t thead th:nth-child(3) { width: 34%; }
.koeck-bh .bh-z { position: relative; border-top: 1px solid rgba(255, 255, 255, .13); }
.koeck-bh .bh-z:nth-child(odd) { background: rgba(255, 255, 255, .05); }
.koeck-bh .bh-zeit { font: 500 15px/1.25 var(--sans); }
.koeck-bh .bh-was { font: 700 18px/1.18 var(--sans) !important; overflow-wrap: break-word; hyphens: auto; }
.koeck-bh .bh-was-hin { display: block; margin-top: 3px; font: 400 13px/1.3 var(--sans); color: var(--bh-hell); }
.koeck-bh .bh-nach { font: 400 15px/1.25 var(--sans); padding-right: 16px !important; }
.koeck-bh .bh-hin { display: none; }
/* jetzt / nächster Halt: rosa Balken links, Marke weiß mit blauer Schrift */
.koeck-bh .bh-z.bh-jetzt td:first-child { border-left-color: var(--bh-rosa); }
.koeck-bh .bh-marke:empty { display: none; }
.koeck-bh .bh-marke { display: block; width: max-content; max-width: 100%; margin-top: 6px; padding: 3px 6px 2px; border-radius: 2px; background: #fff; color: var(--bh-blau); font: 600 12px/1.15 var(--sans); white-space: normal; }
/* Zeilen frischen sich auf wie am Monitor (Abschnitt 3a: an der Leselinie, zurück beim Zurückscrollen);
   bewegt werden die Zellen, nicht die <tr> (transform auf Tabellenzeilen ist in Safari unzuverlässig) */
.koeck-bh.bh-js .bh-tafel .bh-z > * { opacity: 0; transform: translateY(10px); transition: opacity .4s ease, transform .5s var(--bh-ease); }
.koeck-bh.bh-js .bh-tafel.bh-da .bh-z > * { opacity: 1; transform: none; transition: opacity .9s ease calc(var(--bh-i) * 100ms + 150ms), transform 1.1s var(--bh-ease) calc(var(--bh-i) * 100ms + 150ms); }

.koeck-bh .bh-fotos { display: grid; gap: 40px; margin: 0 calc(var(--bh-rand) * -1); }
.koeck-bh .bh-vitrine .bh-rahmen { aspect-ratio: 4 / 3; }
.koeck-bh .bh-vitrine img { object-position: 60% 50%; }
.koeck-bh .bh-bank .bh-rahmen { aspect-ratio: 1 / 1; }

/* ---------------- 3b · Film: vom Tresen bis zum Bahnsteig ---------------- */
.koeck-bh .bh-zug { padding-top: 96px; }
.koeck-bh .bh-zug-film { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #2b2f3a; }
.koeck-bh .bh-zug-film video { display: block; width: 100%; height: 100%; object-fit: cover; }
.koeck-bh .bh-zug-knopf { position: absolute; right: 12px; bottom: 12px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; display: grid; place-items: center; cursor: pointer; -webkit-tap-highlight-color: transparent; touch-action: manipulation; transition: transform .16s var(--bh-ease); }
.koeck-bh .bh-zug-knopf:active { transform: scale(.94); }
.koeck-bh .bh-zug-knopf span { width: 12px; height: 14px; border-left: 4px solid currentColor; border-right: 4px solid currentColor; }
.koeck-bh .bh-zug-knopf.bh-steht span { width: 0; height: 0; border-right: 0; border-left: 13px solid currentColor; border-top: 8px solid transparent; border-bottom: 8px solid transparent; margin-left: 3px; }
.koeck-bh:not(.bh-js) .bh-zug-knopf { display: none; }

/* ---------------- 4 · Schluss ---------------- */
.koeck-bh .bh-schluss { padding: 96px 0 0; display: grid; gap: 36px; }
.koeck-bh .bh-schluss-text { padding: 0 var(--bh-rand); }
.koeck-bh .bh-h4 { margin: 0 0 12px; letter-spacing: 0; font: 700 calc(21px * var(--bh-k))/1.25 var(--sans); }
.koeck-bh .bh-eingang .bh-rahmen { aspect-ratio: 4 / 3; }
.koeck-bh .bh-eingang img { object-position: 50% 45%; }
.koeck-bh .bh-vermerk { margin-top: 48px; padding: 0 var(--bh-rand); font: 400 calc(14px * var(--bh-k))/1.45 var(--sans); color: var(--bh-grau); }

/* ---------------- Tablet ---------------- */
@container (min-width: 600px) {
	.koeck-bh > * { --bh-rand: max(40px, env(safe-area-inset-left), env(safe-area-inset-right)); }
	.koeck-bh .bh-titel { font-size: clamp(48px, 8cqi, 64px); max-width: 12em; }
	.koeck-bh .bh-halle .bh-rahmen, .koeck-bh .bh-raum .bh-rahmen { aspect-ratio: 3 / 2; }
	.koeck-bh .bh-t th, .koeck-bh .bh-t td { padding: 14px 0 14px 16px; }
	.koeck-bh .bh-t th:first-child, .koeck-bh .bh-t td:first-child { padding-left: 19px; width: 18%; }
	.koeck-bh .bh-nach { padding-right: 0 !important; }
	.koeck-bh .bh-t th:last-child, .koeck-bh .bh-t td:last-child { padding-right: 24px; }
	.koeck-bh .bh-t thead th:nth-child(2) { width: 32%; }
	.koeck-bh .bh-t thead th:nth-child(3) { width: 25%; }
	.koeck-bh .bh-t-kopf { padding-left: 24px; padding-right: 24px; }
	.koeck-bh .bh-hin { display: table-cell; color: var(--bh-hell); font: 400 15px/1.3 var(--sans); }
	.koeck-bh .bh-was-hin { display: none; }
	.koeck-bh .bh-fotos { grid-template-columns: 3fr 2fr; gap: 24px; margin: 0; align-items: start; }
	.koeck-bh .bh-fotos .bh-bu { padding-left: 0; padding-right: 0; }
	.koeck-bh .bh-vitrine .bh-rahmen { aspect-ratio: 1 / 1; }
	.koeck-bh .bh-vitrine img { object-position: 58% 50%; }
	.koeck-bh .bh-schluss { padding-left: var(--bh-rand); padding-right: var(--bh-rand); }
	.koeck-bh .bh-schluss-text { padding: 0; }
	.koeck-bh .bh-eingang .bh-bu { padding-left: 0; }
	.koeck-bh .bh-kopf .bh-bu { padding-left: var(--bh-rand); }
}

/* ---------------- Desktop ---------------- */
@container (min-width: 1000px) {
	.koeck-bh > * { --bh-rand: max(56px, env(safe-area-inset-left), env(safe-area-inset-right)); }
	.koeck-bh .bh-kopf { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; padding: calc(120px * var(--bh-k)) var(--bh-rand) 0; align-items: end; }
	.koeck-bh .bh-kopf-text { grid-column: 1 / 7; padding: 0 0 calc(44px * var(--bh-k)); }
	.koeck-bh .bh-titel { font-size: calc(clamp(48px, 4.6cqi, 68px) * var(--bh-k)); max-width: none; text-wrap: wrap; }
	.koeck-bh .bh-titel-z { display: block; }
	.koeck-bh .bh-ort { margin-top: 22px; font-size: calc(16px * var(--bh-k)); }
	.koeck-bh .bh-halle { grid-column: 7 / 13; margin: 0; }
	.koeck-bh .bh-halle .bh-rahmen { aspect-ratio: 4 / 3; }
	.koeck-bh .bh-kopf .bh-bu { padding-left: 0; }

	.koeck-bh .bh-intro { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; padding-top: calc(150px * var(--bh-k)); align-items: start; }
	.koeck-bh .bh-h2 { grid-column: 1 / 6; font-size: calc(clamp(36px, 3.4cqi, 46px) * var(--bh-k)); }
	.koeck-bh .bh-intro .bh-text { grid-column: 7 / 12; font-size: calc(19px * var(--bh-k)); padding-top: 8px; }
	.koeck-bh .bh-raum { margin: calc(96px * var(--bh-k)) 0 0; }
	.koeck-bh .bh-raum .bh-rahmen { aspect-ratio: 21 / 9; max-height: 82svh; width: 100%; }

	.koeck-bh .bh-fp { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; padding-top: calc(160px * var(--bh-k)); align-items: start; }
	.koeck-bh .bh-fp-tafelteil { grid-column: 1 / 8; }
	.koeck-bh .bh-lead { font-size: calc(clamp(32px, 3cqi, 40px) * var(--bh-k)); margin-bottom: calc(32px * var(--bh-k)); }
	.koeck-bh .bh-fotos { grid-column: 8 / 13; grid-template-columns: 1fr; gap: calc(32px * var(--bh-k)); padding-top: calc(8px * var(--bh-k)); }
	.koeck-bh .bh-vitrine .bh-rahmen { aspect-ratio: 4 / 3; }
	.koeck-bh .bh-bank .bh-rahmen { aspect-ratio: 5 / 4; }
	.koeck-bh .bh-bank img { object-position: 50% 62%; }
	.koeck-bh .bh-tafel { border-radius: calc(8px * var(--bh-k)); }
	.koeck-bh .bh-t-kopf { padding: calc(22px * var(--bh-k)) calc(28px * var(--bh-k)) calc(18px * var(--bh-k)); }
	.koeck-bh .bh-t-titel { font-size: calc(32px * var(--bh-k)); }
	.koeck-bh .bh-t-halt { font-size: calc(15px * var(--bh-k)); }
	.koeck-bh .bh-t-uhr { font-size: calc(40px * var(--bh-k)); }
	.koeck-bh .bh-t th, .koeck-bh .bh-t td { padding: calc(17px * var(--bh-k)) 0 calc(17px * var(--bh-k)) calc(16px * var(--bh-k)); }
	.koeck-bh .bh-t th:first-child, .koeck-bh .bh-t td:first-child { padding-left: calc(22px * var(--bh-k)); width: 20%; border-left-width: calc(6px * var(--bh-k)); }
	.koeck-bh .bh-t th:last-child, .koeck-bh .bh-t td:last-child { padding-right: calc(28px * var(--bh-k)); }
	.koeck-bh .bh-t thead th { font-size: calc(14px * var(--bh-k)); padding-top: calc(12px * var(--bh-k)); padding-bottom: calc(10px * var(--bh-k)); }
	.koeck-bh .bh-zeit { font-size: calc(18px * var(--bh-k)); }
	.koeck-bh .bh-was { font-size: calc(23px * var(--bh-k)) !important; }
	.koeck-bh .bh-nach { font-size: calc(18px * var(--bh-k)); }
	.koeck-bh .bh-hin { font-size: calc(16px * var(--bh-k)); }
	.koeck-bh .bh-marke { font-size: calc(12px * var(--bh-k)); }

	.koeck-bh .bh-zug { padding: calc(160px * var(--bh-k)) var(--bh-rand) 0; }
	.koeck-bh .bh-zug .bh-bu { padding-left: 0; }
	.koeck-bh .bh-schluss { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 24px; padding-top: calc(160px * var(--bh-k)); align-items: end; }
	.koeck-bh .bh-schluss-text { grid-column: 1 / 5; padding-bottom: calc(40px * var(--bh-k)); }
	.koeck-bh .bh-schluss .bh-text { font-size: calc(19px * var(--bh-k)); }
	.koeck-bh .bh-h4 { font-size: calc(24px * var(--bh-k)); }
	.koeck-bh .bh-eingang { grid-column: 5 / 13; }
	.koeck-bh .bh-vermerk { margin-top: calc(64px * var(--bh-k)); }
	.koeck-bh .sm-naechste { margin-top: 160px; }
}
/* Desktop mit genug Höhe: die Tafel bleibt stehen, während Vitrine und Bank vorbeiziehen (bei niedrigem Fenster nicht – sie passt dann nicht ganz hinein) */
@media (min-height: 820px) {
	@container (min-width: 1000px) { .koeck-bh .bh-fp-tafelteil { position: sticky; top: calc(96px * var(--bh-k)); } }
}
/* Über 1440 px steht die Story im Rahmen (stories-magazin.css) und wächst mit; der Raum tritt bis an den Bildschirmrand */
@media (min-width: 1441px) {
	.koeck-bh { --bh-k: var(--sm-x, 1); --bh-aus: calc((100vw - var(--scrollbar-width, 0px) - var(--sm-b)) / 2); }
	.koeck-bh .bh-raum { margin-left: calc(var(--bh-aus) * -1); margin-right: calc(var(--bh-aus) * -1); }
	.koeck-bh .bh-zug-knopf { width: calc(44px * var(--sm-x, 1)); height: calc(44px * var(--sm-x, 1)); }
	@container (min-width: 1000px) {
		.koeck-bh > * { --bh-rand: calc(56px * var(--sm-x, 1)); }
		.koeck-bh .bh-kopf, .koeck-bh .bh-intro, .koeck-bh .bh-fp, .koeck-bh .bh-schluss { column-gap: calc(24px * var(--sm-x, 1)); }
		.koeck-bh .bh-bu { padding-top: calc(10px * var(--sm-x, 1)); }
		.koeck-bh .bh-raum .bh-rahmen { max-height: 86svh; }
		.koeck-bh .sm-naechste { margin-top: calc(160px * var(--sm-x, 1)); }
	}
}

/* Zoom 200 % / sehr schmal: Tafel zweispaltig, „Nach“ unter den Genuss */
@container (max-width: 340px) {
	.koeck-bh > * { --bh-rand: 16px; }
	.koeck-bh .bh-titel { font-size: 30px; }
	/* Tafel zweispaltig: Zeit (und „jetzt“) über dem Genuss, „Nach“ darunter */
	.koeck-bh .bh-t thead th:first-child, .koeck-bh .bh-zeit, .koeck-bh .bh-t thead th:nth-child(3), .koeck-bh .bh-nach { display: none; }
	.koeck-bh .bh-t th.bh-was { width: auto; padding: 12px 12px 12px 7px; border-left: 5px solid transparent; }
	.koeck-bh .bh-t thead th:nth-child(2) { padding-left: 12px; }
	.koeck-bh .bh-z.bh-jetzt .bh-was { border-left-color: var(--bh-rosa); }
	.koeck-bh .bh-was::before { content: attr(data-zeit) attr(data-marke); display: block; margin-bottom: 2px; font: 500 13px/1.3 var(--sans); }
	.koeck-bh .bh-was::after { content: attr(data-nach); display: block; margin-top: 3px; font: 400 14px/1.3 var(--sans); }
	.koeck-bh .bh-t-kopf { flex-wrap: wrap; padding-left: 12px; padding-right: 12px; }
	.koeck-bh .bh-t-uhr { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
	.koeck-bh [data-bh-auf], .koeck-bh .bh-tafel .bh-z > * { transition: none !important; opacity: 1 !important; transform: none !important; }
	.koeck-bh .bh-halle img, .koeck-bh .bh-raum img { transform: none !important; }
}
@media print {
	.koeck-bh [data-bh-auf], .koeck-bh .bh-tafel .bh-z > * { opacity: 1 !important; transform: none !important; }
}
