/*
 * Neverland Glossar – nur, was das Theme nicht schon hat. Kopf (mm-header), Lesespalte, Initiale, Überschriften,
 * breite Bilder (is-style-breit), Zitat (pullquote), Trennlinie und Blogboxen (blog-zeile) kommen aus dem Theme
 * maxim-matthew-block. Geladen wird diese Datei nur auf Chronik-Seiten; das Theme kann sie abschalten:
 * add_filter('neverland_glossar_stile_laden', '__return_false').
 * Werte aus dem Theme: --gold-tinte (Gold auf Papier, 4,96:1), --font-world (Cinzel), --font-ui (Manrope), --reading.
 */

/* Elemente der Begriffsseite stehen direkt in .entry-content: in die Lesespalte wie die Absätze */
.entry-content > .ng-pfad,
.entry-content > .ng-spoiler,
.entry-content > .ng-unter,
.entry-content > .ng-zitat,
.entry-content > .ng-aldrin,
.entry-content > .ng-weiterlesen { width: var(--reading, min(42.5rem, calc(100vw - 3rem))); margin-inline: auto; }

/* Kicker: Cinzel-Versalien in Gold-Tinte, wie die Labels des Themes */
.ng-kicker, .ng-spoiler summary {
  font: 600 12px/1.3 var(--font-world, Cinzel, Georgia, serif); letter-spacing: .1em; text-transform: uppercase;
  color: var(--gold-tinte, #8a6631);
}

/* Pfad unter dem Kopf: klein, in der UI-Schrift, nimmt der Initiale nicht den Platz */
.entry-content > .ng-pfad { margin-block: 0 1.75rem; font: 500 13px/1.5 var(--font-ui, system-ui, sans-serif); letter-spacing: .04em; color: var(--ink-dim, #5d574e); }
.ng-pfad a { color: inherit; text-decoration: none; }
.ng-pfad a:hover, .ng-pfad a:focus-visible { color: var(--gold-tinte, #8a6631); text-decoration: underline; }

/* Spoiler: Randnotiz mit Goldlinie statt Formularkasten */
.ng-spoiler { margin-block: 2rem; padding: .25rem 0 .25rem 1.25rem; border-left: 1px solid var(--gold-tinte, #8a6631); }
.ng-spoiler summary { display: flex; align-items: center; gap: .6em; min-height: 44px; cursor: pointer; list-style: none; }
.ng-spoiler summary::-webkit-details-marker { display: none; }
.ng-spoiler summary::marker { content: ""; }
.ng-spoiler summary:focus-visible { outline: 1px solid var(--gold-tinte, #8a6631); outline-offset: 4px; }
.ng-auge { width: 18px; height: 18px; flex: none; }
.ng-spoiler-art::after { content: "·"; margin-left: .6em; }
.ng-auf, .ng-spoiler[open] .ng-zu { display: none; }
.ng-spoiler[open] .ng-auf { display: inline; }
.ng-spoiler-text > :first-child { margin-top: .5rem; }
.ng-spoiler-text > :last-child { margin-bottom: 0; }
/* Inline-Zitat: ruhig in der Lesespalte (Big-Zitat = Zitat-Band des Themes) */
.entry-content > .ng-zitat { margin-block: 2rem; padding: .25rem 0 .25rem 1.25rem; border-left: 1px solid var(--gold-tinte, #8a6631); }
.ng-zitat p { margin: 0; font-style: italic; font-size: 1.1em; line-height: 1.6; text-align: left; }
/* Ein Spoiler direkt vor dem Zitat-Band braucht Luft */
.ng-spoiler + .wp-block-pullquote { margin-top: 4rem; }

.ng-link { text-decoration-thickness: 1px; text-underline-offset: .35em; }
/* D1bf: Verweise in Blog und Seiten – gepunktet, damit man sie von normalen Links unterscheidet */
.ng-link-chronik { text-decoration-style: dotted; text-decoration-thickness: 1.5px; }

/* Gold auf Papier nur als Gold-Tinte (Kritik 08.10.2026: #D4B483 auf Papier 1,9:1) */
body .entry-content > h3 { color: var(--gold-tinte, #8a6631); }
body .entry-content figcaption { color: var(--gold-tinte, #8a6631); font-size: 13px; }

/* Aldrín-Wort unter dem Pfad (D1bc): Schrift groß in Kategorietinte, darunter Umschrift, Bedeutung, Link */
.entry-content > .ng-aldrin { margin-block: 0 2.5rem; padding-block: .9rem; border-block: 1px solid var(--paper-rule, rgba(33, 31, 27, .2)); text-align: center; }
/* Kopf der Begriffsseite: das Aldrín-Wort in Schrift (Kategoriefarbe auf Nacht), darunter lateinisch */
/* Abstand zur Überschrift: 36 → 19 px (Maxim 23:51), noch einmal halbiert auf etwa 11 px (23:58) */
.ng-kopf .ng-kopf-aldrin { display: flex; flex-direction: column; gap: .35rem; margin: 0; }
/* Gold und so breit wie der Titel (Maxim 23:50); assets/chronik.js passt die Größe an die gemessene Titelbreite an */
.ng-kopf-titel .ng-kopf-schrift { display: block; color: var(--gold-bright, #d4b483); font-size: 1em; line-height: 1; white-space: nowrap; }
.ng-kopf-titel h1 { margin-top: 0; }
.ng-kopf-latein { color: var(--ivory-dim, #c9c1b3); font: italic 400 17px/1.4 var(--font-author, Georgia, serif); }
.ng-schriftbild .na-schrift-inline, .ng-schriftbild .na-schrift-inline > span { flex-wrap: wrap !important; height: auto !important; row-gap: .3em; }
.ng-kopf-schrift svg { height: 1em !important; }
.entry-content > .ng-aldrin p { margin: 0; font: 400 15px/1.6 var(--font-ui, system-ui, sans-serif); color: var(--ink-dim, #5d574e); text-align: center; }
.ng-aldrin .ng-kicker { margin-right: .4em; }
.ng-aldrin i { color: var(--ink, #211f1b); }
.ng-aldrin a { color: var(--ng-tinte, var(--gold-tinte, #8a6631)); text-underline-offset: .3em; }

/* Ende der Seite: Dazu gehören, Weiterlesen */
.entry-content > .ng-unter { margin-block: 3rem 0; }
.ng-unter p { margin: 0; }
.ng-unter .ng-kicker { margin-bottom: .5rem; }
.ng-weiterlesen { display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; margin-block: 3rem 1rem; padding-top: 1.25rem; border-top: 1px solid var(--paper-rule, rgba(33, 31, 27, .2)); }
.ng-weiterlesen a { display: flex; flex-direction: column; gap: .3rem; min-height: 44px; text-decoration: none; color: inherit; }
.ng-weiterlesen .ng-kapitel-link { align-items: center; text-align: center; }
.ng-weiterlesen .ng-weiter { align-items: flex-end; text-align: right; }
.ng-ziel { font-size: 1.05em; }
.ng-weiterlesen a:hover .ng-ziel, .ng-weiterlesen a:focus-visible .ng-ziel { text-decoration: underline; text-underline-offset: .35em; }

/* ── Übersichten (D1bb): Kategoriekacheln, Buchstabenleiste, Kartenraster ──────────────────────────────────
   Karten wie die Blogboxen des Themes: dunkle Fläche (--surface), Elfenbeinschrift, Titel in --font-author, die
   ganze Karte ist der Link. Ohne Bild steht der Anfangsbuchstabe groß in der Kategoriefarbe (Maxim 22:30). */
:root {
  /* Farben aus der Welt (Maxim 23:12: „Aus der Welt“): Moos, Preiselbeere, Heide, Fjordblau, Gletschertürkis, Rost.
     Hell auf dunklen Flächen (7,3–9,4:1 auf --surface), -tinte auf Papier (6,3–7,8:1 auf --paper). */
  --ng-k-orte: #a7bd8c;               --ng-k-orte-tinte: #4c6034;
  --ng-k-voelker_wesen: #d9929a;      --ng-k-voelker_wesen-tinte: #8a2f3c;
  --ng-k-flora_fauna: #c7a98a;        --ng-k-flora_fauna-tinte: #6b4c30;    /* Torf (Maxim 23:39) */
  --ng-k-sprache: #b9a0cc;            --ng-k-sprache-tinte: #664878;
  --ng-k-magie_lore: #93aecf;         --ng-k-magie_lore-tinte: #32547a;
  --ng-k-dinge: #8cc2bc;              --ng-k-dinge-tinte: #2c6661;
  --ng-k-titel_gesellschaft: #d6936b; --ng-k-titel_gesellschaft-tinte: #8f4527;
}
/* Die ganze Seite einer Kategorie (Kategorieseite, Begriffsseite) trägt deren Farbe */
body.ng-k-orte { --ng-farbe: var(--ng-k-orte); --ng-tinte: var(--ng-k-orte-tinte); }
body.ng-k-voelker_wesen { --ng-farbe: var(--ng-k-voelker_wesen); --ng-tinte: var(--ng-k-voelker_wesen-tinte); }
body.ng-k-flora_fauna { --ng-farbe: var(--ng-k-flora_fauna); --ng-tinte: var(--ng-k-flora_fauna-tinte); }
body.ng-k-sprache { --ng-farbe: var(--ng-k-sprache); --ng-tinte: var(--ng-k-sprache-tinte); }
body.ng-k-magie_lore { --ng-farbe: var(--ng-k-magie_lore); --ng-tinte: var(--ng-k-magie_lore-tinte); }
body.ng-k-dinge { --ng-farbe: var(--ng-k-dinge); --ng-tinte: var(--ng-k-dinge-tinte); }
body.ng-k-titel_gesellschaft { --ng-farbe: var(--ng-k-titel_gesellschaft); --ng-tinte: var(--ng-k-titel_gesellschaft-tinte); }
/* Kopf: die Zeile unter dem Titel und eine Linie am unteren Rand in der Kategoriefarbe */
body[class*="ng-k-"] .mm-header.ng-kopf { border-bottom: 3px solid var(--ng-farbe); }
body[class*="ng-k-"] .mm-header.ng-kopf .date { color: var(--ng-farbe); }
/* Pfad: der Ort, an dem man ist, in Kategorietinte */
.ng-pfad-hier, body[class*="ng-k-"] .entry-content > .ng-pfad a:nth-of-type(2) { color: var(--ng-tinte, var(--gold-tinte, #8a6631)); }
.ng-uebersicht, .ng-kapitelseite { width: min(72rem, var(--shell, calc(100vw - 3rem))); margin: 3rem auto 5rem; }
.ng-kapitelseite .ng-pfad { margin: 0 0 1.25rem; font: 500 13px/1.5 var(--font-ui, system-ui, sans-serif); letter-spacing: .04em; color: var(--ink-dim, #5d574e); }

.ng-kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); gap: clamp(1rem, 2vw, 1.5rem); }
.ng-kachel, .ng-karte {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  background: var(--surface, #131310); color: var(--ivory, #f3ede2);
}
.ng-kachel-bild, .ng-karte-bild {
  position: relative; overflow: hidden; display: grid; place-items: center;
  background: color-mix(in oklab, var(--ng-farbe) 16%, var(--surface, #131310));
}
.ng-kachel-bild { aspect-ratio: 16 / 10; }
.ng-karte-bild { aspect-ratio: 4 / 3; }
.ng-kachel-bild img, .ng-karte-bild img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .9s var(--ease, ease-out); }
.ng-kachel:hover img, .ng-karte:hover img { transform: scale(1.025); }
.ng-initiale { font: 400 clamp(4.5rem, 9vw, 7rem)/1 var(--font-world, Cinzel, Georgia, serif); color: var(--ng-farbe); }
.ng-karte .ng-initiale { font-size: clamp(3.5rem, 6vw, 5rem); }
.ng-kachel-text, .ng-karte-text { display: flex; flex-direction: column; gap: .5rem; padding: clamp(1.25rem, 2.5vw, 2rem); }
.ng-karte-meta { margin: 0; color: var(--ng-farbe); font: 500 13px/1.5 var(--font-ui, system-ui, sans-serif); letter-spacing: .08em; }
.entry-content .ng-kachel h2, .entry-content .ng-karte h3 { margin: 0; color: var(--ivory, #f3ede2); font: 400 clamp(1.5rem, 2.4vw, 2.1rem)/1.08 var(--font-author, Georgia, serif); letter-spacing: -.01em; text-wrap: balance; }
.entry-content .ng-karte h3 { font-size: 1.4rem; }
.entry-content .ng-kachel h2 a, .entry-content .ng-karte h3 a { color: inherit; text-decoration: none; }
.ng-kachel h2 a::after, .ng-karte h3 a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.ng-kachel:has(a:focus-visible), .ng-karte:has(a:focus-visible) { outline: 2px solid var(--gold-bright, #d4b483); outline-offset: 4px; }
.ng-kachel h2 a:focus-visible, .ng-karte h3 a:focus-visible { outline: none; }
.ng-karte-kurz { margin: 0; color: var(--ivory-dim, #c9c1b3); font: var(--type-ui, 400 16px/1.55 system-ui, sans-serif);
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; overflow: hidden; }
.ng-kachel .text-link { margin-top: .5rem; }

/* Ohne Bild: der Begriff in Aldrín-Schrift, hell in der Kategoriefarbe auf getönter Fläche */
.ng-mit-schrift { padding: 1rem 1.25rem; }
.ng-schriftbild { display: block; max-width: 100%; text-align: center; color: var(--ng-farbe); font-size: clamp(1.9rem, 2.8vw, 2.4rem); line-height: 1.5; }
/* neverland_aldrin_schrift setzt Inline-Stile (eine Zeile, 1em hoch); im Kartenbild darf ein langes Wort umbrechen */
.ng-schriftbild .na-schrift-inline, .ng-schriftbild .na-schrift-inline > span { justify-content: center; }
.ng-mit-schrift { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; }
.ng-schrift-latein { color: var(--ivory-dim, #c9c1b3); font: italic 400 15px/1.3 var(--font-author, Georgia, serif); }
.ng-schriftbild svg { height: 1em !important; }

/* A–Z der Startseite: ein Punkt in Kategorietinte vor jedem Begriff (Name für Bildschirmleser daneben) */
.ng-liste li.ng-mit-kategorie a::before { content: ""; display: inline-block; width: .5em; height: .5em; margin-right: .5em; border-radius: 50%; background: var(--ng-tinte); vertical-align: .1em; }

/* Leiste A–Z: springt zum Buchstaben; leere Buchstaben gedimmt, nicht klickbar. Eine Zeile am Desktop. */
.ng-abc ul { display: grid; grid-template-columns: repeat(auto-fit, minmax(2.25rem, 1fr)); gap: .25rem; margin: 0 0 clamp(2rem, 4vw, 3rem); padding: 0; list-style: none; }
.ng-abc a, .ng-abc span { display: grid; place-items: center; min-height: 44px;
  font: 600 15px/1 var(--font-world, Cinzel, Georgia, serif); letter-spacing: .04em; text-decoration: none; }
.ng-abc a { color: var(--ng-tinte, var(--gold-tinte, #8a6631)); border: 1px solid var(--paper-rule, rgba(33, 31, 27, .2)); }
.ng-abc a:hover, .ng-abc a:focus-visible { background: var(--surface, #131310); color: var(--gold-bright, #d4b483); }
.ng-abc span { color: var(--ink-dim, #5d574e); opacity: .45; }

/* Kartenraster mit Buchstabenkacheln: der Buchstabe steht als eigene Zelle vor seinen Karten */
.ng-raster { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr)); gap: clamp(1rem, 2vw, 1.5rem); }
.entry-content .ng-gruppe-buchstabe { align-self: start; scroll-margin-top: 6rem; margin: 0; padding-top: .75rem; letter-spacing: 0; border-top: 2px solid var(--gold-tinte, #8a6631);
  font: 400 clamp(4rem, 7vw, 6rem)/1 var(--font-world, Cinzel, Georgia, serif); color: var(--ng-tinte, var(--gold-tinte, #8a6631)); border-top-color: var(--ng-tinte, var(--gold-tinte, #8a6631)); }

/* Ansicht umschalten: Lexikon (Text, Vorgabe) oder Mit Bildern */
.ng-kapitel-kopf { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 1.25rem; }
.ng-kapitel-kopf .ng-pfad { margin: 0; }
.ng-ansicht { display: inline-flex; border: 1px solid var(--paper-rule, rgba(33, 31, 27, .2)); }
.ng-ansicht[hidden] { display: none; }
.ng-ansicht button { min-height: 44px; padding: 0 1.1rem; border: 0; background: none; cursor: pointer;
  font: 500 14px/1 var(--font-ui, system-ui, sans-serif); letter-spacing: .02em; color: var(--ink-dim, #5d574e); }
.ng-ansicht button[aria-pressed="true"] { background: var(--surface, #131310); color: var(--ivory, #f3ede2); }
.ng-ansicht button:focus-visible { outline: 2px solid var(--gold-tinte, #8a6631); outline-offset: 2px; }

/* Lexikon: dieselben Karten als Text auf Papier, zweispaltig, der Buchstabe über die ganze Breite */
.ng-kapitelseite[data-ansicht="text"] .ng-raster { grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); gap: 0 clamp(1.5rem, 4vw, 3rem); }
.ng-kapitelseite[data-ansicht="text"] .ng-karte-bild { display: none; }
.ng-kapitelseite[data-ansicht="text"] .ng-karte { background: none; color: var(--ink, #211f1b); border-top: 1px solid var(--paper-rule, rgba(33, 31, 27, .2)); }
.ng-kapitelseite[data-ansicht="text"] .ng-karte-text { gap: .3rem; padding: 1rem 0 1.25rem; }
.entry-content .ng-kapitelseite[data-ansicht="text"] .ng-karte h3 { color: var(--ink, #211f1b); font-size: 1.35rem; }
.ng-kapitelseite[data-ansicht="text"] .ng-karte-meta { order: 2; color: var(--ng-tinte, var(--gold-tinte, #8a6631)); }
.ng-kapitelseite[data-ansicht="text"] .ng-karte-kurz { order: 3; }
.ng-kapitelseite[data-ansicht="text"] .ng-karte-kurz { color: var(--ink-dim, #5d574e); -webkit-line-clamp: 2; }
.entry-content .ng-kapitelseite[data-ansicht="text"] .ng-karte h3 a:hover { text-decoration: underline; text-underline-offset: .3em; text-decoration-thickness: 1px; }
.ng-kapitelseite[data-ansicht="text"] .ng-karte:has(a:focus-visible) { outline-color: var(--gold-tinte, #8a6631); }
.entry-content .ng-kapitelseite[data-ansicht="text"] .ng-gruppe-buchstabe { grid-column: 1 / -1; margin-top: 1.5rem; padding-top: 0; border-top: 0; font-size: clamp(2.25rem, 4vw, 3rem); }
.entry-content .ng-kapitelseite[data-ansicht="text"] .ng-gruppe-buchstabe:first-child { margin-top: 0; }

/* D1bd: Suche oben, Sprunglink, klebende Buchstabenleiste */
.ng-suche { margin: 0 0 1rem; }
.ng-suche[hidden] { display: none; }
.ng-suche input { box-sizing: border-box; width: 100%; min-height: 52px; padding: .75rem 1rem; border: 1px solid var(--paper-rule, rgba(33, 31, 27, .2));
  background: var(--paper-white, #fff); color: var(--ink, #211f1b); font: 400 18px/1.4 var(--font-ui, system-ui, sans-serif); border-radius: 0; }
.ng-suche input:focus-visible { outline: 2px solid var(--gold-tinte, #8a6631); outline-offset: 2px; }
.ng-suche-leer { margin: 1rem 0 0; color: var(--ink-dim, #5d574e); }
.ng-sprung { margin: 0 0 1.5rem; font: 500 14px/1.5 var(--font-ui, system-ui, sans-serif); }
.ng-sprung a { color: var(--gold-tinte, #8a6631); text-underline-offset: .3em; }
.ng-uebersicht.ng-sucht .ng-kacheln, .ng-uebersicht.ng-sucht .ng-sprung, .ng-uebersicht.ng-sucht .ng-index > .ng-abc { display: none; }
.ng-uebersicht.ng-sucht .ng-index { margin-top: 1.5rem; }
.ng-liste li[hidden], .ng-index-gruppe[hidden] { display: none; }
.ng-abc { position: sticky; top: 0; z-index: 5; padding-block: .5rem; background: var(--paper, #fbf9f5); }
.ng-abc ul { margin-bottom: 0; }
.ng-abc + * { margin-top: clamp(1.5rem, 3vw, 2.5rem); }

/* A–Z aller Begriffe unter den Kacheln: Textliste, auch bei 600 Einträgen ruhig */
.ng-index { margin-top: clamp(4rem, 8vw, 6rem); }
.entry-content .ng-index-titel { margin: 0 0 1.25rem; font: 400 clamp(1.8rem, 3vw, 2.6rem)/1.1 var(--font-author, Georgia, serif); }
.ng-index-gruppe { scroll-margin-top: 6rem; }
.entry-content .ng-buchstabe { margin: 2rem 0 .5rem; font: 400 1.6rem/1 var(--font-world, Cinzel, Georgia, serif); color: var(--gold-tinte, #8a6631); }
.ng-liste { columns: 3 14em; list-style: none; padding: 0; margin: 0; }
.ng-liste li { break-inside: avoid; padding: .2em 0; }

@media (prefers-reduced-motion: reduce) { .ng-kachel-bild img, .ng-karte-bild img { transition: none; } }
/* Telefon: nur Buchstaben mit Einträgen (sonst vier Zeilen Leiste); die Buchstabenkachel wird eine flache Zeile */
@media (max-width: 760px) {
  .ng-abc li:has(> span) { display: none; }
  /* klebt oben: eine Zeile, seitlich wischbar, statt drei Zeilen (156 px) über dem Text */
  .ng-abc ul { display: flex; gap: .25rem; overflow-x: auto; scrollbar-width: none; }
  .ng-abc ul::-webkit-scrollbar { display: none; }
  .ng-abc li { flex: 0 0 2.75rem; }
  .entry-content .ng-gruppe-buchstabe { font-size: 2.75rem; padding-top: .5rem; margin-top: .5rem; }
}
.ng-hinweis { width: var(--reading, 42.5rem); margin: 3rem auto; }
