/* ============================================================
   Sagen-Werkstatt – Gestaltung (Schreibwerkstatt, Pergament)
   ============================================================ */
:root {
  --rot: #8a2f1d;
  --rot-dunkel: #6b2212;
  --gold: #c9962b;
  --gold-hell: #f6e7c1;
  --pergament: #fbf5e6;
  --hintergrund: #f3ead3;
  --flaeche: #fffdf6;
  --tinte: #2b2119;
  --grau: #6b5e52;
  --linie: #e2d5b5;
  --ok: #2f7d3e;
  --ok-hell: #e3f2e1;
  --warn: #b5590d;
  --warn-hell: #fbeedd;
  --fehler: #b3261e;
  --info: #2c5d8f;
  --info-hell: #e4eef8;
  --oe: #8a2f1d;      /* österreichische Sagen */
  --gr: #2c5d8f;      /* griechische Sagen */
  --radius: 14px;
  --schatten: 0 1px 3px rgba(80, 50, 20, .10), 0 6px 18px rgba(80, 50, 20, .10);
  --schrift: 'Atkinson Hyperlegible', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  font-family: var(--schrift); font-size: 17px; line-height: 1.5; color: var(--tinte);
  background: var(--hintergrund);
  background-image: radial-gradient(circle at 0 0, rgba(201, 150, 43, .18), transparent 35%),
                    radial-gradient(circle at 100% 30%, rgba(138, 47, 29, .08), transparent 40%);
  background-attachment: fixed;
  min-height: 100vh; display: flex; flex-direction: column;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; margin: 0 0 .5rem; }
h1 { font-size: 1.9rem; } h2 { font-size: 1.4rem; } h3 { font-size: 1.12rem; }
p { margin: 0 0 .8rem; }

