/* V9 isolated design corrections: quick filters, accessible operations, tarot spacing, brand glow. */
/* Quick choices are now seven; two tidy rows at all phone widths. */
#studentLibrary[data-view=list] .stage-word-list .stage-quick-set {
  display:grid!important;
  grid-template-columns:repeat(4,minmax(0,1fr))!important;
  gap:1px 4px!important;
  width:100%;
  justify-content:stretch;
  align-items:center;
}
#studentLibrary[data-view=list] .stage-word-list .stage-quick {
  display:flex!important;
  width:100%;min-width:0;min-height:28px;
  justify-content:center;padding:3px 1px 3px;
}
#studentLibrary[data-view=list] .stage-word-list .stage-quick>b {
  font-size:clamp(10.5px,2.7vw,12px);font-weight:550;
  white-space:nowrap;
}
/* A single toolbar outside the scrollable advanced filter region. */
#studentLibrary[data-view=list] .stage-word-list .stage-filter-actions {
  flex:none;display:flex;align-items:center;justify-content:space-between;
  gap:9px;min-height:32px;margin:0 2px;
  border-bottom:1px solid rgba(134,105,104,.24);
}
#studentLibrary[data-view=list] .stage-word-list .stage-filter-actions button {
  box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;
  gap:5px;min-height:31px;padding:3px 5px;
  font:650 11.5px/1.25 -apple-system,BlinkMacSystemFont,'PingFang SC',sans-serif;
  border:0!important;border-radius:0!important;background:transparent!important;
  box-shadow:none!important;color:#69457a;
}
#studentLibrary[data-view=list] .stage-word-list .stage-filter-actions .stage-more-toggle {
  justify-content:flex-start;padding-left:2px;
}
#studentLibrary[data-view=list] .stage-word-list .stage-filter-actions .stage-more-toggle em {
  font-size:10px;font-weight:450;font-style:normal;color:#8b7790;
}
#studentLibrary[data-view=list] .stage-word-list .stage-filter-actions .stage-reset {
  margin:0!important;min-width:70px;justify-content:flex-end;padding-right:3px;
  color:#765278;text-decoration:underline;text-underline-offset:3px;
  text-decoration-color:rgba(112,79,124,.32);
}
#studentLibrary[data-view=list] .stage-word-list .stage-filter-actions button:focus-visible {
  outline:2px solid #9572af;outline-offset:-2px;
}
/* Details stays the established scroll container, without its old center trigger. */
#studentLibrary[data-view=list] .stage-word-list .stage-advanced:not([open]) {
  display:none!important;
}
#studentLibrary[data-view=list] .stage-word-list .stage-advanced[open] {
  display:block!important;
  margin:0!important;padding:0!important;border:0!important;
  max-height:min(33dvh,285px)!important;overflow-y:auto!important;
  -webkit-overflow-scrolling:touch;overscroll-behavior:contain;
}
#studentLibrary[data-view=list] .stage-word-list .stage-advanced>summary {
  display:none!important;
}
#studentLibrary[data-view=list] .stage-word-list .stage-filter-body {
  padding:3px 3px 9px!important;
}
/* The old source facet now has only All / School / NCE. */
#studentLibrary[data-view=list] .stage-word-list .stage-legacy-line .stage-source-set {
  justify-content:flex-start;gap:10px;
}
#studentLibrary[data-view=list] .stage-word-list .stage-legacy-line .stage-source-set button {
  flex:0 1 auto;min-width:56px;padding-inline:8px;
}
/* Move only the artwork layer of the brand/glow 8px upward; text retains its confirmed placement. */
#studentLibrary[data-view=shelf] .sl-brand.mw-scene-brand::before {
  top:-6px!important;
}
/* Keep existing sizes and focus scale, equalize visible (not unscaled slot) tarot gaps. */
#studentLibrary[data-view=shelf] .stage-tarot {
  translate:var(--tarot-optical-x,0px) 0px;
}
@media(max-height:780px){
  #studentLibrary[data-view=list] .stage-word-list .stage-quick {min-height:25px;}
  #studentLibrary[data-view=list] .stage-word-list .stage-filter-actions {min-height:28px;}
  #studentLibrary[data-view=list] .stage-word-list .stage-filter-actions button {min-height:28px;}
  #studentLibrary[data-view=list] .stage-word-list .stage-advanced[open] {max-height:29dvh!important;}
}
