/* V49.1: confirmed current wordlist UI. Presentation only; data/functions come from R17 WordbookCore. */

/* --- wordlist_recovered_base.css --- */
#studentLibrary[data-view=list] .sl-main{position:absolute;inset:0;width:100%;height:100%;padding:0;overflow:hidden}
#studentLibrary .stage-word-list.sl-list{isolation:isolate;position:absolute;inset:0;display:flex;flex-direction:column;gap:0;width:100%;height:100dvh;min-height:0;margin:0;border:0;border-radius:0;overflow:hidden;padding:calc(env(safe-area-inset-top) + 62px) clamp(46px,11.4vw,52px) calc(env(safe-area-inset-bottom) + 142px);background:transparent;color:var(--ink)}
#studentLibrary .stage-word-list::before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;background-image:url("./list_fullbleed_r24.b6a3105a39430cc5b.webp");background-position:center;background-size:100% 100%;background-repeat:no-repeat}
#studentLibrary .stage-word-list .sl-heading{position:relative;flex:none;display:flex;align-items:center;gap:7px;justify-content:space-between;min-height:51px;padding:0 8px 4px;border-bottom:1px solid #be9d6b80}
#studentLibrary .stage-word-list .sl-heading>button{position:absolute;left:-13px;top:8px;z-index:2;flex:none;min-width:74px;min-height:30px;padding:3px 5px;border:1px solid #d4b889;border-radius:15px;background:#f8e9cbdc;color:#60406f;font:650 12px/1.2 var(--wordbook-ui-font),serif;text-align:center;box-shadow:0 1px 2px #69452b19}
#studentLibrary .stage-word-list .stage-heading-center{flex:1;min-width:0;text-align:center;display:flex;flex-direction:column;gap:1px;padding:0 8px}
#studentLibrary .stage-word-list .stage-heading-center h2{
  color:#4b2e60;font:750 clamp(17px,4.4vw,21px)/1.2 var(--wordbook-ui-font),serif;
  white-space:nowrap;text-overflow:ellipsis;overflow:hidden;
}
#studentLibrary .stage-word-list .stage-heading-center small{font-size:11px;color:#785438}
#studentLibrary .stage-word-list .stage-query{isolation:isolate;position:relative;display:flex;flex-direction:column;flex:none;gap:3px;padding:6px 6px 5px;margin:3px -1px 3px;min-height:0}
#studentLibrary .stage-word-list .stage-query::before{content:"";position:absolute;inset:0;z-index:-1;pointer-events:none;background:url("./filter_panel_ornate_r21.b6a3105a39430cc5b.webp") center/100% 100% no-repeat}
#studentLibrary .stage-word-list .sl-query-modes{
  display:flex;gap:0;flex:none;padding:2px;border:1px solid #d5b68c;border-radius:24px;background:#fbebcd;
}
#studentLibrary .stage-word-list .sl-query-modes button{
  flex:1 1 50%;min-width:0;min-height:31px;padding:3px 5px;border:0!important;border-radius:21px;
  color:#593f64;background:transparent!important;box-shadow:none;font:700 13px/1.2 var(--wordbook-ui-font),serif;
}
#studentLibrary .stage-word-list .sl-query-modes [aria-pressed=true]{
  color:#fef0d6;background:#5e327d url("./tab_t1_on_r19.b6a3105a39430cc5b.webp") center/100% 100% no-repeat!important;
  text-shadow:0 1px 2px #2e1739;
}
#studentLibrary .stage-word-list .sl-search{
  display:flex;align-items:center;gap:7px;flex:none;min-height:38px;padding:0 10px;
  border:1px solid #c9a983;border-radius:20px;background:#fff7e8e8;color:#744e89;
  transition:border-color .15s,box-shadow .15s;
}
#studentLibrary .stage-word-list .sl-search:focus-within{border-color:#bf9f74;box-shadow:inset 0 0 0 1px #e6cda1a8}
#studentLibrary .stage-word-list .stage-search-icon{flex:none;font:700 23px/1 Georgia,serif;color:#78509c}
#studentLibrary .stage-word-list .sl-search input{
  flex:1;min-width:0;width:100%;min-height:30px;height:34px;padding:1px 0;border:0!important;border-radius:0;
  outline:0!important;box-shadow:none!important;background:transparent!important;color:#4b342e;
  font:16px/1.4 -apple-system,BlinkMacSystemFont,"PingFang SC",sans-serif;appearance:none;
}
#studentLibrary .stage-word-list .sl-search input::-webkit-search-cancel-button{display:none}
#studentLibrary .stage-word-list .stage-filter-core{display:flex;flex-direction:column;gap:2px;padding:2px 0 1px}
#studentLibrary .stage-word-list .stage-filter-line{display:flex;align-items:center;gap:5px;min-height:26px;padding:0 0 1px}
#studentLibrary .stage-word-list .stage-line-name{flex:0 0 55px;white-space:nowrap;color:#693e7c;font:750 11px/1.25 var(--wordbook-ui-font),serif}
#studentLibrary .stage-word-list .stage-quick-line{flex-wrap:wrap;gap:3px;padding-top:1px}
#studentLibrary .stage-word-list .stage-quick-line .stage-line-name{flex:1 1 100%;}
#studentLibrary .stage-word-list .stage-quick-set{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:3px;width:100%}
#studentLibrary .stage-word-list .stage-quick{
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;min-width:0;min-height:36px;
  padding:2px 1px;border:1px solid #d6b992;border-radius:9px;background:linear-gradient(#fffae9,#f8e5c5);
  color:#5d3f6d;font-size:10px;white-space:nowrap;box-shadow:none;
}
#studentLibrary .stage-word-list .stage-quick>span{font-size:15px;line-height:1;color:#8f62a0}
#studentLibrary .stage-word-list .stage-quick>b{font-weight:650;font-size:clamp(9px,2.3vw,10.5px);line-height:1.15;color:#614765}
#studentLibrary .stage-word-list .stage-quick[aria-pressed=true]{background:linear-gradient(#ead3f3,#f3e1f0);border-color:#9e79b0;box-shadow:inset 0 0 0 1px #c39ccf}
#studentLibrary .stage-word-list .stage-source-set{flex:1;min-width:0;display:flex;align-items:center;gap:3px}
#studentLibrary .stage-word-list .stage-source-set button{
  flex:1;min-width:0;min-height:27px;padding:2px 3px;border:0;border-radius:5px;background:transparent;
  color:#614e40;font-size:clamp(10px,2.45vw,12px);white-space:nowrap;box-shadow:none;
}
#studentLibrary .stage-word-list .stage-source-set button[aria-pressed=true]{color:#623b85;font-weight:750;background:#e6d0edb0}
#studentLibrary .stage-word-list .stage-course-set{display:flex;flex:1;gap:5px;min-width:0}
#studentLibrary .stage-word-list .stage-picker{position:relative;flex:1;min-width:0}
#studentLibrary .stage-word-list .stage-picker-trigger{
  display:flex;align-items:center;justify-content:space-between;gap:3px;width:100%;min-width:0;min-height:28px;
  padding:3px 5px;border:0;border-bottom:1px solid #bda17c;border-radius:0;background:transparent;
  color:#5b4565;font-size:11px;line-height:1.2;text-align:left;white-space:nowrap;box-shadow:none;
}
#studentLibrary .stage-word-list .stage-picker-trigger span{min-width:0;overflow:hidden;text-overflow:ellipsis}
#studentLibrary .stage-word-list .stage-picker-trigger i{flex:none;color:#8b6a8d;font-style:normal;font-size:12px}
#studentLibrary .stage-word-list .stage-picker-trigger:disabled{opacity:.4}
#studentLibrary .stage-word-list .stage-picker-menu{
  position:absolute;z-index:40;top:calc(100% + 3px);left:0;min-width:100%;max-width:min(250px,78vw);max-height:178px;
  overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding:4px;
  border:1px solid #c8a575;border-radius:10px;background:#fff0d4;box-shadow:0 5px 15px #2c183b38;touch-action:pan-y;
}
#studentLibrary .stage-word-list .stage-picker-menu[hidden]{display:none!important}
#studentLibrary .stage-word-list .stage-picker-menu button{
  display:block;width:100%;min-height:32px;padding:5px 8px;border:0;border-radius:6px;background:transparent;
  color:#563b60;font-size:12px;text-align:left;white-space:nowrap;box-shadow:none;
}
#studentLibrary .stage-word-list .stage-picker-menu button:active{background:#ead8ed}
#studentLibrary .stage-word-list .stage-advanced{display:block;flex:none;max-height:none;min-height:27px;margin:2px 0 0;padding:0;overflow:visible;border:0;border-top:1px solid #c4a5759c;border-bottom:1px solid #c4a5759c;border-radius:0;background:transparent}
#studentLibrary .stage-word-list .stage-advanced>summary{display:flex;align-items:center;justify-content:center;gap:7px;min-height:27px;padding:3px 5px;cursor:pointer;border:0;border-radius:0;background:transparent;color:#5e3971;font-size:12px;font-weight:750;list-style:none}
#studentLibrary .stage-word-list .stage-advanced>summary::-webkit-details-marker{display:none}
#studentLibrary .stage-word-list .stage-advanced>summary em{font-size:11px;font-style:normal;font-weight:500;color:#80658a}
#studentLibrary .stage-word-list .stage-advanced[open]{max-height:clamp(130px,22dvh,190px);overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;touch-action:pan-y;background:transparent;border:0}
#studentLibrary .stage-word-list .stage-filter-body{padding:5px 2px 4px;background:transparent;border:0}
#studentLibrary .stage-word-list .sl-filter-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:5px 10px}
#studentLibrary .stage-word-list .sl-filter-grid>label{display:flex;flex-direction:column;min-width:0;gap:1px;color:#5a4540;font-size:10px}
#studentLibrary .stage-word-list .sl-filter-grid .stage-picker-trigger{min-height:27px;font-size:11px}
#studentLibrary .stage-word-list .stage-feature-group{margin:4px 0 2px;padding:0;border:0;border-radius:0}
#studentLibrary .stage-word-list .stage-feature-group legend{padding:0 3px;color:#654579;font-size:10px;font-weight:700}
#studentLibrary .stage-word-list .sl-features{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1px 4px;margin:2px 0}
#studentLibrary .stage-word-list .sl-features label{display:flex;align-items:center;gap:3px;min-width:0;min-height:24px;color:#574534;font-size:10px;white-space:nowrap}
#studentLibrary .stage-word-list .sl-features input{width:14px;height:14px;flex:none;margin:0;accent-color:#81579b}
#studentLibrary .stage-word-list .stage-feature-group .stage-picker{max-width:150px;margin-top:3px}
#studentLibrary .stage-word-list .stage-reset{
  display:block;width:auto;min-height:25px;margin:2px auto 0;padding:3px 12px;border:0;border-radius:0;
  color:#624373;background:transparent;font-size:11px;text-decoration:underline;text-underline-offset:3px;box-shadow:none;
}
#studentLibrary .stage-word-list .stage-result-head{
  flex:none;display:flex;align-items:center;justify-content:space-between;gap:4px;min-height:30px;
  padding:2px 0 3px;border-bottom:1px solid #be9d6b9e;color:#4f3463;
}
#studentLibrary .stage-word-list .stage-result-head>b{min-width:0;font-size:clamp(12px,3.2vw,14px);white-space:nowrap}
#studentLibrary .stage-word-list .stage-sort-picker{flex:0 1 112px}
#studentLibrary .stage-word-list .stage-sort-picker .stage-picker-trigger{
  justify-content:flex-end;min-height:27px;padding:2px 0;border:0;background:transparent;color:#6b4d66;font-size:11px;text-align:right;
}
#studentLibrary .stage-word-list .stage-sort-picker .stage-picker-menu{left:auto;right:0;min-width:124px}
#studentLibrary .stage-word-list .stage-result-box{display:flex;position:relative;flex:1 1 auto;min-height:0;min-width:0;overflow:hidden}
#studentLibrary .stage-word-list .sl-results{
  flex:1;min-width:0;min-height:0;overflow-y:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;
  scrollbar-width:thin;scrollbar-color:#b596bd #e9d5b6;padding:0 5px 0 0;touch-action:pan-y;
}
#studentLibrary .stage-word-list .sl-results::-webkit-scrollbar{width:3px}
#studentLibrary .stage-word-list .sl-results::-webkit-scrollbar-thumb{background:#9d78b0;border-radius:4px}
#studentLibrary .stage-word-list .stage-scroll-track{position:absolute;top:5px;bottom:4px;right:0;width:3px;background:#a784ac45;border-radius:4px;pointer-events:none}
#studentLibrary .stage-word-list .stage-scroll-track[hidden]{display:none}
#studentLibrary .stage-word-list .stage-scroll-track i{display:block;width:100%;height:24px;border-radius:5px;background:#895baa;transform:translateY(0);transition:transform .08s}
#studentLibrary .stage-word-list .stage-search-prompt{padding:24px 8px;text-align:center;color:#886c72;font-size:12px}
#studentLibrary .stage-word-list .sl-list-record{
  display:flex;align-items:center;gap:3px;min-height:61px;padding:4px 0;border-bottom:1px solid #c8aa7b8f;
}
#studentLibrary .stage-word-list .sl-list-record[hidden]{display:none!important}
#studentLibrary .stage-word-list .sl-list-record.is-selected{background:linear-gradient(90deg,#ead6f2d5,#e7d0e37a 75%,transparent)}
#studentLibrary .stage-word-list .stage-row-number{
  flex:0 0 25px;width:25px;height:26px;display:flex;align-items:center;justify-content:center;
  border:1px solid #d1aa79;border-radius:44% 56% 48% 52%;background:linear-gradient(#ffebc9,#f8dcb5);
  color:#633f72;font:bold 12px Georgia,serif;box-shadow:0 1px 2px #bb926c69;
}
#studentLibrary .stage-word-list .sl-list-record .sl-row{
  flex:1;min-width:0;display:flex;align-items:center;gap:5px;width:100%;min-height:50px;padding:2px 0;
  border:0;border-radius:0;background:transparent;color:#483329;text-align:left;box-shadow:none;
}
#studentLibrary .stage-word-list .sl-list-record .sl-row>.stage-word-main{display:flex;flex:0 0 39%;min-width:0;flex-direction:column;gap:3px}
#studentLibrary .stage-word-list .stage-word-main>b{
  color:#43275d;font:750 clamp(17px,4vw,19px)/1.08 Georgia,"Times New Roman",serif;
  overflow-wrap:anywhere;word-break:normal;
}
#studentLibrary .stage-word-list .sl-row-ipa{display:block;min-width:0;color:#74565b;font:11.5px/1.2 -apple-system,"Arial Unicode MS","Noto Sans",sans-serif;overflow-wrap:anywhere}
#studentLibrary .stage-word-list .sl-list-record .sl-row>.stage-word-detail{display:flex;flex:1 1 0;min-width:0;flex-direction:column;gap:3px}
#studentLibrary .stage-word-list .stage-word-meaning{color:#49352d;font:12px/1.25 -apple-system,BlinkMacSystemFont,"PingFang SC",sans-serif;overflow-wrap:anywhere}
#studentLibrary .stage-word-list .stage-word-sub{display:flex;align-items:center;flex-wrap:wrap;gap:2px 4px;min-width:0}
#studentLibrary .stage-word-list .stage-status{padding:2px 4px;border-radius:9px;background:#e5d5ec;color:#5f4671;font:10px/1.2 -apple-system,"PingFang SC",sans-serif;font-style:normal;white-space:nowrap}
#studentLibrary .stage-word-list .stage-status.wrong{background:#f6d0d7;color:#9b4150}
#studentLibrary .stage-word-list .stage-status.mastered{background:#d4e9ce;color:#3f794d}
#studentLibrary .stage-word-list .stage-word-sub small{color:#6f573c;font:10px/1.25 -apple-system,"PingFang SC",sans-serif;white-space:nowrap}
#studentLibrary .stage-word-list .stage-knowledge-icons{display:inline-flex;align-items:center;gap:1px;white-space:nowrap;color:#996bab;line-height:1}
#studentLibrary .stage-word-list .stage-knowledge-icons svg{display:inline-block;width:12px;height:12px;fill:currentColor;stroke:currentColor}
#studentLibrary .stage-word-list .stage-knowledge-icons svg:nth-child(2){fill:none}
#studentLibrary .stage-word-list .sl-row-speak{
  flex:0 0 28px;display:flex;align-items:center;justify-content:center;width:28px;min-width:28px;min-height:35px;
  padding:0;border:0!important;background:transparent!important;color:#8361aa;box-shadow:none!important;
}
#studentLibrary .stage-word-list .sl-row-speak svg{width:20px;height:20px;pointer-events:none}
#studentLibrary .stage-word-list .stage-row-chevron{flex:0 0 10px;min-width:10px;min-height:30px;padding:0;border:0;background:transparent;color:#8757a2;font-size:23px;line-height:1;box-shadow:none}
#studentLibrary .stage-word-list .sl-empty{padding:16px 5px;color:#806044;font-size:12px;text-align:center}

