/* =========================================================
   HAXENFÜHRER — Ember Hall
   Ein bewusst einthemiges, dunkles Glut-Interface.
   ========================================================= */

:root {
  color-scheme: dark;

  /* Grund & Flächen (warm gebrochene Neutrale, Richtung Kruste) */
  --russ:        #0A0806;
  --pfanne:      #13100D;
  --pfanne-hoch: #1B1613;
  --pfanne-tief: #060504;
  --linie:       #2B221D;
  --linie-hell:  #43352C;

  /* Akzente */
  --kruste:      #E9963C;
  --kruste-hell: #F8C179;
  --glut:        #FF5324;
  --senf:        #E6C846;
  --enzian:      #5E8FD0;

  /* Schrift */
  --sahne:       #F6EADC;
  --dimm:        #A89685;
  --dimm-tief:   #7A6B5E;

  /* Semantik */
  --gut:         #8FBF6A;
  --mies:        #E0523F;
  --gold:        #EFC463;
  --silber:      #C8CCD2;
  --bronze:      #C08552;

  /* Schriftfamilien */
  --f-display: 'Alfa Slab One', Rockwell, Georgia, serif;
  --f-schild:  'Bebas Neue', 'Arial Narrow', Impact, sans-serif;
  --f-body:    'Archivo', 'Segoe UI', system-ui, sans-serif;
  --f-data:    'Space Mono', ui-monospace, 'Courier New', monospace;
  --f-fraktur: 'UnifrakturMaguntia', 'Alfa Slab One', serif;

  /* Maße */
  --wrap: 1200px;
  --gut-x: clamp(1.1rem, 4vw, 2.5rem);
  --rad: 3px;
}

* { box-sizing: border-box; }

/* Muss vor allen display-Regeln stehen: eigene Klassen mit display:flex oder
   grid sind spezifischer als die Grundregel des Browsers und würden sonst
   verborgene Elemente trotzdem zeichnen. */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--russ);
  color: var(--sahne);
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.62;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg, canvas { max-width: 100%; }
a { color: inherit; }

h1, h2, h3, h4 { text-wrap: balance; margin: 0; }
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

::selection { background: var(--glut); color: #fff; }

:focus-visible {
  outline: 2px solid var(--kruste-hell);
  outline-offset: 3px;
  border-radius: 2px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 50%; top: -100px; z-index: 200;
  transform: translateX(-50%);
  background: var(--kruste); color: var(--russ);
  padding: .7rem 1.2rem; font-family: var(--f-schild);
  letter-spacing: .08em; text-decoration: none;
}
.skip:focus { top: .6rem; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gut-x);
}

.mono { font-family: var(--f-data); }

/* Ankersprünge dürfen nicht unter der klebenden Kopfleiste landen */
main > section[id] { scroll-margin-top: 82px; }
/* Gleiches gilt, wenn die Prüfung auf ein fehlerhaftes Feld springt */
#haxen-form input, #haxen-form textarea { scroll-margin-top: 100px; }

/* ---------- Filmkorn über allem ---------- */
.korn {
  position: fixed; inset: 0; z-index: 90; pointer-events: none;
  opacity: .05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* =========================================================
   Knöpfe
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .5rem;
  font-family: var(--f-schild);
  font-size: 1.05rem;
  letter-spacing: .075em;
  text-transform: uppercase;
  text-decoration: none;
  padding: .62rem 1.15rem .5rem;
  border: 1px solid transparent;
  border-radius: var(--rad);
  cursor: pointer;
  transition: transform .14s ease, background-color .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease;
  white-space: nowrap;
}
.btn-gross { font-size: 1.25rem; padding: .85rem 1.7rem .7rem; }
.btn-klein { font-size: .95rem; padding: .48rem .85rem .36rem; }

.btn-glut {
  background: linear-gradient(178deg, var(--kruste) 0%, var(--glut) 130%);
  color: #170B04;
  box-shadow: 0 0 0 0 rgba(255,83,36,.5);
}
.btn-glut:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 30px -12px rgba(255,83,36,.85);
}

.btn-geist {
  background: transparent;
  color: var(--sahne);
  border-color: var(--linie-hell);
}
.btn-geist:hover {
  border-color: var(--kruste);
  color: var(--kruste-hell);
  transform: translateY(-2px);
}

/* =========================================================
   Kopfleiste
   ========================================================= */
.topbar {
  position: sticky; top: 0; z-index: 80;
  background: rgba(10,8,6,.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--linie);
}
.topbar-in {
  display: flex; align-items: center; gap: 1.5rem;
  min-height: 66px;
}
.marke {
  display: grid;
  grid-template-columns: auto auto;
  grid-template-rows: auto auto;
  column-gap: .55rem;
  align-items: center;
  text-decoration: none;
  margin-right: auto;
}
.marke-glyph {
  grid-row: 1 / 3;
  display: grid; place-items: center;
  width: 34px; height: 34px;
  background: var(--kruste);
  color: #2A1305;
  border-radius: 2px;
  transform: rotate(-6deg);
}
.marke-glyph svg { width: 22px; height: 22px; fill: currentColor; }
.marke-text {
  font-family: var(--f-display);
  font-size: 1.12rem;
  letter-spacing: -.01em;
  line-height: 1;
  color: var(--sahne);
}
.marke-sub {
  font-family: var(--f-schild);
  font-size: .74rem; letter-spacing: .22em;
  color: var(--dimm-tief); line-height: 1.4;
}
.nav { display: flex; gap: 1.6rem; }
.nav a {
  font-family: var(--f-schild);
  font-size: 1.05rem; letter-spacing: .11em;
  text-transform: uppercase;
  color: var(--dimm);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid transparent;
  transition: color .16s ease, border-color .16s ease;
}
.nav a:hover { color: var(--kruste); border-bottom-color: var(--kruste); }
.nav a[aria-current="true"] { color: var(--sahne); border-bottom-color: var(--kruste); }

.topbar-tools { display: flex; align-items: center; gap: .8rem; }

/* =========================================================
   Held / Hero
   ========================================================= */
.held {
  position: relative;
  padding-top: clamp(2.2rem, 5vw, 4rem);
  padding-bottom: clamp(2.5rem, 5vw, 4rem);
  background:
    radial-gradient(120% 90% at 78% 8%, rgba(255,83,36,.16) 0%, rgba(255,83,36,0) 55%),
    radial-gradient(80% 70% at 8% 100%, rgba(233,150,60,.10) 0%, rgba(233,150,60,0) 60%),
    var(--russ);
  overflow: hidden;
}
/* Die Aufnahme trägt den Hero. Sie liegt ganzflächig dahinter,
   die Haxe sitzt rechts, die Schrift links auf der dunklen Seite. */
.held-bild {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 72% 44%;
  filter: saturate(1.06) contrast(1.05) brightness(.9);
  z-index: 0;
}
.held::before {
  content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(to right, rgba(10,8,6,.95) 0%, rgba(10,8,6,.88) 30%, rgba(10,8,6,.42) 56%, rgba(10,8,6,.10) 78%, rgba(10,8,6,.40) 100%),
    linear-gradient(to bottom, rgba(10,8,6,.86) 0%, rgba(10,8,6,.30) 22%, rgba(10,8,6,.25) 58%, rgba(10,8,6,.92) 100%);
}

.held-in {
  position: relative; z-index: 2;
  display: grid;
  grid-template-columns: minmax(0, min(60%, 660px));
  gap: clamp(1.8rem, 4vw, 3.5rem);
  align-items: center;
}
.held-bildnachweis {
  position: relative; z-index: 2;
  max-width: var(--wrap);
  margin: 1.6rem auto 0;
  padding-inline: var(--gut-x);
  font-family: var(--f-data);
  font-size: .7rem; line-height: 1.6;
  color: var(--dimm-tief);
}

