/* Butterfly — add/subtract unlike fractions by cross-multiplying ("butterfly").
   Layered on top of math-rounds.css + number_bonds.css (mode badge, ladder,
   band, lesson carousel, keypad reused). The interaction itself is the
   UNIFIED step-entry pattern (`.hb-steps`, TRAINER_UNIFICATION_SPEC §A) which
   lives in math-rounds.css — this file only keeps the trainer-local extras:
   the slash between the top/bottom boxes on fraction-entry rows, the
   simplified-form bonus line, the speed ghost, the per-level mastery bar,
   and the boss badge. */

/* ── Mobile no-scroll compaction (spec §A NO-SCROLL RULE) ──
   At 390×844 the problem + current step + keypad must ALL fit with zero
   scrolling. Scoped via .hb-compact on .math-rounds-container (the pattern
   back-ported to the chunking reference in 0cf88b6); desktop untouched. */
@media (max-width: 480px) {
  .hb-compact { margin: 8px auto; }
  .hb-compact .math-rounds-header { margin-bottom: 6px; }
  .hb-compact .math-rounds-header h1 { font-size: 1.15rem; }
  .hb-compact .subtitle { font-size: 0.78rem; margin: 2px 0 0; }
  .hb-compact #game-panel { padding: 10px 12px; }
  .hb-compact .nb-ladder { margin-bottom: 4px; }
  .hb-compact .nb-band { font-size: 0.78rem; margin-bottom: 4px; }
  .hb-compact .hud { margin-bottom: 6px; font-size: 0.82rem; }
  .hb-compact .question-box { gap: 8px; }
  .hb-compact .question { font-size: 1.7rem; margin: 0; }
  .hb-compact .hb-steps { margin: 4px auto 0; gap: 8px; }
  .hb-compact .bf-bonus { margin-top: 2px; }
  .hb-compact .cc-meta { margin-top: 0; }
  .hb-compact .cc-mastery { margin: 4px auto 0; }
  .hb-compact .keypad { gap: 6px; margin-top: 2px; }
  .hb-compact .keypad button { padding: 9px; font-size: 1.1rem; border-radius: 10px; }
}

/* ── Slash between numerator and denominator boxes (bare fraction rows) ── */
.hb-frac-slash {
    align-self: center;
    font-family: var(--mono, 'JetBrains Mono', ui-monospace, monospace);
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--dim, #9aa6c4);
}

/* ── "= x/y simplified" bonus line under a solved fraction ── */
.bf-bonus {
    text-align: center;
    margin: 6px auto 0;
    font-size: 0.82rem;
    color: var(--accent-bright, #34d399);
}

/* ── Speed ghost + mastery bar (same classes as chunking_chopper) ── */
.cc-meta {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin: 10px auto 2px;
    font-size: 0.78rem;
    color: var(--faint, #6b7799);
}
.cc-ghost.beat { color: var(--accent-bright, #34d399); }

.cc-mastery {
    width: 100%;
    max-width: 280px;
    height: 8px;
    margin: 6px auto 2px;
    border-radius: 6px;
    background: var(--surface2, #15291f);
    border: 1px solid var(--border, rgba(255, 255, 255, 0.09));
    overflow: hidden;
}
.cc-mastery-fill {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg,
        color-mix(in srgb, var(--accent, #10b981) 70%, transparent),
        var(--teal, #2dd4bf));
    transition: width 0.3s ease;
}

/* Boss banner */
.bf-boss-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #0c1a13;
    background: var(--teal, #2dd4bf);
}
