/* ==========================================================================
   fach18.css — Browser-Hilfe zu „Die Geige aus Fach 18“ (Fallfeder).
   Zuerst fürs Handy (390 px), ruhig und gut lesbar; Markenfarben aus MARKE.md.
   Schriften lokal aus ../engine/schriften/ (keine fremden Server).
   ========================================================================== */
:root {
  --tinte: #1f2a44; --nacht: #16203a; --papier: #fbf7ef; --gold: #c18a2e; --goldhell: #f0d9a0; --rot: #a8412f; --gruen: #2f5d50; --grau: #5d6270; --linie: #d9cfbb; --weiss: #fffdf8;
  --lese: "Literata", Georgia, serif; --ui: "Nunito Sans", system-ui, sans-serif; --titel: "Playfair Display", Georgia, serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--papier); color: var(--tinte); font-family: var(--lese); font-size: 1.09rem; line-height: 1.55; }
button, input, select { font: inherit; color: inherit; }
a { color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
h1:focus, .f18-meldung:focus, .f18-erfolg:focus { outline: none; }
.f18-notfall { padding: 24px; }

/* ---------- Start ---------- */
.f18-start { max-width: 720px; margin: 0 auto; }
.f18-start__bild { display: block; width: 100%; height: 34vh; min-height: 180px; max-height: 320px; object-fit: cover; object-position: 50% 62%; }
.f18-start__text { padding: 20px 20px 32px; }
.f18-dach { margin: 0 0 6px; font-family: var(--ui); font-weight: 800; font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--grau); }
.f18-h1 { margin: 0 0 12px; font-family: var(--titel); font-weight: 700; font-size: 1.7rem; line-height: 1.18; }
.f18-h1--titel { font-size: 2.05rem; }
.f18-h1--klein { font-size: 1.4rem; margin-top: 8px; }
.f18-h2 { margin: 26px 0 8px; font-family: var(--ui); font-weight: 800; font-size: 1.02rem; letter-spacing: .04em; text-transform: uppercase; color: var(--grau); }
.f18-frage { margin: 0 0 14px; font-size: 1.12rem; }
.f18-klein { margin: 0 0 12px; font-family: var(--ui); font-size: .92rem; line-height: 1.45; color: var(--grau); }
.f18-karte { margin: 18px 0 16px; padding: 18px 16px; background: var(--weiss); border: 1px solid var(--linie); border-radius: 10px; }
.f18-fehler { margin: 12px 0 0; font-family: var(--ui); font-weight: 700; color: var(--rot); }
.f18-fehler:empty { display: none; }
.f18-recht { margin: 18px 0 0; font-family: var(--ui); font-size: .9rem; color: var(--grau); }
.f18-recht a { text-underline-offset: 3px; }

