.library-page { max-width: 1000px; margin: 35px auto; padding: 0 22px 110px; }
.library-page h1 { color: #e8d5b2; font-size: clamp(2rem,4vw,3rem); }
#library-privacy { margin: 18px 0; padding: 17px; border: 1px solid #875d38; border-radius: 6px; background: #19120e; }
#library-privacy[hidden] { display: none; }
#library-privacy label { display: block; margin-bottom: 9px; font-weight: bold; color: #f3ddba; }
#library-visibility { max-width: 100%; padding: 9px; background: #302318; border: 1px solid #a17c4c; border-radius: 4px; color: #f3ddba; font: inherit; }
#library-privacy p { margin-bottom: 0; color: #bbaa90; }
#library-share { margin-top: 18px; padding: 10px 16px; border: 1px solid #b58a4c; border-radius: 5px; background: #6b491f; color: #fff1d2; cursor: pointer; font: inherit; }
#library-share:disabled { opacity: .75; cursor: default; }
#library-description,#library-status { color: #bbaa90; margin: 5px 0 24px; }
.library-list { position: relative; display: grid; gap: 0; padding: 20px 12px 28px; border: 21px solid #713424; border-top-width: 32px; border-bottom-width: 35px; border-radius: 13px 13px 7px 7px; background: repeating-linear-gradient(105deg,#3d1711 0 21px,#4b2017 22px 37px,#3b180f 38px 58px); box-shadow: inset 0 0 0 5px #a55734,inset 0 0 35px #130704,0 15px 30px #0009,0 8px 0 #3c160d; }
.library-list[hidden] { display: none; }
.library-list::before { content: ''; position: absolute; left: -30px; right: -30px; top: -42px; height: 12px; border-radius: 8px; background: linear-gradient(#b97943,#783620 50%,#492013); box-shadow: 0 3px 7px #0009; }
.library-list::after { content: ''; position: absolute; left: -30px; right: -30px; bottom: -43px; height: 12px; border-radius: 3px; background: linear-gradient(#a96338,#74331e 55%,#3a170e); }
.bookshelf-shelf { min-width: 0; display: flex; align-items: flex-end; gap: 5px; min-height: 235px; padding: 15px 22px 17px; border-bottom: 15px solid #803d25; border-radius: 4px; background: radial-gradient(ellipse at center bottom,#67331e 0,#3a160e 85%); box-shadow: inset 0 -9px 18px #1c0906,0 5px 0 #3b140b,0 10px 12px #190804; }
.book-spine { position: relative; flex: 0 0 55px; display: flex; align-items: center; justify-content: center; width: 55px; max-height: 215px; min-height: 155px; padding: 8px 4px; border: 2px solid #24100f; border-left: 5px solid #ffffff24; border-right: 4px solid #1c0c0a99; border-radius: 3px 6px 4px 2px; background: linear-gradient(90deg,#0006,transparent 25%,#fff2 57%,#0006),var(--book-color); box-shadow: 3px 2px 5px #190905; color: #fff1cf; cursor: pointer; transition: transform .16s,box-shadow .16s; }
.book-spine img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .34; }
.book-spine span { position: relative; max-height: 100%; overflow: hidden; writing-mode: vertical-rl; transform: rotate(180deg); font: bold 14px Georgia,serif; letter-spacing: 1px; text-shadow: 1px 1px 2px #100703,-1px -1px 2px #100703; }
.book-spine:hover,.book-spine[aria-pressed="true"] { transform: translateY(-8px); box-shadow: 4px 12px 10px #150704; }
.book-spine:focus-visible { outline: 3px solid #f5d17e; outline-offset: 3px; }
.library-selected { display: flex; align-items: flex-start; gap: 24px; padding: 24px; margin-top: 34px; border: 1px solid #875d38; border-radius: 7px; background: #17110eee; }
.library-selected[hidden] { display: none; }
.selected-cover { flex: 0 0 155px; display: grid; place-items: center; width: 155px; height: 215px; border: 5px solid #5a3524; border-left-width: 12px; border-radius: 3px 7px 7px 3px; background: #403020; color: #d6b278; box-shadow: 5px 7px 12px #0008; }
.selected-cover img { width: 100%; height: 100%; object-fit: contain; }
.selected-cover span { font-size: 5rem; }
.selected-info { min-width: 0; flex: 1; }
.selected-info h2 { color: #ecd6b1; overflow-wrap: anywhere; }
.library-meta { color: #b9aa94; font-size: .88rem; }
.library-excerpt { margin: 12px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.library-actions { display: flex; gap: 10px; margin-top: auto; flex-wrap: wrap; }
.library-actions a,.library-actions button { padding: 7px 10px; border: 1px solid #8c683d; border-radius: 4px; background: #382619; color: #f3ddba; font: inherit; cursor: pointer; text-decoration: none; }
#subscription-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 18px 0; }
#subscription-controls[hidden],#my-library-subscriptions[hidden] { display: none; }
#library-subscribe { padding: 10px 16px; border: 1px solid #b58a4c; border-radius: 5px; background: #6b491f; color: #fff1d2; cursor: pointer; font: inherit; }
#library-subscribe[aria-pressed="true"] { background: #30261b; }
#library-subscriber-count { color: #baa88d; }
#my-library-subscriptions { margin-top: 45px; padding: 22px; border: 1px solid #684b2d; border-radius: 6px; background: #15100deb; }
#my-library-subscriptions h2 { margin-bottom: 12px; }
#subscribed-authors { display: flex; flex-wrap: wrap; gap: 12px; }
#subscribed-authors a { color: #e7cc9e; padding: 8px 12px; border: 1px solid #8c683d; border-radius: 4px; text-decoration: none; }
@media(max-width:600px){.library-list { border-width: 15px 12px 27px; padding: 14px 4px 18px; }.library-list::before { left: -17px; right: -17px; top: -25px; }.library-list::after { left: -17px; right: -17px; bottom: -33px; }.bookshelf-shelf { gap: 4px; min-height: 210px; padding: 12px 6px 17px; }.book-spine { flex-basis: 48px; width: 48px; }.library-selected { flex-direction: column; }.selected-cover { align-self: center; }}
