*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
}

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

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button {
  font: inherit;
  color: inherit;
  cursor: pointer;
}

img {
  display: block;
  max-width: 100%;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  padding: 14px 22px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: background 120ms ease, border-color 120ms ease, transform 80ms ease,
    box-shadow 120ms ease;
}
.btn:active {
  transform: translateY(1px);
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover:not(:disabled) {
  background: var(--accent-hover);
}

.btn-ghost {
  background: var(--surface);
  border-color: var(--line-strong);
  color: var(--ink-soft);
}
.btn-ghost:hover:not(:disabled) {
  background: var(--surface-2);
  color: var(--ink);
}

.btn-danger-ghost {
  color: var(--danger);
  border-color: var(--line);
  background: transparent;
}
.btn-danger-ghost:hover:not(:disabled) {
  background: #fbecea;
}

.btn-lg {
  padding: 20px 28px;
  font-size: 1.15rem;
  border-radius: var(--radius);
}
.btn-block {
  width: 100%;
}

/* ---------- Verbindungs-Banner ---------- */

.conn-banner {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  background: var(--warning);
  color: #fff;
  text-align: center;
  padding: 10px 16px;
  font-size: 0.9rem;
  font-weight: 600;
}
.conn-banner[hidden] {
  display: none;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
}

.eyebrow {
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.muted {
  color: var(--ink-muted);
}

.form-error {
  color: var(--danger);
  font-size: 0.95rem;
  font-weight: 500;
}

/* Karten-Eintritt – dezent, einmalig. */
.enter-card {
  animation: enter-card var(--dur-base) var(--ease-out) both;
}
@keyframes enter-card {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
}

/*
 * Barrierefreiheit: "Bewegung reduzieren" respektieren – ABER die zentralen
 * Feedback-Animationen (Antwort "fliegt" zum Beamer, Bestaetigung, Auflösung)
 * bleiben erhalten, nur kuerzer/ruhiger. Nur endlos laufende Deko-Bewegung
 * wird komplett gestoppt. Die konkreten Kuerzungen stehen je Ansicht in
 * join.css / screen.css.
 */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
  .pulse-dot {
    animation: none !important;
  }
}
