/* Linea Signature – Ergänzungen für die Darstellung am Handy (Fußzeile, Bildfolge im Hochformat).
   Diese Datei wird von index.html geladen. Bitte nicht löschen. */

@media (max-width: 760px) {
  footer[data-linea-fuss] {
    padding-block: 24px calc(24px + env(safe-area-inset-bottom, 0px));
    text-align: center;
  }

  footer[data-linea-fuss] a {
    box-sizing: border-box;
    overflow-wrap: anywhere;
  }

  footer[data-linea-fuss] a:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 2px;
  }

  footer[data-linea-fuss="haupt"] > .container,
  footer[data-linea-fuss="signature"] > .in,
  footer[data-linea-fuss="obsidian"] {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    justify-content: stretch;
    gap: 12px;
  }

  footer[data-linea-fuss="haupt"] .linea-fusslinks,
  footer[data-linea-fuss="signature"] nav,
  footer[data-linea-fuss="obsidian"] nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 0 12px;
  }

  footer[data-linea-fuss="haupt"] .linea-fusslinks > div {
    display: grid;
    gap: 0;
  }

  footer[data-linea-fuss="haupt"] .linea-fusslinks a,
  footer[data-linea-fuss="signature"] nav > a,
  footer[data-linea-fuss="obsidian"] nav > a,
  footer[data-linea-fuss="keramik"] li a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 48px;
    margin: 0;
    padding: 8px 4px;
    border-bottom: 1px solid var(--line, currentColor);
    color: var(--ink, var(--text, inherit));
    font-size: .9375rem;
    line-height: 1.4;
    text-align: center;
    text-decoration: none;
  }

  footer[data-linea-fuss="obsidian"] #copy,
  footer[data-linea-fuss="obsidian"] #credit {
    color: var(--mute, inherit);
    font-size: .875rem;
    line-height: 1.5;
  }

  footer[data-linea-fuss="obsidian"] #credit {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0 4px;
  }

  footer[data-linea-fuss="obsidian"] #credit:empty {
    display: none;
  }

  footer[data-linea-fuss="obsidian"] #credit a,
  footer[data-linea-fuss="obsidian"] .demo-zurueck {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
  }

  footer[data-linea-fuss="obsidian"] #credit a {
    color: var(--ice, currentColor);
    text-underline-offset: .15em;
  }

  footer[data-linea-fuss="obsidian"] .demo-zurueck {
    min-height: 48px;
    padding: 8px 14px;
    border: 1px solid var(--line, currentColor);
    border-radius: 12px;
    background: var(--panel, transparent);
    color: var(--ink, inherit);
    font-size: .9375rem;
    text-decoration: none;
  }

  footer[data-linea-fuss="keramik"] .footer__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px 12px;
  }

  footer[data-linea-fuss="keramik"] .footer__brand,
  footer[data-linea-fuss="keramik"] [data-linea-recht] {
    grid-column: 1 / -1;
  }

  footer[data-linea-fuss="keramik"] .footer__brand p {
    margin-inline: auto;
  }

  footer[data-linea-fuss="keramik"] ul {
    row-gap: 0;
  }

  footer[data-linea-fuss="keramik"] [data-linea-recht] ul {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 7rem), 1fr));
    column-gap: 8px;
  }

  footer[data-linea-fuss="keramik"] .socials,
  footer[data-linea-fuss="keramik"] .payments {
    justify-content: center;
    flex-wrap: wrap;
  }

  footer[data-linea-fuss="keramik"] .socials a {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
  }

  footer[data-linea-fuss="keramik"] .footer__bottom {
    display: grid;
    justify-content: stretch;
    justify-items: center;
    gap: 12px;
  }
}

/* Ein eigener Bildbereich hält auch vor dem ersten Frame den Ausschnitt stabil. */
@media (max-width: 760px) and (orientation: portrait) {
  body:not(.story-ruhig) #story.obs-breitbild .stage {
    display: grid;
    grid-template-rows: auto auto;
    align-content: safe center;
    row-gap: clamp(16px, 3svh, 28px);
    padding-block: 68px 52px;
    background-image: none;
  }
  body:not(.story-ruhig) #story.obs-breitbild #cv {
    position: static;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    background: var(--storyposter, none) center / contain no-repeat;
  }
  body:not(.story-ruhig) #story.obs-breitbild #caps {
    display: grid;
    padding-inline: max(5vw, 16px);
  }
  body:not(.story-ruhig) #story.obs-breitbild .cap {
    position: static;
    grid-area: 1 / 1;
    align-self: start;
    max-width: 100%;
  }
  #vergleich.obs-breitbild .cmp {
    aspect-ratio: 16 / 9;
    min-height: 0;
  }
}
/* Linea 23.11. (e): Auf dem Handy reichen rund drei Bildschirmhöhen für die Story. */
@media (max-width: 760px) and (orientation: portrait) {
  body:not(.story-ruhig) #story.obs-breitbild {
    height: 300vh;
    height: 300svh;
  }
}
/* Handy quer: Kapiteltext bleibt unter der Navigation und über dem unteren Rand. */
@media (orientation: landscape) and (max-height: 520px) {
  body:not(.story-ruhig) #story .cap { bottom: max(16px, env(safe-area-inset-bottom, 0px)); max-width: min(560px, 70vw); }
  body:not(.story-ruhig) #story .cap h2 { font-size: clamp(24px, 7.2vh, 34px); }
  body:not(.story-ruhig) #story .cap p { margin-top: 8px; font-size: 14px; line-height: 1.4; }
  body:not(.story-ruhig) #story .cap .row { margin-top: 12px; gap: 8px; }
  body:not(.story-ruhig) #story .hint { display: none; }
}
@media (max-width: 760px) and (max-height: 700px) and (orientation: portrait) {
  body:not(.story-ruhig) #story.obs-breitbild .stage { padding-block: 62px 14px; row-gap: 12px; }
  body:not(.story-ruhig) #story.obs-breitbild .cap h2 { font-size: clamp(26px, 7vw, 32px); }
  body:not(.story-ruhig) #story.obs-breitbild .cap .row { margin-top: 12px; gap: 8px; }
  body:not(.story-ruhig) #story.obs-breitbild .hint { display: none; }
}
