/*
 * Erweiterte Leiste „Anpassen“ (Helge 20.11.2026: „wir erweitern das Angebot oben“).
 * Die Wahl bleibt im eigenen Browser gespeichert. Ohne Skript bleibt „Anpassen“ verborgen,
 * die Seite selbst funktioniert vollständig.
 */
html:not(.js) .nur-mit-skript { display: none !important; }

/* Klappfeld in der Leiste */
.anpassen { display: inline-block; }
.anpassen[open] { display: block; flex-basis: 100%; }
.anpassen > summary {
  display: inline-flex; align-items: center; gap: .35rem; min-height: 2.5rem; padding: .35rem .7rem; list-style: none;
  color: #fff; border: 2px solid transparent; border-radius: 10px; font-weight: 700; cursor: pointer;
}
.anpassen > summary::-webkit-details-marker { display: none; }
.anpassen > summary:hover { background: rgba(255, 255, 255, .18); }
.anpassen[open] > summary { background: #fff; color: #061b4d; }
.anpassen-feld { display: grid; gap: .4rem; grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr)); padding: .4rem .2rem .2rem; }
.anpassen-feld button { justify-content: flex-start; }
.anpassen-feld .zuruecksetzen { border-color: rgba(255, 255, 255, .55) !important; }

/* Die Einstellungen */
html[data-gross="an"] { font-size: 125%; }
html[data-abstand="an"] body { line-height: 1.95; letter-spacing: .04em; word-spacing: .12em; }
html[data-abstand="an"] p, html[data-abstand="an"] li { margin-bottom: 1em; }
html[data-schrift="an"] body, html[data-schrift="an"] button, html[data-schrift="an"] input, html[data-schrift="an"] select, html[data-schrift="an"] textarea { font-family: Verdana, Tahoma, 'Atkinson Hyperlegible', sans-serif; }
html[data-links="an"] main a { text-decoration: underline !important; text-decoration-thickness: .12em !important; }
html[data-fokus="an"] :focus-visible { outline: 5px solid #000 !important; outline-offset: 2px !important; box-shadow: 0 0 0 11px #ffbf47 !important; }
html[data-ruhe="an"] *, html[data-ruhe="an"] *::before, html[data-ruhe="an"] *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
html[data-ruhe="an"] body { background-attachment: scroll !important; }
html[data-bilder="an"] main img, html[data-bilder="an"] .gk-zeichen, html[data-bilder="an"] .finder-karte, html[data-bilder="an"] .karte-sh-hh { display: none !important; }
html[data-einfach="an"] body { background: var(--grund) !important; }
html[data-einfach="an"] main { max-width: 44rem; }
html[data-einfach="an"] .wo-raster, html[data-einfach="an"] .gruppenliste, html[data-einfach="an"] .drei-wege ul, html[data-einfach="an"] .vier-schritte, html[data-einfach="an"] .themen-kacheln { grid-template-columns: 1fr !important; }
html[data-einfach="an"] .karte-flaeche, html[data-einfach="an"] .gk-zeichen, html[data-einfach="an"] .karte-sh-hh { display: none !important; }
html[data-einfach="an"] .baustein, html[data-einfach="an"] .drei-wege a { box-shadow: none !important; border: 2px solid var(--rand-stark) !important; }
html[data-einfach="an"] .marke, html[data-einfach="an"] .marke-name, html[data-einfach="an"] .marke-zeile, html[data-einfach="an"] .fuss-zeile { color: var(--text) !important; text-shadow: none !important; }
html[data-einfach="an"] .hilfen { background: var(--blau) !important; }

/* Startseite auf dem Handy: Leiste mit Symbolen – „Anpassen“ über die ganze Breite und mit Text */
.start-buehne .hilfen .anpassen { grid-column: 1 / -1; justify-self: center; }
.start-buehne .hilfen .anpassen[open] { justify-self: stretch; }
.start-buehne .hilfen .anpassen-feld button { justify-content: flex-start; padding: .35rem .7rem; min-height: 2.75rem; }
.start-buehne .hilfen .anpassen-feld button span { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; }
.start-buehne .hilfen { max-width: calc(100vw - 40px); }

/* Große Schrift ohne seitliches Wischen (Prüfung 20.11.2026 bei 320, 390 und 1024 Pixel Breite) */
.beispiele a, .gruppenliste > li, .gk-text, .marke-text, .vier-schritte li { min-width: 0; overflow-wrap: break-word; }
html[data-gross="an"] .buehne-start h1 { overflow-wrap: break-word; hyphens: auto; }
html[data-gross="an"] .beispiele { grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); }
@media (max-width: 1000px) {
  html[data-gross="an"] .buehne-start h1 { font-size: min(2.6rem, 9.5vw); }
}
@media (max-width: 30rem) {
  .vier-schritte .kein-umbruch, .gruppenkarte .kein-umbruch { white-space: normal; overflow-wrap: anywhere; }
  html[data-gross="an"] .marke-name { font-size: min(1.3rem, 6.5vw); }
  html[data-gross="an"] .gk-text { overflow-wrap: anywhere; }
}

