:root {
  --paper: #e8e4d8;
  --paper-2: #dfdacb;
  --ink: #1b2a45;
  --ink-soft: #4a5570;
  --stamp-red: #a6301f;
  --gold: #9c7c2e;
  --card-pink: #dba5b6;
  --card-pink-dark: #c98ba0;
  --pass-green: #2e5b3b;
  --line: #b9af95;
  --white: #fbf9f3;
  --shadow: 0 10px 30px rgba(27, 42, 69, 0.15);
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  padding: 0;
}
body {
  background: repeating-linear-gradient(
      0deg,
      rgba(27, 42, 69, 0.035) 0px,
      rgba(27, 42, 69, 0.035) 1px,
      transparent 1px,
      transparent 26px
    ),
    radial-gradient(
      1200px 600px at 10% -10%,
      rgba(27, 42, 69, 0.05),
      transparent
    ),
    var(--paper);
  color: var(--ink);
  font-family: "IBM Plex Sans", sans-serif;
  min-height: 100vh;
  display: flex;
  justify-content: center;
  padding: 32px 16px 80px;
}
.mono {
  font-family: "IBM Plex Mono", monospace;
}

.app {
  width: 100%;
  max-width: 720px;
}

/* ---------- Header / Amtskopf ---------- */
.amtskopf {
  display: flex;
  align-items: center;
  gap: 14px;
  border-bottom: 3px solid var(--ink);
  padding-bottom: 14px;
  margin-bottom: 22px;
}
.amtskopf .siegel {
  width: 52px;
  height: 52px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 2px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  background: var(--white);
}
.amtskopf .txt {
  line-height: 1.15;
}
.amtskopf .eyebrow {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 600;
}
.amtskopf h1 {
  font-family: "Bebas Neue", sans-serif;
  font-size: 26px;
  margin: 2px 0 0;
  letter-spacing: 0.04em;
}

.screen.active {
  animation: fade 0.35s ease;
}
@keyframes fade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ---------- Formular-Karte ---------- */
.form-card {
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  padding: 28px 26px;
  position: relative;
}
.form-card::before {
  content: "";
  position: absolute;
  inset: 8px;
  border: 1px dashed var(--line);
  pointer-events: none;
}
.aktenzeichen {
  font-size: 11px;
  color: var(--ink-soft);
  text-align: right;
  margin-bottom: 6px;
}
.form-card h2 {
  font-family: "Bebas Neue";
  font-size: 30px;
  margin: 0 0 4px;
  letter-spacing: 0.03em;
}
.form-card p.lead {
  color: var(--ink-soft);
  margin: 0 0 22px;
  font-size: 15px;
  line-height: 1.55;
}

.field {
  margin-bottom: 18px;
}
.field label {
  display: block;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  font-weight: 600;
  margin-bottom: 6px;
}
.field input {
  width: 100%;
  font-family: "IBM Plex Mono", monospace;
  font-size: 16px;
  padding: 10px 4px;
  border: none;
  border-bottom: 2px dotted var(--line);
  background: transparent;
  color: var(--ink);
}
.field input:focus {
  outline: none;
  border-bottom-color: var(--ink);
}

.step-label {
  font-size: 11px;
  color: var(--ink-soft);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 8px;
}
.game-grid {
  display: grid;
  gap: 12px;
  margin: 22px 0;
}
.issued-license-stat {
  margin: 10px 0 0;
  padding: 10px 12px;
  border-left: 4px solid var(--gold);
  background: rgba(255, 248, 220, 0.58);
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.5;
}
.game-card {
  width: 100%;
  border: 1.5px solid var(--ink);
  background: var(--paper);
  color: var(--ink);
  padding: 18px;
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 15px;
  font-family: "IBM Plex Sans";
  transition: transform 0.15s ease, background 0.15s ease;
}
.game-card:hover {
  background: var(--paper-2);
  transform: translateY(-2px);
}
.game-icon {
  width: 64px;
  height: 64px;
  flex: 0 0 64px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.game-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.game-card strong {
  display: block;
  font-family: "Bebas Neue";
  font-size: 25px;
  letter-spacing: 0.04em;
}
.game-card small {
  display: block;
  color: var(--ink-soft);
  font-size: 12px;
  margin-top: 2px;
}
.game-arrow {
  font-size: 24px;
  margin-left: auto;
}
.controller-choice {
  border: 0;
  padding: 0;
  margin: 0 0 20px;
}
.controller-choice legend {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-soft);
  font-weight: 600;
  margin-bottom: 8px;
}
.controller-card {
  border: 1.5px solid var(--line);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px;
  cursor: pointer;
  margin-top: 10px;
}
.controller-card:has(input:checked) {
  border-color: var(--ink);
  background: var(--paper);
}
.controller-card input {
  accent-color: var(--ink);
}
.controller-symbol {
  font-family: "IBM Plex Mono";
  font-weight: 600;
  font-size: 16px;
  line-height: 1.3;
  min-width: 50px;
  text-align: center;
}
.ps-symbol {
  color: #3159a8;
}
.xbox-symbol {
  color: #2e7d32;
}
.controller-card strong {
  display: block;
  font-size: 16px;
}
.controller-card small {
  display: block;
  color: var(--ink-soft);
  font-size: 12px;
  margin-top: 2px;
}

.kategorien {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 20px 0 26px;
}
.kat-box {
  border: 1px solid var(--line);
  padding: 10px 8px;
  text-align: center;
  background: var(--paper);
}
.kat-box .code {
  font-family: "Bebas Neue";
  font-size: 22px;
  color: var(--ink);
}
.kat-box .name {
  font-size: 10px;
  color: var(--ink-soft);
  letter-spacing: 0.02em;
  line-height: 1.3;
  margin-top: 2px;
}

button.primary,
a.primary {
  font-family: "Bebas Neue";
  font-size: 19px;
  letter-spacing: 0.05em;
  background: var(--ink);
  color: var(--white);
  border: none;
  padding: 13px 26px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
button.primary:hover,
a.primary:hover {
  background: #12203a;
}
button.primary:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}
button.ghost,
a.ghost {
  font-family: "Bebas Neue";
  font-size: 16px;
  letter-spacing: 0.05em;
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--ink);
  padding: 10px 20px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
button.ghost:hover,
a.ghost:hover {
  background: var(--ink);
  color: var(--white);
}

.footnote {
  font-size: 11px;
  color: var(--ink-soft);
  margin-top: 14px;
}

/* ---------- Quiz ---------- */
.fortschritt-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.fortschritt-bar {
  flex: 1;
  height: 8px;
  background: var(--paper-2);
  border: 1px solid var(--line);
  position: relative;
}
.fortschritt-fill {
  height: 100%;
  background: var(--ink);
  transition: width 0.35s ease;
}
.fortschritt-label {
  font-size: 12px;
  color: var(--ink-soft);
  white-space: nowrap;
}

.frage-kat {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--ink);
  padding: 3px 8px;
  margin-bottom: 12px;
  color: var(--ink-soft);
}
.frage-text {
  font-size: 19px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 18px;
}

.controller-wrap {
  display: flex;
  justify-content: center;
  margin: 0 0 20px;
}
.controller-image {
  display: block;
  width: min(100%, 320px);
  height: auto;
}

.optionen {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 8px;
}
.option {
  width: 100%;
  text-align: left;
  border: 1.5px solid var(--line);
  background: var(--white);
  padding: 12px 14px;
  cursor: pointer;
  font-size: 15px;
  font-family: "IBM Plex Sans";
  display: flex;
  align-items: center;
  gap: 10px;
}
.option .box {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--ink);
  flex: 0 0 auto;
  display: inline-block;
}
.option:hover:not(.locked) {
  border-color: var(--ink);
  background: var(--paper);
}
.option.correct {
  border-color: var(--pass-green);
  background: #eaf2ec;
}
.option.correct .box {
  background: var(--pass-green);
  border-color: var(--pass-green);
}
.option.wrong {
  border-color: var(--stamp-red);
  background: #f7e9e6;
}
.option.wrong .box {
  background: var(--stamp-red);
  border-color: var(--stamp-red);
}
.option.locked {
  cursor: default;
}

.erklaerung {
  margin-top: 14px;
  padding: 12px 14px;
  background: var(--paper);
  border-left: 3px solid var(--ink);
  font-size: 13.5px;
  color: var(--ink-soft);
  line-height: 1.5;
}

.quiz-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 20px;
}

