/* EasyCard – ruhig, klar, Urlaubsmodus.
   Viel Luft, fast weißer Hintergrund und ein ruhiges Meeresblau. */

:root {
  color-scheme: light dark;
  --bg: #fdfcfa;          /* fast Weiß, ein Hauch Sand */
  --panel: #ffffff;
  --text: #24323a;        /* tiefes Nordsee-Blaugrau */
  --muted: #747d84;
  --line: #e6e3dd;
  --accent: #2c5d8a;      /* ruhiges Meeresblau */
  --accent-soft: #eaf1f8;
  --on-accent: #ffffff;
  --warn: #b7791f;
  --error: #a33a2b;
  --ok: #3f7d5a;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #151b1d;
    --panel: #1c2427;
    --text: #ebeeec;
    --muted: #9aa7a6;
    --line: #2f3a3d;
    --accent: #8cb8e3;
    --accent-soft: #1e2b39;
    --on-accent: #10201f;
    --warn: #e0b15a;
    --error: #ec8a7a;
    --ok: #8ccaa3;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

header, main {
  max-width: 600px;
  margin: 0 auto;
  padding: 0 20px;
}

header { padding-top: 40px; }
main { padding-bottom: 64px; }

.brand {
  margin: 0 0 28px;
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
}

h1, h2 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

h1 { margin: 0 0 12px; font-size: 2.1rem; }
h2 { margin: 0 0 8px; font-size: 1.6rem; }
h3 { font-size: 1rem; font-weight: 600; margin: 24px 0 8px; }

.lead { color: var(--muted); margin: 0 0 24px; font-size: 1.05rem; }
.hint { color: var(--muted); font-size: 0.88rem; font-weight: 400; }
.error { color: var(--error); }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 28px 24px;
  margin-bottom: 20px;
}

a { color: var(--accent); }

/* ---------- Felder: ruhig, groß, mit Linie statt Kasten ---------- */

label {
  display: block;
  margin-bottom: 22px;
  font-size: 0.85rem;
  color: var(--muted);
}

input, select {
  display: block;
  width: 100%;
  margin-top: 6px;
  padding: 8px 2px 10px;
  font: inherit;
  font-size: 1.2rem;
  color: var(--text);
  background: transparent;
  border: none;
  border-bottom: 1.5px solid var(--line);
  border-radius: 0;
  transition: border-color .3s var(--ease);
  -webkit-appearance: none;
  appearance: none;
}

select {
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 14px) 55%, calc(100% - 8px) 55%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
  padding-right: 28px;
}

input::placeholder { color: var(--muted); opacity: .55; }
input:focus, select:focus { outline: none; border-bottom-color: var(--accent); }
input[readonly] { border-bottom-style: dashed; color: var(--muted); cursor: default; }
input[type="date"] { min-height: 44px; }

input.autofilled, select.autofilled {
  border-bottom-color: var(--accent);
  background: linear-gradient(to top, var(--accent-soft), transparent 70%);
}

.row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0 20px;
}

/* ---------- Buttons ---------- */

button {
  font: inherit;
  font-weight: 500;
  font-size: 1rem;
  padding: 14px 26px;
  border-radius: 999px;
  border: none;
  background: var(--accent);
  color: var(--on-accent);
  cursor: pointer;
  transition: transform .2s var(--ease), opacity .2s;
}

button:active { transform: scale(.98); }
button:disabled { opacity: .55; cursor: wait; }
button:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

button.secondary {
  background: transparent;
  color: var(--accent);
  border: 1.5px solid var(--line);
}

button.link, button.ghost {
  background: none;
  color: var(--muted);
  padding: 8px 4px;
  font-size: 0.9rem;
  border-radius: 6px;
}

button.link { color: var(--error); }

/* Vermieterseite / Ergebnis: volle Breite wie gehabt */
#host-form > button[type="submit"], #pay button, #done button { width: 100%; margin-top: 12px; }

/* ---------- Auswahl-Karten (Häkchen) ---------- */

.check {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin: 8px 0 22px;
  padding: 14px 16px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  color: var(--text);
  font-size: 0.95rem;
  cursor: pointer;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}

.check:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }

.check input {
  flex: none;
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  padding: 0;
  border: 1.5px solid var(--muted);
  border-radius: 6px;
  display: grid;
  place-content: center;
}

.check input:checked { background: var(--accent); border-color: var(--accent); }
.check input:checked::after { content: "✓"; color: var(--on-accent); font-size: 13px; line-height: 1; }

.check.newsletter { font-size: 0.88rem; color: var(--muted); }

/* ---------- Schritte: eine Frage pro Bildschirm ---------- */

