.mw-kopf-platz { height: var(--kopf-hoehe); }
.mw-kopf { position: fixed; top: 0; right: 0; left: 0; z-index: 40; padding: var(--kopf-luft) var(--kopf-luft) 0; pointer-events: none; }
.mw-kopf--editor { position: absolute; }
.mw-kopf__reihe { display: flex; gap: 0.5rem; align-items: stretch; pointer-events: auto; }
.mw-kopf__feld { display: flex; align-items: center; min-height: var(--kopf-feld); border-radius: var(--ecken-mittel); }
/* Logo frei auf der Seite, ohne eigenes Feld: Kreis mit MW und Schriftzug; nach dem Scrollen bleibt nur der Kreis.
   Über dunklen Abschnitten (Klasse ist-auf-dunkel, module.js) kehrt der Kreis um. */
.mw-kopf__logo { --logo-flaeche: var(--farbe-aubergine); --logo-schrift: var(--farbe-seite); --logo-wort: var(--farbe-aubergine); display: flex; flex: none; align-items: center; min-height: var(--kopf-feld); padding: 0 0.5rem 0 0.125rem; border-radius: var(--ecken-mittel); text-decoration: none; }
.mw-kopf__logo img { display: block; width: clamp(6.75rem, 9.5vw, 8.75rem); height: auto; }
.mw-kopf__zeichen { display: block; flex: none; width: var(--kopf-feld); height: var(--kopf-feld); }
.mw-kopf__zeichen circle { fill: var(--logo-flaeche); }
.mw-kopf__zeichen path { fill: var(--logo-schrift); }
.mw-kopf__wort { display: block; max-width: 10.5rem; overflow: hidden; }
.mw-kopf.ist-bereit .mw-kopf__wort { transition: max-width 0.55s cubic-bezier(0.2, 0.7, 0.2, 1), opacity 0.3s; }      /* erst nach dem ersten Bild, sonst blendet der Kreis beim Laden um */
.mw-kopf.ist-bereit .mw-kopf__zeichen :is(circle, path) { transition: fill 0.35s; }
.mw-kopf__wort svg { display: block; width: 9.5rem; height: auto; margin-left: 0.75rem; }
.mw-kopf__wort path { fill: var(--logo-wort); stroke: var(--logo-wort); stroke-width: 2.5; stroke-linejoin: round; }
.mw-kopf.ist-gescrollt .mw-kopf__wort { max-width: 0; opacity: 0; }
.mw-kopf.ist-auf-dunkel:not(.ist-offen) .mw-kopf__logo { --logo-flaeche: var(--farbe-seite); --logo-schrift: var(--farbe-aubergine); --logo-wort: var(--farbe-seite); }
@media (prefers-reduced-motion: reduce) { .mw-kopf.ist-bereit .mw-kopf__wort, .mw-kopf.ist-bereit .mw-kopf__zeichen :is(circle, path) { transition: none; } }
.mw-kopf__nav { flex: 1; justify-content: space-between; gap: 1rem; padding: 0 1.5rem 0 0.375rem; }
.mw-kopf__nav ul { display: flex; gap: clamp(1rem, 2vw, 2rem); margin: 0; padding: 0; list-style: none; }
.mw-kopf__nav li a { display: block; padding: 0.65rem 0; color: var(--farbe-text); font-size: var(--groesse-klein); text-decoration: none; white-space: nowrap; }
.mw-kopf__nav li a:hover { text-decoration: underline; text-decoration-color: var(--farbe-orange); text-decoration-thickness: 2px; text-underline-offset: 0.35em; }
.mw-kopf__schalter { display: inline-flex; gap: 0.75rem; align-items: center; min-height: calc(var(--kopf-feld) - 0.75rem); padding: 0 1.1rem; border-radius: calc(var(--ecken-mittel) - 0.375rem); color: var(--farbe-text); font: inherit; font-size: var(--groesse-klein); font-weight: 600; cursor: pointer; transition: background-color var(--uebergang); }
.mw-kopf__schalter:hover, .mw-kopf.ist-offen .mw-kopf__schalter { --d: 94%; }
.mw-kopf__schalter i { position: relative; width: 14px; height: 14px; }
.mw-kopf__schalter i::before, .mw-kopf__schalter i::after { content: ""; position: absolute; top: 6px; left: 0; width: 14px; height: 2px; border-radius: 2px; background: currentColor; transition: rotate 0.3s; }
.mw-kopf__schalter i::after { rotate: 90deg; }
.mw-kopf.ist-offen .mw-kopf__schalter i::before { rotate: 45deg; }
.mw-kopf.ist-offen .mw-kopf__schalter i::after { rotate: 135deg; }
.mw-kopf__wort-klein { display: none; }
/* Onlineshop: steht am Rechner gleich rechts neben dem Knopf für die Behandlungen, am Handy als Punkt im Menü */
.mw-kopf__shop { display: inline-flex; flex: none; gap: 0.5rem; align-items: center; margin-right: auto; padding: 0.65rem 0.5rem 0.65rem 0.35rem; color: var(--farbe-text); font-size: var(--groesse-klein); font-weight: 600; text-decoration: none; white-space: nowrap; }
.mw-kopf__shop .symbol { width: 1.2rem; height: 1.2rem; }
.mw-kopf__shop:hover { color: var(--farbe-text); }
.mw-kopf__shop:hover span { text-decoration: underline; text-decoration-color: var(--farbe-orange); text-decoration-thickness: 2px; text-underline-offset: 0.35em; }
.mw-mk--shop .mw-mk__text b { display: flex; gap: 0.5rem; align-items: center; }
.mw-mk--shop .mw-mk__text .symbol { width: 1.1em; height: 1.1em; }
.mw-kopf__aktion { display: flex; flex: none; gap: 0.5rem; }
.mw-kopf__aktion .btn:last-child, .mw-leiste .btn:last-child { box-shadow: 0 0.75rem 1.75rem -0.5rem color-mix(in srgb, var(--farbe-dunkel) 55%, transparent); }
.mw-kopf__aktion .btn, .mw-leiste .btn { min-height: var(--kopf-feld); padding: 0 1.35rem; font-size: var(--groesse-klein); white-space: nowrap; }
/* Die Tafel ist ein durchgehender Milchglas-Rahmen um alle Kacheln (Anne): Innenabstand ringsum, ohne helle Kante */
.mw-kopf__tafel { margin-top: 0.5rem; padding: 0.5rem; box-shadow: 0 1.75rem 3.5rem -1.75rem color-mix(in srgb, var(--farbe-dunkel) 40%, transparent); max-height: calc(100svh - var(--kopf-hoehe) - 0.5rem); overflow-y: auto; overscroll-behavior: contain; scrollbar-width: none; border-radius: var(--rund); pointer-events: auto; background: color-mix(in srgb, var(--farbe-hell) var(--glas-deckkraft), transparent); -webkit-backdrop-filter: var(--glas-neutral); backdrop-filter: var(--glas-neutral); }
.mw-kopf__tafel[hidden] { display: none; }
.mw-kopf__bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); grid-template-rows: repeat(2, minmax(clamp(9rem, 22vh, 12.5rem), auto)); grid-auto-rows: minmax(4.5rem, auto); gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.mw-mk { grid-column: span 2; }
.mw-mk--gross { grid-column: span 4; grid-row: span 2; }
.mw-mk--breit { grid-column: span 4; }
.mw-mk--klein { grid-column: span 3; }
.mw-mk--klein:nth-child(4) { grid-column: span 4; }
.mw-mk--klein:nth-child(n+5) { grid-column: span 2; }
.mw-mk--punkt { display: none; }
.mw-mk > a { position: relative; isolation: isolate; display: flex; align-items: flex-end; height: 100%; padding: 0.75rem; overflow: clip; border-radius: calc(var(--rund) - 0.5rem); color: inherit; text-decoration: none; }
.mw-mk img { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; object-fit: cover; transition: scale 0.8s cubic-bezier(0.2, 0.7, 0.2, 1); }
.mw-mk__text { display: block; width: 100%; padding: 0.6rem 0.75rem; border-radius: var(--ecken-klein); transition: background-color var(--uebergang); }
.mw-mk__text b { display: block; font-family: var(--schrift-headline); font-size: calc(clamp(1.1rem, 1.4vw, 1.35rem) * var(--kf)); font-weight: var(--gewicht-headline); line-height: calc(1.2 * var(--kz)); }
.mw-mk__text small { display: block; margin-top: 0.2rem; line-height: 1.35; }
.mw-mk--gross .mw-mk__text b { font-size: clamp(2rem, 3vw, 3rem); }
.mw-mk--bild .mw-mk__text { color: var(--farbe-text); }
@media (hover: hover) {
  .mw-mk > a:hover img { scale: 1.05; }
  .mw-mk:not(.mw-mk--bild) > a:hover .mw-mk__text { background: color-mix(in srgb, currentColor 10%, transparent); }
}
.mw-leiste { display: none; }
@media (max-width: 1290px) {
  .mw-kopf__nav { justify-content: flex-end; border-color: transparent; background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .mw-kopf__nav ul, .mw-kopf__wort-gross, .mw-kopf__shop { display: none; }
  .mw-kopf__wort-klein { display: inline; }
  .mw-kopf__schalter { min-height: var(--kopf-feld); border-radius: var(--ecken-mittel); -webkit-backdrop-filter: var(--glas-neutral); backdrop-filter: var(--glas-neutral); }
  .mw-kopf__nav { padding: 0; }
  .mw-mk--punkt { display: block; grid-column: span 2; }
  .mw-mk--shop { grid-column: span 4; }
  .mw-mk--punkt > a { min-height: 4.5rem; }
}
@media (max-width: 860px) {
  .mw-kopf__aktion { display: none; }
  /* Handy: das offene Menü liegt auf Milchglas über den ganzen Bildschirm, bis unter die Leiste mit Anruf, WhatsApp und Termin (Anne).
     Die Tafel braucht dann keinen eigenen Rahmen; sie endet mit demselben Abstand über der Leiste wie unter der Kopfzeile. */
  .mw-kopf.ist-offen { touch-action: pinch-zoom; }
  .mw-kopf.ist-offen::before { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: auto; background: color-mix(in srgb, var(--farbe-hell) var(--glas-deckkraft), transparent); -webkit-backdrop-filter: var(--glas-neutral); backdrop-filter: var(--glas-neutral); }
  .mw-kopf__tafel { max-height: calc(100svh - var(--kopf-luft) * 2 - var(--kopf-feld) * 2 - 1rem - env(safe-area-inset-bottom)); padding: 0; border-radius: var(--ecken-mittel); background: none; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; touch-action: pan-y pinch-zoom; }
  /* Handy-Menü: oben die Behandlungen als Bildkacheln, darunter die übrigen Punkte als flache Zeilen, damit es ruhig bleibt */
  /* Alles passt ohne Scrollen auf den Bildschirm (Anne): --mh ist die Höhe zwischen Kopfzeile und Leiste, --mf der Maßstab der Bildkacheln.
     Gerechnet für vier Kachelreihen (8,75 + 3 × 5,25 = 24,5), --pz Zeilen mit Punkten (je 2,9) und die Abstände dazwischen; die Zeilen bleiben mindestens 2,5rem hoch. */
  .mw-kopf { --mh: calc(100svh - var(--kopf-luft) * 2 - var(--kopf-feld) * 2 - 1rem - env(safe-area-inset-bottom)); }
  .mw-kopf__tafel { --mf: clamp(0.45rem, calc((var(--mh) - (3 + var(--pz, 3)) * 0.5rem - var(--pz, 3) * 2.9rem) / 24.5), 1rem); }
  .mw-kopf__bento { grid-template-rows: none; grid-auto-rows: auto; }
  .mw-mk:not(.mw-mk--punkt) > a { min-height: calc(var(--mf) * 5.25); border-radius: var(--ecken-mittel); }      /* ohne Rahmen drumherum: Ecken wie Logo-Feld und Menü-Knopf */
  .mw-mk.mw-mk--gross > a { min-height: calc(var(--mf) * 8.75); padding: calc(var(--mf) * 0.4); }      /* Bild bleibt über dem Schild sichtbar, Innenabstand wie bei den anderen Kacheln */
  .mw-mk--gross .mw-mk__text b { font-size: calc(1.5rem * var(--kf)); }
  .mw-mk--bild:not(.mw-mk--gross) .mw-mk__text small { display: none; }
  .mw-mk--bild:not(.mw-mk--gross) > a { padding: calc(var(--mf) * 0.4); }
  /* Die Schrift geht mit der Breite der Kachel mit, damit das längste Wort („Physiotherapie“, rund 6,6 Schrifthöhen breit) immer in das Schild passt */
  .mw-mk--bild:not(.mw-mk--gross) > a { container-type: inline-size; }
  .mw-mk--bild:not(.mw-mk--gross) .mw-mk__text b { font-size: calc(0.9rem * var(--kf)); font-size: min(calc(0.9rem * var(--kf)), calc((100cqi - 2.2rem) / 6.9)); white-space: nowrap; }
  .mw-mk--gross { grid-column: 1 / -1; grid-row: span 1; }
  .mw-mk--breit, .mw-mk--klein, .mw-mk--klein:nth-child(4), .mw-mk--klein:nth-child(n+5), .mw-mk--punkt, .mw-mk--shop { grid-column: span 6; }
  .mw-mk--ende, .mw-mk--ende.mw-mk--klein:nth-child(n+5), .mw-mk--allein { grid-column: 1 / -1; }
  .mw-mk__text { padding: calc(var(--mf) * 0.5) 0.6rem; }
  .mw-mk--punkt > a { min-height: max(2.5rem, calc(var(--mf) * 2.9)); align-items: center; padding: 0 0.9rem; border-radius: var(--ecken-mittel); }
  .mw-mk--punkt .mw-mk__text { padding: 0; }
  .mw-mk--punkt .mw-mk__text b { font-family: var(--schrift-text); font-size: var(--groesse-klein); font-weight: 600; line-height: 1.2; }
  .mw-leiste { position: fixed; right: var(--kopf-luft); bottom: calc(var(--kopf-luft) + env(safe-area-inset-bottom)); left: var(--kopf-luft); z-index: 41; display: flex; gap: 0.5rem; }
  .mw-leiste .btn { padding: 0 0.9rem; }
  .mw-leiste .btn:not(:first-child) { flex: 1 1 auto; }
}
/* Niedrige Bildschirme (kleine Handys, Browserleisten eingeblendet): statt flach gestauchter Bildkacheln stehen die Behandlungen als ruhige Zeilen
   in zwei Spalten, das Bild als kleiner Kreis vor dem Namen (Anne: gestauchte Kacheln sind hässlich). */
@media (max-width: 860px) and (max-height: 660px) {
  .mw-kopf__tafel { --zeile: clamp(2.5rem, calc((var(--mh) - var(--pz, 3) * 2.5rem - (2 + var(--pz, 3)) * 0.5rem) / 3), 3.75rem); --kreis: min(calc(var(--zeile) - 0.8rem), 2.4rem); }      /* drei Zeilen Behandlungen teilen sich, was über den drei Zeilen mit Punkten und den Abständen bleibt */
  .mw-mk.mw-mk--bild > a, .mw-mk.mw-mk--gross > a { min-height: 0; padding: 0; }
  .mw-mk--bild img { inset: 50% auto auto 0.4rem; z-index: 1; width: var(--kreis); height: var(--kreis); border-radius: 50%; translate: 0 -50%; }
  .mw-mk--bild .mw-mk__text { display: flex; align-items: center; min-height: var(--zeile); padding: 0 0.5rem 0 calc(var(--kreis) + 0.9rem); border-radius: var(--ecken-mittel); }
  .mw-mk--bild .mw-mk__text small { display: none; }
  .mw-mk.mw-mk--bild > a { container-type: inline-size; }
  .mw-mk.mw-mk--bild:not(.mw-mk--punkt) .mw-mk__text b { font-size: calc(0.82rem * var(--kf)); font-size: min(calc(0.82rem * var(--kf)), calc((100cqi - 4.3rem) / 6.9)); white-space: nowrap; }
  .mw-mk--gross, .mw-mk--ende, .mw-mk--ende.mw-mk--klein:nth-child(n+5) { grid-column: span 6; }
  .mw-mk--punkt > a { min-height: 2.5rem; }
}
@media (max-width: 350px) and (max-height: 660px) { .mw-kopf__tafel { --kreis: min(calc(var(--zeile) - 0.8rem), 1.8rem); } .mw-mk.mw-mk--bild:not(.mw-mk--punkt) .mw-mk__text b { font-size: calc(0.74rem * var(--kf)); font-size: min(calc(0.82rem * var(--kf)), calc((100cqi - 3.4rem) / 6.9)); } .mw-mk--bild .mw-mk__text { padding-left: calc(var(--kreis) + 0.75rem); } }      /* schmal: „Physiotherapie“ bleibt ganz */
/* Schmale Handys: WhatsApp nur als Symbol, damit „Termin buchen“ mit Kalender Platz hat */
@media (max-width: 430px) { .mw-leiste .btn-symbol:not(:last-child) span { display: none; } .mw-leiste .btn:not(:last-child) { flex: 0 0 auto; } }
@media (prefers-reduced-motion: no-preference) {
  .mw-kopf.ist-offen .mw-mk { animation: mw-mk-auf 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .mw-kopf.ist-offen .mw-mk:nth-child(2) { animation-delay: 0.04s; }
  .mw-kopf.ist-offen .mw-mk:nth-child(3) { animation-delay: 0.08s; }
  .mw-kopf.ist-offen .mw-mk:nth-child(4) { animation-delay: 0.12s; }
  .mw-kopf.ist-offen .mw-mk:nth-child(n+5) { animation-delay: 0.16s; }
}
@keyframes mw-mk-auf { from { opacity: 0; translate: 0 12px; } }
@media (max-width: 860px) and (prefers-reduced-motion: no-preference) { .mw-kopf.ist-offen::before { animation: mw-glas-auf 0.3s ease both; } }
@keyframes mw-glas-auf { from { opacity: 0; } }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) { @media (max-width: 860px) { .mw-kopf.ist-offen::before { background: color-mix(in srgb, var(--farbe-seite) 95%, transparent); } } }
@media (max-width: 860px) and (prefers-reduced-transparency: reduce) { .mw-kopf.ist-offen::before { background: var(--farbe-seite); -webkit-backdrop-filter: none; backdrop-filter: none; } }
/* Schmalere Rechner: erst enger, dann nur der Kreis, damit der Terminknopf im Bild bleibt */
@media (max-width: 1560px) and (min-width: 1291px) {
  .mw-kopf__nav ul { gap: 1.05rem; }
  .mw-kopf__nav { padding-right: 1.1rem; }
  .mw-kopf__wort svg { width: 8rem; margin-left: 0.6rem; }
  .mw-kopf__aktion .btn { padding: 0 1.1rem; }
}
@media (max-width: 1400px) and (min-width: 1291px) { .mw-kopf__wort { max-width: 0; opacity: 0; } }
@media (max-width: 480px) { .mw-kopf__wort svg { width: 8.25rem; margin-left: 0.6rem; } }
@media (max-width: 345px) { .mw-kopf__wort { display: none; } }
