/* v73 — Compact, accessible bookmark progress controls on both chapter lists.
   Deliberately scoped: no impact on chapter text selection, quoting or readers' other tools. */
.rw73-bookmark-form { margin:0; flex:none; display:flex; align-items:center; justify-content:center; }
.rw73-bookmark-toggle,
.rw73-bookmark-placeholder {
  width:38px; min-width:38px; height:38px; flex:0 0 38px;
  display:inline-flex; align-items:center; justify-content:center;
}
.rw73-bookmark-toggle {
  padding:0; border:0; background:transparent; border-radius:6px;
  color:var(--muted,#a7adb9); cursor:pointer; text-decoration:none;
}
.rw73-bookmark-toggle:hover { color:var(--accent,#c6a6e7); background:color-mix(in srgb,currentColor 10%,transparent); }
.rw73-bookmark-toggle:focus-visible { outline:2px solid var(--focus,#dfbafa); outline-offset:-2px; }
.rw73-bookmark-toggle[disabled] { cursor:wait; opacity:.55; }
.rw73-bookmark-check { display:inline-flex; pointer-events:none; }
.rw73-bookmark-check svg { overflow:visible; stroke:currentColor; stroke-width:1.6; stroke-linecap:round; stroke-linejoin:round; fill:none; }
.rw73-bookmark-check svg path { opacity:0; stroke:white; stroke-width:2.4; }
.rw73-bookmark-toggle[aria-pressed="true"] { color:var(--accent,#c6a6e7); }
.rw73-bookmark-toggle[aria-pressed="true"] svg rect { fill:var(--accent-deep,#815d9d); stroke:var(--accent,#c6a6e7); }
.rw73-bookmark-toggle[aria-pressed="true"] svg path { opacity:1; }

/* Full story: retain every chapter/volume interlude, its original link and timestamp.
   Tighten the chapter entries rather than altering pagination or listing order. */
.rw13-chapter-list .rw73-toc-entry {
  display:flex; align-items:center; min-width:0;
  border-bottom:1px solid var(--border,#353d49);
  background:var(--bg,#14171d);
}
.rw13-chapter-list .rw73-toc-entry:nth-child(odd) { background:var(--surface,#1d222b); }
.rw13-chapter-list .rw73-toc-entry:hover { background:var(--raised,#252c37); }
.rw13-chapter-list .rw73-toc-entry > .rw73-bookmark-form,
.rw13-chapter-list .rw73-toc-entry > .rw73-guest-bookmark,
.rw13-chapter-list .rw73-toc-entry > .rw73-bookmark-placeholder {
  margin:0 0 0 .5rem; flex:0 0 38px;
}
.rw13-chapter-list .rw73-toc-entry > .chapter-row {
  flex:1; min-width:0; min-height:40px;
  margin:0; padding:.42rem .85rem .42rem .18rem;
  border:0; background:transparent !important;
  display:flex; align-items:center; justify-content:space-between; gap:.9rem;
  line-height:1.38;
}
.rw13-chapter-list .rw73-toc-entry > .chapter-row span { min-width:0; overflow-wrap:anywhere; }
.rw13-chapter-list .rw73-toc-entry > .chapter-row time { flex:none; white-space:nowrap; }

/* Reader's mini TOC: keep the original data-toc-chapter anchor intact for its
   existing search/navigation code; the checkbox is a separate adjacent control. */
.rw9-toc-list .rw73-mini-entry {
  display:flex; align-items:stretch; position:relative; min-width:0;
  border-bottom:1px solid var(--reader-edge,var(--border,#353d49));
}
.rw9-toc-list .rw73-mini-entry[hidden] { display:none !important; }
.rw9-toc-list .rw73-mini-entry:nth-child(even) { background:color-mix(in srgb,var(--reader-text,#ece9e3) 4%,transparent); }
.rw9-toc-list .rw73-mini-entry.is-current {
  background:color-mix(in srgb,var(--reader-link,#dbb9ef) 16%,transparent);
  box-shadow:inset 3px 0 var(--reader-link,#dbb9ef);
}
.rw9-toc-list .rw73-mini-entry > .rw73-bookmark-form,
.rw9-toc-list .rw73-mini-entry > .rw73-guest-bookmark,
.rw9-toc-list .rw73-mini-entry > .rw73-bookmark-placeholder {
  flex:0 0 38px; margin:0 0 0 .4rem; align-self:center;
}
.rw9-toc-list .rw73-mini-entry .rw73-bookmark-toggle { color:var(--reader-text,var(--text,#ece9e3)); }
.rw9-toc-list .rw73-mini-entry .rw73-bookmark-toggle[aria-pressed="true"] { color:var(--reader-link,var(--accent,#c6a6e7)); }
.rw9-toc-list .rw73-mini-entry > .rw9-toc-item {
  flex:1; min-width:0; min-height:43px; width:auto; margin:0;
  display:flex; align-items:center; padding:.48rem .85rem .48rem .2rem;
  border:0 !important; background:transparent !important;
  line-height:1.35; overflow-wrap:anywhere;
}
.rw9-toc-list .rw73-mini-entry > .rw9-toc-item:hover { color:var(--reader-link,var(--accent,#c6a6e7)); }
.rw9-toc-list .rw73-mini-entry > .rw9-toc-item[hidden] { display:none !important; }
.rw73-mini-entry:has(> .rw9-toc-item[hidden]) { display:none !important; }
.rw73-bookmark-status { margin:.3rem 0; font-size:.82rem; color:var(--muted,#a7adb9); }
.rw73-bookmark-status:empty { display:none; }

@media(max-width:600px) {
  .rw13-chapter-list .rw73-toc-entry > .chapter-row { padding:.38rem .55rem .38rem 0; gap:.45rem; }
  .rw13-chapter-list .rw73-toc-entry > .chapter-row time { font-size:.7rem; }
  .rw13-chapter-list .rw73-toc-entry > .rw73-bookmark-form,
  .rw13-chapter-list .rw73-toc-entry > .rw73-guest-bookmark,
  .rw13-chapter-list .rw73-toc-entry > .rw73-bookmark-placeholder { margin-left:.15rem; }
  .rw9-toc-list .rw73-mini-entry > .rw73-bookmark-form,
  .rw9-toc-list .rw73-mini-entry > .rw73-guest-bookmark,
  .rw9-toc-list .rw73-mini-entry > .rw73-bookmark-placeholder { margin-left:.1rem; }
}
