/* Hilfe-Bot (hilfe.js): Knopf, Sprechblase und Panel unten rechts, auf /hilfe/ groß und offen.
   Nur Grundwerte aus basis.css (Hell/Dunkel kommt von dort); eigener Präfix .wlh-, damit nichts mit start.css kollidiert. */
.wlh{font-family:var(--f-ui);font-size:var(--t-m);line-height:1.45;color:var(--ink)}
.wlh *,.wlh *::before,.wlh *::after{box-sizing:border-box}
.wlh svg{flex:none;display:block}
.wlh button{cursor:pointer}
.wlh :focus-visible{outline:3px solid var(--accent);outline-offset:2px}

/* ---------- Knopf, Blase, Panel (schwebend) ---------- */
.wlh:not(.wlh-gross){position:fixed;right:max(16px,env(safe-area-inset-right));bottom:max(16px,env(safe-area-inset-bottom));z-index:2000;pointer-events:none}
.wlh:not(.wlh-gross) > *{pointer-events:auto}
.wlh-knopf{position:relative;display:grid;place-items:center;width:56px;height:56px;margin-left:auto;border:0;border-radius:50%;background:var(--accent);color:var(--on-accent);box-shadow:0 6px 18px rgba(0,0,0,.28)}
.wlh-knopf svg{width:28px;height:28px}
.wlh-knopf:hover{background:var(--accent-2)}
.wlh-knopf:focus-visible{outline-color:var(--ink);outline-offset:3px}

/* Aus = unsichtbar und nicht erreichbar (visibility), damit nichts im Tab-Weg oder bei Vorleseprogrammen hängt */
.wlh-blase,.wlh-panel{visibility:hidden;opacity:0;transform:translateY(8px);transition:opacity .25s ease,transform .25s ease,visibility 0s linear .25s}
.wlh-blase.wlh-an,.wlh-panel.wlh-an{visibility:visible;opacity:1;transform:none;transition:opacity .25s ease,transform .25s ease}

.wlh-blase{position:absolute;right:0;bottom:68px;width:max-content;max-width:min(260px,calc(100vw - 32px));padding:12px 40px 12px 14px;background:var(--surface);color:var(--ink);border:1px solid var(--line-strong);border-radius:14px 14px 4px 14px;box-shadow:var(--schatten);font-size:var(--t-s)}
.wlh-blase b,.wlh-zusatz{display:block}
.wlh-blase b{font-size:var(--t-m)}
.wlh-blase .wlh-zu{position:absolute;right:2px;top:2px}
.wlh-ja{display:flex;align-items:center;min-height:44px;margin-top:6px;padding:6px 14px;border:0;border-radius:var(--r-m);background:var(--accent);color:var(--on-accent);font-weight:700}
.wlh-ja:hover{background:var(--accent-2)}

/* Schließen-Knopf: 44 px Tippfläche */
.wlh-zu{display:grid;place-items:center;width:44px;height:44px;border:0;border-radius:var(--r-m);background:none;color:var(--ink-2)}
.wlh-zu:hover{background:var(--surface-2)}
.wlh-zu svg{width:20px;height:20px}

.wlh-panel{position:absolute;right:0;bottom:68px;display:flex;flex-direction:column;width:min(400px,calc(100vw - 32px));max-height:min(640px,calc(100vh - 110px));background:var(--surface);color:var(--ink);border:1px solid var(--line-strong);border-radius:var(--r-l);box-shadow:0 18px 50px rgba(0,0,0,.3);overflow:hidden}

