@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600&family=Inter:wght@400;500;600;700&display=swap');

:root {
  /* Brand-Farben Robert Franz Online-Shop */
  --moss: #7B4F8E;
  --moss-dark: #5B3968;
  --sand: #F3EEF6;
  --sand-light: #FBF9FC;
  --amber: #A384B0;
  --amber-dark: #82628F;
  --rust: #9A4B36;
  --rust-light: #F3E1DA;
  --ink: #2A2430;
  --line: rgba(123, 79, 142, 0.18);
  --radius: 14px;
  --shadow: 0 10px 30px rgba(91, 57, 104, 0.12);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  background: var(--sand);
  color: var(--ink);
  font-family: 'Inter', sans-serif;
  -webkit-tap-highlight-color: transparent;
  -webkit-user-select: none;
  user-select: none;
}

h1, h2, h3, .display {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--moss-dark);
}

.app {
  max-width: 720px;
  margin: 0 auto;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 28px 24px 40px;
}

/* ---------- Kopfzeile / Signatur-Element: Wurzelpfad ---------- */
.rootpath {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 34px;
}
.rootpath .node {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--line);
  border: 2px solid transparent;
  flex-shrink: 0;
  transition: background 0.3s ease, transform 0.3s ease;
}
.rootpath .node.done { background: var(--amber); }
.rootpath .node.active { background: var(--moss); transform: scale(1.35); }
.rootpath .branch {
  flex: 1;
  height: 2px;
  background: var(--line);
  position: relative;
  overflow: hidden;
  border-radius: 2px;
}
.rootpath .branch::after {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--amber);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s ease;
}
.rootpath .branch.done::after { transform: scaleX(1); }
.rootpath .label {
  font-size: 12px;
  color: var(--moss);
  opacity: 0.65;
  margin-left: 10px;
  white-space: nowrap;
}

.eyebrow {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--amber-dark);
  font-weight: 600;
  margin-bottom: 10px;
}

.question-card {
  background: var(--sand-light);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px 28px;
  box-shadow: var(--shadow);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.question-card h2 {
  font-size: 26px;
  line-height: 1.3;
  margin: 0 0 26px;
}

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

.option-btn {
  text-align: left;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 18px 20px;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.1s ease;
}
.option-btn:active { transform: scale(0.985); }
.option-btn:hover, .option-btn:focus-visible {
  border-color: var(--amber);
  background: #FFFBF3;
  outline: none;
}
.option-btn.selected {
  border-color: var(--moss);
  background: var(--moss);
  color: #fff;
}
.option-btn.subtle {
  border-style: dashed;
  color: var(--moss);
  opacity: 0.8;
}

.safety-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
}
.safety-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  cursor: pointer;
  font-size: 15px;
}
.safety-item input { width: 18px; height: 18px; accent-color: var(--rust); }

.primary-btn {
  margin-top: auto;
  align-self: flex-start;
  background: var(--moss);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 14px 30px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.15s ease;
}
.primary-btn:hover { background: var(--moss-dark); }
.primary-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.ghost-btn {
  background: transparent;
  border: 1.5px solid var(--line);
  color: var(--moss);
  border-radius: 999px;
  padding: 12px 24px;
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  margin-top: 16px;
}

/* ---------- Ergebnis / Warn-Screens ---------- */
.result-card {
  text-align: center;
  padding: 48px 30px;
}
.result-card .badge {
  display: inline-block;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--amber-dark);
  font-weight: 700;
  margin-bottom: 14px;
}
.result-card h1 {
  font-size: 40px;
  margin: 0 0 16px;
}
.result-card p { font-size: 16px; line-height: 1.6; color: var(--ink); opacity: 0.85; }

.warn-card {
  background: var(--rust-light);
  border: 1px solid rgba(154, 75, 54, 0.25);
}
.warn-card h1 { color: var(--moss-dark); }

.d3k2-note {
  margin-top: 20px;
  background: #fff;
  border: 1px dashed var(--amber);
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 14px;
  text-align: left;
}

.email-form {
  margin-top: 28px;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px;
}
.email-form label { font-size: 14px; font-weight: 600; display: block; margin-bottom: 8px; }
.email-form input[type=email] {
  width: 100%;
  padding: 13px 14px;
  border-radius: 8px;
  border: 1.5px solid var(--line);
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  margin-bottom: 14px;
}
.email-form .consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.5; opacity: 0.85; margin-bottom: 16px; }
.email-form .consent input { margin-top: 3px; }

.confirm-note {
  margin-top: 18px;
  font-size: 14px;
  color: var(--moss);
  opacity: 0.85;
}

/* ---------- Dashboard ---------- */
.dash-wrap { max-width: 1000px; margin: 0 auto; padding: 32px 24px 60px; }
.dash-header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 6px; flex-wrap: wrap; gap: 10px;}
.dash-note { background: var(--rust-light); border: 1px solid rgba(154,75,54,0.25); border-radius: 10px; padding: 14px 18px; font-size: 13.5px; margin: 18px 0 28px; line-height: 1.5; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin: 24px 0 30px; }
.stat-card { background: var(--sand-light); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; }
.stat-card .num { font-family: 'Fraunces', serif; font-size: 30px; color: var(--moss-dark); }
.stat-card .lbl { font-size: 12.5px; opacity: 0.7; }
.bar-row { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.bar-row .name { width: 100px; font-size: 13.5px; flex-shrink: 0; }
.bar-track { flex: 1; height: 12px; background: var(--line); border-radius: 6px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--amber); }
.bar-row .count { width: 30px; text-align: right; font-size: 13px; opacity: 0.7; }
table.results { width: 100%; border-collapse: collapse; margin-top: 20px; font-size: 13.5px; background: #fff; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); }
table.results th, table.results td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--line); }
table.results th { background: var(--sand-light); font-weight: 600; }
.pill { display:inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; background: var(--sand-light); border: 1px solid var(--line); }
.pill.warn { background: var(--rust-light); border-color: rgba(154,75,54,0.3); color: var(--rust); }

@media (max-width: 480px) {
  .app { padding: 18px 16px 30px; }
  .question-card { padding: 22px 18px; }
  .question-card h2 { font-size: 22px; }
  .result-card h1 { font-size: 30px; }
}
