/* 高度差退出视口；缩略条贴着实际阅读区，不留下可见空占位。 */
.ability-reading { overflow-anchor: none; }
.overview-sentinel { display: block; height: 0; pointer-events: none; }
.capability-overview { --collapse-progress: 0; position: sticky; top: calc(var(--header-height) - var(--collapse-distance,0px)); height: var(--overview-full-height,auto); padding: 0; background: none; pointer-events: none; }
.overview-choices { height: var(--visible-height,auto); transform: translateY(var(--title-offset,0px)); background: #f7f1ed; pointer-events: auto; overflow: hidden; padding: 8px 4px 12px; }
.overview-choice { overflow: hidden; }
.choice-count, .choice-keywords { opacity: max(0,calc(1 - var(--collapse-progress)*1.6)); }
.is-compact .overview-choices { grid-template-columns: repeat(4,minmax(0,1fr)); gap: 4px; padding: 7px; border-radius: 0 0 10px 10px; box-shadow: 0 5px 12px rgba(61,42,48,.07); }
.is-compact .overview-choice { display: flex; grid-row: auto; align-items: center; justify-content: center; padding: 9px 6px; min-height: 42px; border-radius: 6px; background: transparent; box-shadow: none; }
.is-compact .choice-title { font-size: 14px; line-height: 1.5; text-align: center; }
.is-compact .choice-count, .is-compact .choice-keywords { display: none; }
.is-compact .overview-choice[aria-pressed="true"] { background: #e5d7ea; }
.is-measuring .overview-choices { height: auto; transform: none; }
#ability-groups { padding-right: 44px; }
#ability-groups::before { inset: 0; width: auto; border-radius: 12px 0 0 12px; background: linear-gradient(90deg,#fffdfa 0%,#fffdfa calc(100% - 28px),rgba(255,253,250,0) 100%); }
@media (max-width: 767px) {
 .is-compact .overview-choices { gap: 2px; padding: 5px 3px; }
 .is-compact .overview-choice { padding: 8px 3px; }
 .is-compact .choice-title { font-size: 12px; }
 #ability-groups { padding-right: 28px; }
 #ability-groups::before { right: 0; background: linear-gradient(90deg,#fffdfa 0%,#fffdfa calc(100% - 16px),rgba(255,253,250,0) 100%); }
}