#studentLibrary .stage-query[data-mode="search"] .stage-filter-core,
#studentLibrary .stage-query[data-mode="search"] .stage-advanced{display:none!important}
#studentLibrary .stage-query[data-mode="search"]{padding-bottom:10px}
/* A compact viewport never scrolls as a page; only result, tarot rail and an open picker can scroll. */

#studentLibrary[data-view=list] .sl-brand,#studentLibrary[data-view=list] .sl-nav{display:none!important}
#studentLibrary[data-view=list]{padding:0}

/* V37 routing visibility: current shelf stays authoritative; recovered list only appears in list view. */
#studentLibrary[data-view="shelf"] .stage-word-list{display:none!important}
#studentLibrary[data-view="list"] .sl-shelf{display:none!important}
#studentLibrary[data-view="list"] .sl-main{position:absolute!important;inset:0!important}


/* --- wordlist_filters_parent_order_v2.css --- */
/* Wordlist compact full-bleed candidate v1. Only applies to the isolated wordlist page.
   The parchment itself is the decorated container; controls are typography on paper. */
#studentLibrary[data-view="list"] {
  --paper-safe-top:var(--preview-safe-top,env(safe-area-inset-top,0px));
  --paper-safe-bottom:var(--preview-safe-bottom,env(safe-area-inset-bottom,0px));
  padding:0!important;
}
#studentLibrary[data-view="list"] .sl-main {position:absolute;inset:0;overflow:hidden;}
#studentLibrary .stage-word-list.sl-list {
  inset:0;
  width:100%;height:100dvh;
  padding:calc(var(--paper-safe-top) + 65px) clamp(23px,6.0vw,32px)
          calc(var(--paper-safe-bottom) + 69px);
  overflow:hidden;
  gap:0;
}
/* Keep artwork original. Crop horizontal transparent margins/roll ends; maintain vertical fit. */
#studentLibrary .stage-word-list::before {
  inset:var(--paper-safe-top) 0 var(--paper-safe-bottom) 0;
  background-image:url("./list_fullbleed_r24.b6a3105a39430cc5b.webp");
  background-size:110% 100%;
  background-position:center center;
  background-repeat:no-repeat;
}
#studentLibrary .stage-word-list .sl-heading {
  min-height:42px;
  padding:0 1px 4px;
  border-bottom:1px solid rgba(120,109,102,.37);
}
#studentLibrary .stage-word-list .sl-heading>button {
  left:0;top:6px;
  min-width:0;min-height:29px;
  padding:2px 4px;
  border:0;border-radius:0;background:transparent;
  box-shadow:none;
  color:#654878;
  font-size:12px;
}
#studentLibrary .stage-word-list .stage-heading-center {padding:0 70px;}
#studentLibrary .stage-word-list .stage-heading-center h2 {font-size:19px;}
#studentLibrary .stage-word-list .stage-heading-center small {font-size:10.5px;}
/* No inner parchment, no ornamental segmented control. Search is always available. */
#studentLibrary .stage-word-list .stage-query {
  gap:2px;
  padding:4px 0 0;
  margin:0;
  background:transparent;
  border:0;
}
#studentLibrary .stage-word-list .stage-query::before,
#studentLibrary .stage-word-list .sl-query-modes {display:none!important;content:none!important;}
#studentLibrary .stage-word-list .sl-search {
  min-height:36px;
  padding:0 4px;
  margin:0 0 1px;
  border:0;
  border-bottom:1px solid rgba(119,108,101,.43);
  border-radius:0;
  box-shadow:none!important;
  background:transparent;
}
#studentLibrary .stage-word-list .sl-search:focus-within {
  border-color:#87599b;
  box-shadow:none!important;
}
#studentLibrary .stage-word-list .sl-search input {height:34px;min-height:34px;font-size:16px;}
#studentLibrary .stage-word-list .sl-search input::placeholder {color:#aa9488;}
#studentLibrary .stage-word-list .stage-search-icon {font-size:21px;}
#studentLibrary .stage-word-list .stage-filter-core {gap:1px;padding:0;}
#studentLibrary .stage-word-list .stage-filter-line {gap:6px;min-height:27px;padding:0;}
#studentLibrary .stage-word-list .stage-quick-line {flex-wrap:nowrap;gap:0;}
#studentLibrary .stage-word-list .stage-quick-line .stage-line-name {display:none!important;}
#studentLibrary .stage-word-list .stage-quick-set {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:2px;
  width:100%;
  padding:0;
}
#studentLibrary .stage-word-list .stage-quick {
  display:flex;flex:0 1 auto;flex-direction:row;
  align-items:center;justify-content:center;
  min-height:28px;min-width:0;
  margin:0;
  padding:3px 4px 1px;
  border:0!important;
  border-bottom:2px solid transparent!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  white-space:nowrap;
}
#studentLibrary .stage-word-list .stage-quick>span {display:none!important;}
#studentLibrary .stage-word-list .stage-quick>b {
  font-size:clamp(11px,2.78vw,12.5px);
  font-weight:500;
  color:#6b5765;
  line-height:1.25;
}
#studentLibrary .stage-word-list .stage-quick[aria-pressed=true] {
  border-bottom-color:#8761a2!important;
}
#studentLibrary .stage-word-list .stage-quick[aria-pressed=true]>b {
  color:#573875;
  font-weight:750;
}
#studentLibrary .stage-word-list .stage-source-line {min-height:27px;}
#studentLibrary .stage-word-list .stage-source-line .stage-line-name {
  display:block;flex:0 0 auto;
  font:600 11px/1.3 -apple-system,'PingFang SC',sans-serif;
  color:#84696e;
}
#studentLibrary .stage-word-list .stage-source-set {
  display:flex;gap:3px;justify-content:flex-start;
}
#studentLibrary .stage-word-list .stage-source-set button {
  flex:0 1 auto;
  min-height:25px;
  padding:2px 8px;
  border:0!important;border-radius:0;
  box-shadow:none!important;
  background:transparent!important;
  color:#6c5960;
  font-size:11.5px;
}
#studentLibrary .stage-word-list .stage-source-set button[aria-pressed=true] {
  color:#583879;
  text-decoration:underline;
  text-underline-offset:4px;
  text-decoration-color:#9571ac;
  font-weight:700;
}
#studentLibrary .stage-word-list .stage-course-line {display:none!important;}
/* Exactly one expansion level; on compact heights it scrolls INSIDE the advanced section. */
#studentLibrary .stage-word-list .stage-advanced {
  min-height:25px;
  margin:0;
  border:0;
  background:transparent;
}
#studentLibrary .stage-word-list .stage-advanced>summary {
  min-height:25px;
  padding:2px 4px;
  justify-content:flex-end;
  color:#72527e;
  font-size:11.5px;
  font-weight:650;
}
#studentLibrary .stage-word-list .stage-advanced>summary em {font-size:11px;}
#studentLibrary .stage-word-list .stage-advanced[open] {
  overflow-y:auto;
  max-height:min(32dvh,265px);
  background:transparent;
  border:0;
  scrollbar-width:thin;
}
#studentLibrary .stage-word-list .stage-filter-body {padding:4px 2px 8px;}
#studentLibrary .stage-word-list .stage-rule-line {
  display:block;
  border:0!important;
  padding:0!important;
  margin:0 0 5px!important;
}
#studentLibrary .stage-word-list .stage-rule-line .stage-line-name {
  display:block;
  margin:0 0 3px;
  font-weight:650;
}
#studentLibrary .stage-word-list .sl-filter-grid {gap:4px 14px;}
#studentLibrary .stage-word-list .sl-filter-grid>label {gap:1px;font-size:11px;color:#796469;}
#studentLibrary .stage-word-list .stage-picker-trigger {
  border:0;
  border-bottom:1px solid rgba(119,108,101,.37);
  background:transparent;
  min-height:27px;
  padding:2px 2px;
  color:#5b465f;
  font-size:11.5px;
}
#studentLibrary .stage-word-list .stage-feature-group legend {font-size:11px;}
#studentLibrary .stage-word-list .sl-features {gap:4px 6px;}
#studentLibrary .stage-word-list .sl-features label {min-height:26px;font-size:11px;}
#studentLibrary .stage-word-list .sl-features input {width:14px;height:14px;}
/* Thin grey region boundaries on paper, not another enclosing card. */
#studentLibrary .stage-word-list .stage-result-head {
  min-height:30px;
  padding:4px 0 3px;
  border-top:1px solid rgba(119,108,101,.45);
  border-bottom:1px solid rgba(119,108,101,.33);
}
#studentLibrary .stage-word-list .stage-result-head>b {font-size:14px;color:#533e5b;}
#studentLibrary .stage-word-list .stage-sort-picker {flex:0 1 125px;}
#studentLibrary .stage-word-list .stage-result-box {
  flex:1 1 0;
  min-height:0;
  height:auto;
  overflow:hidden;
}
#studentLibrary .stage-word-list .sl-results {
  flex:1 1 0;
  height:100%;
  max-height:none!important;
  min-height:0;
  overflow-y:auto;
  scrollbar-width:none;
  padding:0 4px 3px 0;
  touch-action:pan-y;
}
#studentLibrary .stage-word-list .stage-scroll-track {bottom:4px!important;}
#studentLibrary .stage-word-list .sl-list-record {
  height:61px;min-height:61px;
  border-bottom:1px solid rgba(126,111,104,.30);
}
@media(max-width:390px) {
  #studentLibrary .stage-word-list.sl-list {padding-left:22px;padding-right:22px;}
  #studentLibrary .stage-word-list .stage-quick>b {font-size:11px;}
  #studentLibrary .stage-word-list .stage-source-set button {padding-inline:5px;}
  #studentLibrary .stage-word-list .stage-heading-center {padding-inline:68px;}
}
@media(max-height:780px) {
  #studentLibrary .stage-word-list.sl-list {
    padding-top:calc(var(--paper-safe-top) + 52px);
    padding-bottom:calc(var(--paper-safe-bottom) + 58px);
  }
  #studentLibrary .stage-word-list .sl-heading {min-height:37px;}
  #studentLibrary .stage-word-list .stage-advanced[open] {max-height:29dvh;}
  #studentLibrary .stage-word-list .sl-list-record {height:54px;min-height:54px;}
}
/* Final polish: parchment scroll reaches the top safe edge, readable back label away from tassel. */
#studentLibrary .stage-word-list::before {
  top:calc(var(--paper-safe-top) - 20px);
}
#studentLibrary .stage-word-list .sl-heading>button {left:22px;}
#studentLibrary .stage-word-list .stage-heading-center h2 {font-size:20px;}

/* Entire row units fill the results viewport; no half row at the bottom of the default view. */
#studentLibrary .stage-word-list .sl-list-record {
  height:var(--wordlist-row-height,61px);min-height:var(--wordlist-row-height,61px);
}

/* V2: only search and student quick filters remain visible in the closed state. */
#studentLibrary .stage-word-list .sl-search {
  width:min(82%,336px);
  max-width:100%;
  align-self:center;
  margin:1px auto 5px;
  padding:0 3px;
}
#studentLibrary .stage-word-list .sl-search input {text-overflow:ellipsis;}
#studentLibrary .stage-word-list .stage-query {padding-top:4px;gap:1px;}
#studentLibrary .stage-word-list .stage-advanced {margin-top:3px;border-top:1px solid rgba(119,108,101,.32);}
#studentLibrary .stage-word-list .stage-advanced>summary {
  justify-content:center;
  min-height:29px;
  padding:3px 6px 4px;
}
#studentLibrary .stage-word-list .stage-advanced[open] {max-height:min(37dvh,325px);}
#studentLibrary .stage-word-list .stage-filter-body {padding:4px 3px 9px;}
#studentLibrary .stage-word-list .stage-advanced-section + .stage-advanced-section {
  margin-top:11px;
  padding-top:9px;
  border-top:1px solid rgba(122,98,93,.38);
}
#studentLibrary .stage-word-list .stage-advanced-section-title {
  padding:1px 0 6px;
  font:700 12px/1.3 var(--wordbook-ui-font),serif;
  color:#5d3c73;
  letter-spacing:.4px;
}
#studentLibrary .stage-word-list .stage-legacy-line {display:block;margin:0 0 8px;}
#studentLibrary .stage-word-list .stage-legacy-line .stage-line-name {
  display:block;margin:0 0 4px;font-size:11px;
}
#studentLibrary .stage-word-list .stage-legacy-line .stage-source-set {gap:0;justify-content:space-between;}
#studentLibrary .stage-word-list .stage-legacy-line .stage-source-set button {
  flex:1 1 0;min-width:0;padding:3px 1px;font-size:clamp(10px,2.5vw,11.5px);
}
#studentLibrary .stage-word-list .stage-original-grid {row-gap:8px;}
#studentLibrary .stage-word-list .stage-original-grid>label,
#studentLibrary .stage-word-list .stage-extra-filters .sl-filter-grid>label {font-size:11px;}
#studentLibrary .stage-word-list .stage-advanced .stage-picker-trigger {
  width:100%;text-align:left;min-height:31px;font-size:12px;
}
#studentLibrary .stage-word-list .stage-advanced .stage-picker-menu {
  z-index:60;max-height:156px;
}
#studentLibrary .stage-word-list .stage-date-field input {
  min-height:31px;width:100%;min-width:0;padding:2px 1px;
  color:#5b465f;background:transparent;border:0;border-bottom:1px solid rgba(119,108,101,.37);
  border-radius:0;font:12px/1.2 -apple-system,"PingFang SC",sans-serif;
}
#studentLibrary .stage-word-list .stage-extra-filters .stage-feature-group {margin-top:8px;}
#studentLibrary .stage-word-list .sl-features {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));column-gap:5px;row-gap:3px;}
#studentLibrary .stage-word-list .sl-features label {white-space:normal;font-size:11px;min-height:27px;}
#studentLibrary .stage-word-list .stage-feature-mode-label {grid-column:1/-1;gap:8px;}
#studentLibrary .stage-word-list .stage-feature-mode-label .stage-picker {max-width:173px;margin:0;}
#studentLibrary .stage-word-list .stage-sample-note {font:10px/1.4 -apple-system,"PingFang SC",sans-serif;color:#917b7c;padding:5px 0 0;}
#studentLibrary .stage-word-list .stage-result-sort-note {color:#816777;font:11px/1.2 -apple-system,"PingFang SC",sans-serif;white-space:nowrap;}
/* Balance word, detail and sound: the icon/chevron must not borrow the text column. */
#studentLibrary .stage-word-list .sl-list-record {gap:2px;}
#studentLibrary .stage-word-list .sl-list-record .sl-row {gap:5px;}
#studentLibrary .stage-word-list .sl-list-record .sl-row>.stage-word-main {flex:0 0 43%;}
#studentLibrary .stage-word-list .sl-list-record .sl-row>.stage-word-detail {flex:1 1 0;}
#studentLibrary .stage-word-list .sl-row-speak {flex:0 0 25px;width:25px;min-width:25px;min-height:38px;}
#studentLibrary .stage-word-list .sl-row-speak svg {width:19px;height:19px;}
#studentLibrary .stage-word-list .stage-row-chevron {flex:0 0 7px;min-width:7px;font-size:21px;}
#studentLibrary .stage-word-list .stage-row-number {flex-basis:23px;width:23px;}
#studentLibrary .stage-word-list .sl-results {padding-right:2px;}
@media(max-width:390px){
 #studentLibrary .stage-word-list .sl-search {width:85%;}
 #studentLibrary .stage-word-list .sl-list-record .sl-row>.stage-word-main {flex-basis:43%;}
 #studentLibrary .stage-word-list .stage-row-number {flex-basis:21px;width:21px;}
 #studentLibrary .stage-word-list .sl-row-speak {flex-basis:23px;width:23px;min-width:23px;}
 #studentLibrary .stage-word-list .sl-row-speak svg {width:18px;height:18px;}
}
@media(max-height:780px){
 #studentLibrary .stage-word-list .sl-search {min-height:34px;margin-bottom:3px;}
 #studentLibrary .stage-word-list .stage-advanced[open] {max-height:31dvh;}
}
/* The previous full-width input visually competed with the quick-filter rail. */
#studentLibrary .stage-word-list .sl-search {width:min(75%,302px);}
@media(max-width:390px){#studentLibrary .stage-word-list .sl-search{width:78%;}}
/* Make the advanced panel's independent scroll behavior discoverable. */
#studentLibrary .stage-word-list .stage-advanced[open] {scrollbar-width:thin;scrollbar-color:#a582b3 transparent;}
#studentLibrary .stage-word-list .stage-advanced[open]::-webkit-scrollbar {width:4px;}
#studentLibrary .stage-word-list .stage-advanced[open]::-webkit-scrollbar-thumb {background:#a582b3;border-radius:8px;}


/* --- wordlist_compact_unified_v3.css --- */
/* V3 - Single continuous filter list, compact two-column inline controls.
   This file changes only the isolated wordlist UI. It does not introduce a new query engine. */
#studentLibrary[data-view="list"] .stage-word-list .sl-heading {
  border-bottom:0!important;
  padding-bottom:3px;
}
/* Reuse the approved original gilded parchment component rather than stacking thin rules. */
#studentLibrary[data-view="list"] .stage-word-list .sl-search {
  box-sizing:border-box;
  position:relative;
  width:min(84%,322px)!important;
  max-width:100%;
  height:42px;
  min-height:42px;
  margin:4px auto 6px;
  padding:0 15px 0 16px;
  display:flex;
  align-items:center;
  border:0!important;
  border-radius:13px;
  background: url("./filter_panel_ornate_r21.b6a3105a39430cc5b.webp") center / 100% 100% no-repeat;
  box-shadow:0 2px 5px rgba(106,66,44,.085)!important;
  transition:filter .15s ease,box-shadow .15s ease;
}
#studentLibrary[data-view="list"] .stage-word-list .sl-search:focus-within {
  filter:drop-shadow(0 0 3px rgba(129,83,151,.23));
  box-shadow:0 2px 5px rgba(106,66,44,.085)!important;
}
#studentLibrary[data-view="list"] .stage-word-list .sl-search input {
  flex:1 1 0;min-width:0;height:37px;min-height:37px;
  border:0!important;outline:0!important;background:transparent!important;
  font-size:16px;color:#523c5a;padding-left:4px;box-shadow:none!important;
}
#studentLibrary[data-view="list"] .stage-word-list .sl-search input::placeholder {color:#9e867f;opacity:1;font-size:14px;}
#studentLibrary[data-view="list"] .stage-word-list .stage-search-icon {color:#856395;font-size:20px;flex:0 0 22px;}
/* Gentle separation by space and a small central label rather than full-width double borders. */
#studentLibrary[data-view="list"] .stage-word-list .stage-advanced {margin-top:3px;border-top:0!important;}
#studentLibrary[data-view="list"] .stage-word-list .stage-advanced>summary {
  width:max-content;min-height:28px;margin:0 auto;
  padding:4px 13px 3px;border-radius:14px;
  border:1px solid rgba(172,138,120,.26);
  background:rgba(251,232,197,.3);color:#6d517b;
  font-size:12px;gap:6px;
}
#studentLibrary[data-view="list"] .stage-word-list .stage-advanced>summary::before {
  content:'✧';color:#ac8b50;font:14px/1 Georgia,serif;margin-right:1px;
}
#studentLibrary[data-view="list"] .stage-word-list .stage-advanced>summary em {font-size:10.5px;color:#9b8290;}
#studentLibrary[data-view="list"] .stage-word-list .stage-advanced[open] {
  max-height:min(37dvh,350px);border:0;
  background:transparent;
}
#studentLibrary[data-view="list"] .stage-word-list .stage-filter-body {padding:4px 1px 10px;}
#studentLibrary[data-view="list"] .stage-word-list .stage-unified-filters {display:flex;flex-direction:column;gap:2px;}
#studentLibrary[data-view="list"] .stage-word-list .stage-legacy-line {
  display:flex!important;align-items:center;flex-wrap:nowrap;gap:4px;
  margin:0 0 4px!important;min-height:32px;
}
#studentLibrary[data-view="list"] .stage-word-list .stage-legacy-line .stage-line-name {
  flex:0 0 auto;margin:0!important;white-space:nowrap;
  color:#71566c;font-size:11px;letter-spacing:0;
}
#studentLibrary[data-view="list"] .stage-word-list .stage-legacy-line .stage-source-set {
  flex:1 1 0;display:flex;min-width:0;justify-content:space-between;gap:0;
}
#studentLibrary[data-view="list"] .stage-word-list .stage-legacy-line .stage-source-set button {
  flex:0 1 auto;min-width:0;min-height:30px;padding:4px 2px;
  font-size:clamp(10px,2.6vw,11.5px);white-space:nowrap;
}
#studentLibrary[data-view="list"] .stage-word-list .stage-original-grid {
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
  column-gap:11px;row-gap:3px;align-items:stretch;
}
#studentLibrary[data-view="list"] .stage-word-list .stage-original-grid>label {
  box-sizing:border-box;min-width:0;display:flex;
  flex-flow:row nowrap;align-items:center;justify-content:space-between;
  gap:3px;padding:0;height:35px;min-height:35px;
  color:#6f5769;font-size:11px;font-weight:550;white-space:nowrap;
}
#studentLibrary[data-view="list"] .stage-word-list .stage-original-grid>label[hidden] {display:none!important;}
#studentLibrary[data-view="list"] .stage-word-list .stage-original-grid>label>.stage-picker {
  flex:1 1 0;min-width:0;position:relative;max-width:none;
}
#studentLibrary[data-view="list"] .stage-word-list .stage-original-grid .stage-picker-trigger {
  min-width:0;width:100%;min-height:31px;height:31px;
  display:flex;justify-content:space-between;align-items:center;gap:3px;
  padding:1px 3px 1px 4px;
  border:0;border-bottom:1px solid rgba(141,113,101,.35);
  background:transparent;text-align:left;font-size:11px;
  color:#5e4569;
}
#studentLibrary[data-view="list"] .stage-word-list .stage-original-grid .stage-picker-trigger>span {
  flex:1 1 0;min-width:0;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;
}
#studentLibrary[data-view="list"] .stage-word-list .stage-original-grid .stage-picker-trigger i {
  flex:0 0 auto;font-size:12px;font-style:normal;margin:0;color:#9773a4;
}
#studentLibrary[data-view="list"] .stage-word-list .stage-original-grid .stage-picker-trigger:disabled {
  opacity:.52;cursor:not-allowed;
}
#studentLibrary[data-view="list"] .stage-word-list .stage-original-grid .stage-picker-menu {
  min-width:max(100%,154px);max-width:min(240px,76vw);
  font-size:12px;max-height:164px;overflow-y:auto;
}
#studentLibrary[data-view="list"] .stage-word-list .stage-date-field input {
  flex:1 1 0;min-width:0;width:auto!important;
  height:31px;min-height:31px;padding:0 2px;
  font-size:11px;border-bottom:1px solid rgba(141,113,101,.35);
}
#studentLibrary[data-view="list"] .stage-word-list .stage-feature-group {
  border:0;margin:5px 0 0;padding:0;
}
#studentLibrary[data-view="list"] .stage-word-list .stage-feature-group legend {
  padding:0 0 3px;color:#6f5769;font-size:11px;font-weight:600;
}
#studentLibrary[data-view="list"] .stage-word-list .sl-features {
  display:grid;grid-template-columns:repeat(2,minmax(0,1fr));
  gap:2px 8px;
}
#studentLibrary[data-view="list"] .stage-word-list .sl-features label {
  font-size:11px;min-height:28px;padding:2px 0;
  display:flex;align-items:center;gap:5px;
}
#studentLibrary[data-view="list"] .stage-word-list .sl-features label input {margin:0;flex:0 0 15px;width:15px;height:15px;}
#studentLibrary[data-view="list"] .stage-word-list .stage-feature-mode-label {
  grid-column:1/-1;display:flex!important;flex-flow:row nowrap;justify-content:flex-start;gap:6px;
  min-height:33px;
}
#studentLibrary[data-view="list"] .stage-word-list .stage-feature-mode-label>.stage-picker {flex:0 0 150px;width:150px;max-width:none;}
#studentLibrary[data-view="list"] .stage-word-list .stage-reset {margin:6px 0 0;}
/* Decorative page already has a rim; make the result separator the only clear horizontal rule. */
#studentLibrary[data-view="list"] .stage-word-list .stage-result-head {
  border-top:1px solid rgba(137,106,96,.34);
  border-bottom:0;
  padding-top:5px;
}
@media (max-width:389px){
  #studentLibrary[data-view="list"] .stage-word-list .stage-original-grid{gap:3px 6px;}
  #studentLibrary[data-view="list"] .stage-word-list .stage-legacy-line {flex-wrap:wrap;}
  #studentLibrary[data-view="list"] .stage-word-list .stage-legacy-line .stage-source-set {flex-basis:100%;}
  #studentLibrary[data-view="list"] .stage-word-list .stage-original-grid>label {font-size:10.3px;}
}
@media (max-height:780px){
  #studentLibrary[data-view="list"] .stage-word-list .stage-advanced[open] {max-height:31dvh;}
  #studentLibrary[data-view="list"] .stage-word-list .sl-search {min-height:40px;height:40px;margin:2px auto 4px;}
}