.augenbraue {
  font-family: var(--f-schild);
  font-size: .92rem;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--kruste);
}

.wortmarke {
  font-family: var(--f-display);
  font-size: clamp(3.3rem, 11.5vw, 8.2rem);
  line-height: .84;
  letter-spacing: -.025em;
  margin: .35rem 0 0;
  display: flex; flex-direction: column;
}
.wm-1 {
  color: transparent;
  -webkit-text-stroke: 2px var(--sahne);
  text-shadow: 0 0 44px rgba(246,234,220,.14);
}
.wm-2 {
  background: linear-gradient(174deg, var(--kruste-hell) 0%, var(--kruste) 38%, var(--glut) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  position: relative;
  padding-left: .06em;
}
.wm-reg {
  font-family: var(--f-body);
  font-weight: 600;
  font-size: .13em;
  vertical-align: super;
  -webkit-text-fill-color: var(--dimm);
  letter-spacing: 0;
}

.stempel {
  display: inline-flex; flex-direction: column; align-items: center;
  margin-top: 1.3rem;
  padding: .5rem 1.1rem .4rem;
  border: 2px solid rgba(255,83,36,.55);
  outline: 1px solid rgba(255,83,36,.28);
  outline-offset: 3px;
  border-radius: 2px;
  transform: rotate(-3.2deg);
  color: var(--glut);
  opacity: .92;
}
.stempel span {
  font-family: var(--f-schild); font-size: .78rem; letter-spacing: .2em; text-transform: uppercase;
  line-height: 1.5;
}
.stempel strong {
  font-family: var(--f-display); font-size: .98rem; letter-spacing: .02em; line-height: 1.25;
}

.held-lead {
  max-width: 56ch;
  margin-top: 1.6rem;
  font-size: 1.12rem;
  color: var(--dimm);
}
.held-lead strong { color: var(--sahne); font-weight: 600; }

.held-cta { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }

.kennzahlen {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  margin: 2.4rem 0 0;
  border-top: 1px solid var(--linie);
  border-bottom: 1px solid var(--linie);
}
.kennzahlen > div {
  padding: .95rem 1rem .9rem 0;
  border-right: 1px solid var(--linie);
}
.kennzahlen > div:last-child { border-right: 0; }
.kennzahlen > div + div { padding-left: 1rem; }
.kennzahlen dt {
  font-family: var(--f-schild);
  font-size: .76rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--dimm-tief);
}
.kennzahlen dd {
  margin: .15rem 0 0;
  font-family: var(--f-display);
  font-size: clamp(1.3rem, 2.4vw, 1.85rem);
  line-height: 1.1;
  color: var(--sahne);
  font-variant-numeric: tabular-nums;
}
.kennzahlen .gag { color: var(--glut); }

/* --- Krustometer --- */
.krustometer {
  margin: 0;
  padding: 1.4rem 1.4rem 1.1rem;
  background: linear-gradient(165deg, var(--pfanne-hoch), var(--pfanne-tief));
  border: 1px solid var(--linie-hell);
  border-radius: 4px;
  box-shadow: inset 0 1px 0 rgba(246,234,220,.06), 0 28px 60px -35px #000;
}
.krustometer figcaption {
  display: flex; flex-direction: column;
  border-bottom: 1px solid var(--linie);
  padding-bottom: .6rem; margin-bottom: .3rem;
}
.geraet-label {
  font-family: var(--f-display); font-size: 1.18rem; color: var(--sahne); line-height: 1.2;
}
.geraet-sub {
  font-family: var(--f-schild); font-size: .8rem; letter-spacing: .2em;
  text-transform: uppercase; color: var(--dimm-tief);
}
#gauge { display: block; width: 100%; height: auto; }
.geraet-fuss {
  font-size: .74rem; line-height: 1.5; color: var(--dimm-tief);
  border-top: 1px solid var(--linie); padding-top: .6rem;
}
.geraet-fuss .mono { color: var(--dimm); font-size: .72rem; }

/* Rauten-Band (bayerisches Motiv als Trennlinie) */
.raute {
  position: absolute; left: 0; right: 0; bottom: 0; height: 9px;
  background:
    repeating-linear-gradient(45deg,  rgba(94,143,208,.30) 0 9px, transparent 9px 18px),
    repeating-linear-gradient(-45deg, rgba(94,143,208,.30) 0 9px, transparent 9px 18px),
    var(--pfanne-tief);
  border-top: 1px solid var(--linie);
}

/* =========================================================
   Laufband
   ========================================================= */
.laufband {
  background: var(--kruste);
  color: #2A1305;
  overflow: hidden;
  border-bottom: 1px solid rgba(0,0,0,.35);
  padding: .48rem 0;
}
.laufband-spur {
  display: flex; gap: 0; width: max-content;
  animation: schieben 58s linear infinite;
}
.laufband-spur span {
  font-family: var(--f-schild);
  font-size: 1.02rem; letter-spacing: .1em; text-transform: uppercase;
  padding-inline: 1.1rem;
  white-space: nowrap;
}
.laufband-spur span::after { content: '✦'; margin-left: 1.1rem; opacity: .55; }
@keyframes schieben { to { transform: translateX(-50%); } }

/* =========================================================
   Schaustück — vollbreite Referenzaufnahme
   ========================================================= */
.schaustueck {
  position: relative;
  display: grid;
  align-items: end;
  min-height: clamp(320px, 45vw, 580px);
  overflow: clip;
  background: var(--russ);
  border-bottom: 1px solid var(--linie);
}
.schaustueck-bild {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: 60% 46%;
  /* leicht in die Glut-Palette gezogen, damit das Foto nicht aufgeklebt wirkt */
  filter: saturate(1.06) contrast(1.05) brightness(.93);
}
/* Schleier: links dunkel für den Text, rechts offen für die Haxe,
   oben und unten in den Seitengrund auslaufend */
.schaustueck::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to right, rgba(10,8,6,.92) 0%, rgba(10,8,6,.70) 28%, rgba(10,8,6,.16) 56%, rgba(10,8,6,.06) 78%, rgba(10,8,6,.38) 100%),
    linear-gradient(to bottom, rgba(10,8,6,.72) 0%, rgba(10,8,6,0) 24%, rgba(10,8,6,0) 58%, rgba(10,8,6,.9) 100%);
}
.schaustueck-in {
  position: relative; z-index: 1;
  padding-block: clamp(1.8rem, 4vw, 3rem);
  display: grid; gap: .7rem;
  max-width: min(var(--wrap), 100%);
}
.schaustueck-satz {
  max-width: 34ch;
  font-family: var(--f-display);
  font-size: clamp(1.15rem, 2.3vw, 1.85rem);
  line-height: 1.28;
  color: var(--sahne);
  text-shadow: 0 2px 18px rgba(6,4,2,.85);
}
.schaustueck-az {
  font-family: var(--f-data);
  font-size: .72rem; line-height: 1.6;
  color: var(--dimm);
  max-width: 46ch;
}

/* =========================================================
   Abschnitte
   ========================================================= */
