/* ==== Category grid (home) ==== */
.cl-category-card {
  text-align: center; padding: 1.5rem 1rem; border-radius: 20px;
}
.cl-category-card .cl-icon { font-size: 2.5rem; margin-bottom: .5rem; display: block; }
.cl-category-card .cl-icon img { width: 2.5rem; height: 2.5rem; object-fit: cover; border-radius: 10px; }
.cl-category-card h3 { font-size: 1rem; margin-bottom: 0; }

/* ==== Cards viewer ==== */
.cl-card-stage {
  background: var(--bg-surface); border: 1px solid var(--border-color); border-radius: 28px;
  padding: 3rem 1.5rem; text-align: center; max-width: 480px; margin: 0 auto;
}
.cl-card-emoji { font-size: 7rem; line-height: 1; margin-bottom: 1rem; }
.cl-card-icon-img { width: 7rem; height: 7rem; object-fit: cover; border-radius: 20px; }
.cl-header-icon-img { width: 1.3em; height: 1.3em; object-fit: cover; border-radius: 8px; vertical-align: -.25em; margin-right: .15em; }
.cl-card-label { font-size: 2.25rem; font-weight: 800; color: var(--text-primary); margin-bottom: 1.5rem; }
.cl-card-counter { color: var(--text-muted); font-size: .9rem; margin-bottom: .5rem; }
.cl-card-dots { display: flex; justify-content: center; gap: 6px; flex-wrap: wrap; margin-top: 1rem; }
.cl-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--border-color); display: inline-block; cursor: pointer; }
.cl-dot.active { background: var(--accent); }
.cl-card-controls { display: flex; justify-content: center; gap: .75rem; margin-top: 1.5rem; }
.cl-big-btn {
  font-size: 1.5rem; width: 64px; height: 64px; border-radius: 50%;
  border: none; background: var(--accent); color: #fff; display: inline-flex;
  align-items: center; justify-content: center; cursor: pointer; box-shadow: var(--shadow-md);
}
.cl-big-btn:active { transform: scale(0.94); }
.cl-listen-btn { background: var(--bg-surface-alt); color: var(--text-primary); border: 1px solid var(--border-color); }

/* ==== Tracing ==== */
.cl-tracing-label { font-size: 1.5rem; font-weight: 700; text-align: center; margin-bottom: 1rem; }
.cl-tracing-canvas-wrap { display: flex; justify-content: center; }
.cl-tracing-canvas-wrap canvas {
  background: var(--bg-surface); border: 3px dashed var(--border-color); border-radius: 24px;
  touch-action: none; max-width: 100%; height: auto;
}

/* ==== Arithmetic ==== */
.cl-problem { font-size: 3rem; font-weight: 800; text-align: center; margin-bottom: 1.5rem; color: var(--accent); }
.cl-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; max-width: 420px; margin: 0 auto; }
.cl-option-btn {
  font-size: 1.5rem; font-weight: 700; padding: 1rem; border-radius: 16px;
  border: 2px solid var(--border-color); background: var(--bg-surface); color: var(--text-primary); cursor: pointer;
}
.cl-option-btn:hover:not(:disabled) { border-color: var(--accent); }
.cl-option-btn.cl-correct { background: #16a34a; border-color: #16a34a; color: #fff; }
.cl-option-btn.cl-wrong { background: #dc2626; border-color: #dc2626; color: #fff; }
.cl-feedback { text-align: center; font-size: 1.25rem; font-weight: 700; margin-top: 1rem; min-height: 2rem; }
.cl-score { text-align: center; color: var(--text-muted); margin-bottom: 1rem; }

/* ==== Matching game ==== */
.cl-match-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; max-width: 560px; margin: 0 auto; }
.cl-match-col { display: flex; flex-direction: column; gap: .75rem; }
.cl-match-tile {
  font-size: 1.5rem; padding: 1rem; border-radius: 16px; border: 2px solid var(--border-color);
  background: var(--bg-surface); color: var(--text-primary); cursor: pointer; min-height: 64px;
  display: flex; align-items: center; justify-content: center;
}
.cl-match-icon-img { width: 2.5rem; height: 2.5rem; object-fit: cover; border-radius: 8px; }
.cl-match-col .cl-match-tile:nth-child(2) { font-size: 1rem; }
.cl-match-tile.cl-selected { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(var(--accent-rgb), .25); }
.cl-match-tile.cl-matched { background: #16a34a; border-color: #16a34a; color: #fff; opacity: .8; cursor: default; }
.cl-match-tile.cl-wrong-flash { background: #dc2626; border-color: #dc2626; color: #fff; }
.cl-match-status { text-align: center; font-weight: 700; margin-bottom: 1.5rem; font-size: 1.1rem; }

@media (max-width: 575.98px) {
  .cl-card-emoji { font-size: 5rem; }
  .cl-card-icon-img { width: 5rem; height: 5rem; }
  .cl-card-label { font-size: 1.6rem; }
  .cl-problem { font-size: 2.2rem; }
}