/* ---------- Ergebnis ---------- */
.ergebnis-card {
  text-align: center;
  padding: 42px 24px;
}
.stempel {
  font-family: "Bebas Neue";
  font-size: 40px;
  letter-spacing: 0.05em;
  display: inline-block;
  border: 5px solid;
  padding: 10px 28px;
  transform: rotate(-6deg);
  margin-bottom: 22px;
}
.stempel.bestanden {
  color: var(--pass-green);
  border-color: var(--pass-green);
}
.stempel.nicht {
  color: var(--stamp-red);
  border-color: var(--stamp-red);
}
.score-groß {
  font-family: "Bebas Neue";
  font-size: 56px;
  margin: 6px 0;
}
.ergebnis-card p {
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.5;
}
.kat-ergebnis {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 26px 0;
  text-align: left;
}
.kat-ergebnis .row {
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  padding: 10px 12px;
  background: var(--white);
}
.kat-ergebnis .kcode {
  font-family: "Bebas Neue";
  font-size: 22px;
  width: 26px;
}
.kat-ergebnis .kdetail {
  flex: 1;
  font-size: 12px;
  color: var(--ink-soft);
}
.kat-ergebnis .kstat {
  font-size: 12px;
}
.kat-ergebnis .row.ok {
  border-color: var(--pass-green);
}
.kat-ergebnis .row.fail {
  border-color: var(--stamp-red);
}

.ergebnis-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 8px;
}

/* ---------- Zertifikat ---------- */
.lizenz-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}
.lizenz {
  width: 100%;
  max-width: 480px;
  aspect-ratio: 1.58/1;
  background: repeating-linear-gradient(
      115deg,
      rgba(255, 255, 255, 0.35) 0px,
      rgba(255, 255, 255, 0.35) 1px,
      transparent 1px,
      transparent 7px
    ),
    linear-gradient(135deg, var(--card-pink), var(--card-pink-dark));
  border: 2px solid var(--ink);
  box-shadow: var(--shadow);
  padding: 16px 18px;
  position: relative;
  color: var(--ink);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin: 0 auto;
}
.lizenz-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}
.lizenz-top .land {
  font-size: 9px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
}
.lizenz-top .titel {
  font-family: "Bebas Neue";
  font-size: 17px;
  letter-spacing: 0.03em;
  margin-top: 1px;
}
.lizenz-top .nr {
  font-size: 9px;
  text-align: right;
}

.lizenz-body {
  display: flex;
  gap: 14px;
  margin-top: 10px;
  flex: 1;
}
.avatar {
  width: 78px;
  height: 92px;
  background: var(--white);
  border: 1.5px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Bebas Neue";
  font-size: 26px;
  flex: 0 0 auto;
}
.lizenz-felder {
  flex: 1;
  font-size: 10.5px;
  line-height: 1.35;
  text-align: left;
}
.lizenz-felder .lbl {
  color: rgba(27, 42, 69, 0.65);
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-top: 6px;
}
.lizenz-felder .val {
  font-weight: 600;
  font-size: 12.5px;
}
.lizenz-felder .name-val {
  font-family: "Bebas Neue";
  font-size: 19px;
  letter-spacing: 0.02em;
}

.lizenz-kats {
  margin-top: 8px;
}
.lizenz-kats-title {
  color: rgba(27, 42, 69, 0.65);
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 3px;
}
.lizenz-kat {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  font-size: 9px;
  font-weight: 700;
  line-height: 1.35;
}
.lizenz-kat-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 11px;
  height: 11px;
  flex: 0 0 auto;
  border: 1px solid var(--ink);
  background: rgba(255, 255, 255, 0.5);
  font-size: 8px;
}

.lizenz-bottom {
  display: flex;
  justify-content: flex-end;
  align-items: flex-end;
  margin-top: auto;
}
.unterschrift {
  text-align: right;
}
.unterschrift svg {
  width: 90px;
  height: 26px;
}
.unterschrift .cap {
  font-size: 7px;
  color: rgba(27, 42, 69, 0.7);
  margin-top: 2px;
}

.lizenz-stamp {
  position: absolute;
  right: 14px;
  bottom: 44px;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  border: 2.5px solid var(--stamp-red);
  color: var(--stamp-red);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-family: "Bebas Neue";
  font-size: 11px;
  line-height: 1.1;
  transform: rotate(-14deg);
  opacity: 0.88;
  mix-blend-mode: multiply;
}

@media (max-width: 480px) {
  .kategorien {
    grid-template-columns: repeat(2, 1fr);
  }
  .kat-ergebnis {
    grid-template-columns: 1fr;
  }
  .form-card {
    padding: 22px 16px;
  }
}