.abschnitt {
  padding-block: clamp(3.4rem, 7vw, 6rem);
  background: var(--russ);
  position: relative;
}
.abschnitt-dunkel {
  background:
    radial-gradient(90% 60% at 50% 0%, rgba(233,150,60,.07), transparent 65%),
    var(--pfanne);
  border-top: 1px solid var(--linie);
  border-bottom: 1px solid var(--linie);
}
.abschnitt-kopf { max-width: 62ch; margin-bottom: clamp(2rem, 4vw, 3rem); }
.abschnitt-kopf-breit { max-width: 72ch; }
.abschnitt-kopf h2 {
  font-family: var(--f-display);
  font-size: clamp(2.2rem, 5.4vw, 3.7rem);
  line-height: .98;
  letter-spacing: -.02em;
  margin: .5rem 0 .9rem;
}
.abschnitt-lead { color: var(--dimm); font-size: 1.08rem; }
.abschnitt-lead strong { color: var(--kruste); font-weight: 600; }
.abschnitt-lead em { color: var(--sahne); font-style: italic; }

/* =========================================================
   Regelwerk
   ========================================================= */
.regel-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.regel-h {
  font-family: var(--f-schild);
  font-size: 1.08rem; letter-spacing: .2em; text-transform: uppercase;
  color: var(--dimm-tief);
  padding-bottom: .5rem;
  border-bottom: 1px solid var(--linie);
  margin-bottom: 1.1rem;
}
.regel-h-2 { margin-top: 2.6rem; }

.regelblock { margin-bottom: clamp(2.4rem, 5vw, 3.6rem); }
.regel-kopfzeile {
  display: grid; gap: .5rem;
  margin-bottom: 1.3rem;
  padding-bottom: .7rem;
  border-bottom: 1px solid var(--linie);
}
.regel-kopfzeile .regel-h { border-bottom: 0; padding-bottom: 0; margin-bottom: 0; }
.regel-notiz {
  font-size: .95rem; color: var(--dimm);
  max-width: 62ch;
}
.regel-notiz em { color: var(--kruste); font-style: normal; font-weight: 600; }
.regel-spalte .regel-notiz { margin-top: -.4rem; margin-bottom: 1.1rem; }

/* --- § 2: der zerlegte Beispielpunkt --- */
.punktanatomie {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 0 clamp(1rem, 2.5vw, 2.2rem);
  align-items: start;
  padding: clamp(1.1rem, 2.5vw, 1.8rem);
  background: linear-gradient(168deg, var(--pfanne-hoch), var(--pfanne-tief));
  border: 1px solid var(--linie-hell);
  border-radius: 4px;
}
.punktanatomie li { display: contents; }
.pa-wert {
  grid-row: 1;
  display: flex; align-items: baseline; gap: .5rem;
  font-family: var(--f-display);
  font-size: clamp(1.05rem, 2.1vw, 1.45rem);
  line-height: 1.25;
  color: var(--sahne);
  padding-bottom: .7rem;
  white-space: nowrap;
}
.pa-glyphen { display: inline-flex; gap: 3px; align-self: center; }
.pa-glyphen svg { width: 19px; height: 19px; fill: currentColor; }
.pa-zahl { color: var(--kruste); font-weight: 400; }
.pa-wort { color: var(--kruste); }
.pa-satz {
  color: var(--dimm);
  font-family: var(--f-body); font-weight: 400; font-style: italic;
  font-size: clamp(.95rem, 1.7vw, 1.15rem);
  white-space: normal;
}
.pa-label {
  grid-row: 2;
  font-family: var(--f-schild);
  font-size: .82rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--kruste);
  padding-top: .6rem;
  border-top: 2px solid var(--linie-hell);
  position: relative;
}
.pa-label::before {
  content: ''; position: absolute; top: -2px; left: 0;
  width: 10px; height: 8px;
  border-left: 2px solid var(--kruste);
  border-top: 2px solid var(--kruste);
}
.pa-hinweis {
  grid-row: 3;
  font-size: .82rem; line-height: 1.5;
  color: var(--dimm-tief);
  padding-top: .2rem;
  max-width: 34ch;
}

/* --- § 3: Währungen --- */
.waehrungen { display: grid; gap: 0; }
.waehrungen li {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 1.1rem;
  padding: 1.05rem 0;
  border-bottom: 1px solid var(--linie);
  align-items: start;
}
.waehrungen li:first-child { padding-top: 0; }
.w-icon {
  display: grid; place-items: center;
  width: 54px; height: 54px;
  border: 1px solid currentColor;
  border-radius: 3px;
  background:
    linear-gradient(168deg, rgba(255,255,255,.045), transparent),
    var(--pfanne-tief);
  box-shadow: inset 0 0 20px -12px currentColor;
}
.w-icon svg { width: 28px; height: 28px; }
.w-name {
  font-family: var(--f-display); font-size: 1.08rem; line-height: 1.3; color: var(--sahne);
}
.w-ressort {
  font-family: var(--f-schild); font-size: .78rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--kruste); display: block; margin-bottom: .2rem;
}
.w-text { font-size: .92rem; color: var(--dimm); margin-top: .25rem; }

.skala { display: grid; gap: 0; }
.skala li {
  display: grid;
  grid-template-columns: 1.6rem auto minmax(0, 1fr);
  gap: .9rem;
  align-items: center;
  padding: .8rem 0;
  border-bottom: 1px dashed var(--linie);
}
.skala-zahl {
  font-family: var(--f-display); font-size: 1.15rem; line-height: 1;
  color: var(--kruste); font-variant-numeric: tabular-nums; text-align: right;
}
.skala-glyphen { display: flex; gap: 3px; }
.skala-glyphen svg { width: 17px; height: 17px; fill: currentColor; }
.skala p { font-size: .93rem; color: var(--dimm); }

/* --- § 1: Krustenklassen als Messbalken auf einer 0-bis-10-Achse --- */
.klassen { display: grid; gap: 0; }
.klassen li {
  display: grid;
  grid-template-columns: minmax(0, 15rem) minmax(140px, 1fr) auto;
  gap: .3rem clamp(1rem, 2.5vw, 1.8rem);
  align-items: center;
  padding: .85rem 0;
  border-bottom: 1px solid var(--linie);
}
.klassen li:first-child { padding-top: 0; }
.kl-name {
  font-family: var(--f-schild); font-size: 1.12rem; letter-spacing: .08em;
  text-transform: uppercase;
}
.kl-spur {
  position: relative; display: block; height: 9px;
  background: var(--pfanne-tief);
  border: 1px solid var(--linie);
  border-radius: 5px;
}
.kl-spur i {
  position: absolute; top: -1px; bottom: -1px;
  border-radius: 5px;
  box-shadow: 0 0 14px -4px currentColor;
}
.kl-bereich {
  font-family: var(--f-data); font-size: .8rem; color: var(--dimm);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
.kl-text {
  grid-column: 1 / -1;
  font-size: .88rem; color: var(--dimm-tief);
}

/* =========================================================
   Rangliste
   ========================================================= */
/* Kopfzeile der Rangliste: Text links, Messinstrument rechts */
.rangliste-kopf {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 380px);
  gap: clamp(1.8rem, 4vw, 3.5rem);
  align-items: center;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.rangliste-kopf .abschnitt-kopf { margin-bottom: 0; }

.podest {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: 1rem;
  align-items: stretch;
}
.rang {
  position: relative;
  display: flex; flex-direction: column;
  padding: 1.5rem 1.4rem 1.3rem;
  background: linear-gradient(168deg, var(--pfanne-hoch), var(--pfanne-tief));
  border: 1px solid var(--linie-hell);
  border-top: 3px solid var(--rang-farbe, var(--linie-hell));
  border-radius: 3px;
  text-align: left;
  cursor: pointer;
  font: inherit; color: inherit;
  transition: transform .16s ease, border-color .16s ease;
}
.rang:hover { transform: translateY(-4px); border-color: var(--rang-farbe); }
.rang-1 { --rang-farbe: var(--gold); }
.rang-2 { --rang-farbe: var(--silber); }
.rang-3 { --rang-farbe: var(--bronze); }

.rang-ziffer {
  position: absolute; top: .4rem; right: .9rem;
  font-family: var(--f-display);
  font-size: clamp(3.6rem, 7vw, 5.6rem);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--rang-farbe);
  opacity: .28;
  pointer-events: none;
}
.rang-medaille {
  font-family: var(--f-schild); font-size: .82rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--rang-farbe);
}
.rang-lokal {
  font-family: var(--f-display);
  font-size: clamp(1.25rem, 2.2vw, 1.7rem);
  line-height: 1.12; margin-top: .35rem;
  max-width: 14ch;
}
.rang-1 .rang-lokal { font-size: clamp(1.5rem, 2.8vw, 2.15rem); max-width: 12ch; }
.rang-stadt {
  font-family: var(--f-schild); font-size: .88rem; letter-spacing: .15em;
  text-transform: uppercase; color: var(--dimm-tief); margin-top: .3rem;
}
.rang-zitat {
  font-size: .95rem; color: var(--dimm); margin-top: .9rem;
  border-left: 2px solid var(--linie-hell); padding-left: .8rem;
  font-style: italic;
}
.rang-fuss {
  margin-top: auto; padding-top: 1.1rem;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem;
  border-top: 1px solid var(--linie);
}
.rang-score {
  font-family: var(--f-display);
  font-size: clamp(2rem, 4vw, 2.9rem);
  line-height: .9;
  color: var(--rang-farbe);
  font-variant-numeric: tabular-nums;
}
.rang-punkte { display: flex; flex-wrap: wrap; gap: .3rem; justify-content: flex-end; }

