:root {
  --dunkel: #0f5c66;
  --dunkel2: #0b4750;
  --gold: #c9a227;
  --hell: #eaf5f5;
  --rand: #cfe4e4;
  --text: #1f2933;
  --text-soft: #52616b;
  --gruen: #1e8a5f;
  --rot: #c0392b;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  background: #f7fafa;
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
}

.fortschritt {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 6px;
  background: var(--rand);
}
.fortschritt-fuellung {
  height: 100%;
  width: 0%;
  background: var(--gold);
  transition: width .15s ease-out;
}

header.kopf {
  background: linear-gradient(160deg, var(--dunkel), var(--dunkel2));
  color: #fff;
  padding: 26px 20px 24px;
  text-align: center;
}
header.kopf img.logo { height: 64px; width: auto; margin-bottom: 8px; filter: drop-shadow(0 2px 6px rgba(0,0,0,.25)); }
header.kopf h1 { margin: 0 0 4px; font-size: 1.6rem; letter-spacing: .3px; }
header.kopf p { margin: 0; opacity: .85; font-size: .95rem; }

main {
  max-width: 720px;
  margin: 0 auto;
  padding: 28px 16px 100px;
}

.karte {
  background: #fff;
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 18px;
}

.hinweis {
  background: var(--hell);
  border: 1px solid var(--rand);
  border-radius: var(--radius);
  padding: 14px 16px;
  font-size: .92rem;
  color: var(--text-soft);
  margin-bottom: 18px;
}

.start-buttons {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 20px;
}

.btn {
  display: block;
  width: 100%;
  text-align: center;
  padding: 18px 20px;
  border-radius: var(--radius);
  border: none;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  -webkit-appearance: none;
}
.btn-primary { background: var(--dunkel); color: #fff; }
.btn-primary:active { background: var(--dunkel2); }
.btn-secondary { background: #fff; color: var(--dunkel); border: 2px solid var(--dunkel); }
.btn-mini { padding: 8px 14px; font-size: .85rem; width: auto; display: inline-block; }

h2.abschnitt {
  color: var(--dunkel);
  border-bottom: 2px solid var(--hell);
  padding-bottom: 10px;
  margin: 46px 0 22px;
  font-size: 1.3rem;
}
h2.abschnitt:first-of-type { margin-top: 0; }

.betont { color: var(--rot); font-weight: 800; }

.frage { margin-bottom: 38px; }
.frage-titel { font-weight: 700; font-size: 1.08rem; margin-bottom: 4px; line-height: 1.35; }
.frage-sub { font-size: .87rem; color: var(--text-soft); margin-bottom: 14px; }

.optionen {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.opt {
  display: flex;
  align-items: center;
  gap: 14px;
  background: #f4f7f7;
  border: 1.5px solid transparent;
  border-radius: 14px;
  padding: 18px 20px;
  cursor: pointer;
  min-height: 44px;
  user-select: none;
  transition: background .12s, border-color .12s;
}
.opt input { width: 22px; height: 22px; accent-color: var(--dunkel); flex-shrink: 0; }
.opt span { font-size: 1.02rem; }
.opt:active { background: var(--hell); }
.opt:has(input:checked) { background: var(--hell); border-color: var(--dunkel); font-weight: 600; }

.skala {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.skala-opt {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border: 1.5px solid var(--rand);
  border-radius: 50%;
  cursor: pointer;
  font-weight: 600;
  user-select: none;
}
.skala-opt input { position: absolute; opacity: 0; width: 0; height: 0; }
.skala-opt:has(input:checked) { background: var(--dunkel); border-color: var(--dunkel); color: #fff; }

textarea, input[type="text"], input[type="date"] {
  width: 100%;
  border: 1.5px solid var(--rand);
  border-radius: var(--radius);
  padding: 12px 14px;
  font-size: 1rem;
  font-family: inherit;
  resize: vertical;
}
input.sonstiges { margin-top: 10px; }

.feld { margin-bottom: 20px; }
.feld label { display: block; font-weight: 600; margin-bottom: 6px; }

.code-anzeige {
  background: var(--hell);
  border: 2px dashed var(--dunkel);
  border-radius: var(--radius);
  text-align: center;
  padding: 26px 16px;
  margin: 20px 0;
}
.code-anzeige .code { font-size: 2.4rem; font-weight: 700; color: var(--dunkel); letter-spacing: 2px; }

.code-hinweis { font-size: 1.1rem; font-weight: 700; color: var(--rot); text-align: center; }

.fehler {
  background: #fdecea;
  border: 1px solid #f5c2bd;
  color: var(--rot);
  border-radius: var(--radius);
  padding: 12px 16px;
  margin-bottom: 18px;
  font-size: .95rem;
}

table.liste { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.liste th, table.liste td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--rand); }
table.liste th { color: var(--text-soft); font-weight: 600; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; }
.badge-offen { background: #fef3e2; color: #b8720a; }
.badge-komplett { background: #e5f6ec; color: var(--gruen); }

.login-box { max-width: 360px; margin: 60px auto; }

@media (max-width: 420px) {
  .skala-opt { width: 38px; height: 38px; font-size: .85rem; }
}
