/* Developed by Enjyn Gruppe — https://enjyn.de */

:root {
  color-scheme: light;

  --tinte:        #1d1a16;
  --tinte-weich:  #5a534a;
  --tinte-leise:  #8b8377;
  --grund:        #fdf4e3;
  --papier:       #fffdf7;
  --flaeche:      #ffffff;
  --gelb:         #f7b731;
  --gelb-tief:    #e0a11c;
  --gelb-weich:   #fff3d6;
  --gruen:        #2f9e63;
  --gruen-weich:  #e4f4ea;
  --rot:          #cf4426;
  --rot-weich:    #fceae5;

  --schrift: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --schrift-fest: ui-monospace, SFMono-Regular, Menlo, Consolas, "Courier New", monospace;

  --strich: 2px;
  --radius: 16px;
  --radius-klein: 12px;
  --wurf: 3px 3px 0 var(--tinte);
  --wurf-klein: 2px 2px 0 var(--tinte);
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
  background-color: var(--grund);
  background-image: radial-gradient(circle 1.5px at 1.5px 1.5px, rgba(29, 26, 22, 0.07) 1.5px, transparent 1.6px);
  background-size: 22px 22px;
  color: var(--tinte);
  font-family: var(--schrift);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ---- Kopf ---- */

.kopf {
  background: var(--papier);
  border-bottom: 3px solid var(--tinte);
}

.kopf-innen {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  max-width: 32rem;
  margin: 0 auto;
  padding: 0.85rem 1.25rem;
}

.marke-block { min-width: 0; }

.marke {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.marke-eins { color: var(--tinte); }

.marke-zwei {
  display: inline-block;
  padding: 0 0.3rem;
  background: var(--gelb);
  border: var(--strich) solid var(--tinte);
  border-radius: 7px;
  box-shadow: var(--wurf-klein);
  color: var(--tinte);
}

/* Der Festhinweis sitzt als kleines Etikett unten rechts, nicht neben der Marke. */
.fest {
  flex: 0 0 auto;
  margin: 0;
  padding: 0.1rem 0.6rem;
  background: var(--gelb);
  border: 1.5px solid var(--tinte);
  border-radius: 100px;
  box-shadow: var(--wurf-klein);
  color: var(--tinte);
  font-size: 0.68rem;
  font-weight: 700;
  white-space: nowrap;
}

.fest[hidden] { display: none; }

.kopf-rechts {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  flex: 0 0 auto;
  color: var(--tinte-weich);
}

.kopf-funk { width: 17px; height: 17px; }

.kopf-zeile {
  font-size: 0.76rem;
  font-weight: 600;
  line-height: 1.2;
  white-space: nowrap;
}

.kopf-zeile br { display: none; }

/* ---- Rahmen ---- */

/* Der Fuß soll auch bei kurzen Tafeln unten stehen, nicht mitten auf der Fläche. */
.blatt {
  display: flex;
  flex-direction: column;
  flex: 1 0 auto;
  width: 100%;
  max-width: 32rem;
  margin: 0 auto;
  padding: 1.7rem 1.25rem calc(1.4rem + env(safe-area-inset-bottom));
}

.stand {
  margin: 0 0 1.4rem;
  border: var(--strich) solid var(--tinte);
  border-radius: var(--radius);
  box-shadow: var(--wurf);
  overflow: hidden;
  background: var(--flaeche);
  line-height: 0;
}

.stand img {
  width: 100%;
  height: 158px;
  object-fit: cover;
  object-position: center 42%;
}

.stand[hidden] { display: none; }

/* ---- Fortschritt ---- */

.fortschritt {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  margin: 0 0 1.6rem;
  padding: 0;
  list-style: none;
  counter-reset: schritt;
}

.fortschritt li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--tinte-leise);
  font-size: 0.78rem;
  font-weight: 600;
}

