/* ══════════════════════════════════════════════════════════════════════════════════════════════════════════
   SO GEHT’S — Erklaervideos (18.10.2026). Was es tut und wann, steht in js/videos.js; hier, wie es aussieht.
   Farben nur ueber die Variablen der App (hell und dunkel folgen dem Thema der APP), Schrift 12–20 px, Abstaende
   in px. Alle Klassen beginnen mit „sg-" (vorher gesucht: kein Name in css/, js/, pages/ beginnt so).
   Gemessen von intern/werkzeuge/lokal/pruef-videos.js.
   ══════════════════════════════════════════════════════════════════════════════════════════════════════════ */

.sg-knopf[hidden], .sg-meldung[hidden], .sg-start[hidden] { display: none !important; }
html.sg-still .sg-knopf { display: none !important; }        /* laufende Sitzung oder Gespraech (videos.js sgStillPruefen) */
.sg-nur-vorleser { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* (1) DER KNOPF AUF DEN SEITEN — am PC neben dem Titel (.sg-zeile umschliesst Titel und Knopf), am Handy am Ende der
   Seite (.sg-fuss). Der Knopf am Titel ist niedriger als die Zeile des Titels (32 px, negativer Rand): die Kopfzeile
   wird nicht hoeher. */
.sg-zeile { display: flex; align-items: center; flex-wrap: wrap; column-gap: 14px; row-gap: 6px; min-width: 0; }
.sg-knopf { display: inline-flex; align-items: center; justify-content: center; gap: 7px; box-sizing: border-box; border: 1.5px solid var(--border2);
  border-radius: 999px; background: var(--bg2); color: var(--text2); font-family: inherit; font-weight: 600; line-height: 1.2; cursor: pointer;
  white-space: nowrap; transition: border-color .15s, color .15s, background .15s; }
.sg-knopf-kopf { height: 32px; margin-block: -4px; padding: 0 13px 0 11px; font-size: 13px; }
.sg-knopf-zeichen { flex: none; width: 10px; height: 10px; fill: var(--purple-text); }
@media (hover: hover) { .sg-knopf:hover { border-color: var(--purple); color: var(--text); } }
.sg-knopf:focus-visible, .sg-kachel:focus-visible, .sg-wahl:focus-visible, .sg-kap:focus-visible, .sg-naechstes:focus-visible,
.sg-start:focus-visible, .sg-tour-knopf:focus-visible, .sidebar .sg-menue:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; }
.sg-fuss { display: none; }
@media (max-width: 768px) {
  .sg-knopf-kopf { display: none !important; }
  .sg-fuss { display: flex; justify-content: center; margin: 22px 0 6px; }
  /* scroll-margin: wer mit der Tab-Taste hierher kommt, soll den Knopf UEBER den festen Leisten unten sehen (Tab-Leiste
     59 px, auf der Startseite des Dialers dazu der Satz/„Weiter" darueber) — sonst rollt der Browser ihn genau bis an
     den unteren Rand, unter die Leisten (pruef-handy-feinschliff.js I2 bei 360×740, 18.10.2026). */
  .sg-knopf-fuss { min-height: 44px; max-width: 100%; padding: 0 16px; font-size: 13px; white-space: normal; text-align: center;
    scroll-margin-bottom: calc(170px + env(safe-area-inset-bottom, 0px)); scroll-margin-top: 80px; }
}

/* (2) DER EINTRAG IN DER SEITENLEISTE (am Handy im „Mehr"-Blatt) — gebaut wie die Menuepunkte (.nav-item), aber kein
   .nav-item: die Seitenlogik in core.js blendet jedes .nav-item mit id „nav-…" ohne eigene Seite aus. */
.sidebar .sg-menue { display: flex; align-items: center; gap: 10px; width: 100%; box-sizing: border-box; min-height: 44px; padding: 11px 14px; margin: 0 0 2px;
  border: 0; border-radius: var(--radius-sm); background: none; color: rgba(255,255,255,0.62); font-family: inherit; font-size: 14px; font-weight: 500;
  text-align: left; cursor: pointer; transition: all .15s; }
