/* Farben und Maße an einer Stelle — hier wird das Erscheinungsbild umgestellt. */
:root {
  --grund: #fbfaf7;
  --flaeche: #ffffff;
  --rand: #e3ded4;
  --text: #1c1a17;
  --text-leise: #5d574d;
  --akzent: #7a1f3d;
  --akzent-flaeche: #f6eef1;
  --fokus: #7a1f3d;
  --radius: 10px;
  --breite: 46rem;
  --breite-weit: 68rem;
  --schrift: ui-serif, Georgia, "Iowan Old Style", "Times New Roman", serif;
  --schrift-ui: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-thema='hell']) {
    --grund: #14131a;
    --flaeche: #1d1b24;
    --rand: #322f3d;
    --text: #ece9f1;
    --text-leise: #a9a3b6;
    --akzent: #e8a0bd;
    --akzent-flaeche: #251a20;
    --fokus: #e8a0bd;
  }
}

:root[data-thema='dunkel'] {
  --grund: #14131a;
  --flaeche: #1d1b24;
  --rand: #322f3d;
  --text: #ece9f1;
  --text-leise: #a9a3b6;
  --akzent: #e8a0bd;
  --akzent-flaeche: #251a20;
  --fokus: #e8a0bd;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--grund);
  color: var(--text);
  font-family: var(--schrift-ui);
  font-size: 1.0625rem;
  line-height: 1.65;
}

a { color: var(--akzent); }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 3px solid var(--fokus);
  outline-offset: 2px;
}

.sprungmarke {
  position: absolute;
  left: -9999px;
  padding: 0.6rem 1rem;
  background: var(--flaeche);
}
.sprungmarke:focus { left: 1rem; top: 1rem; z-index: 10; }

.kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 2.5rem);
  border-bottom: 1px solid var(--rand);
}
.kopf nav { display: flex; align-items: center; gap: 1.25rem; }
.wortmarke {
  font-family: var(--schrift);
  font-size: 1.25rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  color: var(--text);
}
#thema-schalter {
  background: none;
  border: 1px solid var(--rand);
  border-radius: 50%;
  width: 2rem;
  height: 2rem;
  color: var(--text-leise);
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1;
}

main {
  flex: 1;
  width: 100%;
  max-width: var(--breite);
  margin: 0 auto;
  padding: clamp(2rem, 6vw, 4rem) clamp(1rem, 4vw, 2.5rem);
}
body.breit main { max-width: var(--breite-weit); }

h1, h2, h3 { font-family: var(--schrift); font-weight: 600; line-height: 1.2; }
h1 { font-size: clamp(1.9rem, 5vw, 2.6rem); margin: 0 0 0.5rem; }
h2 { font-size: 1.4rem; margin: 2.5rem 0 0.75rem; }
h3 { font-size: 1.1rem; margin: 1.75rem 0 0.5rem; }

/* --- Startseite --- */
.willkommen {
  min-height: 55vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 2rem;
}
.willkommen h1 {
  font-size: clamp(2.2rem, 8vw, 4.2rem);
  letter-spacing: -0.01em;
  margin: 0;
}
.willkommen .haupt-link {
  display: inline-block;
  padding: 0.85rem 1.6rem;
  border: 1px solid var(--akzent);
  border-radius: var(--radius);
  background: var(--akzent-flaeche);
  text-decoration: none;
  font-size: 1.05rem;
}
.willkommen .haupt-link:hover { background: var(--akzent); color: var(--grund); }

/* --- Lexikon --- */
.lexikon-werkzeuge {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--grund);
  padding: 1rem 0;
  border-bottom: 1px solid var(--rand);
  margin-bottom: 1.5rem;
}
#suchfeld {
  width: 100%;
  padding: 0.7rem 0.9rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
  background: var(--flaeche);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
}
.filter { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.75rem; }
.filter button {
  padding: 0.3rem 0.75rem;
  font: inherit;
  font-size: 0.9rem;
  color: var(--text-leise);
  background: var(--flaeche);
  border: 1px solid var(--rand);
  border-radius: 999px;
  cursor: pointer;
}
.filter button[aria-pressed='true'] {
  color: var(--akzent);
  border-color: var(--akzent);
  background: var(--akzent-flaeche);
}

.eintragsliste { list-style: none; margin: 0; padding: 0; }
.eintragsliste li { border-bottom: 1px solid var(--rand); }
.eintragsliste a {
  display: block;
  padding: 1rem 0;
  text-decoration: none;
  color: inherit;
}
.eintragsliste a:hover { background: var(--akzent-flaeche); }
.eintragsliste .name { font-family: var(--schrift); font-size: 1.15rem; color: var(--akzent); }
.eintragsliste .kurz { display: block; color: var(--text-leise); font-size: 0.95rem; }
.eintragsliste li[hidden] { display: none; }

.treffer-zahl { color: var(--text-leise); font-size: 0.9rem; margin: 0 0 1rem; }

.beispiel {
  border-left: 3px solid var(--akzent);
  background: var(--akzent-flaeche);
  padding: 0.9rem 1.1rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 1rem 0;
}
.beispiel .aussage { font-family: var(--schrift); font-size: 1.05rem; margin: 0 0 0.4rem; }
.beispiel .erklaerung { color: var(--text-leise); font-size: 0.95rem; margin: 0; }

.merkmale { color: var(--text-leise); font-size: 0.95rem; margin: 0 0 1.5rem; }
.verwandte { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.verwandte a {
  display: inline-block;
  padding: 0.25rem 0.7rem;
  border: 1px solid var(--rand);
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.9rem;
}

.hinweis {
  border: 1px dashed var(--rand);
  border-radius: var(--radius);
  padding: 1.5rem;
  color: var(--text-leise);
}

.fuss {
  border-top: 1px solid var(--rand);
  padding: 1.25rem clamp(1rem, 4vw, 2.5rem);
  font-size: 0.875rem;
  color: var(--text-leise);
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}
.fuss a { color: var(--text-leise); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
