/* CREDO — Schwarz und Gold.
   Gold ist hier kein Gelb, sondern ein Metall: es erscheint sparsam, meist als
   Haarlinie oder Verlauf, nie als Fläche. Alles, was glänzt, verliert dadurch
   seine Wirkung — deshalb trägt Gold nur das, was zählt: Fortschritt,
   Bestätigung, die Mission. */

:root {
  --tief:        #08080A;
  --grund:       #0C0C0F;
  --flaeche:     #141418;
  --flaeche-hoch:#1B1B21;
  --linie:       #26262E;
  --linie-hell:  #343440;

  --gold:        #C9A227;
  --gold-hell:   #E8C86A;
  --gold-tief:   #8C6F1A;
  --gold-schimmer: linear-gradient(135deg, #E8C86A 0%, #C9A227 45%, #8C6F1A 100%);

  --text:        #F2F0EB;
  --text-leise:  #9B968C;
  --text-stumm:  #625E57;

  --gut:         #4FA978;
  --warn:        #C9822E;
  --schlecht:    #B4534B;

  --r-s: 10px; --r-m: 16px; --r-l: 22px;
  --schatten: 0 1px 2px rgba(0,0,0,.6), 0 8px 28px rgba(0,0,0,.45);

  --serif: ui-serif, "New York", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, system-ui, sans-serif;

  --sicher-oben: env(safe-area-inset-top, 0px);
  --sicher-unten: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0;
  background: var(--tief);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

body {
  min-height: 100dvh;
  background:
    radial-gradient(1100px 620px at 50% -12%, rgba(201,162,39,.10), transparent 62%),
    radial-gradient(760px 420px at 100% 102%, rgba(201,162,39,.05), transparent 60%),
    var(--tief);
  background-attachment: fixed;
}

/* ---------- Grundbausteine ---------- */

.huelle { max-width: 680px; margin: 0 auto; padding: calc(var(--sicher-oben) + 18px) 18px calc(var(--sicher-unten) + 108px); }

h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -.01em; margin: 0; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.22rem; }
h3 { font-size: 1.02rem; }

.leise { color: var(--text-leise); }
.stumm { color: var(--text-stumm); }
.klein { font-size: .82rem; }
.zentriert { text-align: center; }

.marke {
  font-family: var(--serif); font-size: 1.35rem; letter-spacing: .26em;
  background: var(--gold-schimmer); -webkit-background-clip: text; background-clip: text;
  color: transparent; text-transform: uppercase;
}

.karte {
  background: linear-gradient(180deg, var(--flaeche-hoch), var(--flaeche));
  border: 1px solid var(--linie);
  border-radius: var(--r-m);
  padding: 16px;
  box-shadow: var(--schatten);
  margin-bottom: 14px;
}
.karte > header { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }

.haarlinie { height: 1px; background: linear-gradient(90deg, transparent, var(--gold-tief), transparent); border: 0; margin: 18px 0; opacity: .6; }

/* ---------- Eingaben ---------- */

input, textarea, select, button { font: inherit; color: inherit; }

input[type=text], input[type=password], input[type=number], textarea, select {
  width: 100%; background: #0A0A0D; border: 1px solid var(--linie);
  border-radius: var(--r-s); padding: 12px 13px; color: var(--text);
  transition: border-color .18s, box-shadow .18s;
}
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--gold-tief);
  box-shadow: 0 0 0 3px rgba(201,162,39,.14);
}
textarea { resize: vertical; min-height: 110px; line-height: 1.55; }
::placeholder { color: var(--text-stumm); }

label.feld { display: block; margin-bottom: 14px; }
label.feld > span { display: block; font-size: .8rem; letter-spacing: .07em; text-transform: uppercase;
  color: var(--text-leise); margin-bottom: 7px; }

