/* #70 Follow/Reader feedback. #79 Share dimensions and state remain independent. */
.series-follow{min-width:96px;min-height:44px;padding:0 14px;border:1px solid var(--hairline);border-radius:12px;background:transparent;color:var(--text-dim,var(--dim));font:600 14px var(--ui-font,Inter,system-ui,sans-serif);cursor:pointer;white-space:nowrap;flex:none}
.series-follow.on{background:var(--purple-wash,rgba(139,92,246,.10));color:var(--purple-ink,var(--purple));border-color:var(--purple-border,var(--hairline))}
.series-follow:focus-visible,.rating-access:focus-visible,.rating-stars:focus-visible{outline:2px solid var(--purple);outline-offset:3px}
.series-follow.inhdr{background:rgba(13,17,32,.75);color:var(--text);margin-left:8px}
.topbar.solid .series-follow.inhdr{background:var(--surface)}
.series-follow.inhdr.on{background:linear-gradient(rgba(155,133,242,.12),rgba(155,133,242,.12)),rgba(13,17,32,.95);color:var(--purple);border-color:rgba(155,133,242,.4)}
.topbar.solid .series-follow.inhdr.on{background:var(--purple-wash,rgba(139,92,246,.10));color:var(--purple-ink,var(--purple));border-color:var(--purple-border,var(--hairline))}
.heroact .series-follow{height:48px;margin-left:12px}
/* S1-owned shared Chapters presentation; #152/#153 UI/UX reference.
   Both registered demos consume these styles; no production structure is prescribed. */
#tocSheet{--fs-cap:11px;--fs-sub:12.5px;--fs-row:13.5px;--fs-btn:13px;--fs-sheadt:16.5px;
  font-family:Inter,system-ui,sans-serif;border-radius:14px 14px 0 0;padding:14px 22px calc(18px + env(safe-area-inset-bottom));color:var(--text)}