/* Gummikruste-Band */
.schande {
  margin-top: 1rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: clamp(1rem, 3vw, 2.4rem);
  align-items: center;
  padding: 1.3rem clamp(1.1rem, 3vw, 1.8rem);
  background:
    repeating-linear-gradient(-45deg, rgba(224,82,63,.08) 0 12px, transparent 12px 24px),
    var(--pfanne-tief);
  border: 1px solid rgba(224,82,63,.4);
  border-left: 4px solid var(--mies);
  border-radius: 3px;
  cursor: pointer;
  text-align: left; font: inherit; color: inherit;
  transition: border-color .16s ease, transform .16s ease;
}
.schande:hover { transform: translateY(-3px); border-color: var(--mies); }
.schande-titel {
  font-family: var(--f-schild); font-size: .84rem; letter-spacing: .2em;
  text-transform: uppercase; color: var(--mies);
}
.schande-lokal { font-family: var(--f-display); font-size: 1.35rem; line-height: 1.15; margin-top: .2rem; }
.schande-zitat { color: var(--dimm); font-size: .95rem; font-style: italic; margin-top: .3rem; }
.schande-score {
  font-family: var(--f-display); font-size: clamp(2.2rem, 5vw, 3.2rem);
  color: var(--mies); line-height: .9; font-variant-numeric: tabular-nums;
}

/* =========================================================
   Steuerung
   ========================================================= */
.steuerung {
  display: grid;
  grid-template-columns: minmax(200px, 280px) minmax(0, 1fr) auto;
  gap: 1rem clamp(1rem, 2.5vw, 2rem);
  align-items: center;
  padding-bottom: 1.2rem;
  border-bottom: 1px solid var(--linie);
}
.such-feld input {
  width: 100%;
  background: var(--pfanne-hoch);
  border: 1px solid var(--linie-hell);
  border-radius: 2px;
  color: var(--sahne);
  font-family: var(--f-body); font-size: .95rem;
  padding: .62rem .8rem;
}
.such-feld input::placeholder { color: var(--dimm-tief); }
.such-feld input:focus { border-color: var(--kruste); outline: none; }

.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip {
  background: transparent;
  border: 1px solid var(--linie-hell);
  color: var(--dimm);
  font-family: var(--f-schild); font-size: .9rem; letter-spacing: .1em;
  text-transform: uppercase;
  padding: .34rem .7rem .22rem;
  border-radius: 999px; cursor: pointer;
  transition: all .15s ease;
}
.chip:hover { color: var(--sahne); border-color: var(--dimm-tief); }
.chip[aria-pressed="true"] {
  background: var(--kruste); border-color: var(--kruste); color: #2A1305;
}
.sortier { display: flex; align-items: center; gap: .6rem; }
.sortier label {
  font-family: var(--f-schild); font-size: .84rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--dimm-tief);
}
.sortier select {
  background: var(--pfanne-hoch); color: var(--sahne);
  border: 1px solid var(--linie-hell); border-radius: 2px;
  font-family: var(--f-body); font-size: .92rem;
  padding: .5rem 2rem .5rem .7rem;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23A89685' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .65rem center;
  background-size: 11px;
}
.treffer {
  font-family: var(--f-schild); font-size: .88rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--dimm-tief);
  padding-block: 1.2rem .2rem;
}
.leer {
  padding: 3rem 0; text-align: center; color: var(--dimm); font-style: italic;
}

/* =========================================================
   Dossiers
   ========================================================= */
.dossier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 330px), 1fr));
  gap: 1rem;
  margin-top: 1rem;
}
.dossier {
  position: relative;
  display: flex; flex-direction: column;
  text-align: left; font: inherit; color: inherit;
  background: var(--pfanne);
  border: 1px solid var(--linie);
  border-left: 3px solid var(--stufe, var(--linie-hell));
  border-radius: 3px;
  padding: 1.1rem 1.2rem 1.15rem;
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, background-color .16s ease;
}
.dossier:hover {
  transform: translateY(-3px);
  background: var(--pfanne-hoch);
  border-color: var(--linie-hell);
  border-left-color: var(--stufe);
}
/* Aufnahme in der Karte: läuft bis an die Kartenkante */
.dossier-bild {
  display: block;
  margin: -1.1rem -1.2rem .95rem;
  overflow: hidden;
  background: var(--pfanne-tief);
  border-bottom: 1px solid var(--linie);
}
.dossier-bild img {
  display: block; width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.03) brightness(.94);
  transition: transform .45s cubic-bezier(.2,.7,.3,1), filter .3s ease;
}
.dossier:hover .dossier-bild img { transform: scale(1.045); filter: saturate(1.1) contrast(1.05) brightness(1); }