.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 20px; border-radius: var(--r-s); border: 1px solid var(--linie-hell);
  background: var(--flaeche-hoch); cursor: pointer; font-weight: 500;
  transition: transform .1s, border-color .18s, background .18s;
}
.knopf:active { transform: scale(.985); }
.knopf.gold {
  background: var(--gold-schimmer); border-color: transparent; color: #17130A; font-weight: 640;
}
.knopf.breit { width: 100%; }
.knopf.still { background: transparent; border-color: var(--linie); color: var(--text-leise); }
.knopf:disabled { opacity: .45; cursor: default; }

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

.balken { height: 6px; border-radius: 99px; background: #17171C; overflow: hidden; border: 1px solid var(--linie); }
.balken > i { display: block; height: 100%; background: var(--gold-schimmer); border-radius: 99px;
  transition: width .5s cubic-bezier(.22,1,.36,1); }

.ring { --wert: 0; width: 56px; height: 56px; border-radius: 50%;
  background: conic-gradient(var(--gold) calc(var(--wert) * 1%), #1A1A20 0);
  display: grid; place-items: center; position: relative; }
.ring::after { content: ''; position: absolute; inset: 4px; border-radius: 50%; background: var(--flaeche); }
.ring > span { position: relative; z-index: 1; font-size: .78rem; font-variant-numeric: tabular-nums; }

/* ---------- Haken ---------- */

.haken {
  width: 28px; height: 28px; flex: 0 0 28px; border-radius: 9px;
  border: 1.5px solid var(--linie-hell); background: #0A0A0D;
  display: grid; place-items: center; cursor: pointer;
  transition: border-color .18s, background .18s, transform .1s;
}
.haken:active { transform: scale(.9); }
.haken[aria-checked=true] { background: var(--gold-schimmer); border-color: transparent; }
.haken[aria-checked=true]::after { content: '✓'; color: #17130A; font-weight: 800; font-size: .95rem; }
.haken[data-status=ausgelassen] { border-color: var(--schlecht); }
.haken[data-status=ausgelassen]::after { content: '–'; color: var(--schlecht); font-weight: 800; }

.zeile { display: flex; align-items: center; gap: 13px; padding: 11px 0; border-bottom: 1px solid var(--linie); }
.zeile:last-child { border-bottom: 0; }
.zeile > .mitte { flex: 1; min-width: 0; }
.zeile .titel { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.streak { font-variant-numeric: tabular-nums; font-size: .8rem; color: var(--gold); white-space: nowrap; }

.marke-klein { display: inline-block; font-size: .7rem; letter-spacing: .08em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 99px; border: 1px solid var(--linie-hell); color: var(--text-leise); }
.marke-klein.gold { border-color: var(--gold-tief); color: var(--gold-hell); }

/* ---------- Navigation ---------- */

.navi {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 8px 6px calc(var(--sicher-unten) + 8px);
  background: rgba(10,10,13,.84); backdrop-filter: blur(18px) saturate(140%);
  border-top: 1px solid var(--linie);
}
.navi a { display: grid; justify-items: center; gap: 3px; padding: 6px 2px; text-decoration: none;
  color: var(--text-stumm); font-size: .64rem; letter-spacing: .05em; }
.navi a.aktiv { color: var(--gold-hell); }
.navi a svg { width: 21px; height: 21px; stroke: currentColor; fill: none; stroke-width: 1.6; }

/* ---------- Hinweise ---------- */

.hinweis { padding: 11px 13px; border-radius: var(--r-s); border: 1px solid var(--linie);
  background: var(--flaeche); font-size: .88rem; }
.hinweis.fehler { border-color: var(--schlecht); color: #E8B4AE; }
.hinweis.gut { border-color: var(--gut); color: #A9DCC1; }

.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(var(--sicher-unten) + 86px);
  z-index: 50; background: var(--flaeche-hoch); border: 1px solid var(--gold-tief);
  padding: 11px 18px; border-radius: 99px; box-shadow: var(--schatten); font-size: .88rem;
  animation: auf .25s cubic-bezier(.22,1,.36,1); }
@keyframes auf { from { opacity: 0; transform: translate(-50%, 10px); } }

.laden { display: grid; place-items: center; min-height: 48vh; color: var(--text-stumm); }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }
