/* Emotibears emotion cards — self-contained styles, matching jigsaw.css / wordsearch.css. */
.eb-cards {
  --eb-charcoal: var(--ink, #3A342E);
  --eb-heading: var(--navy, #3A342E);
  --eb-btn: var(--coral-btn, #CE491A);
  --eb-btn-shadow: var(--coral-btn-shadow, #A93C15);
  --eb-sky: #4FB6E0;
  --eb-sunshine: #FFC845;
  --eb-board: var(--cream-2, #F3E7D6);
  --eb-line: #E2D2BC;
  font-family: "Nunito Sans", system-ui, sans-serif;
  color: var(--eb-charcoal);
  max-width: 640px; margin: 0 auto; padding: 0 0 24px; text-align: center;
}
.eb-cards *, .eb-cards *::before, .eb-cards *::after { box-sizing: border-box; }

/* Without JavaScript: the plain list of every card. With it, the game replaces the list. */
.eb-cards__deck { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.eb-cards__deck li { background: #fff; border: 1px solid var(--eb-line); border-radius: 14px; padding: 8px; }
.eb-cards__deck .eb-cards__face { display: none; }
.eb-cards__deck img { width: 100%; height: auto; border-radius: 10px; }
.eb-cards.is-ready .eb-cards__deck { display: none; }

.eb-cards button {
  font: inherit; font-weight: 700; min-height: 44px; min-width: 44px; padding: 8px 18px;
  border-radius: 999px; border: 2px solid var(--eb-charcoal); background: #fff; color: var(--eb-charcoal); cursor: pointer;
}
.eb-cards button:hover:not(:disabled) { background: var(--eb-board); }
.eb-cards button:focus-visible { outline: 3px solid var(--eb-sky); outline-offset: 3px; }
.eb-cards button.eb-cards__primary { background: var(--eb-btn); border-color: var(--eb-btn); color: #fff; box-shadow: 0 4px 0 var(--eb-btn-shadow); margin: 14px 6px 0; }
.eb-cards button.eb-cards__primary:hover { background: var(--eb-btn); }
.eb-cards__modes { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-bottom: 14px; }
.eb-cards button.eb-cards__mode[aria-pressed="true"] { background: var(--eb-sunshine); }
.eb-cards__ask { font-weight: 700; font-size: 1.1rem; margin: 0 0 12px; }
.eb-cards__status { font-weight: 700; min-height: 1.5em; margin: 12px 0 0; }
.eb-cards__count { font-weight: 700; margin: 0 8px; font-size: .95rem; }

/* Flip card */
.eb-cards__flip { perspective: 1200px; max-width: 480px; margin: 0 auto; cursor: pointer; }
.eb-cards__inner { position: relative; display: grid; transition: transform .6s; transform-style: preserve-3d; }
.eb-cards__flip.is-turned .eb-cards__inner { transform: rotateY(180deg); }
.eb-cards__side { grid-area: 1 / 1; backface-visibility: hidden; -webkit-backface-visibility: hidden; background: #fff; border: 3px solid var(--eb-line); border-radius: 18px; padding: 10px; display: flex; flex-direction: column; justify-content: flex-start; }
.eb-cards__back { transform: rotateY(180deg); }
.eb-cards__side img { width: 100%; height: auto; border-radius: 12px; }
.eb-cards__words { margin: 8px 0 0; font-size: 1.05rem; }
.eb-cards__words strong { color: var(--eb-heading); font-family: "Baloo 2", "Nunito Sans", sans-serif; font-size: 1.3rem; }
.eb-cards__nav { display: flex; align-items: center; justify-content: center; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
.eb-cards__nav button[aria-label] { font-size: 1.4rem; line-height: 1; padding: 6px 14px; }

/* Quiz */
.eb-cards__quizpic { max-width: 480px; margin: 0 auto; background: #fff; border: 3px solid var(--eb-line); border-radius: 18px; padding: 10px; }
.eb-cards__quizpic img { width: 100%; height: auto; border-radius: 12px; display: block; }
.eb-cards__choices { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 14px 0 8px; }
.eb-cards button.eb-cards__choice { font-size: 1.1rem; padding: 10px 24px; }
.eb-cards button.eb-cards__choice.is-right { background: #9BD3A8; border-color: #2F6B61; }
.eb-cards button.eb-cards__choice.is-wrong { background: #F3E7D6; color: #6b604e; text-decoration: line-through; border-style: dashed; }
.eb-cards__win { max-width: 420px; margin: 10px auto 0; background: #fff; border: 3px solid var(--eb-sunshine); border-radius: 18px; padding: 20px; }
.eb-cards__win h3 { color: var(--eb-heading); font-family: "Baloo 2", "Nunito Sans", sans-serif; font-size: 1.8rem; margin: 0 0 6px; }

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