/* Schwoba-Lexikon: Design aus dem Designplan, hell und dunkel, Handy zuerst */

/* Hell (Standard) */
:root {
  --schwarz: #1f1b16;
  --gold: #c9a227;
  --dunkelgold: #7a5f12;
  --rot: #a8322d;
  --hintergrund: #f5efdf;
  --karte: #fffaf0;
  --text: #1f1b16;
  --eingabe: #fffaf0;
  --serif: "Alegreya", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: light;
}

/* Dunkel */
:root[data-theme="dark"] {
  --hintergrund: #1b1813;
  --karte: #26211a;
  --text: #f5efdf;
  --dunkelgold: #e0b84a;
  --rot: #d8564f;
  --eingabe: #2e271f;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--hintergrund);
  color: var(--text);
  font-family: var(--sans);
  font-size: .95rem;
  line-height: 1.55;
  transition: background .2s, color .2s;
}
a { color: var(--dunkelgold); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--rot); }
.woerterliste a, .karte h3 a { text-decoration: none; color: var(--text); }
.woerterliste a:hover, .karte h3 a:hover { color: var(--rot); text-decoration: underline; }
.brot a { color: var(--dunkelgold); }
.brot { font-size: .9rem; margin-bottom: 4px; }
.start-block p { margin: 8px 0; }
.woerterliste { padding-left: 18px; line-height: 1.8; }
.seiten { flex-wrap: wrap; }
.seiten .knopf { flex: 1 1 auto; text-align: center; }
img { max-width: 100%; height: auto; display: block; }
.kopf a.marke, .kopf .menue a { color: #f5efdf; text-decoration: none; }

/* Kopf: Logo, Menü, Farbumschalter */
.kopf {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 12px;
  padding: 10px 16px; background: var(--schwarz); color: #f5efdf;
  border-bottom: 3px solid var(--gold);
}
.kopf a { color: #f5efdf; text-decoration: none; }
.marke { display: flex; align-items: center; gap: 10px; }
.logo { width: 48px; height: 48px; flex: none; }
.wortmarke { font-family: var(--serif); font-size: 1.1rem; font-weight: 700; }
.wortmarke span { color: var(--gold); }
.kopf-rechts { display: flex; align-items: center; gap: 12px; }
.menue { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.menue a { padding: 6px 2px; min-height: 36px; display: inline-flex; align-items: center; }
.menue a:hover { color: var(--gold); }

/* Farbumschalter: Mond zeigt "dunkel an", Sonne zeigt "hell an" */
.thema {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--gold); background: transparent; color: var(--gold);
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0;
}
.thema svg { width: 22px; height: 22px; }
.thema:hover { background: var(--gold); color: var(--schwarz); }
.thema:focus-visible { outline: 2px solid var(--rot); outline-offset: 2px; }
.thema .ico-sonne { display: none; }
.thema .ico-mond { display: block; }
:root[data-theme="dark"] .thema .ico-sonne { display: block; }
:root[data-theme="dark"] .thema .ico-mond { display: none; }

main { max-width: 720px; margin: 0 auto; padding: 16px 16px 48px; }

/* Überschriften und Karten */
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; color: var(--text); }
h1 { font-size: 1.5rem; margin: 10px 0 6px; }
h2 { font-size: 1.2rem; margin: 22px 0 6px; border-top: 2px solid var(--gold); padding-top: 10px; }
h2 em, h3 em { font-style: italic; color: var(--dunkelgold); }
.karte {
  background: var(--karte); color: var(--text); border: 2px solid var(--gold); border-radius: 10px;
  padding: 14px 16px; margin: 12px 0; position: relative;
}
.karte h3 { margin: 0 0 2px; font-size: 1.05rem; color: var(--dunkelgold); }
.hochdeutsch { margin: 0; }
.kat { margin: 4px 0 0; font-size: .85rem; text-transform: uppercase; letter-spacing: .08em; color: var(--dunkelgold); }
.beispiel { margin: 8px 0 0; font-style: italic; font-size: .95em; }
.witz { font-family: var(--serif); font-size: 1.05rem; }
.big { font-size: 1.2em; margin: 6px 0; }
.frage { opacity: .75; margin: 0; }
.lernkarte details summary { cursor: pointer; color: var(--dunkelgold); margin-top: 12px; }
.info { opacity: .75; }

/* Knöpfe und Formulare */
.knopf, button {
  display: inline-block; min-height: 44px; line-height: 44px; padding: 0 16px; border: 0; border-radius: 8px;
  background: var(--schwarz); color: #f5efdf; font: inherit; text-decoration: none; cursor: pointer; margin: 4px 4px 4px 0;
}
.knopf:hover, button:hover { background: var(--gold); color: var(--schwarz); }
.suche { display: flex; gap: 8px; }
.suche input {
  flex: 1; min-width: 0; font: inherit; font-size: 1em; padding: 10px; min-height: 44px;
  border: 1px solid var(--gold); border-radius: 8px; background: var(--eingabe); color: var(--text);
}
.formular { display: grid; gap: 12px; }
.formular label { display: grid; gap: 4px; font-weight: 600; }
.formular input, .formular textarea {
  font: inherit; padding: 8px; border: 1px solid var(--gold); border-radius: 8px; background: var(--eingabe); color: var(--text);
}
.falle { position: absolute; left: -9999px; }
.seiten { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 16px 0; flex-wrap: wrap; }
.erfolg { background: #dff3e4; color: #15502a; padding: 10px; border-radius: 8px; }
.fehler { background: #fbe3dc; color: #7a2510; padding: 10px; border-radius: 8px; }
:root[data-theme="dark"] .erfolg { background: #1f3a27; color: #cfeed8; }
:root[data-theme="dark"] .fehler { background: #3d2118; color: #f6d2c8; }

.fuss { font-size: .85em; opacity: .8; padding: 20px 16px 28px; border-top: 2px solid var(--gold); margin-top: 24px; }
.fuss-zeile { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; }
.fuss-hinweis, .fuss-rechtliches { margin: 0; }
.fuss-rechtliches a { margin-left: 2px; }
.fuss-rechtliches a + a::before { content: "· "; margin-right: 4px; }
.partner { margin-top: 14px; padding-top: 12px; border-top: 1px dotted var(--gold); }
.partner-titel { margin: 0 0 4px; font-weight: 600; }
.partner-links { margin: 0; }
.fuss-copy { margin: 18px 0 0; text-align: center; font-size: .9em; }

/* Breitere Bildschirme */
@media (min-width: 768px) {
  body { font-size: 1rem; }
  h1 { font-size: 1.8rem; }
  .kopf { padding: 14px 32px; }
  main { padding: 24px 32px 48px; }
}

/* Teilen-Knöpfe */
.teilen { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 16px; }
.tl { display: inline-flex; align-items: center; height: 34px; padding: 0 12px; border-radius: 17px; border: 1px solid var(--gold); background: transparent; color: var(--dunkelgold); font: 500 .85rem/1 var(--sans); text-decoration: none; cursor: pointer; transition: background .15s, color .15s, transform .15s; }
.tl:hover { background: var(--gold); color: var(--schwarz); transform: translateY(-1px); }
.tl:focus-visible { outline: 2px solid var(--rot); outline-offset: 2px; }
@media (max-width: 480px) { .tl { height: 40px; padding: 0 10px; } }


/* Kompakte Knöpfe und Teilen-Symbole (mit den Dateien in assets/icons) */
.knopf, button { min-height: 36px; line-height: 36px; padding: 0 12px; font-size: .9rem; }
.seiten .knopf { flex: 0 0 auto; }
.tl { height: 32px; padding: 0 11px; font-size: .82rem; gap: 6px; margin: 0; min-height: 0; line-height: 1; }
button.tl { background: transparent; color: var(--dunkelgold); border: 1px solid var(--gold); }
button.tl:hover { background: var(--gold); color: var(--schwarz); }
.witzbild { margin: 16px 0 0; border: 2px solid var(--gold); border-radius: 10px; }

/* Unterseiten "Über das Schwäbische": Menü mit Reiter-Optik */
.unter-menue { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 20px; padding-bottom: 12px; border-bottom: 1px solid var(--gold); }
.unter-menue a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border: 1px solid var(--gold); border-radius: 8px; color: var(--dunkelgold); text-decoration: none; font-size: .9rem; }
.unter-menue a:hover { background: var(--gold); color: var(--schwarz); }
.unter-menue a[aria-current="page"] { background: var(--schwarz); color: #f5efdf; border-color: var(--schwarz); }
.quelle { font-size: .85rem; opacity: .75; font-style: italic; }
.seiten .knopf { margin: 0; }
.tl::before { content: ""; width: 15px; height: 15px; flex: none; background: currentColor;
  -webkit-mask-size: contain; mask-size: contain; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-position: center; mask-position: center; }
.tl[aria-label="Auf WhatsApp teilen"]::before { -webkit-mask-image: url(/assets/icons/whatsapp.svg); mask-image: url(/assets/icons/whatsapp.svg); }
.tl[aria-label="Auf X teilen"]::before { -webkit-mask-image: url(/assets/icons/x.svg); mask-image: url(/assets/icons/x.svg); }
.tl[aria-label="Auf Facebook teilen"]::before { -webkit-mask-image: url(/assets/icons/facebook.svg); mask-image: url(/assets/icons/facebook.svg); }
.tl[aria-label="Auf Telegram teilen"]::before { -webkit-mask-image: url(/assets/icons/telegram.svg); mask-image: url(/assets/icons/telegram.svg); }
.tl[aria-label="Mit Threema teilen"]::before { -webkit-mask-image: url(/assets/icons/threema.svg); mask-image: url(/assets/icons/threema.svg); }
.tl[aria-label="Per E-Mail teilen"]::before { -webkit-mask-image: url(/assets/icons/mail.svg); mask-image: url(/assets/icons/mail.svg); }
.tl[aria-label="Link kopieren"]::before { -webkit-mask-image: url(/assets/icons/link.svg); mask-image: url(/assets/icons/link.svg); }
@media (max-width: 480px) { .tl { height: 36px; width: 36px; padding: 0; justify-content: center; } .tl span { display: none; } }
