/* assets/css/lesson-replay.css — shared look for the student lesson pages
   (lesson-home / lesson-reflect / lesson-watch) and the minimal player
   (assets/js/lesson-player.js). Palette and type match lesson-reflection.html. */
:root{
  color-scheme: dark;
  --body:#1c1f28; --surface:#262a35; --raised:#2c3140; --active:#323a4c; --line:#2f3340; --line-soft:#242833;
  --text:#f1eee8; --text-2:#a4a8b3; --muted:#6b6f7a;
  --accent:#b8720a; --accent-line:#f0a339; --accent-soft:rgba(240,163,57,.14);
  --ok:#6fbf8e; --ok-soft:rgba(111,191,142,.14);
  --font:'Barlow',-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif;
  --cond:'Barlow Semi Condensed','Barlow',-apple-system,sans-serif;
  --mono:'JetBrains Mono',ui-monospace,Menlo,monospace;
  /* Highlight types — one hue each, used for dots, pills, list markers. */
  --t-sovt:#6fbf8e; --t-ex:#8fb4e8; --t-song:#f0a339; --t-concept:#c79bf2; --t-hw:#e3c35a; --t-wrap:#a4a8b3;
}
*{box-sizing:border-box}
html,body{margin:0}
body{background:var(--body);color:var(--text);font-family:var(--font);font-size:15px;line-height:1.5;padding:16px 16px 48px}
[hidden]{display:none!important}
button{font:inherit;color:inherit;cursor:pointer}
a{color:inherit}
button:focus-visible,a:focus-visible,textarea:focus-visible,[tabindex]:focus-visible{outline:2px solid var(--accent-line);outline-offset:2px}
.mono{font-family:var(--mono);font-variant-numeric:tabular-nums}
.label{font-family:var(--cond);font-weight:600;font-size:11.5px;letter-spacing:.09em;text-transform:uppercase;color:var(--muted)}
.muted{color:var(--text-2)}

.wrap{max-width:1180px;margin:0 auto;display:flex;flex-direction:column;gap:18px}
.wrap.narrow{max-width:820px}
.top{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap}
.back{display:inline-flex;align-items:center;gap:6px;color:var(--text-2);text-decoration:none;font-weight:600;font-size:14px}
.back:hover{color:var(--text)}
.top-meta{color:var(--text-2);font-size:14px}

