/* Sponsor Eleven, Website: Schliff für Telefon und Tablet (10.11.2026).
   Wird nach style.css und hero.css geladen und ändert nur schmale Fenster und Geräte ohne Mauszeiger.
   Stufen: bis 359 px (kleine Telefone), bis 599 px (Telefon), bis 767 px (Menü mit Knopf), bis 1023 px (Tablet hochkant). */

/* ---------- Bedienung mit dem Finger ---------- */
html { -webkit-tap-highlight-color: rgba(9, 9, 11, .08); }
a, button, summary, label, input { touch-action: manipulation; }

/* Ohne Mauszeiger bleibt „hover“ nach dem Tippen stehen: Der Knopf soll dann nicht grün und angehoben bleiben. */
@media (hover: none) {
  .knopf:not(.knopf-hell):not(.knopf-akzent):hover { background: var(--schwarz); transform: none; box-shadow: none; }
  .knopf:not(.knopf-hell):not(.knopf-akzent):active { background: var(--akzent-kraft); }
  .knopf-rand:hover { background: #fff; }
  .knopf-rand:hover .ic, .knopf-akzent:hover .ic { transform: none; }
  .knopf-akzent:hover { transform: none; box-shadow: none; }
}

/* ---------- Kopf und Menü (bis 767 px) ---------- */
@media (max-width: 767px) {
  .kopf-logo { display: flex; align-items: center; min-height: 44px; }
  .knopf-kopf-mobil { height: 44px; padding-inline: 16px; font-size: 14px; }
  .kopf-burger { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; margin-right: -10px; }
  .kopf-burger .ic { width: 22px; height: 22px; }

  /* Das Menü füllt den Schirm unter dem Kopf und rollt in sich, die Seite dahinter steht still */
  body.menue-offen { overflow: hidden; }
  .menue-mobil {
    height: calc(100vh - 56px) !important; height: calc(100dvh - 56px) !important;
    overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch;
    transform: translateY(-8px); transition: opacity .18s ease-out, transform .18s ease-out;
  }
  .menue-mobil.ist-offen { transform: none; }
  .menue-mobil-innen { min-height: 100%; gap: 0; padding: 4px 20px calc(20px + env(safe-area-inset-bottom, 0px)); }
  .menue-mobil-titel { padding: 18px 0 4px; font-size: 13px; line-height: 18px; letter-spacing: 0; color: var(--z500); }
  .menue-mobil-innen > a { height: 54px; padding-inline: 0; border-bottom: 1px solid var(--z150); font-size: 18px; line-height: 26px; font-weight: 500; color: var(--schwarz); }
  .menue-mobil-innen > a .plakette { margin-left: 4px; }
  .menue-mobil-linie { display: none; }
  .menue-mobil-knoepfe { margin-top: auto; padding-top: 24px; border-top: 0; gap: 10px; }
  .menue-mobil-knoepfe .knopf-rand, .menue-mobil-knoepfe .knopf { height: 52px; border-radius: 12px; font-size: 16px; font-weight: 600; }
}
@media (max-width: 767px) and (prefers-reduced-motion: reduce) { .menue-mobil { transform: none; transition: none; } }

/* ---------- Einstieg ---------- */
/* Feld und Knopf in einer Zeile: spart 54 px, das Produktbild rückt näher an den ersten Schirm */
@media (min-width: 360px) and (max-width: 759px) {
  .hv .feld { flex-direction: row; align-items: center; padding: 6px 6px 6px 14px; }
  .hv .feld-innen { padding-inline: 0; }
  .hv .feld .knopf-gross { padding-inline: 16px; font-size: 15px; }
}
@media (max-width: 599px) {
  .hv-a { padding-top: 26px; }
  .hv .marke { height: 34px; margin-bottom: 16px; }
  .hv-a h1 { font-size: clamp(30px, 9.6vw, 40px); }
  .hv-a .hv-text { margin-top: 14px; font-size: 17px; line-height: 1.5; }
  .hv .einstieg-form { margin-top: 22px; }
  .hv .einstieg-haken { gap: 2px 14px; }
}
@media (max-width: 359px) {
  .hv .marke { gap: 6px; padding-right: 8px; font-size: 12px; }
  .hv .marke-chip { padding-inline: 6px; }
  .hv-a .hv-text { font-size: 16px; }
}
/* Tablet hochkant: die Überschrift darf größer sein als auf dem Telefon */
@media (min-width: 600px) and (max-width: 859px) { .hv-a h1 { font-size: 46px; } }

/* ---------- Sieben Punkte: Produktbilder auf dem Telefon lesbar ---------- */
@keyframes fahrt { 0%, 14% { transform: translateX(0); } 44%, 70% { transform: translateX(var(--fahrt, 0px)); } 100% { transform: translateX(0); } }
@media (max-width: 599px) {
  .schritt { margin-top: 44px; }
  .buehne { padding: 14px 12px 30px; }
  /* Punkt 1: statt des ganzen Fensters die Karte „Signale“ in voller Breite (app.js tauscht die Ansicht) */
  .schnitt-signale { --bh: auto; --bb: 100%; --bx: 0px; --by: 0px; background: #fff; }
}
/* Punkt 2 und 6 (bis 699 px): fester Maßstab statt Verkleinern auf die Rahmenbreite. Das Bild fährt langsam von links nach rechts
   und zurück, so sind Namen, Position und „Abrufen“ bzw. die Spalten des Boards nacheinander in lesbarer Größe zu sehen. */
@media (max-width: 699px) {
  .schnitt-kontakte { --bb: 623px; --fahrt: min(0px, calc(100cqw - 623px)); -webkit-mask-image: none; mask-image: none; }
  .schnitt-board { --bh: 346px; --bb: 1224px; --bx: -581px; --by: -89px; --fahrt: min(0px, calc(100cqw - 643px)); -webkit-mask-image: none; mask-image: none; }
  .szene.spielt .schnitt-kontakte > s11-ansicht { animation: fahrt 12s cubic-bezier(.45, 0, .25, 1) 2.6s infinite; }
  .szene.spielt .schnitt-board > s11-ansicht { animation: fahrt 13s cubic-bezier(.45, 0, .25, 1) 4.2s infinite; }
  .szene.ruht .schnitt-kontakte > s11-ansicht, .szene.ruht .schnitt-board > s11-ansicht { animation-play-state: paused; }
}
@media (max-width: 699px) and (prefers-reduced-motion: reduce) {
  .szene.spielt .schnitt-kontakte > s11-ansicht, .szene.spielt .schnitt-board > s11-ansicht { animation: none; }
}

/* ---------- Werder ---------- */
@media (max-width: 599px) {
  .werder-inhalt { padding: 24px 20px; }
  .werder-fuss { flex-direction: column; align-items: stretch; gap: 6px; padding-top: 16px; }
  .werder-fuss .stimmen-punkte { align-self: flex-start; }
  .werder-fuss .knopf-artikel { width: 100%; height: 50px; justify-content: center; }
}

/* ---------- Kleine Textlinks: Fläche zum Tippen größer als die Schrift ---------- */
@media (max-width: 1023px) {
  .kosten-notiz a, .fragen-notiz a, .stimme figcaption a { display: inline-block; padding-block: 12px; margin-block: -12px; }
  .fragen-liste summary { min-height: 56px; }
}

/* ---------- Fuß ---------- */
@media (max-width: 1023px) {
  .fuss-spalte { gap: 0; }
  .fuss-spalte span { padding-bottom: 6px; }
  .fuss-spalte a { display: flex; align-items: center; min-height: 44px; font-size: 15px; line-height: 20px; }
  .fuss-unten-rechts { gap: 0 20px; }
  .fuss-unten-rechts a, .fuss-werder { display: inline-flex; align-items: center; min-height: 44px; }
}
@media (max-width: 599px) {
  .fuss { padding-bottom: calc(32px + env(safe-area-inset-bottom, 0px)); }
  .fuss-raster { gap: 28px 20px; }
  .fuss-unten { gap: 4px; }
}

/* ---------- Kleine Telefone (bis 359 px) ---------- */
@media (max-width: 359px) {
  .kopf-leiste { padding-inline: 14px; }
  .kopf-logo img { width: auto; height: 24px; }
  .knopf-kopf-mobil { padding-inline: 12px; }
  .kopf-mobil { gap: 4px; }
}
/* Fuß: zweizeilige Einträge brauchen Luft nach oben und unten */
@media (max-width: 1023px) { .fuss-spalte a { padding-block: 9px; } }

/* ---------- Tablets mit Finger ab 1024 px (iPad quer, iPad Pro): Ziele im Fuß größer ---------- */
@media (pointer: coarse) and (min-width: 1024px) {
  .fuss-spalte { gap: 2px; }
  .fuss-spalte a { display: flex; align-items: center; min-height: 44px; }
  .fuss-unten-rechts a, .fuss-werder { display: inline-flex; align-items: center; min-height: 44px; }
  .kopf-link { min-height: 44px; }
}

/* Letzte kleine Ziele: Werder-Marke im Einstieg und Logo im Fuß bekommen eine größere Fläche zum Tippen */
@media (max-width: 1023px) {
  .hv .marke { position: relative; }
  .hv .marke::after { content: ""; position: absolute; inset: -6px 0; }
  .fuss-marke > a { display: flex; align-items: center; min-height: 44px; }
}

/* Tablet: Ziele im Kopf mindestens 44 px hoch (die Leiste selbst bleibt 56 px) */
@media (min-width: 768px) and (max-width: 1023px) {
  .kopf-logo { display: flex; align-items: center; min-height: 44px; }
  .kopf-link, .kopf-anmelden { display: inline-flex; align-items: center; min-height: 44px; }
}
@media (pointer: coarse) and (min-width: 1024px) {
  .kopf-logo { display: flex; align-items: center; min-height: 44px; }
  .kopf-link, .kopf-anmelden { display: inline-flex; align-items: center; min-height: 44px; }
  .werder-leiste button::after { content: ""; position: absolute; inset: -10px; }
}

/* ---------- Nachtrag nach der Prüfung in WebKit (iPhone- und iPad-Profile) ---------- */
@media (max-width: 767px) {
  /* Die zwei Knöpfe des Menüs stehen nebeneinander und bleiben unten stehen, auch wenn die Liste auf kleinen Telefonen rollt */
  .menue-mobil-innen { padding-bottom: 0; }
  .menue-mobil-knoepfe { position: sticky; bottom: 0; flex-direction: row; gap: 10px; margin-top: auto; padding: 16px 0 calc(16px + env(safe-area-inset-bottom, 0px)); background: linear-gradient(rgba(255, 255, 255, 0), #fff 14px); }
  .menue-mobil-knoepfe > * { flex: 1 1 0; min-width: 0; }
  .menue-mobil-knoepfe .knopf { width: auto; }
}
/* niedrige Schirme (iPhone SE, Telefon mit eingeblendeter Leiste): Zeilen etwas flacher, damit alles ohne Rollen passt */
@media (max-width: 767px) and (max-height: 700px) {
  .menue-mobil-innen > a { height: 48px; font-size: 17px; }
  .menue-mobil-titel { padding-top: 12px; }
}
/* Der Menü-Knopf behält nach dem Tippen keinen grauen Grund */
@media (hover: none) {
  .kopf-burger:hover { background: transparent; }
  .kopf-burger:active { background: var(--z100); }
}
/* Tablet: Überschrift immer zweizeilig, sonst läuft sie bei 834 bis 1000 px von Rand zu Rand */
@media (min-width: 600px) and (max-width: 1023px) { .hv-a h1 { max-width: 620px; } }
/* iPad quer: Fuß-Links 40 px hoch wie auf dem Telefon */
@media (pointer: coarse) and (min-width: 1024px) { .fuss-spalte a { min-height: 44px; } }

/* ---------- Menü auf dem Telefon: Produkt mit Zeichen und einer Zeile Erklärung (11.11.2026) ---------- */
@media (max-width: 767px) {
  .menue-mobil-innen > a.menue-mobil-produkt { height: auto; min-height: 64px; gap: 14px; padding-block: 10px; }
  .menue-mobil-produkt .symbolkasten { flex: none; }
  .menue-mobil-produkt > span:last-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
  .menue-mobil-produkt b { font-size: 17px; line-height: 22px; font-weight: 600; color: var(--schwarz); }
  .menue-mobil-produkt small { font-size: 14px; line-height: 19px; font-weight: 400; color: var(--z500); }
  .menue-mobil-titel + a, .menue-mobil-produkt + .menue-mobil-titel { margin-top: 0; }
  .menue-mobil-produkt + .menue-mobil-titel { padding-top: 22px; }
}
@media (max-width: 767px) and (max-height: 700px) {
  .menue-mobil-innen > a.menue-mobil-produkt { min-height: 58px; padding-block: 7px; }
}
@media (max-width: 767px) { .menue-mobil-produkt .symbolkasten { margin-bottom: 0; } }
/* low screens (iPhone SE: Safari 26 lays the page under the floating toolbar, so about 650 px): all seven entries fit above the sticky button */
@media (max-width: 767px) and (max-height: 700px) {
  .menue-mobil-innen > a { height: 44px; }
  .menue-mobil-innen > a.menue-mobil-produkt { min-height: 52px; padding-block: 5px; }
  .menue-mobil-produkt small { font-size: 13px; line-height: 17px; }
  .menue-mobil-titel { padding: 10px 0 2px; }
  .menue-mobil-produkt + .menue-mobil-titel { padding-top: 14px; }
  .menue-mobil-knoepfe { padding: 12px 0 calc(12px + env(safe-area-inset-bottom, 0px)); }
}

/* Kopfleiste auf Telefon und Tablet fast deckend: sonst scheinen schwarze Knöpfe beim Scrollen durch */
@media (max-width: 1023px) { .kopf { background: rgba(250, 250, 250, .97); } }

/* ---------- Schliff vom 18.11.2026: jedes Ziel mindestens 44 px, keine Schrift unter 12 px ---------- */
@media (max-width: 1023px), (pointer: coarse) {
  .knopf-kopf { height: 44px; }
  .kern-mehr-link { min-height: 44px; }
  .marke-chip, .hv-hinweis, .hv-karte .hv-beispiel { font-size: 12px; }
  /* Kreuz im Fenster „Demo buchen“: 44 px statt 36 px */
  .fenster-zu { top: 10px; right: 10px; width: 44px; height: 44px; }
  .fenster-zu .ic { width: 20px; height: 20px; }
}
@media (max-width: 599px) {
  /* Rechtliches im Fuß in Lesegröße */
  .fuss-unten { font-size: 14px; line-height: 20px; }
  /* Fenster „Demo buchen“: mehr Breite für die Felder, Beschriftung in Lesegröße, unten Platz für die Wischgeste */
  .fenster { padding: 12px; padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px)); }
  .fenster-karte { max-height: calc(100dvh - 24px - env(safe-area-inset-bottom, 0px)); padding: 28px 22px 24px; overscroll-behavior: contain; }
  .fenster h2 { padding-right: 36px; }
  .fenster label { font-size: 14px; line-height: 20px; }
  .fenster input { height: 48px; }
}
/* Telefon quer: das Fenster nutzt die Breite, damit die fünf Felder ohne langes Rollen erreichbar sind */
@media (max-height: 480px) and (orientation: landscape) {
  .fenster { padding: 8px; }
  .fenster-karte { max-width: 720px; max-height: calc(100dvh - 16px); padding: 20px 24px; }
  .fenster h2 { font-size: 24px; }
  .fenster form { margin-top: 12px; }
  .fenster textarea { min-height: 0; height: 64px; }
}
/* Das Fenster selbst nimmt auf Geräten mit Finger den Fokus (app.js): ohne Rahmen, die Felder zeigen ihren eigenen */
.fenster-karte:focus { outline: none; }