.fortschritt li::before {
  counter-increment: schritt;
  content: counter(schritt);
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  flex: 0 0 auto;
  background: var(--papier);
  border: var(--strich) solid var(--tinte-leise);
  border-radius: 50%;
  color: var(--tinte-leise);
  font-size: 0.76rem;
  font-weight: 800;
}

.fortschritt li:not(:last-child)::after {
  content: "";
  width: 0.9rem;
  height: 0;
  border-top: 2px dashed var(--tinte-leise);
}

.fortschritt li.ist-aktiv { color: var(--tinte); }
.fortschritt li.ist-aktiv::before { background: var(--gelb); border-color: var(--tinte); color: var(--tinte); }
.fortschritt li.ist-fertig { color: var(--tinte-weich); }
.fortschritt li.ist-fertig::before { background: var(--papier); border-color: var(--tinte); color: var(--tinte); }
.fortschritt[hidden] { display: none; }

/* ---- Tafeln ---- */

.tafel { display: none; }
.tafel.ist-sichtbar { display: block; animation: eintreten 0.22s ease both; }

@keyframes eintreten {
  from { opacity: 0; transform: translateY(7px); }
  to   { opacity: 1; transform: none; }
}

.tafel-titel {
  margin: 0 0 1.2rem;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.tafel-kopf {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  margin-bottom: 1.2rem;
}

.tafel-kopf .tafel-titel { margin: 0; flex: 1 1 auto; }

.zurueck {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 2.6rem;
  height: 2.6rem;
  padding: 0;
  background: var(--papier);
  border: var(--strich) solid var(--tinte);
  border-radius: 50%;
  box-shadow: var(--wurf-klein);
  color: var(--tinte);
  cursor: pointer;
}

.zurueck svg { width: 18px; height: 18px; }
.zurueck:hover { background: var(--gelb-weich); }
.zurueck:active { transform: translate(2px, 2px); box-shadow: none; }
.zurueck:focus-visible { outline: 3px solid var(--gelb); outline-offset: 2px; }

.zurueck-seite {
  width: auto;
  height: auto;
  gap: 0.45rem;
  grid-auto-flow: column;
  justify-content: start;
  margin-bottom: 1.7rem;
  padding: 0.5rem 1rem 0.5rem 0.75rem;
  border-radius: 100px;
  font: 700 0.88rem/1 var(--schrift);
  text-decoration: none;
}

/* ---- Auswahlkarten ---- */

.wahl-liste,
.sprach-liste { display: grid; gap: 0.65rem; }

.sprache,
.wahl {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 0.9rem 1rem;
  background: var(--flaeche);
  border: var(--strich) solid var(--tinte);
  border-radius: var(--radius);
  box-shadow: var(--wurf);
  color: var(--tinte);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.sprache { gap: 0.85rem; }
.wahl { gap: 0.9rem; }

.sprache:hover,
.wahl:hover { background: var(--gelb-weich); }

.sprache:active,
.wahl:active { transform: translate(3px, 3px); box-shadow: none; }

.sprache:focus-visible,
.wahl:focus-visible { outline: 3px solid var(--gelb); outline-offset: 2px; }

.wahl.ist-gewaehlt { background: var(--gelb); }

.sprache-flagge {
  flex: 0 0 auto;
  width: 2.2rem;
  line-height: 0;
  border: var(--strich) solid var(--tinte);
  border-radius: 5px;
  overflow: hidden;
}

.sprache-flagge svg { display: block; width: 100%; height: auto; }

.sprache-name { flex: 1 1 auto; font-size: 1.02rem; font-weight: 700; }

.sprache-kuerzel {
  flex: 0 0 auto;
  color: var(--tinte-leise);
  font-size: 0.78rem;
  font-weight: 700;
}

/* Bild links, Beschriftung mittig, Preis rechts — überall gleich aufgebaut. */
.wahl-bild {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 2.9rem;
  height: 2.9rem;
  background: var(--gelb-weich);
  border: var(--strich) solid var(--tinte);
  border-radius: 11px;
  color: var(--tinte);
}

.wahl.ist-gewaehlt .wahl-bild { background: var(--papier); }
.wahl-bild svg { width: 22px; height: 22px; }

.wahl-text { flex: 1 1 auto; min-width: 0; }
.wahl-name { display: block; font-size: 1.02rem; font-weight: 700; }

.wahl-notiz {
  display: block;
  margin-top: 0.05rem;
  color: var(--tinte-weich);
  font-size: 0.82rem;
  font-weight: 500;
}

.wahl.ist-gewaehlt .wahl-notiz { color: var(--tinte); }

.wahl-preis {
  flex: 0 0 auto;
  font-size: 1.02rem;
  font-weight: 800;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

/* Balken statt Worten: zeigt das Tempo auf einen Blick. */
.balken {
  display: flex;
  align-items: flex-end;
  gap: 2.5px;
  height: 20px;
}

.balken i {
  display: block;
  width: 5px;
  background: none;
  border: 1.5px solid var(--tinte-leise);
  border-radius: 2px;
}

.balken i:nth-child(1) { height: 45%; }
.balken i:nth-child(2) { height: 70%; }
.balken i:nth-child(3) { height: 100%; }
.balken i.ist-voll { background: var(--gelb); border-color: var(--tinte); }
.wahl.ist-gewaehlt .balken i.ist-voll { background: var(--tinte); }

/* Die Mehrtagespakete stehen klein nebeneinander, sie sind der Sonderfall. */
.wahl-paar {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.65rem;
  margin-top: 0.65rem;
}

.wahl-klein {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.05rem;
  padding: 0.55rem 0.75rem;
  border-radius: var(--radius-klein);
  box-shadow: var(--wurf-klein);
}

.wahl-klein .wahl-name { font-size: 0.82rem; }
.wahl-klein .wahl-preis { font-size: 0.86rem; }
.wahl-klein:active { transform: translate(2px, 2px); box-shadow: none; }

/* Der Uploadwert steht klein am Tempo, weil er die zweite Hälfte der Wahrheit ist. */
.hoch {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0 0.35rem;
  background: var(--gelb-weich);
  border: 1.5px solid var(--tinte);
  border-radius: 6px;
  font-size: 0.63rem;
  font-weight: 700;
  vertical-align: 0.12em;
  white-space: nowrap;
}

.wahl.ist-gewaehlt .hoch { background: var(--papier); }

.nebenweg {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  margin-top: 1.4rem;
  padding: 0.8rem;
  background: none;
  border: var(--strich) dashed var(--tinte-leise);
  border-radius: var(--radius-klein);
  color: var(--tinte-weich);
  font: 600 0.92rem/1.2 var(--schrift);
  cursor: pointer;
}

.nebenweg svg { width: 18px; height: 18px; }
.nebenweg:hover { border-color: var(--tinte); color: var(--tinte); background: var(--gelb-weich); }
.nebenweg:focus-visible { outline: 3px solid var(--gelb); outline-offset: 2px; }

/* ---- Kassenbon ---- */

/* Der Zettel bekommt seine Zacken über eine Maske; der Schatten folgt ihr, weil er als
   Filter auf der Hülle liegt und nicht als box-shadow am Rand hängt. */
.bon {
  margin: 0 0 1.3rem;
  filter: drop-shadow(3px 3px 0 var(--tinte));
}

.bon-blatt {
  padding: 1.1rem 1.15rem 1.2rem;
  background: var(--flaeche);
  color: var(--tinte);
  font-family: var(--schrift-fest);
  text-align: left;
  -webkit-mask-image:
    radial-gradient(circle 4px at 6px 0, transparent 4px, #000 4.5px),
    radial-gradient(circle 4px at 6px 6px, transparent 4px, #000 4.5px),
    linear-gradient(#000, #000);
  mask-image:
    radial-gradient(circle 4px at 6px 0, transparent 4px, #000 4.5px),
    radial-gradient(circle 4px at 6px 6px, transparent 4px, #000 4.5px),
    linear-gradient(#000, #000);
  -webkit-mask-size: 12px 6px, 12px 6px, 100% calc(100% - 12px);
  mask-size: 12px 6px, 12px 6px, 100% calc(100% - 12px);
  -webkit-mask-position: top left, bottom left, center;
  mask-position: top left, bottom left, center;
  -webkit-mask-repeat: repeat-x, repeat-x, no-repeat;
  mask-repeat: repeat-x, repeat-x, no-repeat;
}

.bon-marke {
  margin: 0 0 0.8rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px dashed rgba(29, 26, 22, 0.28);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: center;
  color: var(--tinte-weich);
}

.bon-zeile {
  display: flex;
  justify-content: space-between;
  gap: 0.9rem;
  padding: 0.2rem 0;
  font-size: 0.88rem;
  font-weight: 600;
}

.bon-zeile span { color: var(--tinte-weich); }

.bon-zeile strong {
  font-weight: 700;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.bon-summe {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-top: 0.7rem;
  padding-top: 0.75rem;
  border-top: 2px dashed rgba(29, 26, 22, 0.28);
}

.bon-summe span {
  color: var(--tinte-weich);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.bon-summe strong {
  font-family: var(--schrift);
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.bon-fuss {
  margin: 0.4rem 0 0;
  color: var(--tinte-leise);
  font-size: 0.72rem;
  text-align: right;
}

.bon-code-label {
  margin: 0.9rem 0 0.5rem;
  padding-top: 0.75rem;
  border-top: 2px dashed rgba(29, 26, 22, 0.28);
  color: var(--tinte-weich);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-align: center;
}

.bon-code {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-align: center;
  text-indent: 0.2em;
  white-space: nowrap;
  user-select: all;
}

/* Die Beschriftung bleibt für Vorleseprogramme im Text, sichtbar reicht das Feld. */
.bon-versteckt {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* Der Code wird direkt auf dem Zettel eingetragen, wie mit dem Kuli auf Papier. */
.bon-feld {
  display: block;
  width: 100%;
  margin: 0.4rem 0 0;
  padding: 0.35rem 0 0.5rem;
  background: none;
  border: 0;
  border-bottom: 2px dashed rgba(29, 26, 22, 0.4);
  border-radius: 0;
  color: var(--tinte);
  font-family: var(--schrift-fest);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-align: center;
  text-indent: 0.2em;
  text-transform: uppercase;
}

.bon-feld::placeholder { color: rgba(29, 26, 22, 0.25); }
.bon-feld:focus { outline: 0; border-bottom-color: var(--tinte); border-bottom-style: solid; }

.bon-hinweis {
  margin: 0.6rem 0 0;
  color: var(--tinte-leise);
  font-size: 0.72rem;
  text-align: center;
}

/* ---- Zustimmung ---- */

.zustimmung {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 0.7rem;
  margin-bottom: 1.1rem;
  cursor: pointer;
}

.zustimmung input {
  position: absolute;
  width: 1px; height: 1px;
  opacity: 0;
  pointer-events: none;
}

.haken {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  background: var(--papier);
  border: var(--strich) solid var(--tinte);
  border-radius: 7px;
  box-shadow: var(--wurf-klein);
  color: transparent;
}

.haken svg { width: 15px; height: 15px; }

.zustimmung input:checked + .haken { background: var(--gelb); color: var(--tinte); }
.zustimmung input:focus-visible + .haken { outline: 3px solid var(--gelb); outline-offset: 3px; }

.zustimmung-text { color: var(--tinte-weich); font-size: 0.84rem; line-height: 1.45; }
.zustimmung-text a { color: var(--tinte); font-weight: 600; text-underline-offset: 3px; }

.zustimmung-recht {
  display: block;
  margin-top: 0.25rem;
  color: var(--tinte-leise);
  font-size: 0.76rem;
}

.zustimmung-recht:empty { display: none; }

.zahlung { min-height: 48px; transition: opacity 0.2s ease; }
.zahlung[data-gesperrt="ja"] { opacity: 0.45; }

/* ---- Knöpfe ---- */

.knopf-voll {
  display: block;
  width: 100%;
  padding: 0.95rem;
  background: var(--gelb);
  border: var(--strich) solid var(--tinte);
  border-radius: var(--radius-klein);
  box-shadow: var(--wurf);
  color: var(--tinte);
  font: 800 1.02rem/1.2 var(--schrift);
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.knopf-voll:hover { background: var(--gelb-tief); }
.knopf-voll:active { transform: translate(3px, 3px); box-shadow: none; }
.knopf-voll[disabled] { background: var(--papier); border-color: var(--tinte-leise); box-shadow: none; color: var(--tinte-leise); cursor: not-allowed; }
.knopf-voll:focus-visible { outline: 3px solid var(--tinte); outline-offset: 3px; }

.knopf-rand {
  display: block;
  width: 100%;
  margin-top: 0.65rem;
  padding: 0.85rem;
  background: var(--papier);
  border: var(--strich) solid var(--tinte);
  border-radius: var(--radius-klein);
  box-shadow: var(--wurf-klein);
  color: var(--tinte);
  font: 700 0.95rem/1.2 var(--schrift);
  cursor: pointer;
}

.knopf-rand:hover { background: var(--gelb-weich); }
.knopf-rand:active { transform: translate(2px, 2px); box-shadow: none; }
.knopf-rand[hidden] { display: none; }
.knopf-rand[disabled] { border-color: var(--tinte-leise); box-shadow: none; color: var(--tinte-leise); cursor: not-allowed; }
.knopf-rand:focus-visible { outline: 3px solid var(--gelb); outline-offset: 2px; }

/* Abmelden ist die stille Nebentür, kein Hauptweg. */
.knopf-leise {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 1rem auto 0;
  padding: 0.45rem 0.9rem;
  background: none;
  border: 0;
  color: var(--tinte-weich);
  font: 600 0.86rem/1.2 var(--schrift);
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-style: dashed;
  cursor: pointer;
}

.knopf-leise svg { width: 16px; height: 16px; }
.knopf-leise:hover { color: var(--rot); }
.knopf-leise[disabled] { color: var(--tinte-leise); cursor: not-allowed; }
.knopf-leise:focus-visible { outline: 3px solid var(--gelb); outline-offset: 2px; border-radius: 8px; }

.meldung { margin: 0.7rem 0 0; min-height: 1.2rem; font-size: 0.87rem; font-weight: 600; color: var(--tinte-weich); }
.meldung[data-art="fehler"] { color: var(--rot); }

/* ---- Hinweise als Bildzeilen ---- */

.hinweise {
  margin: 1.6rem 0 0;
  padding: 0.2rem 1rem;
  list-style: none;
  background: var(--papier);
  border: var(--strich) solid var(--tinte);
  border-radius: var(--radius);
  box-shadow: var(--wurf-klein);
}

.hinweise li {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0;
  color: var(--tinte);
  font-size: 0.85rem;
  font-weight: 600;
  line-height: 1.3;
}

.hinweise li + li { border-top: 2px dashed rgba(29, 26, 22, 0.16); }

.hinweis-bild {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  background: var(--gelb-weich);
  border: 1.5px solid var(--tinte);
  border-radius: 50%;
  color: var(--tinte);
}

.hinweis-bild svg { width: 15px; height: 15px; }

/* ---- Aktiver Zugang ---- */

.tafel-aktiv { text-align: center; }

.aktiv-marke {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0 0 0.9rem;
  padding: 0.25rem 0.75rem;
  background: var(--gruen-weich);
  border: var(--strich) solid var(--tinte);
  border-radius: 100px;
  box-shadow: var(--wurf-klein);
  font-size: 0.78rem;
  font-weight: 700;
}

.aktiv-marke::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--gruen);
  box-shadow: 0 0 0 1.5px var(--tinte);
}

.tafel-aktiv .tafel-titel { font-size: 1.7rem; text-align: center; }

.aktiv-uhr {
  margin: 1.3rem 0;
  padding: 1.3rem 1rem;
  background: var(--flaeche);
  border: var(--strich) solid var(--tinte);
  border-radius: var(--radius);
  box-shadow: var(--wurf);
}

.aktiv-rest {
  display: block;
  font-size: 2.9rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}

.aktiv-rest-label {
  display: block;
  margin-top: 0.35rem;
  color: var(--tinte-weich);
  font-size: 0.82rem;
  font-weight: 600;
}

.aktiv-warte {
  margin: -0.4rem 0 1.1rem;
  color: var(--tinte-weich);
  font-size: 0.88rem;
  font-weight: 600;
}

.aktiv-warte[hidden] { display: none; }
.aktiv-marke[data-art="warten"] { background: var(--papier); }
.aktiv-marke[data-art="warten"]::before { background: var(--gelb); }
.aktiv-marke[data-art="fehler"] { background: var(--rot-weich); }
.aktiv-marke[data-art="fehler"]::before { background: var(--rot); }

.status-hinweis {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.4rem 0.5rem;
  margin: 0 0 1.1rem;
  color: var(--tinte-weich);
  font-size: 0.85rem;
  font-weight: 600;
}

/* Beschriftung in die erste Zeile, Adresse und Griff darunter. */
.status-hinweis > span:first-child { flex: 0 0 100%; }

.status-hinweis strong {
  padding: 0.1rem 0.5rem;
  background: var(--papier);
  border: var(--strich) solid var(--tinte);
  border-radius: 7px;
  color: var(--tinte);
  font-family: var(--schrift-fest);
  font-size: 0.9rem;
  user-select: all;
}

.kopier-knopf {
  display: grid;
  place-items: center;
  width: 1.9rem;
  height: 1.9rem;
  padding: 0;
  background: var(--papier);
  border: var(--strich) solid var(--tinte);
  border-radius: 8px;
  box-shadow: var(--wurf-klein);
  color: var(--tinte);
  cursor: pointer;
}

.kopier-knopf svg { width: 15px; height: 15px; }
.kopier-knopf .kopier-haken { display: none; }
.kopier-knopf:hover { background: var(--gelb-weich); }
.kopier-knopf:active { transform: translate(2px, 2px); box-shadow: none; }
.kopier-knopf:focus-visible { outline: 3px solid var(--gelb); outline-offset: 2px; }

/* Nach dem Kopieren kurz das Häkchen zeigen, damit der Griff quittiert wird. */
.kopier-knopf[data-z="fertig"] { background: var(--gelb); }
.kopier-knopf[data-z="fertig"] .kopier-blatt { display: none; }
.kopier-knopf[data-z="fertig"] .kopier-haken { display: block; }

.karte-link {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  margin-top: 1.3rem;
  padding: 0.85rem 1rem;
  background: var(--flaeche);
  border: var(--strich) solid var(--tinte);
  border-radius: var(--radius);
  box-shadow: var(--wurf);
  color: var(--tinte-weich);
  text-align: left;
  text-decoration: none;
  font-size: 0.84rem;
}

.karte-link strong { display: block; color: var(--tinte); font-size: 0.95rem; font-weight: 700; }
.karte-link .stern { flex: 0 0 auto; width: 24px; height: 24px; color: var(--gelb-tief); }
.karte-link .pfeil-mini { flex: 0 0 auto; width: 18px; height: 18px; margin-left: auto; color: var(--tinte); }
.karte-link:hover { background: var(--gelb-weich); }
.karte-link:active { transform: translate(3px, 3px); box-shadow: none; }
.karte-link:focus-visible { outline: 3px solid var(--gelb); outline-offset: 2px; }

/* ---- Fuß ---- */

.fuss {
  margin-top: auto;
  padding-top: 1.2rem;
  border-top: 2px dashed rgba(29, 26, 22, 0.25);
  color: var(--tinte-leise);
  font-size: 0.78rem;
}

.fuss p { margin: 0 0 0.4rem; }

.fuss-technik {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--tinte-weich);
  font-weight: 600;
}

.fuss-technik svg { flex: 0 0 auto; width: 16px; height: 16px; }

.fuss-zeile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin-top: 0.7rem;
}

.fuss-links { display: flex; flex-wrap: wrap; gap: 0.35rem 1rem; margin: 0; }
.fuss-links a { color: var(--tinte-weich); text-decoration: underline; text-underline-offset: 3px; }
.fuss-links a:hover { color: var(--tinte); }
.fuss-links a:focus-visible { outline: 3px solid var(--gelb); outline-offset: 2px; }

.karte-knopf {
  padding: 0;
  background: none;
  border: 0;
  color: var(--tinte-weich);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.karte-knopf:hover { color: var(--tinte); }
.karte-knopf:focus-visible { outline: 3px solid var(--gelb); outline-offset: 2px; }

/* ---- Karte im Vollbild ---- */

/* Wird erst geladen, wenn jemand sie öffnet — die Datei wiegt fast ein Megabyte. */
.karte-schau {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(29, 26, 22, 0.85);
}

.karte-schau[hidden] { display: none; }

.karte-rahmen {
  margin: 0;
  max-width: 100%;
  max-height: 100%;
  overflow: auto;
  text-align: center;
}

.karte-rahmen img {
  max-width: 100%;
  height: auto;
  border: var(--strich) solid var(--tinte);
  border-radius: var(--radius);
  background: var(--flaeche);
}

.karte-rahmen figcaption {
  margin-top: 0.8rem;
  color: #f0e9dc;
  font-size: 0.8rem;
  line-height: 1.4;
}

.karte-zu {
  position: absolute;
  top: max(0.9rem, env(safe-area-inset-top));
  right: 0.9rem;
  display: grid;
  place-items: center;
  width: 2.7rem;
  height: 2.7rem;
  background: var(--papier);
  border: var(--strich) solid var(--tinte);
  border-radius: 50%;
  box-shadow: var(--wurf-klein);
  color: var(--tinte);
  cursor: pointer;
}

.karte-zu svg { width: 18px; height: 18px; }
.karte-zu:focus-visible { outline: 3px solid var(--gelb); outline-offset: 2px; }

/* ---- Textseiten ---- */

.text { color: var(--tinte-weich); font-size: 0.94rem; line-height: 1.65; }

.text h1 {
  margin: 0 0 0.3rem;
  color: var(--tinte);
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.text h2 {
  margin: 2rem 0 0.6rem;
  color: var(--tinte);
  font-size: 1.1rem;
  font-weight: 700;
}

.text p { margin: 0 0 0.9rem; }
.text strong { color: var(--tinte); }
.text a { color: var(--tinte); font-weight: 600; text-underline-offset: 3px; }
.text ul { margin: 0 0 0.9rem; padding-left: 1.1rem; }
.text li { margin-bottom: 0.5rem; }
.text-stand { color: var(--tinte-leise); font-size: 0.8rem; }

.sprach-hinweis {
  margin: 0 0 1.5rem;
  padding: 0.85rem 1rem;
  background: var(--papier);
  border: var(--strich) dashed var(--tinte-leise);
  border-radius: var(--radius-klein);
  color: var(--tinte-weich);
  font-size: 0.8rem;
  line-height: 1.5;
}

.sprach-hinweis span { display: block; }

/* ---- Sonderzustände ---- */

.demo-band {
  padding: 0.5rem 1.25rem;
  background: var(--gelb);
  border-bottom: 3px solid var(--tinte);
  color: var(--tinte);
  font-size: 0.79rem;
  font-weight: 800;
  text-align: center;
}

.platzhalter-warnung {
  margin: 0 0 1.4rem;
  padding: 0.85rem 1rem;
  background: var(--gelb);
  border: var(--strich) solid var(--tinte);
  border-radius: var(--radius-klein);
  box-shadow: var(--wurf-klein);
  font-size: 0.86rem;
  font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
