/* Library only: large hardcover imagery, quiet text, no changes to the reader. */
.cc-library-surface { --cc-book-ink:#653a4b; --cc-book-gold:#b39a72; }
.cc-library-surface .cc-story-directory-dialog,
.cc-library-surface .cc-newcondo-directory-dialog,
.cc-library-surface .dir-shell { background:linear-gradient(135deg,#fffdf9,#f7eee9); }
.cc-library-surface .cc-story-directory-kicker,
.cc-library-surface .dir-kicker,
.cc-library-surface .cc-story-directory-head > p,
.cc-library-surface .dir-head > p { display:none; }
.cc-library-surface .cc-story-directory-head,
.cc-library-surface .dir-head { padding-bottom:18px; border-bottom:1px solid #b39a723b; }
.cc-library-surface .cc-story-directory-head h2,
.cc-library-surface .dir-head h1 { color:var(--cc-book-ink); font-size:clamp(23px,2.6vw,32px); font-weight:500; letter-spacing:.04em; }
.cc-library-surface .cc-library-books {
  display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:32px 30px;
  width:100%; max-width:1120px; margin:28px auto 12px; align-items:start;
}
.cc-library-surface .cc-book-item { min-width:0; margin:0; padding:0; border:0; background:none; }
.cc-library-surface .cc-library-books .cc-book-link {
  position:relative; display:flex; flex-direction:column; align-items:stretch;
  width:100%; min-width:0; gap:0; margin:0; padding:0 5px 0 0;
  border:0; border-radius:0; background:transparent; box-shadow:none;
  color:var(--cc-book-ink); font-family:inherit; text-align:left; text-decoration:none;
  cursor:pointer; appearance:none; -webkit-appearance:none;
}
.cc-library-surface .cc-book-link > .cc-directory-index,
.cc-library-surface .cc-book-link > .card-index { display:none; }
.cc-library-surface .cc-book-cover {
  position:relative; display:block; isolation:isolate; width:100%; aspect-ratio:2/3;
  overflow:hidden; border-radius:3px 7px 7px 3px;
  background:radial-gradient(ellipse at 60% 20%,#ad8193,#70465c 62%,#492d3e);
  box-shadow:3px 2px 0 #eee2d1,5px 3px 0 #c8b59c,7px 5px 0 #f8eee1,10px 15px 22px -8px #56323d47;
  transition:transform .2s ease,box-shadow .2s ease;
}
.cc-library-surface .cc-book-cover::before {
  content:""; position:absolute; z-index:3; inset:0 auto 0 0; width:15px; pointer-events:none;
  background:linear-gradient(90deg,#241b2f70,transparent 30%,#ffffff3b 55%,#34202c38 70%,transparent);
}
.cc-library-surface .cc-book-cover::after {
  content:""; position:absolute; z-index:3; inset:9px 8px 9px 17px; pointer-events:none;
  border:1px solid #f7e4b97a; border-radius:1px 3px 3px 1px;
}
.cc-library-surface .cc-book-cover .card-media,
.cc-library-surface .cc-book-cover .cc-directory-thumb,
.cc-library-surface .cc-book-cover img {
  position:absolute; inset:0; display:block; width:100%; height:100%; max-width:none;
  aspect-ratio:auto; border:0; border-radius:0; background:transparent;
  object-fit:cover; object-position:50% 35%;
}
.cc-library-surface .cc-book-cover img[hidden] { display:none; }
.cc-library-surface .cc-book-motif { position:absolute; inset:0; display:grid; place-items:center; color:#ebd4ac7a; }
.cc-library-surface .cc-book-motif svg { width:52px; height:64px; stroke:currentColor; stroke-width:1.1; }
.cc-library-surface .cc-book-link .cc-book-copy { display:flex; flex-direction:column; width:100%; min-width:0; padding:16px 2px 0 6px; }
.cc-library-surface .cc-book-link .cc-book-title {
  display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:2;
  max-height:2.9em; margin:0; overflow:hidden; overflow-wrap:anywhere;
  color:var(--cc-book-ink); font-size:clamp(15px,1.5vw,20px); font-weight:600; line-height:1.45;
}
.cc-library-surface .cc-book-link .cc-book-excerpt {
  order:3; display:-webkit-box; -webkit-box-orient:vertical; -webkit-line-clamp:1;
  max-height:1.5em; margin:6px 0 0; overflow:hidden; overflow-wrap:anywhere;
  color:#907c80; font:400 12px/1.5 system-ui,sans-serif;
}
.cc-library-surface .cc-book-link .card-author,
.cc-library-surface .cc-book-link .cc-directory-meta {
  display:flex; flex-wrap:wrap; align-items:center; gap:6px; min-width:0; margin-top:8px;
  color:#897078; font:400 11px/1.4 system-ui,sans-serif;
}
.cc-library-surface .cc-book-link .card-author > span,
.cc-library-surface .cc-book-link .cc-directory-meta > [data-prince-name] {
  min-width:0; max-width:calc(100% - 30px); overflow:hidden; text-overflow:ellipsis; white-space:nowrap;
}
.cc-library-surface .cc-book-link .card-author img,
.cc-library-surface .cc-book-link .cc-directory-author-avatar { width:21px; height:21px; flex:0 0 21px; border-radius:50%; object-fit:cover; }
.cc-library-surface .cc-book-link .directory-affinity,
.cc-library-surface .cc-book-link .cc-directory-meta .ccrm-affinity { margin:4px 0 0; font-size:10px; }
.cc-library-surface .cc-book-link .cc-directory-meta .ccrm-affinity { flex-basis:100%; }
/* Personal pairing is painted in the browser; public directory data stays shared. */
.cc-library-surface .cc-book-link .cc-book-player {
  display:inline-flex; align-items:center; gap:5px; max-width:100%; min-width:0;
  overflow:visible; white-space:normal; color:inherit;
}
.cc-book-pair-cross { flex:none; color:#a17c89; }
.cc-book-player-picture { display:inline-flex; width:21px; height:21px; flex:0 0 21px; border-radius:50%; overflow:hidden; background:#eee1e6; }
.cc-library-surface .cc-book-link .cc-book-player-avatar { width:21px; height:21px; object-fit:cover; border-radius:50%; }
.cc-book-player-fallback { width:21px; height:21px; fill:#ac8e9b; }
.cc-book-player-picture [hidden] { display:none!important; }
.cc-book-player [data-cc-library-player-name] { min-width:0; overflow-wrap:anywhere; }
/* The cover owns its tier marker. The shared entitlement marker is hidden only
   here; membership-based gating and every other directory keep their behavior. */
.cc-library-surface .cc-book-link > .cc-premium-lock-icon { display:none !important; }
.cc-book-paid-lock { display:none; }
.cc-library-surface .cc-book-cover > .cc-book-paid-lock {
  position:absolute; z-index:5; top:12px; right:10px; display:flex;
  align-items:center; justify-content:center; box-sizing:border-box;
  width:34px; height:38px; margin:0; padding:7px; border:1px solid #d0b88c;
  border-radius:7px; color:#87374f; background:#fffaf2;
  box-shadow:0 2px 7px #24192445; pointer-events:none;
}
.cc-library-surface .cc-book-paid-lock > svg { display:block; width:20px; height:24px; flex:none; }
.cc-library-surface .cc-library-books > .dir-empty,
.cc-library-surface .cc-library-books > .cc-directory-empty,
.cc-library-surface .cc-library-books > .cc-newcondo-empty { grid-column:1/-1; }
.cc-library-surface .cc-book-link:focus-visible { outline:2px solid #8b526b; outline-offset:8px; border-radius:4px; }
@media(hover:hover) and (pointer:fine) {
  .cc-library-surface .cc-library-books .cc-book-link:hover { background:transparent; box-shadow:none; transform:none; }
  .cc-library-surface .cc-book-link:hover .cc-book-cover { transform:translateY(-4px); box-shadow:3px 2px 0 #eee2d1,5px 3px 0 #c8b59c,7px 5px 0 #f8eee1,10px 20px 28px -8px #56323d55; }
}
@media(max-width:800px) {
  .cc-library-surface .cc-library-books { grid-template-columns:repeat(2,minmax(0,1fr)); gap:26px 22px; }
}
@media(max-width:600px) {
  .cc-library-surface .dir-shell { padding:20px 14px; }
  .cc-library-surface .dir-body { padding:0; }
  .cc-library-surface .dir-head { padding:10px 62px 16px 2px; }
  .cc-library-surface .cc-library-books { margin-top:22px; gap:25px 17px; }
  .cc-library-surface .cc-book-link .cc-book-copy { padding-top:12px; padding-left:3px; }
  .cc-library-surface .cc-book-link .cc-book-title { font-size:15px; }
  .cc-library-surface .cc-book-link .cc-book-excerpt { font-size:11px; }
  .cc-library-surface .cc-book-cover > .cc-book-paid-lock { top:10px; right:8px; width:30px; height:34px; padding:5px; }
}
@media(max-width:350px) {
  .cc-library-surface .cc-library-books { grid-template-columns:minmax(0,1fr); max-width:240px; }
}
@media(prefers-reduced-motion:reduce) {
  .cc-library-surface .cc-book-cover { transition:none; }
  .cc-library-surface .cc-book-link:hover .cc-book-cover { transform:none; }
}
