/* =====================================================================
   Puzzles — Übersicht (/puzzles). Eine Karte pro Spiel; die Vorschau-
   Kacheln der einzelnen Spiele (snippets/puzzles/vorschau/<template>.php)
   stehen unten.
   ===================================================================== */

.puzzles-hub__intro {
  margin-top: 64px;
}

.puzzles-hub__intro h1 {
  font-size: 24px;
}

.puzzles-hub__intro p {
  margin: 10px 0 0;
  font-size: 15px;
  line-height: 1.7;
  color: var(--body);
  text-wrap: pretty;
}

.puzzles-hub__list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 36px;
}

.puzzles-hub__empty {
  margin-top: 36px;
  color: var(--sub);
}

/* ---- game card ---- */

.puzzles-karte {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 22px 18px 18px;
  color: var(--ink);
  transition: transform .18s ease, box-shadow .18s ease;
}

.puzzles-karte:hover {
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(60, 40, 20, .13);
}

.puzzles-karte:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.puzzles-karte__bild {
  flex: none;
  display: grid;
  width: 76px;
  height: 76px;
}

/* fallback when a game ships no preview snippet */
.puzzles-karte__initial {
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--panel);
  color: var(--sub);
  font-size: 32px;
  font-weight: 700;
}

.puzzles-karte__text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.puzzles-karte__name {
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
}

.puzzles-karte__teaser {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--body);
  text-wrap: pretty;
}

.puzzles-karte__meta {
  margin-top: 3px;
  font-size: 12px;
  color: var(--faint);
}

.puzzles-karte__cta {
  flex: none;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  background: var(--ink);
  color: var(--bg);
  font-size: 12.5px;
  font-weight: 700;
  text-align: center;
}

/* ---- per-game previews ---- */

/* Recoat: a real Recoat target, same palette as the game board */
.vorschau-recoat {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 3px;
  padding: 3px;
  background: #000;
  box-shadow: 0 2px 8px rgba(60, 40, 20, .14);
}

.vorschau-recoat > span { background: #f7f7f4; }
.vorschau-recoat > .is-r { background: #d62e22; }
.vorschau-recoat > .is-b { background: #1d4c9e; }
.vorschau-recoat > .is-y { background: #f4c21b; }

/* ---- responsive ---- */

@media (max-width: 600px) {
  .puzzles-hub__intro {
    margin-top: 44px;
  }
}

@media (max-width: 520px) {
  .puzzles-karte {
    flex-wrap: wrap;
    gap: 16px;
    padding: 18px;
  }

  .puzzles-karte__bild {
    width: 64px;
    height: 64px;
  }

  .puzzles-karte__cta {
    flex-basis: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .puzzles-karte {
    transition: none;
  }

  .puzzles-karte:hover {
    transform: none;
  }
}