/* Startseite: Leiste und Name untereinander, sobald nebeneinander kein Platz ist */
@media (min-width: 1001px) and (max-width: 1300px) {
  .start-buehne .kopf-innen { display: grid; gap: 12px; padding: 20px 20px 0; }
  .start-buehne .hilfen, .start-buehne .marke { position: static; }
  .start-buehne .hilfen { justify-self: start; }
  .start-buehne .marke { justify-self: end; }
}
@media (min-width: 1001px) and (max-width: 1600px) {
  html[data-gross="an"] .start-buehne .kopf-innen { display: grid; gap: 12px; padding: 20px 20px 0; }
  html[data-gross="an"] .start-buehne .hilfen, html[data-gross="an"] .start-buehne .marke { position: static; }
  html[data-gross="an"] .start-buehne .hilfen { justify-self: start; }
  html[data-gross="an"] .start-buehne .marke { justify-self: end; }
}

/* Zahnrad: Einstellungen zum Vorlesen (Helge 20.11.2026 19:25: „am Ende ein Zahnrad, so kann sich jemand die Hilfe individuell anpassen“) */
.einstellungen { display: inline-block; }
.einstellungen[open] { display: block; flex-basis: 100%; }
.einstellungen > summary { display: inline-flex; align-items: center; justify-content: center; min-width: 2.75rem; min-height: 2.5rem; padding: .35rem .6rem; list-style: none; color: #fff; border: 2px solid transparent; border-radius: 10px; cursor: pointer; }
.einstellungen > summary::-webkit-details-marker { display: none; }
.einstellungen > summary:hover { background: rgba(255, 255, 255, .18); }
.einstellungen[open] > summary { background: #fff; color: #061b4d; }
.einstellungen > summary .sym { width: 1.35rem; height: 1.35rem; }
.einstellungen-feld { display: grid; gap: .6rem; padding: .6rem .4rem .4rem; color: #fff; max-width: 34rem; }
.einst-zeile { display: grid; grid-template-columns: 8.5rem minmax(0, 1fr) 3.6rem; align-items: center; gap: .6rem; }
.einst-zeile label { font-weight: 700; }
.einst-zeile input[type="range"] { width: 100%; accent-color: #ffbf47; min-height: 2.75rem; }
.einst-zeile output { font-variant-numeric: tabular-nums; text-align: right; }
.einst-zeile select { grid-column: 2 / 4; min-height: 2.75rem; font: inherit; color: #1d2733; background: #fff; border-radius: .4rem; border: 0; padding: .2rem .4rem; max-width: 100%; }
.einst-farben { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .45rem; align-items: center; min-width: 0; }
.einst-farben legend { font-weight: 700; padding: 0; margin-bottom: .35rem; width: 100%; }
.farbfeld { position: relative; display: inline-block; width: 2.75rem; height: 2.75rem; border-radius: .4rem; border: 2px solid #fff; cursor: pointer; }
.farbfeld input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.farbfeld:has(input:checked) { box-shadow: 0 0 0 3px #ffbf47; }
.farbfeld:has(input:focus-visible) { outline: 3px solid #fff; outline-offset: 3px; }
.farbe-aus, .lupe-aus { background: linear-gradient(135deg, #fff 45%, #b3202f 45%, #b3202f 55%, #fff 55%); }
.farbe-gelb { background: #fff176; } .farbe-tuerkis { background: #80deea; } .farbe-blau { background: #bbdefb; } .farbe-gruen { background: #c5e1a5; } .farbe-rosa { background: #f8bbd0; }
.lupe-weiss { background: #fff; } .lupe-gelb { background: #ffeb3b; } .lupe-schwarz { background: #000; }
.einst-knoepfe { display: flex; flex-wrap: wrap; gap: .45rem; }
.start-buehne .hilfen .einstellungen[open] { grid-column: 1 / -1; }
@media (max-width: 30rem) { .einst-zeile { grid-template-columns: 1fr 3.6rem; } .einst-zeile label { grid-column: 1 / -1; } .einst-zeile select { grid-column: 1 / -1; } }

/* Hervorhebung des gerade gelesenen Abschnitts */
html[data-vorlesen-farbe="gelb"] .vorlesen-aktiv { background: #fff176 !important; color: #1d2733 !important; }
html[data-vorlesen-farbe="tuerkis"] .vorlesen-aktiv { background: #80deea !important; color: #1d2733 !important; }
html[data-vorlesen-farbe="blau"] .vorlesen-aktiv { background: #bbdefb !important; color: #1d2733 !important; }
html[data-vorlesen-farbe="gruen"] .vorlesen-aktiv { background: #c5e1a5 !important; color: #1d2733 !important; }
html[data-vorlesen-farbe="rosa"] .vorlesen-aktiv { background: #f8bbd0 !important; color: #1d2733 !important; }
html:not([data-vorlesen-farbe="aus"]) .vorlesen-aktiv { outline: 3px solid #1d2733; outline-offset: 2px; border-radius: 4px; }

/* Vergrößerung: der gelesene Text groß unten */
.vorlese-lupe { position: fixed; left: 50%; bottom: 84px; transform: translateX(-50%); z-index: 880; width: min(56rem, calc(100vw - 32px)); max-height: 34vh; overflow: auto; padding: .9rem 1.2rem; border-radius: 12px; border: 3px solid #1d2733; font-size: clamp(1.4rem, 1rem + 1.6vw, 2.2rem); line-height: 1.4; font-weight: 700; box-shadow: 0 10px 30px rgba(0, 0, 0, .4); }
.vorlese-lupe[hidden] { display: none; }
html[data-lupe="weiss"] .vorlese-lupe { background: #fff; color: #000; }
html[data-lupe="gelb"] .vorlese-lupe { background: #ffeb3b; color: #000; }
html[data-lupe="schwarz"] .vorlese-lupe { background: #000; color: #fff; border-color: #fff; }

/* Leiste beim Vorlesen: Pause · zurück · weiter · Zahnrad · beenden */
.vorlese-leiste { position: fixed; left: 16px; bottom: 16px; z-index: 890; display: flex; gap: .3rem; padding: .35rem; border-radius: 999px; background: #1d2733; box-shadow: 0 8px 24px rgba(0, 0, 0, .4); }
.vorlese-leiste[hidden] { display: none; }
.vorlese-leiste button { display: inline-grid; place-items: center; width: 48px; height: 48px; border: 2px solid transparent; border-radius: 50%; background: transparent; color: #fff; cursor: pointer; }
.vorlese-leiste button:hover { background: rgba(255, 255, 255, .15); }
.vorlese-leiste button:focus-visible { outline: 3px solid #ffbf47; outline-offset: 1px; }
.vorlese-leiste button[data-vl="pause"] { color: #ffbf47; }
.vorlese-leiste svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.vorlese-leiste svg .voll { fill: currentColor; stroke: none; }
html.js .vorlesen-stopp { display: none !important; }
@media print { .vorlese-leiste, .vorlese-lupe { display: none !important; } }
.einst-knoepfe button { border: 2px solid rgba(255, 255, 255, .75) !important; font-weight: 700; }