/* --- wordlist_feature_markers_v6.css --- */
/* V6: project-style mini wand/feather SVG icons in a slim aid column; no backgrounds or frames. */
#studentLibrary[data-view="list"] .stage-word-list .stage-feature-group {
  border:0!important;margin:5px 0 0!important;padding:0!important;min-width:0;
}
#studentLibrary[data-view="list"] .stage-word-list .stage-feature-group legend {
  box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;
  width:100%;padding:0 0 3px;margin:0;color:#6f5769;font-size:11px;font-weight:650;
}
#studentLibrary[data-view="list"] .stage-word-list .stage-feature-mode-label {
  display:inline-flex;align-items:center;gap:4px;white-space:nowrap;color:#8a7181;font-size:9.5px;font-weight:500;
}
#studentLibrary[data-view="list"] .stage-word-list .stage-feature-mode-label .stage-picker {width:112px;max-width:112px;min-width:0;position:relative;}
#studentLibrary[data-view="list"] .stage-word-list .stage-feature-mode-label .stage-picker-trigger {
  width:100%;height:25px;min-height:25px;padding:0 3px;border:0;border-bottom:1px solid rgba(141,113,101,.35);
  background:transparent;color:#5e4569;font-size:9.5px;
}
#studentLibrary[data-view="list"] .stage-word-list .stage-feature-mode-label .stage-picker-trigger>span {overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0;}
#studentLibrary[data-view="list"] .stage-word-list .sl-features {
  display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;
  grid-template-rows:repeat(2,minmax(25px,auto));gap:1px 6px!important;align-items:center;min-width:0;
}
#studentLibrary[data-view="list"] .stage-word-list .sl-features label {
  box-sizing:border-box;display:flex;align-items:center;gap:4px;min-width:0;min-height:25px;padding:1px 0;white-space:nowrap;font-size:10.5px;line-height:1.15;color:#715d68;
}
#studentLibrary[data-view="list"] .stage-word-list .sl-features label input {flex:0 0 14px;width:14px;height:14px;margin:0;accent-color:#8963a2;}
#studentLibrary[data-view="list"] .stage-word-list .sl-list-record .stage-word-detail {gap:1px!important;justify-content:center;min-width:0;}
#studentLibrary[data-view="list"] .stage-word-list .stage-word-meaning {line-height:1.15;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
#studentLibrary[data-view="list"] .stage-word-list .stage-word-sub {min-height:12px;flex-wrap:nowrap;gap:2px 4px;overflow:hidden;}
#studentLibrary[data-view="list"] .stage-word-list .stage-aid-markers {
  flex:0 0 16px;width:16px;min-width:16px;align-self:center;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;padding:0;margin-left:1px;margin-right:1px;
}
#studentLibrary[data-view="list"] .stage-word-list .stage-aid-markers[hidden] {display:none!important;}
#studentLibrary[data-view="list"] .stage-word-list .stage-aid-icon {display:inline-flex;align-items:center;justify-content:center;width:13px;height:13px;line-height:1;color:#8a6586;filter:drop-shadow(0 .35px 0 rgba(255,255,255,.55));}
#studentLibrary[data-view="list"] .stage-word-list .stage-aid-icon.tip {color:#9a7441;}
#studentLibrary[data-view="list"] .stage-word-list .stage-aid-icon.memo {color:#7b5b94;}
#studentLibrary[data-view="list"] .stage-word-list .stage-aid-icon svg {width:13px;height:13px;display:block;overflow:visible;}
#studentLibrary[data-view="list"] .stage-word-list .stage-aid-icon.tip svg .wand-core {fill:none;stroke:#9a7441;stroke-width:1.35;stroke-linecap:round;stroke-linejoin:round;}
#studentLibrary[data-view="list"] .stage-word-list .stage-aid-icon.tip svg .wand-star-fill {fill:#f4e1a8;stroke:none;}
#studentLibrary[data-view="list"] .stage-word-list .stage-aid-icon.tip svg .wand-star-line {fill:none;stroke:#c79a45;stroke-width:1.1;stroke-linecap:round;stroke-linejoin:round;}
#studentLibrary[data-view="list"] .stage-word-list .stage-aid-icon.tip svg .wand-spark {fill:none;stroke:#c89e56;stroke-width:.95;stroke-linecap:round;stroke-linejoin:round;}
#studentLibrary[data-view="list"] .stage-word-list .stage-aid-icon.memo svg .feather-line {fill:none;stroke:#7b5b94;stroke-width:1.2;stroke-linecap:round;stroke-linejoin:round;}
#studentLibrary[data-view="list"] .stage-word-list .stage-aid-icon.memo svg .feather-fill {fill:#e6d9f0;stroke:none;opacity:.9;}
#studentLibrary[data-view="list"] .stage-word-list .stage-aid-icon.memo svg .feather-quill {fill:none;stroke:#a67f61;stroke-width:1.05;stroke-linecap:round;stroke-linejoin:round;}
#studentLibrary .stage-word-list .sl-list-record {gap:2px;}
#studentLibrary .stage-word-list .sl-list-record .sl-row {gap:5px;}
#studentLibrary .stage-word-list .sl-list-record .sl-row>.stage-word-main {flex:0 0 43%;}
#studentLibrary .stage-word-list .sl-list-record .sl-row>.stage-word-detail {flex:1 1 0;}
#studentLibrary .stage-word-list .sl-row-speak {flex:0 0 25px;width:25px;min-width:25px;min-height:38px;}
#studentLibrary .stage-word-list .sl-row-speak svg {width:19px;height:19px;}
#studentLibrary .stage-word-list .stage-row-chevron {flex:0 0 7px;min-width:7px;font-size:21px;}
#studentLibrary .stage-word-list .stage-row-number {flex-basis:23px;width:23px;}
#studentLibrary .stage-word-list .sl-results {padding-right:2px;}
@media(max-width:390px){
 #studentLibrary .stage-word-list .sl-search {width:85%;}
 #studentLibrary .stage-word-list .sl-list-record .sl-row>.stage-word-main {flex-basis:43%;}
 #studentLibrary .stage-word-list .stage-row-number {flex-basis:21px;width:21px;}
 #studentLibrary .stage-word-list .stage-aid-markers {flex-basis:15px;width:15px;min-width:15px;}
 #studentLibrary .stage-word-list .stage-aid-icon {width:12px;height:12px;}
 #studentLibrary .stage-word-list .stage-aid-icon svg {width:12px;height:12px;}
 #studentLibrary .stage-word-list .sl-row-speak {flex-basis:23px;width:23px;min-width:23px;}
 #studentLibrary .stage-word-list .sl-row-speak svg {width:18px;height:18px;}
}
@media(max-height:780px){
  #studentLibrary[data-view="list"] .stage-word-list .stage-feature-group {margin-top:3px!important;}
  #studentLibrary[data-view="list"] .stage-word-list .sl-features {grid-template-rows:repeat(2,minmax(23px,auto));}
  #studentLibrary[data-view="list"] .stage-word-list .sl-features label {min-height:23px;}
}


