:root { --acc: #c2780a; --accd: #a36307; --accbg: #fdf4e6 }
/* photos to PDF: each photo shown on its page, to scale */
.sheets { display: flex; flex-wrap: wrap; gap: 26px 22px; align-content: flex-start; user-select: none; padding: 6px 4px 40px }
.sh { width: 170px; cursor: grab; position: relative }
.sh .paper { width: 170px; height: 220px; display: flex; align-items: center; justify-content: center }
.sh .pp { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.18), 0 0 0 1px #dfe2e7; position: relative; overflow: hidden }
.sh .pp img { position: absolute; display: block }
.sh .cap { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--tx2); padding-top: 6px }
.sh .cap span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap } .sh .cap b { font-family: var(--mono); color: var(--tx) }
.sh .tools { position: absolute; top: 6px; right: 6px; display: none; gap: 4px }
.sh:hover .tools { display: flex }
.sh .tools button { width: 28px; height: 28px; border: 0; background: var(--ink); color: #fff; cursor: pointer; font-size: 14px } .sh .tools button:hover { background: var(--acc) }
.sh.drag { opacity: .3 }
.ins { width: 4px; background: var(--acc); height: 240px; margin: 0 -13px; flex: none }
.dragghost { position: fixed; pointer-events: none; z-index: 70; width: 110px; height: 140px; background: var(--panel); border: 2px solid var(--acc); box-shadow: 0 10px 30px rgba(0,0,0,.18); display: grid; place-items: center; overflow: hidden }
.dragghost img { max-width: 100%; max-height: 100%; opacity: .85 }
/* PDF to pictures */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; padding-bottom: 40px }
.pc { cursor: pointer; position: relative }
.pc .th { height: 190px; background: var(--panel); border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; overflow: hidden }
.pc .th canvas { max-width: 100%; max-height: 100%; box-shadow: 0 0 0 1px #e5e7eb }
.pc .th .ld { width: 70%; height: 80%; background: #f3f4f6 }
.pc .cap { font-size: 12px; color: var(--tx2); padding-top: 6px; display: flex; gap: 6px; align-items: center }
.pc .box { width: 18px; height: 18px; border: 2px solid #b9bec7; background: #fff; display: grid; place-items: center; font-size: 12px; color: #fff; font-weight: 800; flex: none }
.pc.on .box { background: var(--acc); border-color: var(--acc) } .pc.on .th { outline: 3px solid var(--acc); outline-offset: -1px }
.pc:not(.on) .th canvas { opacity: .45 }
.modes { display: flex; flex-direction: column; border: 1px solid var(--line) }
.modes label { display: grid; grid-template-columns: 22px 1fr; padding: 10px 12px; border-bottom: 1px solid var(--line2); cursor: pointer; column-gap: 8px }
.modes label:last-child { border-bottom: 0 }
.modes label input { margin: 3px 0 0; accent-color: var(--acc); width: 16px; height: 16px; grid-row: span 2 }
.modes label b { font-size: 14px } .modes label span { font-size: 12px; color: var(--tx2) }
.modes label:has(input:checked) { background: var(--accbg); box-shadow: inset 3px 0 0 var(--acc) }
.donebox .ok { font-weight: 800; font-size: 18px } .donebox .tip { font-size: 12.5px; color: var(--tx2) } .donebox .tip a { color: var(--accd); font-weight: 600 }
.side .row { grid-template-columns: 64px 1fr } .side .row .seg button { padding: 0 6px }
