/* ==========================================================================
   Gemeinsames Theme aller Englisch-Apps.
   Wird von der Landingpage und von jeder App eingebunden. Alles, was mehr
   als eine App braucht, gehört hierher; App-Spezifisches bleibt in der App.
   ========================================================================== */

:root {
  --bg: #f5f0e6;
  --bg-card: #fffdf8;
  --bg-soft: #ede5d4;
  --ink: #2a2520;
  --ink-soft: #6b5f4f;
  --ink-faint: #9c907e;
  --line: #d9cfb8;
  --line-soft: #e8e0cd;
  --accent: #1f4e44;
  --accent-deep: #163931;
  --accent-soft: #d8e4df;
  --correct: #3a6e3a;
  --correct-bg: #dde9d6;
  --wrong: #a83a2a;
  --wrong-bg: #f0d9d2;
  --warm: #b8704a;
  --radius: 10px;
  --radius-lg: 16px;
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'IBM Plex Sans', -apple-system, sans-serif;
  --mono: 'IBM Plex Mono', monospace;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

body {
  background-image:
    radial-gradient(circle at 15% 20%, rgba(184, 112, 74, 0.04) 0%, transparent 50%),
    radial-gradient(circle at 85% 80%, rgba(31, 78, 68, 0.04) 0%, transparent 50%);
  background-attachment: fixed;
}

.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

.container-wide { max-width: 900px; }

/* --- Rücksprung zur Übersicht ------------------------------------------- */

.topbar {
  margin-bottom: 1.5rem;
}

.back-link {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  text-decoration: none;
  transition: color 0.15s;
}

.back-link:hover { color: var(--accent); }

/* --- Kopfbereich --------------------------------------------------------- */

header {
  text-align: center;
  margin-bottom: 1.75rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--line);
}

header .eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--warm);
  margin-bottom: 0.5rem;
}

header h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(28px, 5vw, 38px);
  line-height: 1.1;
  margin: 0 0 0.25rem;
  letter-spacing: -0.02em;
  font-variation-settings: 'opsz' 144, 'SOFT' 50;
}

header h1 em {
  font-style: italic;
  color: var(--accent);
}

header .subtitle {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 0;
}

/* --- Flächen ------------------------------------------------------------- */

.card {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  box-shadow: 0 1px 2px rgba(42, 37, 32, 0.04);
}

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

button { font-family: var(--sans); cursor: pointer; }

.btn {
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--bg-card);
  color: var(--ink);
  transition: all 0.15s;
}

.btn:hover { border-color: var(--ink-soft); }

.btn-primary {
  background: var(--accent);
  color: var(--bg-card);
  border-color: var(--accent);
}

.btn-primary:hover { background: var(--accent-deep); border-color: var(--accent-deep); }

/* Kleine Pillen-Buttons für Einstellungen (Rundengröße, Formenauswahl) */
.pill-btn {
  padding: 4px 12px;
  font-family: var(--mono);
  font-size: 12px;
  background: transparent;
  color: var(--ink-soft);
  border: 1px solid var(--line);
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.15s;
}

.pill-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.pill-btn.active {
  background: var(--accent);
  color: var(--bg-card);
  border-color: var(--accent);
}

/* --- Kleinteile ---------------------------------------------------------- */

.chip {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--ink-soft);
  background: var(--bg-soft);
  border-radius: 20px;
  padding: 3px 10px;
}

.footnote {
  text-align: center;
  margin-top: 2rem;
  font-size: 12px;
  color: var(--ink-faint);
  font-family: var(--mono);
  letter-spacing: 0.05em;
}

/* --- Bewegung ------------------------------------------------------------ */

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

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

.shake { animation: shake 0.3s ease; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 480px) {
  .container { padding: 1.5rem 1rem 3rem; }
  .card { padding: 1.5rem 1.25rem; }
}