/* --- wordlist_tip_memo_v7.css --- */
/* Student list V7: the two artistic vector marks have their own slim column. */
#studentLibrary[data-view="list"] .stage-word-list .stage-aid-markers {
  flex:0 0 17px!important; width:17px!important; min-width:17px!important;
  display:flex!important; flex-direction:column; align-items:center;
  justify-content:center; align-self:center; gap:1px;
  padding:0!important; margin:0 1px!important; background:none!important;
  border:0!important; box-shadow:none!important; border-radius:0!important;
}
#studentLibrary[data-view="list"] .stage-word-list .stage-aid-icon {
  display:flex; align-items:center; justify-content:center; width:17px; height:17px;
  background:none!important; border:0!important; border-radius:0!important;
  box-shadow:none!important; filter:none!important; padding:0!important;
}
#studentLibrary[data-view="list"] .stage-word-list .stage-aid-icon img {
  width:17px; height:17px; object-fit:contain;display:block;
  background:transparent; border:0; box-shadow:none;
}
#studentLibrary[data-view="list"] .stage-word-list .sl-list-record .stage-word-detail {
  gap:1px!important; justify-content:center;
}
#studentLibrary[data-view="list"] .stage-word-list .sl-list-record .stage-word-sub {flex-wrap:nowrap;}
@media(max-width:390px) {
 #studentLibrary[data-view="list"] .stage-word-list .stage-aid-markers {flex-basis:16px!important;width:16px!important;min-width:16px!important;}
 #studentLibrary[data-view="list"] .stage-word-list .stage-aid-icon {width:16px;height:16px;}
 #studentLibrary[data-view="list"] .stage-word-list .stage-aid-icon img {width:16px;height:16px;}
}


