/* Don Candle: dunkles Studio, Gold als einziger Akzent (wie im Live-Bild) */
:root {
  --grund: #0c0d10; --flaeche: #15171c; --flaeche2: #1d2027; --linie: #2a2e37;
  --text: #f3efe6; --leise: #a9a49a; --gold: #f2c230; --gold-dunkel: #c99a12; --rot: #ff6b5b; --gruen: #46d39a;
  --rund: 16px; --schrift: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--grund); color: var(--text); font: 16px/1.55 var(--schrift); min-height: 100dvh; }
body::before { content: ""; position: fixed; inset: 0; z-index: -1; background:
  radial-gradient(120% 60% at 50% -10%, rgba(242,194,48,.14), transparent 60%),
  repeating-linear-gradient(135deg, transparent 0 46px, rgba(242,194,48,.025) 46px 60px); }
a { color: var(--gold); }
.huelle { max-width: 520px; margin: 0 auto; padding: 28px 16px 40px; }
.breit { max-width: 860px; }

/* Bio */
.kopf { text-align: center; margin: 8px 0 26px; }
.avatar { width: 116px; height: 116px; border-radius: 50%; object-fit: cover; border: 3px solid var(--gold); box-shadow: 0 0 0 6px rgba(242,194,48,.12), 0 14px 40px rgba(0,0,0,.5); background: var(--flaeche); }
.kopf h1 { font-size: 30px; letter-spacing: .04em; margin: 14px 0 4px; text-transform: uppercase; font-weight: 800; }
.kopf h1 span { color: var(--gold); }
.kopf p { color: var(--leise); margin: 0 auto; max-width: 34ch; font-size: 15px; }
.knoepfe { display: grid; gap: 12px; }
.knopf { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--text); background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--rund); padding: 16px 18px; min-height: 72px; transition: transform .12s, border-color .12s, background .12s; }
.knopf:hover, .knopf:focus-visible { transform: translateY(-1px); border-color: var(--gold); outline: none; }
.knopf .icon { flex: 0 0 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--flaeche2); }
.knopf .icon svg { width: 24px; height: 24px; }
.knopf b { display: block; font-size: 17px; }
.knopf small { display: block; color: var(--leise); font-size: 13.5px; line-height: 1.35; }
.knopf .pfeil { margin-left: auto; color: var(--leise); font-size: 20px; }
.knopf.haupt { background: linear-gradient(180deg, #f6cd47, var(--gold-dunkel)); color: #16130a; border-color: transparent; }
.knopf.haupt small, .knopf.haupt .pfeil { color: #3a3010; }
.knopf.haupt .icon { background: rgba(0,0,0,.12); }
.marke { display: inline-block; font-size: 11.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: rgba(0,0,0,.18); padding: 2px 7px; border-radius: 99px; margin-left: 6px; vertical-align: 2px; }
.hinweis { margin-top: 26px; padding: 14px 16px; border: 1px solid var(--linie); border-radius: var(--rund); color: var(--leise); font-size: 13px; line-height: 1.5; background: rgba(21,23,28,.7); }
.hinweis b { color: var(--text); }
.fuss { margin-top: 18px; text-align: center; font-size: 13.5px; color: var(--leise); }
.fuss a { color: var(--leise); margin: 0 8px; }

/* Formulare und Karten */
.karte { background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--rund); padding: 20px; }
.karte + .karte { margin-top: 14px; }
h2 { font-size: 22px; margin: 0 0 6px; }
h3 { font-size: 18px; margin: 0 0 6px; }
.leise { color: var(--leise); }
label { display: block; font-size: 14px; font-weight: 600; margin: 14px 0 6px; }
input[type=text], input[type=email], input[type=password], input[type=url], input[inputmode] {
  width: 100%; font: inherit; font-size: 16px; color: var(--text); background: var(--grund); border: 1px solid var(--linie); border-radius: 10px; padding: 12px 13px; }
input:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: transparent; }
.haken { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 14px; color: var(--leise); margin-top: 12px; }
.haken input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--gold); flex: 0 0 auto; }
button, .btn { font: inherit; font-weight: 700; font-size: 16px; border: 0; border-radius: 12px; padding: 13px 18px; cursor: pointer; background: var(--gold); color: #16130a; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; }
button:disabled { opacity: .6; cursor: progress; }
.btn.zweit, button.zweit { background: var(--flaeche2); color: var(--text); border: 1px solid var(--linie); }
.voll { width: 100%; margin-top: 18px; }
.fehler { color: var(--rot); font-size: 14px; margin: 10px 0 0; min-height: 1em; }
.reiter { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--grund); border: 1px solid var(--linie); border-radius: 12px; padding: 4px; margin-bottom: 6px; }
.reiter button { background: transparent; color: var(--leise); min-height: 42px; padding: 8px; }
.reiter button[aria-selected=true] { background: var(--flaeche2); color: var(--text); }
.falle { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Akademie */
.leiste { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.leiste img { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--gold); object-fit: cover; }
.leiste .titel { font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.leiste .titel small { display: block; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--leise); font-size: 13px; }
.leiste .rechts { margin-left: auto; }
.leiste .rechts button { min-height: 38px; padding: 6px 12px; font-size: 14px; }
.balken { height: 8px; background: var(--grund); border-radius: 99px; overflow: hidden; border: 1px solid var(--linie); margin: 10px 0 4px; }
.balken i { display: block; height: 100%; background: var(--gold); width: 0; transition: width .4s; }
.modul { margin-top: 22px; }
.kicker { font-size: 12px; font-weight: 800; letter-spacing: .12em; color: var(--gold); }
.lektionen { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.lektionen a { display: flex; gap: 12px; align-items: center; text-decoration: none; color: var(--text); background: var(--flaeche); border: 1px solid var(--linie); border-radius: 12px; padding: 12px 14px; }
.lektionen a:hover { border-color: var(--gold); }
.lektionen .nr { flex: 0 0 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 800; background: var(--flaeche2); color: var(--leise); }
.lektionen .fertig .nr { background: var(--gold); color: #16130a; }
.lektionen small { display: block; color: var(--leise); font-size: 13px; }
.lektion h1 { font-size: 26px; line-height: 1.25; margin: 6px 0 8px; }
.lektion p { margin: 0 0 14px; }
.ziele { margin: 0 0 18px; padding: 14px 16px 14px 34px; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 12px; }
.ziele li { margin: 3px 0; }
.quiz .frage { margin-top: 14px; }
.quiz .optionen { display: grid; gap: 8px; margin-top: 8px; }
.quiz .optionen button { background: var(--flaeche2); color: var(--text); border: 1px solid var(--linie); text-align: left; justify-content: flex-start; font-weight: 500; }
.quiz .optionen button.richtig { border-color: var(--gruen); background: rgba(70,211,154,.12); }
.quiz .optionen button.falsch { border-color: var(--rot); background: rgba(255,107,91,.1); }
.quiz .warum { font-size: 14px; color: var(--leise); margin: 8px 0 0; }
.nav { display: flex; gap: 10px; justify-content: space-between; margin-top: 22px; flex-wrap: wrap; }
.tg { display: flex; gap: 14px; align-items: center; }
.tg .btn { margin-left: auto; white-space: nowrap; }

/* Rechner */
.werkzeug { margin: 18px 0; }
.felder { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 10px; }
.felder label { margin: 0 0 4px; font-size: 13px; }
.felder .einheit { display: flex; align-items: center; gap: 6px; }
.felder .einheit span { color: var(--leise); font-size: 13px; }
.felder small { color: var(--leise); font-size: 12px; }
.ergebnis { margin-top: 12px; background: var(--grund); border: 1px solid var(--linie); border-radius: 12px; padding: 12px 14px; }
.ergebnis div { display: flex; justify-content: space-between; gap: 10px; padding: 3px 0; }
.ergebnis strong { color: var(--gold); }
.seg { display: inline-grid; grid-auto-flow: column; gap: 6px; margin-bottom: 10px; }
.seg button { min-height: 38px; padding: 6px 16px; background: var(--flaeche2); color: var(--leise); border: 1px solid var(--linie); }
.seg button[aria-pressed=true] { background: var(--gold); color: #16130a; }
.saeulen { display: flex; align-items: flex-end; gap: 3px; height: 90px; margin: 6px 0 10px; }
.saeulen span { flex: 1; height: 100%; display: flex; align-items: flex-end; }
.saeulen i { display: block; width: 100%; background: var(--gold); border-radius: 3px 3px 0 0; }
.notiz { font-size: 12.5px; color: var(--leise); margin: 8px 0 0; }

/* Rechtstexte */
.recht h1 { font-size: 26px; }
.recht h2 { font-size: 18px; margin-top: 26px; }
.recht .luecke { background: rgba(255,107,91,.14); color: var(--rot); padding: 1px 6px; border-radius: 6px; font-weight: 700; }
.zurueck { display: inline-block; margin-bottom: 14px; text-decoration: none; color: var(--leise); }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--linie); vertical-align: top; }
th { color: var(--leise); font-weight: 600; }
.tabelle { overflow-x: auto; }

/* Verwaltung: Bot-Chats */
.reiter.drei { grid-template-columns: repeat(3, 1fr); margin-bottom: 14px; }
.zahl { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--gold); color: #16130a; font-size: 12px; font-weight: 800; }
.chatliste { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.chatliste button { position: relative; display: grid; gap: 2px; width: 100%; text-align: left; justify-content: stretch; background: var(--flaeche); color: var(--text); border: 1px solid var(--linie); border-radius: 12px; padding: 12px 14px; font-weight: 400; min-height: 0; }
.chatliste button:hover { border-color: var(--gold); }
.chatliste button.neu { border-color: var(--gold); }
.chatliste .kopfz { display: flex; gap: 6px; align-items: baseline; padding-right: 30px; }
.chatliste .kopfz small { color: var(--leise); font-size: 13px; }
.chatliste .zt { margin-left: auto; color: var(--leise); font-size: 12.5px; white-space: nowrap; }
.chatliste .vorschau { color: var(--leise); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 30px; }
.chatliste .zahl { position: absolute; right: 12px; bottom: 12px; }
.chatliste .gesperrt { font-size: 11.5px; color: var(--rot); }
.verlauf { padding: 14px; }
.vkopf { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.vkopf small { display: block; }
.blasen { display: flex; flex-direction: column; gap: 8px; max-height: 58vh; overflow-y: auto; padding: 6px 2px; }
.blase { max-width: 82%; padding: 9px 12px; border-radius: 14px; background: var(--flaeche2); border: 1px solid var(--linie); white-space: pre-wrap; overflow-wrap: anywhere; font-size: 15px; }
.blase small { display: block; margin-top: 4px; color: var(--leise); font-size: 11.5px; }
.blase.kunde { align-self: flex-start; border-bottom-left-radius: 4px; }
.blase.don, .blase.bot { align-self: flex-end; border-bottom-right-radius: 4px; }
.blase.don { background: rgba(242,194,48,.16); border-color: rgba(242,194,48,.45); }
.blase.bot { opacity: .8; }
.antwortzeile { display: flex; gap: 8px; margin-top: 12px; align-items: flex-end; }
.antwortzeile textarea { flex: 1; font: inherit; font-size: 16px; color: var(--text); background: var(--grund); border: 1px solid var(--linie); border-radius: 10px; padding: 10px 12px; resize: vertical; min-height: 48px; }
.antwortzeile textarea:focus { outline: 2px solid var(--gold); outline-offset: 1px; border-color: transparent; }

/* 16.11. Akademie-Umbau: zwei Telegram-Knöpfe, Stufen wie bei Cosmo (nach Lernfortschritt) */
.tg .knopfreihe { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.tg .knopfreihe .btn { margin-left: 0; }
@media (max-width: 560px) { .tg { flex-direction: column; align-items: stretch; } .tg .knopfreihe { margin-left: 0; } .tg .knopfreihe .btn { flex: 1; } }
.stufe h3 { margin: 6px 0 4px; }
.stufen { display: flex; gap: 6px; }
.stufen span { flex: 1; height: 30px; border-radius: 8px; display: grid; place-items: center; font-size: 13px; font-weight: 800; background: var(--flaeche2); color: var(--leise); border: 1px solid var(--linie); }
.stufen span.an { background: rgba(242,194,48,.16); color: var(--gold); border-color: rgba(242,194,48,.45); }
/* Vorschau 60 s, danach Telegram (Diego 16.11.) */
.vorschau-uhr { position: fixed; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 20; background: rgba(21,23,28,.94); border: 1px solid rgba(242,194,48,.45); border-radius: 999px; padding: 9px 16px; font-size: 14px; white-space: nowrap; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.vorschau-uhr b { color: var(--gold); font-variant-numeric: tabular-nums; }
.vorbei { position: fixed; inset: 0; z-index: 30; display: grid; place-items: center; padding: 16px; background: rgba(8,9,12,.82); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.vorbei .karte { max-width: 420px; width: 100%; text-align: center; }
.vorbei .avatar { width: 88px; height: 88px; }
.vorbei .btn.voll { display: flex; width: 100%; }
