:root {
  --bg: #f6efee;
  --card: #fffcfb;
  --ink: #2b2325;
  --muted: #8a7d80;
  --line: #e8dcdc;
  --accent: #7b2d3b;
  --accent-dark: #5f1f2d;
  --accent-soft: #f5e6e9;
  --radius: 18px;
}

* { box-sizing: border-box; }

html { min-height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px;
  -webkit-font-smoothing: antialiased;
}

.card {
  position: relative;
  width: 100%;
  max-width: 560px;
  min-height: 440px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 28px;
  padding: 56px 40px 40px;
  box-shadow: 0 20px 50px -30px rgba(80, 20, 35, .32);
  overflow: hidden;
}

.progress {
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--line);
}
.progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width .5s ease;
}

.step { display: none; text-align: center; }
.step.active { display: block; animation: fade .5s ease both; }

@keyframes fade {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

.eyebrow {
  margin: 0 0 14px;
  font-size: .75rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--muted);
}

h1, h2 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 14px;
  letter-spacing: -.01em;
}
h1 { font-size: clamp(2rem, 6vw, 2.7rem); }
h2 { font-size: clamp(1.6rem, 5vw, 2.1rem); }

.sub { color: var(--muted); margin: 0 0 8px; line-height: 1.5; }

.actions {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-top: 36px;
  min-height: 52px;
}

.btn {
  font: inherit;
  font-weight: 500;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 14px 34px;
  cursor: pointer;
  transition: background .2s, transform .15s, opacity .25s, color .2s;
}
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:hover:not(:disabled) { background: var(--accent-dark); }
.btn.primary:disabled { opacity: .35; cursor: not-allowed; }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn.text { background: none; color: var(--muted); padding: 14px 18px; }
.btn.text:hover { color: var(--ink); }

/* Nein-Button weicht aus */
#no-btn.dodging {
  position: absolute;
  z-index: 10;
  transition: left .25s ease, top .25s ease;
}

.fields {
  display: grid;
  gap: 18px;
  margin-top: 24px;
  text-align: left;
}
label { font-size: .85rem; color: var(--muted); display: grid; gap: 8px; }
select, input.free {
  font: inherit;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  width: 100%;
}
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 24px;
}
.options.two { grid-template-columns: 1fr 1fr; }

.option {
  font: inherit;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 12px;
  cursor: pointer;
  display: grid;
  gap: 6px;
  justify-items: center;
  transition: border-color .2s, background .2s, transform .15s;
}
.option span { font-size: 1.5rem; }
.option:hover { border-color: var(--accent); transform: translateY(-2px); }
.option.selected { border-color: var(--accent); background: var(--accent-soft); }

.activity { margin-top: 28px; animation: fade .4s ease both; }
.activity[hidden] { display: none; }
.label { margin: 0; color: var(--muted); font-size: .9rem; }

.summary {
  margin: 28px 0 0;
  text-align: left;
  border-top: 1px solid var(--line);
}
.summary div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.summary dt { color: var(--muted); }
.summary dd { margin: 0; font-weight: 500; text-align: right; }

.error { color: #b3261e; margin: 18px 0 0; font-size: .9rem; }
.hp { position: absolute; left: -9999px; opacity: 0; }

select {
  appearance: none;
  cursor: pointer;
  padding-right: 42px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%237b2d3b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
}
.field { font-size: .85rem; color: var(--muted); display: grid; gap: 8px; }

.daymonth { display: grid; grid-template-columns: 1fr 2fr; gap: 12px; margin-top: 12px; }

.cal {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 14px 14px 12px;
  color: var(--ink);
}
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-head strong { font-family: "Fraunces", Georgia, serif; font-weight: 500; font-size: 1.05rem; }
.cal-nav {
  font: inherit; font-size: 1.3rem; line-height: 1;
  width: 36px; height: 36px; border-radius: 50%;
  border: none; background: none; color: var(--accent); cursor: pointer;
  transition: background .2s;
}
.cal-nav:hover:not(:disabled) { background: var(--accent-soft); }
.cal-nav:disabled { color: var(--line); cursor: default; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; text-align: center; }
.cal-week { margin-bottom: 4px; font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.cal-day {
  font: inherit; font-size: .92rem;
  aspect-ratio: 1; border: none; border-radius: 50%;
  background: none; color: var(--ink); cursor: pointer;
  transition: background .15s, color .15s;
}
.cal-day:hover:not(:disabled):not(.selected) { background: var(--accent-soft); }
.cal-day.today { box-shadow: inset 0 0 0 1px var(--accent); }
.cal-day.selected { background: var(--accent); color: #fff; }
.cal-day:disabled { color: #cdbfc1; cursor: default; }
input.free { margin-top: 16px; animation: fade .3s ease both; }
input.free[hidden] { display: none; }

.notice { margin: 16px 0 0; color: var(--accent); font-size: .95rem; animation: fade .3s ease both; }
.notice[hidden] { display: none; }

.shake { animation: shake .4s ease; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  75% { transform: translateX(6px); }
}

.quiz { margin-top: 24px; }
.question {
  font-family: "Fraunces", Georgia, serif;
  font-size: 1.25rem;
  margin: 6px 0 0;
}
.quiz { text-align: left; }
.quiz-item { margin-bottom: 26px; }
.quiz-item .options, .quiz-item .fields { margin-top: 12px; }
.quiz .sub, .quiz > .question { text-align: center; }
.quiz .notice { margin: 0 0 22px; text-align: center; }
.option.right { border-color: #3d7a4f; background: #e8f3ea; }
.option.wrong, input.wrong { border-color: var(--accent); background: var(--accent-soft); }
input.right { border-color: #3d7a4f; background: #e8f3ea; }

@media (max-width: 480px) {
  .card { padding: 48px 22px 28px; }
  .options.two { grid-template-columns: 1fr; }
}

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