/* The interactive lesson player. Four looks, one per grade band. */
.player { --pb: #ffffff; --pi: #0b1530; --pa: #002b83; --ps: #d99a1e; --pmuted: #56627a; --pline: #dde6f4;
  position: relative; border-radius: 18px; overflow: hidden; background: var(--pb); color: var(--pi);
  display: grid; grid-template-rows: auto 1fr auto auto; min-height: 460px; font-family: var(--body); }
/* Grades 1–3: sunny, big and round */
.player.style-play { --pb: #fff9e8; --pi: #2b2116; --pa: #c2410c; --ps: #d99a1e; --pmuted: #7a6a52; --pline: #f1e2b8; }
.player.style-play .pl-board { font-size: 1.5rem; }
/* Grades 4–6: bright exercise book */
.player.style-bright { --pb: #ffffff; --pi: #0b1530; --pa: #002b83; --pline: #dbe7f3;
  background-image: repeating-linear-gradient(to bottom, transparent 0 39px, #e5eef8 39px 40px); }
/* Grades 7–12: chalkboard */
.player.style-focus, .player.style-sharp { --pb: #002b83; --pi: #edf3fc; --pa: #d99a1e; --pmuted: #b4c3e0; --pline: rgba(255, 255, 255, .14); }
.player.style-sharp { --pb: #001a67; }
.player.style-focus .pl-board, .player.style-sharp .pl-board { font-family: var(--body); }

.pl-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--pline); font-size: .88rem; color: var(--pmuted); }
.pl-top b { color: var(--pi); font-family: var(--display); font-size: 1rem; }
.pl-board { padding: 22px 26px; display: flex; flex-direction: column; gap: 16px; align-items: center; justify-content: center; text-align: center; font-size: 1.2rem; min-height: 250px; }
.pl-item { animation: pop .45s cubic-bezier(.2, .9, .3, 1.2) both; max-width: 100%; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.97); } }
.pl-title { font-family: var(--display); font-weight: 800; font-size: 1.9em; line-height: 1.05; color: var(--pa); }
.pl-text { font-size: 1.05em; max-width: 34ch; }
.pl-eq { font-family: "Atkinson Hyperlegible", ui-monospace, monospace; font-size: 1.45em; font-weight: 700; white-space: pre-line; letter-spacing: .02em;
  padding: 10px 20px; border-radius: 12px; border: 2px dashed var(--pline); }
.pl-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; text-align: left; }
.pl-steps li { padding: 8px 14px 8px 40px; position: relative; border-radius: 10px; background: color-mix(in srgb, var(--pa) 10%, transparent); animation: pop .4s both; }
.pl-steps li::before { content: counter(st); counter-increment: st; position: absolute; left: 10px; top: 8px; width: 22px; height: 22px; border-radius: 50%; background: var(--pa); color: var(--pb); font-size: .75em; font-weight: 800; display: grid; place-items: center; }
.pl-steps { counter-reset: st; }
.pl-objects { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; max-width: 560px; font-size: 2.1em; line-height: 1; }
.style-play .pl-objects { font-size: 2.6em; }
.pl-objects span { animation: pop .4s both; }
.pl-frac { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; width: min(440px, 100%); height: 64px; border: 3px solid var(--pi); border-radius: 10px; overflow: hidden; }
.pl-frac span { border-left: 3px solid var(--pi); transition: background .5s; }
.pl-frac span:first-child { border-left: 0; }
.pl-frac span.on { background: var(--ps); }
.pl-callout { background: var(--ps); color: #2b2116; font-weight: 800; padding: 12px 20px; border-radius: 14px; font-size: 1.05em; }
.pl-table { border-collapse: collapse; font-size: .95em; }
.pl-table td { border: 2px solid var(--pline); padding: 8px 16px; }
.pl-table tr:first-child td { font-weight: 700; }
.pl-nl { width: min(560px, 100%); height: 70px; overflow: visible; }
.pl-nl line, .pl-nl path { stroke: var(--pi); }
.pl-nl text { fill: var(--pi); font: 600 13px var(--body); }
.pl-nl circle { fill: var(--ps); }

.pl-caption { padding: 12px 22px; border-top: 1px solid var(--pline); font-size: 1.02rem; min-height: 64px; color: var(--pi); background: color-mix(in srgb, var(--pb) 85%, #000 4%); }
.pl-caption.off { display: none; }
.pl-controls { display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--pline); }
.pl-btn { width: 44px; height: 44px; border-radius: 50%; border: 0; background: color-mix(in srgb, var(--pa) 14%, transparent); color: var(--pi); font-size: 1.1rem; cursor: pointer; display: grid; place-items: center; }
.pl-btn:hover { background: color-mix(in srgb, var(--pa) 26%, transparent); }
.pl-btn.main { width: 54px; height: 54px; background: var(--pa); color: var(--pb); font-size: 1.3rem; }
.pl-btn.txt { width: auto; padding: 0 14px; border-radius: 99px; font: 700 .85rem var(--body); }
.pl-dots { display: flex; gap: 5px; flex: 1; justify-content: center; flex-wrap: wrap; }
.pl-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--pline); }
.pl-dots i.seen { background: var(--pmuted); }
.pl-dots i.now { background: var(--pa); transform: scale(1.3); }
.pl-dots i.qd { border-radius: 2px; background: color-mix(in srgb, var(--ps) 55%, var(--pline)); }

