/* Grundstil: Farben (Design-Tokens aus design/HANDOVER.md), Kopfzeile, Knöpfe, App-Karte, Detailseite */
@font-face { font-family: 'Bricolage Grotesque'; font-style: normal; font-weight: 500 800; font-display: swap;
  src: url(/static/schriften/Bricolage-Grotesque.woff2) format('woff2'); }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 500; font-display: swap;
  src: url(/static/schriften/JetBrains-Mono.woff2) format('woff2'); }

:root, [data-theme="dark"] {
  --bg: #121212; --flaeche: #1E1E1E; --flaeche2: #262626; --linie: #2A2A2A;
  --text: #F3F1EE; --gedaempft: #DDD8D2; --meta: #B5B0A9;
  --akzent: #FF9A52; --akzent-text: #FFB37A;
  --mo-bg: #1E1E1E; --mo-rand: #1E1E1E; --mo-code: #121212; --mo-code-rand: #333333;
  --ok-bg: #16261B; --ok-text: #A8E8BA; --ok-icon: #7FD99A;
  --feld-rand: #3A3A3A; --schatten: 0 10px 30px rgba(0,0,0,.45);
}
[data-theme="light"] {
  --bg: #FFFFFF; --flaeche: #F2F3F5; --flaeche2: #F2F3F5; --linie: #E8E9EC;
  --text: #15171A; --gedaempft: #33373F; --meta: #5C616B;
  --akzent: #FF9A52; --akzent-text: #A8460B;
  --mo-bg: #FFF3EA; --mo-rand: #F1D9C6; --mo-code: #FFFFFF; --mo-code-rand: #F1D9C6;
  --ok-bg: #EEF8F0; --ok-text: #1E5A2E; --ok-icon: #2E7D46;
  --feld-rand: #D5D7DC; --schatten: 0 10px 30px rgba(20,24,31,.18);
}
/* Ohne Skript (z. B. Dateivorschau) entscheidet die Systemeinstellung */
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    --bg: #FFFFFF; --flaeche: #F2F3F5; --flaeche2: #F2F3F5; --linie: #E8E9EC;
    --text: #15171A; --gedaempft: #33373F; --meta: #5C616B;
    --akzent: #FF9A52; --akzent-text: #A8460B;
    --mo-bg: #FFF3EA; --mo-rand: #F1D9C6; --mo-code: #FFFFFF; --mo-code-rand: #F1D9C6;
    --ok-bg: #EEF8F0; --ok-text: #1E5A2E; --ok-icon: #2E7D46;
    --feld-rand: #D5D7DC; --schatten: 0 10px 30px rgba(20,24,31,.18);
  }
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .sonne { display: block; }
  :root:not([data-theme]) .mond { display: none; }
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); display: flex; justify-content: center; padding: 0; }
a { color: var(--akzent-text); }

.seite {
  width: 100%; max-width: 600px; background: var(--bg); color: var(--text);
  font-family: 'Bricolage Grotesque', system-ui, sans-serif;
  display: flex; flex-direction: column;
  transition: background .25s, color .25s;
}

