/* Gemeinsame Teile der Boards D, E, F. Baut auf seite.css auf (Tokens, Schriften, Board-Rahmen). */
html[data-schrift="b"] { --f-grund: "Helvetica Now Text", "Helvetica Now Display", "Helvetica Neue", Helvetica, Arial, sans-serif; --f-akzent: "Citadel Script", "Pinyon Script", cursive; --akzent-groesse: 1.15; }
:root { --t-flagge: .5s; --schatten-modell: drop-shadow(0 18px 18px rgba(40, 34, 28, .22)); }

/* ---------- Korn über allem ---------- */
.korn-ebene { position: fixed; inset: 0; z-index: 95; pointer-events: none; overflow: hidden; }
.korn-kachel { position: absolute; inset: -96px; background: url("../bilder/korn.png") repeat; background-size: 192px 192px; animation: korn .8s steps(1) infinite; }
@keyframes korn { 0% { transform: translate(0, 0); } 12% { transform: translate(-56px, 32px); } 25% { transform: translate(40px, -48px); } 37% { transform: translate(-24px, -72px); } 50% { transform: translate(64px, 24px); } 62% { transform: translate(-72px, 56px); } 75% { transform: translate(32px, 72px); } 87% { transform: translate(-40px, -24px); } }
@media (prefers-reduced-motion: reduce) { .korn-kachel { animation: none; } }

/* ---------- Flagge an der Nadel über dem Kopf ---------- */
.flagge { display: block; width: 100%; height: auto; }
.kopf-flagge { position: absolute; z-index: 3; width: 22px; transform: translate(-50%, calc(-100% - 6px)); pointer-events: auto; animation: flagge-auf var(--t-flagge) var(--kurve-gleiten) var(--v, 0s) both; }
.kopf-flagge .flagge { box-shadow: 0 1px 0 rgba(0, 0, 0, .18); transform-origin: left center; }
.kopf-flagge i { display: block; width: 1px; height: 14px; margin-left: 0; background: #2b2723; }
.kopf-flagge::after { content: ""; position: absolute; left: -1.5px; bottom: -2px; width: 4px; height: 4px; border-radius: 50%; background: #2b2723; }
@keyframes flagge-auf { from { opacity: 0; transform: translate(-50%, calc(-100% + 4px)); } to { opacity: 1; transform: translate(-50%, calc(-100% - 6px)); } }
/* Fahnenstange steht links, also Flagge rechts an der Nadel */
.kopf-flagge { transform: translate(-1px, calc(-100% - 6px)); }
@keyframes flagge-auf { from { opacity: 0; transform: translate(-1px, calc(-100% + 4px)); } to { opacity: 1; transform: translate(-1px, calc(-100% - 6px)); } }

/* ---------- Übergang Modell → Szene ---------- */
.uebergang { position: fixed; inset: 0; z-index: 80; pointer-events: none; }
.uebergang .u-modell { position: absolute; object-fit: contain; transform-origin: center; will-change: transform; }
.uebergang .u-grund { position: absolute; inset: 0; background: var(--grund); opacity: 0; }
.uebergang .u-feld { position: absolute; overflow: hidden; }
.uebergang .u-szene { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; will-change: opacity, transform; }

/* ---------- Szenenansicht als Ebene ---------- */
.ansicht { position: fixed; inset: 0; z-index: 70; background: #cfcac2; display: none; }
.ansicht.offen { display: block; }
.ansicht .bild { position: absolute; inset: 0; }
.ansicht .bild img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ansicht .zurueck { position: absolute; z-index: 6; left: var(--rand); top: 18px; }
.ansicht .oeffnen { position: absolute; z-index: 6; right: var(--rand); top: 18px; }

/* Flaggen-Bild: Prozentlagen gelten für das ganze Bild, darum Bildrahmen im Seitenverhältnis */
.bildrahmen { position: relative; aspect-ratio: 16 / 10; overflow: hidden; }
.bildrahmen > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ansicht .bildrahmen { position: absolute; left: 50%; top: 50%; width: max(100vw, 160svh); transform: translate(calc(-50% + var(--fx, 0px)), -50%); }

/* ---------- Liste der Gefallenen ---------- */
.gefallene details > summary { list-style: none; cursor: pointer; }
.gefallene details > summary::-webkit-details-marker { display: none; }
.g-liste { list-style: none; margin: 0; padding: 0; }
.g { display: grid; grid-template-columns: 4.2em 26px minmax(10em, 1.3fr) 1.4fr 1fr; gap: 0 var(--fuge); align-items: baseline; padding: 11px 0 12px; border-bottom: 1px solid var(--linie); font-size: 15px; }
.g-zeit { color: var(--mohn); font-variant-numeric: tabular-nums; }
.g-flagge { width: 22px; align-self: center; }
.g-name { font-family: var(--f-akzent); font-size: calc(22px * var(--akzent-groesse)); line-height: 1; }
.g-einheit, .g-ort { color: var(--neben); font-size: 13.5px; }
.g.unsicher .g-name::after { content: "*"; font-family: var(--f-grund); font-size: 14px; vertical-align: super; color: var(--neben); }
.g-name.namenlos { font-family: var(--f-grund); font-size: 15px; color: var(--neben); }
.g-zahlen { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: var(--fuge); }
.g-zahlen li { display: grid; grid-template-columns: 22px 1fr; gap: 4px 10px; align-items: baseline; }
.g-zahlen .z-flagge { width: 22px; align-self: center; }
.g-zahlen .z-n { font-size: 34px; letter-spacing: -.03em; font-weight: 500; font-variant-numeric: tabular-nums; line-height: 1; }
.g-zahlen .z-t { grid-column: 2; font-size: 13px; color: var(--neben); }
@media (max-width: 760px) {
  .g { grid-template-columns: 3.6em 22px 1fr; padding: 10px 0; }
  .g-einheit, .g-ort { grid-column: 3; font-size: 12.5px; }
}

/* ---------- Sprachwahl ---------- */
.sprache { display: inline-flex; border: 1px solid currentColor; border-radius: 99px; padding: 3px; gap: 2px; }
.sprache button { border: 0; background: none; border-radius: 99px; padding: 5px 13px; cursor: pointer; font-size: 13px; color: inherit; }
.sprache button[aria-pressed="true"] { background: currentColor; }
.sprache button[aria-pressed="true"] span { color: var(--schluss-grund, var(--grund)); }

/* ---------- Knöpfe ---------- */
.knopf-hell { border: 1px solid var(--text); background: var(--grund); color: var(--text); border-radius: 99px; padding: 8px 16px; cursor: pointer; font-size: 14px; text-decoration: none; display: inline-flex; gap: 8px; align-items: center; }
.knopf-dunkel { border: 1px solid var(--text); background: var(--text); color: var(--grund); border-radius: 99px; padding: 8px 16px; cursor: pointer; font-size: 14px; text-decoration: none; display: inline-flex; gap: 8px; align-items: center; }

/* ---------- Modelle ---------- */
.modell { display: block; width: 100%; height: auto; transition: transform var(--t-hand) var(--kurve-gleiten); }
.modell-knopf { border: 0; background: none; padding: 0; cursor: pointer; display: block; width: 100%; color: inherit; text-align: inherit; }
.modell-knopf:hover .modell, .modell-knopf:focus-visible .modell { transform: translateY(-6px) scale(1.03); }
.nationen { display: inline-flex; gap: 3px; vertical-align: middle; }
.nationen .flagge { width: 15px; box-shadow: 0 0 0 .5px rgba(0, 0, 0, .2); }
