/* Owner-approved menu R5. Scoped to the menu; no global palette migration. */
.page.library-order-page { --menu-deep:#2D125F; --menu-purple:#6C4CF1; --menu-ink:#28252D; --menu-muted:#666; background:#FAF8F5; color:var(--menu-ink); padding:0 16px 104px; }
.library-order-page .safe-top { height:env(safe-area-inset-top, 0px); }
.library-task-nav {height:54px; display:grid; grid-template-columns:44px 1fr 44px; align-items:center; margin:0 -8px 14px;}
.library-task-nav strong {text-align:center; font-size:19px; font-weight:600; overflow-wrap:anywhere;}
.library-task-nav button {width:44px; height:44px; border:0; background:none; color:var(--menu-ink); display:grid; place-items:center;}
.library-task-nav svg {width:24px; height:24px; fill:none; stroke:currentColor; stroke-width:1.8;}
.library-order-page .library-order-header {min-height:60px; display:flex; align-items:center; justify-content:space-between; gap:12px; margin:0; padding:0;}
.library-order-page .library-order-header h1 {margin:0; font-size:28px; font-weight:600; letter-spacing:-.5px;}
.library-order-page .chef-status-top {display:flex; align-items:center; gap:8px; min-height:48px; padding:5px 10px; border:1px solid #EEE6DF; border-radius:12px; background:#fff; color:var(--menu-ink); box-shadow:none; flex-shrink:0;}
.library-order-page button.chef-status-top::after {content:'⌄'; color:var(--menu-purple); font-size:14px;}
.library-order-page .chef-status-top-mark {width:28px; height:28px; border-radius:50%; display:grid; place-items:center; background:#F2EEFF; color:var(--menu-deep); font-size:13px;}
.library-order-page .chef-status-top-copy {display:flex; flex-direction:column; gap:0; text-align:left;}
.library-order-page .chef-status-top-copy small {color:var(--menu-muted); font-size:12px; line-height:17px;}
.library-order-page .chef-status-top-copy b {font-size:14px; font-weight:500; line-height:20px;}
.library-context-tools {display:grid; grid-template-columns:68px repeat(4,minmax(0,1fr)); height:74px; margin-top:12px; background:#fff; border:1px solid #F0ECE7; border-radius:16px; box-shadow:0 3px 12px #28252d05; overflow:hidden;}
.library-context-tools button {position:relative; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:7px; padding:0; min-width:0; color:var(--menu-ink); background:none; border:0; font-size:14px; font-weight:400;}
.library-context-tools img {width:24px; height:24px;}
.library-search-toggle::after {content:''; position:absolute; right:0; top:18px; bottom:18px; width:1px; background:#EEE6DF;}
.library-search-toggle.is-open {background:#F5F1FF;}
.library-context-tools button.is-active {color:var(--menu-purple); background:#F5F1FF; font-weight:600;}
.library-search-expanded {display:flex; gap:10px; height:48px; margin-top:12px;}
.library-order-page .library-search-expanded .library-order-search {display:flex; align-items:center; gap:9px; flex:1; min-width:0; min-height:48px; height:48px; margin:0; padding:0 12px; background:#fff; border:1px solid #EEE6DF; border-radius:12px; box-shadow:none;}
.library-search-expanded img {width:18px; height:18px; opacity:.7;}
.library-order-page .library-search-expanded input {padding:0; width:100%; min-width:0; border:0; outline:0; background:none; font-size:15px; color:var(--menu-ink);}
.library-search-expanded input::placeholder {color:var(--menu-muted);}
.library-search-expanded > button {min-width:44px; padding:0; border:0; background:none; color:#4F35C8; font-size:14px;}
.library-order-page .library-category-heading {display:flex; align-items:center; justify-content:space-between; height:54px; margin:12px 0 0; padding:0;}
.library-order-page .library-category-heading b {font-size:13px; font-weight:400; color:var(--menu-muted);}
.library-order-page .library-manage-button {min-height:44px; padding:0 8px; border:0; border-radius:0; color:#4F35C8; background:none; box-shadow:none; font-size:14px; font-weight:400;}
.library-order-page .library-order-layout {display:grid; grid-template-columns:72px minmax(0,1fr); align-items:start; gap:12px; margin:0; padding:0;}
.library-order-page .library-order-sidebar {position:static; display:flex; flex-direction:column; align-items:center; gap:3px; padding:0; background:none; width:auto;}
.library-order-page .library-order-category {width:100%; min-height:66px; padding:6px 0; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:6px; color:var(--menu-muted); background:none; border:0; border-radius:14px; touch-action:pan-y;}
.library-order-page .sorter-open [data-library-category-drag] {touch-action:none; outline:1px dashed #BCAEF0;}
.library-order-page .library-order-category b {font-size:12px; font-weight:400; line-height:18px;}
.library-order-page .library-order-category img,.library-order-page .library-sidebar-icon {width:26px; height:26px; border-radius:8px;}
.library-order-page .library-order-category.active {color:var(--menu-purple); background:#F0ECFF; box-shadow:inset 3px 0 var(--menu-purple);}
.library-order-page .library-order-category.active b {font-weight:600;}
.library-order-page .library-order-category-add {align-self:center; min-height:54px; width:54px; margin-top:5px; padding:0; border:1px dashed #BCAEF0; border-radius:14px; background:#FAF8FF; color:var(--menu-purple); font-size:24px;}
.library-reorder-button {min-height:54px; width:100%; margin-top:5px; display:flex; flex-direction:column; align-items:center; justify-content:center; gap:5px; padding:0; border:0; background:none; color:var(--menu-muted); font-size:12px;}
.library-reorder-button img {width:20px; height:20px;}
.library-order-page .library-order-list-heading {height:32px; display:flex; align-items:center; justify-content:space-between; margin:0 0 8px; padding:0;}
.library-order-page .library-order-list-heading h2 {margin:0; font-size:20px; line-height:28px; font-weight:600;}
.library-order-page .library-order-list-heading > span {font-size:13px; color:var(--menu-muted);}
.library-order-page .library-order-content {min-width:0; padding:0;}
.library-order-page .library-order-list {display:block; margin:0; padding:0;}
.library-order-page .library-order-card {display:grid; grid-template-columns:42% minmax(0,1fr); min-height:160px; margin:0 0 12px; padding:0; overflow:hidden; border:0; border-radius:17px; background:#fff; box-shadow:0 3px 12px #28252d06;}
.library-order-page .library-order-photo {width:100%; height:100%; min-height:160px; margin:0; padding:0; border:0; border-radius:0; overflow:hidden;}
.library-order-page .library-order-photo img {width:100%; height:100%; position:absolute; inset:0; object-fit:cover;}
.library-order-page .library-order-copy {display:block; min-width:0; padding:12px 10px 10px;}
.library-order-page .library-order-title-row {display:flex; align-items:flex-start; justify-content:space-between; gap:4px;}
.library-order-page .library-order-copy h3 {margin:0; font-size:16px; line-height:23px; font-weight:600; letter-spacing:-.3px; overflow-wrap:anywhere;}
.library-want-count {flex:none; padding-top:3px; color:#B95013; font-size:12px; white-space:nowrap;}
.library-order-page .library-order-card .tag-row {display:flex; flex-wrap:wrap; gap:4px; margin:8px 0 0;}
.library-order-page .library-order-card .tag {padding:1px 5px; border-radius:6px; background:#F1EDFF; color:var(--menu-purple); font-size:12px; line-height:18px; font-weight:400;}
.library-order-page .library-order-source {margin:8px 0; color:var(--menu-muted); font-size:12px; line-height:18px;}
.library-order-page .library-order-actions {display:grid; grid-template-columns:1fr 1fr; gap:6px; margin:0;}
.library-order-page .library-menu-action {min-height:44px; padding:0 3px; border:0; border-radius:10px; font-size:12px; font-weight:600;}
.library-order-page .library-menu-action.want {color:#B95013; background:#FFF0E4;}
.library-order-page .library-menu-action.cook {color:var(--menu-purple); background:#F1EDFF;}
.library-order-page .library-menu-action.active {box-shadow:inset 0 0 0 2px currentColor;}
.library-order-page .library-order-manage-hint {font-size:12px;}
.library-order-page .library-order-card.manage-selected {box-shadow:0 0 0 2px var(--menu-purple);}
.library-order-page .library-secondary-filters button {font-size:12px; min-height:44px;}
.library-order-page .bottom-nav {box-shadow:none; background:#fff;}
.library-order-page .bottom-nav .nav-item {font-size:12px;}
.library-order-page .bottom-nav .nav-item.active {color:var(--menu-purple);}
.library-order-page .bottom-nav .nav-add strong {background:#FF8A34; box-shadow:none;}

.library-equipment-backdrop {position:fixed; inset:0; z-index:160; display:flex; align-items:flex-end; justify-content:center; background:rgba(40,37,45,.42);}
.library-equipment-sheet {position:relative; width:min(100%,520px); max-height:86vh; display:flex; flex-direction:column; overflow:hidden; border-radius:24px 24px 0 0; background:#fff; color:var(--menu-ink,#28252D); box-shadow:0 -12px 34px rgba(45,18,95,.12);}
.library-equipment-handle {position:absolute; z-index:1; top:10px; left:50%; width:40px; height:4px; margin-left:-20px; border-radius:999px; background:#D8D1DC;}
.library-equipment-head {min-height:72px; display:flex; flex:none; align-items:center; justify-content:space-between; padding:12px 12px 6px 22px; border-bottom:1px solid #EEE6DF; background:#fff;}
.library-equipment-head > div {display:flex; align-items:center; gap:9px; min-width:0;}
.library-equipment-head img {width:24px; height:24px;}
.library-equipment-head h2 {margin:0; font-size:20px; line-height:1.4;}
.library-equipment-head span {padding:4px 8px; border-radius:8px; color:#8A5A32; background:#FFF0E4; font-size:12px; white-space:nowrap;}
.library-equipment-head button {width:44px; height:44px; flex:none; border:0; background:none; color:#514B5E; font-size:25px;}
.library-equipment-body {flex:1; min-height:0; overflow-y:auto; overscroll-behavior:contain; padding:18px 22px 24px;}
.library-equipment-loading {min-height:320px; display:flex; align-items:center; justify-content:center; flex-direction:column; gap:8px; color:#655E6C;}
.library-equipment-loading b {color:#28252D; font-size:16px;}
.library-equipment-loading span {font-size:13px;}
.library-equipment-error {margin:0 0 12px; padding:11px 12px; border-radius:12px; color:#A83D32; background:#FFF2F0; font-size:13px;}
.library-equipment-intro {display:grid; gap:5px;}
.library-equipment-intro b {font-size:18px;}
.library-equipment-intro span {color:#655E6C; font-size:13px; line-height:1.55;}
.library-equipment-status {display:flex; align-items:center; min-height:70px; margin:14px 0 16px; padding:12px 14px; box-sizing:border-box; border:1px solid #E5DAFF; border-radius:14px; background:#FAF8FF;}
.library-equipment-status > div {display:grid; gap:5px;}
.library-equipment-status b {font-size:15px;}
.library-equipment-status span {color:#655E6C; font-size:12px; line-height:1.5;}
.library-equipment-group {margin-top:16px;}
.library-equipment-group > header {display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:9px;}
.library-equipment-group h3 {margin:0; font-size:16px;}
.library-equipment-group header span {color:#655E6C; font-size:12px; text-align:right;}
.library-equipment-group > div {display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px;}
.library-equipment-option {min-height:48px; display:flex; align-items:center; justify-content:space-between; gap:5px; padding:0 10px 0 12px; border:1px solid #E5DFE8; border-radius:12px; color:#28252D; background:#fff; font-size:14px;}
.library-equipment-option i {width:18px; height:18px; display:grid; place-items:center; flex:none; border:1px solid #C9C1CE; border-radius:6px; color:transparent; font-size:12px; font-style:normal;}
.library-equipment-option.is-selected {border-color:#6C4CF1; color:#4F35C8; background:#F8F5FF; font-weight:600;}
.library-equipment-option.is-selected i {border-color:#6C4CF1; color:#fff; background:#6C4CF1;}
.library-equipment-group.legacy {padding-top:14px; border-top:1px solid #EEE6DF;}
.library-equipment-custom {padding-top:14px; border-top:1px solid #EEE6DF;}
.library-equipment-custom-input {display:grid!important; grid-template-columns:minmax(0,1fr) 72px!important; gap:8px;}
.library-equipment-custom-input input {min-width:0; min-height:48px; padding:0 12px; border:1px solid #D8D1DC; border-radius:12px; color:#28252D; background:#fff; font:14px/1.4 inherit;}
.library-equipment-custom-input button {min-height:48px; border:1px solid #CBBDF8; border-radius:12px; color:#4F35C8; background:#fff; font-size:14px; font-weight:600;}
.library-equipment-custom-list {display:flex!important; flex-wrap:wrap; gap:8px; margin-top:10px;}
.library-equipment-custom-list button {min-height:40px; display:flex; align-items:center; gap:7px; padding:0 10px; border:1px solid #E5DAFF; border-radius:10px; color:#4F35C8; background:#F8F5FF; font-size:13px;}
.library-equipment-custom-list i {font-size:17px; font-style:normal;}
.library-equipment-complete {min-height:68px; display:flex; align-items:flex-start; gap:10px; margin-top:18px; padding:12px; border:1px solid #E5DAFF; border-radius:14px; background:#FAF8FF;}
.library-equipment-complete input {width:22px; height:22px; flex:none; margin:1px 0 0; accent-color:#6C4CF1;}
.library-equipment-complete span {display:grid; gap:3px;}
.library-equipment-complete b {font-size:14px; line-height:1.45;}
.library-equipment-complete small {color:#655E6C; font-size:12px; line-height:1.5;}
.library-equipment-summary {margin-top:16px; padding:16px; border:1px solid #E5DAFF; border-radius:16px; background:#fff;}
.library-equipment-summary h3 {margin:0 0 10px; font-size:16px;}
.library-equipment-summary > div {display:flex; flex-wrap:wrap; gap:7px;}
.library-equipment-summary span {padding:6px 9px; border-radius:9px; color:#4F35C8; background:#F2EEFF; font-size:13px;}
.library-equipment-summary button {width:100%; min-height:48px; margin-top:14px; border:1px solid #CBBDF8; border-radius:13px; color:#4F35C8; background:#fff; font-size:14px; font-weight:600;}
.library-equipment-recommend {display:grid; gap:4px; margin:14px 0 0; padding:13px; border-radius:12px; background:#F7F5F3;}
.library-equipment-recommend b {font-size:13px;}
.library-equipment-recommend span {color:#655E6C; font-size:12px; line-height:1.5;}
.library-equipment-actions {display:grid; grid-template-columns:1fr 1.7fr; gap:10px; flex:none; padding:12px 22px calc(14px + env(safe-area-inset-bottom)); border-top:1px solid #EEE6DF; background:#fff;}
.library-equipment-actions button {min-height:50px; border-radius:14px; font-size:15px; font-weight:600;}
.library-equipment-actions .secondary {border:1px solid #E1D9E7; color:#514B5E; background:#fff;}
.library-equipment-actions .primary {border:0; color:#fff; background:#6C4CF1;}
.library-equipment-actions .primary:disabled {color:#A9A1B0; background:#E8E2EC;}
@media(max-width:390px) {
 .page.library-order-page {padding-inline:12px;}
 .library-order-page .library-order-header h1 {font-size:26px;}
 .library-order-page .library-order-layout {grid-template-columns:65px minmax(0,1fr); gap:9px;}
 .library-context-tools {grid-template-columns:55px repeat(4,minmax(0,1fr));}
 .library-context-tools button {font-size:13px;}
 .library-equipment-body {padding-inline:16px;}
 .library-equipment-group > div {grid-template-columns:repeat(2,minmax(0,1fr));}
 .library-equipment-actions {padding-inline:16px;}
 .library-order-page .library-order-card {min-height:174px; grid-template-columns:39% minmax(0,1fr);}
 .library-order-page .library-order-copy {padding:9px 8px;}
 .library-order-page .library-order-copy h3 {font-size:15px;}
 .library-order-page .library-order-card .tag-row {gap:3px;}
 .library-order-page .library-order-card .tag {padding:1px 4px;}
}

/* Owner-confirmed category manager: card rail + inline secondary tools. */
.library-order-page .library-order-layout {
  grid-template-columns:104px minmax(0,1fr);
  gap:12px;
}
.library-order-page .library-order-sidebar {
  position:sticky;
  top:0;
  align-items:stretch;
  gap:8px;
  max-height:calc(100vh - 344px);
  padding:0 2px 6px;
  overflow-y:auto;
  scrollbar-width:none;
}
.library-order-page .library-order-sidebar::-webkit-scrollbar {display:none;}
.library-order-page.library-manage-page .library-order-sidebar {max-height:calc(100vh - 424px);}
.library-order-page .library-order-category {
  min-height:56px;
  align-items:flex-start;
  gap:2px;
  padding:9px 12px;
  overflow:visible;
  border:1px solid rgba(238,230,223,.88);
  border-radius:15px;
  color:#28252d;
  background:#fff;
  box-shadow:0 7px 20px rgba(56,41,73,.06);
  text-align:left;
}
.library-order-page .library-order-category b {
  max-width:100%;
  font-size:14px;
  font-weight:650;
  line-height:1.3;
  text-align:left;
}
.library-order-page .library-category-count {
  color:#817987;
  font-size:12px;
  font-weight:400;
  line-height:1.25;
}
.library-order-page .library-order-category.active {
  color:#4f35c8;
  border-color:#e1d9ff;
  background:linear-gradient(135deg,#f4f0ff,#fbf9ff);
  box-shadow:inset 4px 0 #6c4cf1,0 8px 22px rgba(76,53,146,.08);
}
.library-order-page .library-order-category.active b {font-weight:750;}
.library-order-page .library-order-category.is-editing {touch-action:none;}
.library-order-page .library-sidebar-actions {
  position:sticky;
  bottom:0;
  z-index:6;
  padding:5px 0 2px;
  background:linear-gradient(180deg,rgba(250,248,245,0),#faf8f5 24%);
}
.library-order-page .library-category-controls {
  display:grid;
  grid-template-columns:44px 44px;
  justify-content:start;
  gap:8px;
  margin:0;
}
.library-order-page .library-category-controls .library-order-category-add,
.library-order-page .library-category-controls .library-order-category-remove {
  width:44px;
  min-width:44px;
  height:44px;
  min-height:44px!important;
  margin:0;
  border:1px solid #cfc3f8;
  border-radius:13px;
  color:#5d3fdb;
  background:#fff;
  box-shadow:0 5px 14px rgba(76,53,146,.08);
  font-size:26px!important;
  font-weight:350;
}
.library-order-page .library-category-controls .library-order-category-add {
  border-style:solid;
  background:#f8f5ff;
}
.library-order-page .library-order-category-remove.active,
.library-order-page .library-secondary-manage.active {
  color:#5d3fdb;
  background:#fff;
}
.library-order-page .library-secondary-row {
  grid-template-columns:minmax(0,1fr) 44px 44px;
  gap:7px;
  align-items:start;
  margin:0 0 12px;
}
.library-order-page .library-secondary-filters {
  gap:7px;
  margin:0;
  padding:2px 1px 8px;
}
.library-order-page .library-secondary-filters button {
  min-height:44px;
  max-width:110px;
  padding:7px 13px;
  border-color:#e1daf6;
  color:#4f35c8;
  background:#fff;
  font-size:13px;
  line-height:1.25;
  touch-action:pan-x;
}
.library-order-page .library-secondary-filters button.active {
  border-color:#6c4cf1;
  color:#fff;
  background:linear-gradient(135deg,#6848ef,#5535e2);
  box-shadow:0 7px 16px rgba(87,57,218,.18);
}
.library-order-page .library-secondary-filters button.is-editing {touch-action:none;}
.library-order-page .library-secondary-add,
.library-order-page .library-secondary-manage {
  width:44px;
  min-width:44px;
  height:44px;
  min-height:44px;
  border:1px solid #cfc3f8;
  border-radius:50%;
  color:#5d3fdb;
  background:#fff;
  box-shadow:0 5px 14px rgba(76,53,146,.08);
  font-size:25px;
}
.library-order-page .library-secondary-add {border-style:solid;background:#f8f5ff;}
.library-order-page .category-delete-badge {
  top:-9px;
  right:-7px;
  width:22px;
  height:22px;
  border:2px solid #fff;
  background:#9188db;
  font-size:14px;
}
.library-order-page .library-order-sidebar .category-delete-badge {top:-9px;right:-7px;}
.library-order-page .library-order-list {padding-top:0;}

@media(max-width:390px) {
  .library-order-page .library-order-layout {grid-template-columns:98px minmax(0,1fr);gap:10px;}
  .library-order-page .library-order-category {min-height:56px;padding:9px 10px;}
  .library-order-page .library-category-controls {grid-template-columns:44px 44px;gap:6px;}
  .library-order-page .library-secondary-row {grid-template-columns:minmax(0,1fr) 44px 44px;gap:5px;}
}

/* Pure visual closeout: preserve 44px hit targets while making the visible UI lighter. */
.library-order-page .library-order-layout {
  grid-template-columns:100px minmax(0,1fr);
  gap:10px;
}
.library-order-page .library-order-sidebar {gap:6px;padding-inline:1px;}
.library-order-page .library-order-category {
  min-height:52px;
  padding:6px 10px;
  border-color:rgba(238,230,223,.66);
  border-radius:13px;
  box-shadow:0 3px 10px rgba(56,41,73,.035);
}
.library-order-page .library-order-category b {
  font-size:13.5px;
  font-weight:600;
  line-height:1.25;
}
.library-order-page .library-category-count {font-size:12px;line-height:1.2;}
.library-order-page .library-order-category.active {
  border-color:#e7e0fb;
  background:linear-gradient(135deg,#f5f2ff,#fcfbff);
  box-shadow:inset 3px 0 #6c4cf1,0 3px 10px rgba(76,53,146,.045);
}
.library-order-page .library-order-category.active b {font-weight:650;}
.library-order-page .library-sidebar-actions {padding-top:2px;}
.library-order-page .library-sidebar-actions {
  position:static;
  bottom:auto;
  margin-top:0;
  background:transparent;
}
.library-order-page .library-category-controls {gap:4px;}
.library-order-page .library-category-controls .library-order-category-add,
.library-order-page .library-category-controls .library-order-category-remove,
.library-order-page .library-secondary-add,
.library-order-page .library-secondary-manage {
  position:relative;
  z-index:0;
  display:grid;
  place-items:center;
  width:44px;
  min-width:44px;
  height:44px;
  min-height:44px!important;
  padding:0;
  overflow:visible;
  border:0;
  border-radius:50%;
  color:#6448d4;
  background:transparent;
  box-shadow:none;
  font-size:21px!important;
  font-weight:400;
  line-height:1;
}
.library-order-page .library-category-controls .library-order-category-add::before,
.library-order-page .library-category-controls .library-order-category-remove::before,
.library-order-page .library-secondary-add::before,
.library-order-page .library-secondary-manage::before {
  content:"";
  position:absolute;
  z-index:-1;
  inset:6px;
  border:1px solid rgba(178,161,239,.68);
  border-radius:50%;
  background:rgba(255,255,255,.92);
  box-shadow:0 2px 7px rgba(76,53,146,.055);
}
.library-order-page .library-category-controls .library-order-category-add::before,
.library-order-page .library-secondary-add::before {background:#faf8ff;}
.library-order-page .library-order-category-remove.active::before,
.library-order-page .library-secondary-manage.active::before {background:#f3efff;}
.library-order-page .library-secondary-row {gap:4px;margin-bottom:8px;}
.library-order-page .library-secondary-filters {gap:5px;padding:0 1px 4px;}
.library-order-page .library-secondary-filters button {
  position:relative;
  z-index:0;
  min-height:44px;
  padding:0 11px;
  border:0;
  color:#5940c8;
  background:transparent;
  box-shadow:none;
  font-size:12.5px;
  font-weight:500;
}
.library-order-page .library-secondary-filters button::before {
  content:"";
  position:absolute;
  z-index:-1;
  inset:4px 0;
  border:1px solid rgba(218,209,244,.78);
  border-radius:999px;
  background:rgba(255,255,255,.9);
}
.library-order-page .library-secondary-filters button.active {
  border:0;
  color:#fff;
  background:transparent;
  box-shadow:none;
  font-weight:600;
}
.library-order-page .library-secondary-filters button.active::before {
  border-color:#6c4cf1;
  background:linear-gradient(135deg,#6c4cf1,#5a3ce1);
  box-shadow:0 3px 8px rgba(87,57,218,.12);
}
.library-order-page .library-order-card {
  grid-template-columns:34% minmax(0,1fr);
  height:146px;
  min-height:146px;
  margin-bottom:10px;
  border-radius:15px;
  box-shadow:0 3px 10px rgba(40,37,45,.035);
}
.library-order-page .library-order-photo {height:146px;min-height:146px;}
.library-order-page .library-order-card .library-order-copy {padding:9px 9px 42px;}
.library-order-page .library-order-title-row {gap:3px;}
.library-order-page .library-order-copy h3 {
  min-width:0;
  overflow:hidden;
  font-size:15px;
  line-height:21px;
  font-weight:600;
  overflow-wrap:normal;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.library-order-page .library-want-count {padding-top:2px;font-size:12px;}
.library-order-page .library-order-card .tag-row {gap:3px;margin-top:6px;}
.library-order-page .library-order-card .tag {padding:1px 4px;font-size:12px;line-height:17px;}
.library-order-page .library-order-source {margin:6px 0;font-size:12px;line-height:17px;}

@media(max-width:390px) {
  .library-order-page .library-order-layout {grid-template-columns:94px minmax(0,1fr);gap:8px;}
  .library-order-page .library-order-category {min-height:50px;padding:6px 9px;}
  .library-order-page .library-order-card {grid-template-columns:32% minmax(0,1fr);height:144px;min-height:144px;}
  .library-order-page .library-order-photo {height:144px;min-height:144px;}
  .library-order-page .library-order-card .library-order-copy {padding:8px 8px 41px;}
}

/* The rail tools remain at the end of the scrollable list. */
.library-order-page .library-order-sidebar {scrollbar-width:none;}
.library-order-page .library-order-sidebar::-webkit-scrollbar {display:none;}
.library-order-page .library-sidebar-actions {flex:none;padding-bottom:12px;}

/* Keep filters and both actions on one compact row. */
.library-order-page .library-secondary-row {grid-template-columns:minmax(0,1fr) 88px;gap:4px;}
.library-order-page .library-secondary-tools {display:flex;flex-direction:row;align-items:center;width:88px;height:44px;}
.library-order-page .library-secondary-filters {display:block;min-width:0;height:44px;padding:0 1px;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;}
.library-order-page .library-secondary-filters::-webkit-scrollbar {display:none;}
.library-order-page .library-secondary-filter-track {display:inline-flex;align-items:center;gap:5px;min-width:100%;height:44px;white-space:nowrap;}
.library-order-page .library-order-list .empty {margin-top:8px;}

/* Small text controls share the visual weight of the batch-management tab. */
.library-order-page .library-secondary-tools .library-secondary-add,
.library-order-page .library-secondary-tools .library-secondary-manage {box-sizing:border-box;display:flex;width:44px;min-width:44px;height:44px;min-height:44px!important;border:0;border-radius:0;background:transparent;box-shadow:none;color:#6c4cf1;font-size:14px!important;font-weight:700;line-height:1;}
.library-order-page .library-secondary-tools .library-secondary-add {justify-content:flex-end;padding:0 6px 0 0;}
.library-order-page .library-secondary-tools .library-secondary-manage {justify-content:flex-start;padding:0 0 0 6px;}
.library-order-page .library-secondary-tools .library-secondary-add::before,
.library-order-page .library-secondary-tools .library-secondary-manage::before {display:none;}
.library-order-page .library-secondary-tools .library-secondary-manage.active {color:#4f35c8;font-weight:800;}
.library-category-recommend{display:block;width:100%;min-height:44px;margin-top:8px;padding:6px;border:1px solid #dcd3ec;border-radius:10px;background:#f2eeff;color:#4f35c8;font-size:12px;font-weight:600;line-height:1.35;white-space:normal}
/* 2026-09-27：二级分类的 +/− 跟在最后一个二级分类后面，随分类一起横向滚动 */
.library-order-page .library-secondary-row {grid-template-columns:minmax(0,1fr);}
.library-order-page .library-secondary-filter-track .library-secondary-tools {display:flex;flex:0 0 88px;flex-direction:row;align-items:center;width:88px;height:44px;}
.library-order-page .library-secondary-filter-track .library-secondary-tools .library-secondary-add,
.library-order-page .library-secondary-filter-track .library-secondary-tools .library-secondary-manage {justify-content:center;padding:0;}
/* 2026-09-28：一级分类 + / − / ↺ 一行等分排列在侧栏宽度内，不再 2+1 折行；点击区保持 44px 高 */
.library-order-page .library-sidebar-actions .library-category-controls {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));justify-content:stretch;align-items:center;gap:0;width:100%;margin:2px 0 0;padding:0;}
.library-order-page .library-sidebar-actions .library-category-controls .library-order-category-add,
.library-order-page .library-sidebar-actions .library-category-controls .library-order-category-remove {flex:none;width:100%;min-width:0;height:44px;min-height:44px!important;font-size:18px!important;}
.library-order-page .library-sidebar-actions .library-category-controls .library-order-category-add::before,
.library-order-page .library-sidebar-actions .library-category-controls .library-order-category-remove::before {inset:auto;left:50%;top:50%;width:30px;height:30px;margin:-15px 0 0 -15px;box-sizing:border-box;}
.library-order-page .library-sidebar-actions .library-category-controls .library-order-category-restore {font-size:16px!important;font-weight:600;}