/* ---------- Kopf, Suche, Rumpf, Fuß ---------- */
.wlh-kopf{display:flex;align-items:center;gap:10px;padding:8px 6px 8px 14px;border-bottom:1px solid var(--line)}
.wlh-ava{display:grid;place-items:center;flex:none;width:34px;height:34px;border-radius:50%;background:var(--accent);color:var(--on-accent)}
.wlh-ava svg{width:20px;height:20px}
.wlh-kopftext{min-width:0;margin-right:auto;line-height:1.2}
.wlh-kopftext b{display:block;font-size:var(--t-m)}
.wlh-kopftext small{font-size:var(--t-xs);color:var(--muted)}
.wlh-suche{padding:10px 12px 0}
.wlh-suche label{display:flex;align-items:center;gap:8px;min-height:44px;padding:0 10px;background:var(--surface-2);border:1.5px solid var(--line-strong);border-radius:var(--r-m);color:var(--muted)}
.wlh-suche label:focus-within{border-color:var(--accent);outline:3px solid var(--accent-wash)}
.wlh-suche svg{width:18px;height:18px}
.wlh input.wlh-feld{flex:1;width:auto;min-width:0;min-height:40px;padding:0;border:0;border-radius:0;background:none;color:var(--ink);font-weight:500;outline:none}
.wlh input.wlh-feld:focus{border:0;outline:none}
.wlh-rumpf{display:grid;gap:10px;align-content:start;padding:12px;overflow-y:auto;overscroll-behavior:contain;min-height:0}
.wlh-fuss{padding:8px 14px 10px;border-top:1px solid var(--line);font-size:var(--t-xs);line-height:1.4;color:var(--muted)}
.wlh-fuss a{color:var(--muted);text-decoration:underline}
.wlh-status{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}

/* ---------- Ansichten ---------- */
.wlh-sprech{font-weight:700;font-size:var(--t-l);line-height:1.25}
.wlh-leer{color:var(--ink-2)}
.wlh-kacheln{display:grid;grid-template-columns:repeat(auto-fill,minmax(110px,1fr));gap:8px}
.wlh-kacheln.wlh-gross2{grid-template-columns:minmax(0,1fr)}
.wlh-kachel{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;min-height:44px;padding:12px 8px;border:1.5px solid var(--line-strong);border-radius:var(--r-m);background:var(--surface);color:var(--ink);font-weight:700;font-size:var(--t-s);text-align:center}
.wlh-gross2 .wlh-kachel{flex-direction:row;justify-content:flex-start;gap:12px;padding:14px;font-size:var(--t-m);text-align:left}
.wlh-kachel:hover{border-color:var(--accent);background:var(--accent-wash)}
.wlh-ic{display:grid;place-items:center;flex:none;width:40px;height:40px;border-radius:var(--r-m);background:var(--accent-wash);color:var(--accent)}
.wlh-ic svg{width:22px;height:22px}
.wlh-fragen{display:grid;gap:8px}
.wlh-frage{display:flex;align-items:center;gap:10px;min-height:48px;padding:8px 12px;border:1.5px solid var(--line-strong);border-radius:var(--r-m);background:var(--surface);color:var(--ink);font-weight:650;font-size:var(--t-s);text-align:left}
.wlh-frage:hover{border-color:var(--accent);background:var(--accent-wash)}
.wlh-frage .wlh-ic{width:32px;height:32px;border-radius:var(--r-s)}
.wlh-frage .wlh-ic svg{width:18px;height:18px}
.wlh-frage > span:nth-of-type(2){flex:1;min-width:0}
.wlh-frage > svg{width:16px;height:16px;color:var(--accent)}
.wlh-zurueck{display:inline-flex;align-items:center;gap:6px;justify-self:start;min-height:44px;padding:0 10px 0 6px;border:0;border-radius:var(--r-m);background:none;color:var(--accent);font-weight:700}
.wlh-zurueck:hover{background:var(--accent-wash)}
.wlh-zurueck svg{width:18px;height:18px}

.wlh-antwort{display:grid;gap:10px}
.wlh-atitel{font-size:var(--t-l);line-height:1.25}
.wlh-atitel:focus{outline:none}
.wlh-kern{display:flex;align-items:center;gap:12px;padding:14px;border-radius:var(--r-m);background:var(--accent);color:var(--on-accent)}
.wlh-kern .wlh-ic{width:42px;height:42px;background:color-mix(in srgb,var(--on-accent) 20%,transparent);color:var(--on-accent)}
.wlh-kern .wlh-ic svg{width:24px;height:24px}
.wlh-kern b{font-size:var(--t-l);line-height:1.25}
.wlh-schritte{display:grid;gap:6px;margin:0;padding:0;list-style:none}
.wlh-schritte li{display:flex;align-items:flex-start;gap:10px;padding:9px 10px;border-radius:var(--r-m);background:var(--surface-2);font-size:var(--t-s)}
.wlh-schritte .wlh-ic{width:30px;height:30px;border-radius:var(--r-s);background:var(--surface)}
.wlh-schritte .wlh-ic svg{width:17px;height:17px}
.wlh-schritte li > span:last-child{padding-top:4px}
.wlh-antwort details{font-size:var(--t-s);color:var(--ink-2)}
.wlh-antwort summary{display:flex;align-items:center;min-height:44px;color:var(--accent);font-weight:700;cursor:pointer}
.wlh-antwort details p{padding:10px 12px;border-radius:var(--r-m);background:var(--surface-2);line-height:1.55}
.wlh-text{font-size:var(--t-m);line-height:1.6;color:var(--ink)}
.wlh-aktionen{display:flex;flex-wrap:wrap;gap:8px}
.wlh-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:8px 16px;border:1.5px solid var(--accent);border-radius:var(--r-m);font-weight:700;font-size:var(--t-s);text-align:left;text-decoration:none}
.wlh-btn svg{width:18px;height:18px}
.wlh-btn small{display:block;font-size:var(--t-xs);font-weight:500;opacity:.9}
.wlh-prim{background:var(--accent);color:var(--on-accent)}
.wlh-prim:hover{background:var(--accent-2);border-color:var(--accent-2)}
.wlh-zweit{background:var(--surface);color:var(--accent)}
.wlh-zweit:hover{background:var(--accent-wash)}
a.wlh-link{width:100%}