/* --- wordlist_shelf_layout_v9.css --- */
/* 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;}
}


/* --- wordlist_layout_v11.css --- */
/* V10 scope: 12 confirmed V9 follow-ups. Keep shelf graphics and R17 semantics untouched. */
#studentLibrary[data-view="list"] .stage-word-list .stage-heading-center h2 {
  white-space:nowrap;
}
/* Current effective conditions: one clear line, above the compact shortcuts. */
#studentLibrary[data-view="list"] .stage-word-list .stage-active-filters {
  display:block;box-sizing:border-box;flex:0 0 auto;width:100%;min-width:0;
  margin:0;padding:2px 5px 1px;min-height:19px;
  font:500 10.5px/16px -apple-system,BlinkMacSystemFont,'PingFang SC',sans-serif;
  color:#856c7f;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;
}
/* 5 visible of 7 presets; all seven remain selectable from advanced quick picker. */
#studentLibrary[data-view="list"] .stage-word-list .stage-quick-set {
  display:grid!important;grid-template-columns:repeat(5,minmax(0,1fr))!important;
  gap:0!important;padding:0!important;width:100%;align-items:stretch;
}
#studentLibrary[data-view="list"] .stage-word-list .stage-quick-line {
  min-height:26px!important;height:26px;max-height:26px;padding:0!important;
}
#studentLibrary[data-view="list"] .stage-word-list .stage-quick {
  min-height:26px!important;height:26px!important;padding:2px 0 1px!important;
}
#studentLibrary[data-view="list"] .stage-word-list .stage-quick>b {
  font-size:clamp(10.4px,2.66vw,12px)!important;letter-spacing:-.16px;
}
/* No more nested scrolling in the filters. Let the results be the scroll region. */
#studentLibrary[data-view="list"] .stage-word-list .stage-advanced[open] {
  display:block!important;overflow:visible!important;
  max-height:none!important;height:auto!important;min-height:0!important;
  margin:0!important;padding:0!important;border:0!important;
  scrollbar-width:none!important;overscroll-behavior:auto!important;
}
#studentLibrary[data-view="list"] .stage-word-list .stage-filter-body {
  padding:1px 2px 3px!important;
}
#studentLibrary[data-view="list"] .stage-word-list .stage-unified-filters {gap:0!important;}
#studentLibrary[data-view="list"] .stage-word-list .stage-legacy-line {
  min-height:27px!important;height:27px!important;margin:0 0 1px!important;
}
#studentLibrary[data-view="list"] .stage-word-list .stage-legacy-line .stage-source-set button {
  min-height:25px!important;padding-block:2px!important;
}
#studentLibrary[data-view="list"] .stage-word-list .stage-original-grid {
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:0 9px!important;align-items:stretch;
}
#studentLibrary[data-view="list"] .stage-word-list .stage-original-grid>label {
  min-width:0!important;height:27px!important;min-height:27px!important;
  gap:3px!important;font-size:10.5px!important;
}
#studentLibrary[data-view="list"] .stage-word-list .stage-original-grid>label>.stage-picker {
  flex:1 1 0!important;max-width:none!important;min-width:0!important;
}
#studentLibrary[data-view="list"] .stage-word-list .stage-original-grid .stage-picker-trigger {
  height:26px!important;min-height:26px!important;padding:1px 2px 1px 3px!important;
  box-sizing:border-box;font-size:10.5px!important;
}
#studentLibrary[data-view="list"] .stage-word-list .stage-date-field input {
  height:25px!important;min-height:25px!important;font-size:10.5px!important;
}
/* The six existing feature filters still have independent checkboxes. */
#studentLibrary[data-view="list"] .stage-word-list .stage-feature-group {
  margin:2px 0 0!important;padding:0!important;
}
#studentLibrary[data-view="list"] .stage-word-list .stage-feature-group legend {
  padding:0 0 1px!important;min-height:25px;
}
#studentLibrary[data-view="list"] .stage-word-list .stage-feature-mode-label {
  min-height:24px!important;gap:4px!important;
}
#studentLibrary[data-view="list"] .stage-word-list .stage-feature-mode-label>.stage-picker {
  flex:0 0 108px!important;width:108px!important;max-width:108px!important;
}
#studentLibrary[data-view="list"] .stage-word-list .stage-feature-mode-label .stage-picker-trigger {
  height:23px!important;min-height:23px!important;
}
#studentLibrary[data-view="list"] .stage-word-list .sl-features {
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  grid-template-rows:repeat(2,22px)!important;
  gap:1px 4px!important;margin:0!important;
}
#studentLibrary[data-view="list"] .stage-word-list .sl-features label {
  min-height:22px!important;height:22px!important;font-size:10px!important;
}
#studentLibrary[data-view="list"] .stage-word-list .sl-features label input {
  flex:0 0 13px!important;width:13px!important;height:13px!important;
}
#studentLibrary[data-view="list"] .stage-word-list .stage-filter-actions {
  min-height:27px!important;height:27px!important;
}
#studentLibrary[data-view="list"] .stage-word-list .stage-filter-actions button {
  min-height:27px!important;height:27px!important;
}
#studentLibrary[data-view="list"] .stage-word-list .stage-result-head {
  min-height:30px!important;padding:2px 0 2px!important;
}
#studentLibrary[data-view="list"] .stage-word-list .stage-result-head>b {
  flex:1 1 auto;min-width:0;
}
/* Only one sorting control remains, and it now lives next to the results. */
#studentLibrary[data-view="list"] .stage-word-list .stage-result-head .stage-sort-picker {
  flex:0 1 108px;min-width:0;max-width:125px;
}
#studentLibrary[data-view="list"] .stage-word-list .stage-result-head .stage-sort-picker .stage-picker-trigger {
  height:27px;min-height:27px;width:100%;gap:2px;
  padding:2px 0 2px 1px!important;font-size:10.5px;
  border:0!important;background:transparent;
}
#studentLibrary[data-view="list"] .stage-word-list .stage-result-head .stage-sort-picker .stage-picker-trigger>span {
  flex:1 1 0;text-align:right;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;
}
/* The trigger never forces its parent grid over-width; popup menu uses measured width instead. */
#studentLibrary[data-view="list"] .stage-word-list .stage-original-grid .stage-picker-menu {
  min-width:0!important;max-width:none!important;
}
/* A document-level portal is mandatory: position:fixed inside a clipped parent is not enough. */
body > .stage-picker-menu.stage-picker-popup {
  position:fixed!important;z-index:2147483000!important;
  box-sizing:border-box;min-width:0!important;
  overflow-x:hidden!important;overflow-y:auto!important;
  margin:0!important;padding:4px!important;
  border:1px solid #c8a575!important;border-radius:10px!important;
  background:#fff0d4!important;box-shadow:0 5px 15px #2c183b38!important;
  overscroll-behavior:contain;-webkit-overflow-scrolling:touch;touch-action:pan-y;
}
body > .stage-picker-menu.stage-picker-popup[hidden] {display:none!important;}
body > .stage-picker-menu.stage-picker-popup button {
  box-sizing:border-box;display:block;width:100%;min-height:32px;
  padding:6px 8px;border:0!important;border-radius:6px;
  background:transparent;color:#563b60;font:500 12px/18px -apple-system,BlinkMacSystemFont,'PingFang SC',sans-serif;
  text-align:left;white-space:nowrap;box-shadow:none;
}
body > .stage-picker-menu.stage-picker-popup button[hidden] {display:none!important;}
body > .stage-picker-menu.stage-picker-popup button:focus-visible,
body > .stage-picker-menu.stage-picker-popup button:active {background:#ead8ed;outline:none;}
/* Move the meaningful art markers 4px left; preserve sound button and tap target. */
#studentLibrary[data-view="list"] .stage-word-list .stage-aid-markers {
  transform:translateX(-4px);
}
@media(max-height:780px){
  #studentLibrary[data-view="list"] .stage-word-list .stage-quick {min-height:25px!important;height:25px!important;}
  #studentLibrary[data-view="list"] .stage-word-list .stage-active-filters {min-height:18px;font-size:10px;}
  #studentLibrary[data-view="list"] .stage-word-list .stage-advanced[open] {max-height:none!important;}
}
@media(max-width:370px){
  #studentLibrary[data-view="list"] .stage-word-list .stage-quick>b {font-size:10px!important;}
  #studentLibrary[data-view="list"] .stage-word-list .stage-original-grid {column-gap:5px!important;}
  #studentLibrary[data-view="list"] .stage-word-list .stage-original-grid>label {font-size:10px!important;gap:2px!important;}
}