.dossier-kopf {
  display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem;
  padding-bottom: .7rem; border-bottom: 1px solid var(--linie);
}
.dossier-az {
  font-family: var(--f-data); font-size: .7rem; letter-spacing: .06em;
  color: var(--dimm-tief); text-transform: uppercase;
}
.dossier-lokal {
  font-family: var(--f-display); font-size: 1.16rem; line-height: 1.18;
  margin-top: .2rem;
}
.dossier-stadt {
  font-family: var(--f-schild); font-size: .82rem; letter-spacing: .15em;
  text-transform: uppercase; color: var(--dimm-tief); margin-top: .15rem;
}
.dossier-note { text-align: right; flex-shrink: 0; }
.dossier-score {
  font-family: var(--f-display); font-size: 2.05rem; line-height: .88;
  color: var(--stufe); font-variant-numeric: tabular-nums;
}
.dossier-klasse {
  font-family: var(--f-schild); font-size: .68rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--dimm-tief);
  display: block; margin-top: .35rem; max-width: 14ch; margin-left: auto;
  line-height: 1.3; text-align: right;
}
.dossier-titel {
  font-family: var(--f-body); font-weight: 600; font-size: 1rem;
  line-height: 1.35; margin-top: .85rem; color: var(--sahne);
}
.dossier-anriss {
  font-size: .92rem; color: var(--dimm); margin-top: .4rem;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  line-clamp: 3; overflow: hidden;
}
.dossier-punkte { display: grid; gap: .35rem; margin-top: .9rem; }
.dossier-mehr {
  font-family: var(--f-schild); font-size: .8rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--dimm-tief);
}
.dossier-fuss {
  margin-top: auto; padding-top: .9rem;
  display: flex; flex-wrap: wrap; gap: .5rem 1rem;
  align-items: center; justify-content: space-between;
  border-top: 1px solid var(--linie);
}
.dossier-autor {
  font-size: .78rem; color: var(--dimm-tief); font-style: italic;
}
.messwerte {
  display: flex; flex-wrap: wrap; gap: .1rem .55rem;
  font-family: var(--f-data); font-size: .7rem; color: var(--dimm-tief);
  font-variant-numeric: tabular-nums;
}
.messwerte span + span::before { content: '·'; margin-right: .55rem; opacity: .6; }

.frisch-lokal { background: var(--dimm-tief) !important; }
.frisch {
  position: absolute; top: -1px; right: -1px;
  background: var(--glut); color: #fff;
  font-family: var(--f-schild); font-size: .7rem; letter-spacing: .14em;
  text-transform: uppercase;
  padding: .22rem .55rem .1rem;
  border-bottom-left-radius: 3px;
}

/* Punkt-Badge */
.punkt {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .5rem; align-items: start;
}
.punkt-glyphen { display: flex; gap: 2px; padding-top: 2px; }
.punkt-glyphen svg { width: 14px; height: 14px; flex-shrink: 0; }
.punkt-grund { font-size: .82rem; line-height: 1.45; color: var(--dimm); }
.punkt-grund b {
  color: var(--sahne); font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.g-speck   { color: var(--kruste); }
.g-tropfen { color: var(--glut); }
.g-knoedel { color: #E4D7C4; }
.g-krug    { color: var(--senf); }
.g-senf    { color: var(--senf); }
.g-flamme  { color: var(--glut); }
.punkt-glyphen svg { fill: currentColor; }
.punkt-glyphen .leer-glyph { opacity: .18; }

/* Mini-Punkte in Rangliste */
.mini-punkt {
  display: inline-flex; align-items: center; gap: 2px;
  border: 1px solid var(--linie-hell); border-radius: 999px;
  padding: .18rem .45rem;
}
.mini-punkt svg { width: 12px; height: 12px; fill: currentColor; }
.mini-punkt b {
  font-family: var(--f-data); font-size: .68rem; color: var(--dimm);
  margin-left: 2px;
}

/* =========================================================
   Akte (Dialog)
   ========================================================= */
.akte {
  width: min(760px, 92vw);
  max-height: 88vh;
  padding: 0;
  border: 1px solid var(--linie-hell);
  border-top: 4px solid var(--stufe, var(--kruste));
  border-radius: 4px;
  background: var(--pfanne);
  color: var(--sahne);
  overflow: auto;
}
.akte::backdrop { background: rgba(4,3,2,.82); backdrop-filter: blur(4px); }
.akte-in { padding: clamp(1.4rem, 3vw, 2.4rem); padding-bottom: 1rem; }
.akte-kopf {
  display: flex; justify-content: space-between; align-items: flex-start;
  gap: 1.5rem; flex-wrap: wrap;
  padding-bottom: 1.1rem; border-bottom: 1px solid var(--linie);
}
.akte-lokal {
  font-family: var(--f-display);
  font-size: clamp(1.5rem, 3.6vw, 2.3rem); line-height: 1.05;
}
.akte-score {
  font-family: var(--f-display);
  font-size: clamp(2.6rem, 6vw, 3.6rem); line-height: .85;
  color: var(--stufe); font-variant-numeric: tabular-nums; text-align: right;
}
.akte-bild {
  margin: 1.4rem 0 0;
  border: 1px solid var(--linie-hell);
  border-radius: 3px;
  overflow: hidden;
  background: var(--pfanne-tief);
}
.akte-bild img {
  display: block; width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  filter: saturate(1.05) contrast(1.03);
}
.akte-bild figcaption {
  padding: .55rem .8rem;
  border-top: 1px solid var(--linie);
  font-family: var(--f-data); font-size: .7rem;
  color: var(--dimm-tief);
}

.akte-titel {
  font-family: var(--f-display); font-size: 1.25rem; line-height: 1.3;
  color: var(--kruste); margin-top: 1.4rem;
}
.akte-text { margin-top: .8rem; max-width: 62ch; color: #E4D7C8; }
.akte-h {
  font-family: var(--f-schild); font-size: .92rem; letter-spacing: .2em;
  text-transform: uppercase; color: var(--dimm-tief);
  margin-top: 1.8rem; padding-bottom: .5rem; border-bottom: 1px solid var(--linie);
}
.akte-punkte { display: grid; gap: .75rem; margin-top: 1rem; }
.akte-mess {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: .9rem; margin-top: 1rem;
}
.akte-mess div {
  background: var(--pfanne-hoch);
  border-left: 2px solid var(--linie-hell);
  padding: .6rem .8rem;
}
.akte-mess dt {
  font-family: var(--f-schild); font-size: .72rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--dimm-tief);
}
.akte-mess dd {
  margin: .15rem 0 0; font-family: var(--f-data); font-size: .95rem;
  color: var(--sahne); font-variant-numeric: tabular-nums;
}
.akte-mess .breit { grid-column: 1 / -1; }
.akte-mess .breit dd { font-family: var(--f-body); font-size: .9rem; color: var(--dimm); }
.akte-signatur {
  margin-top: 1.8rem; padding-top: 1rem; border-top: 1px solid var(--linie);
  display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap;
  font-size: .82rem; color: var(--dimm-tief);
}
.akte-signatur .sig-name { font-family: var(--f-fraktur); font-size: 1.5rem; color: var(--dimm); }
.akte-schliessen {
  position: sticky; bottom: 0;
  padding: .9rem clamp(1.4rem, 3vw, 2.4rem);
  background: linear-gradient(to top, var(--pfanne) 65%, transparent);
  display: flex; justify-content: flex-end;
}
.akte-schliessen button {
  background: none; border: 1px solid var(--linie-hell); color: var(--dimm);
  font-family: var(--f-schild); font-size: .95rem; letter-spacing: .12em;
  text-transform: uppercase; padding: .45rem .9rem .32rem;
  border-radius: 2px; cursor: pointer;
}
.akte-schliessen button:hover { color: var(--sahne); border-color: var(--kruste); }
.akte-loeschen {
  background: none; border: 1px solid rgba(224,82,63,.45); color: var(--mies);
  font-family: var(--f-schild); font-size: .85rem; letter-spacing: .12em;
  text-transform: uppercase; padding: .35rem .7rem .24rem; border-radius: 2px;
  cursor: pointer; margin-top: 1.2rem;
}
.akte-loeschen:hover { background: rgba(224,82,63,.12); }

/* =========================================================
   Formular
   ========================================================= */
.formular-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(1.6rem, 4vw, 3.2rem);
  align-items: start;
}
.formular { display: grid; gap: 1.9rem; }
.formular fieldset { border: 0; padding: 0; margin: 0; display: grid; gap: .85rem; }
.formular fieldset > .btn { justify-self: start; }
.formular legend {
  font-family: var(--f-schild); font-size: 1.05rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--kruste);
  padding: 0 0 .55rem; margin-bottom: .3rem; width: 100%;
  border-bottom: 1px solid var(--linie);
}
.legend-opt {
  font-family: var(--f-body); font-size: .74rem; letter-spacing: 0;
  text-transform: none; color: var(--dimm-tief); font-style: italic;
  margin-left: .5rem;
}
.feld { display: grid; gap: .35rem; }
.feld label {
  font-family: var(--f-schild); font-size: .85rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--dimm);
}
.feld-hilfe {
  display: block; font-family: var(--f-body); font-size: .75rem;
  letter-spacing: 0; text-transform: none; color: var(--dimm-tief);
  font-style: italic; margin-top: .1rem;
}
.feld input, .feld textarea {
  width: 100%;
  background: var(--pfanne-tief);
  border: 1px solid var(--linie-hell);
  border-radius: 2px;
  color: var(--sahne);
  font-family: var(--f-body); font-size: .97rem;
  padding: .62rem .75rem;
  transition: border-color .15s ease;
}
.feld textarea { resize: vertical; line-height: 1.6; }
.feld input::placeholder, .feld textarea::placeholder { color: #5C5048; }
.feld input:focus, .feld textarea:focus { border-color: var(--kruste); outline: none; }
.feld input[aria-invalid="true"], .feld textarea[aria-invalid="true"] { border-color: var(--mies); }
.feld-reihe { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: .9rem; }
.feld-reihe-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.feld-knopf { align-self: end; }
.zaehler {
  font-family: var(--f-data); font-size: .72rem; color: var(--dimm-tief);
  text-align: right; font-variant-numeric: tabular-nums;
}
.zaehler.zu-kurz { color: var(--kruste); }

/* Pflichtfeld-Kennzeichnung */
.pflicht {
  font-family: var(--f-data); font-size: .62rem; letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--kruste);
  border: 1px solid rgba(233,150,60,.4);
  border-radius: 2px;
  padding: .1rem .3rem;
  margin-left: .3rem;
  vertical-align: 1px;
}

