@font-face {
  font-family: 'Plus Jakarta Sans';
  src: url(schrift/plus-jakarta-sans.woff2) format('woff2');
  font-weight: 200 800; font-style: normal; font-display: swap;
}

:root {
  --bg: #f7f5fb; --flaeche: #ffffff; --text: #1e1530; --text-lauf: #352d45; --leise: #6f6880; --linie: #ece8f3;
  --akzent: #7c3aed; --akzent-zart: #f1eafe; --stern: #db2777; --knopf-text: #ffffff;
  --verlauf: linear-gradient(120deg, #7c3aed, #db2777);
  --schatten: 0 12px 34px rgba(76, 29, 149, .09); --leiste: rgba(255, 255, 255, .92);
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --chip-mix: 12%; --chip-text: var(--thema, var(--akzent));
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #120d1c; --flaeche: #1c1528; --text: #f1ecf9; --text-lauf: #d9d2e6; --leise: #a59dba; --linie: #2d2342;
    --akzent: #b794ff; --akzent-zart: #2a1f40; --stern: #f472b6; --knopf-text: #ffffff;
    --verlauf: linear-gradient(120deg, #8b5cf6, #ec4899);
    --schatten: 0 12px 34px rgba(0, 0, 0, .35); --leiste: rgba(18, 13, 28, .9);
    --chip-mix: 26%; --chip-text: color-mix(in srgb, var(--thema, var(--akzent)) 45%, #ffffff);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #120d1c; --flaeche: #1c1528; --text: #f1ecf9; --text-lauf: #d9d2e6; --leise: #a59dba; --linie: #2d2342;
  --akzent: #b794ff; --akzent-zart: #2a1f40; --stern: #f472b6; --knopf-text: #ffffff;
  --verlauf: linear-gradient(120deg, #8b5cf6, #ec4899);
  --schatten: 0 12px 34px rgba(0, 0, 0, .35); --leiste: rgba(18, 13, 28, .9);
  --chip-mix: 26%; --chip-text: color-mix(in srgb, var(--thema, var(--akzent)) 45%, #ffffff);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--font);
  min-height: 100dvh; padding-bottom: calc(88px + env(safe-area-inset-bottom));
}
body.gesperrt { overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.kopf {
  display: flex; align-items: center; justify-content: space-between;
  padding: calc(8px + env(safe-area-inset-top)) 8px 6px; max-width: 680px; margin: 0 auto;
}
.marke {
  font-weight: 800; font-size: 1.08rem; letter-spacing: -.01em;
  background: var(--verlauf); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.knopf-icon {
  width: 44px; height: 44px; border: 0; background: none; border-radius: 50%;
  display: grid; place-items: center; color: var(--akzent);
}
.knopf-icon:active { background: var(--akzent-zart); }
.knopf-icon:disabled { opacity: .3; }

.ansicht { padding: 4px 16px 24px; max-width: 680px; margin: 0 auto; }
.karte {
  background: var(--flaeche); border-radius: 24px; box-shadow: var(--schatten);
  padding: 22px 22px 20px; overflow: hidden; transition: opacity .18s, transform .18s;
}
.karte.weg { opacity: 0; transform: translateX(-16px); }
.karte.weg-rechts { opacity: 0; transform: translateX(16px); }

.bild { position: relative; margin: -22px -22px 20px; aspect-ratio: 16 / 9; background: var(--akzent-zart); overflow: hidden; }
.bild img { width: 100%; height: 100%; object-fit: cover; object-position: center 28%; display: block; }
.bild figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 12px 7px;
  font-size: .62rem; line-height: 1.35; color: #fff; background: linear-gradient(transparent, rgba(20, 12, 34, .78));
}
.bild figcaption a { text-decoration: none; }

.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: .8rem; color: var(--leise); margin-bottom: 14px; }
.meta .thema {
  background: color-mix(in srgb, var(--thema, var(--akzent)) var(--chip-mix), transparent); color: var(--chip-text);
  padding: 5px 11px; border-radius: 999px; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em;
}
.meta span + span:not(.thema)::before { content: '·'; margin-right: 10px; opacity: .6; }
.meta .thema + span::before { content: none; }
.karte h1 { font-size: 1.58rem; line-height: 1.22; margin: 0 0 16px; font-weight: 800; letter-spacing: -.02em; text-wrap: balance; }
.text { font-size: 1.02rem; line-height: 1.68; color: var(--text-lauf); }
.text p { margin: 0 0 1em; }
.text ul { margin: 0 0 1em; padding-left: 1.2em; }
.text li { margin-bottom: .35em; }
.text strong { font-weight: 700; color: var(--text); }
.quellen { border-top: 1px solid var(--linie); margin-top: 20px; padding-top: 12px; font-size: .76rem; color: var(--leise); line-height: 1.5; }
.quellen ul { margin: 4px 0 0; padding-left: 1.1em; }
.fuss { margin-top: 10px; font-size: .7rem; color: var(--leise); opacity: .85; }
.leer { text-align: center; color: var(--leise); padding: 40px 8px; line-height: 1.6; }

.leiste {
  position: fixed; left: 0; right: 0; bottom: 0; display: flex; gap: 8px; align-items: center;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: var(--leiste); backdrop-filter: blur(12px); box-shadow: 0 -6px 24px rgba(76, 29, 149, .07);
}
.leiste > * { flex: none; }
.knopf-haupt {
  flex: 1; height: 50px; border: 0; border-radius: 16px; background: var(--verlauf); color: var(--knopf-text);
  font-weight: 700; font-size: 1rem; box-shadow: 0 8px 20px rgba(219, 39, 119, .25);
}
.knopf-haupt:active { filter: brightness(.94); }
#btn-merken[aria-pressed="true"] svg { fill: var(--stern); stroke: var(--stern); }
@media (min-width: 720px) { .leiste { justify-content: center; } .knopf-haupt { flex: 0 1 420px; } }

.tafel {
  position: fixed; inset: 0; background: var(--bg); overflow-y: auto; z-index: 10;
  padding: calc(12px + env(safe-area-inset-top)) 16px calc(24px + env(safe-area-inset-bottom));
}
.tafel > * { max-width: 680px; margin-left: auto; margin-right: auto; }
.tafel-kopf { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.tafel h2 { font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; margin: 8px 0; }
.tafel h3 { font-size: .75rem; text-transform: uppercase; letter-spacing: .08em; color: var(--leise); margin: 24px 0 10px; }
.knopf-text { border: 0; background: none; color: var(--akzent); font-weight: 700; padding: 10px 4px; }
.knopf-rand { border: 1px solid var(--linie); background: var(--flaeche); border-radius: 14px; padding: 13px 16px; width: 100%; font-weight: 600; }

.themen { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 1px solid var(--linie); background: var(--flaeche); border-radius: 999px; padding: 9px 14px; font-size: .9rem; font-weight: 600; }
.chip[aria-pressed="true"] {
  background: color-mix(in srgb, var(--thema) var(--chip-mix), var(--flaeche)); color: var(--chip-text);
  border-color: color-mix(in srgb, var(--thema) 40%, transparent);
}
.chip[aria-pressed="false"] { color: var(--leise); text-decoration: line-through; opacity: .7; }

.segmente { display: flex; border-radius: 14px; overflow: hidden; background: var(--flaeche); border: 1px solid var(--linie); padding: 3px; gap: 3px; }
.segmente button { flex: 1; border: 0; background: none; padding: 10px 6px; font-size: .9rem; font-weight: 600; border-radius: 11px; }
.segmente button[aria-checked="true"] { background: var(--verlauf); color: #fff; }
.info { color: var(--leise); line-height: 1.5; margin: 0 0 12px; }

.liste { list-style: none; padding: 0; margin: 0; }
.liste li + li { border-top: 1px solid var(--linie); }
.liste button { width: 100%; text-align: left; border: 0; background: none; padding: 12px 2px; display: flex; gap: 12px; align-items: center; }
.liste img { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; flex: none; background: var(--akzent-zart); }
.liste .titel { display: block; font-weight: 700; font-size: .98rem; line-height: 1.3; }
.liste .unter { display: block; font-size: .76rem; color: var(--leise); margin-top: 3px; }

.hinweis {
  position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translateX(-50%);
  background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 12px; font-size: .88rem; font-weight: 600;
  max-width: calc(100% - 32px); z-index: 20; text-align: center;
}
@media (prefers-reduced-motion: reduce) { .karte { transition: none; } }