.btn{border:1px solid var(--line);background:var(--surface);border-radius:8px;padding:8px 14px;font-weight:600;font-size:14px;display:inline-flex;align-items:center;gap:8px;text-decoration:none;color:var(--text)}
.btn:hover{background:var(--raised)}
.btn.primary{background:var(--accent);border-color:var(--accent);color:#fff}
.btn.primary:hover{background:#c97f12}
.btn.ghost{background:transparent}
.btn.sm{padding:5px 10px;font-size:13px}
.btn[disabled]{opacity:.45;cursor:not-allowed}

.pill{display:inline-flex;align-items:center;gap:6px;font-family:var(--cond);font-weight:600;font-size:11.5px;letter-spacing:.06em;text-transform:uppercase;color:var(--text-2)}
.pill::before{content:'';width:8px;height:8px;border-radius:50%;background:var(--dot,var(--muted))}
.t-sovt{--dot:var(--t-sovt)} .t-ex{--dot:var(--t-ex)} .t-song{--dot:var(--t-song)}
.t-concept{--dot:var(--t-concept)} .t-hw{--dot:var(--t-hw)} .t-wrap{--dot:var(--t-wrap)}

.preview-banner{border:1px solid rgba(143,180,232,.35);background:rgba(143,180,232,.13);border-radius:10px;padding:9px 14px;font-size:14px;color:var(--text)}
.state{padding:60px 16px;text-align:center;color:var(--text-2)}

/* Checklist (home: practice plan) */
.check{display:flex;gap:12px;align-items:flex-start;padding:10px 0;border-top:1px solid var(--line-soft)}
.check:first-child{border-top:0}
.check input{appearance:none;flex-shrink:0;width:20px;height:20px;margin:1px 0 0;border:1.5px solid var(--muted);border-radius:5px;cursor:pointer;display:grid;place-items:center}
.check input:checked{background:var(--ok);border-color:var(--ok)}
.check input:checked::after{content:'';width:5px;height:10px;border:solid #14161c;border-width:0 2px 2px 0;transform:rotate(45deg) translate(-1px,-1px)}
.check-text{flex:1}
.check input:checked + .check-text{color:var(--text-2);text-decoration:line-through;text-decoration-color:var(--muted)}
.check-auto{font-size:12px;color:var(--ok);margin-left:6px}

/* Small practice button (🎹 in the spec) — one style everywhere */
.practice{text-decoration:none;display:inline-flex;align-items:center;gap:6px;border:1px solid var(--line);background:transparent;border-radius:999px;padding:3px 10px 3px 8px;font-size:12.5px;font-weight:600;color:var(--accent-line);white-space:nowrap}
.practice:hover{background:var(--accent-soft);border-color:var(--accent-line)}
.practice svg{width:14px;height:14px}

/* ── Minimal player (assets/js/lesson-player.js) ─────────────────────────── */
.lp{position:relative;background:#000;border-radius:12px;overflow:visible;display:flex;flex-direction:column;user-select:none}
.lp-stage{position:relative;aspect-ratio:16/9;background:#000;border-radius:12px 12px 0 0;overflow:hidden;display:grid;place-items:center;cursor:pointer}
.lp-stage video{width:100%;height:100%;object-fit:contain;display:block}
.lp-audio{display:flex;flex-direction:column;align-items:center;gap:10px;color:var(--text-2);font-size:14px}
.lp-audio svg{width:56px;height:56px;color:var(--muted)}
.lp-big{position:absolute;inset:0;margin:auto;width:64px;height:64px;border-radius:50%;border:0;background:rgba(0,0,0,.55);display:grid;place-items:center;transition:opacity .15s}
.lp-big svg{width:26px;height:26px;margin-left:3px}
.lp.playing .lp-big{opacity:0;pointer-events:none}
.lp-bar{display:flex;align-items:center;gap:10px;padding:8px 12px;background:var(--surface);border-radius:0 0 12px 12px}
.lp-btn{border:0;background:transparent;width:30px;height:30px;border-radius:6px;display:grid;place-items:center;color:var(--text);flex-shrink:0}
.lp-btn:hover{background:var(--raised)}
.lp-btn svg{width:18px;height:18px}
.lp-time{font:500 12px var(--mono);color:var(--text-2);flex-shrink:0;min-width:38px;text-align:center}
.lp-track{position:relative;flex:1;height:28px;cursor:pointer;touch-action:none}
.lp-rail,.lp-fill,.lp-clip{position:absolute;top:50%;height:4px;margin-top:-2px;border-radius:2px;left:0}
.lp-rail{right:0;background:var(--line)}
.lp-clip{background:rgba(240,163,57,.35)}
.lp-fill{background:var(--text)}
.lp-head{position:absolute;top:50%;width:12px;height:12px;margin:-6px 0 0 -6px;border-radius:50%;background:var(--text);opacity:0;transition:opacity .12s}
.lp-track:hover .lp-head,.lp-track.drag .lp-head{opacity:1}
.lp-dot{position:absolute;top:50%;width:10px;height:10px;margin:-5px 0 0 -5px;padding:0;border-radius:50%;border:2px solid var(--surface);background:var(--dot);z-index:2;transition:transform .1s}
.lp-dot::before{content:'';position:absolute;inset:-8px}
.lp-dot:hover,.lp-dot.on{transform:scale(1.45)}
.lp-card{position:absolute;bottom:calc(100% + 10px);width:260px;max-width:calc(100vw - 32px);background:var(--raised);border:1px solid var(--line);border-radius:10px;padding:10px 12px;box-shadow:0 10px 30px rgba(0,0,0,.45);z-index:20;display:flex;flex-direction:column;gap:6px;cursor:default}
.lp-card-head{display:flex;justify-content:space-between;align-items:center;gap:8px}
.lp-card-title{font-weight:600;font-size:14px;line-height:1.35}
.lp-card-actions{display:flex;gap:6px;flex-wrap:wrap;margin-top:2px}
.lp-empty{aspect-ratio:16/9;display:grid;place-items:center;color:var(--text-2);padding:20px;text-align:center}
/* Fullscreen: the stage takes everything, the bar sits at the bottom. */
.lp:fullscreen{border-radius:0;justify-content:flex-end}
.lp:fullscreen .lp-stage{flex:1;aspect-ratio:auto;border-radius:0}
.lp:fullscreen .lp-bar{border-radius:0}
@media (max-width:600px){
  .lp-bar{gap:4px;padding:6px 8px}
  .lp-time.dur{display:none}
}

/* Staff viewing a student's answers (lesson-replay-data.js adds the class):
   the answers are shown as the student left them and can't be changed. */
.replay-readonly .rate-opts button,
.replay-readonly input[data-plan],
.replay-readonly textarea.note-in,
.replay-readonly #checkin { pointer-events: none; }
.replay-readonly .rate-opts button:not(.on) { opacity: .45; }
.replay-readonly textarea.note-in,
.replay-readonly #checkin { opacity: .9; resize: none; }
.replay-readonly [data-act="finish"] { display: none; }
.replay-readonly textarea.note-in:placeholder-shown,
.replay-readonly #checkin:placeholder-shown { opacity: .4; }

/* Seek bar hover tip (time + the line spoken there) and clip handles. */
.lp-tip{position:absolute;max-width:min(360px,calc(100% - 8px));background:var(--raised);border:1px solid var(--line);border-radius:8px;padding:5px 9px;font-size:12.5px;color:var(--text-2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;pointer-events:none;z-index:19;box-shadow:0 6px 20px rgba(0,0,0,.4)}
.lp-tip b{font:500 12px var(--mono);color:var(--text);margin-right:6px}
.lp-handle{position:absolute;top:50%;width:8px;height:20px;margin:-10px 0 0 -4px;border-radius:3px;background:var(--accent-line);z-index:3;cursor:ew-resize;touch-action:none}
.lp-extra.on{background:var(--accent);color:#fff}