/* Fehlermeldung direkt unter dem betroffenen Feld */
.feld-fehler {
  display: flex; align-items: flex-start; gap: .4rem;
  font-size: .84rem; line-height: 1.45;
  color: #F3B7AE;
  margin-top: .1rem;
}
.feld-fehler::before {
  content: '▲';
  font-size: .6rem; line-height: 1.7;
  color: var(--mies);
  flex-shrink: 0;
}

/* Freundlicher Hinweis, kein Fehler (z. B. Dublette) */
.feld-hinweis {
  font-size: .82rem; line-height: 1.5;
  color: var(--dimm);
  margin-top: .1rem;
  padding-left: .7rem;
  border-left: 2px solid var(--linie-hell);
}
.dublette-link {
  background: none; border: 0; padding: 0;
  color: var(--kruste); cursor: pointer;
  font: inherit; text-decoration: underline; text-underline-offset: 2px;
}
.dublette-link:hover { color: var(--kruste-hell); }

/* Bot-Falle: für Menschen unerreichbar, für Bots verlockend.
   Kein display:none — manche Bots überspringen versteckte Felder. */
.knochenfalle {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
}

/* Bestätigung der Bildrechte */
.haken {
  display: flex; align-items: flex-start; gap: .6rem;
  font-size: .88rem; line-height: 1.5; color: var(--dimm);
  cursor: pointer;
  padding: .7rem .9rem;
  background: var(--pfanne-tief);
  border: 1px solid var(--linie);
  border-radius: 3px;
}
.haken input { margin-top: .2rem; accent-color: var(--kruste); flex-shrink: 0; }
.haken:hover { border-color: var(--linie-hell); color: var(--sahne); }

/* Bestätigung nach dem Einreichen */
.erfolg {
  display: grid; gap: .4rem;
  padding: 1.1rem 1.3rem;
  margin-bottom: 1.4rem;
  background: rgba(143,191,106,.10);
  border: 1px solid rgba(143,191,106,.4);
  border-left: 3px solid var(--gut);
  border-radius: 3px;
  font-size: .95rem; color: var(--dimm);
}
.erfolg:focus-visible { outline: 2px solid var(--gut); outline-offset: 3px; }
.erfolg-kopf {
  font-family: var(--f-display); font-size: 1.15rem; line-height: 1.3;
  color: var(--gut);
}
.erfolg b { color: var(--sahne); font-weight: 600; }

/* Wiederhergestellter Entwurf */
.entwurf-hinweis {
  display: flex; flex-wrap: wrap; gap: .6rem 1rem;
  align-items: center; justify-content: space-between;
  padding: .75rem 1rem;
  margin-bottom: 1.4rem;
  background: rgba(233,150,60,.08);
  border: 1px solid rgba(233,150,60,.35);
  border-left: 3px solid var(--kruste);
  border-radius: 3px;
  font-size: .9rem; color: var(--sahne);
}
.entwurf-hinweis b { font-family: var(--f-data); font-size: .84rem; color: var(--kruste); }
.entwurf-hinweis button {
  background: none; border: 1px solid var(--linie-hell); border-radius: 2px;
  color: var(--dimm); cursor: pointer;
  font-family: var(--f-schild); font-size: .82rem; letter-spacing: .1em;
  text-transform: uppercase; padding: .32rem .65rem .22rem;
  white-space: nowrap;
}
.entwurf-hinweis button:hover { color: var(--sahne); border-color: var(--kruste); }

/* Was fehlt noch, neben dem Absendeknopf */
.formular-rand { display: grid; gap: .25rem; }
.formular-stand {
  font-family: var(--f-schild); font-size: .92rem; letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--kruste);
}
.formular-stand.bereit { color: var(--gut); }
.formular-stand:empty { display: none; }

/* Aufnahme hochladen */
.aufnahme {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
}
.aufnahme-knopf {
  display: inline-flex; align-items: center; gap: .5rem;
  padding: .75rem 1.1rem .65rem;
  background: var(--pfanne-tief);
  border: 1px dashed var(--linie-hell);
  border-radius: var(--rad);
  color: var(--sahne);
  font-family: var(--f-schild); font-size: 1rem; letter-spacing: .1em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color .16s ease, color .16s ease, background-color .16s ease;
}
.aufnahme-knopf:hover { border-color: var(--kruste); color: var(--kruste-hell); }
.aufnahme-knopf:focus-within { outline: 2px solid var(--kruste-hell); outline-offset: 3px; }
.aufnahme-knopf span[aria-hidden] { font-size: 1.15rem; line-height: 1; color: var(--kruste); }
.aufnahme-knopf.laedt { opacity: .6; pointer-events: none; }
.aufnahme-knopf.laedt span:last-child::after { content: ' …'; }
.aufnahme-hilfe { font-size: .82rem; color: var(--dimm-tief); }

.aufnahme-vorschau {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  padding: .8rem;
  background: var(--pfanne-tief);
  border: 1px solid var(--linie);
  border-left: 3px solid var(--kruste);
  border-radius: 3px;
}
.aufnahme-vorschau img {
  display: block; width: 128px; aspect-ratio: 4 / 3;
  object-fit: cover; border-radius: 2px;
}
.aufnahme-fakten { display: grid; gap: .25rem; justify-items: start; }
.aufnahme-fakten b {
  font-family: var(--f-schild); font-size: .95rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--kruste); font-weight: 400;
}
.aufnahme-fakten .mono { font-size: .72rem; color: var(--dimm-tief); }
.aufnahme-weg {
  margin-top: .3rem;
  background: none; border: 1px solid var(--linie-hell); border-radius: 2px;
  color: var(--dimm); cursor: pointer;
  font-family: var(--f-schild); font-size: .82rem; letter-spacing: .1em;
  text-transform: uppercase; padding: .32rem .6rem .22rem;
}
.aufnahme-weg:hover { color: var(--mies); border-color: rgba(224,82,63,.5); }
.aufnahme-fehler {
  background: rgba(224,82,63,.12);
  border: 1px solid rgba(224,82,63,.45);
  border-left: 3px solid var(--mies);
  color: #F3B7AE;
  padding: .7rem .9rem; border-radius: 2px; font-size: .9rem;
}

