/* The read-aloud player (listen.mjs). An app colours it by setting these on .listen:
   --lst-bg      panel fill          --lst-line    panel and chip borders
   --lst-ink     text                --lst-muted   secondary text, unread subtitles
   --lst-accent  play button, active chapter, scrub bar
   --lst-on      ink on the accent   --lst-chip    chip and speed-button fill
   Rules are scoped under .listen, and button rules name the element, so they outrank a
   page framework's button styles (Clay's button:not(.circle):not(.chip) is 0,2,1). */
.listen{margin:12px 0 4px;padding:10px 12px;border-radius:14px;background:var(--lst-bg);
  border:1px solid var(--lst-line);color:var(--lst-ink)}
.listen svg{display:block;width:24px;height:24px}
.listen.loading{display:flex;align-items:center;gap:8px;color:var(--lst-muted);font-size:13px}
.listen.loading svg{width:18px;height:18px}
.listen.compact{padding:6px 10px 6px 6px}

:where(.listen) button{font:inherit;color:inherit;cursor:pointer;margin:0;box-sizing:border-box}
.listen button.lst-compact{display:flex;align-items:center;gap:10px;width:100%;min-height:44px;border:0;border-radius:0;
  background:none;padding:0;text-align:left}
.listen .lst-compact .lst-label{flex:1;font-size:14px;font-weight:600}
.listen .lst-compact span.lst-play{width:40px;height:40px}

.listen .lst-head{display:flex;align-items:center;gap:12px}
.listen :is(button,span).lst-play{flex:none;display:grid;place-items:center;width:48px;height:48px;padding:0;border:0;border-radius:50%;
  background:var(--lst-accent);color:var(--lst-on)}
.listen .lst-head .lst-play svg{width:28px;height:28px}
.listen .lst-bar{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}
.listen .lst-label{font-size:13px;font-weight:600;line-height:1.3}
.listen .lst-bar input[type=range]{width:100%;height:22px;margin:2px 0;accent-color:var(--lst-accent)}
.listen .lst-time{font-size:12px;color:var(--lst-muted);font-variant-numeric:tabular-nums;white-space:nowrap}
.listen button.lst-speed{flex:none;min-width:48px;height:36px;padding:0 10px;border-radius:999px;font-size:13px;font-weight:600;
  background:var(--lst-chip);border:1px solid var(--lst-line)}

.listen .lst-chaps{display:flex;flex-wrap:wrap;gap:6px;margin:10px 0 6px}
.listen button.lst-chap{min-height:34px;padding:0 12px;border-radius:999px;font-size:13px;font-weight:500;
  background:var(--lst-chip);border:1px solid var(--lst-line)}
.listen button.lst-chap.on{background:var(--lst-accent);border-color:var(--lst-accent);color:var(--lst-on)}

.listen .lst-text{margin-top:6px}
.listen .lst-text summary{display:flex;align-items:center;gap:6px;padding:6px 0;list-style:none;cursor:pointer;
  font-size:13px;font-weight:600;color:var(--lst-muted)}
.listen .lst-text summary::-webkit-details-marker{display:none}
.listen .lst-text summary::before{content:"";border:5px solid transparent;border-left:6px solid currentColor;
  border-right:0;transition:transform .15s}
.listen .lst-text[open] summary{color:var(--lst-ink)}
.listen .lst-text[open] summary::before{transform:rotate(90deg)}
.listen .lst-subs{list-style:none;margin:4px 0 0;padding:0;font-size:13.5px;line-height:1.45}
.listen .lst-subs li{padding:3px 6px;border-radius:6px;color:var(--lst-muted);cursor:pointer}
.listen .lst-subs li.on{color:var(--lst-ink);background:var(--lst-chip);font-weight:600}
