/* Einstellungen – Premium-Umbau (PLAN 2.9 und 4) */
/* ============================================================
   EINSTELLUNGEN
   ============================================================ */
.es-inhalt { width: 100%; max-width: 760px; margin: 0 auto; padding: 0 18px 36px; display: flex; flex-direction: column; gap: 14px; }
.es-gruppe { padding: 14px 16px; }
.es-titel { margin: 2px 0 8px; padding-left: 0; font-size: var(--fs-ueber); font-weight: var(--gw-stark); letter-spacing: var(--lw-ueber);
  text-transform: uppercase; color: var(--text-2); }
.es-hilfe { margin: 0 0 12px; font-size: 14px; color: var(--text-2); }
.es-zeile { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px; min-height: 64px; padding: 6px 0;
  border-bottom: 1px solid var(--linie); }
.es-zeile:last-child { border-bottom: 0; }
.es-text { min-width: 0; cursor: pointer; }
.es-text b { display: block; font-size: 16px; font-weight: 750; }
.es-text span { display: block; font-size: 13px; color: var(--text-2); margin-top: 1px; }
.es-schalter { width: 68px; height: 48px; padding: 0; border: 0; background: none; display: grid; place-items: center; cursor: pointer; border-radius: 14px; }
.es-schalter i { position: relative; width: 54px; height: 32px; border-radius: 999px; background: var(--flaeche-3); border: 1px solid var(--linie-2);
  transition: background .2s ease, box-shadow .2s ease; }
.es-schalter i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #FFFFFF;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .25), 0 0 0 .5px rgba(0, 0, 0, .06); transition: transform .2s cubic-bezier(.2, .9, .3, 1.2), background .2s; }
.es-schalter[aria-checked="true"] i { background: var(--schalter-an); border-color: transparent; }
.es-schalter[aria-checked="true"] i::after { transform: translateX(22px); background: var(--knauf-an); }
.es-probe.knopf { min-height: 44px; padding: 0 14px; font-size: 14px; background: var(--flaeche-2); box-shadow: none; }
.es-probe.knopf svg { width: 16px; height: 16px; }
.es-probe.knopf:disabled { opacity: .38; cursor: default; }

.es-bretter { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.es-brett { display: flex; flex-direction: column; align-items: center; gap: 8px; min-height: 44px; padding: 10px 10px 8px; border-radius: 16px; cursor: pointer;
  background: var(--flaeche-2); border: 1.5px solid var(--linie); color: inherit; font: inherit; }
.es-brett[aria-checked="true"] { border-color: var(--text); background: var(--flaeche); box-shadow: inset 0 0 0 1px var(--text); }
.es-mini { display: grid; grid-template-columns: repeat(4, 1fr); width: 100%; max-width: 136px; aspect-ratio: 1; border-radius: 10px; overflow: hidden;
  box-shadow: var(--s2); }
.es-mini i { position: relative; display: block; }
.es-mini i.h { background: var(--feld-hell); }
.es-mini i.d { background: var(--feld-dunkel); }
.es-mini img { position: absolute; inset: 4%; width: 92%; height: 92%; filter: drop-shadow(0 1px 1px rgba(10, 12, 30, .3)); }
.es-brett-name { font-size: 15px; font-weight: 800; }
.es-brett[aria-checked="true"] .es-brett-name { color: var(--text); }

.es-segment { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; padding: 4px; border-radius: 16px; background: var(--grund-2); border: 1px solid var(--linie); }
.es-seg { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; min-height: 58px; padding: 4px; border: 0; border-radius: 12px;
  background: none; color: inherit; font: inherit; cursor: pointer; }
.es-seg b { font-size: 15px; font-weight: 800; }
.es-seg { color: var(--text-2); }
.es-seg span { font-size: 12px; color: var(--text-2); }
.es-seg[aria-checked="true"] { background: var(--flaeche); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .08), 0 2px 6px -1px rgba(0, 0, 0, .08), var(--kante); }
.es-seg[aria-checked="true"] b { color: var(--text); }

