:root{--ink:#22372f;--muted:#758078;--green:#29644e;--line:#e3e7df;--paper:#f6f5ef}
#books-panel *{box-sizing:border-box}
#books-panel{margin:0;background:var(--paper);color:var(--ink);font:14px/1.5 system-ui,-apple-system,Segoe UI,sans-serif}
#books-panel a{color:var(--green)}
#books-panel button,#books-panel input,#books-panel select{font:inherit}
#books-panel button{cursor:pointer}
#books-panel button:focus-visible,#books-panel a:focus-visible,#books-panel input:focus-visible,#books-panel select:focus-visible,#books-panel summary:focus-visible{outline:3px solid #b88a39;outline-offset:4px}
#books-panel [hidden]{display:none!important}
#books-panel header{padding:44px max(24px,calc((100vw - 1640px)/2)) 34px;background:#203e32;color:#faf8ed;position:relative;border-bottom:5px solid #c7ac76}
#books-panel .eyebrow{font-size:11px;letter-spacing:3px;text-transform:uppercase;color:#c8d4c5}
#books-panel h1{font:normal clamp(38px,4vw,62px)/1.15 Georgia,serif;margin:12px 0 16px;letter-spacing:-1.7px}
#books-panel header p{max-width:800px;color:#d0d9cd;margin:0;font-size:15px}
#books-panel .version-badge{display:inline-block;font:600 12px/1.5 system-ui;letter-spacing:1px;border:1px solid #7d9882;color:#e1d4b5;border-radius:20px;padding:5px 12px;vertical-align:middle;margin-left:14px}
#books-panel .stats{display:flex;flex-wrap:wrap;gap:18px 35px;margin-top:26px}
#books-panel .stats b{display:block;font-size:24px;font-weight:500}
#books-panel .stats span{font-size:11px;color:#bdccbe}
#books-panel main{max-width:1688px;margin:0 auto;padding:28px 24px 50px}
#books-panel .controls{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin:0 0 14px;scroll-margin-top:20px}
#books-panel input,#books-panel select,#books-panel .controls button{border:1px solid #d5ddd2;border-radius:9px;padding:11px 13px;background:#fff;color:var(--ink);min-height:44px}
#books-panel input{flex:1 1 300px;min-width:0}
#books-panel select{max-width:100%;flex:0 1 auto}
#books-panel .controls button:hover{background:#e9eee4}
#books-panel #reset{background:#e7ece2}
#books-panel .mobile-sort{display:block}
#books-panel #count{color:var(--muted);font-size:13px;margin:17px 0 22px}
#books-panel .gallery-heading{display:flex;align-items:baseline;justify-content:space-between;border-bottom:1px solid var(--line);margin:0 0 22px}
#books-panel .gallery-heading h2{font:normal 27px Georgia,serif;margin:0 0 12px}
#books-panel .gallery-heading span{color:var(--muted);font-size:12px}
#books-panel .table-wrap{background:transparent;overflow:visible}
#books-panel table{display:block;width:100%;border:0}
#books-panel thead{display:none}
#books-panel tbody{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:22px 20px}
#books-panel tbody tr{display:flex;flex-direction:column;position:relative;background:#fff;border:1px solid var(--line);border-radius:13px;padding:13px 13px 14px;min-width:0;transition:box-shadow .18s,border-color .18s}
#books-panel tbody tr:hover{box-shadow:0 10px 28px #203e3210;border-color:#c6d1c1}
#books-panel td{display:block;padding:0;border:0;min-width:0;max-width:100%;width:auto}
#books-panel td.number{position:absolute;right:12px;top:10px;color:#9ba298;font-size:10px;z-index:1}
#books-panel .cover{order:0;height:228px;display:flex;align-items:center;justify-content:center;margin:3px 0 12px;background:#f7f7f2;border-radius:7px;padding:15px 7px}
#books-panel .cover a{display:flex;width:100%;height:100%;align-items:center;justify-content:center}
#books-panel .cover img{display:block;max-width:100%;width:auto;height:auto;max-height:206px;object-fit:contain;filter:drop-shadow(3px 6px 4px #0003)}
#books-panel .missing{height:218px;width:145px;max-width:100%;background:#eeeede;border:1px dashed #c7cebe;display:flex;align-items:center;justify-content:center;text-align:center;color:#808976;border-radius:3px;font-size:12px;padding:20px}
#books-panel td:nth-child(3){order:1;position:relative;padding-right:29px}
#books-panel td:nth-child(3)>strong{display:block;font-size:16px;line-height:1.35;font-weight:650;min-width:0;overflow-wrap:anywhere}
#books-panel td:nth-child(4){order:2;margin:7px 0 5px}
#books-panel .author-filter{display:inline;background:transparent;border:0;border-radius:3px;padding:0;color:#3e725a;text-align:left;font-size:13px;line-height:1.5;white-space:normal}
#books-panel .author-filter:hover{text-decoration:underline;background:transparent}
#books-panel .first-publication{display:block;font-size:11px;line-height:1.5;margin:7px 0 0;color:var(--muted)}
#books-panel .first-publication a{padding:3px;color:#73876a;text-decoration:none}
#books-panel .publication-unknown{color:#a18451}
#books-panel .note{display:block;font-size:11px;color:#a67f31;margin-top:6px}
#books-panel td:nth-child(5){order:3;margin-bottom:8px}
#books-panel .tag{display:inline-block;font-size:10px;letter-spacing:.2px;background:#f0f1e9;border-radius:4px;color:#65745d;padding:3px 7px;white-space:normal}
#books-panel .format{order:4;margin:0 0 7px;font-size:11px}
#books-panel .format-pill{display:inline-block;border-radius:4px;padding:3px 6px;font-size:10px;font-weight:600;margin:2px 4px 2px 0}
#books-panel .physical{background:#e7eee1;color:#476d40}
#books-panel .electronic{background:#e9eef6;color:#57749e}
#books-panel .audiobook{background:#efe8f5;color:#806198}
#books-panel .sample{background:#fff0d8;color:#96611f}
#books-panel .format small{display:block;font-size:10px;color:#7b8579;margin:3px 0;overflow-wrap:anywhere}
#books-panel .files{font-size:10px;margin-top:5px;overflow-wrap:anywhere}
#books-panel .files summary{cursor:pointer;color:#7a8477}
#books-panel .files ul{padding-left:16px;margin:5px 0}
#books-panel .files li{margin:4px 0}
#books-panel .rating{order:5;border-top:1px solid #edf0e8;padding-top:8px;margin-top:auto;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:3px 5px;align-items:center}
#books-panel .rating-stars{width:min(100px,100%);height:auto;display:block}
#books-panel .score{font-size:12px;font-weight:600;white-space:nowrap}
#books-panel .rating small{grid-column:1/-1;font-size:10px;color:var(--muted)}
#books-panel .rating small br{display:none}
#books-panel .rating small a{margin-left:5px;text-decoration:none;color:#788b72}
#books-panel .unrated{font-size:11px;color:#8f9889;grid-column:1/-1}
#books-panel .desc{display:none}
#books-panel .info-button{position:absolute;right:0;top:0;background:transparent;color:#758b68;border:1.5px solid #8da27e;border-radius:50%;width:22px;height:22px;padding:0;font:italic bold 14px/20px Georgia,serif}
#books-panel .info-button:hover{background:#e7eee0;color:#28492e}
#books-panel #book-info{position:fixed;inset:auto;margin:0;width:min(420px,calc(100vw - 28px));max-height:min(580px,calc(100dvh - 32px));overflow:auto;border:1px solid #ced8c5;border-radius:14px;padding:23px 24px 24px;box-shadow:0 16px 60px #18342435;background:#fffef9;color:var(--ink)}
#books-panel #book-info::backdrop{background:#203e321c}
#books-panel #book-info h2{font:normal 24px/1.3 Georgia,serif;padding-right:20px;margin:0 0 8px}
#books-panel #info-author{font-size:12px;color:#738367;margin:0 0 18px}
#books-panel #info-description{font-size:14px;line-height:1.7;margin:0}
#books-panel .close-info{position:absolute;right:12px;top:10px;border:0;background:transparent;color:#738367;font-size:24px;padding:0;width:30px;height:30px}
#books-panel footer{border-top:1px solid #dce2d5;margin-top:38px;padding-top:24px;color:#798472;font-size:12px;max-width:1050px}
#books-panel footer p{margin:10px 0}
#books-panel footer strong{font-size:inherit}
#books-panel .shelf-gallery{display:grid;grid-template-columns:repeat(auto-fit,220px);gap:16px}
#books-panel .shelf-gallery figure{margin:0;width:220px}
#books-panel .shelf-frame{width:220px;height:280px;display:flex;align-items:center;justify-content:center;background:#edece3;border-radius:8px;overflow:hidden}
#books-panel .shelf-frame img,#books-panel .shelf-frame svg{width:100%;height:100%;display:block;object-fit:contain}
#books-panel .shelf-gallery figcaption{font-size:12px;padding:8px 2px;color:var(--muted)}
#books-panel details.shelves{margin-top:35px}
#books-panel details.shelves>summary{cursor:pointer;font:normal 24px Georgia,serif;margin-bottom:20px}
@media(max-width:1250px){#books-panel tbody{grid-template-columns:repeat(4,minmax(0,1fr))}
}
@media(max-width:850px){#books-panel tbody{grid-template-columns:repeat(3,minmax(0,1fr));gap:18px 14px}
#books-panel .cover{height:212px}
#books-panel .cover img{max-height:190px}
#books-panel .stats{gap:16px 24px}
#books-panel .controls select{flex:1 1 180px}
#books-panel .controls input{flex-basis:100%}
}
@media(max-width:600px){#books-panel header{padding:30px 18px 25px}
#books-panel header p{font-size:13px}
#books-panel h1{font-size:39px}
#books-panel .version-badge{margin-left:7px;font-size:10px}
#books-panel .stats b{font-size:20px}
#books-panel .stats{gap:13px 20px}
#books-panel .stats span{font-size:10px}
#books-panel main{padding:20px 14px 35px}
#books-panel tbody{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 11px}
#books-panel tbody tr{padding:12px 10px;border-radius:10px}
#books-panel .cover{height:195px;margin:3px 0 10px;padding:10px 3px}
#books-panel .cover img{max-height:175px}
#books-panel .missing{width:110px;height:170px}
#books-panel td:nth-child(3)>strong{font-size:14px}
#books-panel .author-filter{font-size:12px}
#books-panel .rating{grid-template-columns:1fr}
#books-panel .score{font-size:11px}
#books-panel .rating-stars{width:100px}
#books-panel .rating small{font-size:9px}
#books-panel .controls select{flex-basis:100%;width:100%}
#books-panel .controls button{flex:1}
#books-panel .gallery-heading span{display:none}
#books-panel .shelf-gallery{grid-template-columns:repeat(2,minmax(0,1fr))}
#books-panel .shelf-gallery figure{width:100%}
#books-panel .shelf-frame{width:100%;height:240px}
}
@media(max-width:360px){#books-panel .cover{height:170px}
#books-panel .cover img{max-height:150px}
#books-panel td:nth-child(3)>strong{font-size:13px}
#books-panel main{padding:16px 10px}
#books-panel .stats{gap:12px 16px}
}
@media print{#books-panel header{background:white;color:var(--ink);border:0;padding:10px}
#books-panel header p,#books-panel .eyebrow,#books-panel .stats span{color:var(--muted)}
#books-panel .stats,#books-panel .controls,#books-panel .info-button,#books-panel #book-info,#books-panel .shelves{display:none}
#books-panel main{padding:0}
#books-panel tbody{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
#books-panel tbody tr{break-inside:avoid;box-shadow:none;padding:8px}
#books-panel .cover{height:170px}
#books-panel .cover img{max-height:150px}
#books-panel .files{display:none}
#books-panel .gallery-heading{margin-top:10px}
#books-panel h1{font-size:30px}
}
#books-panel #info-description .book-description{margin:0;font-size:14px;line-height:1.7}
#books-panel .book-details{border-top:1px solid var(--line);margin-top:18px;padding-top:14px;font-size:12px;line-height:1.6;overflow-wrap:anywhere}
#books-panel .book-details h3{font-size:12px;font-weight:650;margin:0 0 9px;color:var(--ink)}
#books-panel .book-details small{display:block;font-size:12px;color:#65745d;margin:7px 0}
#books-panel .book-details .note{color:#92702c}
#books-panel .book-details .files{font-size:12px;margin-top:10px}
#books-panel .book-details .files summary{padding:4px 0}
#books-panel .book-details .files ul{margin:6px 0;padding-left:18px}
#books-panel .book-details .files li{margin:5px 0}
:root{color-scheme:light}
#books-panel .theme-toggle{float:right;display:inline-flex;align-items:center;gap:8px;min-height:44px;margin:0 0 14px 18px;padding:9px 14px;border:1px solid #7d9882;border-radius:22px;background:#294b3d;color:#faf8ed;font:600 12px/1.5 system-ui;cursor:pointer}
#books-panel .theme-toggle:hover{background:#355c49}
#books-panel .theme-toggle svg{width:18px;height:18px;flex:none}
#books-panel .theme-toggle .theme-sun{display:none}
@media screen{html[data-theme="dark"] #books-panel{color-scheme:dark;--ink:#e3eae3;--muted:#a5b2a6;--green:#99d0ae;--line:#3b4d41;--paper:#16211b}
html[data-theme="dark"] #books-panel header{background:#142b20}
html[data-theme="dark"] #books-panel input,html[data-theme="dark"] #books-panel select,html[data-theme="dark"] #books-panel .controls button{background:#26372c;border-color:#4b6150;color:var(--ink)}
html[data-theme="dark"] #books-panel .controls button:hover,html[data-theme="dark"] #books-panel #reset{background:#344b3a}
html[data-theme="dark"] #books-panel tbody tr{background:#223027}
html[data-theme="dark"] #books-panel tbody tr:hover{border-color:#75917c;box-shadow:0 10px 28px #0003}
html[data-theme="dark"] #books-panel td.number{color:#a5b2a6}
html[data-theme="dark"] #books-panel .cover{background:#2c3b30}
html[data-theme="dark"] #books-panel .missing{background:#334032;border-color:#75866a;color:#c1ceb7}
html[data-theme="dark"] #books-panel .author-filter{color:#a1cfb1}
html[data-theme="dark"] #books-panel .first-publication a,html[data-theme="dark"] #books-panel .rating small a{color:#b2c7a7}
html[data-theme="dark"] #books-panel .publication-unknown,html[data-theme="dark"] #books-panel .note,html[data-theme="dark"] #books-panel .book-details .note{color:#e1bd76}
html[data-theme="dark"] #books-panel .tag{background:#354332;color:#d0ddc6}
html[data-theme="dark"] #books-panel .physical{background:#354c30;color:#c3deaf}
html[data-theme="dark"] #books-panel .electronic{background:#2c405b;color:#c0d6f4}
html[data-theme="dark"] #books-panel .audiobook{background:#483552;color:#e0c6ee}
html[data-theme="dark"] #books-panel .sample{background:#503d24;color:#f4cf94}
html[data-theme="dark"] #books-panel .format small,html[data-theme="dark"] #books-panel .files summary,html[data-theme="dark"] #books-panel .unrated,html[data-theme="dark"] #books-panel .book-details small{color:#b2c0ab}
html[data-theme="dark"] #books-panel .rating{border-color:var(--line)}
html[data-theme="dark"] #books-panel .info-button{color:#b7cea6;border-color:#94ab83}
html[data-theme="dark"] #books-panel .info-button:hover{background:#3b5032;color:#e3eedc}
html[data-theme="dark"] #books-panel #book-info{background:#223027;border-color:#63765a;box-shadow:0 16px 60px #0007}
html[data-theme="dark"] #books-panel #book-info::backdrop{background:#0007}
html[data-theme="dark"] #books-panel #info-author,html[data-theme="dark"] #books-panel .close-info{color:#b2c5a4}
html[data-theme="dark"] #books-panel footer{border-color:var(--line);color:#aebca5}
html[data-theme="dark"] #books-panel .shelf-frame{background:#2c3b30}
html[data-theme="dark"] #books-panel .theme-toggle .theme-moon{display:none}
html[data-theme="dark"] #books-panel .theme-toggle .theme-sun{display:block}
}
@media(max-width:600px){#books-panel .theme-toggle{float:none;margin:0 0 18px}
}
@media print{#books-panel .theme-toggle{display:none!important}
}
@media screen and (hover:hover) and (pointer:fine){#books-panel tbody tr{transition:transform .22s ease,box-shadow .22s ease,border-color .22s ease}
#books-panel tbody tr:hover{transform:translateY(-5px);box-shadow:0 14px 30px #203e3226;border-color:#a9bda2}
html[data-theme="dark"] #books-panel tbody tr:hover{box-shadow:0 14px 30px #0006;border-color:#8caa91}
}
@media screen and (prefers-reduced-motion:reduce){#books-panel tbody tr{transition:none}
#books-panel tbody tr:hover{transform:none}
}
#books-panel .back-to-top{position:fixed;right:calc(20px + env(safe-area-inset-right,0px));bottom:calc(20px + env(safe-area-inset-bottom,0px));z-index:100;display:flex;align-items:center;justify-content:center;width:50px;height:50px;padding:0;border:1px solid #7d9882;border-radius:50%;background:#203e32;color:#faf8ed;box-shadow:0 4px 18px #0003;cursor:pointer;transition:background .18s,box-shadow .18s}
#books-panel .back-to-top svg{width:24px;height:24px;pointer-events:none}
#books-panel .back-to-top:hover{background:#355c49;box-shadow:0 6px 22px #0005}
@media screen{html[data-theme="dark"] #books-panel .back-to-top{background:#a1cfb1;color:#16211b;border-color:#b9dfc5}
html[data-theme="dark"] #books-panel .back-to-top:hover{background:#c1e4cd}
}
@media(prefers-reduced-motion:reduce){#books-panel .back-to-top{transition:none}
}
@media print{#books-panel .back-to-top{display:none!important}
}
#records-panel .tracklist{color:#354d40;font-size:12px}
#records-panel .tracklist summary{font-weight:650;font-size:12px;padding:3px 0}
#records-panel .tracklist summary span{font-weight:400;color:#758078}
#records-panel .tracklist ol{padding-left:24px;margin:12px 0;line-height:1.55}
#records-panel .tracklist li{padding:4px 0 4px 2px;border-bottom:1px solid #f0f2ec;overflow-wrap:anywhere}
#records-panel .track-edition{font-size:10px;color:#758078}
#records-panel .grid{align-items:start}
#records-panel #records-detailNotes .tracklist{font-size:14px}
#records-panel #records-detailNotes .tracklist summary{font-size:14px}
#records-panel *{box-sizing:border-box}
#records-panel{margin:0;background:var(--paper);color:var(--ink);font:14px/1.5 system-ui,-apple-system,Segoe UI,sans-serif}
#records-panel a{color:var(--green)}
#records-panel button,#records-panel input,#records-panel select{font:inherit}
#records-panel button{cursor:pointer}
#records-panel [hidden]{display:none!important}
#records-panel :focus-visible{outline:3px solid #b88a39;outline-offset:4px}
#records-panel header{padding:44px max(24px,calc((100vw - 1640px)/2)) 34px;background:#203e32;color:#faf8ed;border-bottom:5px solid #c7ac76}
#records-panel .eyebrow{font-size:11px;letter-spacing:3px;text-transform:uppercase;color:#c8d4c5}
#records-panel h1{font:normal clamp(38px,4vw,62px)/1.15 Georgia,serif;margin:12px 0 16px;letter-spacing:-1.7px}
#records-panel header p{color:#d0d9cd;max-width:800px;margin:0;font-size:15px}
#records-panel .badge{display:inline-block;font:600 12px/1.5 system-ui;letter-spacing:1px;border:1px solid #7d9882;color:#e1d4b5;border-radius:20px;padding:5px 12px;vertical-align:middle;margin-left:14px}
#records-panel .stats{display:flex;flex-wrap:wrap;gap:18px 35px;margin-top:26px}
#records-panel .stats b{display:block;font-size:24px;font-weight:500}
#records-panel .stats span{font-size:11px;color:#bdccbe}
#records-panel main{max-width:1688px;margin:auto;padding:28px 24px 50px}
#records-panel .controls{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
#records-panel input,#records-panel select,#records-panel .controls button{border:1px solid #d5ddd2;border-radius:9px;padding:11px 13px;background:white;color:var(--ink);min-height:44px}
#records-panel input{flex:1 1 300px;min-width:0}
#records-panel select{max-width:100%}
#records-panel .controls button:hover{background:#e9eee4}
#records-panel #records-reset{background:#e7ece2}
#records-panel #records-count{color:var(--muted);font-size:13px;margin:17px 0 22px}
#records-panel .heading{display:flex;align-items:baseline;justify-content:space-between;border-bottom:1px solid var(--line);margin-bottom:22px}
#records-panel .heading h2{font:normal 27px Georgia,serif;margin:0 0 12px}
#records-panel .heading span{font-size:12px;color:var(--muted)}
#records-panel .grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:28px 22px}
#records-panel article{background:#fff;border:1px solid var(--line);border-radius:13px;padding:16px 15px 17px;min-width:0;position:relative;display:flex;flex-direction:column}
#records-panel article:hover{box-shadow:0 10px 28px #203e3210;border-color:#c6d1c1}
#records-panel .number{position:absolute;top:7px;right:11px;font-size:10px;color:#9ba298}
#records-panel .cover{width:100%;aspect-ratio:1;border:0;background:#f7f7f2;border-radius:7px;padding:9px;margin:5px 0 17px;display:flex;align-items:center;justify-content:center}
#records-panel .cover img{width:100%;height:100%;object-fit:contain;filter:drop-shadow(3px 5px 4px #0003)}
#records-panel h3{font-size:16px;line-height:1.35;margin:0;overflow-wrap:anywhere;font-weight:650}
#records-panel .artist{color:#3e725a;background:transparent;border:0;padding:0;text-align:left;font-size:13px;margin:7px 0 10px}
#records-panel .artist:hover{text-decoration:underline}
#records-panel .meta{display:flex;align-items:center;justify-content:space-between;gap:6px;font-size:12px;color:var(--muted)}
#records-panel .year{font-variant-numeric:tabular-nums}
#records-panel .tag{font-size:10px;letter-spacing:.7px;background:#edf1e8;color:#65745d;border-radius:4px;padding:3px 7px}
#records-panel .note{font-size:11px;color:#a67f31;margin:8px 0 0}
#records-panel details{border-top:1px solid #edf0e8;padding-top:11px;margin-top:14px;font-size:11px;color:var(--muted)}
#records-panel summary{cursor:pointer;color:#5c775d;min-height:22px}
#records-panel details p{margin:8px 0}
#records-panel .missing{display:flex;flex-direction:column;gap:12px;align-items:center;justify-content:center;color:#8b9183;font-size:11px}
#records-panel .record{width:85px;height:85px;border-radius:50%;background:repeating-radial-gradient(circle,#263a32 0 2px,#30473c 3px 4px);position:relative}
#records-panel .record:after{content:'';position:absolute;inset:30px;border-radius:50%;background:#c7ac76;border:9px solid #b59d6c}
#records-panel footer{border-top:1px solid #dce2d5;margin-top:38px;padding-top:20px;color:#798472;font-size:12px;max-width:1050px}
#records-panel dialog{border:1px solid #ced8c5;border-radius:14px;background:#fffef9;color:var(--ink);width:min(550px,calc(100% - 28px));padding:26px;max-height:90vh;overflow:auto}
#records-panel dialog::backdrop{background:#14291fe0}
#records-panel dialog img{width:100%;max-height:60vh;object-fit:contain}
#records-panel dialog h2{font:normal 28px Georgia,serif;margin:14px 0 5px}
#records-panel .close{float:right;background:none;border:0;font-size:28px;color:var(--muted)}
#records-panel #records-empty{padding:40px;border:1px dashed #bdc9b8;border-radius:12px;text-align:center}
#records-panel .smallprint{font-size:12px;color:var(--muted)}
@media(max-width:1250px){#records-panel .grid{grid-template-columns:repeat(4,minmax(0,1fr))}
}
@media(max-width:850px){#records-panel .grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:18px 14px}
#records-panel .controls input{flex-basis:100%}
}
@media(max-width:600px){#records-panel header{padding:30px 18px 25px}
#records-panel header p{font-size:13px}
#records-panel h1{font-size:38px}
#records-panel .badge{margin:10px 0 0}
#records-panel .stats{gap:13px 22px}
#records-panel .stats b{font-size:20px}
#records-panel main{padding:20px 14px 35px}
#records-panel .grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:16px 11px}
#records-panel article{padding:12px 10px}
#records-panel .cover{padding:4px}
#records-panel h3{font-size:14px}
#records-panel .artist{font-size:12px}
#records-panel .controls select{width:100%}
#records-panel .controls button{flex:1}
#records-panel .heading span{display:none}
#records-panel .heading h2{font-size:25px}
}
@media print{#records-panel header{background:white;color:var(--ink);padding:10px}
#records-panel header p,#records-panel .eyebrow{color:var(--muted)}
#records-panel .stats,#records-panel .controls,#records-panel details,#records-panel .heading span{display:none}
#records-panel main{padding:0}
#records-panel .grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
#records-panel article{break-inside:avoid}
#records-panel h1{font-size:30px}
}

*{box-sizing:border-box}body{margin:0;background:var(--paper);color:var(--ink);font:14px/1.5 system-ui,-apple-system,Segoe UI,sans-serif}[hidden]{display:none!important}button,input,select{font:inherit}button{cursor:pointer}a{color:var(--green)}:focus-visible{outline:3px solid #b88a39;outline-offset:4px}
.shell-header{padding:38px max(24px,calc((100vw - 1640px)/2)) 30px;background:#203e32;color:#faf8ed;border-bottom:5px solid #c7ac76}.shell-eyebrow{font-size:11px;letter-spacing:3px;text-transform:uppercase;color:#c8d4c5}.shell-header h1{font:normal clamp(36px,4vw,58px)/1.15 Georgia,serif;letter-spacing:-1.5px;margin:14px 0}.shell-header p{font-size:15px;color:#d0d9cd;max-width:780px}.shell-badge{display:inline-block;font:600 12px/1.5 system-ui;letter-spacing:1px;border:1px solid #7d9882;color:#e1d4b5;border-radius:20px;padding:5px 12px;vertical-align:middle;margin-left:12px}.shell-totals{display:flex;flex-wrap:wrap;gap:24px;margin-top:24px}.shell-totals b{font-size:24px;font-weight:500}.shell-totals span{font-size:12px;color:#bdccbe;margin-left:7px}
.theme-toggle{float:right;display:inline-flex;align-items:center;gap:8px;min-height:44px;margin:0 0 14px 18px;padding:9px 14px;border:1px solid #7d9882;border-radius:22px;background:#294b3d;color:#faf8ed;font:600 12px/1.5 system-ui;cursor:pointer}.theme-toggle:hover{background:#355c49}.theme-toggle svg{width:18px;height:18px}.theme-toggle .theme-sun{display:none}
.collection-nav{position:sticky;top:0;z-index:20;background:var(--paper);border-bottom:1px solid var(--line);padding:12px max(24px,calc((100vw - 1640px)/2));display:flex;gap:10px}.collection-tab{display:flex;align-items:center;gap:10px;border:1px solid var(--line);border-radius:10px;padding:11px 22px;background:#fff;color:var(--ink);font-weight:650;min-height:48px}.collection-tab span{font-size:11px;font-weight:500;opacity:.8}.collection-tab[aria-selected="true"]{background:#29644e;border-color:#29644e;color:#fff}.collection-tab:hover{border-color:#75917c}
.collection-summary{max-width:1688px;margin:auto;padding:26px 24px 0}.collection-summary h2{font:normal 30px Georgia,serif;margin:0}.collection-summary .stats{margin-top:18px}.collection-summary .stats span{color:var(--muted)!important}.collection-summary .stats b{font-size:21px!important}#books-panel .controls,#records-panel .controls{scroll-margin-top:90px}#records-panel .cover{height:auto;order:initial}#records-panel .cover img{max-height:none;max-width:100%;display:block}#records-panel .controls input[type="checkbox"]{flex:none;width:auto}
.back-to-top{position:fixed;right:calc(20px + env(safe-area-inset-right,0px));bottom:calc(20px + env(safe-area-inset-bottom,0px));z-index:100;display:flex;align-items:center;justify-content:center;width:50px;height:50px;padding:0;border:1px solid #7d9882;border-radius:50%;background:#203e32;color:#faf8ed;box-shadow:0 4px 18px #0003;cursor:pointer}.back-to-top svg{width:24px;height:24px}.back-to-top:hover{background:#355c49}
@media screen{html[data-theme="dark"] .shell-header{background:#142b20}html[data-theme="dark"] .theme-toggle .theme-moon{display:none}html[data-theme="dark"] .theme-toggle .theme-sun{display:block}html[data-theme="dark"] .collection-tab{background:#26372c;border-color:#4b6150;color:#e3eae3}html[data-theme="dark"] .collection-tab[aria-selected="true"]{background:#99d0ae;color:#16211b;border-color:#99d0ae}html[data-theme="dark"] .back-to-top{background:#a1cfb1;color:#16211b}
html[data-theme="dark"] #records-panel input,html[data-theme="dark"] #records-panel select,html[data-theme="dark"] #records-panel .controls button{background:#26372c;border-color:#4b6150;color:var(--ink)}html[data-theme="dark"] #records-panel #records-reset,html[data-theme="dark"] #records-panel .controls button:hover{background:#344b3a}html[data-theme="dark"] #records-panel article{background:#223027}html[data-theme="dark"] #records-panel .cover{background:#2c3b30}html[data-theme="dark"] #records-panel .artist{color:#a1cfb1}html[data-theme="dark"] #records-panel .tag{background:#354332;color:#d0ddc6}html[data-theme="dark"] #records-panel .number,html[data-theme="dark"] #records-panel .tracklist,html[data-theme="dark"] #records-panel summary,html[data-theme="dark"] #records-panel .missing{color:#b2c0ab}html[data-theme="dark"] #records-panel .note{color:#e1bd76}html[data-theme="dark"] #records-panel details,html[data-theme="dark"] #records-panel .tracklist li,html[data-theme="dark"] #records-panel footer{border-color:var(--line)}html[data-theme="dark"] #records-panel .track-edition,html[data-theme="dark"] #records-panel .tracklist summary span,html[data-theme="dark"] #records-panel footer{color:var(--muted)}html[data-theme="dark"] #records-panel dialog{background:#223027;border-color:#63765a}}
@media screen and (hover:hover) and (pointer:fine){#records-panel article{transition:transform .22s ease,box-shadow .22s ease,border-color .22s ease}#records-panel article:hover{transform:translateY(-5px);box-shadow:0 14px 30px #203e3226;border-color:#a9bda2}html[data-theme="dark"] #records-panel article:hover{box-shadow:0 14px 30px #0006;border-color:#8caa91}}
@media(prefers-reduced-motion:reduce){#records-panel article{transition:none}#records-panel article:hover{transform:none}}
@media(max-width:600px){.shell-header{padding:26px 18px}.shell-header h1{font-size:37px}.theme-toggle{float:none;margin:0 0 18px}.shell-totals{gap:14px}.shell-totals b{font-size:20px}.shell-badge{margin-left:6px}.collection-nav{padding:10px 14px}.collection-tab{flex:1;justify-content:center;padding:10px}.collection-summary{padding:22px 14px 0}.collection-summary h2{font-size:26px}}
@media print{.shell-header{padding:10px;background:#fff;color:#22372f;border:0}.shell-header h1{font-size:30px}.shell-eyebrow,.shell-header p,.shell-badge,.shell-totals,.collection-nav,.theme-toggle,.back-to-top,.collection-summary .stats{display:none!important}.collection-summary{padding:10px 0}.collection-summary h2{font-size:22px}}
@media screen{html[data-theme="dark"]{color-scheme:dark;--ink:#e3eae3;--muted:#a5b2a6;--green:#99d0ae;--line:#3b4d41;--paper:#16211b}}

/* Version 4.0: compact ratings, deferred shelf gallery and paged collections. */
#books-panel .compact-stars{display:block;width:max-content;max-width:100%;height:auto;font-size:21px;line-height:1;letter-spacing:0;background:linear-gradient(90deg,#c58b1c var(--rating),#d3d8d0 var(--rating));background-clip:text;-webkit-background-clip:text;color:transparent}
.pagination{display:flex;flex-direction:column;align-items:center;gap:9px;margin:28px 0 12px}.pagination button{min-height:46px;padding:11px 24px;border:1px solid var(--green);border-radius:10px;background:var(--green);color:var(--paper);font-weight:650}.pagination button:hover{filter:brightness(1.1)}.pagination p{font-size:12px;color:var(--muted);margin:0}#books-empty{padding:30px;border:1px dashed var(--line);border-radius:12px;text-align:center;color:var(--muted)}
#books-panel .book-info-cover{display:block;width:auto;max-width:160px;height:auto;max-height:210px;object-fit:contain;margin:0 auto 16px}#books-panel .shelves{border-top:1px solid var(--line);padding-top:24px}#books-panel .shelf-section>h2{display:none}#books-panel .shelves>summary{width:fit-content}
@media print{.pagination,#book-shelves{display:none!important}#books-panel .compact-stars{color:#936316;background:none;-webkit-text-fill-color:#936316}#books-panel .book-info-cover{display:none}}

/* Version 4.1: a gentle, composited entrance for the book details. */
@keyframes book-info-enter{from{opacity:0;transform:translateY(10px) scale(.98)}to{opacity:1;transform:translateY(0) scale(1)}}
@keyframes book-backdrop-enter{from{opacity:0}to{opacity:1}}
@media screen{
  #books-panel #book-info{border-radius:18px}
  #books-panel #book-info[open]{animation:book-info-enter 300ms cubic-bezier(.16,1,.3,1) both;transform-origin:center center}
  #books-panel #book-info[open]::backdrop{animation:book-backdrop-enter 260ms ease-out both}
}
@media(prefers-reduced-motion:reduce){
  #books-panel #book-info[open],#books-panel #book-info[open]::backdrop{animation:none}
}

/* Version 4.4: a softer entrance for vinyl details, with stable cover layout. */
@keyframes record-detail-enter{from{opacity:0;transform:translateY(12px) scale(.985)}to{opacity:1;transform:translateY(0) scale(1)}}
@media screen{
  #records-panel #records-detail{border-radius:18px;box-shadow:0 24px 80px #0004;scrollbar-gutter:stable}
  #records-panel #records-detail[open]{animation:record-detail-enter 320ms cubic-bezier(.16,1,.3,1) both}
  #records-panel #records-detail::backdrop{background:#14291f80}
  #records-panel #records-detail[open]::backdrop{animation:book-backdrop-enter 280ms ease-out both}
  #records-panel #records-detailCover img{display:block;height:auto}
}
@media(prefers-reduced-motion:reduce){
  #records-panel #records-detail[open],#records-panel #records-detail[open]::backdrop{animation:none}
}

/* Version 4.6: broad, overlapping music genres for album filtering. */
#records-panel .genre-tags{display:flex;flex-wrap:wrap;gap:4px;margin:0 0 10px}
#records-panel .genre-tag{font-size:10px;line-height:1.5;border:1px solid var(--line);border-radius:12px;padding:2px 7px;color:var(--muted);background:transparent}
#records-panel .record-genres{font-size:12px;line-height:1.7;color:var(--muted);margin:12px 0 18px}