@media (hover: hover) { .sidebar .sg-menue:hover { background: rgba(255,255,255,0.08); color: #fff; } }
@media (max-height: 760px) { .sidebar .sg-menue { padding: 8px 14px; margin-bottom: 1px; } }
@media (prefers-contrast: more) { .sidebar .sg-menue { color: #fff !important; } }

/* (3) DIE FENSTER — Unterbau .modal (am Handy das Blatt von unten, styles.css „FENSTER AM HANDY") */
.modal.sg-fenster { padding: 20px 24px 24px; border-radius: 20px; }
.sg-kopf { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; }
.sg-kopf-text { min-width: 0; }
.sg-titel { margin: 0; font-size: 20px; line-height: 1.25; font-weight: 700; color: var(--text); overflow-wrap: anywhere; }
.sg-zeile-unter { margin: 4px 0 0; font-size: 13px; line-height: 1.45; color: var(--text2); }
.btn.sg-zu { flex: none; min-height: 40px; }
@media (max-width: 768px) {
  .modal-overlay > .modal.sg-fenster { padding: 8px 16px calc(18px + env(safe-area-inset-bottom)); }
  .sg-kopf { position: sticky; top: -8px; z-index: 3; margin: -8px -16px 12px; padding: 8px 16px 10px; background: var(--bg2); }
  .btn.sg-zu { min-height: 44px; }
  .sg-titel { font-size: 18px; }
}

/* (4) DIE MEDIATHEK: Kacheln (am PC ein Raster, am Handy eine Liste mit kleinem Bild) */
.sg-raster { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(216px, 1fr)); gap: 16px; }
.sg-gruppe { margin: 22px 0 10px; font-size: 14px; font-weight: 700; color: var(--text2); }
.sg-kachel { display: flex; flex-direction: column; width: 100%; height: 100%; margin: 0; padding: 0; border: 1.5px solid var(--border2); border-radius: 14px;
  overflow: hidden; background: var(--bg); color: var(--text); font: inherit; text-align: left; cursor: pointer; transition: border-color .15s, transform .15s, box-shadow .15s; }
@media (hover: hover) { .sg-kachel:hover { border-color: var(--purple); box-shadow: 0 8px 22px rgba(5,28,44,.12); transform: translateY(-1px); } }
.sg-kachel-bild { position: relative; display: block; aspect-ratio: 16 / 9; background: #0B1F2E; }
.sg-kachel-bild img { display: block; width: 100%; height: 100%; object-fit: cover; }
.sg-kachel-spiel { position: absolute; left: 50%; top: 50%; width: 44px; height: 44px; margin: -22px 0 0 -22px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.94); box-shadow: 0 4px 14px rgba(0,0,0,.25); }
.sg-kachel-spiel svg { width: 16px; height: 16px; margin-left: 3px; fill: #051C2C; }
.sg-kachel-dauer { position: absolute; right: 8px; bottom: 8px; padding: 2px 7px; border-radius: 6px; background: rgba(5,28,44,.86); color: #fff; font-size: 12px; font-weight: 700; line-height: 18px; }
.sg-kachel-text { display: flex; flex-direction: column; gap: 3px; padding: 11px 13px 13px; }
.sg-kachel-nr { font-size: 12px; font-weight: 600; color: var(--text2); }
.sg-kachel-titel { font-size: 14px; line-height: 1.3; font-weight: 700; color: var(--text); }
@media (max-width: 768px) {
  .sg-raster { grid-template-columns: 1fr; gap: 10px; }
  .sg-kachel { flex-direction: row; align-items: center; min-height: 72px; }
  .sg-kachel-bild { flex: none; width: 112px; }
  .sg-kachel-spiel { width: 32px; height: 32px; margin: -16px 0 0 -16px; }
  .sg-kachel-spiel svg { width: 12px; height: 12px; margin-left: 2px; }
  .sg-kachel-dauer { right: 4px; bottom: 4px; padding: 0 5px; }
  .sg-kachel-text { padding: 8px 12px; }
}

/* (5) DER SPIELER: Bild links, Leiste und Kapitel rechts (ab 1100 px), sonst untereinander. Das Bild ist 16:9 und
   hoechstens so hoch, dass Kopf und Bild ins Fenster passen. */
.sg-buehne { display: grid; gap: 18px; align-items: start; }
@media (min-width: 1100px) { .sg-buehne { grid-template-columns: minmax(0, 1fr) 280px; } }
.sg-bild { position: relative; width: 100%; max-width: calc((92vh - 150px) * 16 / 9); max-width: calc((92dvh - 150px) * 16 / 9); margin-inline: auto; aspect-ratio: 16 / 9;
  border-radius: 12px; overflow: hidden; background: #000; }
.sg-video { display: block; width: 100%; height: 100%; object-fit: contain; background: #000; }
.sg-start { position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; padding: 0; border: 0; border-radius: 50%;
  display: grid; place-items: center; background: rgba(255,255,255,.95); box-shadow: 0 8px 28px rgba(0,0,0,.35); cursor: pointer; transition: transform .15s; }
.sg-start svg { width: 26px; height: 26px; margin-left: 5px; fill: #051C2C; }
@media (hover: hover) { .sg-start:hover { transform: scale(1.05); } }
.sg-meldung { position: absolute; left: 12px; right: 12px; bottom: 12px; margin: 0; padding: 10px 12px; border-radius: 10px; background: rgba(5,28,44,.92); color: #fff; font-size: 13px; line-height: 1.4; }
.sg-seite { display: flex; flex-direction: column; min-width: 0; }
.sg-leiste { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.sg-tempo { display: inline-flex; align-items: center; gap: 4px; }
.sg-leiste-wort { margin-right: 4px; font-size: 13px; font-weight: 600; color: var(--text2); }
.sg-wahl { min-height: 36px; padding: 0 11px; border: 1.5px solid var(--border2); border-radius: 999px; background: var(--bg2); color: var(--text); font: inherit;
  font-size: 13px; font-weight: 600; cursor: pointer; }
.sg-wahl[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.sg-kapitel-kopf { margin: 18px 0 8px; font-size: 14px; font-weight: 700; color: var(--text2); }
.sg-kapitel { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.sg-kap { display: flex; align-items: baseline; gap: 10px; width: 100%; min-height: 36px; margin: 0; padding: 8px 10px; border: 0; border-radius: 10px; background: none;
  color: var(--text); font: inherit; font-size: 13px; line-height: 1.35; text-align: left; cursor: pointer; }
@media (hover: hover) { .sg-kap:hover { background: var(--bg3); } }
.sg-kap[aria-current="true"] { background: var(--accent-light); box-shadow: inset 3px 0 0 var(--purple); }
.sg-kap-zeit { flex: none; min-width: 34px; font-variant-numeric: tabular-nums; font-weight: 700; color: var(--text2); }
.sg-kap-name { min-width: 0; }
.sg-naechstes { display: flex; flex-direction: column; gap: 2px; margin-top: 16px; padding: 10px 12px; border: 1.5px dashed var(--border2); border-radius: 12px; background: none;
  color: var(--text); font: inherit; text-align: left; cursor: pointer; }
@media (hover: hover) { .sg-naechstes:hover { border-color: var(--purple); } }
.sg-naechstes-wort { font-size: 12px; font-weight: 600; color: var(--text2); }
.sg-naechstes-titel { font-size: 14px; font-weight: 700; }
@media (max-width: 768px) {
  .sg-bild { max-width: none; border-radius: 10px; }
  .sg-wahl, .sg-kap { min-height: 44px; }
  .sg-naechstes { min-height: 44px; }
  .sg-start { width: 64px; height: 64px; margin: -32px 0 0 -32px; }
}

/* (6) DER HINWEIS IN DER TOUR (letzter Schritt) — auf der hellen Karte der Tour */
.sg-tour { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-top: 14px; }
.sg-tour-knopf { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px; border: 1.5px solid var(--border2); border-radius: 999px;
  background: var(--bg2); color: var(--text); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.sg-tour-satz { font-size: 12px; color: var(--text2); }

/* (6b) DER HINWEIS-CLIP (19.10.2026, videos.js sgClip…): Bild 16:9, darunter Satz und Knoepfe. Im Fluss (deckt nichts zu),
   hoechstens 420 px breit. kompakt (in der Karte der Sitzung, einmal nach dem ersten Anruf per tel:): am Handy Bild links
   (150 px), Satz und Knoepfe rechts — so bleibt der Block niedrig. Der Platzhalter ist leer und [hidden], bis er etwas traegt. */
#dialer-softphone-clip[hidden], #dialer-cfg-clip[hidden] { display: none !important; }
#dialer-cfg-clip { margin: -2px 2px 11px; }
.sg-clip { display: flex; flex-direction: column; gap: 8px; width: 100%; max-width: 420px; margin: 0; box-sizing: border-box; }
.sg-clip-bild { position: relative; width: 100%; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: var(--bg3); border: 1px solid var(--border); }
.sg-clip-video { display: block; width: 100%; height: 100%; object-fit: cover; background: var(--bg3); }
.sg-clip-unten { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.sg-clip-satz { flex: 1 1 auto; min-width: 0; margin: 0; font-size: 13px; line-height: 1.45; color: var(--text2); }
.sg-clip-knoepfe { flex: none; display: flex; gap: 6px; }
.sg-clip-knopf { min-height: 32px; padding: 0 12px; border: 1.5px solid var(--border2); border-radius: 999px; background: var(--bg2); color: var(--text2);
  font: inherit; font-size: 12px; font-weight: 600; line-height: 1.2; white-space: nowrap; cursor: pointer; }
@media (hover: hover) { .sg-clip-knopf:hover { border-color: var(--purple); color: var(--text); } }
.sg-clip-knopf:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; }
#dialer-softphone-clip { display: flex; justify-content: center; }
@media (max-width: 768px), (pointer: coarse) {
  .sg-clip-knopf { min-height: 44px; padding: 0 14px; }
}
@media (max-width: 768px) {
  .sg-clip-unten { flex-wrap: wrap; }
  .sg-clip.sg-clip-kompakt { flex-direction: row; align-items: flex-start; gap: 10px; max-width: none; }
  .sg-clip-kompakt .sg-clip-bild { flex: 0 0 150px; width: 150px; border-radius: 10px; }
  .sg-clip-kompakt .sg-clip-unten { flex: 1 1 auto; flex-direction: column; gap: 6px; }
  .sg-clip-kompakt .sg-clip-satz { font-size: 12.5px; }
  .sg-clip-kompakt .sg-clip-knoepfe { flex-wrap: wrap; }
}

/* (7) BEWEGUNG REDUZIEREN: nichts hebt sich, nichts waechst */
@media (prefers-reduced-motion: reduce) {
  .sg-knopf, .sg-kachel, .sg-start, .sidebar .sg-menue { transition: none !important; }
  .sg-kachel:hover, .sg-start:hover { transform: none !important; }
}