/* V11: let five full labels keep their natural width; distribute only free space. */
#studentLibrary[data-view="list"] .stage-word-list .stage-quick-set {
  display:flex!important;flex-flow:row nowrap!important;
  grid-template-columns:none!important;justify-content:space-between!important;
  align-items:center!important;gap:0!important;width:100%;
}
#studentLibrary[data-view="list"] .stage-word-list .stage-quick {
  display:inline-flex!important;flex:0 0 auto!important;width:auto!important;
  min-width:0!important;padding:2px 4px 1px!important;
}
#studentLibrary[data-view="list"] .stage-word-list .stage-quick>b {
  white-space:nowrap;font-size:clamp(11px,2.85vw,12.2px)!important;
  letter-spacing:0!important;
}
@media(max-width:350px){
 #studentLibrary[data-view="list"] .stage-word-list .stage-quick {padding-inline:1px!important;}
 #studentLibrary[data-view="list"] .stage-word-list .stage-quick>b {font-size:10.7px!important;}
}
/* V11 popup: six-CJK-glyph base; all finite options visible without scroll. */
body > .stage-picker-menu.stage-picker-popup {
 min-width:0!important;max-height:none;
 overflow-x:hidden!important;overscroll-behavior:contain;
}
body > .stage-picker-menu.stage-picker-popup button {
 min-height:34px;height:34px;line-height:20px;padding:6px 10px;
 white-space:nowrap;
}