@media print {
  body * {
    visibility: hidden;
  }
  #print-area,
  #print-area * {
    visibility: visible;
  }
  #print-area {
    position: absolute;
    top: 20px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
  }
  body {
    background: white;
    padding: 0;
  }
}

/* ---------- Durchgehender Prüfungsbogen ---------- */
body {
  --paper-white: #fffdf6;
  background: radial-gradient(
        circle at 20% 14%,
        rgba(90, 73, 42, 0.1) 0 1px,
        transparent 1.5px
      )
      0 0/17px 19px,
    radial-gradient(
        circle at 76% 68%,
        rgba(90, 73, 42, 0.07) 0 1px,
        transparent 1.5px
      )
      0 0/23px 21px,
    #d9d1be;
  /* Das Blatt sitzt auf Full-HD vollständig im Viewport. Zusätzliche Höhe
     entsteht nur noch, wenn der Inhalt einer Seite wirklich länger ist. */
  padding: 18px 16px;
  align-items: flex-start;
}
.app {
  width: min(100%, 770px);
  min-height: calc(100vh - 36px);
  padding: 48px 62px 58px 86px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(
      to right,
      transparent 0,
      transparent 56px,
      rgba(184, 67, 60, 0.48) 56px,
      rgba(184, 67, 60, 0.48) 58px,
      transparent 58px
    ),
    repeating-linear-gradient(
      to bottom,
      transparent 0,
      transparent 31px,
      rgba(83, 129, 170, 0.16) 32px,
      transparent 33px
    ),
    var(--paper-white);
  box-shadow: 0 18px 45px rgba(57, 45, 27, 0.28),
    0 2px 5px rgba(57, 45, 27, 0.18);
}
.app::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 13px;
  width: 22px;
  background: repeating-radial-gradient(
    circle at center 18px,
    #cfc5ae 0 5px,
    rgba(72, 56, 33, 0.45) 5.5px 6.5px,
    transparent 7px 32px
  );
  filter: drop-shadow(1px 0 1px rgba(66, 51, 30, 0.18));
  pointer-events: none;
}
.app::after {
  content: "";
  position: absolute;
  z-index: 0;
  width: 170px;
  height: 24px;
  top: -9px;
  right: 104px;
  background: rgba(220, 205, 157, 0.72);
  box-shadow: 0 1px 2px rgba(68, 56, 32, 0.18);
  transform: rotate(1.5deg);
}
.app > * {
  position: relative;
  z-index: 1;
}
.amtskopf {
  gap: 12px;
  margin: 0 0 35px;
  padding: 0 0 13px;
  border-bottom: 2px solid var(--ink);
}
.amtskopf .siegel {
  width: 47px;
  height: 47px;
  border-radius: 3px;
  transform: rotate(-3deg);
  background: #f7eed2;
  box-shadow: 2px 2px 0 rgba(27, 42, 69, 0.18);
}
.amtskopf .eyebrow {
  font-size: 10px;
  letter-spacing: 0.13em;
}
.eyebrow-short {
  display: none;
}
.amtskopf h1 {
  font-size: 28px;
  letter-spacing: 0.035em;
}
.kopf-kennung {
  margin-left: auto;
  font-size: 9px;
  line-height: 1.25;
  color: var(--ink-soft);
  text-align: right;
}
.form-card {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}
.form-card::before {
  display: none;
}
.form-card h2 {
  font-size: 36px;
  line-height: 1;
  margin-bottom: 10px;
}
.form-card p.lead {
  max-width: 490px;
  color: #394a65;
}
.form-card h2,
.frage-text {
  font-family: "Bebas Neue", sans-serif;
  font-weight: 400;
  letter-spacing: 0.025em;
}
.aktenzeichen {
  padding: 4px 0 8px;
  border-bottom: 1px solid rgba(27, 42, 69, 0.35);
}
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--ink-soft);
  font-family: "IBM Plex Mono", monospace;
  font-size: 11px;
  text-decoration: none;
  margin-bottom: 16px;
}
.back-link:hover {
  color: var(--ink);
  text-decoration: underline;
}
.setup-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}
.setup-title-row h2 {
  margin-bottom: 0;
}
.setup-title-row .back-link {
  flex: 0 0 auto;
  margin-bottom: 0;
}

