:root {
  --paper: #f1eadc;
  --paper-light: #fbf7ee;
  --paper-deep: #e3d7c4;
  --ink: #173d35;
  --ink-soft: #536961;
  --red: #ad432f;
  --red-soft: #f1d5c8;
  --yellow: #e9b85d;
  --line: rgba(23,61,53,.17);
  --shadow: 0 24px 70px rgba(31,42,35,.16);
  --serif: "Songti SC", "STSong", "Noto Serif CJK SC", serif;
  --sans: "Avenir Next", "PingFang SC", "Hiragino Sans GB", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--sans); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button, select, input[type="file"] { cursor: pointer; }
button { color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
.shell { width: min(1480px, calc(100% - 48px)); margin-inline: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: -80px; left: 16px; z-index: 100; padding: 10px 16px; color: white; background: var(--ink); }.skip-link:focus { top: 16px; }

.site-header { position: sticky; top: 0; z-index: 30; height: 68px; padding: 0 max(24px, calc((100vw - 1480px) / 2)); display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 28px; background: rgba(241,234,220,.94); border-bottom: 1px solid var(--line); backdrop-filter: blur(16px); }
.brand { display: inline-flex; align-items: center; gap: 11px; color: inherit; text-decoration: none; }.brand span:last-child { min-width: 0; }.brand strong,.brand small { display: block; }.brand strong { font-family: var(--serif); font-size: 17px; letter-spacing: .08em; }.brand small { margin-top: 2px; color: var(--ink-soft); font-size: 9px; letter-spacing: .18em; }
.brand-mark { width: 40px; height: 40px; display: grid; place-items: center; color: var(--paper-light); background: var(--red); border-radius: 12px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.2); }.brand-mark svg { width: 28px; height: 28px; overflow: visible; }.brand-mark path { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }.brand-mark circle { fill: var(--yellow); stroke: none; }
.page-nav { justify-self: start; display: flex; align-items: stretch; gap: 22px; }.page-nav a { position: relative; min-height: 44px; padding: 0 1px; display: inline-flex; align-items: center; color: var(--ink-soft); text-decoration: none; font-size: 12px; }.page-nav a::after { content: ""; position: absolute; right: 0; bottom: 2px; left: 0; height: 2px; background: transparent; }.page-nav a[aria-current] { color: var(--ink); font-weight: 800; }.page-nav a[aria-current]::after { background: var(--red); }
.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; }
.readonly-badge { display: none; min-height: 32px; padding: 0 10px; align-items: center; color: var(--ink); background: var(--yellow); border-radius: 999px; font-size: 10px; font-weight: 800; letter-spacing: .08em; }
body.is-read-only .readonly-badge { display: inline-flex; }
body.is-read-only #openAddBook,
body.is-read-only .card-like,
body.is-read-only .detail-header-actions,
body.is-read-only .book-tools,
body.is-read-only .record-form { display: none !important; }
.primary-button,.text-button,.link-button,.icon-button,.side-filter,.filter-button,.rail-more,.like-button,.card-like { border: 0; background: none; }
.primary-button { min-height: 44px; padding: 0 17px; color: white; background: var(--ink); border-radius: 3px; font-weight: 700; }.primary-button:hover { background: #0b2e28; }.primary-button:disabled { opacity: .55; cursor: wait; }
.text-button { min-height: 44px; padding: 0 9px; color: var(--ink-soft); font-size: 12px; }.text-button:hover { color: var(--ink); }
.count-badge { display: inline-grid; place-items: center; min-width: 21px; height: 21px; margin-left: 3px; padding: 0 5px; border-radius: 50%; color: white; background: var(--red); font-size: 10px; }.count-badge.muted { color: var(--ink); background: var(--paper-deep); }

.dashboard { min-height: 250px; padding-block: 40px 30px; display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: end; gap: 60px; border-bottom: 1px solid var(--line); }
.eyebrow { margin: 0 0 9px; color: var(--red); font-size: 10px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; }
.dashboard h1 { margin: 0; font-size: clamp(36px,4vw,58px); line-height: 1.06; letter-spacing: -.035em; }.dashboard h1 em { color: var(--red); font-style: normal; }
.reading-focus { margin-top: 20px; display: flex; align-items: center; gap: 12px; }.reading-focus > span { flex: 0 0 auto; color: var(--red); font-size: 10px; font-weight: 800; letter-spacing: .12em; }.reading-focus .topic-filters { padding: 0; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }.reading-focus .topic-filters::-webkit-scrollbar { display: none; }.reading-focus .filter-button { min-height: 38px; padding-inline: 11px; background: rgba(251,247,238,.54); white-space: nowrap; }
.dashboard-stats { display: grid; grid-template-columns: repeat(3,auto); gap: 28px; }.dashboard-stats span { max-width: 86px; color: var(--ink-soft); font-size: 10px; line-height: 1.45; }.dashboard-stats strong { display: block; margin-bottom: 4px; color: var(--ink); font-family: var(--serif); font-size: 29px; line-height: 1.1; }

.library-layout { padding-block: 14px 80px; display: grid; grid-template-areas: "filter" "books"; gap: 14px; align-items: start; }
.filter-sidebar { grid-area: filter; position: relative; display: grid; grid-template-columns: 140px minmax(280px,1fr) auto auto; align-items: center; gap: 12px; padding: 12px 14px; background: rgba(251,247,238,.5); border-block: 1px solid var(--line); }.sidebar-heading { display: flex; flex-direction: column; align-items: flex-start; }.sidebar-heading .eyebrow { margin-bottom: 0; }.link-button { min-height: 32px; padding: 0; color: var(--red); text-decoration: underline; text-underline-offset: 3px; font-size: 11px; }
.search-box { min-width: 0; display: flex; align-items: center; gap: 7px; padding: 0 11px; background: var(--paper-light); border: 1px solid var(--line); }.search-box span { color: var(--ink-soft); font-size: 18px; }.search-box input { width: 100%; min-width: 0; height: 44px; color: var(--ink); background: transparent; border: 0; outline: 0; font-size: 14px; }.search-box:focus-within { border-color: var(--red); box-shadow: 0 0 0 2px rgba(190,78,53,.13); }
fieldset { min-width: 0; margin: 24px 0 0; padding: 0; border: 0; } legend { margin-bottom: 8px; color: var(--ink-soft); font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
fieldset select,.recommend-filters select,.catalog-selects select,.manual-confirm select { width: 100%; height: 44px; padding: 0 30px 0 10px; color: var(--ink); background: var(--paper-light); border: 1px solid var(--line); font-size: 12px; }
.primary-filter { margin: 0; }.primary-filter legend { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }.stacked-filters { display: flex; border: 1px solid var(--line); }.side-filter { min-height: 44px; padding: 0 13px; display: flex; align-items: center; justify-content: space-between; gap: 8px; text-align: left; color: var(--ink-soft); border-right: 1px solid var(--line); font-size: 12px; }.side-filter:last-child { border-right: 0; }.side-filter small { min-width: 20px; text-align: right; }.side-filter.is-active { color: white; background: var(--ink); font-weight: 800; }
.more-filters { position: relative; }.more-filters summary { min-height: 44px; padding: 0 16px; display: flex; align-items: center; color: var(--ink); background: var(--paper-light); border: 1px solid var(--line); font-size: 12px; cursor: pointer; list-style: none; }.more-filters summary::-webkit-details-marker { display: none; }.more-filters summary::after { content: "＋"; margin-left: 14px; }.more-filters[open] summary::after { content: "−"; }.filter-fields { position: absolute; z-index: 20; top: calc(100% + 8px); right: 0; width: min(760px,calc(100vw - 48px)); padding: 20px; display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; background: var(--paper-light); border: 1px solid var(--line); box-shadow: var(--shadow); }.filter-fields fieldset { margin: 0; }.sidebar-foot { grid-column: 1/-1; }
.sidebar-foot { margin: 0; padding-top: 14px; color: var(--ink-soft); border-top: 1px solid var(--line); font-size: 11px; line-height: 1.6; }

.library-main { grid-area: books; min-width: 0; }.library-heading { min-height: 58px; display: flex; align-items: center; border-bottom: 1px solid var(--line); }.library-heading h2 { margin: 0; font-size: 31px; }.library-heading > strong { color: var(--red); font-size: 12px; }
.topic-filters,.filter-group { display: flex; flex-wrap: wrap; gap: 7px; }.topic-filters { padding: 15px 0 22px; }.filter-button { min-height: 44px; padding: 0 12px; color: var(--ink-soft); border: 1px solid var(--line); border-radius: 999px; font-size: 11px; }.filter-button.is-active { color: var(--paper-light); background: var(--ink); border-color: var(--ink); }
.book-grid { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 26px 14px; }.book-card { position: relative; min-width: 0; }.book-card-button { width: 100%; padding: 0; text-align: left; color: inherit; background: none; border: 0; }.book-card h3 { margin: 10px 0 3px; font-family: var(--sans); font-size: 14px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }.book-card p { margin: 0; color: var(--ink-soft); font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cover { position: relative; aspect-ratio: 4/5; overflow: hidden; display: flex; align-items: center; justify-content: center; background: var(--paper-deep); border: 1px solid rgba(23,61,53,.12); box-shadow: 0 5px 13px rgba(45,52,40,.09); transition: transform .18s ease,box-shadow .18s ease; }.book-card-button:hover .cover { transform: translateY(-3px); box-shadow: 0 10px 20px rgba(45,52,40,.13); }.cover img { width: auto; height: auto; max-width: 100%; max-height: 100%; margin: auto; display: block; object-fit: contain; background: #fffdf8; }.cover-tone-0 { background: #ddc6a7; }.cover-tone-1 { background: #c8d9ce; }.cover-tone-2 { background: #e7bfad; }.cover-tone-3 { background: #c5d3df; }.cover-tone-4 { background: #e3d7a4; }.cover-tone-5 { background: #d6c4d9; }.cover-tone-6 { background: #c7d9db; }.cover-missing { background: linear-gradient(90deg,rgba(23,61,53,.08) 0 8px,rgba(251,247,238,.7) 8px),var(--paper-deep); }.cover-placeholder { width: 100%; height: 100%; display: grid; place-content: center; justify-items: center; gap: 9px; color: var(--ink-soft); }.cover-placeholder-icon { position: relative; width: 34px; height: 28px; border: 1px solid currentColor; border-radius: 2px 7px 7px 2px; opacity: .5; }.cover-placeholder-icon::before { content: ""; position: absolute; top: 3px; bottom: 3px; left: 6px; border-left: 1px solid currentColor; }.cover-placeholder small { font-size: 10px; }
.cover-badge,.point-badge { position: absolute; z-index: 2; top: 8px; left: 8px; padding: 4px 6px; color: white; background: rgba(23,61,53,.9); font-size: 8px; letter-spacing: .05em; }.point-badge { top: auto; bottom: 7px; left: 7px; background: rgba(190,78,53,.92); }.cover-source,.cover-quality { position: absolute; right: 6px; bottom: 6px; padding: 3px 5px; color: white; background: rgba(23,61,53,.72); font-size: 7px; }.cover-quality { bottom: 27px; }.cover-quality.is-hd { background: rgba(23,61,53,.9); }.cover-quality.is-usable { background: rgba(161,108,32,.9); }.cover-quality.is-low { background: rgba(190,78,53,.92); }
.card-like { position: absolute; z-index: 4; top: 7px; right: 7px; width: 44px; height: 44px; display: grid; place-items: center; color: var(--ink); background: rgba(251,247,238,.94); border-radius: 50%; box-shadow: 0 4px 12px rgba(0,0,0,.1); font-size: 18px; }.card-like.is-liked { color: white; background: var(--red); }
.empty-state,.candidate-empty { padding: 60px 20px; text-align: center; color: var(--ink-soft); border: 1px dashed var(--line); }.empty-state h3,.candidate-empty h3 { margin: 0 0 6px; font-size: 25px; }.empty-state p,.candidate-empty p { margin: 0; }

.discover-page { padding: 18px 0 90px; }.discover-hero { padding: 38px 42px; display: grid; grid-template-columns: minmax(0,.8fr) minmax(420px,1.2fr); align-items: center; gap: 48px; color: var(--paper-light); background: var(--ink); }.discover-hero .eyebrow { color: var(--yellow); }.discover-hero h1 { margin: 0; font-size: clamp(38px,4vw,56px); line-height: 1.05; }.discover-hero h1 em { color: var(--yellow); font-style: normal; }.discover-intro-copy > p:last-child { max-width: 570px; margin: 16px 0 0; color: rgba(255,255,255,.66); font-family: var(--serif); font-size: 14px; line-height: 1.75; }.featured-recommendation { min-width: 0; padding: 18px; display: grid; grid-template-columns: 112px minmax(0,1fr); align-items: center; gap: 22px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); }.featured-recommendation > img { width: 112px; aspect-ratio: 3/4; object-fit: contain; background: white; }.featured-kicker { margin: 0 0 6px; color: var(--yellow); font-size: 10px; font-weight: 800; letter-spacing: .12em; }.featured-recommendation h2 { margin: 0; color: white; font-size: 27px; line-height: 1.25; }.featured-recommendation h2 + p { margin: 10px 0 0; color: rgba(255,255,255,.7); font-size: 11px; line-height: 1.7; }.featured-meta { margin-top: 13px; display: flex; flex-wrap: wrap; gap: 6px; }.featured-meta span { padding: 5px 7px; color: rgba(255,255,255,.72); border: 1px solid rgba(255,255,255,.2); font-size: 9px; }
.discover-content { padding-top: 34px; }.discover-heading { padding-bottom: 16px; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 28px; border-bottom: 1px solid var(--line); }.discover-heading h2 { margin: 0; font-size: 35px; }.discover-heading > p { max-width: 470px; margin: 0; color: var(--ink-soft); font-size: 11px; line-height: 1.7; }.view-switch,.add-mode-switch { display: inline-flex; padding: 4px; background: var(--paper-deep); border-radius: 999px; }.view-switch button,.add-mode-switch button { min-height: 44px; padding: 0 15px; color: var(--ink-soft); background: transparent; border: 0; border-radius: 999px; font-size: 11px; }.view-switch button.is-active,.add-mode-switch button.is-active { color: white; background: var(--ink); }
.ranking-intro { padding: 24px 0 16px; display: flex; align-items: baseline; justify-content: space-between; gap: 24px; }.ranking-intro h3,.filter-panel-title h3 { margin: 0; font-size: 26px; }.ranking-intro p,.filter-panel-title p { max-width: 620px; margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.65; }.recommendation-boards { display: block; }.topic-shelf { padding: 30px 0 34px; border-bottom: 1px solid var(--line); }.topic-shelf > header { margin-bottom: 16px; display: flex; align-items: end; justify-content: space-between; gap: 24px; }.topic-shelf h3 { margin: 0; font-size: 25px; }.topic-shelf header p:last-child { margin: 6px 0 0; color: var(--ink-soft); font-size: 11px; line-height: 1.6; }.topic-book-row { display: grid; grid-template-columns: repeat(6,minmax(0,1fr)); gap: 14px; }.topic-book-card { min-width: 0; }.topic-book-card img { width: 100%; aspect-ratio: 4/5; object-fit: contain; background: var(--paper-light); border: 1px solid var(--line); }.topic-book-card h4 { margin: 10px 0 5px; font-family: var(--serif); font-size: 15px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }.topic-book-card p { margin: 0; color: var(--ink-soft); font-size: 10.5px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }.topic-book-card > span { display: block; margin-top: 7px; color: var(--red); font-size: 9px; }.ranking-empty { color: var(--ink-soft); font-size: 10px; }
.filter-panel { padding-top: 28px; }.filter-panel-title { display: flex; align-items: end; justify-content: space-between; gap: 28px; }.catalog-controls { margin-top: 20px; padding-block: 12px; border-block: 1px solid var(--line); }.catalog-controls .search-box { width: min(560px,100%); }.catalog-selects { width: min(560px,100%); padding: 12px 0; display: grid; grid-template-columns: repeat(2,1fr); gap: 10px; }.catalog-selects label { color: var(--ink-soft); font-size: 11px; }.catalog-selects select { width: 100%; height: 44px; margin-top: 5px; padding: 0 30px 0 10px; color: var(--ink); background: var(--paper-light); border: 1px solid var(--line); font-size: 12px; }.result-line { min-height: 38px; margin: 0; display: flex; align-items: center; color: var(--ink-soft); font-size: 11px; }.reference-catalog-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }.reference-card { min-width: 0; padding: 13px; display: grid; grid-template-columns: 84px minmax(0,1fr); align-items: start; gap: 13px; color: var(--ink); background: var(--paper-light); border: 1px solid var(--line); }.reference-card > .reference-cover { width: 84px; aspect-ratio: 3/4; object-fit: contain; background: white; border: 1px solid var(--line); }.reference-card-copy { min-width: 0; }.reference-card h3 { margin: 9px 0 7px; font-size: 18px; line-height: 1.3; }.reference-labels { display: flex; flex-wrap: wrap; gap: 4px; }.reference-labels span { padding: 4px 6px; color: var(--ink-soft); background: rgba(23,61,53,.07); font-size: 9px; }.reference-reason { margin: 0; color: var(--red); font-family: var(--serif); font-size: 12px; line-height: 1.55; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }.reference-byline { margin: 8px 0 0; color: var(--ink-soft); font-size: 9px; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.load-more { width: 100%; min-height: 46px; margin-top: 18px; color: var(--ink); background: var(--paper-light); border: 1px solid var(--line); font-size: 11px; }

.site-footer { color: rgba(255,255,255,.65); background: #102f29; }.footer-inner { padding-block: 46px 34px; }.footer-contact strong { color: white; font-family: var(--serif); font-size: 17px; }.footer-contact p { margin: 8px 0 0; font-size: 11px; line-height: 1.8; }

dialog { padding: 0; color: var(--ink); background: var(--paper-light); border: 0; box-shadow: var(--shadow); } dialog::backdrop { background: rgba(11,32,28,.66); backdrop-filter: blur(4px); }.icon-button { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; font-size: 24px; line-height: 1; }.dialog-close { position: absolute; z-index: 10; top: 16px; right: 16px; background: var(--paper-light); }
.book-dialog { width: min(760px,100%); max-width: 100%; height: 100%; max-height: 100%; margin: 0 0 0 auto; }.book-dialog .dialog-shell,.book-detail-grid { height: 100%; }.book-dialog .dialog-close { width: 44px; height: 44px; }.book-detail-grid { overflow-y: auto; }.detail-hero { padding: 42px 48px 30px; display: grid; grid-template-columns: 150px minmax(0,1fr); gap: 28px; background: var(--paper-deep); }.detail-cover-column .cover { width: 100%; max-width: 150px; margin-inline: auto; }.detail-heading { min-width: 0; padding-top: 4px; }.detail-kicker { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 52px 12px 0; }.status-tag { padding: 5px 8px; color: var(--ink-soft); background: rgba(251,247,238,.65); border: 1px solid var(--line); font-size: 10px; }.status-tag.accent { color: var(--red); background: var(--red-soft); border-color: transparent; }.detail-heading h2 { margin: 0; font-size: clamp(28px,4vw,38px); line-height: 1.14; }.detail-byline { margin: 10px 0 0; color: var(--ink-soft); font-size: 13px; line-height: 1.65; }.detail-header-actions { margin-top: 18px; }.like-button { width: auto; min-height: 44px; padding: 0 16px; color: var(--red); background: rgba(251,247,238,.72); border: 1px solid rgba(190,78,53,.35); font-weight: 800; }.like-button.is-liked { color: white; background: var(--red); border-color: var(--red); }
.book-tools { margin-top: 12px; }.book-tools summary { min-height: 44px; display: flex; align-items: center; color: var(--ink-soft); font-size: 12px; cursor: pointer; list-style: none; }.book-tools summary::-webkit-details-marker { display: none; }.book-tools summary::after { content: "＋"; margin-left: 8px; }.book-tools[open] summary::after { content: "−"; }.cover-actions { margin-top: 8px; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 7px; }.upload-cover,.metadata-button { min-height: 44px; padding: 9px; text-align: center; border: 1px solid var(--line); background: var(--paper-light); font-size: 11px; }.upload-cover { position: relative; }.upload-cover input { position: absolute; width: 1px; height: 1px; opacity: 0; }.upload-cover:has(input:focus-visible) { outline: 3px solid var(--red); outline-offset: 3px; }.metadata-button { color: white; background: var(--ink); }.metadata-button:disabled { opacity: .5; }.detail-source { margin: 10px 0 0; color: var(--ink-soft); font-size: 11px; line-height: 1.65; }
.detail-content { padding: 32px 48px 60px; }.description-card h3,.detail-section h3,.record-form h3 { margin: 0 0 12px; font-family: var(--sans); font-size: 11px; letter-spacing: .12em; }.description-card { padding-bottom: 28px; border-bottom: 1px solid var(--line); }.description { margin: 0; font-family: var(--serif); font-size: 17px; line-height: 1.9; }.description.is-missing { color: var(--ink-soft); font-size: 14px; }.description-card > small { display: block; margin-top: 8px; color: var(--ink-soft); font-size: 10px; }
.detail-section { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--line); }.description-card + .detail-section { margin-top: 0; border-top: 0; }.fact-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px 28px; }.fact-grid div { min-width: 0; }.fact-grid dt { color: var(--ink-soft); font-size: 11px; }.fact-grid dd { margin: 5px 0 0; font-size: 13px; line-height: 1.55; overflow-wrap: anywhere; }.fact-grid dd small { display: block; margin-top: 5px; color: var(--ink-soft); font-size: 10px; }.fact-grid dd.is-missing { color: var(--red); }.evidence-list,.tag-list { display: flex; flex-wrap: wrap; gap: 7px; }.evidence-list span,.tag-list span { padding: 7px 9px; background: rgba(23,61,53,.07); font-size: 11px; }.preference-evidence { margin-top: 16px; }.preference-evidence p { margin: 0 0 7px; color: var(--ink-soft); font-size: 11px; }.similar-button { margin-top: 12px; }.source-link { color: var(--red); }
.record-form { margin-top: 30px; padding: 22px; background: var(--paper); border: 1px solid var(--line); }.record-form-header { display: flex; justify-content: space-between; gap: 10px; }.record-form-header small { color: var(--ink-soft); font-size: 11px; }.signal-grid { margin: 14px 0 16px; display: grid; grid-template-columns: repeat(3,1fr); gap: 7px; }.signal-option input { position: absolute; opacity: 0; }.signal-option span { min-height: 44px; padding: 8px 5px; display: flex; align-items: center; justify-content: center; text-align: center; color: var(--ink-soft); background: var(--paper-light); border: 1px solid var(--line); font-size: 11px; }.signal-option input:checked + span { color: white; background: var(--ink); }.signal-option input:focus-visible + span { outline: 3px solid var(--red); }.record-fields { display: grid; grid-template-columns: 145px minmax(0,1fr) auto; align-items: end; gap: 8px; }.record-fields label { min-width: 0; color: var(--ink-soft); font-size: 10px; }.record-fields input { width: 100%; min-width: 0; height: 44px; margin-top: 5px; padding: 0 10px; background: white; border: 1px solid var(--line); font-size: 12px; }.record-fields .primary-button { min-height: 44px; }.history-list { margin: 8px 0 0; padding: 0; list-style: none; color: var(--ink-soft); font-size: 11px; }.history-list li { padding: 9px 0; border-top: 1px dashed var(--line); }

.side-dialog { width: min(650px,100%); height: 100%; max-height: 100%; margin: 0 0 0 auto; }.side-dialog-shell { min-height: 100%; padding: 36px; }.side-dialog header { display: flex; justify-content: space-between; align-items: start; }.side-dialog h2,.small-dialog h2 { margin: 0; font-size: 34px; }.dialog-intro { margin: 16px 0 24px; color: var(--ink-soft); font-size: 11px; line-height: 1.7; }.bulk-enrich { margin: 24px 0; padding: 17px; display: flex; align-items: center; justify-content: space-between; gap: 16px; background: var(--paper); border: 1px solid var(--line); }.bulk-enrich strong { font-size: 12px; }.bulk-enrich p { margin: 4px 0 0; color: var(--ink-soft); font-size: 9px; line-height: 1.5; }
.candidate-list { display: grid; gap: 12px; }.candidate-card { padding: 17px; background: var(--paper); border: 1px solid var(--line); }.candidate-card header { display: flex; justify-content: space-between; }.candidate-card h3 { margin: 0; font-size: 17px; }.candidate-card header span { color: var(--red); font-size: 9px; }.candidate-fields { display: grid; gap: 5px; font-size: 10px; }.candidate-fields div { display: grid; grid-template-columns: 65px 1fr; gap: 8px; }.candidate-fields dt { color: var(--ink-soft); }.candidate-fields dd { margin: 0; }.candidate-actions { display: flex; gap: 6px; }.candidate-actions button { flex: 1; min-height: 34px; border: 1px solid var(--line); background: white; }.candidate-actions .approve { color: white; background: var(--ink); }

.small-dialog { width: min(560px,calc(100% - 24px)); }.small-dialog-shell { position: relative; padding: 38px; }.small-dialog h2 { margin-bottom: 12px; }.small-dialog p { color: var(--ink-soft); font-size: 11px; line-height: 1.7; }.manual-lookup { margin-top: 20px; display: grid; grid-template-columns: 1fr auto; gap: 7px; }.manual-lookup input { min-width: 0; height: 42px; padding: 0 11px; border: 1px solid var(--line); background: white; }.manual-preview { margin-top: 18px; padding: 16px; display: grid; grid-template-columns: 90px 1fr; gap: 15px; background: var(--paper); border: 1px solid var(--line); }.manual-preview img { width: 90px; aspect-ratio: 3/4; object-fit: cover; }.manual-preview h3 { margin: 0 0 5px; font-size: 20px; }.manual-preview p { margin: 0; font-size: 9px; }.manual-confirm { margin-top: 10px; display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 8px; }.manual-confirm label { color: var(--ink-soft); font-size: 9px; }
.access-dialog { max-width: calc(100% - 24px); }.access-form { margin-top: 22px; display: grid; gap: 9px; }.access-form label { font-size: 10px; font-weight: 700; }.access-form input { width: 100%; height: 44px; padding: 0 12px; border: 1px solid var(--line); background: white; }.access-form input:focus { outline: 3px solid color-mix(in srgb,var(--red) 24%,transparent); border-color: var(--red); }.access-error { min-height: 19px; margin: 0; color: var(--red) !important; }
.add-mode-switch { margin: 20px 0; }.metadata-entry { margin-top: 24px; }
.file-drop { min-height: 150px; margin: 20px 0; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px; text-align: center; background: rgba(255,255,255,.4); border: 1px dashed var(--ink-soft); }.file-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }.file-icon { font-size: 28px; }.file-drop small { color: var(--ink-soft); }.full-button { width: 100%; }
.toast { position: fixed; z-index: 100; left: 50%; bottom: 22px; min-width: 220px; max-width: calc(100% - 30px); padding: 11px 16px; opacity: 0; pointer-events: none; color: white; background: var(--ink); text-align: center; font-size: 11px; transform: translate(-50%,14px); transition: .2s ease; box-shadow: var(--shadow); }.toast.is-visible { opacity: 1; transform: translate(-50%,0); }.toast.is-error { background: var(--red); }.loading-grid { grid-column: 1/-1; min-height: 260px; display: grid; place-items: center; color: var(--ink-soft); }

@media (max-width: 1180px) {
  .book-grid { grid-template-columns: repeat(5,minmax(0,1fr)); }.discover-hero { grid-template-columns: minmax(0,1fr) 380px; gap: 34px; }.topic-book-row { grid-template-columns: repeat(5,minmax(0,1fr)); }.reference-catalog-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
}
@media (max-width: 820px) {
  .shell { width: min(100% - 28px,1480px); }.site-header { padding-inline: 14px; }.brand small,.header-actions .text-button { display: none; }.dashboard { grid-template-columns: 1fr; gap: 24px; }.dashboard-stats { justify-content: space-between; }
  .filter-sidebar { grid-template-columns: 1fr; align-items: stretch; }.filter-sidebar .sidebar-heading,.filter-sidebar .search-box,.filter-sidebar .primary-filter,.filter-sidebar .more-filters { grid-column: 1; }.filter-fields { position: static; width: 100%; margin-top: 8px; grid-template-columns: repeat(2,minmax(0,1fr)); box-shadow: none; }.book-grid { grid-template-columns: repeat(4,1fr); }
  .discover-hero { grid-template-columns: 1fr; gap: 30px; }.discover-heading { grid-template-columns: 1fr; align-items: start; }.ranking-intro,.filter-panel-title { align-items: start; flex-direction: column; }.topic-book-row { grid-template-columns: repeat(3,minmax(0,1fr)); }.catalog-selects { grid-template-columns: repeat(2,1fr); }.reference-catalog-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }.detail-hero { padding-inline: 32px; }.detail-content { padding-inline: 32px; }
}
@media (max-width: 600px) {
  .site-header { height: 62px; grid-template-columns: auto 1fr auto; gap: 10px; }.brand span:last-child { display: none; }.brand-mark { width: 34px; height: 34px; }.page-nav { gap: 12px; }.page-nav a { padding-inline: 0; font-size: 11px; }.count-badge { display: none; }.primary-button { padding-inline: 10px; font-size: 11px; }
  .dashboard { min-height: 0; padding-block: 28px 22px; gap: 18px; }.dashboard h1 { font-size: 36px; }.reading-focus { margin-top: 15px; align-items: flex-start; flex-direction: column; gap: 7px; }.reading-focus .topic-filters { width: 100%; }.dashboard-stats { width: 100%; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }.dashboard-stats span { min-width: 0; max-width: none; }.dashboard-stats span:nth-child(2) { text-align: center; }.dashboard-stats span:last-child { text-align: right; }.dashboard-stats strong { font-size: 24px; }
  .library-layout { padding-top: 10px; gap: 12px; }.filter-sidebar { padding: 13px; }.sidebar-heading { flex-direction: row; align-items: center; justify-content: space-between; }.filter-fields { grid-template-columns: 1fr; padding: 16px; }.book-grid { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 22px 10px; }.book-card h3 { font-size: 13px; }.book-card p { display: none; }.library-heading { min-height: 52px; }.library-heading h2 { font-size: 27px; }.detail-source,.status-tag,.fact-grid dt,.evidence-list span,.tag-list span,.signal-option span,.history-list { font-size: 11px; }
  .discover-page { padding-top: 10px; }.discover-hero { padding: 30px 20px; }.discover-hero h1 { font-size: 36px; }.featured-recommendation { padding: 14px; grid-template-columns: 82px minmax(0,1fr); gap: 14px; }.featured-recommendation > img { width: 82px; }.featured-recommendation h2 { font-size: 21px; }.featured-recommendation h2 + p { -webkit-line-clamp: 3; display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }.discover-content { padding-top: 28px; }.discover-heading h2 { font-size: 30px; }.topic-shelf { padding: 25px 0 28px; }.topic-shelf h3 { font-size: 22px; }.topic-book-row { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px 10px; }.topic-book-card p { font-size: 10px; }.view-switch { width: 100%; }.view-switch button { flex: 1; }.ranking-intro p,.filter-panel-title p,.result-line { font-size: 11px; line-height: 1.65; }.reference-labels span { font-size: 9px; }.catalog-selects { grid-template-columns: repeat(2,1fr); }.reference-catalog-grid { grid-template-columns: 1fr; }.reference-card { grid-template-columns: 78px minmax(0,1fr); }.reference-card > .reference-cover { width: 78px; }.reference-card h3 { font-size: 18px; }.footer-inner { padding-block: 36px 30px; }
  .book-dialog { width: 100%; }.detail-hero { padding: 54px 20px 22px; grid-template-columns: 92px minmax(0,1fr); gap: 16px; }.detail-cover-column .cover { max-width: 92px; }.detail-kicker { margin-right: 32px; }.detail-heading h2 { font-size: 27px; }.detail-byline { font-size: 12px; }.detail-header-actions { margin-top: 14px; }.like-button { width: 100%; padding-inline: 8px; }.book-tools { margin-top: 6px; }.cover-actions { grid-template-columns: 1fr; }.detail-content { padding: 24px 20px 48px; }.description { font-size: 16px; }.fact-grid { grid-template-columns: 1fr; gap: 15px; }.record-form { padding: 18px; }.record-form-header { flex-direction: column; }.signal-grid { grid-template-columns: repeat(2,1fr); }.record-fields { grid-template-columns: 1fr; }
  .side-dialog { width: 100%; }.side-dialog-shell,.small-dialog-shell { padding: 28px 20px; }.bulk-enrich { align-items: stretch; flex-direction: column; }.manual-lookup,.manual-confirm { grid-template-columns: 1fr; }.manual-preview { grid-template-columns: 72px 1fr; }.manual-preview img { width: 72px; }
}
@media (prefers-reduced-motion: reduce) { *,*::before,*::after { scroll-behavior: auto !important; transition: none !important; } }