#tocSheet .sheet-head{position:relative;z-index:1;display:flex;flex-direction:column;flex:none;margin-bottom:10px;background:var(--bg-panel,var(--panel))}
#tocSheet .sh-row{display:flex;align-items:center;gap:8px}
#tocSheet .sh-title{flex:1;min-width:0}
#tocSheet .sheet-title{font-size:var(--fs-sheadt);font-weight:800;letter-spacing:normal;margin:0}
#tocSheet .sheet-x{position:relative;flex:none;z-index:6;width:28px;height:28px;border-radius:50%;border:none;background:none;color:var(--text-dim,var(--dim));display:flex;align-items:center;justify-content:center;cursor:pointer;padding:0}
#tocSheet .sheet-x::before{content:'';position:absolute;inset:-8px}
#tocSheet .sheet-x svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
#tocSheet .sheet-x:hover{color:var(--text);background:var(--clip-bg,rgba(155,133,242,.07))}
#tocSheet .sheet-body{flex:1;min-height:0;overflow-y:auto;overflow-x:hidden;touch-action:pan-y;overscroll-behavior:contain}
#tocSheet .toc-fixed{flex:none}
#tocSheet .toc-feedback{margin:0 0 6px}
#tocSheet .toc-series-name{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;overflow:hidden;font-size:var(--fs-row);line-height:1.4;font-weight:600;color:var(--text)}
#tocSheet .toc-series-meta{display:flex;align-items:center;justify-content:flex-start;gap:12px;margin-top:6px;min-width:0;min-height:44px}
#tocSheet .toc-series-meta .sub{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:13px;color:var(--text-dim,var(--dim));font-weight:400}
#tocFollow{position:relative;min-height:38px;height:38px;padding:0 12px;border-radius:12px}
#tocFollow::before{content:'';position:absolute;left:0;right:0;top:50%;height:44px;transform:translateY(-50%)}
#tocSheet .toc-tools{display:flex;margin:4px 0 2px}
#tocSheet .toc-sort{display:inline-flex;flex:none;gap:0;max-width:100%;margin:0;padding:0;border:1px solid color-mix(in srgb,var(--hairline) 65%,transparent);border-radius:12px;overflow:hidden;background:transparent}
/* Move the former wrapper inset into the segments; preserve the approved 42px outer height and width. */
#tocSheet .toc-sort .chip{position:relative;min-height:40px;min-width:0;padding:0 13px;border:0;border-radius:0;background:transparent;white-space:nowrap;font:500 var(--fs-btn) Inter,system-ui,sans-serif;color:var(--text-dim,var(--dim))}
#tocSheet .toc-sort .chip.active{background:color-mix(in srgb,var(--purple-wash,rgba(139,92,246,.10)) 50%,transparent);color:var(--purple-ink,var(--purple));font-weight:600}
#tocSheet .toc-sort .chip::before{left:0;right:0}
/* Keep the shared 2px focus outline fully inside the wrapper's clipped corners. */
#tocSheet .toc-sort .chip:focus-visible{outline-offset:-6px}
/* Existing borderless sheet utility grammar, kept secondary to the current title. */
#tocSheet .toc-view-switch{display:inline-flex;align-items:center;gap:5px;flex:none;position:relative;background:none;border:0;padding:0 6px;min-height:28px;font:500 var(--fs-sub) Inter,system-ui,sans-serif;color:var(--text-dim,var(--dim));white-space:nowrap;cursor:pointer}
#tocSheet .toc-view-switch::before{content:'';position:absolute;left:0;right:0;top:50%;height:44px;transform:translateY(-50%)}
#tocSheet .toc-view-switch svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
#tocSheet .toc-view-switch:hover{color:var(--text)}
#tocSheet [hidden]{display:none!important}
#tocSheet .toc-row{display:flex;align-items:center;gap:12px;padding:13px 2px;border-top:1px solid var(--hairline);cursor:pointer;min-height:44px}
#tocSheet .toc-row:first-of-type{border-top:none}
#tocSheet .toc-num{flex:none;width:3ch;text-align:right;font-size:var(--fs-sub);font-weight:600;font-variant-numeric:tabular-nums;color:var(--text-dim,var(--dim))}
#tocSheet .toc-t{flex:1;min-width:0;font-family:var(--body-font,'Literata',Georgia,serif);font-size:14px;line-height:1.4;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2;overflow:hidden}
#tocSheet .toc-tag{font-size:var(--fs-cap);font-weight:600;letter-spacing:.03em;display:inline-flex;align-items:center;gap:5px;flex:none}
#tocSheet .toc-tag.free,#tocSheet .toc-tag.rented{color:var(--gold-ink,var(--gold))}
#tocSheet .toc-tag.ink{color:var(--purple-ink,var(--purple))}
#tocSheet .toc-tag.owned{color:var(--ok-ink,var(--ok))}
#tocSheet .toc-tag.mod{height:18px;border-radius:6px;box-sizing:border-box;line-height:1;background:none;border:1px solid var(--purple);color:var(--purple-ink,var(--purple));font-weight:700;letter-spacing:.5px;padding:0 6px}
#tocSheet .toc-tag svg{width:12px;height:12px;flex:none}
#tocSheet .toc-tag .cur{align-items:center;gap:.3em}
#tocSheet .toc-tag .ci svg{width:17px;height:17px}
#tocSheet .toc-row.locked .toc-t,#tocSheet .toc-row.read .toc-t{color:var(--text-dim,var(--dim))}
#tocSheet .toc-more{padding:14px 2px;text-align:center;font-size:11.5px;color:var(--text-dim,var(--dim));border-top:1px solid var(--hairline)}
#tocSheet .toc-vol{display:flex;align-items:center;gap:10px;width:100%;padding:12px 2px 6px;margin:0;background:none;border:0;text-align:left;font-family:Inter,system-ui,sans-serif;font-size:var(--fs-cap);font-weight:700;letter-spacing:.14em;color:var(--purple-ink,var(--purple))}
#tocSheet .toc-vol[aria-expanded]{min-height:44px;padding-top:6px;padding-bottom:6px;cursor:pointer}
#tocSheet .toc-vol::before{left:0;right:0}
#tocSheet .toc-vol::after{content:'';flex:1;height:1px;background:var(--hairline)}
#tocSheet .tv-caret{display:inline-flex;transition:transform .2s}
#tocSheet .tv-caret svg{width:14px;height:14px;display:block}
#tocSheet .toc-vol.closed .tv-caret{transform:rotate(-90deg)}
#tocSheet .bm-empty{border-top:none;padding-top:4px}
#tocSheet .bm-row{display:flex;align-items:center;gap:10px;padding:11px 2px;border-top:none;cursor:pointer;min-height:44px}
#tocSheet .bm-row + .bm-row{border-top:1px solid var(--hairline)}
#tocSheet .bm-ch{font-size:var(--fs-cap);font-weight:700;color:var(--gold-ink,var(--gold));white-space:nowrap}
#tocSheet .bm-snip{flex:1;min-width:0;font-family:var(--body-font,'Literata',Georgia,serif);font-size:var(--fs-sub);color:var(--text-dim,var(--dim));line-height:1.4;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#tocSheet .bm-x{background:none;border:none;color:var(--text-dim,var(--dim));font:15px Inter,system-ui,sans-serif;cursor:pointer;padding:2px 6px}
#tocSheet :is(button,[role=button]):focus-visible{outline:2px solid var(--purple);outline-offset:-2px}
#tocSheet .toc-sort .chip:focus-visible{outline-offset:-6px}
/* The inactive page keeps its position; only the foreground list shows feedback. */
body:has(#tocSheet.on) .sind.pagepos,
body:has(#tocSheet.on) .bar.bottom .progress-row{visibility:hidden;pointer-events:none}
/* S0 §1.7–§1.8: transient, non-interactive feedback on every pointer type. */
#tocSheet .sheet-scroller{scrollbar-gutter:auto}
@media (forced-colors:none){
  #tocSheet .sheet-scroller{scrollbar-width:none}
  #tocSheet .sheet-scroller::-webkit-scrollbar{display:none;width:0}
}
#tocSheet .sind{display:block;right:2px;width:3px;opacity:0;pointer-events:none}
#tocSheet .sind.on{opacity:1}
#tocSheet .sind i{width:3px;background:rgba(155,133,242,.35)}
@media (min-width:720px){
  #tocSheet .sind,#tocSheet .sind i{width:5px}
  #tocSheet .sind i{background:rgba(155,133,242,.6)}
}
/* S0 §8: leave WebKit scrollbar styling inactive so the browser paints its native bar. */
@media (forced-colors:active){
  #tocSheet .sheet-scroller{scrollbar-width:auto;scrollbar-color:auto}
  #tocSheet .sind{display:none}
}
.catchup .cu-follow-actions{display:flex;flex-direction:column;align-items:center;margin-top:24px}
.catchup .cu-follow-actions .series-follow{width:100%;max-width:240px;min-height:44px}
.rating-input{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.rating-stars{display:flex;width:220px;max-width:100%;height:44px;position:relative;cursor:pointer;touch-action:pan-y;user-select:none;color:var(--purple-ink,var(--purple));border-radius:6px}
.rating-star{width:20%;height:44px;position:relative;display:flex;align-items:center;justify-content:center;flex:none}
.rating-star svg{width:32px;height:32px;fill:none;stroke:currentColor;stroke-width:1.5}
.rating-star .star-fill{position:absolute;inset:0 auto 0 0;width:var(--fill,0%);overflow:hidden;pointer-events:none}
.rating-star .star-fill svg{fill:currentColor;position:absolute;width:32px;left:6px;top:6px}
.rating-value{font-size:16px;font-variant-numeric:tabular-nums;min-width:3ch;color:var(--text)}
.rating-note{color:var(--text-dim,var(--dim));font-size:12px;margin:6px 0}
.rating-status{min-height:24px;color:var(--text-dim,var(--dim));font-size:12px}
.end-actions .cl-label{display:inline-block;min-width:34px}
/* An unliked heart stays neutral under pointer/sticky touch hover; shared
   :focus-visible still supplies the keyboard outline. */
.end-actions .ch-like:not(.liked):hover{color:var(--text-dim);border-color:var(--hairline)}
.end-actions .ch-like.pointer-focus:focus-visible{outline:none}
.auto-row[role=checkbox]{min-height:44px}
#autoSetting[hidden]{display:none}
.auto-row[role=checkbox]:focus-visible{outline:2px solid var(--purple);outline-offset:3px}
@media(min-width:720px){.series-follow.inhdr{display:none}}
@media(max-width:719.98px){
  .series-follow.inhero{display:none}
  .hdr-in .hdr-title{min-width:0}
  .hdr-in .series-follow{min-width:88px;padding:0 10px;margin-left:6px}
  body.auth-out .hdr-in .authpill{margin-left:6px;padding-left:10px;padding-right:10px}
}

/* #138: one ordinary end-action group; rating has no elevated emphasis. */
.end-actions .rating-access{white-space:nowrap}
.end-actions .rating-access svg{flex:none}
.end-actions .rating-access.rated svg{fill:currentColor}
#ratingSheet{font-family:var(--ui-font,Inter,system-ui,sans-serif)}
/* Shared S0 title tier, as consumed by Series Detail / My / MOD sheets. */
#ratingSheet .sheet-title{font-size:var(--fs-sheadt);font-weight:800;letter-spacing:normal}
#ratingSheet .rating-helper{font-size:13px;color:var(--text-dim);margin:0 0 4px}
#ratingSheet .rating-input{gap:12px;flex-wrap:nowrap}
#ratingSheet .rating-stars{flex-shrink:0}
#ratingSheet .rating-stars:focus-visible{outline-offset:-2px}
#ratingSheet .rating-value{font-family:var(--ui-font,Inter,system-ui,sans-serif);font-size:var(--fs-row);font-weight:400;line-height:normal;margin:0}
#ratingSheet .rating-note{font-size:13px;margin:4px 0 8px;white-space:nowrap}
#ratingSheet .rating-status{font-size:13px;min-height:0;margin:4px 0 8px}
#ratingSheet .rating-foot{display:flex;justify-content:flex-end;gap:10px}
#ratingSheet .rating-foot .btn{min-width:92px;min-height:44px;margin-top:0;font-family:var(--ui-font,Inter,system-ui,sans-serif)}
#ratingSheet .rating-foot .btn:disabled{opacity:.45;cursor:default}
@media(min-width:720px){#ratingSheet{max-width:420px}}
