/* 🎓 Khoá học Rubik (course.js) – tiền tố co- */
.course { display: flex; flex-direction: column; gap: 14px; }
.crs-head { padding: 18px; }
.crs-head h1 { margin: 0 0 6px; }
.crs-head p { margin: 4px 0; line-height: 1.5; }
.crs-free { font-weight: 700; }
.crs-levels { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.crs-lv { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--line, rgba(0, 0, 0, .1)); background: var(--card, #fff); }
.crs-lv.on { border-color: #16a34a; }
.crs-lv.soon { opacity: .6; }
.crs-lv small { color: var(--muted); font-size: .8rem; line-height: 1.35; }
.crs-soon { align-self: flex-start; padding: 2px 10px; border-radius: 99px; background: rgba(127, 127, 127, .15); font-size: .75rem; font-weight: 800; }
.crs-prog { display: block; height: 7px; border-radius: 99px; background: rgba(127, 127, 127, .18); overflow: hidden; }
.crs-prog i { display: block; height: 100%; background: linear-gradient(90deg, #22c55e, #16a34a); }
.crs-h { margin: 6px 0 0; font-size: 1.15rem; }
.crs-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 8px; }
.crs-item { display: grid; grid-template-columns: 34px 30px 1fr; grid-template-rows: auto auto; align-items: center; column-gap: 8px; padding: 12px; border-radius: 14px; text-align: left; }
.crs-item .crs-n { grid-row: span 2; width: 30px; height: 30px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; background: var(--accent-soft, rgba(91, 61, 245, .12)); font-weight: 900; }
.crs-item.done .crs-n { background: #16a34a; color: #fff; }
.crs-item .crs-ico { grid-row: span 2; font-size: 1.4rem; text-align: center; }
.crs-item b { line-height: 1.3; }
.crs-item small { color: var(--muted); font-size: .78rem; }
.crs-lock { margin: 0; padding: 10px 14px; border-radius: 12px; background: rgba(245, 179, 1, .16); font-weight: 700; }
.crs-cert { padding: 22px; text-align: center; border: 3px double #d4a017; background: linear-gradient(160deg, rgba(255, 236, 160, .35), transparent); }
.crs-cert div { font-size: 3rem; line-height: 1; }
.crs-cert h2 { margin: 6px 0 2px; }
.crs-cert p { margin: 0 0 8px; color: var(--muted); }
.crs-cert b { display: block; font-size: 1.4rem; }
.crs-cert small { color: var(--muted); }
/* bài học */
.crs-top { display: flex; justify-content: space-between; align-items: center; font-weight: 700; }
.crs-lesson { padding: 18px; }
.crs-lesson h1 { margin: 0 0 8px; font-size: 1.35rem; }
.crs-body p { margin: 8px 0; line-height: 1.6; }
.crs-ok { color: #16a34a; font-weight: 900; }
.crs-play { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; padding: 16px; align-items: start; }
.crs-stage { display: flex; flex-direction: column; align-items: center; gap: 8px; position: sticky; top: 70px; }
.crs-scene { width: 100%; max-width: 320px; height: 290px; margin: 0 auto; cursor: grab; touch-action: none; }
.crs-alg { min-height: 1.6em; margin: 0; font: 700 1.05rem var(--font-mono, monospace); text-align: center; overflow-wrap: anywhere; }
.crs-alg span { padding: 1px 3px; border-radius: 4px; }
.crs-alg span.on { background: #f5b301; color: #1d1b2c; }
.crs-side h2 { margin: 4px 0 8px; font-size: 1.05rem; }
.crs-cases { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.crs-cases button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 8px 12px; border-radius: 12px; text-align: left; }
.crs-cases code { font: 700 .95rem var(--font-mono, monospace); color: var(--accent, #5b3df5); }
.crs-cases small { color: var(--muted); font-size: .8rem; }
.crs-goal { margin: 0 0 8px; font-size: .92rem; }
.crs-pad { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; margin: 10px 0 6px; }
.crs-pad button { min-height: 40px; padding: 0; font: 700 15px var(--font-mono, monospace); }
.crs-ctl { display: flex; flex-wrap: wrap; gap: 6px; }
.crs-msg { min-height: 1.4em; margin: 8px 0 0; font-weight: 700; line-height: 1.45; }
.crs-msg.ok { color: #16a34a; }
.crs-msg.bad { color: #b42318; }
.crs-quiz { padding: 16px 18px; }
.crs-quiz h2 { margin: 0 0 8px; font-size: 1.1rem; }
.crs-q { margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line, rgba(0, 0, 0, .1)); }
.crs-q b { display: block; margin-bottom: 6px; }
.crs-q label { display: flex; align-items: center; gap: 8px; padding: 4px 0; cursor: pointer; }
.crs-q.right { border-color: #16a34a; background: rgba(22, 163, 74, .08); }
.crs-q.wrong { border-color: #b42318; background: rgba(180, 35, 24, .07); }
.crs-nav { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
@media (max-width: 760px) {
  .crs-play { grid-template-columns: 1fr; }
  .crs-stage { position: static; }
  .crs-scene { max-width: 260px; height: 240px; }
}