.progress {
  position: fixed;
  inset: 0 0 auto 0;
  height: 3px;
  background: transparent;
  z-index: 10;
}

.progress span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  transition: width .6s var(--ease);
}

.stepper .step { display: none; }
.stepper .step.active {
  display: block;
  min-height: calc(100vh - 220px);
  padding-top: 6vh;
  animation: rise .6s var(--ease);
}

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

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

.step-no {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  font-size: 0.85rem;
  color: var(--accent);
}

.step .lead { margin-bottom: 32px; }

.step-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 32px;
}

.step-nav .enter { font-size: 0.8rem; color: var(--muted); }
.step-nav .ghost { margin-left: auto; }

/* Slide 1: Begrüßung mit Countdown */
.welcome h1 { font-size: 2.6rem; margin-bottom: 4px; }

.countdown {
  margin: 0 0 20px;
  font-family: var(--serif);
  font-size: 1.6rem;
  line-height: 1.3;
  color: var(--muted);
}

.countdown strong { color: var(--accent); font-weight: 400; }

/* Slide 2: Abschnitte statt einzelner Bildschirme */
.step h3 {
  margin: 40px 0 14px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 400;
}

.step h3 + .hint { margin: -6px 0 18px; }

details.optional {
  margin-top: 36px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

details.optional summary {
  cursor: pointer;
  list-style: none;
  font-family: var(--serif);
  font-size: 1.2rem;
  margin-bottom: 16px;
}

details.optional summary::-webkit-details-marker { display: none; }
details.optional summary::before { content: "+ "; color: var(--accent); }
details.optional[open] summary::before { content: "– "; }

.pay-hint { margin: 14px 0 0; }

/* Weitere E-Mail-Adressen (optional) */
.add-email { display: block; margin: -8px 0 18px; padding-left: 0; color: var(--accent); }
.extra-email-row { display: flex; align-items: end; gap: 8px; }
.extra-email-row input { flex: 1; min-width: 0; }
.extra-email-row button { flex: none; padding: 8px 10px; }

/* Gastseite ohne Kasten – nur Raum */
.stepper { background: none; border: none; padding: 0; }

.stay {
  display: flex;
  gap: 28px;
  margin: 0 0 32px;
  padding: 18px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stay label { margin: 0; flex: 1; min-width: 0; }
.stay input { font-family: var(--serif); font-size: 1.25rem; min-width: 0; }

/* ---------- Ausweis-Scan ---------- */

.scan {
  margin: 0 0 28px;
  padding: 16px;
  border-radius: 16px;
  background: var(--accent-soft);
}

.scan-btn {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--panel);
  color: var(--accent);
  font-size: 0.95rem;
  font-weight: 500;
  cursor: pointer;
}

.scan-btn input { display: none; }
.scan .hint { margin: 10px 2px 0; }

.scan-status {
  margin: 12px 0 0;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.88rem;
  background: var(--panel);
}

.scan-status.ok { border-left: 3px solid var(--ok); }
.scan-status.warn { border-left: 3px solid var(--warn); }
.scan-status.busy { border-left: 3px solid var(--accent); }

/* ---------- Mitreisende ---------- */

.companion {
  border: none;
  border-top: 1px solid var(--line);
  margin: 0 0 8px;
  padding: 22px 0 4px;
}

.companion legend {
  font-family: var(--serif);
  font-size: 1.1rem;
  padding: 0 0 8px;
}

/* ---------- Hinweise, Übersicht ---------- */

.notice {
  margin: 0 0 20px;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--warn);
  font-size: 0.92rem;
}

.summary {
  margin: 8px 0 24px;
  padding: 18px 20px;
  border-radius: 16px;
  background: var(--panel);
  border: 1px solid var(--line);
}

.summary div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 4px 0;
  font-size: 0.95rem;
}

.summary .total {
  margin-top: 8px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
  font-family: var(--serif);
  font-size: 1.35rem;
}

.summary p { margin: 10px 0 0; }

.no-reductions .reduction-field { display: none; }

/* ---------- Vermieterseite ---------- */

.copy { display: flex; gap: 10px; align-items: end; }
.copy input { margin: 0; font-size: 0.95rem; }
.copy button { flex: none; }

#result h2, #host-form h2 { font-size: 1.35rem; margin: 8px 0 18px; }
#host-form h2:not(:first-child) { margin-top: 36px; }

@media (max-width: 480px) {
  h1, .welcome h1 { font-size: 2.1rem; }
  .countdown { font-size: 1.35rem; }
  h2 { font-size: 1.4rem; }
  .stay { gap: 16px; }
  .step-nav .enter { display: none; }
}

@media print {
  .progress, button, .step-nav { display: none !important; }
  .panel { border: none; }
}