/* Krustometer-Schieber */
.schieber-block { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1.2rem; align-items: center; }
input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 30px; background: transparent; cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 8px; border-radius: 4px;
  background: linear-gradient(90deg, var(--mies) 0%, #B5702F 38%, var(--kruste) 72%, var(--senf) 100%);
  border: 1px solid var(--linie-hell);
}
input[type="range"]::-moz-range-track {
  height: 8px; border-radius: 4px;
  background: linear-gradient(90deg, var(--mies) 0%, #B5702F 38%, var(--kruste) 72%, var(--senf) 100%);
  border: 1px solid var(--linie-hell);
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none;
  width: 22px; height: 22px; margin-top: -8px;
  border-radius: 50%;
  background: var(--sahne);
  border: 3px solid var(--russ);
  box-shadow: 0 0 0 1px var(--kruste), 0 0 14px rgba(233,150,60,.6);
}
input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--sahne); border: 3px solid var(--russ);
  box-shadow: 0 0 0 1px var(--kruste), 0 0 14px rgba(233,150,60,.6);
}
.schieber-wert {
  font-family: var(--f-display); font-size: 2.4rem; line-height: 1;
  color: var(--kruste); font-variant-numeric: tabular-nums;
  min-width: 3.4ch; text-align: right;
}
.schieber-klasse {
  font-family: var(--f-schild); font-size: .95rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--dimm);
}