/* Ziel, auf das „Zeig mir“ hinweist (liegt in der Seite, nicht im Bauteil) */
.wlh-leuchtet{outline:4px solid var(--accent);outline-offset:6px;border-radius:var(--r-s);transition:outline-color .3s}

/* ---------- /hilfe/: groß und offen ---------- */
.wlh-gross .wlh-panel{position:static;visibility:visible;opacity:1;transform:none;width:100%;max-width:760px;max-height:none;margin-inline:auto;box-shadow:var(--schatten)}
.wlh-gross .wlh-rumpf{padding:20px;gap:14px;overflow:visible}
.wlh-gross .wlh-kopf{padding:14px 20px}
.wlh-gross .wlh-suche{padding:14px 20px 0}
.wlh-gross .wlh-sprech,.wlh-gross .wlh-atitel{font-size:1.35rem}
.wlh-gross .wlh-kacheln{grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:12px}
.wlh-gross .wlh-kacheln.wlh-gross2{grid-template-columns:repeat(2,minmax(0,1fr))}
.wlh-gross .wlh-kachel{min-height:96px;padding:18px 12px;font-size:var(--t-m)}
.wlh-gross .wlh-gross2 .wlh-kachel{min-height:110px;font-size:var(--t-l);padding:20px}
.wlh-gross .wlh-ic{width:52px;height:52px}
.wlh-gross .wlh-ic svg{width:28px;height:28px}
.wlh-gross .wlh-frage{min-height:56px;font-size:var(--t-m)}
.wlh-gross .wlh-frage .wlh-ic{width:36px;height:36px}
.wlh-gross .wlh-fuss{padding:12px 20px 14px;font-size:var(--t-s)}
@media (max-width:600px){
  .wlh-gross .wlh-kacheln.wlh-gross2{grid-template-columns:minmax(0,1fr)}
  .wlh-gross .wlh-rumpf,.wlh-gross .wlh-kopf,.wlh-gross .wlh-suche{padding-inline:12px}
}

/* ---------- Handy: kurze Blase, Panel als Bottom-Sheet ---------- */
@media (max-width:600px){
  .wlh:not(.wlh-gross){right:max(12px,env(safe-area-inset-right));bottom:max(12px,env(safe-area-inset-bottom))}
  .wlh-zusatz,.wlh-ja{display:none}
  /* Das Sheet liegt auf dem Knopf; geschlossen wird mit dem X oder Esc */
  .wlh-knopf[aria-expanded="true"]{visibility:hidden}
  .wlh-blase{max-width:calc(100vw - 24px)}
  .wlh-panel{position:fixed;left:0;right:0;bottom:0;width:auto;max-width:none;max-height:80vh;border-radius:var(--r-l) var(--r-l) 0 0;border-bottom:0;padding-bottom:env(safe-area-inset-bottom)}
  .wlh-gross .wlh-panel{position:static;max-height:none;border-radius:var(--r-l);border-bottom:1px solid var(--line-strong)}
}
@supports (height:80dvh){@media (max-width:600px){.wlh-panel{max-height:80dvh}.wlh-gross .wlh-panel{max-height:none}}}

@media (prefers-reduced-motion:reduce){
  .wlh *,.wlh-blase,.wlh-panel,.wlh-leuchtet{transition:none!important;animation:none!important}
}
