/* =========================================================================
   Lesehilfe — Vorderseite
   Selbst gehostet, keine fremden Verbindungen, keine Schriftdateien von
   außen. Alles, was hier steht, kommt vom eigenen Server.
   ========================================================================= */

:root{
  --zlh-grund:#16281F;
  --zlh-akzent:#C99A44;
  --zlh-abstand:18px;
}

/* --- Knopf --------------------------------------------------------- */
#zlh-knopf{
  position:fixed;z-index:99000;
  width:48px;height:48px;border-radius:50%;border:none;cursor:pointer;
  background:var(--zlh-grund);color:#fff;
  box-shadow:0 6px 22px -8px rgba(0,0,0,.55),0 0 0 1px rgba(255,255,255,.14);
  display:flex;align-items:center;justify-content:center;
  font:600 17px/1 system-ui,-apple-system,"Segoe UI",sans-serif;
  letter-spacing:.01em;padding:0;margin:0;
  transition:transform .18s ease,box-shadow .18s ease;
}
#zlh-knopf:hover{transform:translateY(-2px)}
#zlh-knopf:focus-visible{outline:3px solid var(--zlh-akzent);outline-offset:3px}
#zlh-knopf[data-ecke="unten-rechts"]{right:var(--zlh-abstand);bottom:var(--zlh-abstand)}
#zlh-knopf[data-ecke="unten-links"]{left:var(--zlh-abstand);bottom:var(--zlh-abstand)}
#zlh-knopf[data-ecke="oben-rechts"]{right:var(--zlh-abstand);top:var(--zlh-abstand)}
#zlh-knopf[data-ecke="oben-links"]{left:var(--zlh-abstand);top:var(--zlh-abstand)}

/* --- Feld ---------------------------------------------------------- */
#zlh-feld{
  position:fixed;z-index:99001;display:none;
  width:min(300px,calc(100vw - 2 * var(--zlh-abstand)));
  background:#fff;color:#1d1d1d;border-radius:6px;
  box-shadow:0 30px 70px -28px rgba(0,0,0,.5),0 0 0 1px rgba(0,0,0,.12);
  padding:18px 18px 12px;
  font:15px/1.5 system-ui,-apple-system,"Segoe UI",sans-serif;
  box-sizing:border-box;
}
#zlh-feld *{box-sizing:border-box}
#zlh-feld[data-offen="ja"]{display:block}
#zlh-feld[data-ecke="unten-rechts"]{right:var(--zlh-abstand);bottom:calc(var(--zlh-abstand) + 58px)}
#zlh-feld[data-ecke="unten-links"]{left:var(--zlh-abstand);bottom:calc(var(--zlh-abstand) + 58px)}
#zlh-feld[data-ecke="oben-rechts"]{right:var(--zlh-abstand);top:calc(var(--zlh-abstand) + 58px)}
#zlh-feld[data-ecke="oben-links"]{left:var(--zlh-abstand);top:calc(var(--zlh-abstand) + 58px)}

#zlh-feld h2{font:600 17px/1.3 inherit;margin:0 0 3px;color:#1d1d1d;padding:0}
#zlh-feld .zlh-hinweis{font-size:12.5px;color:#5a5a5a;margin:0 0 14px;line-height:1.45}
#zlh-feld fieldset{border:none;margin:0 0 12px;padding:0;min-width:0}
#zlh-feld legend{
  font:600 10.5px/1 inherit;letter-spacing:.14em;text-transform:uppercase;
  color:#6a6a6a;padding:0;margin:0 0 7px;
}
#zlh-feld .zlh-reihe{display:flex;gap:6px}
#zlh-feld .zlh-reihe button{
  flex:1;min-height:40px;padding:9px 4px;cursor:pointer;
  border:1px solid rgba(0,0,0,.22);background:#fff;color:#1d1d1d;
  border-radius:3px;font:13.5px/1.2 inherit;
  transition:background .15s,border-color .15s;
}
#zlh-feld .zlh-reihe button[aria-pressed="true"]{
  background:var(--zlh-akzent);border-color:var(--zlh-akzent);
  color:#1a1a1a;font-weight:600;
}
#zlh-feld .zlh-schalter{
  display:flex;align-items:center;gap:10px;width:100%;min-height:42px;
  border:none;background:none;cursor:pointer;padding:9px 0;margin:0;
  font:14.5px/1.3 inherit;color:#1d1d1d;text-align:left;
}
#zlh-feld .zlh-kaestchen{
  flex:none;width:20px;height:20px;border:1.5px solid rgba(0,0,0,.34);
  border-radius:3px;display:flex;align-items:center;justify-content:center;
  font-size:13px;color:#1a1a1a;line-height:1;
}
#zlh-feld .zlh-schalter[aria-pressed="true"] .zlh-kaestchen{
  background:var(--zlh-akzent);border-color:var(--zlh-akzent);
}
#zlh-feld .zlh-zurueck{
  width:100%;min-height:40px;margin-top:4px;padding:12px 0 8px;
  border:none;border-top:1px solid rgba(0,0,0,.12);background:none;
  cursor:pointer;text-align:left;font:13px/1.3 inherit;color:#5a5a5a;
}
#zlh-feld .zlh-zurueck:hover{color:#1d1d1d}
#zlh-feld button:focus-visible{outline:3px solid var(--zlh-akzent);outline-offset:2px}

/* --- Wirkung auf die Seite ------------------------------------------ */

/* Mehr Kontrast: Fliesstext dunkler, gedaempfte Toene zurueckgeholt.
   Bewusst nur Farbe, keine Umkehrung - ein Negativmodus zerstoert auf
   fremden Themes mehr, als er hilft. */
body.zlh-kontrast :is(p,li,dd,dt,blockquote,figcaption,td,th,
  .entry-content,.wp-block-post-content){color:#101010}
body.zlh-kontrast :is(main,article,.entry-content) a:not([class*="button"]):not([class*="btn"]){
  color:#0b3d91}

/* Bewegung anhalten */
body.zlh-ruhe *,
body.zlh-ruhe *::before,
body.zlh-ruhe *::after{
  animation-duration:0s !important;animation-delay:0s !important;
  animation-iteration-count:1 !important;
  transition-duration:0s !important;transition-delay:0s !important;
  scroll-behavior:auto !important;
}
body.zlh-ruhe video[autoplay]{display:revert}

/* Verweise unterstreichen */
body.zlh-unterstrichen :is(main,article,.entry-content,.wp-block-post-content) a{
  text-decoration:underline;text-underline-offset:3px;text-decoration-thickness:1px;
}

/* Im Ausdruck hat beides nichts verloren. */
@media print{#zlh-knopf,#zlh-feld{display:none !important}}

@media (max-width:520px){
  #zlh-knopf{width:44px;height:44px;font-size:16px}
  #zlh-feld{width:calc(100vw - 2 * var(--zlh-abstand))}
}

/* Wer im Betriebssystem "Bewegung reduzieren" eingestellt hat, bekommt
   auch hier keine. */
@media (prefers-reduced-motion:reduce){
  #zlh-knopf{transition:none}
  #zlh-knopf:hover{transform:none}
}