/* Kopf */
.kopf { position: sticky; top: 0; z-index: 50; background: linear-gradient(100deg, var(--rot-dunkel), var(--rot)); box-shadow: 0 2px 10px rgba(60, 20, 10, .3); }
.kopf-innen { max-width: 1200px; margin: 0 auto; padding: .5rem 1rem; min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.marke { display: flex; align-items: center; gap: .7rem; color: #fff; text-decoration: none; }
.siegel { width: 40px; height: 40px; border-radius: 50%; background: var(--gold); color: var(--rot-dunkel); display: grid; place-items: center; font-family: var(--serif); font-weight: 700; font-size: 1.4rem; box-shadow: inset 0 0 0 3px rgba(255,255,255,.35); }
.marke-text { display: flex; flex-direction: column; line-height: 1.1; }
.marke-titel { font-family: var(--serif); font-weight: 700; font-size: 1.35rem; }
.marke-unter { font-size: .75rem; opacity: .85; text-transform: uppercase; letter-spacing: .12em; }
.niveau { display: flex; align-items: center; gap: .3rem; background: rgba(255,255,255,.15); border: 1px solid rgba(255,255,255,.3); padding: .3rem; border-radius: 999px; }
.niveau-label { color: #fff; font-size: .8rem; font-weight: 700; padding: 0 .4rem 0 .6rem; text-transform: uppercase; letter-spacing: .08em; }
.niveau button { border: 0; border-radius: 999px; padding: .35rem .9rem; background: transparent; color: #fff; font-weight: 700; }
.niveau button[aria-checked="true"] { background: #fff; color: var(--rot-dunkel); }

/* Rahmen */
.haupt { flex: 1; width: 100%; max-width: 1200px; margin: 0 auto; padding: 1.5rem 1rem 3rem; }
.fuss { display: flex; justify-content: center; gap: 2rem; padding: 1rem; font-size: .9rem; border-top: 1px solid var(--linie); background: var(--pergament); }
.fuss a { color: var(--rot); }
.karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius); box-shadow: var(--schatten); padding: 1.25rem; }
.unter { color: var(--grau); }
.klein { font-size: .9rem; }

/* Knöpfe */
.knopf { display: inline-flex; align-items: center; gap: .4rem; border: 2px solid var(--rot); background: var(--rot); color: #fff; border-radius: 999px; padding: .55rem 1.2rem; font-weight: 700; text-decoration: none; }
.knopf:hover { background: var(--rot-dunkel); border-color: var(--rot-dunkel); }
.knopf.zweit { background: transparent; color: var(--rot); }
.knopf.zweit:hover { background: var(--gold-hell); }
.knopf:disabled { opacity: .45; cursor: not-allowed; }
.knopfreihe { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; align-items: center; }

/* Übersicht */
.einleitung { max-width: 760px; margin-bottom: 1.5rem; }
.gruppe { margin: 1.8rem 0 .8rem; display: flex; align-items: center; gap: .6rem; }
.gruppe::after { content: ''; flex: 1; height: 1px; background: var(--linie); }
.raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.sagenkarte { display: flex; flex-direction: column; gap: .4rem; text-decoration: none; color: inherit; border-top: 6px solid var(--oe); transition: transform .12s; }
.sagenkarte.gr { border-top-color: var(--gr); }
.sagenkarte.extra { border-top-color: var(--gold); }
.sagenkarte:hover { transform: translateY(-2px); }
.sagenkarte h3 { margin: 0; }
.marke-klein { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--grau); font-weight: 700; }
.fortschritt { display: flex; gap: .3rem; margin-top: auto; padding-top: .5rem; }
.fortschritt span { flex: 1; height: 6px; border-radius: 3px; background: var(--linie); }
.fortschritt span.fertig { background: var(--ok); }
.folgt { opacity: .6; border-top-style: dashed; }

/* Schrittleiste */
.sagenkopf { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.schritte { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1.2rem; padding: 0; list-style: none; }
.schritte a { display: flex; align-items: center; gap: .4rem; padding: .4rem .8rem; border-radius: 999px; background: var(--pergament); border: 1px solid var(--linie); color: var(--tinte); text-decoration: none; font-size: .92rem; }
.schritte a .nr { width: 22px; height: 22px; border-radius: 50%; background: var(--linie); display: grid; place-items: center; font-size: .8rem; font-weight: 700; }
.schritte a.aktiv { background: var(--rot); color: #fff; border-color: var(--rot); }
.schritte a.aktiv .nr { background: #fff; color: var(--rot); }
.schritte a.fertig .nr { background: var(--ok); color: #fff; }

/* Hören */
.player { display: flex; flex-direction: column; align-items: center; gap: 1rem; text-align: center; padding: 2rem 1rem; }
.abspielen { width: 96px; height: 96px; border-radius: 50%; border: 0; background: var(--rot); color: #fff; font-size: 2.2rem; display: grid; place-items: center; box-shadow: var(--schatten); }
.abspielen:disabled { background: var(--grau); opacity: .5; cursor: not-allowed; }
.zeitleiste { width: min(420px, 100%); height: 8px; background: var(--linie); border-radius: 4px; overflow: hidden; }
.zeitleiste div { height: 100%; width: 0; background: var(--gold); transition: width .3s linear; }
.durchgaenge { display: flex; gap: .5rem; }
.durchgaenge span { padding: .25rem .7rem; border-radius: 999px; border: 2px solid var(--linie); font-weight: 700; font-size: .9rem; color: var(--grau); }
.durchgaenge span.gehoert { border-color: var(--ok); background: var(--ok-hell); color: var(--ok); }

/* Hinweise */
.hinweis { border-radius: 10px; padding: .8rem 1rem; margin: .8rem 0; background: var(--info-hell); border-left: 5px solid var(--info); }
.hinweis.ok { background: var(--ok-hell); border-color: var(--ok); }
.hinweis.warn { background: var(--warn-hell); border-color: var(--warn); }
.hinweis p:last-child, .hinweis ul:last-child { margin-bottom: 0; }

/* Mitschreiben */
.zwei { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1.2rem; align-items: start; }
.zwei.schreiben { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); }
label.feld { display: block; font-weight: 700; margin: .6rem 0 .25rem; }
label.feld small { font-weight: 400; color: var(--grau); }
textarea, input[type="text"] { width: 100%; border: 1px solid var(--linie); border-radius: 10px; padding: .6rem .75rem; background: #fff; line-height: 1.5; }
textarea { resize: vertical; min-height: 4.5rem; }
textarea.notizblock { min-height: 22rem; background: repeating-linear-gradient(#fff, #fff 1.45rem, #eee4cc 1.5rem); background-attachment: local; line-height: 1.5rem; }
textarea.gross { min-height: 26rem; font-family: var(--serif); font-size: 1.08rem; }
.stichwoerter { display: flex; flex-wrap: wrap; gap: .4rem; margin: .4rem 0 0; padding: 0; list-style: none; }
.stichwoerter li { background: var(--gold-hell); border: 1px solid #e5cf95; border-radius: 6px; padding: .15rem .55rem; font-size: .92rem; }
.notizen-anzeige { white-space: pre-wrap; font-size: .95rem; background: var(--pergament); border: 1px dashed var(--linie); border-radius: 10px; padding: .75rem; max-height: 32rem; overflow: auto; }

/* Ordnen */
.ordnen { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .5rem; }
.ordnen li { display: grid; grid-template-columns: auto auto 1fr auto; gap: .6rem; align-items: center; background: #fff; border: 2px solid var(--linie); border-radius: 12px; padding: .55rem .7rem; }
.ordnen li.richtig { border-color: var(--ok); background: var(--ok-hell); }
.ordnen li.falsch { border-color: var(--warn); background: var(--warn-hell); }
.ordnen .pos { width: 28px; height: 28px; border-radius: 50%; background: var(--pergament); border: 1px solid var(--linie); display: grid; place-items: center; font-weight: 700; }
.pfeile { display: flex; gap: .3rem; }
.pfeile button { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--linie); background: var(--pergament); font-size: 1.1rem; }
.pfeile button:disabled { opacity: .35; }
.teilwahl { display: flex; flex-wrap: wrap; gap: .3rem; margin-top: .35rem; }
.teilwahl button { border: 1px solid var(--linie); background: var(--pergament); border-radius: 999px; padding: .15rem .65rem; font-size: .85rem; }
.teilwahl button[aria-pressed="true"] { background: var(--rot); color: #fff; border-color: var(--rot); }
.teilwahl button.richtig { outline: 3px solid var(--ok); }
.teilwahl button.falsch { outline: 3px solid var(--warn); }

/* Aufbau-Erklärung */
.aufbau { display: grid; grid-template-columns: repeat(4, 1fr); gap: .5rem; margin: .5rem 0 1rem; }
.aufbau div { background: var(--pergament); border: 1px solid var(--linie); border-radius: 10px; padding: .6rem; font-size: .9rem; }
.aufbau b { display: block; font-family: var(--serif); color: var(--rot); }

/* Schreiben */
.zaehler { font-size: .9rem; color: var(--grau); text-align: right; margin-top: .25rem; }
.checkliste { list-style: none; padding: 0; margin: .5rem 0 0; }
.checkliste li { display: flex; gap: .5rem; padding: .3rem 0; border-bottom: 1px dotted var(--linie); }
.checkliste input { width: 20px; height: 20px; flex: none; margin-top: .15rem; accent-color: var(--ok); }
.pruefliste { list-style: none; padding: 0; margin: 0; }
.pruefliste li { padding: .35rem 0 .35rem 1.8rem; position: relative; }
.pruefliste li::before { position: absolute; left: 0; font-weight: 700; }
.pruefliste li.ok::before { content: '✓'; color: var(--ok); }
.pruefliste li.warn::before { content: '!'; color: var(--warn); left: .4rem; }
.vergleich { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; }
.originaltext p { font-family: var(--serif); font-size: 1.05rem; }
.eigentext { white-space: pre-wrap; font-family: var(--serif); font-size: 1.05rem; }

/* Sortieren */
.sortierkarte { font-size: 1.15rem; font-family: var(--serif); text-align: center; padding: 1.6rem 1rem; min-height: 6rem; display: grid; place-items: center; }
.sortierknoepfe { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; margin-top: 1rem; }
.sortierknoepfe button { padding: .9rem .5rem; border-radius: 12px; border: 2px solid var(--linie); background: #fff; font-weight: 700; font-size: 1.05rem; }
.sortierknoepfe button:hover { border-color: var(--rot); }
.punkte { font-weight: 700; color: var(--rot); }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 1.5rem; transform: translateX(-50%) translateY(150%); background: var(--tinte); color: #fff; padding: .7rem 1.2rem; border-radius: 999px; transition: transform .25s, opacity .25s; z-index: 100; max-width: 90vw; opacity: 0; visibility: hidden; pointer-events: none; }
.toast.zeigen { transform: translateX(-50%) translateY(0); opacity: 1; visibility: visible; }

@media (max-width: 820px) {
  .zwei, .zwei.schreiben, .vergleich { grid-template-columns: 1fr; }
  .aufbau { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 520px) {
  h1 { font-size: 1.5rem; }
  .sortierknoepfe { grid-template-columns: 1fr; }
  .marke-unter { display: none; }
}
@media print {
  .kopf, .fuss, .schritte, .knopfreihe, .toast { display: none !important; }
  body { background: #fff; }
  .karte { box-shadow: none; border: 0; }
}

/* Ergänzungen 2.11. */
.brotkrumen { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; font-size: .92rem; margin-bottom: .6rem; color: var(--grau); }
.brotkrumen a { color: var(--rot); }
.aufbau.zweispaltig { grid-template-columns: 1fr 1fr; }
.ordnen input[type="text"] { padding: .4rem .6rem; }
.mcknoepfe { display: flex; flex-direction: column; gap: .5rem; margin-top: 1rem; }
.mcknoepfe button, .sortierknoepfe button { text-align: left; }
.mcknoepfe button { padding: .75rem 1rem; border-radius: 12px; border: 2px solid var(--linie); background: #fff; font-size: 1rem; }
.mcknoepfe button:hover:not(:disabled) { border-color: var(--rot); }
.sortierknoepfe button { text-align: center; }
.ist-richtig { border-color: var(--ok) !important; background: var(--ok-hell) !important; }
.ist-falsch { border-color: var(--warn) !important; background: var(--warn-hell) !important; }
.merktabelle { width: 100%; border-collapse: collapse; margin: 1rem 0; font-size: .95rem; }
.merktabelle th { font-family: var(--serif); text-align: left; background: var(--gold-hell); padding: .5rem .7rem; }
.merktabelle td { border-top: 1px solid var(--linie); padding: .45rem .7rem; vertical-align: top; }

.ordnen .grip { display: grid; place-items: center; width: 30px; min-height: 36px; cursor: grab; touch-action: none; color: var(--grau); font-size: 1.3rem; user-select: none; -webkit-user-select: none; }
.ordnen li { cursor: grab; }
.ordnen li input { cursor: text; }
.ordnen li.zieht { position: relative; z-index: 5; cursor: grabbing; box-shadow: 0 6px 18px rgba(0,0,0,.18); transition: none; }