/* ---------- Eingaben und Knöpfe ---------- */
.f18-eingabe { display: block; width: 100%; min-height: 48px; padding: 10px 12px; font-family: var(--ui); font-size: 1.06rem; background: #fff; border: 1.5px solid #8b8f9c; border-radius: 8px; }
.f18-eingabe--code { font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
select.f18-eingabe { -webkit-appearance: none; appearance: none; padding-right: 40px; background-repeat: no-repeat; background-position: right 14px center; background-size: 14px 9px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%231f2a44' stroke-width='2'/%3E%3C/svg%3E"); }
.f18-feld--zeit .f18-eingabe, .f18-feld--kennung .f18-eingabe, .f18-feld--zahl .f18-eingabe { max-width: 14em; }
.f18-knopf { display: inline-block; min-height: 48px; padding: 10px 18px; font-family: var(--ui); font-weight: 800; font-size: 1rem; line-height: 1.25; background: var(--weiss); color: var(--tinte); border: 1.5px solid var(--tinte); border-radius: 999px; cursor: pointer; }
.f18-knopf--haupt { background: var(--nacht); color: #fff; border-color: var(--nacht); }
.f18-knopf--breit { display: block; width: 100%; margin-top: 14px; }
.f18-knopf--klein { min-height: 44px; font-size: .9rem; font-weight: 700; padding: 8px 14px; }
.f18-knopf:disabled { opacity: .6; cursor: default; }
.f18-link { background: none; border: 0; padding: 10px 0; font-family: var(--ui); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 44px; }

/* ---------- Rahmen nach dem Öffnen ---------- */
.f18-kopf { display: flex; gap: 10px; align-items: baseline; padding: 12px 20px; background: var(--nacht); color: #fff; }
.f18-kopf__marke { font-family: var(--ui); font-weight: 800; font-size: .78rem; letter-spacing: .16em; text-transform: uppercase; color: var(--goldhell); }
.f18-kopf__titel { font-family: var(--titel); font-weight: 700; font-size: 1.05rem; }
.f18-nav { display: flex; gap: 8px; padding: 10px 20px; background: #efe8d8; border-bottom: 1px solid var(--linie); position: sticky; top: 0; z-index: 2; }
.f18-nav__knopf { flex: 1 1 0; min-height: 52px; padding: 4px 2px; display: flex; flex-direction: column; align-items: center; justify-content: center; font-family: var(--ui); background: var(--weiss); border: 1.5px solid #b9ae95; border-radius: 10px; cursor: pointer; line-height: 1.1; }
.f18-nav__nr { font-weight: 900; font-size: 1.25rem; }
.f18-nav__wort { font-size: .72rem; font-weight: 700; color: var(--grau); }
.f18-nav__knopf.ist-aktiv { background: var(--nacht); border-color: var(--nacht); color: #fff; }
.f18-nav__knopf.ist-aktiv .f18-nav__wort { color: var(--goldhell); }
.f18-nav__knopf.ist-geloest .f18-nav__nr::after { content: " ✓"; font-size: .9rem; }
.f18-inhalt, .f18-fuss { max-width: 720px; margin: 0 auto; padding: 22px 20px 8px; }
.f18-fuss { padding-top: 26px; padding-bottom: 40px; border-top: 1px solid var(--linie); margin-top: 28px; }
.f18-fuss__knoepfe { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Kapitel ---------- */
.f18-schritt { margin: 26px 0 0; padding: 12px 14px; font-family: var(--ui); font-weight: 700; background: #efe8d8; border-left: 5px solid var(--gold); border-radius: 0 8px 8px 0; }
.f18-stufenblock + .f18-stufenblock { margin-top: 10px; padding-top: 4px; border-top: 2px solid var(--linie); }
.f18-hilfe { margin: 0 0 16px; padding: 14px 14px 6px; background: var(--weiss); border: 1px solid var(--linie); border-radius: 10px; }
.f18-hilfe__titel { margin: 0 0 2px; font-family: var(--titel); font-weight: 700; font-size: 1.14rem; line-height: 1.25; }
.f18-hilfe__kennung { margin: 0 0 8px; font-family: var(--ui); font-size: .82rem; font-weight: 700; color: var(--grau); }
.f18-stufe { margin: 0 0 8px; border: 1.5px solid #b9ae95; border-radius: 8px; background: #fff; }
.f18-stufe__kopf { min-height: 48px; padding: 12px 14px; font-family: var(--ui); font-weight: 800; cursor: pointer; }
.f18-stufe[open] .f18-stufe__kopf { border-bottom: 1px solid var(--linie); }
.f18-stufe__text { margin: 0; padding: 12px 14px 14px; }
.f18-gruppe { margin: 0 0 16px; padding: 12px 14px 4px; min-width: 0; background: var(--weiss); border: 1px solid var(--linie); border-radius: 10px; }
.f18-gruppe.ist-offen { border: 2px solid var(--rot); }
.f18-gruppe__titel { padding: 0 6px; font-family: var(--ui); font-weight: 800; font-size: 1rem; }
.f18-feld { margin: 0 0 14px; padding: 0; border: 0; min-width: 0; }
.f18-feld__name { display: block; margin: 0 0 6px; padding: 0; font-family: var(--ui); font-weight: 700; font-size: .98rem; line-height: 1.35; }
.f18-feld.ist-offen .f18-eingabe, .f18-feld.ist-offen .f18-wahl { outline: 2px solid var(--rot); outline-offset: 2px; border-radius: 8px; }
.f18-feld__fehler { margin: 6px 0 0; font-family: var(--ui); font-size: .92rem; font-weight: 700; color: var(--rot); }
.f18-wahl { display: grid; gap: 8px; }
.f18-wahl__option { display: flex; gap: 10px; align-items: flex-start; min-height: 48px; padding: 11px 12px; font-family: var(--ui); font-size: 1rem; line-height: 1.35; background: #fff; border: 1.5px solid #8b8f9c; border-radius: 8px; cursor: pointer; }
.f18-wahl__kasten { flex: none; width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--nacht); }
.f18-wahl__option:has(:checked) { border-color: var(--nacht); background: #eef1f7; font-weight: 700; }
.f18-feld--marken .f18-wahl { grid-template-columns: repeat(auto-fill, minmax(74px, 1fr)); }
.f18-feld--marken .f18-wahl__option { align-items: center; padding: 8px 8px; gap: 6px; font-weight: 700; }
.f18-pruefung { margin: 6px 0 0; }
.f18-meldung:not(:empty) { margin: 16px 0 0; padding: 14px 16px; background: #fbeeea; border: 1.5px solid var(--rot); border-radius: 10px; font-family: var(--ui); }
.f18-meldung__kopf { margin: 0 0 6px; font-weight: 800; }
.f18-meldung__liste { margin: 0; padding-left: 20px; }
.f18-meldung__liste li { margin: 0 0 8px; }
.f18-erfolg { margin: 22px 0 0; padding: 16px; background: #e9f2ee; border: 1.5px solid var(--gruen); border-radius: 10px; }
.f18-erfolg__text { margin: 0 0 10px; font-family: var(--ui); font-weight: 700; }
.f18-aufloesen { margin: 26px 0 0; text-align: center; }

/* ---------- Auflösung ---------- */
.f18-loesung__seite { margin: 0 0 30px; padding: 0 0 8px; border-bottom: 1px solid var(--linie); }
.f18-text p { margin: 0 0 12px; }
.f18-text h3 { margin: 20px 0 8px; font-family: var(--ui); font-weight: 800; font-size: 1.04rem; }
.f18-tabelle { margin: 0 0 14px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.f18-tabelle table { width: 100%; border-collapse: collapse; font-family: var(--ui); font-size: .95rem; line-height: 1.35; }
.f18-tabelle th { text-align: left; vertical-align: bottom; padding: 8px 8px; border-bottom: 2px solid var(--tinte); font-weight: 800; }
.f18-tabelle td { vertical-align: top; padding: 8px 8px; border-bottom: 1px solid var(--linie); }

/* ---------- Rückfrage ---------- */
.f18-dialog { position: fixed; inset: 0; z-index: 10; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(16, 22, 40, .62); }
.f18-dialog__blatt { width: 100%; max-width: 440px; padding: 22px 20px 18px; background: var(--weiss); border-radius: 14px; box-shadow: 0 12px 40px rgba(0, 0, 0, .35); }
.f18-dialog__text { margin: 0 0 16px; font-size: 1.06rem; }
.f18-dialog__knoepfe { display: grid; gap: 10px; }

@media (min-width: 620px) {
  .f18-h1--titel { font-size: 2.5rem; }
  .f18-start__bild { border-radius: 0 0 14px 14px; }
  .f18-dialog__knoepfe { grid-template-columns: 1fr 1fr; }
  .f18-nav { justify-content: center; }
  .f18-nav__knopf { max-width: 150px; }
}
@media (prefers-reduced-motion: no-preference) { .f18-knopf, .f18-wahl__option { transition: background-color .12s, border-color .12s; } }
/* Vorspann-Film (seit 25.10.2026): kleine Zeile über Kapitel 1 und auf der Startseite */
.f18-einstimmen { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin: 0 0 18px; }
.f18-einstimmen .f18-klein { margin: 0; }
.f18-start__text .f18-einstimmen { margin-top: 14px; }
@media print { .f18-einstimmen { display: none !important; } }
@media print { .f18-nav, .f18-fuss, .f18-aufloesen, .f18-knopf { display: none !important; } body { background: #fff; } }
