/* 학습 플레이어(lplayer.js) — word·say·rule 공용. 색은 사이트의 토큰(--card·--line·--text·--muted·--accent·--stress·--bg-2·--sh-2)을 쓴다.
   화면 아래 붙는 작은 띠. 본문을 가리지 않게 body.has-lp 에 아래 여백. 헌법 8: 흐림 없음·무한 움직임 없음. */
body.has-lp { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
.lp { position: fixed; left: 50%; bottom: calc(10px + env(safe-area-inset-bottom)); translate: -50% 0; z-index: 1000;
  width: min(720px, calc(100vw - 16px)); box-sizing: border-box;
  background: var(--card, #fff); color: var(--text, #222); border: 1px solid var(--line, #ddd); border-radius: 22px;
  box-shadow: var(--sh-2, 0 8px 20px -8px rgba(0,0,0,.25)); padding: 6px 8px; font-size: .95rem; overflow: hidden; }
.lp *, .lp *::before { box-sizing: border-box; }
.lp-prog { position: absolute; inset: 0 0 auto 0; height: 3px; background: color-mix(in oklch, var(--line, #ddd) 60%, transparent); }
.lp-prog i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent, #36c), var(--stress, #c40)); transition: width .4s ease; }
.lp-row { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px; }
.lp-b, .lp-c { font: inherit; color: inherit; cursor: pointer; border: 0; display: inline-flex; align-items: center; justify-content: center; }
.lp-b { min-width: 44px; min-height: 44px; border-radius: 999px; background: none; font-size: 1.15rem; }
.lp-b:hover, .lp-c:hover { background: color-mix(in oklch, var(--accent, #36c) 12%, transparent); }
.lp-main { min-width: 52px; min-height: 52px; font-size: 1.35rem; color: oklch(99% 0 0);
  background: linear-gradient(135deg, var(--accent, #36c), color-mix(in oklch, var(--accent, #36c) 55%, var(--stress, #c40))); }
.lp-main:hover { background: var(--accent, #36c); }
.lp-pos { font-variant-numeric: tabular-nums; color: var(--muted, #666); font-weight: 700; min-width: 64px; text-align: center; }
.lp-pos b { color: var(--text, #222); font-size: 1.05rem; }
.lp-c { min-height: 40px; padding: 0 12px; border-radius: 999px; font-weight: 700; font-size: .88rem; background: var(--bg-2, #f2f2f2); white-space: nowrap; gap: 2px; }
.lp-sh[aria-pressed="true"] { background: var(--stress, #c40); color: oklch(99% 0 0); }
.lp-min { font-size: 1rem; min-width: 40px; min-height: 40px; color: var(--muted, #666); }
.lp-turn { margin: 4px 6px 2px; font-weight: 700; text-align: center; color: var(--stress, #c40); position: relative; padding-bottom: 6px; }
.lp-turn i { position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; border-radius: 3px; background: var(--stress, #c40); }
@media (prefers-color-scheme: dark) { .lp-main, .lp-sh[aria-pressed="true"] { color: oklch(18% .02 275); } }
/* 접은 플레이어: 재생 단추와 위치만 */
.lp.min { width: auto; left: auto; right: 12px; translate: 0 0; padding: 4px; }
.lp.min .lp-row > :not(.lp-main):not(.lp-min):not(.lp-pos) { display: none; }
.lp.min .lp-turn { display: none; }
body.has-lp:has(.lp.min) { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
@media (max-width: 480px) {
  body.has-lp { padding-bottom: calc(124px + env(safe-area-inset-bottom)); }
  .lp { border-radius: 18px; padding: 6px 4px 4px; }
  .lp-row { gap: 4px; }
  .lp-pos, .lp-c { order: -1; }
  .lp-pos { min-width: 0; font-size: .85rem; padding: 0 4px; }
  .lp-c { padding: 0 9px; font-size: .82rem; }
  .lp.min .lp-pos { order: 0; }
}
@media (pointer: coarse) { .lp-c, .lp-min { min-height: 44px; min-width: 44px; } }
@media print { .lp { display: none; } body.has-lp { padding-bottom: 0; } }

/* 발음 줄 가리기(스스로 시험) — 단추 [data-hide-pr] 가 html.hide-pr 를 켠다. 자리는 남겨 줄이 흔들리지 않게, 누르면(open) 다시 보인다 */
.hide-pr :is(.wx-card, .sx-line):not(.open) :is(rt, .wd > .wp) { visibility: hidden; }