.pl-ask { position: absolute; inset: 0; background: color-mix(in srgb, var(--pb) 70%, transparent); backdrop-filter: blur(3px); display: grid; place-items: center; padding: 18px; z-index: 3; }
.pl-ask[hidden], .pl-end[hidden] { display: none; }
.pl-card { background: #fff; color: #0b1530; border-radius: 20px; padding: 22px; width: min(480px, 100%); box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .45); animation: pop .35s both; }
.pl-card h3 { font-family: var(--display); font-size: 1.3rem; margin-bottom: 14px; }
.pl-card .kicker { font-size: .8rem; font-weight: 700; color: #b47d12; margin-bottom: 4px; }
.pl-opts { display: grid; gap: 8px; }
.pl-opt { text-align: left; font: 700 1.05rem var(--body); padding: 13px 16px; border: 2px solid #dde6f4; border-radius: 12px; background: #fff; cursor: pointer; color: #0b1530; }
.pl-opt:hover { border-color: #002b83; }
.pl-opt.right { border-color: #157347; background: #e3f4ea; }
.pl-opt.wrong { border-color: #b42318; background: #fde7e5; animation: shake .3s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
.pl-feedback { margin-top: 12px; font-size: .98rem; }
.pl-feedback b { display: block; font-family: var(--display); font-size: 1.1rem; }
.pl-feedback.good b { color: #157347; } .pl-feedback.try b { color: #b42318; }
.pl-end { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; padding: 20px; background: color-mix(in srgb, var(--pb) 88%, transparent); }
.pl-end .pl-card { text-align: center; }
.pl-end .big { font-family: var(--display); font-size: 3rem; font-weight: 800; color: #002b83; line-height: 1; }
.pl-end .actions { display: grid; gap: 8px; margin-top: 16px; }
.pl-start { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; background: color-mix(in srgb, var(--pb) 55%, transparent); }
.pl-start button { width: 92px; height: 92px; border-radius: 50%; border: 0; background: var(--ps); color: #2b2116; font-size: 2rem; cursor: pointer; box-shadow: 0 16px 40px -10px rgba(0, 0, 0, .45); }
.pl-start p { margin: 12px 0 0; font-weight: 700; color: var(--pi); text-align: center; }
.player.compact { min-height: 400px; }
.player.compact .pl-board { min-height: 210px; font-size: 1.05rem; }
@media (max-width: 600px) {
  .pl-board { padding: 16px; font-size: 1.05rem; min-height: 220px; }
  .pl-btn { width: 40px; height: 40px; }
  .pl-btn.txt.opt-hide { display: none; }
}

/* progress, watermark, protection, data saver */
.player { grid-template-rows: auto auto 1fr auto auto; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.pl-progress { height: 4px; background: var(--pline); }
.pl-progress i { display: block; height: 100%; width: 0; background: var(--pa); transition: width .4s; }
.pl-dots.many { display: none; }
.pl-mark { position: absolute; z-index: 2; pointer-events: none; font-size: .78rem; font-weight: 700; color: var(--pi); opacity: .13;
  transform: rotate(-12deg); white-space: nowrap; transition: top 1.2s, left 1.2s; }
.pl-blocked { position: absolute; inset: 0; z-index: 6; display: grid; place-items: center; padding: 20px; background: var(--pb); }
.pl-blocked[hidden] { display: none; }
.pl-btn.txt.on { background: var(--pa); color: var(--pb); }
.pl-btn:disabled { opacity: .7; cursor: default; }
.player.loading .pl-board::after { content: "Loading the lesson…"; color: var(--pmuted); }
.pl-ask .pl-card a.btn { margin-top: 12px; }
@media (max-width: 600px) { .pl-controls { flex-wrap: wrap; } .pl-dots { order: 9; flex-basis: 100%; } }
.pl-controls { position: relative; z-index: 6; background: var(--pb); }
