.bookshelf-library{min-width:0;color:var(--student-ink)}
.bookshelf-tabs{display:flex;gap:10px;flex-wrap:wrap;padding:0 0 16px;margin-bottom:14px;border-bottom:1px solid var(--student-border)}
.bookshelf-tabs button{display:inline-flex;align-items:center;gap:9px;padding:9px 19px;border:1px solid var(--student-border);border-radius:30px;background:var(--student-surface);color:var(--student-muted);font-size:14px;line-height:1.5;white-space:nowrap}
.bookshelf-tabs button span{font-size:10px;font-variant-numeric:tabular-nums;opacity:.85}
.bookshelf-tabs button.active{background:var(--student-gold);color:var(--student-gold-ink);border-color:transparent;font-weight:700}
.bookshelf-tabs button:not(.active):hover{background:var(--student-hover);color:var(--student-accent-strong)}
.bookshelf-note{font-size:11px;color:var(--student-muted);margin-bottom:24px;line-height:1.8}
.bookshelf-groups{display:flex;flex-direction:column;gap:32px;min-width:0}
.bookshelf-group{min-width:0;padding:22px 22px 18px;background:var(--student-surface);border:1px solid var(--student-border);border-radius:16px}
.bookshelf-heading{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;margin-bottom:18px}
.bookshelf-heading>div:first-child{min-width:0}
.bookshelf-heading h3{font-size:20px;line-height:1.5;overflow-wrap:anywhere;letter-spacing:.3px}
.bookshelf-heading p{font-size:11px;line-height:1.8;color:var(--student-muted);margin-top:6px}
.bookshelf-controls{display:flex;align-items:center;gap:8px;flex-shrink:0;margin-top:1px}
.bookshelf-controls>span{font-size:11px;color:var(--student-muted);margin-right:7px;white-space:nowrap}
.bookshelf-controls button{display:flex;align-items:center;justify-content:center;width:34px;height:34px;border:1px solid var(--student-border);border-radius:50%;background:var(--student-raised);color:var(--student-accent)}
.bookshelf-controls button:hover:not(:disabled){background:var(--student-gold);color:var(--student-gold-ink)}
.bookshelf-controls button:disabled{opacity:.3;cursor:default}
.bookshelf-controls .icon{width:17px;height:17px}
.bookshelf-rail{display:flex;gap:20px;overflow-x:auto;overflow-y:hidden;scroll-snap-type:x proximity;overscroll-behavior-x:contain;scrollbar-width:thin;scrollbar-color:var(--student-border) transparent;padding:2px 1px 15px;min-width:0;touch-action:pan-x pan-y}
.bookshelf-rail.is-dragging{cursor:grabbing;scroll-snap-type:none;user-select:none}
.bookshelf-rail.is-dragging *{cursor:grabbing!important;user-select:none}
.bookshelf-rail::-webkit-scrollbar{height:5px}.bookshelf-rail::-webkit-scrollbar-thumb{background:var(--student-border);border-radius:5px}
.bookshelf-card{flex:0 0 154px;min-width:0;scroll-snap-align:start}
.bookshelf-cover{display:block;position:relative;aspect-ratio:3/4;border:1px solid var(--student-border);border-radius:9px;overflow:hidden;background:var(--student-raised);box-shadow:2px 4px 8px #0002}
.bookshelf-cover-placeholder{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background:linear-gradient(145deg,var(--student-raised),var(--student-bg));color:var(--student-accent)}
.bookshelf-cover-placeholder .icon{width:42px;height:42px}
.bookshelf-cover img{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;background:var(--student-raised);z-index:1;transition:transform .2s}
.bookshelf-cover img.image-failed{display:none}
.bookshelf-cover:hover img{transform:scale(1.025)}
.bookshelf-type{position:absolute;bottom:7px;left:7px;right:7px;z-index:2;background:#15191dec;color:#f4e4c7;border:1px solid #d3b77b77;border-radius:5px;padding:3px 6px;font-size:9px;line-height:1.5;width:max-content;max-width:calc(100% - 14px)}
.bookshelf-card h4{font-size:13px;line-height:1.65;margin:10px 0 5px;overflow-wrap:anywhere;font-weight:600}
.bookshelf-card h4 a:hover{color:var(--student-accent-strong)}
.bookshelf-card>p{font-size:10px;color:var(--student-muted);line-height:1.75}
.bookshelf-empty{padding:35px 22px;text-align:center;border:1px dashed var(--student-border);border-radius:12px;background:var(--student-surface);color:var(--student-muted)}
.bookshelf-empty>span{display:inline-flex;color:var(--student-accent);margin-bottom:12px}.bookshelf-empty>span .icon{width:30px;height:30px}
.bookshelf-empty h3{font-size:17px;color:var(--student-ink);margin-bottom:7px}.bookshelf-empty p{font-size:12px}
.home-section:has(>.bookshelf-library){min-width:0}
.course-grid.bookshelf-catalog-grid{display:block}
@media(max-width:900px){.bookshelf-tabs{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;gap:8px;padding-bottom:13px}.bookshelf-tabs button{font-size:13px;padding:8px 16px;flex-shrink:0}.bookshelf-note{font-size:10px;margin-bottom:18px}.bookshelf-groups{gap:22px}.bookshelf-group{padding:17px 15px 12px;border-radius:13px}.bookshelf-heading{gap:12px;margin-bottom:15px}.bookshelf-heading h3{font-size:17px}.bookshelf-heading p{font-size:10px}.bookshelf-controls{gap:6px}.bookshelf-controls>span{font-size:10px;margin-right:0}.bookshelf-controls button{width:29px;height:29px}.bookshelf-controls .icon{width:14px;height:14px}.bookshelf-rail{gap:14px;padding-bottom:13px}.bookshelf-card{flex-basis:126px}.bookshelf-card h4{font-size:12px;margin-top:9px}.bookshelf-card>p{font-size:9px}.bookshelf-type{font-size:8px}.bookshelf-empty h3{font-size:16px}}
@media(max-width:440px){.bookshelf-group{padding:15px 12px 10px}.bookshelf-heading h3{font-size:15px}.bookshelf-controls>span{display:none}.bookshelf-controls button{width:27px;height:27px}.bookshelf-card{flex-basis:119px}.bookshelf-rail{gap:13px}.bookshelf-heading{gap:8px}}
@media(prefers-reduced-motion:reduce){.bookshelf-cover img{transition:none}.bookshelf-rail{scroll-behavior:auto}}

#course-library.is-accompaniment .library-heading {
  flex-direction:row;
  align-items:flex-end;
  gap:12px;
  margin-bottom:0;
}
#course-library.is-accompaniment .library-heading h2 {
  margin-top:3px;
  line-height:1.25;
}
#course-library.is-accompaniment .library-heading>.text-link {
  display:inline-flex;
  flex:none;
  align-items:center;
  min-height:34px;
  padding:0;
  white-space:nowrap;
}
#course-library.is-accompaniment .results-bar {
  padding:8px 0 10px;
}
#course-library.is-accompaniment .bookshelf-tabs {
  flex-wrap:nowrap;
  overflow-x:auto;
  overscroll-behavior-inline:contain;
  touch-action:pan-x pan-y;
  scrollbar-width:thin;
  scrollbar-color:var(--student-border) transparent;
  gap:8px;
  padding:2px 2px 8px;
  margin-bottom:8px;
}
#course-library.is-accompaniment .bookshelf-tabs button {
  flex:none;
  min-height:36px;
  padding:6px 14px;
}
#course-library.is-accompaniment .bookshelf-note {
  margin-bottom:12px;
}
