:root { color-scheme: light; --green:#406019; --line:#dce4d1; --muted:#536149; --ink:#172219; --pale:#f3f7ed; }
* { box-sizing:border-box; }
body { margin:0; color:var(--ink); background:#f6f7f3; font:16px/1.55 "Malgun Gothic","Apple SD Gothic Neo",sans-serif; }
a { color:var(--green); text-underline-offset:.2em; }
.top { background:#fff; border-bottom:1px solid var(--line); }
.top > div { max-width:1220px; min-height:64px; margin:auto; padding:12px 24px; display:flex; align-items:center; flex-wrap:wrap; gap:16px 28px; }
.brand { color:#28451a; font-weight:900; font-size:1.17rem; text-decoration:none; white-space:nowrap; display:inline-flex; align-items:center; gap:5px; }
.brand img { width:42px; height:32px; object-fit:contain; }
.brand span { color:var(--muted); }
nav,.actions { display:flex; gap:10px 16px; align-items:center; flex-wrap:wrap; }
nav a { text-decoration:none; font-weight:700; }
main { max-width:1220px; margin:0 auto; padding:30px 24px 50px; min-height:72vh; }
.heading { margin-bottom:22px; }
h1,h2,h3,p,figure { margin:0 0 10px; }
h1 { font-size:clamp(1.7rem,4vw,2.4rem); letter-spacing:-.045em; }
h2 { font-size:1.25rem; } h3 { font-size:1rem; } .heading p, .muted,small,figcaption { color:var(--muted); }
.card { background:white; border:1px solid var(--line); border-radius:14px; padding:20px; margin:0 0 16px; }
.stack { display:grid; gap:12px; }
.grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,160px),1fr)); align-items:end; gap:12px; }
.narrow { max-width:500px; }
label { display:grid; gap:6px; font-weight:700; }
input, textarea,select { width:100%; min-height:42px; padding:8px 10px; border:1px solid #abb6a3; border-radius:8px; background:white; font:inherit; color:inherit; }
textarea { resize:vertical; }
input:focus,textarea:focus,select:focus { outline:2px solid #6b893b; outline-offset:2px; }
.check { display:flex; align-items:center; gap:8px; min-height:40px; }
.check input { width:18px; min-height:18px; }
button,.button { min-height:42px; padding:8px 14px; border:1px solid transparent; border-radius:8px; color:white; background:var(--green); font:inherit; font-weight:700; cursor:pointer; text-align:center; text-decoration:none; }
button.subtle,.button.subtle,.tabs a { background:var(--pale); border-color:var(--line); color:var(--green); }
button:disabled { opacity:.55; cursor:default; }
.inline { display:inline; }
.alert { padding:12px 16px; background:#e8f2dc; border:1px solid #bed39f; border-radius:8px; margin-bottom:16px; }
.alert.error { background:#fff1ee; border-color:#e6b9af; color:#8a3225; }
.tabs { margin-bottom:12px; } .tabs a { padding:8px 18px; border-radius:8px; } .tabs .selected { background:var(--green); color:white; }
.table { overflow-x:auto; }
table { width:100%; border-collapse:collapse; text-align:left; }
td,th { padding:9px 8px; border-bottom:1px solid var(--line); vertical-align:top; }
th { background:var(--pale); white-space:nowrap; }
.member-remarks { min-width:9em; white-space:pre-wrap; overflow-wrap:anywhere; }
.marc-grid { min-width:600px; }
.marc-grid td:first-child { width:6.5em; }
.marc-grid td:last-child { width:1%; white-space:nowrap; }
.marc-indicators { display:flex; gap:4px; }
.marc-indicators input,.marc-subfield input[data-marc-code] { width:2.4em; text-align:center; }
.marc-parts { display:grid; gap:6px; margin-bottom:6px; }
.marc-subfield { display:grid; grid-template-columns:auto 2.4em minmax(120px,1fr) auto; align-items:center; gap:6px; }
.marc-grid [hidden] { display:none; }
td small, .copy small { display:block; }
summary { cursor:pointer; } .copy { padding:12px 0; border-top:1px solid var(--line); } .pager { padding-top:14px; }
.search { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:end; gap:10px; }
.desk-search { max-width:720px; }
.desk-search button { white-space:nowrap; }
.desk-member { display:flex; align-items:baseline; flex-wrap:wrap; gap:5px 12px; padding:10px 14px; border-radius:8px; background:var(--pale); color:var(--green); }
.desk-member strong { font-size:1.15rem; }
.desk-member span { font-size:.9rem; }
.borrow-queue h2,.borrow-queue p { margin-bottom:0; }
.borrow-queue td:last-child { width:1%; }
.withdraw-forms { align-items:stretch; }
.withdraw-review .table { max-height:360px; overflow:auto; }
.withdraw-review th { position:sticky; top:0; }
.public-search { padding:24px; border-color:#c9d8b9; background:#edf4e5; }
.public-search input,.public-search button { min-height:50px; }
.public-results-title { margin:25px 0 12px; }
.public-results-title span { color:var(--muted); font-size:.9em; font-weight:500; overflow-wrap:anywhere; }
.public-back { margin-bottom:14px; }
.book-result { display:grid; grid-template-columns:minmax(0,1.25fr) minmax(0,1fr); gap:20px; }
.book-info { display:flex; align-items:flex-start; gap:16px; min-width:0; }
.book-info h2 { font-size:clamp(1.15rem,2.1vw,1.55rem); line-height:1.25; overflow-wrap:anywhere; }
.book-info h2 a { color:var(--ink); text-decoration:none; }
.book-info h2 a:hover { text-decoration:underline; }
.catalog-book-details { flex:1; min-width:0; }
.catalog-book-meta { display:flex; flex-wrap:wrap; gap:10px 28px; margin:12px 0 0; }
.catalog-book-meta dt { color:var(--muted); font-size:.85rem; }
.catalog-book-meta dd { margin:0; overflow-wrap:anywhere; }
#holdings > .actions { margin-bottom:10px; }
#holdings h2 { margin:0; }
.book-links { margin-top:14px; }
.cover-frame { display:grid; place-items:center; flex:0 0 auto; position:relative; width:86px; aspect-ratio:2/3; border:1px solid var(--line); border-radius:10px; overflow:hidden; background:#edf2e7; color:#546444; }
.cover-frame span { font-size:.72rem; letter-spacing:.09em; font-weight:800; }
.cover { position:absolute; inset:0; display:block; width:100%; height:100%; object-fit:contain; background:#fff; }
.cover[hidden] { display:none; }
.book-detail .cover-frame { width:clamp(100px,18vw,180px); }
.book-shelves { display:grid; gap:10px; }
.book-shelves section { border-radius:10px; background:var(--pale); padding:12px; }
.book-shelves figure,.shelves figure { display:inline-block; margin:0 6px 8px 0; vertical-align:top; }
.book-shelves img,.shelves img { width:138px; height:90px; object-fit:contain; background:white; border:1px solid var(--line); border-radius:6px; }
.badge { display:inline-block; border-radius:16px; padding:4px 10px; background:#eceeea; }
.available { color:#294610; background:#e7f2d7; }
.label-options { border:1px solid var(--line); border-radius:8px; padding:12px; min-width:0; }
.label-options .muted { margin:8px 0 0; }
.label-preview { overflow:auto; padding:12px; background:#e9eee4; }
.label-sheet { width:210mm; height:296mm; background:#fff; margin:0 auto 12px; overflow:hidden; }
.label-sheet:last-child { margin-bottom:0; }
.label-row { display:grid; break-inside:avoid; }
.label-cell { min-width:0; min-height:0; overflow:hidden; padding:2mm; outline:1px dotted #888; outline-offset:-1px; color:#111; font-size:10pt; line-height:1.2; overflow-wrap:anywhere; }
.label-barcode { grid-column:1; display:flex; flex-direction:column; align-items:center; text-align:center; }
.label-barcode > * { flex:none; max-width:100%; }
.label-barcode svg { display:block; }
.label-information { grid-column:3; }
.label-spine { grid-column:5; display:grid; align-content:center; justify-items:center; text-align:center; }
.label-lines { position:relative; height:100%; }
.label-line { position:absolute; inset-inline:0; overflow:hidden; display:flex; align-items:center; white-space:nowrap; line-height:1.1; }
.label-line > * { flex:none; transform-origin:left; }
.label-information[data-align="center"] .label-line { justify-content:center; }
.label-information[data-align="center"] .label-line > * { transform-origin:center; }
.label-line-double { align-items:flex-start; }
.label-line-double > * { white-space:normal; width:100%; }
.poster-tools { margin-bottom:16px; }
.qr-poster {
    width:min(100%, 188mm); margin:0 auto; padding:clamp(24px,6vw,60px) clamp(12px,5vw,44px);
    border:2px solid #456522; border-top-width:9px; border-radius:20px; background:#fff; text-align:center;
    display:flex; flex-direction:column; align-items:center; break-inside:avoid;
}
.poster-brand { display:inline-flex; align-items:center; gap:8px; font-size:1rem; font-weight:800; color:var(--green); margin-bottom:24px; }
.poster-brand img { width:56px; height:40px; object-fit:contain; }
.poster-library { color:#31511c; font-size:1.2rem; font-weight:800; overflow-wrap:anywhere; max-width:100%; }
.qr-poster h2 { margin:0 0 6px; font-size:clamp(1.7rem,6vw,3rem); line-height:1.2; letter-spacing:-.055em; }
.poster-intro { font-weight:700; color:var(--muted); }
.poster-code { width:min(100%,86mm); margin:22px 0; border:1px solid var(--line); border-radius:14px; background:#fff; }
.poster-qr { display:block; width:100%; height:auto; }
.poster-guide { margin:0 0 8px; font-size:.98rem; }
.poster-url { max-width:100%; color:#31511c; font-size:.92rem; font-weight:700; overflow-wrap:anywhere; }
@page bookis-qr { size:A4 portrait; margin:12mm; }
@page bookis-receipt { size:auto; margin:0; }
@page bookis-label { size:A4 portrait; margin:0; }
.receipt-tools { margin-bottom:18px; }
.location-receipt {
    width:min(100%,70mm); padding:4mm; background:#fff; color:#111;
    border:1px solid var(--line); font-size:11pt; line-height:1.35; overflow-wrap:anywhere;
}
.location-receipt header { text-align:center; border-bottom:1px dashed #333; margin-bottom:3mm; }
.location-receipt h2 { margin:.8mm 0; font-size:17pt; }
.location-receipt h3 { font-size:14pt; }
.location-receipt section { border-top:1px dashed #333; padding:2.5mm 0; break-inside:avoid; }
.receipt-call { font-size:13pt; font-weight:800; }
footer { text-align:center; padding:20px; font-size:.75rem; letter-spacing:.12em; color:var(--muted); }
@media(max-width:650px) {
  main,.top > div { padding-left:13px; padding-right:13px; }
  .card { padding:13px; } .book-result { grid-template-columns:1fr; }
  .public-search { grid-template-columns:1fr; }
}
@media print {
  body { background:white; } .top,.heading,footer,.no-print { display:none; }
  main { padding:0; margin:0; }
  main:has([data-label-print]) { max-width:none; min-height:0; }
  .label-preview { overflow:visible; padding:0; background:white; }
  [data-label-print]:not([data-ready]) .label-preview { display:none; }
  .label-sheet { page:bookis-label; margin:0; }
  .label-sheet:not(:last-child) { break-after:page; }
  .label-cell { outline:0; }
  .qr-poster { page:bookis-qr; width:100%; min-height:0; padding:19mm 10mm; border-radius:12px; }
  .qr-poster h2 { font-size:32pt; }
  main:has(.location-receipt) { min-height:0; }
  .location-receipt { page:bookis-receipt; border:0; }
}
