/* Kraftquelle – zwei Designs: A „Morgenlicht“ (hell, warm) · B „Abendruhe“ (dunkel, bernstein) */
:root, [data-design="a"] {
  --grund: #f6f1e7;
  --flaeche: #fffdf8;
  --flaeche2: #efe7d7;
  --text: #2b2520;
  --leise: #7a6f62;
  --linie: #e3d8c4;
  --akzent: #b5782a;
  --akzent-text: #fff;
  --stern: #d79a2b;
  --schatten: 0 1px 2px rgba(60,40,10,.06), 0 6px 18px rgba(60,40,10,.07);
  --titel-schrift: ui-serif, "New York", Georgia, serif;
}
[data-design="b"] {
  --grund: #12161f;
  --flaeche: #1b212d;
  --flaeche2: #252c3a;
  --text: #f1ece2;
  --leise: #9aa3b2;
  --linie: #2c3443;
  --akzent: #e0a54a;
  --akzent-text: #1b1406;
  --stern: #f0b955;
  --schatten: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
  --titel-schrift: -apple-system, "SF Pro Display", system-ui, sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--grund); color: var(--text); }
body {
  font: 16px/1.4 -apple-system, system-ui, "Segoe UI", sans-serif;
  padding-bottom: calc(140px + env(safe-area-inset-bottom));
  min-height: 100vh;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
h1, h2 { font-family: var(--titel-schrift); font-weight: 600; letter-spacing: -.01em; }
[hidden] { display: none !important; }

/* Anmeldung */
#anmeldung { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.anmelde-karte { text-align: center; max-width: 320px; width: 100%; }
.anmelde-icon { width: 84px; height: 84px; border-radius: 20px; box-shadow: var(--schatten); }
.anmelde-karte h1 { font-size: 32px; margin: 16px 0 4px; }
.anmelde-karte p { color: var(--leise); margin: 0 0 24px; }
#anmeldeform input { width: 100%; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--linie); background: var(--flaeche); margin-bottom: 10px; }
#anmeldeform button { width: 100%; padding: 14px; border-radius: 12px; background: var(--akzent); color: var(--akzent-text); font-weight: 600; }
.fehler { color: #c0392b; }

/* Kopf */
.kopf { position: sticky; top: 0; z-index: 5; background: var(--grund); padding: calc(env(safe-area-inset-top) + 8px) 16px 8px; }
.kopf-zeile { display: flex; align-items: center; justify-content: space-between; }
.kopf h1 { font-size: 30px; margin: 4px 0 10px; }
.suche input { width: 100%; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--linie); background: var(--flaeche); outline: none; }
.suche input:focus { border-color: var(--akzent); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 10px 0 2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chips button { flex: none; padding: 7px 13px; border-radius: 999px; background: var(--flaeche); border: 1px solid var(--linie); font-size: 14px; white-space: nowrap; }
.chips button.aktiv { background: var(--akzent); color: var(--akzent-text); border-color: var(--akzent); }
.chips.klein button { padding: 4px 10px; font-size: 13px; }
.chips.klein:empty { display: none; }
.zeile-auswahl { display: flex; gap: 8px; padding-top: 8px; }
.zeile-auswahl select { flex: 1; min-width: 0; padding: 8px 10px; border-radius: 10px; border: 1px solid var(--linie); background: var(--flaeche); font-size: 14px; -webkit-appearance: none; appearance: none; }
.rund { width: 38px; height: 38px; border-radius: 50%; display: inline-grid; place-items: center; background: var(--flaeche); border: 1px solid var(--linie); font-size: 18px; }

/* Liste */
.liste { padding: 6px 16px; display: grid; gap: 10px; }
.karte { display: grid; grid-template-columns: 96px 1fr; gap: 12px; align-items: center; padding: 10px; background: var(--flaeche); border-radius: 14px; box-shadow: var(--schatten); text-align: left; width: 100%; }
.karte img, .karte .bild-platz { width: 96px; height: 54px; object-fit: cover; border-radius: 8px; background: var(--flaeche2); }
.karte b { display: block; font-size: 15px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.karte .meta { font-size: 12.5px; color: var(--leise); margin-top: 4px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.karte .meta .st { color: var(--stern); letter-spacing: 1px; }
.balken { height: 3px; background: var(--flaeche2); border-radius: 2px; margin-top: 6px; overflow: hidden; }
.balken i { display: block; height: 100%; background: var(--akzent); }
.karte.spielt { outline: 2px solid var(--akzent); }
.leer { text-align: center; color: var(--leise); padding: 40px 16px; }
mark { background: color-mix(in srgb, var(--akzent) 30%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }

/* Mitgenommen */
.mitgenommen { padding: 6px 16px; display: grid; gap: 10px; }
.zitat { background: var(--flaeche); border-radius: 14px; padding: 14px 16px; box-shadow: var(--schatten); text-align: left; width: 100%; }
.zitat p { margin: 0 0 8px; white-space: pre-wrap; font-family: var(--titel-schrift); font-size: 17px; line-height: 1.45; }
.zitat .herkunft { font-size: 12.5px; color: var(--leise); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.zitat .herkunft .st { color: var(--stern); }

/* Detail / Player */
.detail { position: fixed; inset: 0; z-index: 20; background: var(--grund); overflow-y: auto; -webkit-overflow-scrolling: touch; animation: hoch .25s ease-out; }
@keyframes hoch { from { transform: translateY(40px); opacity: 0; } to { transform: none; opacity: 1; } }
.detail-griff { position: sticky; top: 0; z-index: 2; padding: calc(env(safe-area-inset-top) + 8px) 16px 8px; background: linear-gradient(var(--grund) 70%, transparent); }
.detail-inhalt { padding: 0 20px calc(40px + env(safe-area-inset-bottom)); max-width: 560px; margin: 0 auto; }
.d-bild { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 16px; box-shadow: var(--schatten); background: var(--flaeche2); }
.detail h2 { font-size: 23px; line-height: 1.2; margin: 16px 0 4px; }
.unter { color: var(--leise); margin: 0; font-size: 14px; }
.spieler { margin: 18px 0 8px; }
input[type=range] { width: 100%; accent-color: var(--akzent); }
.zeiten { display: flex; justify-content: space-between; font-size: 12.5px; color: var(--leise); font-variant-numeric: tabular-nums; }
.tasten { display: flex; justify-content: center; align-items: center; gap: 28px; margin: 14px 0; }
.rund.gross { width: 54px; height: 54px; font-size: 24px; position: relative; }
.rund.gross small { position: absolute; font-size: 9px; font-weight: 700; top: 21px; }
.play { width: 74px; height: 74px; border-radius: 50%; background: var(--akzent); color: var(--akzent-text); font-size: 30px; box-shadow: var(--schatten); }
.tasten-klein { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; }
.pille { padding: 8px 14px; border-radius: 999px; background: var(--flaeche); border: 1px solid var(--linie); font-size: 14px; }
.pille.voll { background: var(--akzent); color: var(--akzent-text); border-color: var(--akzent); font-weight: 600; }
.pille.an { border-color: var(--akzent); color: var(--akzent); }
.block { margin-top: 22px; }
.block h3, .block summary { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--leise); margin: 0 0 8px; font-weight: 600; }
.sterne { display: flex; gap: 6px; }
.sterne button { font-size: 22px; color: var(--linie); padding: 2px; }
.sterne.gross button { font-size: 36px; }
.sterne button.an { color: var(--stern); }
.eingabe-zeile { display: flex; gap: 8px; align-items: center; margin-top: 8px; }
.eingabe-zeile input:not([type=checkbox]) { flex: 1; min-width: 0; padding: 9px 12px; border-radius: 10px; border: 1px solid var(--linie); background: var(--flaeche); }
.eingabe-zeile .haken { flex: 1; font-size: 14px; color: var(--leise); display: flex; gap: 6px; align-items: center; }
textarea { width: 100%; padding: 12px; border-radius: 12px; border: 1px solid var(--linie); background: var(--flaeche); resize: vertical; }
.notizen { display: grid; gap: 8px; margin-top: 12px; }
.notiz { background: var(--flaeche); border-radius: 12px; padding: 10px 12px; border-left: 3px solid var(--akzent); }
.notiz p { margin: 0; white-space: pre-wrap; }
.notiz .fuss { display: flex; gap: 10px; align-items: center; margin-top: 6px; font-size: 12.5px; color: var(--leise); }
.notiz .sprung { color: var(--akzent); font-weight: 600; font-variant-numeric: tabular-nums; }
.notiz .weg { margin-left: auto; color: var(--leise); }
.schlagwort { display: inline-flex; gap: 4px; align-items: center; }
.beschreibung { white-space: pre-wrap; font-size: 14px; color: var(--leise); }
.detail a { color: var(--akzent); }

/* Mini-Player + Reiter */
.mini { position: fixed; left: 10px; right: 10px; bottom: calc(66px + env(safe-area-inset-bottom)); z-index: 10; display: grid; grid-template-columns: 54px minmax(0, 1fr) 40px; gap: 10px; align-items: center; padding: 8px; border-radius: 14px; background: var(--flaeche); box-shadow: var(--schatten); border: 1px solid var(--linie); }
.mini img { width: 54px; height: 32px; object-fit: cover; border-radius: 6px; }
.m-text b { font-size: 13.5px; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-balken { height: 3px; background: var(--flaeche2); margin-top: 5px; border-radius: 2px; overflow: hidden; }
.m-balken i { display: block; height: 100%; background: var(--akzent); width: 0; }
.reiter { position: fixed; left: 0; right: 0; bottom: 0; z-index: 9; display: flex; background: color-mix(in srgb, var(--grund) 88%, transparent); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-top: 1px solid var(--linie); padding-bottom: env(safe-area-inset-bottom); }
.reiter button { flex: 1; padding: 8px 0 6px; font-size: 11px; color: var(--leise); display: grid; justify-items: center; gap: 2px; }
.reiter button span { font-size: 20px; }
.reiter button.aktiv { color: var(--akzent); }
