/* Reading List styles stay inside its own panel. */
.reading-list{--book-orange:#ff9a43;color:#eee9e2;padding:4px 8px 18px}
.books-heading{padding:17px 0 26px;display:flex;align-items:center;gap:18px;justify-content:space-between;background:none;border:0}
.books-heading .books-eyebrow{font-size:9px;letter-spacing:.23em;font-weight:700;color:var(--book-orange);margin:0 0 13px}
.books-heading h1{font-size:clamp(29px,4vw,40px);letter-spacing:-.05em;line-height:1.1;margin:0;font-weight:750}
.books-heading h1 span{color:var(--book-orange)}
.books-heading p{font-size:12px;color:#a09a93;line-height:1.8;margin:12px 0 0;max-width:42ch}
.books-total{font-size:11px;color:#c29e7c;white-space:nowrap;padding:8px 12px;border:1px solid #ff9a4329;border-radius:25px;background:#ff7a0009}
.books-filters{display:flex;flex-wrap:wrap;gap:7px;border-block:1px solid #ffffff10;padding:16px 0}
.books-filters button{font:inherit;font-size:11px;font-weight:600;background:#101010;border:1px solid #ffffff18;color:#9f9a93;border-radius:8px;padding:10px 13px;cursor:pointer;transition:color .2s,border-color .2s,background .2s}
.books-filters button[aria-pressed=true]{background:#2c1b10;color:#ffac67;border-color:#935324}
.books-summary{font-size:10px;color:#8e847b;margin:19px 0 20px;letter-spacing:.035em;min-height:12px}
.books-shelf{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:25px 19px}
.book-card{min-width:0;background:linear-gradient(155deg,#131211,#0b0b0b);border:1px solid #ffffff13;border-radius:13px;overflow:hidden;transition:border-color .2s}
.book-cover-stage{position:relative;padding:25px 27px 23px;background:radial-gradient(ellipse at 50% 65%,#a05c1620,transparent 74%),linear-gradient(#171410,#0e0c0a);border-bottom:1px solid #8c573331;}
.book-cover-stage::after{content:"";position:absolute;height:5px;bottom:0;left:12px;right:12px;border-radius:2px;background:linear-gradient(#5c3a222b,#0009);box-shadow:0 6px 8px #0004}
.book-cover-object{position:relative;aspect-ratio:2/3;max-width:190px;margin:auto;filter:drop-shadow(6px 10px 8px #0009);transition:transform .25s}
.book-cover-object>img{width:100%;height:100%;object-fit:contain;display:block;border-radius:2px 5px 5px 2px}
.book-cover-object::after{content:"";position:absolute;inset:0;pointer-events:none;border-radius:2px 5px 5px 2px;box-shadow:inset 3px 0 4px #fff2,inset -1px 0 #fff1;background:linear-gradient(90deg,transparent 3%,#0002 4%,transparent 7%)}
.book-cover-fallback{height:100%;padding:23px 17px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;background:linear-gradient(140deg,#503119,#241910);border:1px solid #a7743e42;border-radius:3px 5px 5px 3px}
.book-cover-fallback svg{width:30px;height:30px;color:#ca8c52;margin-bottom:22px;flex-shrink:0}
.book-cover-fallback span{color:#e9cfb3;font:500 19px/1.35 Georgia,serif;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:5;-webkit-box-orient:vertical;overflow:hidden}
.book-cover-fallback small{font-size:9px;color:#b59b83;margin-top:16px;overflow-wrap:anywhere;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.book-pick{position:absolute;top:12px;right:10px;padding:5px 8px;border-radius:5px;background:#281b10eb;border:1px solid #ef9b4347;color:#ffb364;font-size:9px;letter-spacing:.025em;box-shadow:0 2px 6px #0006}
.book-pick span{margin-right:3px}
.book-card-body{padding:18px 17px 20px}
.book-status{font-size:9px;color:#d29c66;display:inline-flex;align-items:center;gap:5px;line-height:1.5}
.book-status.is-finished{color:#aaa59e}
.book-status span{font-size:9px}
.book-card h2{font-size:15px;line-height:1.45;font-weight:650;letter-spacing:-.018em;margin:10px 0 5px;overflow-wrap:anywhere}
.book-author{font-size:11px;color:#8f8982;line-height:1.65;margin:0;overflow-wrap:anywhere}
.book-notes{margin-top:17px;border-top:1px solid #ffffff12;padding-top:12px}
.book-notes summary{cursor:pointer;list-style:none;font-size:10px;color:#d4ac85;display:flex;justify-content:space-between;gap:12px;line-height:1.6}
.book-notes summary::-webkit-details-marker{display:none}
.book-notes[open] summary span{transform:rotate(90deg)}
.book-notes p{font-size:11px;line-height:1.9;color:#aaa29a;margin:12px 0 0;white-space:pre-wrap;overflow-wrap:anywhere}
.books-shelf.is-empty{display:block}
.books-empty{text-align:center;padding:65px 22px;border:1px dashed #ff9a4326;border-radius:16px;background:radial-gradient(ellipse at 50% 25%,#ff7a0009,transparent 70%)}
.books-empty svg{width:44px;height:44px;color:#c18149;margin-bottom:15px}
.books-empty h2{font-size:17px;letter-spacing:-.025em;margin:0 0 10px}
.books-empty p{font-size:12px;color:#938a82;line-height:1.8;margin:0}
.books-admin-bar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 0 20px}
.books-admin-bar p{font-size:11px;line-height:1.7;color:#a39a92;margin:0}
.books-admin-bar button{flex-shrink:0}
.book-editor{margin:0 0 22px;padding:22px}
.books-editor-heading{display:flex;justify-content:space-between;gap:12px;align-items:center}
.books-editor-heading h2{font-size:16px;margin:0 0 9px}
#bookDraftStatus{font-size:10px;color:#c19569}
.book-form-grid{display:grid;grid-template-columns:1fr 1fr;gap:15px}
.book-form-grid .field{min-width:0}
.book-field-help{font-size:10px;line-height:1.7;color:#8e857c;margin:8px 0 0}
.book-check{display:flex;align-items:center;gap:9px;font-size:11px;line-height:1.7;color:#b9afa4;margin:14px 0}
#booksPanel .book-check input{width:16px;height:16px;min-height:16px;accent-color:#ff963e;flex-shrink:0}
.book-cover-preview img{display:block;width:70px;height:100px;object-fit:contain;margin-top:10px}
.book-form-actions{display:flex;flex-wrap:wrap;gap:8px;margin-top:20px}
.book-manage{display:flex;flex-wrap:wrap;gap:5px;margin-top:18px;padding-top:13px;border-top:1px solid #ffffff12}
.book-manage .btn{font-size:10px;padding:7px 9px;min-height:32px}
.book-manage .btn-delete{margin-left:auto}
.reading-list button:focus-visible,.book-notes summary:focus-visible{outline:2px solid #ff963e;outline-offset:3px}
@media(hover:hover){.book-card:hover{border-color:#a76a344d}.book-card:hover .book-cover-object{transform:translateY(-3px) rotate(-1deg)}.books-filters button:hover{color:#ffc18a;border-color:#84532b}}
@media(max-width:700px){.reading-list{padding:0 2px 12px}.books-shelf{grid-template-columns:repeat(2,minmax(0,1fr));gap:18px 12px}.book-cover-stage{padding:21px 22px}.book-form-grid{grid-template-columns:1fr;gap:0}.book-card-body{padding:16px 13px}}
@media(max-width:440px){.books-heading{gap:10px;padding-top:10px}.books-heading p{font-size:11px}.books-total{padding:7px 9px;font-size:10px}.books-filters{gap:6px}.books-filters button{font-size:10px;padding:9px 10px}.book-cover-stage{padding:24px 16px 20px}.book-pick{font-size:8px;top:8px;right:6px;padding:4px 6px}.book-card h2{font-size:13px}.book-author{font-size:10px}.book-cover-fallback{padding:16px 10px}.book-cover-fallback svg{width:24px;height:24px;margin-bottom:12px}.book-cover-fallback span{font-size:15px}.book-cover-fallback small{font-size:8px;margin-top:10px}.book-editor{padding:16px}.books-admin-bar{align-items:flex-start}.books-admin-bar p{font-size:10px}.book-manage .btn{padding:6px 7px}.books-empty{padding:48px 20px}}
@media(max-width:360px){.books-shelf{gap:14px 9px}.book-cover-stage{padding:23px 12px 17px}.book-card-body{padding:13px 10px}.book-card h2{font-size:12px}.book-status{font-size:8px}.book-cover-fallback span{font-size:13px}.book-cover-fallback small{display:none}}
@media(prefers-reduced-motion:reduce){.book-cover-object,.book-card,.books-filters button{transition:none}.book-card:hover .book-cover-object{transform:none}}

/* Public books share one collection; reading status remains an admin control. */
.books-public .books-heading{border-bottom:1px solid #ffffff10;margin-bottom:24px}
.books-public .books-summary:not(.hidden){margin:0 0 18px}
.books-public .book-card h2{margin-top:0}

/* Public mobile reading: compact shelf and a native, accessible notes sheet. */
.book-note-trigger{display:none}
.book-note-dialog{display:none;width:100%;max-width:600px;height:min(82vh,640px);height:min(82dvh,640px);max-height:calc(100% - 24px);margin:auto auto 0;padding:0;overflow:hidden;border:1px solid #493a28;border-bottom:0;border-radius:24px 24px 0 0;background:#151310;color:#eee9e2;box-shadow:0 -16px 50px #0006;font-family:inherit}
.book-note-dialog[open]{display:flex;animation:book-note-enter .25s cubic-bezier(.2,.7,.2,1)}
.book-note-dialog::backdrop{background:#0009}
.book-note-sheet{display:flex;flex-direction:column;min-height:0;width:100%}
.book-note-grip{flex-shrink:0;width:35px;height:4px;border-radius:4px;background:#645c51;margin:10px auto 1px}
.book-note-top{display:flex;align-items:center;justify-content:space-between;padding:3px 12px 3px 20px;flex-shrink:0}
.book-note-top>span{font-size:9px;letter-spacing:1.9px;font-weight:700;color:#ff9a43}
#bookNoteClose{width:44px;height:44px;display:grid;place-items:center;padding:0;border:0;border-radius:12px;background:transparent;color:#cfc8bd;font-family:inherit;font-size:25px;font-weight:400;line-height:1;cursor:pointer}
#bookNoteClose:focus-visible,.book-note-content:focus-visible{outline:2px solid #ff963e;outline-offset:-4px}
.book-note-heading{display:flex;align-items:center;gap:14px;padding:7px 21px 21px;border-bottom:1px solid #352c21;flex-shrink:0}
.book-note-heading>div{min-width:0}
#bookNoteCover{width:48px;height:69px;object-fit:contain;flex-shrink:0;filter:drop-shadow(3px 3px 4px #0005)}
#bookNoteCover[hidden]{display:none}
#bookNoteTitle{margin:0;font-size:19px;line-height:1.3;letter-spacing:-.4px;font-weight:650;overflow-wrap:anywhere}
#bookNoteAuthor{font-size:12px;line-height:1.5;color:#aaa399;margin:7px 0 0;overflow-wrap:anywhere}
.book-note-content{overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#5a4a34 transparent;padding:20px 22px max(20px,env(safe-area-inset-bottom));flex:1;min-height:0}
.book-note-content p{margin:0 0 17px;color:#d4cfc6;font-size:14px;line-height:1.8;white-space:pre-wrap;overflow-wrap:anywhere}
.book-note-content p:first-child{color:#f1ece3}
@keyframes book-note-enter{from{transform:translateY(30%);opacity:.4}to{transform:translateY(0);opacity:1}}
@media(max-width:700px){
 .books-public .books-heading{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:0 10px;border:0;padding:10px 0 0;margin-bottom:18px}
 .books-public .books-heading>div{display:contents}
 .books-public .books-heading .books-eyebrow{grid-column:1/-1;margin:0 0 6px}
 .books-public .books-heading h1{grid-row:2;grid-column:1;font-size:28px;line-height:1.15}
 .books-public .books-total{grid-row:2;grid-column:2;padding:5px 10px;font-size:11px;align-self:center}
 .books-public .books-heading p:not(.books-eyebrow){grid-row:3;grid-column:1/-1;margin:8px 0 0;font-size:12px;line-height:1.6;max-width:300px}
 .books-public .books-shelf{gap:12px}
 .books-public .book-card{display:flex;flex-direction:column}
 .books-public .book-cover-stage{height:188px;padding:15px 14px 12px}
 .books-public .book-cover-object{height:100%;width:auto;max-width:100%}
 .books-public .book-card-body{padding:12px 11px 0;display:flex;flex-direction:column;flex:1}
 .books-public .book-card h2{font-size:12px;line-height:1.45;margin:0;min-height:35px}
 .books-public .book-author{font-size:11px;line-height:1.5;min-height:33px;margin:4px 0 12px}
 .books-public .book-author:last-child{margin-bottom:16px}
 .books-public .book-notes{display:none}
 .books-public .book-note-trigger{display:flex;width:100%;align-items:center;justify-content:space-between;gap:5px;margin-top:auto;padding:11px 0;min-height:44px;border:0;border-top:1px solid #ffffff12;border-radius:0;background:transparent;color:#e6b66f;font-family:inherit;font-size:11px;line-height:1.5;text-align:left;cursor:pointer}
 .books-public .book-note-trigger>span:last-child{font-size:15px}
}
@media(max-width:360px){.books-public .book-cover-stage{padding:12px 10px}.books-public .books-shelf{gap:9px}.books-public .book-card-body{padding-left:10px;padding-right:10px}}
@media(prefers-reduced-motion:reduce){.book-note-dialog[open]{animation:none}}

/* Book ratings belong to the owner; the public row opens the photo gallery. */
.book-card-body{display:flex;flex-direction:column}
.book-rating-trigger{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;min-height:48px;margin-top:auto;padding:10px 0;border:0;border-top:1px solid #ffffff1c;background:none;color:#b5afa6;font:inherit;cursor:pointer;text-align:left}
.book-stars{display:inline-flex;gap:3px;white-space:nowrap;color:#72695d;line-height:1}
.book-star{font-size:19px}
.book-star.is-filled{color:#f5b647}
.book-rating-value{font-size:12px;white-space:nowrap}
.book-rating-trigger:hover .book-stars{color:#b0946d}
.book-rating-trigger:focus-visible,.book-gallery button:focus-visible{outline:2px solid #f5b647;outline-offset:3px}
.book-rating-admin{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:12px 0;font-size:13px;color:#b5afa6}
.book-rating-field{border:0;padding:0;margin:16px 0}
.book-rating-field legend{margin-bottom:8px;font-size:14px;font-weight:600}
.book-rating-options{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.book-rating-option{position:relative;display:grid;place-items:center;min-width:44px;min-height:44px;border:1px solid #ffffff24;border-radius:9px;cursor:pointer;color:#8a8176;background:#ffffff03}
.book-rating-option input{position:absolute;opacity:0;width:1px;height:1px}
.book-rating-option span{font-size:26px;line-height:1}
.book-rating-option.is-filled{color:#f5b647;border-color:#f5b64750;background:#f5b6470c}
.book-rating-option:focus-within{outline:2px solid #f5b647;outline-offset:2px}
.book-rating-reset{min-height:44px;font-size:13px}
.book-photos-preview{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px;margin:12px 0}
.book-photo-preview{min-width:0;padding:8px;border:1px solid #ffffff24;border-radius:10px;background:#111}
.book-photo-preview img{display:block;width:100%;height:110px;object-fit:contain;border-radius:5px}
.book-photo-preview button{width:100%;min-height:40px;margin-top:6px;font-size:12px}
.book-photo-upload{display:block;margin:12px 0;font-size:14px}
.book-photo-upload input{display:block;margin-top:8px;max-width:100%}
.book-gallery{box-sizing:border-box;width:calc(100% - 32px);max-width:680px;max-height:calc(100dvh - 32px);padding:0;border:1px solid #5e482d;border-radius:20px;background:#11100e;color:#eee9e2;box-shadow:0 20px 80px #0009}
.book-gallery::backdrop{background:#000c}
.book-gallery-shell{display:flex;flex-direction:column;padding:20px;gap:14px}
.book-gallery-top{display:flex;align-items:center;justify-content:space-between;gap:16px}
.book-gallery-kicker{font-size:12px;letter-spacing:.14em;color:#d7aa64;font-weight:650}
.book-gallery-close{width:44px;height:44px;flex-shrink:0;border:1px solid #ffffff24;border-radius:12px;background:#ffffff05;color:#e9e3da;font-size:24px;cursor:pointer}
.book-gallery-heading h2{font-size:20px;line-height:1.4;margin:0 0 5px;overflow-wrap:anywhere}
.book-gallery-heading p{font-size:14px;color:#a9a296;margin:0;overflow-wrap:anywhere}
.book-gallery-rating{font-size:16px;letter-spacing:2px;color:#f5b647}
.book-gallery-stage{display:grid;place-items:center;min-height:180px;max-height:55dvh;background:#080807;border:1px solid #ffffff12;border-radius:12px;overflow:hidden}
.book-gallery-stage img{display:block;max-width:100%;width:auto;height:auto;max-height:55dvh;object-fit:contain}
.book-gallery-stage img[hidden],.book-gallery-stage p[hidden],.book-gallery-nav button[hidden]{display:none}
.book-gallery-empty{padding:30px 20px;text-align:center;color:#aaa296;font-size:14px;line-height:1.7}
.book-gallery-nav{display:flex;align-items:center;justify-content:center;gap:18px;min-height:44px}
.book-gallery-nav button{min-height:44px;padding:8px 14px;background:#ffffff06;border:1px solid #ffffff24;border-radius:9px;color:#eee4d5;cursor:pointer;font-size:14px}
.book-gallery-nav button:disabled{opacity:.35;cursor:default}
.book-gallery-count{min-width:42px;text-align:center;color:#b9afa1;font-size:13px}
@media(max-width:700px){
 .books-public .book-card-body{padding-bottom:0}
 .books-public .book-rating-trigger{min-height:46px;gap:5px}
 .books-public .book-stars{gap:2px}
 .books-public .book-star{font-size:17px}
 .books-public .book-rating-value{font-size:12px}
 .book-gallery{width:100%;max-width:100%;max-height:92dvh;margin:auto 0 0;border-radius:20px 20px 0 0;border-bottom:0}
 .book-gallery-shell{padding:16px 16px max(18px,env(safe-area-inset-bottom));gap:12px}
 .book-gallery-heading h2{font-size:18px}
 .book-gallery-stage,.book-gallery-stage img{max-height:50dvh}
 .book-photos-preview{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media(max-width:360px){
 .books-public .book-star{font-size:15px}
 .books-public .book-stars{gap:1px}
}
