:root {
  --bg: #0f172a;
  --bg-karte: #1e293b;
  --bg-karte-2: #273449;
  --text: #f1f5f9;
  --text-dim: #94a3b8;
  --akzent: #38bdf8;
  --akzent-dunkel: #0284c7;
  --aufnahme: #f43f5e;
  --rand: #334155;
  --radius: 18px;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 6px;
}

.marke { display: flex; align-items: center; gap: 12px; }
.logo { width: 44px; height: 44px; }
h1 { margin: 0; font-size: 22px; letter-spacing: .02em; }
.claim { margin: 0; color: var(--text-dim); font-size: 14px; }

.icon-btn {
  background: none;
  border: 1px solid var(--rand);
  color: var(--text-dim);
  width: 40px; height: 40px;
  border-radius: 50%;
  font-size: 20px;
  cursor: pointer;
}

main {
  max-width: 640px;
  margin: 0 auto;
  padding: 10px 16px 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.karte {
  background: var(--bg-karte);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, .25);
}

h2 { margin: 0 0 10px; font-size: 16px; color: var(--text-dim); text-transform: uppercase; letter-spacing: .08em; }

.stil-zeile { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.stil-zeile label { color: var(--text-dim); font-size: 15px; }

select, input[type="password"], textarea {
  width: 100%;
  background: var(--bg-karte-2);
  color: var(--text);
  border: 1px solid var(--rand);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
}
.stil-zeile select { width: auto; flex: 1; }
textarea { resize: vertical; min-height: 84px; }

.mic {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  width: 100%;
  background: none;
  border: none;
  color: var(--text);
  cursor: pointer;
  padding: 10px 0 6px;
  -webkit-tap-highlight-color: transparent;
}
.mic-kreis {
  width: 108px; height: 108px;
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--akzent);
  color: var(--bg);
  box-shadow: 0 0 0 0 rgba(56, 189, 248, .5);
  transition: background .2s, transform .15s;
}
.mic-kreis svg { width: 52px; height: 52px; }
.mic:active .mic-kreis { transform: scale(.96); }
.mic[aria-pressed="true"] .mic-kreis {
  background: var(--aufnahme);
  color: #fff;
  animation: puls 1.4s ease-out infinite;
}
@keyframes puls {
  0% { box-shadow: 0 0 0 0 rgba(244, 63, 94, .55); }
  100% { box-shadow: 0 0 0 26px rgba(244, 63, 94, 0); }
}
.mic-text { font-size: 15px; color: var(--text-dim); }

.status { min-height: 1.4em; margin: 4px 0 10px; text-align: center; color: var(--text-dim); font-size: 14px; }
.status.fehler { color: #fda4af; }

.feld-label { display: block; font-size: 14px; color: var(--text-dim); margin: 10px 0 6px; }
.hinweis { font-weight: normal; opacity: .7; }

.aktionen { display: flex; gap: 10px; margin-top: 14px; }
.aktionen > * { flex: 1; }

button.primaer, button.sekundaer {
  border-radius: 12px;
  padding: 12px 16px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
}
button.primaer { background: var(--akzent); color: var(--bg); }
button.primaer:disabled { opacity: .45; cursor: default; }
button.sekundaer { background: transparent; color: var(--text); border-color: var(--rand); }
button.text-btn { background: none; border: none; color: var(--text-dim); font: inherit; cursor: pointer; text-decoration: underline; }

.ergebnis { border: 1px solid rgba(56, 189, 248, .35); }
.umformuliert { font-size: 20px; line-height: 1.5; margin: 0 0 14px; }
.hoeren { display: flex; flex-wrap: wrap; gap: 10px; }
.hoeren button { flex: 1 1 auto; }

.tipp {
  margin-top: 16px;
  background: var(--bg-karte-2);
  border-radius: 12px;
  padding: 12px 14px;
}
.tipp strong { color: var(--akzent); font-size: 14px; text-transform: uppercase; letter-spacing: .06em; }
.tipp p { margin: 6px 0 8px; }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li { font-size: 13px; background: var(--bg); color: var(--text-dim); padding: 3px 10px; border-radius: 999px; }

.verlauf-kopf { display: flex; justify-content: space-between; align-items: baseline; }
.verlauf-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.verlauf-liste li {
  background: var(--bg-karte-2);
  border-radius: 12px;
  padding: 10px 12px;
  cursor: pointer;
}
.verlauf-liste .v-original { color: var(--text-dim); font-size: 14px; }
.verlauf-liste .v-neu { font-size: 15px; }

dialog {
  background: var(--bg-karte);
  color: var(--text);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  width: min(420px, calc(100% - 32px));
  padding: 20px;
}
dialog::backdrop { background: rgba(0, 0, 0, .6); }
dialog input[type="range"] { width: 100%; }

.lade { opacity: .6; pointer-events: none; }

/* PIN-Bildschirm: liegt über allem, bis die PIN stimmt */
.sperre {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: var(--bg);
  display: grid;
  place-items: center;
  padding: 24px 16px;
}
.sperre[hidden] { display: none; }
body.gesperrt { overflow: hidden; }
.sperre-karte {
  width: min(360px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
}
.sperre-karte .logo.gross { width: 88px; height: 88px; margin-bottom: 8px; }
.sperre-karte h1 { font-size: 28px; }
.sperre-karte .claim { margin-bottom: 18px; }
.sperre-karte .feld-label { align-self: flex-start; margin-bottom: 4px; }
.sperre-karte input {
  font-size: 24px;
  letter-spacing: .3em;
  text-align: center;
  padding: 14px;
}
.sperre-karte .status { margin: 6px 0; }
.sperre-karte button.primaer { width: 100%; padding: 14px; font-size: 18px; }
.abmelden { margin-top: 14px; width: 100%; }
