/* Balancing Equations Trainer */
.eq-tabs { display: flex; flex-wrap: wrap; gap: .45rem; margin-bottom: .8rem; }
.eq-tabs button { display: flex; align-items: center; gap: .4rem; border: 2px solid var(--pmcq-line, #d7e2e8); background: #fff; color: var(--bs-primary); border-radius: 12px; padding: .45rem .85rem; font-weight: 700; cursor: pointer; }
.eq-tabs button.on { background: var(--bs-primary); border-color: var(--bs-primary); color: #fff; }

.eq-top { display: flex; flex-wrap: wrap; gap: .6rem 1.2rem; align-items: center; justify-content: space-between; margin-bottom: .7rem; }
.eq-levels { display: inline-flex; gap: .3rem; flex-wrap: wrap; }
.eq-levels button { border: 1px solid var(--pmcq-line, #d7e2e8); background: #fff; color: var(--bs-primary); border-radius: 999px; padding: .25rem .9rem; font-weight: 700; font-size: .88rem; cursor: pointer; }
.eq-levels button.on { background: var(--bs-primary); color: #fff; border-color: var(--bs-primary); }
.eq-score { display: flex; gap: 1rem; font-size: .9rem; color: #475569; }
.eq-score b { color: #0b3d5c; }

.eq-card { padding: 1rem; margin-bottom: 1rem; }
.eq-tag { margin-bottom: .7rem; }
.eq-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: .5rem .35rem; padding: .3rem 0 .8rem; }
.eq-sp { display: flex; flex-direction: column; align-items: center; gap: .2rem; }
.eq-step { display: inline-flex; align-items: center; gap: 2px; }
.eq-b { width: 1.9rem; height: 2.4rem; border: 1px solid var(--pmcq-line, #d7e2e8); background: #f1f6f8; color: var(--bs-primary); font-weight: 800; font-size: 1.1rem; line-height: 1; border-radius: 8px; cursor: pointer; }
.eq-b:hover { background: #e1ecf2; }
.eq-n { width: 3rem; height: 2.4rem; text-align: center; font-size: 1.25rem; font-weight: 800; color: #0b3d5c; border: 2px solid #94a3b8; border-radius: 8px; background: #fff; -moz-appearance: textfield; }
.eq-n::-webkit-outer-spin-button, .eq-n::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.eq-n.ro { display: inline-flex; align-items: center; justify-content: center; border-color: #cbd5e1; background: #f8fafc; }
.eq-f { font-size: 1.45rem; font-weight: 600; color: #0f172a; white-space: nowrap; }
.eq-plus, .eq-arrow { font-size: 1.5rem; color: #64748b; padding-bottom: .35rem; }
.eq-arrow { color: var(--bs-primary); font-weight: 800; padding: 0 .3rem .3rem; }
.eq-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: .7rem; }

.eq-lower { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1rem; align-items: start; }
.eq-left, .eq-right { padding: .8rem; }
.eq-atoms { margin: 0; }
.eq-atoms th { font-size: .78rem; color: #475569; }
.eq-atoms td { vertical-align: middle; }
.eq-atoms tr.ok { background: #f0fdf4; }
.eq-atoms tr.no { background: #fef2f2; }
.eq-chip { display: inline-block; min-width: 2rem; text-align: center; padding: .1rem .45rem; border-radius: 8px; color: #fff; text-shadow: 0 1px 1px rgba(0, 0, 0, .35); }
.eq-cnt { display: inline-block; min-width: 1.6rem; font-weight: 800; color: #0b3d5c; }
.eq-dots { display: inline-flex; flex-wrap: wrap; gap: 2px; vertical-align: middle; max-width: 14rem; }
.eq-dot { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; border: 1px solid rgba(15, 23, 42, .3); }
.eq-st { text-align: center; font-size: 1.1rem; width: 2rem; }
.eq-beam { display: block; width: 100%; max-width: 320px; margin: 0 auto; }

.eq-field { display: block; margin-bottom: .6rem; }
.eq-field > span { display: block; font-size: .85rem; font-weight: 700; color: #475569; margin-bottom: .2rem; }
.eq-field input { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 1.05rem; }
.eq-result { margin-top: 1rem; }
.eq-solved { font-size: 1.4rem; font-weight: 700; color: #166534; margin-bottom: .5rem; }

@media (max-width: 991px) {
  .eq-lower { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 480px) {
  .eq-f { font-size: 1.15rem; }
  .eq-b { width: 1.6rem; }
  .eq-n { width: 2.5rem; font-size: 1.1rem; }
  .eq-dots { max-width: 7rem; }
}