.es-rot-rand { border-color: var(--warn); color: var(--warn); }
.es-rot { background: var(--warn); border-color: var(--warn); color: #FFFFFF; box-shadow: none; }
.es-warnung { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; padding: 12px; border-radius: 12px;
  background: var(--gold-weich); border: 1px solid var(--gold); }
.es-warnung svg { width: 24px; height: 24px; flex: none; color: var(--text); }
.es-warnung p { margin: 0; font-size: 14px; color: var(--text); }
.es-warnung.stark { background: var(--warn-weich); border-color: var(--warn); }
.es-warnung.stark svg { color: var(--warn); }
.es-warnung.stark p { color: var(--text); }
.es-knoepfe { display: flex; flex-wrap: wrap; gap: 10px; }
.es-knoepfe .knopf, .es-reset > .knopf { white-space: normal; text-align: center; }

.es-info p { margin: 0 0 10px; font-size: 14px; color: var(--text-2); }
.es-info a { color: var(--akzent-text); text-decoration: underline; text-underline-offset: 2px; overflow-wrap: anywhere;
  /* Tippflaeche >= 44 px: Polster nur fuer den Finger, die Zeilenhoehe bleibt (Polster an inline-Elementen zaehlt nicht zur Zeile) */
  padding-block: 13px; }
.es-lizenzen { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.es-lizenzen li { display: flex; flex-direction: column; padding: 8px 10px; border-radius: 12px; background: var(--flaeche-2); border: 1px solid var(--linie); }
.es-lizenzen b { font-size: 14px; }
.es-lizenzen span { font-size: 13px; color: var(--text-2); }

/* ---------- Tester-Bericht (Luecken-Check 10): Eintrag in "Info und Lizenzen" und das Blatt (js/bericht.js) ---------- */
.es-bericht { margin: var(--a2) 0 var(--a4); padding: var(--a3); border-radius: var(--r-m); background: var(--flaeche-2); border: 1px solid var(--linie); }
.es-info .es-bericht p { margin: 0 0 var(--a3); }
.es-bericht .knopf { min-height: var(--tipp); white-space: normal; text-align: center; }
/* Hoehe: .sheet-karte steht unten mit margin-bottom 12px + safe-area-inset-bottom (css/bauteile.css). Beide Sicherheits-
   abstaende abziehen, sonst ragt das Blatt auf dem iPhone vom Home-Bildschirm (viewport-fit=cover) oben aus dem Bild. */
.sheet-karte.bericht-blatt { width: min(640px, calc(100% - 24px)); overflow-y: auto; text-align: left;
  max-height: calc(100vh - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  max-height: calc(100dvh - 24px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)); }
.bericht-text { margin: var(--a3) 0 0; padding: var(--a3); max-height: min(46vh, 460px); max-height: min(46dvh, 460px); overflow: auto; border-radius: var(--r-s);
  background: var(--flaeche-2); border: 1px solid var(--linie); color: var(--text); font-family: var(--schrift); font-size: var(--fs-klein);
  line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; -webkit-user-select: text; user-select: text; }
.bericht-text:focus-visible { outline: var(--fokus); outline-offset: 2px; }
.sheet-karte .bericht-status { min-height: 1.4em; margin: var(--a2) 0 0; color: var(--text-2); font-size: var(--fs-klein); }
.bericht-blatt .sheet-knoepfe .knopf { white-space: normal; }

@media (max-width: 520px) {
  .es-screen .kopf { height: 56px; padding: 0 10px; }
  .es-inhalt { padding: 0 10px 28px; gap: 12px; }
  .es-gruppe { padding: 12px; }
  .es-zeile { gap: 6px; }
  .es-probe.knopf { padding: 0 10px; }
  .es-bretter { gap: 8px; }
  .es-brett { padding: 8px 6px 6px; }
}

/* ---------- Weniger Bewegung ---------- */
@media (prefers-reduced-motion: reduce) {
  .an-screen *, .an-screen *::before, .an-screen *::after,
  .vl-screen *, .vl-screen *::before, .vl-screen *::after,
  .es-screen *, .es-screen *::before, .es-screen *::after {
    animation-duration: .01ms !important; animation-iteration-count: 1 !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
}


/* Zweispaltige iPad-Navigation; auf dem Handy bleibt nur der Inhalt. */
.es-layout { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 18px 36px; display: grid; grid-template-columns: 212px minmax(0, 1fr); gap: 18px; align-items: start; }
.es-layout .es-inhalt { width: auto; max-width: none; margin: 0; padding: 0; }
/* Menue (Flo 31.10.2026): jeder Bereich mit eigenem Zeichen, die Markierung folgt dem Scrollen (js baueNav), feiner Strich
   in der Akzentfarbe am aktiven Punkt; auf dem Handy eine Leiste zum Wischen oben */
.es-nav { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 2px; padding: 8px; border: 1px solid var(--linie);
  border-radius: var(--r-m); background: var(--flaeche); box-shadow: var(--s1); max-height: calc(100vh - 110px); max-height: calc(100dvh - 110px); overflow-y: auto; }
.es-nav-punkt { position: relative; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 10px; border: 0; border-radius: 12px;
  background: none; color: var(--text-2); font: inherit; font-weight: 700; text-align: left; cursor: pointer; }
.es-nav-zeichen { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--flaeche-2);
  border: 1px solid var(--linie); color: var(--text-2); }
.es-nav-zeichen svg { width: 17px; height: 17px; }
.es-nav-text { min-width: 0; line-height: 1.2; overflow-wrap: normal; hyphens: manual; }
.es-nav-punkt:hover, .es-nav-punkt:focus-visible { color: var(--text); background: var(--flaeche-2); }
.es-nav-punkt:focus-visible { outline: var(--fokus); outline-offset: 1px; }
.es-nav-punkt[aria-current="true"] { color: var(--text); background: var(--flaeche-2); }
.es-nav-punkt[aria-current="true"]::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 3px; background: var(--akzent); }
.es-nav-punkt[aria-current="true"] .es-nav-zeichen { color: var(--akzent); border-color: var(--akzent); }
.es-nav-pfeil { display: none; }
/* Zeile "Brett, Figuren und Klaenge": fuehrt in die Sammlung (dort wird gewaehlt, nicht mehr hier) */
.es-aussehen .knopf { flex: none; min-height: 44px; }
.es-inhalt .es-gruppe { scroll-margin-top: 96px; }
.es-block, .es-untergruppe { margin: 12px 0; }
.es-block h4, .es-untergruppe h4, .es-gruppe > h4 { margin: 14px 0 8px; font-size: 15px; }
.es-regler { display: block; padding: 12px 0; }
.es-regler > span { display: flex; justify-content: space-between; margin-bottom: 8px; }
.es-regler output { color: var(--text-2); font-variant-numeric: tabular-nums; }
.es-regler input { width: 100%; min-height: 44px; accent-color: var(--akzent); }
.es-tempo-vorschau { height: 54px; overflow: hidden; border-radius: 12px; background: var(--flaeche-2); }
.es-tempo-vorschau span { display: block; width: 44px; font-size: 36px; animation: es-springer calc(2s * var(--tempo, 1)) var(--gleiten) infinite alternate; }
@keyframes es-springer { to { transform: translateX(min(520px, calc(100vw - 120px))); } }
.es-coach-vorschau { margin-top: 14px; padding: 14px; border-left: 4px solid var(--akzent); border-radius: 12px; background: var(--flaeche-2); }
.es-coach-vorschau p { margin: 4px 0 0; color: var(--text-2); }
@media (max-width: 700px) {
  .es-layout { display: block; padding: 0 10px 28px; }
  .es-nav { position: sticky; top: 64px; z-index: 5; flex-direction: row; gap: 6px; margin: 0 0 10px; padding: 6px; max-height: none;
    overflow-x: auto; overflow-y: hidden; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .es-nav::-webkit-scrollbar { display: none; }
  .es-nav-punkt { flex: none; min-height: 44px; padding: 0 12px 0 6px; gap: 8px; border-radius: 999px; }
  .es-nav-text { white-space: nowrap; }
  .es-nav-zeichen { width: 28px; height: 28px; border-radius: 999px; }
  .es-nav-punkt[aria-current="true"]::before { left: 14px; right: 14px; top: auto; bottom: 2px; width: auto; height: 2px; }
  .es-inhalt .es-gruppe { scroll-margin-top: 128px; }
  .es-layout .es-inhalt { padding: 0; }
  /* Handy (Flo 31.10.2026, Bild vom Menue bei chess.com): erst die Liste der Bereiche, ein Tipp oeffnet den Bereich als
     eigene Seite mit seinem Namen im Kopf (js/ui/einstellungen.js wendeModusAn) */
  .es-screen.es-liste .es-inhalt { display: none; }
  .es-screen.es-liste .es-nav { position: static; flex-direction: column; gap: 0; margin: 4px 0 12px; padding: 4px 0; overflow: visible; }
  .es-screen.es-liste .es-nav-punkt { min-height: 56px; padding: 0 12px 0 14px; gap: 12px; border-radius: 0; color: var(--text); }
  .es-screen.es-liste .es-nav-punkt + .es-nav-punkt { box-shadow: inset 0 1px 0 var(--linie); }
  .es-screen.es-liste .es-nav-punkt::before { display: none; }
  .es-screen.es-liste .es-nav-text { flex: 1 1 auto; white-space: normal; font-size: 16px; }
  .es-screen.es-liste .es-nav-zeichen { width: 34px; height: 34px; border-radius: 10px; color: var(--akzent); }
  .es-screen.es-liste .es-nav-zeichen svg { width: 19px; height: 19px; }
  .es-screen.es-liste .es-nav-pfeil { display: grid; place-items: center; flex: none; color: var(--text-2); }
  .es-screen.es-liste .es-nav-pfeil svg { width: 18px; height: 18px; }
  .es-screen.es-seite .es-nav { display: none; }
  .es-screen.es-seite .es-inhalt .es-gruppe:not(.es-offen) { display: none; }
  .es-screen.es-seite .es-inhalt .es-gruppe.es-offen > h3:first-child { display: none; }
  .es-screen.es-seite .es-inhalt .es-gruppe.es-offen { margin-top: 4px; }
}

.konto-gruppe label { display: grid; gap: var(--abstand-1, .4rem); margin: var(--abstand-2, .75rem) 0; font-weight: 700; }
.konto-gruppe input { min-height: 44px; padding: .65rem .8rem; border: 1px solid var(--linie); border-radius: var(--radius-klein, 10px); background: var(--flaeche); color: var(--text); font: inherit; }
.konto-gruppe .konto-code { margin-top: .75rem; }
.konto-gruppe fieldset { border: 0; padding: 0; margin: 0 0 .75rem; }
.konto-gruppe legend { font-weight: 700; margin-bottom: .4rem; }
.konto-gruppe .konto-ziffern { display: flex; gap: .4rem; }
.konto-gruppe .konto-ziffern input { width: 2.6rem; padding-inline: .2rem; text-align: center; font-size: 1.25rem; }
.konto-gruppe .konto-status { font-size: .9rem; }
.konto-gruppe .konto-status[data-fehler="ja"] { color: var(--gefahr, #a32626); }