/* Extra-narrow preview: preserve course picker label and trigger readability. */
@media(max-width:355px){
 #studentLibrary[data-view="list"] .stage-word-list .stage-original-grid>label.stage-section-field {font-size:9.2px!important;gap:1px!important;}
 #studentLibrary[data-view="list"] .stage-word-list .stage-original-grid>label.stage-section-field .stage-picker-trigger {font-size:9.6px!important;padding-left:1px!important;}
}


/* --- wordlist_fullbleed_spacing_v12.css --- */
/* V12: two isolated changes only: shared full-screen night canvas, list right-side spacing. */
/* The background is drawn once at the document root; no separately colored safe-area strip. */
html {
  background-color:#251553!important;
  background-image:url("./starfield_bg.b6a3105a39430cc5b.webp")!important;
  background-position:center center!important;
  background-size:cover!important;
  background-repeat:no-repeat!important;
}
body {
  background-color:transparent!important;
  background-image:none!important;
}
#host {background:transparent!important;}
#studentLibrary {
  background-color:transparent!important;
  background-image:none!important;
  /* Keep the original safe-area padding: only content, not the background, is inset. */
}
/* Do not alter the paper and bookshelf art or their safe-area based content positions. */
/* Separate the row controls from the decorative custom scrollbar. */
#studentLibrary[data-view="list"] .stage-word-list .sl-results {
  padding-right:15px!important; /* V11 was 5px: gain 10px beside the track. */
}
#studentLibrary[data-view="list"] .stage-word-list .sl-row-speak {
  margin-right:4px!important; /* Visible breathing room before the chevron. */
}
#studentLibrary[data-view="list"] .stage-word-list .stage-row-chevron {
  flex:0 0 10px!important;
  min-width:10px!important;
}
/* Preserve custom scroll track at its existing x position. */


/* R17 bridge controls remain in the DOM for the existing controller/tests; the visible UI is the custom picker. */
#studentLibrary[data-view="list"] .sl-r17-bridge-select{
 position:absolute!important;width:1px!important;height:1px!important;min-width:1px!important;min-height:1px!important;
 margin:-1px!important;padding:0!important;border:0!important;clip:rect(0 0 0 0)!important;clip-path:inset(50%)!important;
 overflow:hidden!important;white-space:nowrap!important;opacity:0!important;pointer-events:none!important;
}
/* Current design: query mode is not a second visual card. Keep R17 mode buttons only as an accessibility/controller bridge. */
#studentLibrary[data-view="list"] .sl-query-modes{display:none!important}
/* External filter toolbar from the confirmed UI. */
#studentLibrary[data-view="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-filter-actions button{box-sizing:border-box;display:inline-flex;align-items:center;justify-content:center;gap:5px;min-height:31px;padding:3px 5px;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;color:#69457a;font:650 11.5px/1.25 -apple-system,BlinkMacSystemFont,'PingFang SC',sans-serif}
#studentLibrary[data-view="list"] .stage-filter-actions .stage-more-toggle{justify-content:flex-start;padding-left:2px}
#studentLibrary[data-view="list"] .stage-filter-actions .stage-more-toggle em{font-size:10px;font-weight:450;font-style:normal;color:#8b7790}
#studentLibrary[data-view="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-advanced:not([open]){display:none!important}
#studentLibrary[data-view="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-advanced>summary{display:none!important}
#studentLibrary[data-view="list"] .stage-filter-body{padding:3px 3px 9px!important}
#studentLibrary[data-view="list"] .stage-legacy-line .stage-source-set{justify-content:flex-start;gap:10px}
#studentLibrary[data-view="list"] .stage-legacy-line .stage-source-set button{flex:0 1 auto;min-width:56px;padding-inline:8px}
/* The custom popup is portaled to body so the filter scroller cannot clip it. */
body > .stage-picker-menu.stage-picker-popup{position:fixed!important;z-index:2147483000!important;box-sizing:border-box;min-width:0!important;overflow-x:hidden!important;overflow-y:auto!important;margin:0!important;padding:4px!important;border:1px solid #c8a575!important;border-radius:10px!important;background:#fff0d4!important;box-shadow:0 5px 15px #2c183b38!important;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;touch-action:pan-y}
body > .stage-picker-menu.stage-picker-popup[hidden]{display:none!important}
body > .stage-picker-menu.stage-picker-popup button{box-sizing:border-box;display:block;width:100%;min-height:34px;height:34px;padding:6px 10px;border:0!important;border-radius:6px;background:transparent;color:#563b60;font:500 12px/20px -apple-system,BlinkMacSystemFont,'PingFang SC',sans-serif;text-align:left;white-space:nowrap;box-shadow:none}
body > .stage-picker-menu.stage-picker-popup button[aria-selected="true"]{background:#ead8ed;color:#4e2f67;font-weight:700}
body > .stage-picker-menu.stage-picker-popup button:focus-visible,body > .stage-picker-menu.stage-picker-popup button:active{background:#ead8ed;outline:none}
#studentLibrary[data-view="list"] .stage-aid-markers{transform:translateX(-4px)}
@media(max-height:780px){#studentLibrary[data-view="list"] .stage-filter-actions{min-height:28px}#studentLibrary[data-view="list"] .stage-filter-actions button{min-height:28px}#studentLibrary[data-view="list"] .stage-advanced[open]{max-height:29dvh!important}}