/* Punkte-Baukasten */
.punkte-hilfe { font-size: .86rem; color: var(--dimm-tief); }
.punkte-hilfe em { color: var(--kruste); font-style: normal; }
.punkte-liste { display: grid; gap: .8rem; }
.punkt-zeile {
  display: grid; gap: .7rem;
  padding: .9rem;
  background: var(--pfanne-tief);
  border: 1px solid var(--linie);
  border-radius: 3px;
}
.pz-kopf { display: flex; flex-wrap: wrap; gap: .9rem; align-items: center; justify-content: space-between; }
.pz-waehrungen { display: flex; flex-wrap: wrap; gap: .3rem; }
.pz-w {
  display: grid; place-items: center;
  width: 34px; height: 34px;
  background: transparent; border: 1px solid var(--linie-hell);
  border-radius: 2px; cursor: pointer; color: var(--dimm-tief);
  transition: all .14s ease;
}
.pz-w svg { width: 19px; height: 19px; fill: currentColor; }
.pz-w:hover { border-color: var(--dimm); color: var(--dimm); }
.pz-w[aria-pressed="true"] { border-color: currentColor; background: rgba(233,150,60,.1); }
.pz-w[aria-pressed="true"].g-speck   { color: var(--kruste); }
.pz-w[aria-pressed="true"].g-tropfen { color: var(--glut); }
.pz-w[aria-pressed="true"].g-knoedel { color: #E4D7C4; }
.pz-w[aria-pressed="true"].g-krug    { color: var(--senf); }
.pz-w[aria-pressed="true"].g-senf    { color: var(--senf); }
.pz-w[aria-pressed="true"].g-flamme  { color: var(--glut); }

.pz-anzahl { display: flex; align-items: center; gap: .5rem; }
.pz-anzahl-label {
  font-family: var(--f-schild); font-size: .78rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--dimm-tief);
}
.pz-zaehler { display: flex; gap: 3px; }
.pz-z {
  background: none; border: 0; padding: 2px; cursor: pointer; line-height: 0;
  color: inherit;
}
.pz-z svg { width: 20px; height: 20px; fill: currentColor; transition: opacity .12s ease, transform .12s ease; }
.pz-z .aus { opacity: .2; }
.pz-z:hover svg { transform: scale(1.15); }
.pz-grund { width: 100%; }
.pz-fuss { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.pz-vorschau {
  font-size: .82rem; color: var(--dimm-tief); font-style: italic;
}
.pz-vorschau.pz-offen { color: var(--kruste); font-style: normal; }
.pz-weg {
  background: none; border: 0; color: var(--dimm-tief); cursor: pointer;
  font-family: var(--f-schild); font-size: .82rem; letter-spacing: .12em;
  text-transform: uppercase; padding: .2rem .3rem;
}
.pz-weg:hover { color: var(--mies); }

.formular-fehler {
  background: rgba(224,82,63,.12);
  border: 1px solid rgba(224,82,63,.45);
  border-left: 3px solid var(--mies);
  color: #F3B7AE;
  padding: .8rem 1rem; border-radius: 2px; font-size: .92rem;
}
.formular-aktionen { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; }
.formular-hinweis { font-size: .8rem; color: var(--dimm-tief); font-style: italic; max-width: 32ch; }

/* Vorschau */
.vorschau-spalte { position: sticky; top: 86px; display: grid; gap: .6rem; }
.vorschau-label {
  font-family: var(--f-schild); font-size: .82rem; letter-spacing: .2em;
  text-transform: uppercase; color: var(--dimm-tief);
}
.vorschau-spalte .dossier { cursor: default; }
.vorschau-spalte .dossier:hover { transform: none; background: var(--pfanne); }

/* =========================================================
   Fuß
   ========================================================= */
.fuss {
  background: var(--pfanne-tief);
  border-top: 1px solid var(--linie);
  padding-block: clamp(2.6rem, 5vw, 4rem) 2rem;
}
.fuss-in { display: grid; gap: 2rem; }
.fuss-marke { display: grid; gap: .3rem; }
.fraktur {
  font-family: var(--f-fraktur);
  font-size: clamp(2.2rem, 5vw, 3.2rem);
  line-height: 1;
  color: var(--kruste);
}
.fuss-motto { color: var(--dimm); font-style: italic; }
.fuss-spalten {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem; padding-block: 1.6rem;
  border-top: 1px solid var(--linie); border-bottom: 1px solid var(--linie);
}
.fuss h4 {
  font-family: var(--f-schild); font-size: .9rem; letter-spacing: .2em;
  text-transform: uppercase; color: var(--sahne); margin-bottom: .7rem;
}
.fuss li { font-size: .9rem; color: var(--dimm-tief); padding-block: .18rem; }
.fuss li a { text-decoration: none; transition: color .15s ease; }
.fuss li a:hover { color: var(--kruste); }
.fuss-recht { font-size: .78rem; color: var(--dimm-tief); max-width: 78ch; line-height: 1.7; }

/* =========================================================
   Splitter-Explosion beim Anlegen einer Akte
   ========================================================= */
.burst { position: fixed; inset: 0; pointer-events: none; z-index: 95; }
.burst i {
  position: absolute; width: 18px; height: 18px; color: var(--kruste);
  animation: fliegen .9s cubic-bezier(.2,.7,.4,1) forwards;
}
.burst i svg { width: 100%; height: 100%; fill: currentColor; }
@keyframes fliegen {
  from { transform: translate(0,0) rotate(0deg) scale(1); opacity: 1; }
  to   { transform: translate(var(--dx), var(--dy)) rotate(var(--dr)) scale(.3); opacity: 0; }
}

/* =========================================================
   Aufbrechen / Responsive
   ========================================================= */
@media (max-width: 1020px) {
  .held-in { grid-template-columns: minmax(0, 1fr); }
  .rangliste-kopf { grid-template-columns: minmax(0, 1fr); }
  .rangliste-kopf .krustometer { max-width: 420px; }
  .regel-grid { grid-template-columns: minmax(0, 1fr); }
  .formular-layout { grid-template-columns: minmax(0, 1fr); }
  .vorschau-spalte { position: static; max-width: 440px; }
  .podest { grid-template-columns: minmax(0, 1fr); }
  .rang-1 .rang-lokal, .rang-lokal { max-width: none; }

  /* Die Navigation wandert in eine zweite Zeile, statt zu verschwinden. */
  main > section[id] { scroll-margin-top: 136px; }

  /* Zweizeilige Kopfleiste kostet Platz. Beim Herunterlesen fährt sie
     komplett weg, bei der kleinsten Aufwärtsbewegung ist sie wieder da —
     verschoben statt verkleinert, damit der Inhalt nicht springt. */
  .topbar { transition: transform .28s cubic-bezier(.2,.7,.3,1); }
  .topbar.weggefahren { transform: translateY(-100%); }

  .topbar-in { flex-wrap: wrap; min-height: 0; padding-top: .45rem; column-gap: 1rem; }
  .marke-glyph { width: 30px; height: 30px; }
  .marke-glyph svg { width: 19px; height: 19px; }
  /* Die zweite Zeile trägt jetzt die Navigation — der Untertitel darf gehen. */
  .marke-sub { display: none; }
  .marke { grid-template-rows: auto; align-items: center; }
  .nav {
    order: 3; width: 100%;
    gap: 1.15rem;
    margin-top: .35rem; padding-top: .35rem; padding-bottom: .3rem;
    border-top: 1px solid var(--linie);
    overflow-x: auto;
    scrollbar-width: none;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; font-size: .92rem; padding-bottom: 0; }
  .topbar-tools .btn { font-size: .95rem; padding: .48rem .85rem .36rem; }

  /* Die Vorschau gehört vor das Formular — unter einem fünf Bildschirme
     langen Formular sieht sie niemand. */
  .vorschau-spalte { order: -1; }
}

@media (max-width: 720px) {
  .steuerung { grid-template-columns: minmax(0, 1fr); }
  .sortier { justify-content: space-between; }

  /* 13 Städte als umbrechender Block fressen 320px Höhe — also eine
     seitlich scrollbare Reihe, die bis an den Kartenrand läuft. */
  .chips {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    margin-inline: -1rem;
    padding-inline: 1rem;
    padding-bottom: .2rem;
  }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: 0 0 auto; }
  .kennzahlen { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kennzahlen > div { border-bottom: 1px solid var(--linie); }
  .kennzahlen > div:nth-child(2n) { border-right: 0; }
  .kennzahlen > div:nth-child(2n) { padding-left: 1rem; }
  .kennzahlen > div:nth-last-child(-n+2) { border-bottom: 0; }
  .feld-reihe, .feld-reihe-4 { grid-template-columns: minmax(0, 1fr); }
  .schande { grid-template-columns: minmax(0, 1fr); }
  .aufnahme { grid-template-columns: minmax(0, 1fr); }

  /* Der zerlegte Punkt stapelt sich, statt die Zeile zu sprengen */
  .punktanatomie { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .punktanatomie li {
    display: grid; gap: .1rem;
    padding-block: .9rem;
    border-bottom: 1px dashed var(--linie);
  }
  .punktanatomie li:last-child { border-bottom: 0; padding-bottom: 0; }
  .punktanatomie li:first-child { padding-top: 0; }
  .pa-wert, .pa-label, .pa-hinweis { grid-row: auto; }
  .pa-wert { padding-bottom: .35rem; white-space: normal; }
  .pa-label { border-top: 0; padding-top: 0; }
  .pa-label::before { display: none; }

  /* Klassen: Name und Bereich nebeneinander, Balken darunter */
  .klassen li { grid-template-columns: minmax(0, 1fr) auto; gap: .45rem 1rem; }
  .kl-spur { grid-column: 1 / -1; order: 3; }
  .kl-text { order: 4; }
  .aufnahme-knopf { justify-content: center; }
  .aufnahme-vorschau { grid-template-columns: 92px minmax(0, 1fr); }
  .aufnahme-vorschau img { width: 92px; }

  /* Der Hero war auf dem Handy 1245px hoch — anderthalb Bildschirme,
     bevor überhaupt etwas passiert. Enger gesetzt, ohne etwas zu streichen. */
  /* Auf schmalen Schirmen taugt das Foto nicht als Hintergrund — die Haxe
     läge hinter der Schrift. Es wird deshalb zum Aufmacher darüber. */
  .held { padding-top: 0; padding-bottom: 1.7rem; }
  .held-bild {
    position: static;
    width: 100%; height: auto;
    aspect-ratio: 4 / 3;
    object-position: center;
    margin-bottom: 1.3rem;
  }
  .held::before {
    inset: 0 0 auto 0;
    height: 75vw;
    background: linear-gradient(to bottom,
      rgba(10,8,6,.42) 0%, rgba(10,8,6,0) 24%,
      rgba(10,8,6,0) 58%, rgba(10,8,6,.95) 96%, var(--russ) 100%);
  }
  .held-bildnachweis { margin-top: 1.2rem; }
  .held-in { gap: 1.5rem; }
  .wortmarke { margin-top: .25rem; }
  .stempel { margin-top: .85rem; padding: .4rem .85rem .3rem; }
  .stempel strong { font-size: .9rem; }
  .held-lead { margin-top: 1.1rem; font-size: 1.02rem; }
  .held-cta { margin-top: 1.2rem; gap: .6rem; }
  .held-cta .btn-gross { font-size: 1.1rem; padding: .72rem 1.25rem .6rem; }
  .kennzahlen { margin-top: 1.5rem; }
  .kennzahlen > div { padding-block: .75rem; }
  .krustometer { padding: 1rem 1rem .85rem; }
  .geraet-fuss { font-size: .7rem; }
  .marke-sub { display: none; }
  .topbar-tools .btn { font-size: .92rem; padding: .5rem .8rem .38rem; }

  /* Auf dem Handy nicht beschneiden: ganzes Gedeck zeigen, Text darunter. */
  .schaustueck { display: block; min-height: 0; }
  .schaustueck-bild {
    position: static;
    height: auto;
    aspect-ratio: 4 / 3;
    object-position: center;
  }
  .schaustueck::after {
    background: linear-gradient(to bottom, rgba(10,8,6,.5) 0%, rgba(10,8,6,0) 22%, rgba(10,8,6,0) 62%, rgba(10,8,6,.95) 100%);
    bottom: auto; height: 75vw; max-height: 100%;
  }
  .schaustueck-in { padding-top: 1.2rem; }
  .schaustueck-satz { max-width: none; }
  .akte-mess { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .btn-lang { display: none; }
}

@media (max-width: 560px) {
    padding: .38rem .5rem .28rem;
    font-size: .78rem; letter-spacing: .06em;
    gap: .32rem;
  }
}

/* Fingerfreundliche Ziele auf Touch-Geräten */
@media (pointer: coarse) {
  .chip { padding: .52rem .9rem .4rem; }
  .nav a { padding-block: .35rem; }
  .pz-z { padding: 5px; }
  .pz-w { width: 40px; height: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .laufband-spur { animation: none; }
}
