:root {
  --fw-red: #b30000;
  --fw-red-dark: #8a0000;
  --fw-red-light: #e63946;
  --bg: #f4f5f7;
  --card: #ffffff;
  --text: #1d1d1f;
  --muted: #6b7280;
  --border: #e5e7eb;
  --ok: #16a34a;
  --shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  --radius: 16px;
}

* { box-sizing: border-box; }

/* Das hidden-Attribut muss display-Regeln (z.B. flex/grid) ueberschreiben,
   sonst bleiben ein-/ausklappbare Bereiche sichtbar. */
[hidden] { display: none !important; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.container {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 20px 16px 48px;
}

/* --- Hero --- */
.hero {
  text-align: center;
  padding: 16px 0 8px;
}

.hero .badge {
  font-size: 44px;
  line-height: 1;
  width: 76px;
  height: 76px;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--fw-red);
  border-radius: 50%;
  box-shadow: var(--shadow);
}

.hero h1 {
  font-size: 1.7rem;
  margin: 4px 0 2px;
  color: var(--fw-red);
  letter-spacing: -0.02em;
}

.hero .subtitle {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.hero .date {
  margin: 10px 0 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text);
  background: #fff;
  display: inline-block;
  padding: 6px 14px;
  border-radius: 999px;
  box-shadow: var(--shadow);
}

/* --- Card --- */
.card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 18px;
  margin-top: 20px;
}

.question {
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}
.question:first-child { padding-top: 0; }
.question:last-of-type { border-bottom: none; }

.question h2 {
  font-size: 1.05rem;
  margin: 0 0 14px;
  font-weight: 600;
}

/* --- Rating (Smileys) --- */
.rating {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 6px;
}

.rating button {
  appearance: none;
  border: 2px solid var(--border);
  background: #fff;
  border-radius: 14px;
  padding: 10px 0 8px;
  font-size: 1.9rem;
  line-height: 1;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease, background 0.12s ease;
  touch-action: manipulation;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.rating button .lbl {
  font-size: 0.62rem;
  color: var(--muted);
  font-weight: 600;
}

.rating button:active { transform: scale(0.94); }

.rating button.selected {
  border-color: var(--fw-red);
  background: #fff5f5;
  transform: scale(1.04);
}

.rating button.selected .lbl { color: var(--fw-red); }

/* --- Textarea --- */
textarea {
  width: 100%;
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  font-size: 1rem;
  font-family: inherit;
  resize: vertical;
  background: #fff;
  color: var(--text);
}
textarea:focus {
  outline: none;
  border-color: var(--fw-red);
}

/* --- Buttons --- */
.submit-btn {
  width: 100%;
  margin-top: 20px;
  padding: 16px;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  background: var(--fw-red);
  border: none;
  border-radius: 14px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
  touch-action: manipulation;
}
.submit-btn:active { transform: scale(0.98); }
.submit-btn:hover { background: var(--fw-red-dark); }
.submit-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.submit-btn.ghost {
  background: #fff;
  color: var(--fw-red);
  border: 2px solid var(--fw-red);
}

.hint {
  text-align: center;
  color: var(--muted);
  font-size: 0.85rem;
  margin: 12px 0 0;
}

.error {
  text-align: center;
  color: var(--fw-red);
  font-weight: 600;
  margin: 12px 0 0;
}

/* --- Thank you --- */
.thankyou {
  text-align: center;
}
.thankyou .check {
  font-size: 56px;
  margin-bottom: 8px;
}
.thankyou h2 { margin: 0 0 6px; }
.thankyou p { color: var(--muted); margin: 0 0 8px; }

/* --- Responsive feinschliff --- */
@media (max-width: 360px) {
  .rating button { font-size: 1.55rem; padding: 8px 0 6px; }
  .rating button .lbl { font-size: 0.55rem; }
  .hero h1 { font-size: 1.45rem; }
}

@media (min-width: 480px) {
  .rating button { font-size: 2.1rem; }
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15171a;
    --card: #1f2227;
    --text: #f3f4f6;
    --muted: #9ca3af;
    --border: #353a42;
  }
  .hero .date { background: var(--card); }
  .rating button { background: #262a30; }
  .rating button.selected { background: #3a2222; }
  textarea { background: #262a30; }
}
