:root {
  color-scheme: light;
  --paper: #f3f1e9;
  --surface: #fcfcf8;
  --ink: #243831;
  --muted: #627068;
  --line: #d8ded4;
  --accent: #d8ed9b;
  --serif: Georgia, 'Times New Roman', serif;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
}
* { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; text-underline-offset: 4px; }
button, input, select { font: inherit; }
button, .button { touch-action: manipulation; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #7b9950; outline-offset: 4px; }
[hidden] { display: none !important; }
.shell { max-width: 1224px; margin: 0 auto; padding: 0 40px; }
.brand-bar { min-height: 104px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; gap: 12px; align-items: center; text-decoration: none; font-size: 17px; font-weight: 650; }
.brand-mark { display: inline-flex; align-items: center; justify-content: center; width: 35px; height: 39px; border: 1px solid var(--ink); border-radius: 3px 6px 6px 3px; font: 25px var(--serif); letter-spacing: -2px; padding-right: 2px; box-shadow: -3px 0 0 var(--paper), -4px 0 0 var(--ink); }
.brand-mark span { font-style: italic; }
.brand-caption, .private-label { color: var(--muted); font-size: 10px; letter-spacing: 1.6px; font-weight: 600; }
.brand-separator { font-weight: 400; color: #a3aea4; margin: 0 7px; }
.private-label { font-size: 12px; font-weight: 400; letter-spacing: 0; }
.page-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 30px; padding: 45px 0 33px; }
.page-header form { padding-top: 5px; flex-shrink: 0; }
h1 { font: 400 clamp(37px, 4.8vw, 56px)/1.12 var(--serif); letter-spacing: -1.8px; margin: 11px 0 16px; }
h2 { font-size: 20px; line-height: 1.3; font-weight: 600; letter-spacing: -.5px; margin: 0 0 8px; }
h3 { font-size: 17px; line-height: 1.4; font-weight: 600; letter-spacing: -.3px; margin: 0 0 7px; }
p { margin: 0 0 16px; }
.intro { font-size: 16px; line-height: 1.65; color: var(--muted); margin: 0; max-width: 650px; }
.eyebrow { font-size: 10px; line-height: 1.6; letter-spacing: 1.8px; font-weight: 650; color: var(--muted); }
.muted { color: var(--muted); font-size: 13px; font-weight: 400; }
.fine-print { color: var(--muted); font-size: 12px; line-height: 1.65; margin: 17px 0 0; }
.tabs { display: flex; gap: 30px; border-bottom: 1px solid var(--line); margin-bottom: 28px; }
.tabs a { display: flex; align-items: center; gap: 9px; padding: 13px 0 16px; margin-bottom: -1px; text-decoration: none; font-size: 14px; color: var(--muted); border-bottom: 2px solid transparent; }
.tabs a[aria-current] { font-weight: 600; color: var(--ink); border-color: var(--ink); }
.count { background: #e6e9df; border-radius: 5px; padding: 1px 7px; font-size: 11px; font-weight: 500; }
.tabs a[aria-current] .count { background: #dfe9cb; }
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 25px; align-items: start; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 27px; min-width: 0; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-bottom: 23px; }
.section-head h2, .section-head p { margin-bottom: 0; }
.section-head p { margin-top: 6px; }
.tag { font-size: 9px; letter-spacing: 1px; font-weight: 650; color: #53654b; background: #eaf0e0; padding: 6px 9px; border-radius: 4px; white-space: nowrap; }
button, .button { display: inline-flex; justify-content: center; align-items: center; gap: 12px; border: 1px solid var(--ink); border-radius: 6px; padding: 11px 16px; min-height: 43px; font-size: 13px; font-weight: 600; text-decoration: none; background: var(--ink); color: white; cursor: pointer; line-height: 1.5; }
button:hover, .button:hover { background: #344c41; }
button:disabled { opacity: .6; cursor: wait; }
.quiet { background: transparent; color: var(--ink); border-color: #c5cec1; }
.quiet:hover { background: #ebeee4; }
.accent { background: var(--accent); border-color: #b6ca85; color: var(--ink); }
.accent:hover { background: #cbdf8e; }
.danger { color: #914c38; border-color: #d6bbaf; }
.danger:hover { background: #f5e9e2; }
.full { width: 100%; justify-content: space-between; }
.text-link { font-size: 13px; font-weight: 550; }
.stack { display: flex; flex-direction: column; gap: 19px; }
label, .field-label { display: flex; flex-direction: column; gap: 7px; font-size: 12px; font-weight: 600; }
input, select { width: 100%; min-width: 0; border: 1px solid #c5cec1; border-radius: 5px; background: #fff; color: var(--ink); padding: 11px 12px; min-height: 44px; font-size: 14px; }
input::placeholder { color: #829085; }
.search-form { display: flex; gap: 9px; align-items: center; margin-bottom: 5px; }
.search-form input { flex: 1; }
.search-form .text-link { font-size: 12px; }
.book-row { display: flex; align-items: center; gap: 19px; padding: 25px 0; border-bottom: 1px solid var(--line); }
.book-row:last-child { border-bottom: 0; }
.book-cover { width: 84px; height: 115px; flex-shrink: 0; border-radius: 2px 5px 5px 2px; border-left: 5px solid #0002; padding: 10px 8px; display: flex; flex-direction: column; justify-content: space-between; align-items: center; color: #f7f4e7; background: #47644d; box-shadow: 2px 3px 0 #24383110; }
.cover-top { font-size: 5px; letter-spacing: 1px; }
.cover-letter { font: italic 38px/1 var(--serif); }
.cover-bottom { font-size: 7px; letter-spacing: 2px; border-top: 1px solid #ffffff40; padding-top: 5px; width: 100%; text-align: center; }
.cover-1 { background: #8a674c; }
.cover-2 { background: #657c85; }
.cover-3 { background: #797051; }
.book-info { min-width: 0; flex: 1; }
.book-category { color: var(--muted); font-size: 8px; letter-spacing: 1.1px; }
.book-info h3 { font: 400 22px/1.2 var(--serif); letter-spacing: -.3px; margin-top: 5px; overflow-wrap: anywhere; }
.book-author { color: var(--muted); font-size: 12px; margin: 0 0 13px; overflow-wrap: anywhere; }
.book-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; color: var(--muted); font-size: 10px; margin: 0; }
.status-dot { display: inline-block; background: #6c8650; width: 5px; height: 5px; border-radius: 50%; }
.book-download { font-size: 11px; padding: 8px 11px; min-height: 37px; }
.shelf-note { display: flex; gap: 11px; border-top: 1px solid var(--line); padding-top: 17px; color: var(--muted); }
.shelf-note p { margin: 0; font-size: 11px; }
.shelf-note strong { font-weight: 550; }
.step-mark { font-size: 22px; font-weight: 400; color: var(--muted); line-height: 1; }
.upload-card .section-head { margin-bottom: 10px; }
.file-picker { display: flex; align-items: center; text-align: center; border: 1px dashed #b6c3aa; border-radius: 7px; background: #f4f6ed; padding: 16px 12px; gap: 5px; cursor: pointer; }
.file-picker .muted { font-size: 10px; }
.file-icon { font-size: 24px; line-height: 1; margin-bottom: 4px; }
.file-picker input { border: 0; background: transparent; padding: 8px 0 0; font-size: 10px; min-height: 0; max-width: 100%; }
.file-picker input::file-selector-button { border: 1px solid #c5cec1; background: white; padding: 5px 8px; font: inherit; color: var(--ink); border-radius: 3px; margin-right: 7px; cursor: pointer; }
.check-label { flex-direction: row; align-items: flex-start; gap: 9px; font-weight: 400; font-size: 11px; }
.check-label input { width: 15px; min-height: 15px; height: 15px; padding: 0; margin: 2px 0 0; flex-shrink: 0; accent-color: var(--ink); }
summary { cursor: pointer; font-size: 12px; color: var(--muted); }
details[open] > summary { margin-bottom: 15px; }
.version-choice label { margin-top: 10px; }
.version-choice .fine-print { margin-top: 9px; }
.form-status:empty, .copy-status:empty { display: none; }
.form-status { margin: 0; }
.setup-note { padding: 26px 14px 8px; }
.setup-note h3 { font: 400 25px/1.25 var(--serif); margin-top: 9px; }
.setup-note p { color: var(--muted); font-size: 12px; line-height: 1.7; }
.empty-state { text-align: center; padding: 44px 12px 48px; }
.empty-state h3 { font: 400 28px/1.2 var(--serif); margin: 20px 0 13px; }
.empty-state p { color: var(--muted); font-size: 13px; line-height: 1.8; max-width: 380px; margin: 0 auto 20px; }
.empty-books { display: flex; gap: 6px; align-items: flex-end; justify-content: center; height: 86px; margin-bottom: 25px; }
.empty-books i { display: block; width: 24px; height: 74px; border: 1px solid #758773; border-radius: 3px; background: #e4e9d6; }
.empty-books i:nth-child(2) { height: 85px; background: #ced7b7; }
.empty-books i:last-child { transform: rotate(-12deg); margin-left: 8px; background: #e5ddc9; }
.reader-row { display: flex; align-items: center; gap: 18px; padding: 23px 0; border-top: 1px solid var(--line); }
.reader-symbol { width: 47px; height: 62px; border: 2px solid #6e806c; border-bottom-width: 7px; border-radius: 5px; display: flex; align-items: center; justify-content: center; background: #e9edde; flex-shrink: 0; }
.reader-symbol span { font: 12px var(--serif); }
.reader-symbol.large { margin: 0 auto 24px; width: 65px; height: 88px; }
.reader-symbol.large span { font-size: 13px; }
.reader-info { flex: 1; min-width: 0; }
.reader-info h3 { overflow-wrap: anywhere; }
.reader-info p { font-size: 11px; margin: 7px 0 0; }
.reader-row button { font-size: 11px; padding: 8px 10px; }
.status { display: inline-block; background: #e7eedb; color: #4b643f; font-size: 10px; font-weight: 550; padding: 3px 7px; border-radius: 4px; }
.status-muted { background: #eeece6; color: #736e63; }
.connection-details { border-top: 1px solid var(--line); padding-top: 20px; margin-top: 8px; }
.steps { list-style: none; counter-reset: setup; padding: 0; margin: 20px 0; }
.steps li { counter-increment: setup; position: relative; padding-left: 34px; margin-bottom: 20px; }
.steps li::before { content: counter(setup, decimal-leading-zero); position: absolute; left: 0; top: 2px; color: #82916d; font-size: 10px; }
.steps strong { font-size: 12px; font-weight: 600; display: block; margin-bottom: 3px; }
.steps span { display: block; font-size: 12px; color: var(--muted); }
.notice { padding: 14px 16px; background: #eaf0de; border: 1px solid #cbd9b3; border-radius: 6px; margin-bottom: 22px; font-size: 13px; }
.notice.error { color: #864633; background: #f8ebe5; border-color: #dec0b3; }
footer { padding: 35px 0 30px; text-align: center; font-size: 11px; color: #748075; }
.login-layout { display: grid; grid-template-columns: 1fr 420px; gap: 80px; max-width: 1010px; margin: 78px auto 65px; align-items: center; }
.login-intro h1 { font-size: clamp(55px, 6vw, 79px); letter-spacing: -3px; margin: 18px 0 25px; }
.login-intro .intro { font-size: 16px; line-height: 1.8; }
.reading-note { margin-top: 36px; display: flex; gap: 15px; align-items: center; }
.reading-note p { margin: 0; font-size: 12px; line-height: 1.8; color: var(--muted); }
.note-line { height: 37px; border-left: 2px solid #bbc99d; }
.login-card { padding: 32px; }
.login-card h2 { font-size: 22px; margin: 10px 0; }
.login-card > .muted { margin-bottom: 25px; }
.login-card .full { margin-top: 4px; }
.login-card .fine-print { margin-top: 22px; }
.password-field { position: relative; display: block; }
.password-field input { padding-right: 68px; }
.password-toggle { position: absolute; top: 1px; right: 1px; min-height: 42px; border: 0; background: transparent; color: var(--muted); padding: 7px 12px; font-size: 11px; }
.password-toggle:hover { color: var(--ink); background: #f1f4ea; }
.detail-shell { max-width: 850px; }
.back-link { display: inline-block; margin-top: 32px; font-size: 12px; }
.detail-header { margin: 32px 0; }
.detail-header h1 { font-size: clamp(36px, 5vw, 51px); overflow-wrap: anywhere; }
.detail-header .intro { font-size: 15px; }
.credential-item { margin: 22px 0; }
.field-label { margin-bottom: 7px; }
.copy-field { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 5px; padding: 9px 9px 9px 12px; background: #f5f6ef; }
.copy-field code { font: 12px/1.7 ui-monospace, SFMono-Regular, Consolas, monospace; overflow-wrap: anywhere; flex: 1; min-width: 0; }
.copy-field button { font-size: 11px; padding: 6px 10px; min-height: 34px; flex-shrink: 0; background: var(--surface); }
.copy-status { margin: 12px 0; }
.card-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.centered { text-align: center; margin-top: 22px; }
.result-card { display: flex; align-items: center; gap: 28px; }
.result-card h2 { font: 400 27px/1.3 var(--serif); margin-top: 12px; overflow-wrap: anywhere; }
.result-card .book-cover { width: 100px; height: 142px; }
.file-details { margin-top: 23px; }
.file-details code { overflow-wrap: anywhere; }
.pagination { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 20px 0; }
.pagination .button { padding: 7px 10px; min-height: 36px; font-size: 11px; }
.sr-only, .skip-link:not(:focus) { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip-link:focus { display: block; padding: 10px; text-align: center; }
@media (max-width: 1000px) {
  .shell { padding: 0 26px; }
  .workspace { grid-template-columns: minmax(0, 1fr) 295px; gap: 20px; }
  .card { padding: 22px; }
  .book-row { gap: 13px; flex-wrap: wrap; }
  .book-info { flex-basis: calc(100% - 97px); }
  .book-download { margin-left: 97px; margin-top: -2px; }
  .login-layout { grid-template-columns: 1fr 390px; gap: 38px; }
  .login-card { padding: 28px; }
  .reader-row { flex-wrap: wrap; }
  .reader-row form { margin-left: 65px; }
}
@media (max-width: 740px) {
  .shell { padding: 0 18px; }
  .brand-bar { min-height: 82px; }
  .brand-caption { font-size: 8px; letter-spacing: 1px; }
  .brand-separator { margin: 0 4px; }
  .private-label { display: none; }
  .brand-mark { width: 29px; height: 33px; font-size: 23px; }
  .page-header { padding: 30px 0 20px; gap: 12px; }
  .page-header h1 { font-size: 37px; }
  .page-header .intro { font-size: 13px; }
  .page-header .eyebrow { font-size: 8px; letter-spacing: 1.2px; }
  .page-header button { font-size: 11px; padding: 8px 10px; min-height: 44px; }
  .workspace { grid-template-columns: 1fr; }
  .tabs { margin-bottom: 20px; }
  .card { padding: 22px 19px; }
  .book-row { gap: 16px; flex-wrap: nowrap; }
  .book-info { flex-basis: auto; }
  .book-cover { width: 70px; height: 98px; }
  .cover-letter { font-size: 32px; }
  .book-info h3 { font-size: 20px; }
  .book-download { margin: 0; min-height: 44px; }
  .section-head { gap: 8px; }
  .tag { font-size: 8px; padding: 5px 7px; }
  .setup-note { padding: 25px 10px 5px; }
  .reader-row { flex-wrap: nowrap; }
  .reader-row form { margin-left: 0; }
  .login-layout { display: block; margin: 38px auto 20px; max-width: 440px; }
  .login-intro { margin-bottom: 30px; }
  .login-intro h1 { font-size: 57px; margin: 10px 0 17px; }
  .login-intro h1 br { display: none; }
  .login-intro .intro { font-size: 14px; }
  .reading-note { display: none; }
  .login-card { padding: 26px; }
  .detail-header h1 { font-size: 39px; }
  .detail-header { margin: 25px 0; }
  .result-card { gap: 18px; }
  .result-card .book-cover { width: 75px; height: 109px; }
}
@media (max-width: 440px) {
  .book-row { flex-wrap: wrap; column-gap: 15px; row-gap: 12px; }
  .book-info { flex-basis: calc(100% - 85px); }
  .book-download { margin-left: 85px; }
  .reader-row { flex-wrap: wrap; }
  .reader-row form { margin-left: 65px; }
  .search-form { flex-wrap: wrap; }
  .result-card { align-items: flex-start; }
  .result-card .card-actions { flex-direction: column; }
  .copy-field { align-items: flex-start; }
  .login-intro h1 { font-size: 51px; }
}
@media (prefers-reduced-motion: no-preference) {
  button, .button, .tabs a { transition: background-color .15s ease, border-color .15s ease; }
}
.spaced{margin-top:24px}.spaced-bottom{margin-bottom:24px}.metadata-grid{display:grid;grid-template-columns:1fr 1fr;gap:20px}.category-row{display:flex;gap:10px;margin-top:12px}.category-row input{flex:1;min-width:0}.version-row{display:flex;justify-content:space-between;gap:20px;border-top:1px solid var(--line);padding:20px 0}.version-row>div{min-width:0}.version-hash{overflow-wrap:anywhere;max-width:480px}.library-types{display:flex;flex-wrap:wrap;gap:10px;margin-bottom:20px}.library-types a{padding:7px 11px;border:1px solid var(--line);border-radius:5px;font-size:12px;text-decoration:none}.library-types a[aria-current]{background:var(--accent)}.book-info h3 a{text-decoration:none}.book-row{flex-wrap:wrap}.search-form{flex-wrap:wrap}.search-form select{width:auto;max-width:210px}.book-row>.danger{font-size:11px}textarea{font:inherit;width:100%;border:1px solid #c5cec1;border-radius:5px;resize:vertical;padding:10px;background:white;color:var(--ink)}@media(max-width:740px){.metadata-grid{grid-template-columns:1fr}.version-row{flex-direction:column}.search-form select{max-width:100%}}

.workspace > *, .card, .sidebar, .metadata-grid > * { min-width: 0; }
input, select, textarea { max-width: 100%; min-width: 0; }
.detail-header h1, .card h2 { overflow-wrap: anywhere; }
