.pdf-actions{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0}
.pdf-btn,.pdf-selection select{font:inherit;font-size:13px;border:1px solid #d8c8bb;border-radius:8px;background:#fff;color:#6e1f2c;padding:10px 13px;cursor:pointer}
.pdf-btn.primary{background:#6e1f2c;color:#fff;border-color:#6e1f2c}
.pdf-btn:disabled{opacity:.45;cursor:default}
.pdf-btn:focus-visible,.pdf-selection select:focus-visible{outline:3px solid #b08d57;outline-offset:2px}
.pdf-toolbar{background:#f5efe7;border:1px solid #e0d3c4;border-radius:14px;padding:18px;margin:20px 0}
.pdf-toolbar p{font-size:13px;color:#76695c;line-height:1.7;margin:6px 0}
.pdf-selection{display:flex;align-items:center;flex-wrap:wrap;gap:10px;margin-top:12px;padding-top:12px;border-top:1px solid #e7ded3;font-size:13px}
.pdf-selection label{display:flex;align-items:center;gap:7px;cursor:pointer;color:#6e1f2c}
.pdf-selection input{width:18px;height:18px;accent-color:#6e1f2c}
.pdf-selection select{max-width:100%;padding:7px 10px}
#pdfDialog{position:fixed;inset:0;margin:auto;box-sizing:border-box;width:min(620px,calc(100% - 28px));height:fit-content;max-height:85vh;max-height:85dvh;overflow:auto;border:1px solid #d8c8bb;border-radius:18px;padding:26px;color:#302822;background:#fffdf9;box-shadow:0 20px 80px #0003}
.pdf-vintages{display:flex;flex-wrap:wrap;gap:7px;width:100%}
.pdf-vintages label{padding:7px 9px;border:1px solid #d8c8bb;border-radius:8px;background:#fff}
.pdf-vintages label:has(input:checked){background:#f5e6e8;border-color:#6e1f2c}
.pdf-vintages label:focus-within{outline:2px solid #b08d57;outline-offset:2px}
.pdf-selection-title{width:100%;color:#76695c;font-size:12px}
#pdfDialog::backdrop{background:#21151988}
.pdf-dialog-head{display:flex;justify-content:space-between;align-items:center;gap:12px}
.pdf-dialog-head h2{font-size:21px;margin:0;color:#6e1f2c}
#pdfStatus{font-size:14px;line-height:1.7;margin:18px 0;white-space:pre-line}
#pdfProgress{width:100%;accent-color:#6e1f2c}
#pdfReview{max-height:42dvh;overflow:auto;margin:12px 0;padding:0;list-style:none}
#pdfReview li{padding:12px 0;border-bottom:1px solid #e3d9cd;font-size:13px;line-height:1.5}
#pdfReview strong{display:block;margin-bottom:4px}
.pdf-hint{font-size:12px;line-height:1.7;color:#776b60}
@media(max-width:560px){.pdf-toolbar{padding:14px}.pdf-actions .pdf-btn{flex:1 1 auto}.pdf-selection{gap:8px}#pdfDialog{padding:18px}}
/* Refined vintage chips retain native checkbox keyboard and screen-reader behavior. */
.pdf-vintages label{position:relative;padding:0;border:0;border-radius:999px;background:transparent}
.pdf-vintages label:has(input:checked){background:transparent;border:0}
.pdf-vintages input{position:absolute;inset:0;width:100%;height:100%;margin:0;opacity:0;cursor:pointer}
.pdf-vintage-chip{display:flex;align-items:center;gap:7px;min-height:40px;padding:0 14px;border:1px solid #dfd2c3;border-radius:999px;background:#fffdf9;color:#796452;font-size:13px;line-height:1;transition:background .16s,border-color .16s,color .16s,box-shadow .16s}
.pdf-vintage-mark{width:12px;height:12px;position:relative;opacity:.55}
.pdf-vintage-mark::before,.pdf-vintage-mark::after{content:'';position:absolute;background:currentColor;left:5px;top:1px;width:1px;height:10px}
.pdf-vintage-mark::after{transform:rotate(90deg)}
.pdf-vintages input:checked + .pdf-vintage-chip{background:#6e1f2c;border-color:#6e1f2c;color:#fff;box-shadow:0 2px 6px #6e1f2c18}
.pdf-vintages input:checked + .pdf-vintage-chip .pdf-vintage-mark{opacity:1}
.pdf-vintages input:checked + .pdf-vintage-chip .pdf-vintage-mark::before{left:3px;top:3px;width:5px;height:8px;background:transparent;border:solid currentColor;border-width:0 1.5px 1.5px 0;transform:rotate(45deg)}
.pdf-vintages input:checked + .pdf-vintage-chip .pdf-vintage-mark::after{display:none}
.pdf-vintages label:focus-within{outline:none}
.pdf-vintages input:focus-visible + .pdf-vintage-chip{outline:3px solid #b08d57;outline-offset:3px}
@media(hover:hover){.pdf-vintages label:hover .pdf-vintage-chip{border-color:#b08d57;box-shadow:0 2px 8px #6e1f2c12}}
.pdf-dock{position:fixed;left:50%;bottom:calc(18px + env(safe-area-inset-bottom,0px));transform:translateX(-50%);z-index:66;box-sizing:border-box;width:min(740px,calc(100% - 28px));display:flex;align-items:center;justify-content:space-between;gap:16px;padding:14px 20px;background:#fffdf9f5;backdrop-filter:blur(16px);border:1px solid #d8c8bb;border-radius:18px;box-shadow:0 8px 36px #30201829;animation:pdf-dock-in .2s ease-out}
.pdf-dock[hidden],.pdf-notice[hidden]{display:none}
.pdf-dock-summary{display:grid;gap:4px;font-size:12px;color:#76695c}
.pdf-dock-summary strong{font-size:14px;color:#6e1f2c}
.pdf-dock-actions{display:flex;gap:8px;align-items:center}
.pdf-dock .pdf-btn{min-height:42px;white-space:nowrap}
body:has(.pdf-dock:not([hidden])){padding-bottom:110px}
body:has(.pdf-dock:not([hidden])) .compare-dock{bottom:calc(110px + env(safe-area-inset-bottom,0px))}
.pdf-notice{position:fixed;left:50%;bottom:calc(90px + env(safe-area-inset-bottom,0px));transform:translateX(-50%);z-index:95;width:max-content;max-width:calc(100% - 36px);box-sizing:border-box;padding:13px 20px;border-radius:12px;background:#6e1f2c;color:#fff;font-size:14px;box-shadow:0 6px 24px #30201829;pointer-events:none}
@keyframes pdf-dock-in{from{opacity:0;translate:0 10px}to{opacity:1;translate:0 0}}
@media(max-width:560px){.pdf-dock{padding:12px;gap:10px;flex-wrap:wrap;bottom:calc(10px + env(safe-area-inset-bottom,0px))}.pdf-dock-summary{display:flex;width:100%;justify-content:space-between;align-items:center}.pdf-dock-actions{width:100%;gap:6px}.pdf-dock-actions .pdf-btn{flex:1;padding:10px 8px;font-size:12px}.pdf-dock-actions .primary{flex:1.5}body:has(.pdf-dock:not([hidden])){padding-bottom:140px}body:has(.pdf-dock:not([hidden])) .compare-dock{bottom:calc(136px + env(safe-area-inset-bottom,0px))}.pdf-vintage-chip{min-height:44px}}
@media(prefers-reduced-motion:reduce){.pdf-dock{animation:none}.pdf-vintage-chip{transition:none}}
/* Bounded vintage list and a separate editable selection summary. */
.pdf-selection-title{display:flex;justify-content:space-between;gap:8px;color:#6e1f2c;font-weight:600}
.pdf-selection-title small{font-weight:400;color:#8a7969;font-size:11px}
.pdf-chosen{display:flex;flex-wrap:wrap;gap:6px;width:100%;max-height:96px;overflow-y:auto;scrollbar-width:thin;padding:3px;box-sizing:border-box}
.pdf-chosen-item{display:inline-flex;align-items:center;gap:10px;min-height:36px;padding:0 10px;border:1px solid #dac0c4;border-radius:8px;background:#f5e8ea;color:#6e1f2c;font:inherit;font-size:12px;cursor:pointer}
.pdf-chosen-item span:last-child{font-size:18px;line-height:1}
.pdf-chosen-item:hover{background:#ecd4d8}
.pdf-chosen-item:focus-visible{outline:2px solid #b08d57;outline-offset:1px}
.pdf-chosen-empty{font-size:11px;color:#958678;line-height:30px}
.pdf-scroll-hint{font-size:10px;color:#958678;width:100%}
.pdf-vintages{display:flex;flex-direction:column;flex-wrap:nowrap;gap:0;max-height:104px;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#b8a38c #f5efe7;border:1px solid #e4d8cb;border-radius:10px;background:#fffdf9;padding:4px;box-sizing:border-box}
.pdf-vintages label{flex:none;border-radius:6px}
.pdf-vintage-chip{min-height:42px;border:0;border-radius:6px;background:transparent;box-shadow:none;padding:0 12px;justify-content:space-between;flex-direction:row-reverse}
.pdf-vintages input:checked + .pdf-vintage-chip{background:#f5e8ea;color:#6e1f2c;box-shadow:none}
.pdf-vintages input:focus-visible + .pdf-vintage-chip{outline:2px solid #b08d57;outline-offset:-2px}
.pdf-vintages::-webkit-scrollbar,.pdf-chosen::-webkit-scrollbar{width:6px}
.pdf-vintages::-webkit-scrollbar-thumb,.pdf-chosen::-webkit-scrollbar-thumb{background:#b8a38c;border-radius:8px}
@media(hover:hover){.pdf-vintages label:hover .pdf-vintage-chip{background:#f5efe7;box-shadow:none}}
@media(max-width:560px){.pdf-chosen-item{min-height:44px}.pdf-vintage-chip{min-height:44px}}
.pdf-vintages .pdf-vintage-chip{width:100%;box-sizing:border-box}
