/* Übungsseiten „Deutsch дома“ – Farben „Tanne und Honig“ wie das Joomla-Design (webseite/tpl_basis_deutschdoma) */
@font-face { font-family: "Onest"; src: url("onest.ttf") format("truetype"); font-weight: 100 900; font-display: swap; }

:root {
  --dunkel: #14312d; --mitte: #1f4a44; --honig: #edc162; --hell: #f9f6ee; --flaeche: #efe9da; --flaeche-2: #e5dcc7;
  --text: #1a2b27; --leise: #4f5f5a; --gruen: #1d6657; --rand: #e2d9c4; --richtig: #1d6657; --falsch: #a33d28;
  color-scheme: light;
  --knopf-text: #fff; --knopf-hover: #14312d; --merk: #14312d; --weiss: #fff;
  /* Seitenrand und Breite wie im Joomla-Design (Inhalt 1320 px) */
  --rand-seite: clamp(1rem, 0.5rem + 2vw, 2rem);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--hell); color: var(--text); font: 18px/1.55 "Onest", system-ui, "Segoe UI", sans-serif; }
a { color: var(--gruen); }
a:hover { color: var(--dunkel); }
:focus-visible { outline: 3px solid var(--gruen); outline-offset: 2px; }

.kopf { background: var(--hell); border-bottom: 1px solid var(--rand); padding: 12px var(--rand-seite); }
.kopf__innen { max-width: 1320px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.marke img { display: block; height: 40px; width: auto; }
.kopf__nav { display: flex; align-items: center; gap: 6px; }
.kopf__nav a { color: var(--dunkel); text-decoration: none; font-weight: 600; padding: 8px 12px; border-radius: 999px; }
.kopf__nav a:hover { background: var(--flaeche); }
.kopf__nav a.kopf__cta { background: var(--gruen); color: var(--knopf-text); font-weight: 700; }
.kopf__nav a.kopf__cta:hover { background: var(--knopf-hover); color: var(--knopf-text); }
@media (max-width: 420px) { .marke img { height: 32px; } .kopf__nav a { padding: 8px 10px; font-size: .95rem; } }

main { max-width: 760px; margin: 0 auto; padding: 24px 16px 40px; }
h1 { font-size: clamp(1.7rem, 5vw, 2.4rem); line-height: 1.15; color: var(--dunkel); margin: 8px 0 12px; text-wrap: balance; }
h2 { font-size: 1.35rem; line-height: 1.2; color: var(--dunkel); margin: 40px 0 12px; text-wrap: balance; }
.etikett { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0; font-size: .9rem; color: var(--leise); }
.plakette { background: var(--honig); color: #14312d; font-weight: 800; padding: 2px 12px; border-radius: 999px; }
.einleitung { font-size: 1.1rem; }
.hinweis { color: var(--leise); }

.knopf { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 18px; border-radius: 12px; border: 2px solid var(--gruen);
  background: var(--gruen); color: var(--knopf-text); font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; }
.knopf:hover { background: var(--knopf-hover); border-color: var(--knopf-hover); color: var(--knopf-text); }
.knopf--rand { background: transparent; color: var(--gruen); }
.knopf--rand:hover { background: var(--flaeche); color: var(--dunkel); }
.knopf[disabled] { opacity: .45; cursor: default; }

.satz { display: grid; grid-template-columns: 1fr; background: var(--flaeche); border-radius: 18px; overflow: hidden; margin: 0 0 16px; border: 1px solid var(--rand); }
.satz img { width: 100%; height: auto; display: block; aspect-ratio: 4 / 3; object-fit: cover; }
.satz__text { padding: 14px 18px 18px; }
.satz__nr { margin: 0; font-size: .85rem; font-weight: 700; color: var(--leise); }
.satz__de { font-size: 1.35rem; line-height: 1.25; font-weight: 800; color: var(--dunkel); margin: 4px 0 8px; }
.satz__ru { margin: 6px 0 0; }
.satz__ton { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
details summary { cursor: pointer; color: var(--gruen); font-weight: 700; }
@media (min-width: 680px) { .satz { grid-template-columns: 260px 1fr; } .satz img { height: 100%; } }

.merk { background: var(--merk); color: #f1eee4; border-radius: 18px; padding: 4px 20px 16px; margin-top: 32px; }
.merk h2 { color: var(--honig); margin-top: 18px; }

.uebung { border-top: 1px solid var(--rand); margin-top: 32px; }
.u-flaeche { background: var(--weiss); border: 1px solid var(--rand); border-radius: 18px; padding: 16px; }
.u-bilder { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 12px; }
.u-bilder button { padding: 0; border: 3px solid transparent; border-radius: 12px; overflow: hidden; background: none; cursor: pointer; }
.u-bilder img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.u-bilder button.ist-richtig { border-color: var(--richtig); }
.u-bilder button.ist-falsch { border-color: var(--falsch); }
.u-meldung { min-height: 1.6em; font-weight: 700; margin: 12px 0 0; }
.u-meldung.ist-richtig { color: var(--richtig); }
.u-meldung.ist-falsch { color: var(--falsch); }
.u-aufgabe img { width: 100%; max-width: 420px; border-radius: 12px; display: block; }
.u-ru { font-size: 1.2rem; font-weight: 700; margin: 12px 0; }
.u-loesung { font-size: 1.3rem; font-weight: 800; color: var(--dunkel); margin: 12px 0; }
.u-zeile { display: flex; flex-wrap: wrap; gap: 8px; min-height: 52px; padding: 8px 0; border-bottom: 2px solid var(--gruen); margin-bottom: 12px; }
.u-woerter { display: flex; flex-wrap: wrap; gap: 8px; }
.wort { min-height: 44px; padding: 8px 14px; border-radius: 10px; border: 1px solid var(--rand); background: var(--flaeche); font: inherit; font-weight: 700; cursor: pointer; color: var(--text); }
.u-zeile .wort { background: var(--merk); color: #f1eee4; border-color: var(--merk); }
.u-knoepfe { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.u-stand { color: var(--leise); font-size: .9rem; margin: 0 0 8px; }

.blaettern { display: flex; justify-content: space-between; gap: 12px; margin-top: 48px; font-weight: 700; }
.fuss { background: #0f2522; color: #c2cbc5; font-size: .95rem; padding: 40px var(--rand-seite) 24px; margin-top: 48px; }
.fuss__innen { max-width: 1320px; margin: 0 auto; }
.fuss a { color: #c2cbc5; text-decoration: none; }
.fuss a:hover { color: #fff; text-decoration: underline; }
.fuss h2 { color: #fff; font-size: 1rem; margin: 0 0 10px; }
.fuss__spalten { display: grid; gap: 28px 40px; grid-template-columns: 1fr; margin: 0 0 28px; align-items: start; }
@media (min-width: 640px) { .fuss__spalten { grid-template-columns: 1fr 1fr; } .fuss__spalten .dd-app { grid-column: 1 / -1; } }
@media (min-width: 1000px) { .fuss__spalten { grid-template-columns: 1fr 1.2fr 1.9fr; } .fuss__spalten .dd-app { grid-column: auto; } }
.fuss__spalten p { margin: 0 0 8px; }
.fuss__links { display: grid; gap: 8px; }
.fuss__quellen { font-size: .85rem; opacity: .8; }
.fuss__unten { border-top: 1px solid #2a554e; padding-top: 16px; margin: 16px 0 0; font-size: .82rem; }

@media (prefers-reduced-motion: no-preference) { .knopf, .wort, .u-bilder button { transition: background-color .15s, border-color .15s, color .15s; } }

.themenliste { padding-left: 1.2em; }
.themenliste li { margin: 6px 0; }
.dialog { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.dialog__zeile { background: var(--flaeche); border: 1px solid var(--rand); border-radius: 14px; padding: 10px 14px; display: grid; grid-template-columns: auto 1fr; gap: 4px 10px; align-items: center; }
.dialog__zeile--b { background: var(--weiss); }
.dialog__wer { grid-column: 1 / -1; font-size: .85rem; font-weight: 700; color: var(--leise); }
.dialog__de { font-weight: 700; color: var(--dunkel); }
.dialog__zeile details { grid-column: 1 / -1; }
.knopf--klein { min-height: 40px; min-width: 44px; padding: 4px 10px; justify-content: center; }

/* Web-App: Karte im Fuß und Eintrag im Handy-Menü (sichtbar nur, wenn das Gerät die Installation anbietet oder ein iPhone ist) */
.dd-app { display: flex; align-items: center; gap: 14px; text-align: left; background: var(--dd-app-bg, #14312d); color: #f1eee4;
  border-radius: 18px; padding: 14px 16px; margin: 16px auto; max-width: 560px; }
.dd-app[hidden], .dd-app-menu[hidden] { display: none !important; }
.dd-app img { flex: none; }
.dd-app__text { display: grid; gap: 2px; font-size: .92rem; line-height: 1.35; }
.dd-app__text strong { font-size: 1rem; color: #fff; }
.dd-app .dd-app-knopf { flex: none; margin-left: auto; min-height: 44px; padding: 8px 16px; border: 0; border-radius: 12px;
  background: #edc162; color: #14312d; font: inherit; font-weight: 800; cursor: pointer; }
.dd-app .dd-app-knopf:hover { background: #f4d590; }
.dd-app-ios { flex-basis: 100%; margin: 6px 0 0; font-size: .9rem; color: inherit; }
.dd-app { flex-wrap: wrap; }
.dd-app__text { flex: 1 1 180px; }

.dd-app [hidden] { display: none !important; }
.dd-app .dd-app__icon { width: 64px; height: 64px; border-radius: 14px; box-shadow: 0 2px 8px rgb(0 0 0 / .25); }
.dd-app__qr { margin: 0 0 0 auto; display: grid; justify-items: center; gap: 6px; font-size: .78rem; color: inherit; }
.dd-app__qr img { width: 112px; height: 112px; background: #fff; padding: 6px; border-radius: 10px; }
.dd-app--pc { max-width: 760px; }

.fuss__spalten .dd-app { margin: 0; max-width: none; align-self: start; }

.dd-sozial { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 0; }
.dd-sozial__link { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: #1a3c37; color: #f1eee4 !important; text-decoration: none !important; }
.dd-sozial__link:hover { background: #edc162; color: #14312d !important; }

/* Klickflächen am Handy: mindestens 24 px hoch */
.fuss__links a, .fuss__spalten p > a:not(.dd-sozial__link), .themenliste a, .blaettern a { display: inline-block; padding: 4px 0; min-height: 24px; }
.themenliste li { margin: 2px 0; }

/* App-Karte am PC: Symbol | Text + Knopf | QR-Code */
.dd-app--pc { display: grid; grid-template-columns: auto 1fr auto; gap: 6px 18px; align-items: start; padding: 20px; }
.dd-app--pc .dd-app__icon { grid-row: 1 / 3; }
.dd-app--pc .dd-app__text { grid-column: 2; }
.dd-app--pc .dd-app-knopf { grid-column: 2; justify-self: start; margin: 8px 0 0; }
.dd-app--pc .dd-app__qr { grid-column: 3; grid-row: 1 / 3; margin: 0; }
.dd-app--pc .dd-app-ios { grid-column: 1 / -1; }

/* Kopfleiste mitlaufend, beim Herunterscrollen ausgeblendet */
.ui-header, .kopf { position: sticky !important; top: 0; z-index: 100; transition: translate .3s ease; }
.ui-header.dd-weg, .kopf.dd-weg, .ui-header.is-hidden { translate: 0 -110%; }
@media (prefers-reduced-motion: reduce) { .ui-header, .kopf { transition: none; } }

.ton-hinweis { color: var(--leise); font-size: .85rem; margin: -6px 0 12px; }

/* Kopf: Suche und Hell/Dunkel wie im Joomla-Design */
.kopf__rechts { display: flex; align-items: center; gap: 8px; }
.kopf__rund { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--rand-stark, #b8ad94);
  background: transparent; color: var(--dunkel); cursor: pointer; padding: 0; }
.kopf__rund:hover { background: var(--flaeche); }
.kopf__suche { display: flex; align-items: center; gap: 6px; }
.kopf__suche input { width: 0; padding: 0; border: 0; opacity: 0; transition: width .2s ease, opacity .2s ease; font: inherit; color: var(--text);
  background: var(--weiss); border-radius: 999px; min-height: 44px; }
.kopf__suche.ist-offen input { width: min(220px, 40vw); padding: 0 14px; border: 1px solid var(--rand); opacity: 1; }
.kopf__sonne, .marke .marke__dunkel { display: none; }
@media (max-width: 640px) {
  .kopf__nav { display: none; }
  .kopf__suche.ist-offen { position: absolute; left: 12px; right: 12px; top: 64px; background: var(--hell); padding: 8px; border-radius: 14px; box-shadow: 0 6px 20px rgb(0 0 0 / .15); }
  .kopf__suche.ist-offen input { width: 100%; }
  .kopf { position: relative; }
}

/* Dunkles Schema (Schalter im Kopf oder Einstellung des Geräts) */
:root[data-color-scheme="dark"] {
  color-scheme: dark;
  --hell: #14312d; --flaeche: #1a3c37; --flaeche-2: #1f4a44; --text: #f1eee4; --leise: #c2cbc5; --rand: #2a554e; --rand-stark: #3f6e66;
  --gruen: #edc162; --dunkel: #f9f6ee; --knopf-text: #14312d; --knopf-hover: #f4d590; --merk: #0f2522; --weiss: #1f4a44;
}
@media (prefers-color-scheme: dark) {
  :root[data-color-scheme="auto"] {
    color-scheme: dark;
    --hell: #14312d; --flaeche: #1a3c37; --flaeche-2: #1f4a44; --text: #f1eee4; --leise: #c2cbc5; --rand: #2a554e; --rand-stark: #3f6e66;
    --gruen: #edc162; --dunkel: #f9f6ee; --knopf-text: #14312d; --knopf-hover: #f4d590; --merk: #0f2522; --weiss: #1f4a44;
  }
  :root[data-color-scheme="auto"] .kopf__mond, :root[data-color-scheme="auto"] .marke .marke__hell { display: none; }
  :root[data-color-scheme="auto"] .kopf__sonne, :root[data-color-scheme="auto"] .marke .marke__dunkel { display: block; }
}
:root[data-color-scheme="dark"] .kopf__mond, :root[data-color-scheme="dark"] .marke .marke__hell { display: none; }
:root[data-color-scheme="dark"] .kopf__sonne, :root[data-color-scheme="dark"] .marke .marke__dunkel { display: block; }

.kopf__nav a { white-space: nowrap; }
/* Suchseite */
.suchform { display: flex; gap: 8px; margin: 8px 0 12px; }
.suchform input { flex: 1; min-height: 48px; padding: 0 16px; border: 1px solid var(--rand); border-radius: 12px; font: inherit; background: var(--weiss); color: var(--text); }
.trefferliste { list-style: none; padding: 0; display: grid; gap: 12px; }
.treffer { background: var(--flaeche); border: 1px solid var(--rand); border-radius: 14px; padding: 12px 16px; }
.treffer a { font-weight: 700; text-decoration: none; display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.treffer p { margin: 6px 0 0; color: var(--leise); }

/* Brotkrumen, Modul- und Fragen-Seiten */
.pfad { font-size: .9rem; color: var(--leise); margin: 0 0 10px; display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; }
.pfad a { color: var(--leise); display: inline-flex; align-items: center; min-height: 24px; }
.pfad a:hover { color: var(--dunkel); }
.treffer--bald { opacity: .7; }
.plakette--leise { background: var(--flaeche-2); color: var(--text); }
.frage { background: var(--flaeche); border: 1px solid var(--rand); border-radius: 14px; padding: 12px 16px; margin: 0 0 10px; }
.frage summary { color: var(--dunkel); font-size: 1.05rem; min-height: 24px; }
.frage p { margin: 10px 0 0; }
#treffer { min-height: 60vh; }
.satz picture { display: block; min-height: 0; }
@media (min-width: 680px) { .satz picture { height: 100%; } }

main details li a, .einleitung a, main p > a:not(.knopf) { display: inline-block; padding: 3px 0; min-height: 24px; }
main details li { margin: 4px 0; }
