:root {
  color-scheme: light;
  --wald: #183d31;
  --moos: #285744;
  --tinte: #20372e;
  --leise: #466053;
  --papier: #f5f5ed;
  --linie: #ccd8cd;
  --hell: #fffdf7;
  --gold: #f2ce79;
  font: 100%/1.55 system-ui, sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--papier); color: var(--tinte); }
button, a { -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; }
a { color: #215d48; }
button:focus-visible, a:focus-visible, h1:focus-visible, [role=status]:focus-visible { outline: 3px solid #a15313; outline-offset: 4px; }
img { display: block; width: 100%; object-fit: cover; }
.rahmen { width: min(1120px, calc(100% - 2rem)); margin-inline: auto; }
.kopf { background: var(--wald); color: white; }
.kopfzeile { min-height: 66px; display: flex; gap: 1rem; justify-content: space-between; align-items: center; }
.marke, .nachweise { background: transparent; border: 0; color: #fffdf5; padding: .45rem 0; }
.marke { font: bold 1.4rem Georgia, serif; }
.nachweise { text-decoration: underline; text-underline-offset: .25em; }
main { padding: clamp(1rem, 4vw, 3.4rem) 0 3rem; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.14; }
h1, h2 { font-family: Georgia, serif; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); letter-spacing: -.035em; }
h2 { font-size: clamp(1.6rem, 3vw, 2.35rem); }
.held {
  min-height: 340px; display: flex; align-items: center; padding: clamp(1.35rem, 6vw, 4rem);
  border-radius: 1.6rem; color: white;
  background: linear-gradient(90deg, #102f25 0%, #123429ec 33%, #12342980 73%, #12342955), url('bilder/bach.webp') center 61% / cover;
}
.held p { margin: 1rem 0 1.4rem; max-width: 35ch; color: #f0f4ea; font-size: 1.1rem; }
.held h1 { max-width: 19ch; }
.prim, .sek, .klein { border: 1px solid transparent; border-radius: .72rem; padding: .75rem 1.05rem; font-weight: 700; min-height: 46px; }
.prim { color: white; background: var(--moos); }
.prim:hover { background: #123c2b; }
.held .prim { background: var(--gold); color: #292619; }
.held .prim:hover { background: #ffdc96; }
.sek, .klein { background: var(--hell); border-color: var(--linie); color: var(--wald); }
.sek:hover, .klein:hover { background: #eaf0e4; }
.themekopf { margin: 2.1rem 0 1rem; }
.themen { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.thema { padding: 0; text-align: left; color: var(--tinte); background: var(--hell); border: 1px solid var(--linie); border-radius: 1rem; overflow: hidden; }
.thema:hover { border-color: #658370; box-shadow: 0 4px 14px #183d311c; }
.thema img { height: 145px; }
.thema span { display: block; }
.thema .inhalt { display: flex; align-items: flex-end; justify-content: space-between; gap: .85rem; padding: 1rem; }
.thema .inhalt-text { flex: 1 1 auto; min-width: 0; }
.thema strong { font-size: 1.14rem; }
.thema-abzeichen {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: .18rem;
  flex: 0 0 auto;
  min-width: 3.5rem;
  color: var(--abzeichen-tinte);
}
.thema-abzeichen.bronze { --abzeichen-linie: #ab7b53; --abzeichen-flaeche: #f7e8d9; --abzeichen-tinte: #54301b; }
.thema-abzeichen.silber { --abzeichen-linie: #8599a6; --abzeichen-flaeche: #ecf1f4; --abzeichen-tinte: #233b49; }
.thema-abzeichen.gold { --abzeichen-linie: #bf8b30; --abzeichen-flaeche: #fff3ca; --abzeichen-tinte: #513407; }
.thema-abzeichen-siegel {
  display: grid;
  place-items: center;
  width: 2.65rem;
  height: 2.65rem;
  border-radius: 50%;
  border: 1px solid var(--abzeichen-linie);
  background: var(--abzeichen-flaeche);
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1;
}
.thema-abzeichen-text {
  font-size: .74rem;
  font-weight: 700;
  line-height: 1.1;
  text-align: center;
}
.beschreibung { color: var(--leise); font-size: .93rem; margin-top: .15rem; }
.runde { max-width: 775px; margin: auto; }
.rundenkopf { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .55rem; color: var(--leise); font-weight: 650; }
progress { display: block; width: 100%; height: .65rem; accent-color: var(--moos); border: 0; border-radius: 1rem; overflow: hidden; background: #dce6db; }
progress::-webkit-progress-bar { background: #dce6db; }
progress::-webkit-progress-value { background: var(--moos); }
progress::-moz-progress-bar { background: var(--moos); }
.karte { background: var(--hell); border: 1px solid var(--linie); border-radius: 1.3rem; padding: clamp(1rem, 4vw, 2.2rem); margin-top: 1.25rem; }
.karte h1 { font-size: clamp(1.65rem, 4.25vw, 2.6rem); }
.fragebild, .loesungsbild { margin-top: 1.15rem; border-radius: .8rem; height: clamp(170px, 41vw, 355px); object-fit: contain; background: #e9eee4; }
.antwort-hinweis { margin-top: 1rem; }
.antworten { display: grid; gap: .7rem; margin-top: 1.15rem; }
.antwort-hinweis + .antworten { margin-top: .55rem; }
.bildauswahl { grid-template-columns: repeat(3,minmax(0,1fr)); }
.bildauswahl.zwei-bilder { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.antwort { display: block; border: 1px solid #aebfb2; color: var(--tinte); border-radius: .8rem; background: white; text-align: left; min-height: 55px; padding: .75rem 1rem; font-weight: 650; }
.antwort:not([aria-disabled]):hover { border-color: var(--moos); background: #eaf2e6; }
.antwort[aria-disabled] { cursor: default; }
.bildauswahl .antwort { overflow: hidden; padding: 0; text-align: center; }
.bildauswahl img { height: clamp(100px, 23vw, 175px); object-fit: contain; background: #e9eee4; }
.bildauswahl span { display: block; padding: .5rem .25rem; overflow-wrap: anywhere; }
.antwort.richtig { background: #ddefd9; border-color: #3a7548; }
.antwort.falsch { background: #f7e3d9; border-color: #a25e42; }
.feedback { padding: 1rem; margin-top: 1.25rem; border-radius: .8rem; background: #e9efe4; }
.feedback p + p { margin-top: .3rem; }
.aktionen { display: flex; gap: .65rem; flex-wrap: wrap; margin-top: 1.25rem; }
.ergebnis { text-align: center; }
.ergebnis .aktionen { justify-content: center; }
.punkte { font: bold clamp(2.8rem, 9vw, 5rem)/1 Georgia,serif; color: var(--moos); margin: 1.2rem 0 .55rem; }
.ergebnis details { margin-top: 1.2rem; text-align: left; }
.ergebnis li + li { margin-top: .65rem; }
summary { cursor: pointer; font-weight: 700; }
dialog { border: 1px solid var(--linie); color: var(--tinte); background: var(--hell); border-radius: 1.2rem; width: min(620px, calc(100% - 2rem)); padding: 1.3rem; }
dialog::backdrop { background: #102b23a8; }
dialog form { text-align: right; }
dialog p { margin-top: .6rem; }
dialog li + li { margin-top: .35rem; }
@media (max-width: 740px) { .themen { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 470px) {
  .themen { grid-template-columns: 1fr; }
  .thema { display: grid; grid-template-columns: 34% 1fr; }
  .thema img { height: 100%; min-height: 91px; }
  .thema .inhalt { align-items: center; }
  .rundenkopf { font-size: .88rem; }
  .bildauswahl { gap: .35rem; }
  .bildauswahl .antwort { font-size: .8rem; }
}

.touren { display: flex; flex-wrap: wrap; gap: .65rem; }

.abzeichen {
  width: min(100%, 31rem);
  margin: 1.4rem auto 0;
  padding: 1.3rem 1rem;
  border: 1px solid var(--abzeichen-linie);
  border-radius: 1rem;
  background: var(--abzeichen-flaeche);
  color: var(--abzeichen-tinte);
}
.abzeichen.gold { --abzeichen-flaeche: #fff3ca; --abzeichen-linie: #bf8b30; --abzeichen-tinte: #513407; }
.abzeichen.silber { --abzeichen-flaeche: #ecf1f4; --abzeichen-linie: #8599a6; --abzeichen-tinte: #233b49; }
.abzeichen.bronze { --abzeichen-flaeche: #f7e8d9; --abzeichen-linie: #ab7b53; --abzeichen-tinte: #54301b; }
.abzeichen-siegel {
  display: grid;
  place-items: center;
  width: 3.5rem;
  aspect-ratio: 1;
  margin: 0 auto .65rem;
  border: 2px solid var(--abzeichen-linie);
  border-radius: 50%;
  background: var(--hell);
  font-size: 1.8rem;
}
.abzeichen h2 { font-size: clamp(1.25rem, 4vw, 1.8rem); }
.abzeichen p { margin-top: .35rem; }

.kopf-aktionen { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0 .85rem; }
.held .spieler-aktiv { margin-bottom: 0; }
.spieler-aktiv:empty { display: none; }
.ergebnis-spieler { margin-top: .45rem; }
.pass h2 { margin-top: 1.2rem; overflow-wrap: anywhere; }
.pass-auswahl { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .45rem .65rem; margin-top: 1rem; }
.pass-auswahl label { grid-column: 1 / -1; font-weight: 700; }
.pass-auswahl input { min-width: 0; padding: .6rem .7rem; border: 1px solid var(--linie); border-radius: .7rem; font: inherit; }
.pass-spieler button { overflow-wrap: anywhere; max-width: 100%; }
.pass-spieler button[aria-current] { background: var(--moos); color: white; }
.pass-themen { padding: 0; list-style: none; }
.pass-themen li { display: flex; align-items: center; justify-content: space-between; gap: .75rem; border-bottom: 1px solid var(--linie); padding: .5rem 0; }
.pass-stufe { padding: .2rem .6rem; border-radius: .6rem; white-space: nowrap; background: #eff1eb; }
.stufe-1 { background: #f7e8d9; color: #54301b; }
.stufe-2 { background: #ecf1f4; color: #233b49; }
.stufe-3 { background: #fff3ca; color: #513407; }
.pass .beschreibung { margin-top: .9rem; }
.pass-status:not(:empty) { margin-top: .65rem; }
#urkunde { display: none; }
@media (max-width: 455px) {
  .pass-auswahl { grid-template-columns: 1fr; }
  .kopf-aktionen { gap: 0 .65rem; font-size: .9rem; }
}
@media print {
  body.urkunde-drucken > :not(#urkunde) { display: none !important; }
  body.urkunde-drucken #urkunde {
    display: block;
    margin: 12mm auto;
    max-width: 174mm;
    padding: 20mm 12mm;
    border: 5px double #285744;
    text-align: center;
    break-inside: avoid;
    background: white;
    color: #183d31;
    overflow-wrap: anywhere;
  }
  #urkunde h1 { font-size: 40pt; margin: 8mm 0; }
  #urkunde h2 { font-size: 27pt; margin: 4mm 0 8mm; }
  .urkunde-kennung { font-size: 11pt; letter-spacing: .15em; }
  .urkunde-datum { margin-top: 12mm; }
}

#usb-status { padding-top: .65rem; color: var(--tinte); font-size: .9rem; }
#usb-status button { margin-left: .6rem; }

.frageabbildung { margin: 0; }
.frageabbildung figcaption { margin-top: .35rem; color: var(--leise); font-size: .9rem; }

.pass-loeschen { color: #822c27; border-color: #cc958f; }
.pass-loeschen:hover { background: #f9eae7; }

@page { size: A4 portrait; margin: 10mm; }
@media print {
  body.urkunde-drucken { background: white; }
  body.urkunde-drucken #urkunde.urkunde-illustration {
    position: relative;
    width: 190mm;
    height: 268.7mm;
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
    overflow: hidden;
    break-inside: avoid;
  }
  .urkunde-illustration .urkunde-motiv {
    width: 100%;
    height: 100%;
    object-fit: fill;
  }
  .urkunde-illustration .urkunde-name {
    position: absolute;
    left: 18%;
    width: 64%;
    bottom: 60.4%;
    margin: 0;
    text-align: center;
    font-family: Georgia, serif;
    line-height: 1.08;
    font-weight: bold;
    color: #123b17;
    overflow-wrap: anywhere;
  }
  .urkunde-illustration .urkunde-datum-neu {
    position: absolute;
    top: 73.3%;
    left: 35%;
    width: 30%;
    margin: 0;
    font: 13pt/1.2 Georgia, serif;
    text-align: center;
    color: #123b17;
  }
}

.pass-thema-aktionen { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .5rem; }
.pass-thema-aktionen button { font-size: .85rem; padding: .45rem .65rem; min-height: 40px; }
@media (max-width: 500px) {
  .pass-themen li { align-items: flex-start; flex-direction: column; }
  .pass-thema-aktionen { justify-content: flex-start; }
}
@media print {
  .urkunde-illustration .urkunde-auszeichnung {
    position: absolute;
    top: 43%;
    left: 17%;
    width: 66%;
    color: #123b17;
    text-align: center;
    font: 17pt/1.3 Georgia, serif;
  }
  .urkunde-auszeichnung p { margin: 0; }
  .urkunde-auszeichnung .urkunde-thema,
  .urkunde-auszeichnung .urkunde-profi {
    display: block;
    margin: 2mm 0;
    font: bold 23pt/1.15 Georgia, serif;
  }
}

.sprachleiste { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; padding-top: .8rem; }
.sprachleiste label { display: flex; align-items: center; gap: .4rem; }
.sprachleiste input { accent-color: var(--moos); width: 1.1rem; height: 1.1rem; }
#sprache-hinweis:not([hidden]) { flex-basis: 100%; color: #7a3a19; }
.frage-vorlesen { margin-top: .8rem; }
.feedback button { margin-top: .7rem; }

.nd-footer { border-top: 1px solid var(--linie); text-align: center; padding: 1.4rem 0 1.8rem; color: var(--leise); font-size: .87rem; }
.nd-footer p:first-child { font-weight: 650; }
.nd-footer nav { display:flex; justify-content:center; gap:1rem; flex-wrap:wrap; margin-top:.3rem; }
@media print { .nd-footer { display:none !important; } }

.alterswahl{display:flex;flex-wrap:wrap;gap:.6rem;margin:1rem 0}.alterswahl button:disabled{opacity:.45;cursor:not-allowed}

/* Altersstufe anstelle der allgemeinen Kopfzeile im Urkundenmotiv. */
@media print {
  .urkunde-illustration .urkunde-altersstufe {
    position: absolute;
    top: 10.65%;
    left: 26.4%;
    width: 45.7%;
    height: 3.5%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    background: #faf5e5;
    color: #123b17;
    font: bold 16pt/1 Georgia, serif;
    letter-spacing: .045em;
    text-transform: uppercase;
    white-space: nowrap;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
}

.gruppen-vorgabe{margin:12px 0;padding:12px;border:1px solid var(--linie);border-radius:10px;background:#e8f0e4}.gruppen-vorgabe p{margin:4px 0 0}.thema-vorgabe{display:inline-block;font-size:.8rem;font-weight:650;color:#285744;margin-top:4px}

/* Aufgaben & Entdeckungen */
.nd-aufgaben-raster{display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr));gap:1rem;margin:1.2rem 0}.nd-aufgaben-karte{display:flex;flex-direction:column;align-items:flex-start;gap:.45rem;background:white;color:var(--tinte);border:1px solid var(--linie);border-radius:1rem;padding:1.15rem;text-align:left}.nd-aufgaben-karte:hover{background:#e8f0e4;border-color:#658370}.nd-aufgaben-karte strong{font-size:1.15rem}.nd-aufgaben-bereich{margin:1rem 0}.nd-reihenfolge{min-height:3rem;padding:1rem 1rem 1rem 2.5rem;background:#e8f0e4;border:1px solid var(--linie);border-radius:.7rem}.nd-reihenfolge li{padding:.35rem 0;font-weight:650}.nd-aufgaben-bereich>.sek{margin-top:1rem}.nd-zuordnung{display:flex;gap:.85rem;align-items:center;padding:.85rem 0;border-bottom:1px solid var(--linie)}.nd-aufgaben-foto{width:128px;height:110px;object-fit:contain;background:#e8ede5;border-radius:.5rem;flex-shrink:0}.nd-zuordnung-text{flex:1;min-width:0;display:grid;gap:.45rem}.nd-zuordnung-text label{font-weight:650}.nd-zuordnung-text select{font:inherit;width:100%;min-height:48px;color:var(--tinte);padding:.5rem;border:1px solid #aebfb2;border-radius:.65rem;background:white}.nd-zuordnung-text button{justify-self:start;min-height:38px;padding:.3rem .6rem}.nd-zuordnung-text select.nd-zu-richtig{background:#ddefd9;border-color:#3a7548}.nd-zuordnung-text select.nd-zu-falsch{background:#f7e3d9;border-color:#a25e42}@media(max-width:520px){.nd-zuordnung{flex-direction:column;align-items:stretch}.nd-aufgaben-foto{width:100%;height:150px}.nd-zuordnung-text select{font-size:1rem}}

.nd-aufgaben-bereich button:disabled,.karte:has(.nd-aufgaben-bereich) .aktionen button:disabled{opacity:.55;cursor:not-allowed}

.gift-warnhinweis {
  margin: 1rem 0;
  padding: .8rem 1rem;
  border: 1px solid #bd8024;
  border-inline-start-width: .35rem;
  border-radius: .55rem;
  color: #482b02;
  background: #fff3da;
}
.gift-warnhinweis p { margin: .35rem 0 0; }

@media print {
  body.urkunde-drucken #urkunde.urkunde-mit-themenmotiv {
    background: #faf5e5;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }
  .urkunde-mit-themenmotiv .urkunde-text,
  .urkunde-mit-themenmotiv .urkunde-motiv {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
  }
  .urkunde-mit-themenmotiv .urkunde-motiv { object-fit: fill; }
  .urkunde-mit-themenmotiv .urkunde-vorlagenschrift {
    position: absolute;
    left: 17%;
    top: 15.4%;
    width: 66%;
    height: 17.6%;
  }
  /* Datumshintergrund ist deckend in das Motiv eingerechnet (2.14.3). */
  .urkunde-mit-themenmotiv .urkunde-text::before {
    content: '';
    position: absolute;
    top: 42%;
    left: 32%;
    width: 36%;
    border-top: .35mm solid #285544;
  }
  .urkunde-mit-themenmotiv .urkunde-altersstufe { background: transparent; }
  .urkunde-mit-themenmotiv .urkunde-name { bottom: 60%; }
  .urkunde-mit-themenmotiv .urkunde-auszeichnung { top: 44.4%; }
  .urkunde-mit-themenmotiv .urkunde-thema { font-size: 22pt; }
  .urkunde-mit-themenmotiv .urkunde-siegel {
    position: absolute;
    top: 55.63%;
    left: 39%;
    width: 22%;
    height: 15.54%;
    clip-path: circle(46%);
  }
  .urkunde-mit-themenmotiv .urkunde-datum-neu {
    left: 35.2%;
    width: 29.4%;
    font-size: 15pt;
  }
  .urkunde-mit-themenmotiv .urkunde-datumslabel {
    position: absolute;
    top: 76.8%;
    left: 35%;
    width: 30%;
    margin: 0;
    color: #123b17;
    font: 11pt/1 Georgia, serif;
  }
}

.biber-kelle {
  position: relative;
}
.biber-kelle::after {
  content: '';
  position: absolute;
  top: 23%;
  left: 33%;
  width: 34%;
  height: 54%;
  border: 1px solid currentColor;
  border-radius: 63% 63% 52% 52% / 56% 56% 48% 48%;
  background:
    repeating-linear-gradient(45deg, transparent 0 22%, currentColor 22% 27%, transparent 27% 39%),
    repeating-linear-gradient(-45deg, transparent 0 22%, currentColor 22% 27%, transparent 27% 39%);
  transform: rotate(32deg);
}
@media print {
  .urkunde-mit-themenmotiv .urkunde-biber-schrift {
    color: #123b17;
    text-align: center;
    font: 19pt/1.1 Georgia, serif;
  }
  #urkunde .urkunde-biber-schrift h1 {
    margin: 0 0 4mm;
    font: italic bold 69pt/1 Georgia, serif;
  }
  .urkunde-biber .urkunde-auszeichnung {
    left: 13%;
    width: 74%;
  }
  .urkunde-biber .urkunde-thema { font-size: 19pt; }
  .urkunde-biber .urkunde-siegel {
    top: 54.8%;
    left: 40%;
    width: 20%;
    height: 14.14%;
  }
  .urkunde-biber .urkunde-datum-neu { top: 69%; }
  .urkunde-biber .urkunde-datumslabel { top: 71.5%; }
}

/* Explizite Sicherheitseinstufung, getrennt von der Spielerwertung */
.gift-loesung{margin:.85rem 0;padding:.85rem;background:#fff;border:1px solid #c7d2c2;border-radius:.65rem;color:#203a2e}
.gift-loesung h3{margin:0 0 .65rem;font-size:1.05rem}
.gift-status{padding:.55rem .7rem;border-left:4px solid;border-radius:.3rem;margin:.5rem 0;overflow-wrap:anywhere}
.gift-status p{margin:.25rem 0 0}
.gift-gefahr{background:#fff1ef;border-color:#a92d26;color:#81231e}
.gift-vorsicht{background:#fff5da;border-color:#a66a13;color:#704607}
.gift-info{background:#eef4eb;border-color:#4b7453;color:#274b32}
.gift-loesung small{display:block;margin-top:.7rem;line-height:1.4}

/* Gruppenhinweis im dunklen Titelbereich: lesbarer Kontrast. */
.held .gruppen-vorgabe,.held .gruppen-vorgabe strong,.held .gruppen-vorgabe p{color:#183d31}.held .gruppen-vorgabe p{max-width:none;margin:4px 0 0;font-size:1rem}