/* Eingaben und Auswahlfelder: beschriftete Zeilen des Bogens */
.field label,
.controller-choice legend,
.step-label {
  color: var(--ink);
  font-size: 10px;
}
.field input {
  padding: 8px 8px 7px;
  border: 1px solid transparent;
  border-bottom: 2px solid var(--ink);
  background: rgba(255, 255, 255, 0.45);
}
.field input:focus {
  border: 1px solid var(--ink);
  background: #fffef9;
}
.game-grid {
  gap: 13px;
  margin-top: 26px;
}
.game-card {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--ink);
  background: rgba(255, 255, 255, 0.33);
  padding: 16px 18px;
  box-shadow: 3px 3px 0 rgba(27, 42, 69, 0.14);
}
.game-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  background: #e7d084;
}
.game-card:hover {
  background: #fffdf6;
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 rgba(27, 42, 69, 0.17);
}
.controller-card {
  background: rgba(255, 255, 255, 0.28);
  border-color: rgba(27, 42, 69, 0.55);
  box-shadow: 2px 2px 0 rgba(27, 42, 69, 0.09);
}
.controller-card:has(input:checked) {
  background: #fff8df;
  border: 2px solid var(--ink);
  padding: 12px;
}
.kat-box {
  background: rgba(255, 255, 255, 0.28);
  border-style: dashed;
}
button.primary,
a.primary {
  box-shadow: 3px 3px 0 #9f9786;
}
button.primary:hover,
a.primary:hover {
  transform: translate(-1px, -1px);
  box-shadow: 5px 5px 0 #9f9786;
}
button.ghost,
a.ghost {
  background: rgba(255, 255, 255, 0.22);
}

/* Antwortseite */
.fragebogen {
  padding-top: 1px;
  min-height: calc(100vh - 240px);
  display: flex;
  flex-direction: column;
}
.bogen-kopf,
.bogen-fuss {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink-soft);
  font-size: 9px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.bogen-kopf {
  padding: 7px 0 9px;
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid rgba(27, 42, 69, 0.42);
  margin-bottom: 25px;
}
.bogen-fuss {
  border-top: 1px solid rgba(27, 42, 69, 0.42);
  margin-top: auto;
  padding-top: 9px;
}
.fortschritt-wrap {
  margin-bottom: 25px;
}
.fortschritt-bar {
  height: 6px;
  background: rgba(200, 193, 171, 0.54);
  border-color: var(--ink);
}
.fortschritt-fill {
  background: repeating-linear-gradient(
    90deg,
    var(--ink) 0 7px,
    #344562 7px 9px
  );
}
.fortschritt-label {
  font-size: 10px;
  color: var(--ink);
}
.frage-kat {
  background: #fff8dd;
  border-width: 1px;
  padding: 3px 7px;
  margin-bottom: 14px;
}
.frage-text {
  font-size: 29px;
  line-height: 1.08;
  max-width: 620px;
  margin-bottom: 22px;
}
.controller-wrap {
  margin: 3px 0 23px;
  padding: 7px 0;
  border-top: 1px dotted var(--line);
  border-bottom: 1px dotted var(--line);
}
.optionen {
  gap: 0;
  margin: 0;
  border-top: 1px solid var(--ink);
}
.option {
  min-height: 59px;
  padding: 10px 12px;
  border: 0;
  border-bottom: 1px solid rgba(27, 42, 69, 0.62);
  background: transparent;
  font-size: 16px;
  gap: 13px;
  transition: background 0.12s ease, padding-left 0.12s ease;
}
.option .box {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid var(--ink);
  color: var(--ink);
  font-size: 12px;
  font-weight: 600;
}
.option:hover:not(.locked) {
  border-color: transparent;
  border-bottom-color: rgba(27, 42, 69, 0.62);
  background: rgba(255, 246, 207, 0.7);
  padding-left: 17px;
}
.option:hover:not(.locked) .box {
  background: var(--ink);
  color: var(--paper-white);
}
.option.correct {
  border-color: transparent;
  border-bottom-color: rgba(27, 42, 69, 0.62);
  background: rgba(220, 238, 219, 0.62);
}
.option.correct .box {
  background: var(--pass-green);
  border-color: var(--pass-green);
  color: white;
}
.option.wrong {
  border-color: transparent;
  border-bottom-color: rgba(27, 42, 69, 0.62);
  background: rgba(247, 225, 219, 0.72);
}
.option.wrong .box {
  background: var(--stamp-red);
  border-color: var(--stamp-red);
  color: white;
}
.erklaerung {
  background: rgba(255, 248, 220, 0.58);
  border: 1px solid var(--gold);
  border-left: 4px solid var(--gold);
  margin-top: 18px;
}
.quiz-nav {
  margin-top: 22px;
  margin-bottom: 14px;
}

