:root {
    --paper: #f7f3ea;
    --paper-deep: #eee8dc;
    --surface: #fffdf8;
    --ink: #272b28;
    --muted: #68706a;
    --green: #1f5c4d;
    --green-dark: #153f35;
    --green-soft: #dce8e2;
    --terracotta: #a75439;
    --mustard: #b88721;
    --red: #9d3d32;
    --line: #d8d1c3;
    --white: #fffef9;
    --font-serif: "Newsreader", Georgia, serif;
    --font-sans: "DM Sans", Arial, sans-serif;
    --shadow-book: 8px 12px 22px rgba(48, 42, 32, .16);
    --shadow-float: 0 18px 45px rgba(40, 49, 43, .09);
    --container: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-sans); font-size: 16px; line-height: 1.65; }
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button { color: inherit; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: var(--font-serif); line-height: 1.04; letter-spacing: -.025em; }
h1 { font-size: clamp(2.7rem, 6.2vw, 5.8rem); }
h2 { font-size: clamp(2rem, 4vw, 3.45rem); }
h3 { font-size: 1.35rem; }
:focus-visible { outline: 3px solid #cf8f35; outline-offset: 3px; }
::selection { background: var(--mustard); color: var(--ink); }
.container { width: min(calc(100% - 32px), var(--container)); margin-inline: auto; }
.container.narrow { max-width: 820px; }
.section { padding: 92px 0; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }
.skip-link { position: fixed; z-index: 1000; top: 10px; left: 10px; padding: 10px 14px; background: var(--ink); color: #fff; transform: translateY(-150%); }
.skip-link:focus { transform: none; }
.eyebrow, .card-kicker, .catalog-number { display: inline-block; color: var(--green); font-size: .72rem; font-weight: 700; letter-spacing: .15em; line-height: 1.4; text-transform: uppercase; }
.eyebrow.light { color: #d8cda9; }
.button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; border: 1px solid var(--green); border-radius: 2px; padding: 11px 20px; background: var(--green); color: #fff; font-weight: 700; line-height: 1.2; transition: background .2s ease, color .2s ease, transform .2s ease; }
.button:hover { background: var(--green-dark); transform: translateY(-1px); }
.button-secondary { background: transparent; color: var(--green); }
.button-secondary:hover { background: var(--green); color: #fff; }
.button-danger { border-color: var(--red); background: var(--red); }
.button-danger:hover { background: #7e3028; }
.button-small { min-height: 38px; padding: 8px 14px; font-size: .88rem; }
.button-large { min-height: 54px; padding: 14px 24px; }
.button-full { width: 100%; }
.button-row { display: flex; flex-wrap: wrap; gap: 12px; }
.text-link { color: var(--green); font-weight: 700; text-decoration: underline; text-decoration-color: #a8bcb4; text-underline-offset: 5px; }
.text-link:hover { text-decoration-color: var(--green); }

/* Header */
.site-header { position: sticky; z-index: 50; top: 0; border-bottom: 1px solid rgba(39,43,40,.13); background: rgba(247,243,234,.96); backdrop-filter: blur(12px); }
.header-inner { display: flex; min-height: 82px; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 12px; line-height: 1.1; }
.brand img { width: 43px; height: 54px; object-fit: contain; }
.brand strong, .brand small { display: block; }
.brand strong { font-family: var(--font-serif); font-size: 1.22rem; }
.brand small { margin-top: 3px; color: var(--muted); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }
.site-nav { display: flex; align-items: center; gap: 26px; font-size: .92rem; font-weight: 600; }
.site-nav > a:not(.button) { position: relative; padding: 10px 0; }
.site-nav > a[aria-current="page"]:not(.button)::after { position: absolute; right: 0; bottom: 2px; left: 0; height: 2px; background: var(--terracotta); content: ""; }
.nav-toggle { display: none; width: 46px; height: 46px; border: 1px solid var(--line); background: transparent; }
.nav-toggle > span:not(.sr-only), .admin-menu-toggle > span:not(.sr-only) { display: block; width: 20px; height: 2px; margin: 4px auto; background: currentColor; }

/* Feedback */
.flash-wrap { margin-top: 16px; }
.flash { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; border: 1px solid; padding: 13px 16px; background: var(--surface); font-size: .92rem; font-weight: 600; }
.flash-success { border-color: #7ca08e; color: #255a47; }
.flash-error { border-color: #c4877d; color: #86382e; }
.flash button { border: 0; background: transparent; font-size: 1.3rem; line-height: 1; }

/* Hero */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); padding: 76px 0 88px; }
.hero::before { position: absolute; top: 0; left: 7%; width: 1px; height: 100%; background: rgba(31,92,77,.12); content: ""; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr); align-items: center; gap: clamp(40px, 8vw, 110px); }
.hero-copy h1 { max-width: 760px; margin: 16px 0 22px; }
.hero-copy > p { max-width: 650px; color: var(--muted); font-size: 1.12rem; }
.hero-search { display: grid; grid-template-columns: 1fr auto; max-width: 690px; margin-top: 34px; border: 1px solid var(--ink); background: var(--surface); padding: 7px; box-shadow: 6px 6px 0 var(--green); }
.hero-search input { min-width: 0; min-height: 50px; border: 0; outline: none; background: transparent; padding: 0 14px; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 0; margin-top: 42px; }
.hero-stats div { min-width: 135px; border-left: 1px solid var(--line); padding: 0 28px; }
.hero-stats div:first-child { border-left: 0; padding-left: 0; }
.hero-stats strong, .hero-stats span { display: block; }
.hero-stats strong { font-family: var(--font-serif); font-size: 2rem; line-height: 1; }
.hero-stats span { margin-top: 6px; color: var(--muted); font-size: .8rem; }
.hero-visual { position: relative; min-height: 520px; }
.catalog-card { position: absolute; inset: 0 20px 36px 0; display: flex; flex-direction: column; justify-content: space-between; border: 1px solid #0f392f; background: var(--green-dark); color: #fff; padding: 34px; box-shadow: 14px 14px 0 #c99a42; transform: rotate(1.2deg); }
.catalog-card::before, .catalog-card::after { position: absolute; border: 1px solid rgba(255,255,255,.14); content: ""; }
.catalog-card::before { inset: 13px; }
.catalog-card::after { top: 0; bottom: 0; left: 27%; }
.catalog-card .catalog-number { color: #d8cda9; }
.catalog-card img { width: 165px; height: 205px; margin: 0 auto; object-fit: contain; filter: drop-shadow(0 12px 20px rgba(0,0,0,.24)); }
.catalog-card div { position: relative; z-index: 1; }
.catalog-card small, .catalog-card strong { display: block; }
.catalog-card small { color: #c1d1cb; text-transform: uppercase; letter-spacing: .1em; }
.catalog-card strong { max-width: 330px; margin-top: 6px; font-family: var(--font-serif); font-size: 1.65rem; line-height: 1.1; }
.hero-note { position: absolute; right: 0; bottom: 0; z-index: 2; width: 72%; border: 1px solid var(--line); background: var(--surface); padding: 15px 18px; box-shadow: var(--shadow-float); }
.hero-note span, .hero-note strong { display: block; }
.hero-note span { color: var(--terracotta); font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.hero-note strong { margin-top: 5px; font-size: .87rem; }

/* Public sections */
.section-heading { margin-bottom: 42px; }
.section-heading h2 { margin: 8px 0 0; }
.split-heading { display: grid; grid-template-columns: 1.3fr .8fr auto; align-items: end; gap: 28px; }
.split-heading p { margin: 0; color: var(--muted); }
.book-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 44px 24px; }
.book-card { min-width: 0; }
.book-cover-link { position: relative; display: block; width: calc(100% - 12px); margin-left: 6px; }
.book-cover { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; box-shadow: var(--shadow-book); transition: transform .25s ease, box-shadow .25s ease; }
.book-cover-link:hover .book-cover { transform: translateY(-7px) rotate(-.4deg); box-shadow: 11px 18px 28px rgba(48,42,32,.21); }
.placeholder-cover { position: relative; display: flex; flex-direction: column; overflow: hidden; justify-content: space-between; border-left: 12px solid color-mix(in srgb, var(--cover-color) 72%, #000); background: var(--cover-color); color: #fff; padding: 24px 19px 24px 22px; }
.placeholder-cover::before { position: absolute; top: 0; bottom: 0; left: 12px; width: 1px; background: rgba(255,255,255,.28); content: ""; }
.placeholder-cover::after { position: absolute; right: 0; bottom: 19%; left: 0; height: 1px; background: rgba(255,255,255,.26); content: ""; }
.placeholder-cover small { position: relative; z-index: 1; font-size: .64rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.placeholder-cover strong { position: relative; z-index: 1; font-family: var(--font-serif); font-size: clamp(1.05rem, 2vw, 1.5rem); line-height: 1.05; }
.placeholder-cover span { position: relative; z-index: 1; font-size: .72rem; }
.shelf-tag { position: absolute; right: -9px; bottom: 18px; border: 1px solid #c5aa6c; background: #fff8de; color: #634b20; padding: 5px 9px; font-size: .68rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; box-shadow: 2px 3px 0 rgba(85,65,31,.15); }
.shelf-tag.large { right: -14px; bottom: 28px; padding: 7px 12px; font-size: .75rem; }
.shelf-tag.static { position: static; display: inline-block; box-shadow: none; white-space: nowrap; }
.book-card-body { padding: 21px 5px 0; }
.book-card-body .card-kicker { color: var(--terracotta); }
.book-card-body h3 { margin: 6px 0 5px; font-size: 1.32rem; }
.book-card-body h3 a:hover { color: var(--green); }
.book-card-body p { margin-bottom: 13px; color: var(--muted); font-size: .86rem; }
.status-badge { display: inline-flex; min-height: 25px; align-items: center; border: 1px solid; border-radius: 999px; padding: 3px 9px; font-size: .72rem; font-weight: 700; line-height: 1.2; white-space: nowrap; }
.status-available, .status-borrowed { border-color: #9ab5a9; background: #e7f0eb; color: #225c48; }
.status-empty, .status-rejected { border-color: #d6a196; background: #f6e8e5; color: #8a3b32; }
.status-pending { border-color: #d3b972; background: #faf1d7; color: #755710; }
.status-returned { border-color: #b4bab6; background: #eff1ef; color: #505954; }
.status-late { border-color: #ce8175; background: #f5dfda; color: #8b2f25; }
.category-section { background: var(--green-dark); color: #fff; }
.category-layout { display: grid; grid-template-columns: .75fr 1.25fr; gap: 9vw; }
.category-intro { position: sticky; top: 120px; align-self: start; }
.category-intro h2 { margin: 12px 0 18px; }
.category-intro p { color: #c3d0cb; }
.category-list { border-top: 1px solid rgba(255,255,255,.25); }
.category-row { display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 18px; border-bottom: 1px solid rgba(255,255,255,.2); padding: 22px 0; }
.category-index { color: #d3a95a; font-family: var(--font-serif); }
.category-row strong, .category-row small { display: block; }
.category-row strong { font-family: var(--font-serif); font-size: 1.4rem; }
.category-row small { margin-top: 4px; color: #b8c7c1; }
.category-row em { color: #d9e2de; font-size: .78rem; font-style: normal; }
.category-row:hover strong { color: #efcd87; }
.steps-list { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0; padding: 0; list-style: none; }
.steps-list li { display: grid; grid-template-columns: 40px 1fr; gap: 15px; border-left: 1px solid var(--line); padding: 28px 24px; }
.steps-list li:first-child { border-left: 0; }
.steps-list > li > span { color: var(--terracotta); font-family: var(--font-serif); font-size: 1.2rem; }
.steps-list h3 { margin-bottom: 8px; }
.steps-list p { margin: 0; color: var(--muted); font-size: .88rem; }
.service-section { background: var(--paper-deep); }
.service-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 8vw; align-items: start; }
.service-main h2 { max-width: 680px; margin: 10px 0 40px; }
.service-details { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); margin: 0; }
.service-details div { border-right: 1px solid var(--line); padding: 18px; }
.service-details div:first-child { padding-left: 0; }
.service-details div:last-child { border-right: 0; }
.service-details dt { color: var(--terracotta); font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.service-details dd { margin: 8px 0 0; font-size: .9rem; }
.rules-card { border: 1px solid var(--ink); background: var(--surface); padding: 32px; box-shadow: 9px 9px 0 var(--green); }
.rules-card h3 { margin: 12px 0 20px; font-size: 2rem; }
.rules-card ul { border-block: 1px solid var(--line); margin: 0 0 20px; padding: 15px 0; list-style: none; }
.rules-card li { display: flex; justify-content: space-between; gap: 20px; padding: 6px 0; }
.rules-card p { color: var(--muted); font-size: .88rem; }

/* Footer */
.site-footer { background: #202b27; color: #e9ece8; padding: 72px 0 20px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr .55fr .75fr; gap: 8vw; }
.footer-brand h2 { max-width: 650px; margin-top: 14px; color: #fff; font-size: clamp(2rem,4vw,3.6rem); }
.footer-grid h3 { color: #d6bd82; font-family: var(--font-sans); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; }
.footer-grid a, .footer-grid p { display: block; margin: 0 0 8px; color: #bdc7c2; font-size: .9rem; }
.footer-grid a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; border-top: 1px solid rgba(255,255,255,.15); margin-top: 60px; padding-top: 18px; color: #929f99; font-size: .75rem; }

/* Generic pages and forms */
.page-hero { border-bottom: 1px solid var(--line); padding: 66px 0 48px; }
.page-hero.compact h1 { max-width: 900px; margin: 12px 0 8px; font-size: clamp(2.7rem,6vw,4.9rem); }
.page-hero p { max-width: 720px; color: var(--muted); font-size: 1.05rem; }
.catalog-layout { display: grid; grid-template-columns: 255px 1fr; gap: 54px; align-items: start; }
.filter-panel { position: sticky; top: 112px; border-top: 3px solid var(--green); border-bottom: 1px solid var(--line); padding: 24px 0; }
.form-field { margin-bottom: 18px; }
.form-field label { display: block; margin-bottom: 7px; color: var(--ink); font-size: .82rem; font-weight: 700; }
.form-field input, .form-field select, .form-field textarea { width: 100%; min-height: 46px; border: 1px solid #bfb8aa; border-radius: 1px; background: var(--surface); color: var(--ink); padding: 10px 12px; }
.form-field textarea { resize: vertical; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: var(--green); outline: 2px solid rgba(31,92,77,.16); }
.form-field small { display: block; margin-top: 6px; color: var(--muted); font-size: .74rem; }
.reset-link { display: block; margin-top: 14px; text-align: center; color: var(--green); font-size: .82rem; text-decoration: underline; }
.catalog-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pagination { display: flex; align-items: center; justify-content: center; gap: 18px; border-top: 1px solid var(--line); margin-top: 52px; padding-top: 24px; font-size: .85rem; }
.pagination a { border: 1px solid var(--line); background: var(--surface); padding: 8px 13px; font-weight: 700; }
.empty-state { border: 1px solid var(--line); background: var(--surface); padding: 58px; text-align: center; }
.empty-state h2 { margin: 12px 0; }
.empty-state p { color: var(--muted); }
.breadcrumbs { display: flex; overflow: hidden; gap: 8px; margin-bottom: 42px; color: var(--muted); font-size: .78rem; white-space: nowrap; }
.breadcrumbs span:last-child { overflow: hidden; text-overflow: ellipsis; }
.book-detail-grid { display: grid; grid-template-columns: minmax(260px, 410px) 1fr; gap: clamp(50px,9vw,130px); align-items: start; }
.detail-cover-wrap { position: relative; width: calc(100% - 16px); }
.detail-cover { width: 100%; aspect-ratio: 2/3; object-fit: cover; box-shadow: 16px 19px 0 #d9c9a8, var(--shadow-book); }
.book-detail-copy { padding-top: 18px; }
.book-detail-copy h1 { margin: 12px 0 7px; font-size: clamp(2.7rem,5.6vw,5.2rem); }
.detail-author { color: var(--muted); font-size: 1.2rem; }
.book-detail-copy > .status-badge { margin: 14px 0 26px; }
.synopsis { max-width: 760px; color: #4e5550; font-size: 1.02rem; line-height: 1.8; }
.metadata-grid { display: grid; grid-template-columns: repeat(3,1fr); border-block: 1px solid var(--line); margin: 32px 0; }
.metadata-grid div { padding: 14px 18px 14px 0; }
.metadata-grid dt { color: var(--muted); font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .09em; }
.metadata-grid dd { margin: 4px 0 0; font-size: .88rem; font-weight: 600; }
.related-section { border-top: 1px solid var(--line); }
.related-grid { grid-template-columns: repeat(4,1fr); }
.form-layout { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 70px; align-items: start; }
.main-form { border-top: 3px solid var(--green); }
.main-form fieldset { border: 0; border-bottom: 1px solid var(--line); margin: 0; padding: 34px 0; }
.main-form legend { display: flex; align-items: center; gap: 12px; font-family: var(--font-serif); font-size: 1.65rem; font-weight: 600; }
.main-form legend span { color: var(--terracotta); font-size: 1rem; }
.form-grid { display: grid; gap: 18px; }
.form-grid.two-col { grid-template-columns: repeat(2, minmax(0,1fr)); }
.form-grid.three-col { grid-template-columns: repeat(3,minmax(0,1fr)); }
.span-two { grid-column: 1 / -1; }
.field-note, .subsection-head { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 16px; }
.field-note p { margin: 0; color: var(--muted); font-size: .86rem; }
.field-note strong, .subsection-head > strong { color: var(--terracotta); font-size: .78rem; }
.book-choice-list { max-height: 430px; overflow: auto; border: 1px solid var(--line); background: var(--surface); }
.book-choice { display: grid; grid-template-columns: 22px 1fr auto; align-items: center; gap: 13px; border-bottom: 1px solid var(--line); padding: 14px; cursor: pointer; }
.book-choice:last-child { border-bottom: 0; }
.book-choice:hover { background: #f1ede3; }
.book-choice:has(input:checked) { background: var(--green-soft); }
.book-choice input { width: 18px; height: 18px; accent-color: var(--green); }
.book-choice strong, .book-choice small { display: block; }
.book-choice strong { font-size: .88rem; }
.book-choice small { margin-top: 2px; color: var(--muted); font-size: .74rem; }
.book-choice em { color: var(--green); font-size: .72rem; font-style: normal; font-weight: 700; }
.camera-stage { position: relative; display: grid; min-height: 330px; place-items: center; overflow: hidden; border: 1px solid var(--line); background: #26312d; }
.camera-stage video, .camera-stage img { width: 100%; height: 100%; min-height: 330px; max-height: 500px; object-fit: cover; }
.camera-placeholder { max-width: 320px; color: #d8dfdb; padding: 28px; text-align: center; }
.camera-placeholder::before { display: block; width: 72px; height: 54px; border: 2px solid #87938e; margin: 0 auto 18px; content: ""; }
.camera-placeholder strong, .camera-placeholder span { display: block; }
.camera-placeholder span { margin-top: 7px; color: #aeb8b4; font-size: .8rem; }
.camera-message { margin: 10px 0; color: var(--muted); font-size: .77rem; }
.camera-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.upload-button { display: inline-flex; min-height: 46px; align-items: center; justify-content: center; border: 1px solid var(--green); padding: 10px 15px; color: var(--green); cursor: pointer; font-size: .86rem; font-weight: 700; }
.upload-button input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.consent-check { display: grid; grid-template-columns: 20px 1fr; gap: 10px; margin: 24px 0; color: var(--muted); font-size: .84rem; }
.consent-check input { width: 18px; height: 18px; accent-color: var(--green); }
.form-aside { position: sticky; top: 112px; border-left: 1px solid var(--line); padding-left: 30px; }
.form-aside h2 { margin: 12px 0 20px; font-size: 2.2rem; }
.form-aside ol { padding-left: 22px; }
.form-aside li { margin-bottom: 12px; }
.secure-note { border-block: 1px solid var(--line); margin: 25px 0; padding: 20px 0; }
.secure-note p, .quiet-note { margin: 5px 0 0; color: var(--muted); font-size: .8rem; }
.confirmation-page { min-height: 72vh; }
.confirmation-card { border: 1px solid var(--line); background: var(--surface); padding: clamp(28px,7vw,70px); text-align: center; box-shadow: 10px 10px 0 var(--green-soft); }
.confirmation-mark { display: grid; width: 58px; height: 58px; place-items: center; border-radius: 50%; margin: 0 auto 24px; background: var(--green); color: #fff; font-size: 1.7rem; }
.confirmation-card h1 { margin: 12px 0; font-size: clamp(2.4rem,6vw,4.3rem); }
.confirmation-card > p { color: var(--muted); }
.code-box { max-width: 500px; border: 1px dashed var(--green); margin: 32px auto; background: var(--green-soft); padding: 20px; }
.code-box small, .code-box strong { display: block; }
.code-box small { color: var(--muted); text-transform: uppercase; letter-spacing: .1em; }
.code-box strong { margin: 8px 0; font-family: var(--font-serif); font-size: 2rem; letter-spacing: .05em; }
.code-box button { border: 0; background: transparent; color: var(--green); font-weight: 700; text-decoration: underline; }
.confirmation-meta { display: grid; grid-template-columns: repeat(2,1fr); border-block: 1px solid var(--line); margin-bottom: 25px; padding: 18px 0; }
.confirmation-meta span, .confirmation-meta strong { display: block; }
.confirmation-meta > div > span { color: var(--muted); font-size: .75rem; }
.confirmation-card .button-row { justify-content: center; margin-top: 28px; }
.status-form { border: 1px solid var(--line); background: var(--surface); padding: 25px; }
.status-grid { grid-template-columns: 1fr 1.2fr auto; align-items: end; }
.status-grid .form-field { margin: 0; }
.status-result { border: 1px solid var(--line); border-top: 4px solid var(--green); margin-top: 28px; background: var(--surface); padding: clamp(24px,5vw,45px); }
.status-result-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; }
.status-result-head h2 { margin: 8px 0 0; }
.status-result-head p { color: var(--muted); }
.status-timeline { margin: 30px 0; }
.status-timeline div { display: grid; grid-template-columns: 150px 1fr; border-top: 1px solid var(--line); padding: 14px 0; }
.status-timeline div:last-child { border-bottom: 1px solid var(--line); }
.status-timeline dt { color: var(--muted); font-size: .78rem; font-weight: 700; }
.status-timeline dd { margin: 0; font-weight: 600; }
.status-timeline dd span { display: block; }
.error-page { display: grid; min-height: 100vh; place-items: center; padding: 24px; text-align: center; }
.error-page > div { max-width: 720px; }
.error-page h1 { margin: 16px 0; }
.error-page p { color: var(--muted); }

/* Motion */
.reveal { animation: reveal .55s ease both; }
.book-grid .reveal:nth-child(2n), .category-list .reveal:nth-child(2n) { animation-delay: .06s; }
@keyframes reveal { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

@media (max-width: 980px) {
    .hero-grid { grid-template-columns: 1fr; }
    .hero-visual { width: min(100%, 540px); min-height: 500px; margin-inline: auto; }
    .book-grid { grid-template-columns: repeat(3,1fr); }
    .catalog-layout { grid-template-columns: 1fr; }
    .filter-panel { position: static; }
    .filter-panel form { display: grid; grid-template-columns: 1.4fr 1fr 1fr auto; gap: 10px; align-items: end; }
    .filter-panel .form-field { margin: 0; }
    .filter-panel .reset-link { grid-column: 1/-1; }
    .category-layout, .service-grid { grid-template-columns: 1fr; }
    .category-intro { position: static; max-width: 700px; }
    .steps-list { grid-template-columns: repeat(2,1fr); }
    .steps-list li:nth-child(3) { border-left: 0; border-top: 1px solid var(--line); }
    .steps-list li:nth-child(4) { border-top: 1px solid var(--line); }
    .form-layout { grid-template-columns: 1fr; gap: 40px; }
    .form-aside { position: static; border-top: 1px solid var(--line); border-left: 0; padding: 28px 0 0; }
    .footer-grid { grid-template-columns: 1.5fr 1fr 1fr; gap: 30px; }
}

@media (max-width: 760px) {
    .section { padding: 64px 0; }
    .nav-toggle { display: block; }
    .site-nav { position: absolute; top: calc(100% + 1px); right: 0; left: 0; display: none; align-items: stretch; border-bottom: 1px solid var(--line); background: var(--paper); padding: 14px 20px 22px; }
    .site-nav.is-open { display: flex; flex-direction: column; gap: 4px; }
    .site-nav > a:not(.button) { padding: 11px 0; }
    .hero { padding-top: 55px; }
    .hero-search { grid-template-columns: 1fr; box-shadow: 4px 4px 0 var(--green); }
    .hero-search .button { width: 100%; }
    .hero-stats div { min-width: 32%; padding: 0 12px; }
    .hero-stats strong { font-size: 1.65rem; }
    .hero-stats span { font-size: .68rem; }
    .hero-visual { min-height: 440px; }
    .catalog-card { padding: 25px; }
    .catalog-card img { width: 135px; height: 168px; }
    .split-heading { grid-template-columns: 1fr; align-items: start; }
    .book-grid, .catalog-grid, .related-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 38px 17px; }
    .category-row { grid-template-columns: 34px 1fr; }
    .category-row em { grid-column: 2; }
    .service-details { grid-template-columns: 1fr; }
    .service-details div { border-right: 0; border-bottom: 1px solid var(--line); padding-left: 0; }
    .service-details div:last-child { border-bottom: 0; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .footer-brand { grid-column: 1/-1; }
    .footer-bottom { flex-direction: column; gap: 5px; }
    .filter-panel form { grid-template-columns: 1fr; }
    .book-detail-grid { grid-template-columns: 1fr; gap: 58px; }
    .detail-cover-wrap { max-width: 360px; margin: auto; }
    .metadata-grid { grid-template-columns: repeat(2,1fr); }
    .form-grid.two-col, .form-grid.three-col { grid-template-columns: 1fr; }
    .status-grid { grid-template-columns: 1fr; }
    .status-grid .form-field { margin-bottom: 6px; }
}

@media (max-width: 500px) {
    .container { width: min(calc(100% - 24px), var(--container)); }
    .header-inner { min-height: 72px; }
    .brand img { width: 35px; height: 45px; }
    .hero-stats { gap: 14px 0; }
    .hero-stats div { width: 50%; border: 0; padding: 0; }
    .hero-visual { min-height: 390px; }
    .catalog-card { right: 10px; bottom: 25px; }
    .hero-note { width: 87%; }
    .book-card-body { padding-top: 17px; }
    .book-card-body h3 { font-size: 1.05rem; }
    .placeholder-cover { border-left-width: 8px; padding: 15px 10px 17px 14px; }
    .placeholder-cover strong { font-size: .95rem; }
    .placeholder-cover span { font-size: .6rem; }
    .steps-list { grid-template-columns: 1fr; }
    .steps-list li, .steps-list li:nth-child(2) { border-top: 1px solid var(--line); border-left: 0; }
    .steps-list li:first-child { border-top: 0; }
    .footer-grid { grid-template-columns: 1fr; }
    .footer-brand { grid-column: auto; }
    .page-hero { padding-top: 48px; }
    .book-choice { grid-template-columns: 20px 1fr; }
    .book-choice em { grid-column: 2; }
    .camera-stage, .camera-stage video, .camera-stage img { min-height: 260px; }
    .confirmation-meta { grid-template-columns: 1fr; gap: 15px; }
    .status-result-head { flex-direction: column; }
    .status-timeline div { grid-template-columns: 1fr; gap: 4px; }
}
