/* Post page ("The Spoken Page"): the transcript is the player, and every other
   feature lives in one of three drawers in the Margin rail.
   Tokens only from hotspoken.css (:root --bg, --surface, --ink, --ink-2, --line,
   --accent, --on-accent, --tint1, --gold; spacing --s1/--s2/--s3; type --t-md/--t-sm).
   Type sizes stay 32 / 18 / 14 px and spacing stays a multiple of 8px, per that file. */
.pp{max-width:720px}
.pp-head{margin-bottom:var(--s2)}
.pp-author{margin:0 0 var(--s1)}
.pp-title{margin:0 0 var(--s1)}
/* One meta row: author, date, duration and category on the left; Share and the
   ⋯ on the right, centred with the row. The actions are pushed right by an auto
   margin on the row's flex line, so the ⋯ is right-aligned on every instance
   (full page, overlay sheet, category path) — no shell-specific rule. */
.pp-meta-row{display:flex;align-items:center;gap:8px 12px;flex-wrap:wrap}
.pp-meta-row .pp-author{margin:0;flex:1 1 140px;min-width:0}
.pp-meta-row .cat-line{margin:0;flex:none}
.pp-actions{display:flex;align-items:center;gap:8px;margin:0 0 0 auto;flex:none}
.pp-actions .hs-share-btn{min-height:44px}
.pp-actions .item-more{position:relative}
.pp-actions .item-more-menu{position:absolute;inset-inline-end:0;top:calc(100% + 6px);display:grid;gap:2px;max-width:min(320px,calc(100vw - 24px));min-width:240px;z-index:20;background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:6px;box-shadow:0 12px 32px rgba(26,26,20,.18)}
.pp-actions .item-more-menu a,.pp-actions .item-more-menu button{display:block;width:100%;min-height:44px;padding:10px 12px;text-align:start;box-sizing:border-box;border-radius:8px;color:var(--ink);text-decoration:none}
.pp-actions .item-more-menu a:hover,.pp-actions .item-more-menu button:hover{background:var(--tint0)}
.pp-actions .item-more-menu a.im-danger{color:var(--ember,#d93806)}
.pp-actions .item-more-menu form{display:grid;gap:2px;margin:4px 0 0;padding-top:6px;border-top:1px solid var(--line)}

/* The stage: a surface card. The audio element has native controls in the markup
   (no-JS fallback) and is visually hidden once JS runs; the transcript does the
   job of a progress bar, so there is no waveform and no scrubber here. */
.pp-stage{background:var(--surface);border:1px solid var(--line);border-radius:12px;padding:var(--s2);margin:0 0 var(--s2);box-shadow:0 1px 3px rgba(26,26,20,.06)}
.pp-stage audio{position:absolute;width:1px;height:1px;opacity:0;pointer-events:none}
.pp-transport{display:flex;align-items:center;justify-content:center;gap:8px;margin-bottom:var(--s1);flex-wrap:nowrap}
.pp-play{flex:none;width:56px;height:56px;min-width:56px;min-height:56px;border-radius:50%;border:0;background:var(--ink);color:var(--bg);font-size:20px;cursor:pointer;display:grid;place-items:center}
.pp-skip,.pp-speed{flex:none;min-width:48px;min-height:44px;padding:0 12px;border:1px solid var(--line);border-radius:999px;background:var(--surface);color:var(--ink);font:inherit;cursor:pointer}
.pp-time{flex:none;min-width:88px;text-align:center;font-variant-numeric:tabular-nums;color:var(--ink-2)}
/* Notes pinned to moments (the old player's flagwave, as links under the
   transport): each jumps to its moment. */
.pp-pins{margin:0 0 var(--s1)}
.pp-pin{display:inline-block;margin:0 var(--s1) var(--s1) 0;padding:var(--s1) var(--s2);border:1px solid var(--line);border-radius:999px;color:var(--ink-2);text-decoration:none}
.pp-pin:hover{background:var(--tint0);color:var(--ink)}
/* The scroll: same height as the old .vp-text (min(55vh, 420px)). The dashed mark
   is the reading line: the spoken line is scrolled onto it, like .vp-mark. */
.pp-scroll{position:relative;height:min(55vh,420px);overflow-y:auto;border-radius:8px;background:var(--surface);border:1px solid var(--line);padding:0 var(--s2);line-height:32px;font-size:var(--t-md)}
.pp-mark{position:sticky;top:50%;height:0;border-top:1px dashed var(--tint2);margin:0 -16px;pointer-events:none;z-index:1}
.pp-pad{height:45%}
.pp-line{display:block;width:100%;text-align:start;background:none;border:0;padding:var(--s1);margin:var(--s1) 0;border-radius:4px;color:var(--ink-2);font:inherit;line-height:32px;cursor:pointer;text-decoration:none}
.pp-line:hover{background:var(--tint0)}
.pp-line.cur{background:var(--tint0);color:var(--ink);box-shadow:inset 3px 0 0 var(--gold)}
.pp-ts{display:block;font-size:var(--t-sm);line-height:24px;color:var(--ink-2);font-variant-numeric:tabular-nums}
.pp-line.cur .pp-ts{color:var(--ink)}
.pp-words{user-select:text;-webkit-user-select:text}
.pp-w{border-radius:4px}
.pp-w.said{color:var(--ink)}
.pp-w.on{background:var(--accent);color:var(--on-accent)}
.pp-w.pp-typed{opacity:.6;font-style:italic}
.pp-freetx{padding:var(--s2) 0;white-space:pre-wrap}
.pp-hint{color:var(--ink-2);margin:var(--s1) 0 0}
/* Highlight composer: appears under the transcript when the author selects
   words; the label is the highlight's chapter-like name. */
.pp-hl{margin:var(--s1) 0 0;padding:var(--s2);border:1px solid var(--line);border-radius:8px;background:var(--surface)}
.pp-hl[hidden]{display:none}
.pp-hl-sel{margin:0 0 var(--s1);color:var(--ink-2)}
.pp-hl label{display:block;margin:0 0 var(--s1)}
.pp-hl input[name="label"]{width:100%}
.pp-hl .btn{margin-right:var(--s1)}
/* Inline transcript editing: the button is a plain link by the title; the bar
   sits under the transcript. While editing, the words are plainly editable
   and the line being heard stands out; the "tap a line" hint hides, since a
   tap places the caret instead of seeking. */
.pp-tr-bar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:var(--s1) 0 0;padding:var(--s2);border:1px solid var(--gold);border-radius:8px;background:var(--surface)}
.pp-tr-bar[hidden]{display:none}
.pp-tr-note{color:var(--ink-2);font-size:var(--t-sm)}
.pp-tr-error{flex-basis:100%;margin:0;color:var(--ember,#d93806);font-size:var(--t-sm)}
.pp-tr-error[hidden]{display:none}
.pp-tr-saved{margin:var(--s1) 0 0;color:var(--ink-2)}
.pp-tr-saved[hidden]{display:none}
.pp-stage.pp-editing .pp-words[contenteditable]{outline:1px dashed var(--gold);outline-offset:2px;border-radius:4px;background:var(--tint0)}
.pp-stage.pp-editing .pp-line.pp-tr-cur{background:var(--tint0);box-shadow:inset 3px 0 0 var(--gold)}
.pp-stage.pp-editing .pp-line{cursor:text}
.pp-stage.pp-editing .pp-hint{display:none}

/* The Margin rail: three drawers, one open at a time by the reader's choice.
   A <details> needs no JS, so every feature stays reachable without it. */
.pp-rail{margin:0 0 var(--s3)}
.pp-drawer{background:var(--surface);border:1px solid var(--line);border-radius:8px;padding:var(--s1) var(--s2);margin:0 0 var(--s1)}
.pp-drawer summary{font:600 var(--t-md)/24px Poppins,Inter,system-ui,sans-serif;cursor:pointer;min-height:44px;display:flex;align-items:center;gap:var(--s1)}
.pp-count{color:var(--ink-2);font-size:var(--t-sm)}
.pp-links{list-style:none;padding:0;margin:var(--s1) 0}
.pp-links li{padding:var(--s1) 0;border-bottom:1px solid var(--line)}
.pp-links li:last-child{border-bottom:0}
.pp-links .btn{display:inline-block}
/* POST forms inside a drawer (listen-along) sit inline with the links. */
.pp-links form{display:inline}
.pp-drawer h3{margin-top:var(--s2)}

.pp-comments h2{margin-top:var(--s3)}
@media (prefers-reduced-motion:reduce){.pp-scroll{scroll-behavior:auto}}