.ergebnis-card {
  padding: 16px 0 6px;
}
.stempel {
  background: rgba(255, 253, 246, 0.55);
}
.kat-ergebnis .row {
  background: rgba(255, 255, 255, 0.35);
}
.lizenz {
  box-shadow: 5px 6px 0 rgba(27, 42, 69, 0.18);
}

@media (max-width: 560px) {
  body {
    padding: 0;
    background: var(--paper-white);
  }
  .app {
    min-height: 100vh;
    padding: 34px 22px 42px 64px;
    box-shadow: none;
  }
  .app::before {
    left: 6px;
    width: 17px;
  }
  .app::after {
    right: 42px;
    width: 105px;
  }
  .amtskopf {
    margin-bottom: 28px;
  }
  .amtskopf h1 {
    font-size: 24px;
  }
  .amtskopf .eyebrow {
    display: none;
  }
  .form-card h2 {
    font-size: 31px;
  }
  .setup-title-row {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .frage-text {
    font-size: 25px;
  }
  .fragebogen {
    min-height: calc(100vh - 166px);
  }
  .bogen-kopf span:last-child {
    display: none;
  }
  .option {
    font-size: 15px;
  }
}

@media print {
  body {
    background: white;
    padding: 0;
  }
  .app {
    box-shadow: none;
    min-height: 0;
  }
}

/* ---------- Neu gestaltete Zertifikatskarte ---------- */
.zertifikat-card {
  padding-top: 1px;
}
.certificate-intro {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 22px;
  margin-bottom: 18px;
}
.certificate-step::before {
  content: none;
}
.certificate-intro h2 {
  margin: 0 0 7px;
}
.certificate-intro .lead {
  margin: 0;
  max-width: 510px;
}
.certificate-number {
  font-size: 10px;
  line-height: 1.5;
  color: var(--ink-soft);
  text-align: right;
  white-space: nowrap;
}
.photo-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 19px;
  padding: 10px 12px;
  border: 1px dashed var(--line);
  background: rgba(255, 248, 220, 0.6);
}
.photo-upload {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  color: var(--ink);
}
.photo-upload:hover strong {
  text-decoration: underline;
}
.photo-upload input,
#photo-upload {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}
.upload-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 27px;
  height: 27px;
  border: 1.5px solid var(--ink);
  border-radius: 50%;
  font-size: 20px;
  line-height: 1;
}
.photo-upload strong {
  display: block;
  font-size: 13px;
}
.photo-upload small {
  display: block;
  color: var(--ink-soft);
  font-size: 10px;
  margin-top: 2px;
}
.photo-note {
  margin-left: auto;
  font-size: 10px;
  color: var(--ink-soft);
  text-align: right;
}
.certificate-stage {
  width: 100%;
  display: flex;
  justify-content: center;
}
.certificate {
  width: 100%;
  max-width: 700px;
  aspect-ratio: 1.67/1;
  min-height: 320px;
  overflow: hidden;
  position: relative;
  padding: 0 22px 17px;
  color: #172943;
  border: 2px solid #172943;
  background: linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.64),
      transparent 42%
    ),
    repeating-linear-gradient(
      0deg,
      rgba(44, 72, 97, 0.045) 0 1px,
      transparent 1px 5px
    ),
    #f5f0df;
  box-shadow: 5px 6px 0 rgba(27, 42, 69, 0.18);
}
.certificate-topline {
  height: 9px;
  margin: 0 -22px 14px;
  background: linear-gradient(
    90deg,
    #172943 0 58%,
    #c39b42 58% 72%,
    #6f8b68 72%
  );
}
.certificate-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid rgba(23, 41, 67, 0.35);
  padding-bottom: 10px;
}
.certificate-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.certificate-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  font-size: 19px;
  border: 1.5px solid #172943;
  background: #e6d6a8;
  transform: rotate(-3deg);
}
.certificate-brand small {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 7px;
  color: #627087;
  font-weight: 700;
  margin-bottom: 2px;
}
.certificate-brand strong {
  display: block;
  font-family: "Bebas Neue", sans-serif;
  font-size: 22px;
  letter-spacing: 0.04em;
  line-height: 0.88;
}
.certificate-class {
  font-size: 8px;
  color: #627087;
  text-align: right;
  line-height: 1.3;
  letter-spacing: 0.12em;
}
.certificate-class b {
  font-size: 18px;
  color: #172943;
  letter-spacing: 0.05em;
}
.certificate-content {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) 78px;
  align-items: center;
  gap: 16px;
  padding: 17px 0 13px;
}
.photo-frame {
  width: 96px;
  aspect-ratio: 3/4;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1.5px solid #172943;
  background: #e6e1d2;
  position: relative;
}
.photo-frame::after {
  content: "";
  position: absolute;
  inset: 5px;
  border: 1px dashed rgba(23, 41, 67, 0.35);
  pointer-events: none;
}
.photo-frame.has-photo::after {
  display: none;
}
.photo-frame img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}
.photo-frame.has-photo .photo-placeholder {
  display: none;
}
.photo-placeholder {
  text-align: center;
  color: #657387;
  line-height: 1.2;
}
.photo-placeholder span {
  display: block;
  font-family: "Bebas Neue";
  font-size: 16px;
  letter-spacing: 0.08em;
}
.photo-placeholder small {
  display: block;
  font-size: 9px;
  margin-top: 3px;
}
.certificate-details {
  min-width: 0;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.certificate-kicker {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  color: #627087;
  margin-bottom: 4px;
}
.certificate-name {
  font-family: "Bebas Neue";
  font-size: 30px;
  letter-spacing: 0.035em;
  line-height: 1;
  overflow-wrap: anywhere;
}
.certificate-rule {
  height: 2px;
  width: 100%;
  background: #172943;
  margin: 7px 0 10px;
}
.certificate-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 16px;
}
.certificate-fields small {
  display: block;
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: #738096;
  margin-bottom: 1px;
}
.certificate-fields strong {
  display: block;
  font-size: 12px;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.certificate-seal {
  width: 78px;
  height: 78px;
  border: 2px solid #a6382a;
  border-radius: 50%;
  color: #a6382a;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  transform: rotate(-9deg);
}
.certificate-seal span {
  font-family: "Bebas Neue";
  font-size: 10px;
  letter-spacing: 0.06em;
}
.certificate-seal b {
  font-family: "IBM Plex Sans";
  font-size: 23px;
  line-height: 1;
}
.certificate-seal small {
  font-size: 7px;
  line-height: 1.1;
  letter-spacing: 0.06em;
}
.certificate-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 15px;
  border-top: 1px solid rgba(23, 41, 67, 0.35);
  padding-top: 9px;
  position: static;
  min-height: 54px;
}
.certificate-categories small,
.certificate-signature small {
  display: block;
  color: #627087;
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.certificate-categories > div {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 13px;
  margin-top: 5px;
  padding-right: 145px;
}
.certificate-categories > div > span {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  font-family: "IBM Plex Mono";
  font-size: 10px;
  font-weight: 600;
  line-height: 1.25;
}
.certificate-categories > div > span > span {
  display: block;
  min-width: 0;
  overflow: visible;
  white-space: normal;
  font-family: "IBM Plex Sans", sans-serif;
  font-size: 10px;
  font-weight: 500;
}
.certificate-categories strong {
  font-size: 11px;
  margin-right: 4px;
}
.certificate-categories b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  background: #6f8b68;
  color: white;
  border-radius: 50%;
  font-size: 10px;
}
.certificate-categories .is-failed b {
  background: #a6382a;
}
.certificate-signature {
  text-align: right;
  min-width: 125px;
  position: absolute;
  right: 22px;
  bottom: 14px;
}
.certificate-signature svg {
  display: block;
  width: 82px;
  height: 23px;
  margin-left: auto;
}
.certificate-actions {
  margin-top: 22px;
}