/* Knöpfe: Hover, Einsinken, Zurückfedern */
button, .knopf { cursor: pointer; transition: transform .12s cubic-bezier(.3,1.6,.6,1), filter .15s, background .15s; }
button:hover, .knopf:hover { filter: brightness(1.12); }
button:active, .knopf:active { transform: scale(.95); }
.icon-knopf { width: 44px; height: 44px; border: 0; background: transparent; border-radius: 12px; display: flex; align-items: center; justify-content: center; color: var(--text); }
.icon-knopf:hover { background: var(--flaeche); filter: none; }
svg.l { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Kopfzeile */
.kopf { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-bottom: 1px solid var(--linie); }
.logo { font-weight: 800; font-size: 20px; letter-spacing: -0.5px; }
.logo span { color: var(--akzent); }
.kopf-rechts { display: flex; gap: 2px; align-items: center; }
.avatar-klein { width: 32px; height: 32px; border-radius: 50%; background: #3B5B78; margin-left: 6px; }
.sonne { display: none; } [data-theme="dark"] .sonne { display: block; } [data-theme="dark"] .mond { display: none; }

/* Entwickler-Zeile */
.inhalt { padding: 20px 16px 0; display: flex; flex-direction: column; gap: 16px; }
.entwickler { display: flex; align-items: center; gap: 10px; }
.entwickler .av { width: 40px; height: 40px; border-radius: 50%; background: linear-gradient(135deg,#1F6E3F,#A8431F 70%,#4B3378); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 16px; flex: 0 0 40px; }
.entwickler .name { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.entwickler .name b { font-size: 15px; }
.entwickler .name span { font-size: 13px; color: var(--meta); }
.folgen { height: 36px; padding: 0 16px; border-radius: 18px; border: 1.5px solid var(--text); background: transparent; color: var(--text); font: 700 14px 'Bricolage Grotesque', sans-serif; }

/* ---------- App-Karte ---------- */
.karte { border-radius: 24px; padding: 20px; display: flex; flex-direction: column; gap: 16px; position: relative; overflow: hidden; }
.karte h1 { margin: 0; font-size: 30px; line-height: 1; font-weight: 800; letter-spacing: -0.8px; }
.karte .einzeiler { font-size: 14px; font-weight: 500; line-height: 1.35; opacity: .85; }
.kopfzeile-app { display: flex; gap: 14px; align-items: center; }
.kopfzeile-app svg { flex: 0 0 60px; border-radius: 14px; box-shadow: 0 4px 14px rgba(0,0,0,.35); }

/* Titelbild: drei Handys gefächert */
.titelbild { position: relative; height: 172px; border-radius: 16px; overflow: hidden; }
.titelbild img { position: absolute; width: 96px; top: 18px; border-radius: 12px; box-shadow: 0 8px 22px rgba(0,0,0,.5); border: 1px solid rgba(255,255,255,.12); }
.titelbild img.l1 { left: 14%; transform: translateX(-50%) rotate(-8deg); top: 26px; }
.titelbild img.l2 { left: 50%; transform: translateX(-50%); width: 108px; z-index: 2; top: 12px; }
.titelbild img.l3 { left: 86%; transform: translateX(-50%) rotate(8deg); top: 26px; }

/* Die fünf Gems */
.gems { display: flex; gap: 6px; flex-wrap: wrap; }
.gem { font-size: 12px; font-weight: 700; padding: 6px 10px 6px 8px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; }
.gem i { width: 8px; height: 8px; border-radius: 50%; display: block; }
.g-nutri i { background: #8FD9A4; } .g-fit i { background: #F6B48D; } .g-korb i { background: #B08AE0; }
.g-markt i { background: #F2B84B; } .g-labor i { background: #E8799A; }

.laden { height: 52px; border-radius: 16px; text-decoration: none; display: flex; align-items: center; justify-content: center; gap: 10px; font-weight: 800; font-size: 16px; border: 0; width: 100%; font-family: inherit; }
.meta-zeile { font-size: 12px; font-weight: 500; text-align: center; opacity: .75; margin-top: -6px; }

/* Variante A – Stein (wie der Hintergrund der App: dunkel mit grünem und orangem Schein) */
.v-stein { background:
    radial-gradient(120% 80% at 0% 0%, rgba(40,120,64,.62), transparent 60%),
    radial-gradient(110% 70% at 100% 100%, rgba(176,104,42,.50), transparent 62%),
    #15181F;
  color: #F1F3EE; border: 1px solid rgba(255,255,255,.07); }
.v-stein .titelbild { background: radial-gradient(80% 90% at 50% 0%, rgba(143,217,164,.22), rgba(0,0,0,.25)); }
.v-stein .gem { background: rgba(255,255,255,.09); }
.v-stein .laden { background: #8FD9A4; color: #0E2A18; }

/* Variante B – Grün (NutriGem) */
.v-gruen { background: #1D4A2D; color: #EAF4EC; border: 1px solid #2B6140; }
.v-gruen .titelbild { background: rgba(0,0,0,.22); }
.v-gruen .gem { background: rgba(255,255,255,.11); }
.v-gruen .laden { background: #EAF4EC; color: #12301A; }

/* Variante C – Dreifarbig wie der Stein im Symbol */
.v-drei { background: linear-gradient(140deg, #2B7A48 0%, #3F7046 28%, #A4532A 62%, #5B3E8E 100%); color: #FFFFFF; }
.v-drei .titelbild { background: rgba(0,0,0,.20); }
.v-drei .gem { background: rgba(0,0,0,.22); }
.v-drei .laden { background: #FFFFFF; color: #15171A; }

/* Variante D – Papier: helle Karte, oben die drei Farben als Kante */
.v-papier { background: #F6F3EC; color: #15171A; border: 1px solid #E6E0D3; padding-top: 26px; }
.v-papier::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 6px;
  background: linear-gradient(90deg, #2E8B57 0 40%, #D9733B 40% 75%, #7A57B8 75%); }
.v-papier .titelbild { background: #15181F; }
.v-papier .gem { background: #FFFFFF; border: 1px solid #E6E0D3; }
.v-papier .laden { background: #15171A; color: #FFFFFF; }

/* Vertrauens-Kacheln */
.kacheln { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; }
.kachel { border-radius: 14px; background: var(--flaeche); padding: 10px; display: flex; flex-direction: column; gap: 4px; font-size: 12px; font-weight: 700; line-height: 1.25; }
.kachel small { font-weight: 500; color: var(--meta); font-size: 11px; }
.kachel.ok { background: var(--ok-bg); color: var(--ok-text); }
.kachel.ok svg { color: var(--ok-icon); }

/* Aktionsleiste */
.aktionen { margin: 16px 16px 0; padding: 4px 0; border-top: 1px solid var(--linie); border-bottom: 1px solid var(--linie); display: flex; justify-content: space-between; }
.aktionen button { height: 44px; border: 0; background: transparent; display: flex; align-items: center; gap: 6px; font: 700 14px 'Bricolage Grotesque', sans-serif; color: var(--text); padding: 0 8px; border-radius: 12px; }
.aktionen button.an { color: #E8799A; }
.aktionen button.an svg { fill: #E8799A; stroke: #E8799A; }

/* Screenshots */
.shots { display: flex; gap: 10px; padding: 20px 16px 0; overflow-x: auto; scrollbar-width: none; }
.shots figure { margin: 0; flex: 0 0 140px; display: flex; flex-direction: column; gap: 6px; }
.shots img { width: 140px; height: 280px; object-fit: cover; object-position: top; border-radius: 18px; border: 1px solid var(--linie); display: block; }
.shots figcaption { font-size: 12px; font-weight: 700; color: var(--meta); padding-left: 4px; }

/* Making-of */
.making { margin: 20px 16px 0; padding: 18px; border-radius: 20px; background: var(--mo-bg); border: 1px solid var(--mo-rand); display: flex; flex-direction: column; gap: 12px; }
.making .label { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--akzent-text); letter-spacing: .3px; }
.making h2 { margin: 0; font-size: 22px; line-height: 1.15; font-weight: 800; }
.making p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--gedaempft); }
.weg { display: flex; align-items: center; gap: 4px; flex-wrap: nowrap; font-size: 11.5px; font-weight: 700; }
.weg span { padding: 4px 8px; border-radius: 999px; background: var(--bg); border: 1px solid var(--linie); }
.weg em { font-style: normal; color: var(--meta); }
.weg span.ziel { background: #15181F; color: #F1F3EE; border-color: #15181F; }
.prompt { border-radius: 12px; background: var(--mo-code); border: 1px solid var(--mo-code-rand); padding: 12px; font-family: 'JetBrains Mono', monospace; font-size: 12.5px; line-height: 1.55; }
.prompt b { color: var(--akzent-text); font-weight: 500; }
.prompt small { color: var(--meta); }
.mehr { font-weight: 700; font-size: 14px; min-height: 44px; display: flex; align-items: center; }

/* Kommentare */
.kommentare { padding: 24px 16px 32px; display: flex; flex-direction: column; gap: 16px; }
.kommentare h2 { margin: 0; font-size: 18px; font-weight: 800; }
.kommentare h2 span { color: var(--meta); font-weight: 500; }
.k { display: flex; gap: 10px; }
.k.antwort { padding-left: 42px; }
.k .av { flex: 0 0 32px; height: 32px; border-radius: 50%; display: block; }
.k.antwort .av { flex-basis: 28px; height: 28px; }
.k div { display: flex; flex-direction: column; gap: 4px; }
.k .wer { font-size: 13px; font-weight: 700; }
.k .wer em { font-style: normal; font-weight: 500; color: var(--meta); }
.k .text { font-size: 14px; line-height: 1.45; color: var(--gedaempft); }
.badge { font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 6px; background: var(--akzent); color: #121212; }
.kommentare label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 700; }
.kommentare input { height: 48px; border-radius: 14px; border: 1.5px solid var(--feld-rand); background: var(--flaeche); color: var(--text); padding: 0 14px; font: 500 15px 'Bricolage Grotesque', sans-serif; }

/* Datenschutz links unten, Impressum rechts unten – auf allen Seiten ohne Anmeldung, immer erreichbar */
.ecken { position: absolute; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; justify-content: space-between;
  padding: 14px 20px calc(14px + env(safe-area-inset-bottom)); font-size: 12px; pointer-events: none; }
.ecken a { pointer-events: auto; color: var(--meta); text-decoration: none; }
.ecken a:hover { color: var(--text); text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--akzent) 60%, transparent); }
body:has(> .ecken), .seite:has(> .ecken) { position: relative; min-height: 100vh; min-height: 100svh; padding-bottom: 46px; box-sizing: border-box; }
