/* Hilfeseite und gefuehrte Tour. Nur vorhandene Variablen (styles.css :root und
   html[data-theme="dark"]), keine festen Farben - hell und dunkel folgen daher
   automatisch der gewaehlten Palette. */

/* ---------- Hilfeseite ---------- */
.hilfe .panel{ scroll-margin-top: 12px; }
.hilfe p{ margin: 0 0 10px; line-height: 1.55; color: var(--ink-soft); font-size: var(--fs-3); }
.hilfe ul, .hilfe ol{ margin: 0 0 12px; padding-left: 1.3em; line-height: 1.5; color: var(--ink-soft); font-size: var(--fs-3); }
.hilfe li{ margin-bottom: 5px; }
.hilfe :focus{ outline: none; }
.hilfe :focus-visible{ outline: 2px solid var(--accent); outline-offset: 2px; }
.hilfe-intro .btn{ margin-top: 4px; }
.hilfe-verzeichnis ol{ list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 6px 14px; }
.hilfe-verzeichnis li{ margin: 0; }
.hilfe-sprung{
  font: inherit; font-size: var(--fs-2); text-align: left; width: 100%;
  background: none; border: 0; border-bottom: 1px solid var(--line);
  padding: 8px 2px; color: var(--accent-deep-text); cursor: pointer;
}
.hilfe-sprung:hover{ background: var(--bg-panel-2); }
.hilfe-hoch{ margin-top: 4px; }

/* ---------- Tour ---------- */
.tour-schild{ position: fixed; inset: 0; z-index: 10000; background: transparent; }
.tour-ausschnitt{
  position: fixed; z-index: 10001; pointer-events: none;
  border-radius: 6px;
  box-shadow: 0 0 0 9999px var(--backdrop);
  outline: 2px solid var(--accent);
  outline-offset: 0;
}
.tour-blase{
  position: fixed; z-index: 10002; box-sizing: border-box;
  max-width: calc(100vw - 16px);
  background: var(--bg-panel); color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  box-shadow: 0 8px 28px color-mix(in srgb, var(--ink) 35%, transparent);
  padding: 14px 16px 12px;
}
.tour-blase:focus{ outline: none; }
.tour-zaehler{ font-family: var(--mono); font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.tour-titel{ margin: 0 0 6px; font-size: 16px; color: var(--heading-accent); }
.tour-text{ margin: 0 0 12px; font-size: 14px; line-height: 1.5; color: var(--ink-soft); }
.tour-knoepfe{ display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tour-abstand{ flex: 1; }
.tour-knoepfe .btn:disabled{ opacity: .45; cursor: default; }
.tour-blase :focus-visible{ outline: 2px solid var(--accent); outline-offset: 2px; }

/* Pfeil: gedrehtes Quadrat auf der Kante, die zum Ziel zeigt. Links/oben
   wird per JS gesetzt (Mitte des Ziels), hier nur die Kante. */
.tour-pfeil{
  position: absolute; width: 12px; height: 12px; box-sizing: border-box;
  background: var(--bg-panel);
  border: 1px solid var(--line-strong);
  transform: translate(-50%, -50%) rotate(45deg);
  display: none;
}
.tour-blase[data-pfeil="oben"]  .tour-pfeil{ display: block; top: 0;    border-right: 0; border-bottom: 0; }
.tour-blase[data-pfeil="unten"] .tour-pfeil{ display: block; top: 100%; border-left: 0;  border-top: 0; }
.tour-blase[data-pfeil="links"] .tour-pfeil{ display: block; left: 0;   border-right: 0; border-top: 0; }
.tour-blase[data-pfeil="rechts"] .tour-pfeil{ display: block; left: 100%; border-left: 0; border-bottom: 0; }

/* Handy: Blase fest unten, volle Breite. */
@media (max-width: 480px){
  .tour-blase.tour-fest{
    left: 8px; right: 8px; top: auto; width: auto;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    max-height: 45vh; overflow-y: auto;
  }
  .tour-blase.tour-fest .tour-pfeil{ display: none; }
}
