/* ============================================================
   game-base.css — gemeinsame Grundlage für alle Spiele
   (Zurück-Link, Grundlayout, Basis-Button).
   Jedes Spiel bindet zusätzlich seine eigene style.css ein und
   darf hier alles überschreiben.
   ============================================================ */

* { box-sizing: border-box; }

/* Ausgeblendet bleibt ausgeblendet — auch wenn eine Klasse display: flex o. ä. setzt */
[hidden] { display: none !important; }

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: env(safe-area-inset-top, 0px) 20px env(safe-area-inset-bottom, 0px);
}

/* Zurück zur Übersicht */
.zurueck {
  align-self: flex-start;
  margin: 20px 0 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--bg-panel);
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
  transition: background 0.14s ease;
}
.zurueck:hover { background: var(--bg-panel-2); }
.zurueck:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--akzent) 55%, transparent);
}

/* Zentrierter Spielbereich */
.spiel {
  flex: 1;
  width: 100%;
  max-width: 520px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 24px 0 48px;
}
.spiel-titel {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 7vw, 3rem);
  margin: 0 0 6px;
}
.spiel-unter {
  margin: 0 0 26px;
  color: var(--ink-muted);
}

/* Basis-Button (Spiele können überschreiben) */
.btn {
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  border: none;
  background: var(--akzent);
  color: var(--bg);
  transition: filter 0.14s ease;
}
.btn:hover { filter: brightness(1.08); }
.btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--akzent) 55%, transparent);
}

@media (prefers-reduced-motion: reduce) {
  .zurueck, .btn { transition: none; }
}
