:root{font-family:Arial,sans-serif;color:#232b29;background:#f7f6f2;font-size:16px}[hidden]{display:none!important}*{box-sizing:border-box}body{margin:0}button,input,select{font:inherit}button{cursor:pointer}button:disabled{opacity:.5;cursor:wait}h1,h2,h3,p{margin:0}h1,h2,h3,.brand strong{font-family:Georgia,'Times New Roman',serif}h1{font-size:clamp(2rem,4vw,3rem);letter-spacing:-.05em}h2{font-size:1.6rem}p{line-height:1.55}.muted,.help{color:#78807c}.help{font-size:.88rem;margin:14px 0}.eyebrow{font-size:.72rem;letter-spacing:.18em;color:#ac8056;font-weight:700;margin-bottom:8px}.error{color:#ae452f;min-height:1.5em;font-size:.9rem;margin:10px 0}.brand-mark{display:grid;place-items:center;background:#bd9264;color:#fff;font-family:serif;font-size:2rem;width:58px;height:58px;border-radius:3px}.brand-mark.small{width:38px;height:38px;font-size:1.4rem}.topbar{background:#1d2826;color:#f4f2ed;display:flex;align-items:center;justify-content:space-between;padding:16px max(26px,calc((100% - 1240px)/2));gap:15px}.brand strong{font-size:1.28rem;display:block;line-height:1.2}.brand small{font-size:.61rem;letter-spacing:.19em;color:#b7c4bd}.header-actions{display:flex;gap:12px}.subtle{background:none;border:0;color:inherit;text-decoration:none;font-size:.84rem;white-space:nowrap}.subtle:hover{text-decoration:underline}.workspace{max-width:1240px;margin:0 auto;padding:48px 26px 80px}.intro{display:flex;align-items:flex-end;justify-content:space-between;margin-bottom:36px;gap:20px}.intro .muted{margin-top:10px}.primary{background:#30483e;color:#fff;border:1px solid #30483e;border-radius:5px;padding:12px 20px;font-weight:600;min-height:46px}.primary:hover{background:#456655}.plus{white-space:nowrap}.toolbar{display:flex;align-items:stretch;gap:10px;flex-wrap:wrap;margin-bottom:28px}.search{flex:1 1 320px;position:relative}.search span{position:absolute;left:16px;top:9px;font-size:1.8rem;color:#88938c;line-height:1}.search input{padding-left:46px;width:100%;min-width:0}input,select{border:1px solid #d8dcd6;border-radius:5px;background:#fff;color:#24302c;min-height:46px;padding:10px 12px;outline-color:#9b7150}select{min-width:125px}.segmented{display:flex;background:#e9eae5;border-radius:5px;padding:4px;gap:3px}.segmented button,.tabs button{border:0;background:transparent;color:#56635c;padding:7px 13px;border-radius:4px}.segmented button.active{background:white;color:#243d34;box-shadow:0 1px 3px #12201820}.empty{border:1px dashed #c7cfc8;text-align:center;padding:75px 20px;background:#fff;border-radius:7px}.empty h2{font-size:1.4rem;margin-bottom:10px}.covers{display:grid;grid-template-columns:repeat(auto-fill,minmax(185px,1fr));gap:28px 22px}.book-card{min-width:0}.cover-frame{height:275px;display:flex;align-items:flex-end;justify-content:center;padding:18px;background:#e9e7e0;border-radius:5px;border:1px solid #e2e0d7}.cover-silhouette{max-width:100%;max-height:100%;display:flex;align-items:center;justify-content:center}.cover-silhouette img{width:100%;height:100%;object-fit:contain;box-shadow:5px 7px 12px #1d241e33}.book-title{margin-top:12px;font-weight:700;line-height:1.45;word-break:keep-all}.book-sub{font-size:.88rem;color:#777e79;margin-top:4px;line-height:1.4}.tags{display:flex;flex-wrap:wrap;gap:5px;margin-top:9px}.tag{background:#edeae2;color:#665542;border-radius:3px;padding:3px 7px;font-size:.75rem}.book-actions{display:flex;gap:12px;margin-top:8px}.text-button{border:0;background:none;padding:2px 0;color:#506b5c;font-size:.84rem;text-decoration:underline}.book-list{border-top:1px solid #dcded7}.list-row{display:grid;grid-template-columns:48px 1fr auto;gap:16px;align-items:center;padding:12px 5px;border-bottom:1px solid #dedfd9}.list-row img{width:44px;height:65px;object-fit:contain;background:#eae8e3}.list-row .book-title{margin-top:0}.list-row .book-actions{margin:0}.shelf{padding:28px 18px 0;background:#ede9df;border:1px solid #d7d2c5;border-radius:5px}.shelf-row{display:flex;align-items:flex-end;gap:2px;min-height:240px;overflow-x:auto;border-bottom:18px solid #71513a;box-shadow:0 10px 8px -8px #34291999;margin-bottom:26px;padding:0 4px}.spine{flex:none;height:var(--h);width:var(--w);max-height:250px;min-width:30px;background:#384b40;color:#f7e9d6;writing-mode:vertical-rl;display:flex;justify-content:center;align-items:center;overflow:hidden;padding:7px 3px;border-radius:2px 3px 0 0;box-shadow:inset -4px 0 #0002,2px 0 4px #0002;white-space:nowrap;text-overflow:ellipsis;font-family:Georgia,serif;font-size:.85rem}.spine:nth-child(4n+2){background:#765446}.spine:nth-child(4n+3){background:#575e55}.spine:nth-child(4n+4){background:#9e7656}.spine img{width:100%;height:100%;object-fit:fill}.spine[data-fallback]:hover:after{content:'책등 사진 없음';position:absolute;writing-mode:horizontal-tb;background:#1d2826;color:white;padding:5px;font:12px Arial}.login-shell{min-height:100vh;background:#1d2826;display:grid;place-items:center;padding:24px}.login-card{width:min(100%,420px);background:#f7f6f2;padding:45px;border-radius:6px}.login-card .brand-mark{margin-bottom:25px}.login-card h1{margin-bottom:8px}.login-card>.muted{margin-bottom:28px}.login-card label,dialog label{display:block;margin:13px 0 6px;font-weight:600;font-size:.87rem}.login-card input,dialog input:not([type=file]){width:100%;margin-top:7px}.login-card .primary{width:100%;margin-top:20px}dialog{border:0;border-radius:7px;box-shadow:0 20px 70px #0b171d55;width:min(94vw,650px);max-height:90vh;overflow-y:auto;padding:28px 32px;background:#f9f8f4;color:#27322b}dialog::backdrop{background:#0b191bb0}.dialog-head{display:flex;align-items:start;justify-content:space-between}.icon-close{border:0;background:none;font-size:2rem;line-height:1;color:#59655e}.tabs{display:flex;gap:4px;border-bottom:1px solid #d7dcd4;margin-top:22px}.tabs button{border-radius:4px 4px 0 0;padding:11px 16px}.tabs button.active{color:#2b493a;border-bottom:3px solid #456351;font-weight:700}.row{display:flex;gap:10px;align-items:end;flex-wrap:wrap;margin-top:10px}.file-button{display:inline-flex!important;align-items:center;justify-content:center;padding:11px 15px;border:1px solid #abb8ac;border-radius:5px;color:#355440;cursor:pointer;min-height:46px}.file-button input{position:absolute;opacity:0;width:1px;height:1px;pointer-events:none}.file-button.wide{width:100%;margin:15px 0}#imageForm>.primary{width:100%}.candidate,.unverified{border:1px solid #e2e1d9;background:#fff;padding:15px;border-radius:5px;margin:12px 0}.candidate h3,.unverified h3{font-size:1.05rem}.candidate p,.unverified p{font-size:.88rem;color:#68746d;margin-top:4px}.candidate .primary{margin-top:12px;padding:7px 12px;min-height:35px;font-size:.85rem}.verified{color:#436e4b!important}.unverified{border-color:#ddbcae}.form-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}#confirmForm>.primary{width:100%;margin-top:18px}#confirmationBook{margin:18px 0;padding:13px;background:#edeae2;line-height:1.6}#confirmForm input[type=file]{display:block;margin-top:7px;font-size:.84rem;max-width:100%}@media(max-width:680px){.topbar{padding:13px 16px}.brand small{display:none}.header-actions{gap:8px}.header-actions .subtle{font-size:.75rem}.workspace{padding:28px 16px}.intro{align-items:start}.intro .primary{font-size:.85rem;padding:9px 11px}.toolbar>*{flex:1 1 auto}.toolbar .search{flex-basis:100%}.segmented{width:100%}.segmented button{flex:1}.covers{grid-template-columns:repeat(2,minmax(0,1fr));gap:20px 12px}.cover-frame{height:215px;padding:10px}.list-row{grid-template-columns:38px 1fr}.list-row img{width:35px;height:54px}.list-row .book-actions{grid-column:2}.form-grid{grid-template-columns:1fr 1fr}dialog{padding:20px}.login-card{padding:32px 25px}}

.brand{display:flex;align-items:center;gap:12px}
.spine{border:0;cursor:pointer;line-height:1.3}
.spine:focus-visible{outline:3px solid #bb885a;outline-offset:2px}

.photo-result{border-top:1px solid #d7dcd4;padding:16px 0}.photo-result>h3{font-size:1.08rem}.photo-result>.help{margin:5px 0 10px}

.candidate-detail{display:flex;align-items:flex-start;gap:16px}.candidate-detail>div:last-child{min-width:0;flex:1}.candidate-cover{width:80px;height:112px;flex:none;object-fit:contain;background:#eeeae2;border:1px solid #e2ded5;border-radius:3px}.candidate-cover.placeholder{display:grid;place-items:center;text-align:center;color:#8b8174;padding:6px;font-size:.75rem}.duplicate{color:#ae452f!important;font-weight:700}.confirm-cover{display:block;width:116px;max-height:164px;object-fit:contain;margin:0 0 12px;background:#e8e4da}@media(max-width:460px){.candidate-cover{width:68px;height:98px}}

.title-retry{border-top:1px solid #e5e2d9;padding-top:10px;margin-top:14px}.title-retry label{margin:0 0 8px}.title-retry input{width:100%;margin-top:7px}.title-retry button{padding:9px 12px;border:1px solid #abb8ac;border-radius:4px;background:#fff;color:#30483e}.title-retry .error{margin:5px 0}.title-retry .candidate{margin:8px 0}

.cover-silhouette.unknown-size img{width:auto;height:auto;max-width:100%;max-height:100%;object-fit:contain}

.candidate .similar{color:#8b633b!important;font-weight:600}

.add-notice{color:#356a43;font-size:.9rem;margin:4px 0 10px}.add-notice:empty{display:none}

#editForm{margin-top:14px}#editBookInfo{padding:13px;background:#edeae2;line-height:1.6}.edit-image-row{display:flex;gap:16px;margin:16px 0}.edit-image-row figure{margin:0;width:110px;text-align:center;font-size:.78rem;color:#68746d}.edit-image-row img{display:block;width:100%;height:155px;object-fit:contain;background:#ece9e2}.edit-image-row figcaption{margin-top:5px}#editForm textarea{display:block;width:100%;border:1px solid #d8dcd6;border-radius:5px;padding:10px;margin-top:7px;resize:vertical;font:inherit}#editForm input[type=file]{display:block;max-width:100%;margin-top:7px}.inline-check{display:flex!important;align-items:center;gap:8px}.inline-check input{width:auto!important;min-height:0;margin:0!important}#editForm>.primary{width:100%;margin-top:8px}

#titleForm>.primary{width:100%;margin-top:12px}#titleForm input{width:100%;margin-top:7px}@media(max-width:680px){.tabs button{flex:1;padding:10px 5px}}

.list-row{grid-template-columns:36px minmax(0,1fr) auto;gap:10px;padding:6px 5px}
.list-row img{width:34px;height:48px}
.list-row .book-title{line-height:1.3}
.list-row .book-sub{margin-top:2px}
.list-row .tags{margin-top:4px}
.list-row .book-actions{gap:9px}
@media(max-width:680px){.list-row{grid-template-columns:32px minmax(0,1fr);gap:4px 9px;padding:6px 3px}.list-row img{width:30px;height:43px}.list-row .book-actions{grid-column:2;margin-top:0}}

.shelf-controls{margin:0 0 20px;display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap}
.shelf-controls .help{margin:0}
.shelf-controls button,.shelf-heading button{border:1px solid #a5a99d;background:#f9f7f1;color:#3e5746;border-radius:4px;padding:7px 11px;font-size:.84rem}
.shelf{padding:0;background:none;border:0;border-radius:0;display:flex;flex-direction:column;gap:30px;align-items:flex-start}
.shelf-unit{width:min(100%,900px);border:9px solid #694c37;border-top:0;background:#e5decf;box-shadow:4px 9px 16px #1d241e30}
.shelf-heading{background:#f7f6f2;margin:0 -9px;padding:10px 0 14px;display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.shelf-heading h2{font-size:1.15rem}.shelf-heading small{font:normal .8rem Arial,sans-serif;color:#747d75;margin-left:6px}.shelf-heading>div{display:flex;gap:6px}
.shelf-case{padding:0 13px}
.shelf-row{width:100%;height:265px;min-height:0;overflow:hidden;align-items:flex-end;margin:0 0 12px;gap:4px;padding:0 4px;border-bottom:18px solid #79583c;box-shadow:0 8px 8px -7px #2a201899}
.shelf-row:last-child{margin-bottom:4px}
.shelf .help{margin:0}
.shelf-select{display:block;width:100%;margin-top:7px}
@media(max-width:680px){.shelf-unit{border-width:6px}.shelf-heading{margin:0 -6px}.shelf-case{padding:0 7px}.shelf-row{height:265px;padding:0 3px}.shelf-heading h2{font-size:1rem}}

/* Bookshelf: warm wood frame, recessed compartments, and cover-colored spines. */
.shelf{gap:38px}
.shelf-unit{position:relative;border:11px solid #573827;border-top:0;border-radius:6px 6px 4px 4px;background:repeating-linear-gradient(94deg,#9a6b48 0,#7e5235 8px,#966541 17px,#765034 29px);box-shadow:0 18px 28px #2c1b142e,0 4px 5px #29170e3b,inset 2px 0 3px #c39468,inset -3px 0 7px #22110780;overflow:hidden}
.shelf-heading{margin:0 -11px 0;padding:15px 20px 17px;background:linear-gradient(160deg,#f8f5ec,#e8dfcf);border-bottom:1px solid #b9a591;box-shadow:0 4px 9px #2b1b1524}
.shelf-heading h2{color:#382a22;letter-spacing:.015em}
.shelf-heading small{color:#816f60}
.shelf-case{padding:13px 16px 1px;background:linear-gradient(90deg,#382419 0,#765138 2%,#a47a57 7%,#b28a66 50%,#9a714f 93%,#422a1c 100%)}
.shelf-row{position:relative;height:265px;min-height:0;margin:0 0 15px;padding:10px 7px 0;gap:4px;overflow:hidden;align-items:flex-end;border-bottom:18px solid #684126;background:radial-gradient(ellipse at 50% 75%,#ddbe918c,transparent 80%),linear-gradient(#583a28,#977052 35%,#a47d59 85%,#775234);box-shadow:inset 0 12px 18px #24120a94,inset 10px 0 14px #24120a6b,inset -10px 0 14px #24120a73,0 9px 8px -7px #160d08b3}
.shelf-row:last-child{margin-bottom:5px}
.spine{position:relative;z-index:1;border-radius:2px 3px 0 0;box-shadow:inset 3px 0 4px #0005,inset -2px 0 3px #fff3,2px 2px 5px #20150f85;transition:transform .18s ease,box-shadow .18s ease}
.spine:hover{transform:translateY(-5px);box-shadow:inset 3px 0 4px #0005,inset -2px 0 3px #fff3,3px 8px 10px #20150f85}
.spine-tinted,.spine-tinted:nth-child(n){color:var(--spine-ink,#f8ebd7);background-image:linear-gradient(90deg,var(--spine-edge,#344138) 0%,#ffffff33 16%,transparent 30%,#00000024 76%,#00000070 100%),var(--spine-art,linear-gradient(var(--spine-base,#536257),var(--spine-base,#536257)));background-position:center;background-size:100% 100%;border:1px solid #0004;border-bottom:0;text-shadow:0 1px 2px #0005;font-weight:600;letter-spacing:.04em;box-shadow:inset 4px 0 4px #0004,inset -2px 0 2px #fff2,2px 2px 5px #20150f85}
.spine{min-width:22px}
.spine-tinted{padding:0;writing-mode:horizontal-tb;white-space:normal;text-overflow:clip}
.spine-title{position:absolute;inset:7px 3px 6px;display:flex;align-items:center;justify-content:center;writing-mode:vertical-rl;text-orientation:mixed;white-space:normal;word-break:break-all;overflow-wrap:anywhere;overflow:visible;text-align:center;line-height:1.08;font-size:14px;text-overflow:clip;background:var(--title-wash,#120e0a80);border-radius:2px;padding:2px 0}
.spine-tinted[data-fallback]:hover::after{content:'책등 사진 없음';position:absolute;bottom:14px;left:50%;transform:translateX(-50%);width:max-content;height:auto;background:#231a16e8;color:#fff;padding:5px 7px;border-radius:3px;writing-mode:horizontal-tb;white-space:nowrap;font:12px Arial,sans-serif;box-shadow:0 4px 12px #0006}
.spine-photo{padding:0;background:#33281f;overflow:hidden}
.spine-photo img{display:block;width:100%;height:100%;object-fit:cover}
@media(max-width:680px){.shelf-unit{border-width:6px}.shelf-heading{margin:0 -6px;padding:13px 11px 15px}.shelf-case{padding:9px 7px 0}.shelf-row{height:265px;padding:9px 3px 0}}

#scanner{position:relative;margin:12px 0;padding:10px;background:#18231f;border-radius:8px;color:white}
#barcodeVideo{display:block;width:100%;max-height:320px;aspect-ratio:4/3;object-fit:cover;border-radius:5px}
.scan-guide{position:absolute;left:12%;right:12%;top:43%;height:15%;border:2px solid #eec681;border-radius:5px;pointer-events:none}
#stopScanner{margin-top:10px;padding:8px 13px;border:1px solid #d7c8b2;background:#f7f6f2;border-radius:4px}
#scanner .help{color:#eee6d9;margin:8px 0 0}
