/* WhiteFeathers Library: a Tube-style reading-room layout (shelves, selected book, scrolling list) in the shared dark theme. */
.page-library .widget-area { display: none; }
.page-library .wrapper { display: block; }
.page-library .site-content { width: 100%; }
body.page-library .entry-content .lib-intro { font-size: 15px; line-height: 1.7; margin: 0 0 6px; }
body.page-library .entry-content .lib-note,
body.page-library .entry-content .affiliate-disclosure { color: #a9c3d2; font-size: 12px; line-height: 1.6; margin: 0 0 12px; }

body.page-library #page { max-width: 1280px; }
body.page-library .entry-content .lib-intro { font-size: 14px; line-height: 1.6; }

/* Tube-style layout: shelves | selected book | searchable list. */
body.page-library .lib-layout { display: grid; grid-template-columns: 190px minmax(0, 1fr) 340px; gap: 20px; align-items: start; margin-top: 8px; }
body.page-library .lib-shelves ul { margin: 0; padding: 0; list-style: none; }
body.page-library .lib-shelves { position: sticky; top: 12px; max-height: calc(100vh - 24px); overflow-y: auto; }
body.page-library .lib-shelf-heading { margin: 14px 10px 4px; color: #a9c3d2; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; }
body.page-library .lib-shelf-heading:first-child { margin-top: 0; }
body.page-library .lib-shelf { display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; padding: 7px 10px; border: 0; border-radius: 6px; background: transparent; color: #d8ecf7; font: 600 13px/1.3 "Open Sans", Arial, sans-serif; text-align: left; cursor: pointer; }
body.page-library .lib-shelf span { color: #a9c3d2; font-size: 11px; font-weight: 400; }
body.page-library .lib-shelf:hover, body.page-library .lib-shelf:focus-visible { background: rgba(103, 215, 245, 0.12); }
body.page-library .lib-shelf.is-selected { background: rgba(103, 215, 245, 0.22); color: #67d7f5; }

/* The selected book: the card shown large, like Tube's player and summary. */
body.page-library .sk-card.lib-detail { gap: 22px; padding: 18px; border-radius: 10px; }
body.page-library .lib-detail .sk-cover { flex-basis: 40%; border-radius: 8px; box-shadow: 0 6px 22px rgba(0, 0, 0, .45); }
body.page-library .entry-content .lib-detail h3 { margin: 4px 0 8px; font-size: 22px; }
body.page-library .entry-content .lib-detail .sk-preview { padding: 12px 14px; border-radius: 8px; background: rgba(6, 20, 38, 0.7); font-size: 14px; line-height: 1.7; }
body.page-library .entry-content .lib-detail .sk-note { font-size: 13px; }
body.page-library .entry-content .lib-detail .sk-buy { margin-top: 8px; gap: 6px; }
body.page-library .lib-detail .sk-buy a { padding: 5px 11px; font-size: 12px; }
body.page-library .lib-about { margin-top: 22px; padding-top: 14px; border-top: 1px solid rgba(103, 215, 245, 0.28); }
body.page-library .entry-content .lib-about h2 { margin: 0 0 4px; color: #67d7f5; font-size: 15px; text-transform: uppercase; letter-spacing: .04em; }
body.page-library .entry-content .lib-about .lib-lead { margin: 0 0 8px; color: #c6d9e7; font-size: 13px; font-style: italic; }

/* The book list on the right, like Tube's video list. */
body.page-library .lib-queue { position: sticky; top: 12px; display: flex; flex-direction: column; max-height: calc(100vh - 24px); border: 1px solid rgba(103, 215, 245, 0.28); border-radius: 10px; background: rgba(8, 31, 55, 0.92); overflow: hidden; }
body.page-library .lib-queue-head { display: flex; align-items: center; gap: 10px; padding: 10px; border-bottom: 1px solid rgba(103, 215, 245, 0.28); }
body.page-library .lib-search { flex: 1 1 auto; min-width: 0; }
body.page-library .lib-search input { width: 100%; box-sizing: border-box; padding: 7px 10px; border: 1px solid rgba(103, 215, 245, 0.38); border-radius: 18px; font: 13px "Open Sans", Arial, sans-serif; }
body.page-library .entry-content .lib-count { margin: 0; color: #a9c3d2; font-size: 12px; white-space: nowrap; }
body.page-library .lib-list { margin: 0; padding: 6px; list-style: none; overflow-y: auto; }
body.page-library .lib-item[hidden] { display: none; }
body.page-library .lib-item-button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px; border: 0; border-radius: 8px; background: transparent; color: #edf7ff; text-align: left; cursor: pointer; }
body.page-library .lib-item-button:hover, body.page-library .lib-item-button:focus-visible { background: rgba(103, 215, 245, 0.12); }
body.page-library .lib-item.is-current .lib-item-button { background: rgba(103, 215, 245, 0.22); }
body.page-library .lib-item-thumb { flex: 0 0 48px; aspect-ratio: 2 / 3; overflow: hidden; border-radius: 4px; background: #061426; }
body.page-library .lib-item-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
body.page-library .lib-item-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
body.page-library .lib-item-title { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font: 600 12.5px/1.35 "Open Sans", Arial, sans-serif; overflow-wrap: anywhere; }
body.page-library .lib-item-author { color: #a9c3d2; font-size: 11.5px; }
body.page-library .entry-content .lib-empty { margin: 0; padding: 16px; color: #a9c3d2; text-align: center; font-size: 13px; }

body.page-library .sk-card { display: flex; min-width: 0; gap: 12px; padding: 10px; border: 1px solid rgba(103, 215, 245, 0.28); border-radius: 4px; background: rgba(8, 31, 55, 0.92); }
body.page-library .sk-card[hidden] { display: none; }
body.page-library .sk-cover { display: flex; flex: 0 0 34%; align-self: flex-start; margin: 0; overflow: hidden; border-radius: 3px; background: #0b2440; }
body.page-library .sk-cover a { display: flex; width: 100%; }
body.page-library .sk-cover img { display: block; width: 100%; height: auto; aspect-ratio: 2 / 3; object-fit: cover; }
body.page-library .sk-card-content { display: flex; flex: 1; flex-direction: column; min-width: 0; }
body.page-library .entry-content .sk-kicker { margin: 0; color: #a9c3d2; font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
body.page-library .entry-content .sk-card h3 { margin: 2px 0 6px; color: #edf7ff; font-size: 15px; line-height: 1.3; overflow-wrap: anywhere; }
body.page-library .entry-content .sk-card p { margin: 0 0 6px; }
body.page-library .entry-content .sk-card .sk-preview { color: #edf7ff; font-size: 12.5px; line-height: 1.6; }
body.page-library .entry-content .sk-note { color: #ffd27a; font-size: 12px; }
body.page-library .entry-content .sk-in { color: #a9c3d2; font-size: 11px; }
body.page-library .entry-content .sk-buy { display: flex; flex-wrap: wrap; gap: 5px; margin: auto 0 0; }
body.page-library .sk-buy a { display: inline-block; padding: 3px 8px; border: 1px solid #67d7f5; border-radius: 3px; background: rgba(8, 31, 55, 0.92); color: #67d7f5; font-size: 11px; line-height: 1.4; text-decoration: none; }
body.page-library .sk-buy a:hover, body.page-library .sk-buy a:focus-visible { background: #67d7f5; color: #061426; }
body.page-library .entry-content .sk-buy + .sk-buy-vinted, body.page-library .entry-content .sk-in + .sk-buy-collection { margin-top: 4px; }
body.page-library .sk-buy-vinted a, body.page-library .sk-buy-collection a { border-color: #a9c3d2; color: #c6d9e7; }
body.page-library .sk-buy-vinted a:hover, body.page-library .sk-buy-collection a:hover { background: #c6d9e7; border-color: #c6d9e7; color: #061426; }

body.page-library .sk-chat { margin: 16px 0 0; padding: 12px 14px; border: 1px solid rgba(103, 215, 245, 0.28); border-radius: 4px; background: rgba(8, 31, 55, 0.92); }
body.page-library .sk-chat summary { color: #67d7f5; font-weight: 600; cursor: pointer; }
body.page-library .entry-content .sk-chat-note, body.page-library .entry-content .sk-chat-status { margin: 8px 0; color: #a9c3d2; font-size: 12px; }
body.page-library .sk-chat-log { max-height: 260px; overflow-y: auto; }
body.page-library .entry-content .sk-chat-message { margin: 6px 0; padding: 7px 9px; border-radius: 3px; background: rgba(8, 31, 55, 0.92); border: 1px solid rgba(103, 215, 245, 0.28); white-space: pre-wrap; font-size: 13px; }
body.page-library .entry-content .sk-chat-assistant { border-left: 3px solid #67d7f5; }
body.page-library .entry-content .sk-chat-user { border-left: 3px solid #a9c3d2; }
body.page-library .sk-chat form { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 8px; }
body.page-library .sk-chat form label { grid-column: 1 / -1; font-size: 12px; font-weight: 600; }
body.page-library .sk-chat textarea { width: 100%; box-sizing: border-box; min-height: 44px; padding: 6px 8px; border: 1px solid rgba(103, 215, 245, 0.38); border-radius: 3px; font: 13px "Open Sans", Arial, sans-serif; resize: vertical; }
body.page-library .sk-chat form button { padding: 7px 14px; border: 1px solid #67d7f5; border-radius: 3px; background: #67d7f5; color: #061426; cursor: pointer; }
body.page-library .sk-chat form button:disabled { opacity: .6; cursor: wait; }
body.page-library .entry-content .sk-footer { padding-top: 10px; border-top: 1px solid rgba(103, 215, 245, 0.28); color: #a9c3d2; font-size: 12px; }
body.page-library .entry-content .sk-footer p { margin: 0 0 6px; }

@media (max-width: 1100px) {
  body.page-library .lib-layout { grid-template-columns: minmax(0, 1fr) 300px; }
  body.page-library .lib-shelves { position: static; max-height: none; grid-column: 1 / -1; }
  body.page-library .lib-shelves ul { display: flex; flex-wrap: wrap; gap: 6px; }
  body.page-library .lib-shelf-heading { display: none; }
  body.page-library .lib-shelf { width: auto; border: 1px solid rgba(103, 215, 245, 0.38); border-radius: 18px; }
}
@media (max-width: 760px) {
  body.page-library .lib-layout { grid-template-columns: minmax(0, 1fr); }
  body.page-library .lib-queue { position: static; max-height: 480px; }
  body.page-library .sk-card.lib-detail { flex-direction: column; }
  body.page-library .lib-detail .sk-cover { flex-basis: auto; width: 60%; align-self: center; }
}