@media (max-width: 560px) {
  .certificate-intro {
    align-items: flex-start;
  }
  .certificate-number {
    font-size: 9px;
  }
  .photo-tools {
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .photo-note {
    width: 100%;
    margin-left: 36px;
    text-align: left;
  }
  .certificate {
    aspect-ratio: auto;
    min-height: 0;
    padding: 0 14px 14px;
  }
  .certificate-topline {
    margin-left: -14px;
    margin-right: -14px;
  }
  .certificate-content {
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 11px;
    padding: 13px 0 11px;
  }
  .photo-frame {
    width: 74px;
  }
  .certificate-name {
    font-size: 24px;
  }
  .certificate-fields {
    gap: 6px 9px;
  }
  .certificate-fields strong {
    font-size: 10px;
  }
  .certificate-seal {
    grid-column: 2;
    justify-self: end;
    width: 62px;
    height: 62px;
    margin-top: -1px;
  }
  .certificate-seal span {
    font-size: 8px;
  }
  .certificate-seal b {
    font-size: 18px;
  }
  .certificate-seal small {
    font-size: 6px;
  }
  .certificate-footer {
    align-items: flex-start;
    min-height: 65px;
  }
  .certificate-categories > div {
    grid-template-columns: 1fr;
    padding-right: 105px;
  }
  .certificate-signature {
    display: block;
    right: 14px;
    bottom: 12px;
    min-width: 95px;
  }
  .certificate-signature svg {
    width: 66px;
    height: 20px;
  }
  .certificate-signature small {
    font-size: 5px;
  }
}

@media print {
  @page {
    margin: 12mm;
  }
  html,
  body,
  .certificate,
  .certificate * {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  body {
    display: block;
    min-height: 0;
  }
  .app {
    width: 100%;
    max-width: none;
    min-height: 0;
    padding: 0;
    margin: 0;
    overflow: visible;
    box-shadow: none;
  }
  #print-area {
    position: static;
    width: 100%;
    display: block;
  }

  .certificate {
    width: 100%;
    max-width: 640px;
    height: auto;
    min-height: 0;
    aspect-ratio: 1.67/1;
    margin: 0 auto;
    overflow: visible;
    box-shadow: none;
  }

  .certificate-footer {
    margin-top: 24px;
  }
}

.ad-notice {
  margin-top: 50px;
  margin: 30px 0 2px;
  padding: 10px 12px 12px;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(27, 42, 69, 0.42);
  border-left: 5px solid var(--gold);
  background: rgba(255, 255, 255, 0.28);
  box-shadow: 2px 2px 0 rgba(27, 42, 69, 0.08);
}
.ad-notice::after {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px dashed rgba(27, 42, 69, 0.18);
  pointer-events: none;
}
.ad-notice-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 2px 9px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.11em;
  line-height: 1.4;
  text-transform: uppercase;
}
.ad-notice-heading span:first-child {
  color: var(--ink);
}
.ad-notice-body {
  min-height: 100px;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.ad-notice .adsbygoogle {
  width: 100%;
  min-width: 0;
}
.home-ad-spacing {
  padding-top: 52px;
}
.home-ad-spacing .ad-notice {
  width: min(100%, 560px);
  margin-top: 0;
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}
.home-ad-spacing .ad-notice .adsbygoogle {
  margin-right: auto;
  margin-left: auto;
}
.ergebnis-card .ad-notice {
  margin-top: 34px;
}

@media (max-width: 560px) {
  .ad-notice {
    margin-top: 25px;
    padding: 9px 9px 10px;
  }
  .ad-notice-heading {
    font-size: 9px;
  }
  .ad-notice-heading span:last-child {
    display: none;
  }
  .ad-notice-body {
    min-height: 90px;
  }
  .home-ad-spacing {
    padding-top: 40px;
  }
}

@media print {
  .ad-notice,
  .ad-notice + script,
  .home-ad-spacing {
    display: none !important;
  }
}

.intro-page .app {
  display: flex;
  flex-direction: column;
}
.intro-page .screen {
  flex: 1 0 auto;
}
.site-support {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 46px;
  padding-top: 12px;
  border-top: 1px solid rgba(27, 42, 69, 0.38);
  color: var(--ink-soft);
  font-size: 11px;
  line-height: 1.5;
  text-align: center;
}
.site-support a {
  color: var(--ink);
  text-decoration-color: rgba(27, 42, 69, 0.42);
  text-underline-offset: 3px;
}
.site-support a:hover,
.site-support a:focus-visible {
  color: var(--stamp-red);
  text-decoration-color: currentColor;
}
.site-support a:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 4px;
}

@media (max-width: 560px) {
  .site-support {
    margin-top: 38px;
  }
  .site-support a {
    overflow-wrap: anywhere;
  }
}

@media print {
  .site-support {
    display: none !important;
  }
}
