@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+SC:wght@500;600;700&family=Noto+Sans+SC:wght@400;500;600;700&display=swap');

:root {
  color-scheme: light;
  --bg: #f7f6f2;
  --paper: #fffefa;
  --paper-2: #f0eee7;
  --text: #252826;
  --muted: #72766f;
  --subtle: #9b9e98;
  --border: #e5e2d9;
  --brand: #176d5c;
  --brand-dark: #0e5145;
  --brand-soft: #e4f0eb;
  --gold: #d49b3a;
  --shadow: 0 12px 38px rgba(44, 50, 41, .08);
  --serif: 'Noto Serif SC', 'Songti SC', SimSun, serif;
  --sans: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #191b19;
  --paper: #222522;
  --paper-2: #2b2e2a;
  --text: #ecebe5;
  --muted: #b1b4ac;
  --subtle: #858a80;
  --border: #383c36;
  --brand: #79c7ad;
  --brand-dark: #9edac5;
  --brand-soft: #233e35;
  --gold: #ebbd68;
  --shadow: 0 14px 42px rgba(0, 0, 0, .2);
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body { margin: 0; min-width: 320px; color: var(--text); background: var(--bg); font-family: var(--sans); font-size: 15px; line-height: 1.65; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: 3px solid rgba(23, 109, 92, .35); outline-offset: 2px; }

.site-header { position: sticky; top: 0; z-index: 20; height: 70px; background: color-mix(in srgb, var(--bg) 89%, transparent); border-bottom: 1px solid color-mix(in srgb, var(--border) 65%, transparent); backdrop-filter: blur(14px); }
.header-inner { width: min(1200px, calc(100% - 48px)); height: 100%; margin: 0 auto; display: flex; align-items: center; gap: 42px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-family: var(--serif); font-weight: 700; font-size: 21px; letter-spacing: .08em; white-space: nowrap; }
.brand-mark { width: 31px; height: 31px; display: inline-grid; place-items: center; border-radius: 9px 3px 9px 3px; background: var(--brand); color: #fff; font-family: var(--serif); font-size: 17px; letter-spacing: 0; }
.main-nav { display: flex; align-items: stretch; align-self: stretch; gap: 8px; }
.nav-item { padding: 0 13px; height: 100%; display: flex; align-items: center; color: var(--muted); position: relative; font-size: 14px; font-weight: 500; white-space: nowrap; }
.nav-item::after { content: ''; position: absolute; bottom: 0; left: 17px; right: 17px; height: 2px; border-radius: 3px; background: transparent; transition: background .18s; }
.nav-item:hover, .nav-item.active { color: var(--text); }
.nav-item.active::after { background: var(--brand); }
.header-actions { margin-left: auto; display: flex; gap: 12px; align-items: center; }
.icon-button { width: 36px; height: 36px; border: 1px solid var(--border); color: var(--muted); background: var(--paper); border-radius: 50%; font-size: 18px; line-height: 1; }
.icon-button:hover { color: var(--brand); border-color: var(--brand); }
.header-search { border: 1px solid var(--border); border-radius: 9px; padding: 7px 10px 7px 13px; color: var(--muted); font-size: 13px; background: var(--paper); }
.header-search span { margin-left: 16px; color: var(--brand); font-size: 17px; }

.main-shell { width: min(1200px, calc(100% - 48px)); margin: 0 auto; padding: 56px 0 86px; }
.home-shell { padding-top: 42px; }
.page-heading { margin-bottom: 29px; display: flex; justify-content: space-between; gap: 16px; align-items: end; }
.page-heading h1, .detail-summary h1 { font-family: var(--serif); font-size: clamp(28px, 3vw, 38px); line-height: 1.25; margin: 0; letter-spacing: -.035em; }
.page-subtitle { color: var(--muted); margin: 7px 0 0; }
.eyebrow { color: var(--brand); text-transform: uppercase; font-size: 12px; font-weight: 700; letter-spacing: .12em; margin: 0 0 5px; }
.muted { color: var(--muted); }

.welcome-panel { min-height: 345px; overflow: hidden; position: relative; display: grid; grid-template-columns: 1.25fr .75fr; background: var(--paper); box-shadow: var(--shadow); border: 1px solid var(--border); border-radius: 20px; }
.welcome-copy { padding: 54px 60px; position: relative; z-index: 1; }
.welcome-copy h1 { margin: 0; font-family: var(--serif); font-size: clamp(34px, 4vw, 51px); line-height: 1.25; letter-spacing: -.06em; }
.welcome-copy > p:not(.eyebrow):not(.search-tip) { color: var(--muted); max-width: 470px; margin: 17px 0 25px; }
.quick-search, .large-search, .library-search { display: flex; gap: 8px; }
.quick-search { max-width: 570px; }
.quick-search input, .large-search input, .library-search input { min-width: 0; flex: 1; border: 1px solid var(--border); color: var(--text); background: var(--bg); padding: 12px 14px; border-radius: 10px; outline: 0; }
.quick-search input:focus, .large-search input:focus, .library-search input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent); }
.search-tip { font-size: 12px; color: var(--subtle); margin: 10px 0 0; }
.button { border: 1px solid transparent; border-radius: 10px; padding: 10px 17px; font-weight: 600; white-space: nowrap; transition: transform .15s, background .15s, border-color .15s; }
.button:hover { transform: translateY(-1px); }
.button:disabled { cursor: wait; opacity: .65; transform: none; }
.button.primary { color: white; background: var(--brand); border-color: var(--brand); }
.button.primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.button.ghost { color: var(--brand); background: var(--paper); border-color: var(--border); }
.button.large { padding: 14px 21px; }
.welcome-art { background: linear-gradient(145deg, #d5e6db 0%, #b7d3c4 48%, #8eb8a6 100%); position: relative; min-height: 100%; overflow: hidden; }
:root[data-theme="dark"] .welcome-art { background: linear-gradient(145deg, #1d3b33, #2f6957); }
.welcome-art::before, .welcome-art::after { content: ''; position: absolute; width: 360px; height: 360px; border: 1px solid rgba(255,255,255,.28); border-radius: 50%; right: -140px; top: -108px; }
.welcome-art::after { width: 250px; height: 250px; right: 38px; top: 135px; }
.welcome-art span { position: absolute; right: 72px; bottom: 31px; z-index: 2; font-family: var(--serif); font-weight: 700; color: rgba(255,255,255,.78); font-size: 170px; line-height: .9; }
.art-book { position: absolute; bottom: 38px; width: 62px; border-radius: 3px 4px 4px 3px; box-shadow: 11px 11px 0 rgba(24, 69, 54, .14); transform-origin: bottom; }
.art-one { left: 62px; height: 185px; background: #2d6257; transform: rotate(-11deg); }.art-two { left: 121px; height: 223px; background: #e6b75f; transform: rotate(5deg); }.art-three { left: 182px; height: 167px; background: #f4eee0; transform: rotate(-2deg); }

.stats-section { padding: 58px 0 39px; }
.section-title { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 18px; }
.section-title h2 { font-family: var(--serif); font-size: 22px; line-height: 1.4; margin: 0; letter-spacing: -.03em; }
.text-link { color: var(--brand); font-size: 14px; font-weight: 600; white-space: nowrap; }
.text-link:hover { text-decoration: underline; }
.stats-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.stat-card { min-height: 104px; display: flex; flex-direction: column; justify-content: center; gap: 1px; padding: 16px 18px; background: var(--paper); border: 1px solid var(--border); border-radius: 13px; }
.stat-card strong { font-family: var(--serif); font-size: 28px; letter-spacing: -.03em; line-height: 1.25; }.stat-card span { color: var(--muted); font-size: 13px; }.stat-card.blue strong { color: #4e7baa; }.stat-card.orange strong { color: #c87c2d; }.stat-card.green strong { color: var(--brand); }.stat-card.gray strong { color: #7f827e; }.stat-card.accent { background: var(--brand); border-color: var(--brand); }.stat-card.accent strong, .stat-card.accent span { color: white; }
.period-stats { display: flex; gap: 23px; margin: 15px 2px 0; color: var(--muted); font-size: 13px; }.period-stats b { color: var(--brand); margin: 0 3px; }
.content-section { padding: 26px 0 31px; border-top: 1px solid var(--border); }

.book-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 13px; }
.book-card { min-width: 0; background: var(--paper); border: 1px solid var(--border); border-radius: 13px; transition: border-color .16s, box-shadow .16s, transform .16s; overflow: hidden; }
.book-card:hover { border-color: color-mix(in srgb, var(--brand) 48%, var(--border)); box-shadow: 0 8px 22px rgba(31, 61, 51, .09); transform: translateY(-2px); }
.book-card-main { display: flex; gap: 14px; width: 100%; min-height: 168px; padding: 14px; color: inherit; text-align: left; background: none; border: 0; }
.book-card.compact .book-card-main { min-height: 149px; }
.cover { position: relative; flex: 0 0 auto; overflow: hidden; background: linear-gradient(150deg, #cfdbd2, #95b6a8); color: #f8f7f0; box-shadow: 4px 5px 9px rgba(33, 45, 38, .18); }
.cover span { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--serif); font-size: 28px; font-weight: 700; color: rgba(255,255,255,.86); }.cover img + span { display: none; }.cover img { width: 100%; height: 100%; display: block; object-fit: cover; position: relative; z-index: 1; background: var(--paper-2); }
.cover-card { width: 85px; height: 121px; border-radius: 3px 5px 5px 3px; }.book-card.compact .cover-card { width: 76px; height: 108px; }.cover-detail { width: 195px; height: 279px; border-radius: 5px 9px 9px 5px; }.cover-empty { background: linear-gradient(150deg, #176d5c, #529783); }
.book-card-copy { min-width: 0; flex: 1; display: flex; flex-direction: column; }.book-card h3 { margin: 1px 0 3px; font-family: var(--serif); line-height: 1.45; font-size: 17px; letter-spacing: -.02em; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; }.author-line { margin: 0; color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }.book-card .muted, .source-line { margin: 4px 0 0; font-size: 12px; color: var(--subtle); }.source-line { color: var(--brand); margin-top: auto; }.card-meta { display: flex; align-items: center; justify-content: space-between; gap: 5px; margin-top: auto; font-size: 12px; color: var(--muted); }.status-pill { display: inline-flex; align-items: center; width: fit-content; border-radius: 30px; padding: 3px 8px; font-size: 12px; font-weight: 600; }.status-想读 { background: #e3edf7; color: #4d7199; }.status-在读 { background: #fff0d9; color: #a76113; }.status-已读 { background: var(--brand-soft); color: var(--brand-dark); }.status-弃读 { background: #e8e8e6; color: #6c706c; }:root[data-theme="dark"] .status-想读 { background: #283b4c; color: #a9c9e7; }:root[data-theme="dark"] .status-在读 { background: #4a3721; color: #ffc979; }:root[data-theme="dark"] .status-弃读 { background: #3a3c39; color: #c1c3bd; }
.mini-progress { height: 4px; overflow: hidden; margin-top: auto; background: var(--paper-2); border-radius: 3px; }.mini-progress i, .progress-track i { height: 100%; display: block; border-radius: inherit; background: var(--brand); }.book-card small { margin-top: 4px; font-size: 11px; color: var(--subtle); }
.empty-inline { grid-column: 1 / -1; padding: 43px 24px; text-align: center; background: color-mix(in srgb, var(--paper) 60%, transparent); border: 1px dashed var(--border); border-radius: 13px; color: var(--muted); }

.search-panel { padding: 28px; background: var(--paper); border: 1px solid var(--border); border-radius: 17px; }.large-search { max-width: 790px; }.large-search input { padding: 14px 16px; font-size: 16px; }.large-search .button { padding-left: 26px; padding-right: 26px; }.search-panel p { color: var(--muted); margin: 11px 2px 0; font-size: 13px; }.results-heading { display: flex; justify-content: space-between; align-items: end; margin: 40px 0 18px; }.results-heading h2 { margin: 0; font-family: var(--serif); font-size: 25px; }.results-heading > span { color: var(--muted); font-size: 13px; }.api-warning { margin: 0 0 13px; padding: 9px 12px; background: #fff4db; color: #956019; border-radius: 8px; font-size: 13px; }:root[data-theme="dark"] .api-warning { background: #42361f; color: #f2ca7c; }.search-empty { padding: 89px 20px; text-align: center; color: var(--muted); }.search-empty span, .empty-icon { font-family: var(--serif); color: var(--brand); font-size: 45px; line-height: 1; }.search-empty h2 { color: var(--text); font-family: var(--serif); margin: 12px 0 4px; font-size: 22px; }.search-empty p { margin: 0; }

.library-toolbar, .notes-toolbar { display: flex; justify-content: space-between; gap: 17px; align-items: center; padding-bottom: 18px; border-bottom: 1px solid var(--border); }.filter-row, .tag-filter { display: flex; flex-wrap: wrap; gap: 7px; }.filter-chip { display: inline-flex; gap: 7px; align-items: center; padding: 6px 10px; border-radius: 20px; color: var(--muted); background: var(--paper); border: 1px solid var(--border); font-size: 13px; white-space: nowrap; }.filter-chip:hover { color: var(--brand); border-color: var(--brand); }.filter-chip.active { color: white; background: var(--brand); border-color: var(--brand); }.filter-chip span { font-size: 11px; opacity: .82; }.library-search { width: min(360px, 38%); }.library-search input { padding: 8px 10px; font-size: 13px; }.library-search .button { padding: 8px 12px; }.library-summary, .notes-overview { margin: 16px 0 18px; color: var(--muted); font-size: 13px; }.library-summary p, .notes-overview p { margin: 0; }

.back-link { display: inline-block; margin-bottom: 22px; color: var(--muted); font-size: 14px; }.back-link:hover { color: var(--brand); }.book-intro { display: grid; grid-template-columns: 225px minmax(0, 1fr); gap: 37px; padding: 5px 0 41px; }.detail-cover { padding-top: 4px; }.detail-summary { min-width: 0; }.detail-summary h1 { font-size: clamp(31px, 3.6vw, 44px); }.subtitle { margin: 5px 0 0; color: var(--muted); }.detail-authors { margin: 8px 0 22px; color: var(--brand); font-weight: 600; }.description { max-width: 800px; }.description h2 { font-family: var(--serif); margin: 0 0 7px; font-size: 18px; }.description p { color: var(--muted); margin: 0; white-space: normal; }.missing-copy { color: var(--subtle); }.book-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 20px; margin: 28px 0 0; padding: 18px 0 0; border-top: 1px solid var(--border); }.book-facts div { min-width: 0; }.book-facts dt { color: var(--subtle); font-size: 12px; }.book-facts dd { margin: 1px 0 0; overflow-wrap: anywhere; font-size: 13px; }.add-panel { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 27px 31px; background: var(--brand-soft); border: 1px solid color-mix(in srgb, var(--brand) 16%, var(--border)); border-radius: 14px; }.add-panel h2 { margin: 0; font-family: var(--serif); font-size: 23px; }.add-panel p:not(.eyebrow) { color: var(--muted); margin: 4px 0 0; }
.reading-editor, .detail-notes { padding: 35px 0; border-top: 1px solid var(--border); }.entry-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-bottom: 19px; }.entry-fields label, .note-form label { display: flex; flex-direction: column; gap: 6px; color: var(--muted); font-size: 13px; }.entry-fields input, .entry-fields select, .note-form input, .note-form textarea { width: 100%; color: var(--text); background: var(--paper); border: 1px solid var(--border); border-radius: 8px; padding: 9px 10px; outline: 0; }.entry-fields input:focus, .entry-fields select:focus, .note-form input:focus, .note-form textarea:focus { border-color: var(--brand); }.detail-progress { max-width: 640px; display: grid; grid-template-columns: 1fr auto; gap: 7px 12px; align-items: center; margin: 3px 0 20px; color: var(--muted); font-size: 13px; }.progress-label { grid-column: 1 / -1; display: flex; justify-content: space-between; }.progress-label b { color: var(--text); }.progress-track { height: 8px; overflow: hidden; border-radius: 5px; background: var(--paper-2); }.detail-progress > span { color: var(--brand); font-weight: 600; }.note-form { padding: 19px; margin-bottom: 18px; background: var(--paper); border: 1px solid var(--border); border-radius: 12px; }.form-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }.form-title h3 { margin: 0; font-family: var(--serif); font-size: 18px; }.text-button, .note-actions button { color: var(--muted); border: 0; background: none; padding: 3px 5px; font-size: 13px; }.text-button:hover, .note-actions button:hover { color: var(--brand); }.note-form textarea { height: 118px; resize: vertical; line-height: 1.65; }.note-form-bottom { display: grid; grid-template-columns: 130px minmax(170px, 1fr) auto; align-items: end; gap: 11px; margin-top: 11px; }.note-form-bottom .button { padding: 9px 15px; }
.notes-list { display: grid; gap: 11px; }.note-card { padding: 18px 20px; background: var(--paper); border: 1px solid var(--border); border-radius: 12px; }.note-top { display: flex; justify-content: space-between; gap: 10px; }.note-top > div { display: flex; align-items: center; gap: 10px; min-width: 0; }.note-book { display: inline-flex; align-items: center; min-width: 0; padding: 0; gap: 7px; background: none; border: 0; color: var(--brand); font-size: 13px; font-weight: 600; text-align: left; }.note-book b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.note-book img, .note-book span { width: 20px; height: 27px; object-fit: cover; background: var(--brand); color: white; border-radius: 2px; display: grid; place-items: center; font: 11px var(--serif); }.note-date { color: var(--subtle); font-size: 12px; white-space: nowrap; }.note-actions { display: flex; gap: 4px; }.note-page { margin: 10px 0 5px; color: var(--brand); font-size: 13px; }.note-content { font-size: 15px; }.tag-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }.tag-row span { padding: 2px 7px; color: var(--muted); background: var(--paper-2); border-radius: 5px; font-size: 11px; }.notes-toolbar { align-items: flex-start; flex-direction: column; }.notes-toolbar .library-search { width: min(500px, 100%); }.danger-zone { padding-top: 10px; }.danger-zone button { padding: 6px 0; color: #b35450; border: 0; background: none; font-size: 13px; }.danger-zone button:hover { text-decoration: underline; }

.loading-state { min-height: 220px; display: flex; align-items: center; justify-content: center; gap: 11px; color: var(--muted); }.spinner { width: 18px; height: 18px; display: inline-block; border: 2px solid var(--border); border-top-color: var(--brand); border-radius: 50%; animation: spin .75s linear infinite; }@keyframes spin { to { transform: rotate(360deg); } }.empty-state { max-width: 580px; margin: 90px auto; padding: 32px; text-align: center; background: var(--paper); border: 1px solid var(--border); border-radius: 16px; }.empty-state h2 { margin: 12px 0 4px; font-family: var(--serif); font-size: 24px; }.empty-state p { color: var(--muted); margin: 0 0 20px; }.toast-region { position: fixed; z-index: 50; top: 82px; right: 22px; display: grid; gap: 8px; max-width: min(370px, calc(100vw - 30px)); }.toast { padding: 11px 14px; color: white; background: var(--brand-dark); box-shadow: var(--shadow); border-radius: 9px; animation: toast-in .2s ease-out; }.toast.error { background: #a44e4a; }.toast.leave { animation: toast-out .45s ease-in forwards; }@keyframes toast-in { from { transform: translateY(-10px); opacity: 0; } }@keyframes toast-out { to { transform: translateY(-8px); opacity: 0; } }

.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 15% 15%, color-mix(in srgb, var(--brand) 13%, transparent), transparent 36%), var(--bg); }.login-card { width: min(100%, 430px); padding: 42px; background: var(--paper); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow); }.login-brand { display: inline-flex; margin-bottom: 34px; }.login-card h1 { margin: 4px 0 8px; font: 36px var(--serif); }.login-card > p:not(.eyebrow) { margin: 0 0 25px; color: var(--muted); }.login-card form { display: grid; gap: 15px; }.login-card label { display: grid; gap: 7px; color: var(--muted); font-size: 13px; }.login-card input { width: 100%; padding: 12px 13px; color: var(--text); background: var(--bg); border: 1px solid var(--border); border-radius: 9px; outline: none; }.login-card input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 14%, transparent); }.login-card small { display: block; margin-top: 20px; text-align: center; color: var(--subtle); }.login-error { margin: -10px 0 15px; padding: 9px 11px; color: #a44e4a; background: color-mix(in srgb, #a44e4a 10%, transparent); border-radius: 7px; font-size: 13px; }

@media (max-width: 960px) { .header-inner, .main-shell { width: min(100% - 34px, 760px); }.header-inner { gap: 19px; }.book-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }.stats-grid { grid-template-columns: repeat(3, 1fr); }.welcome-panel { grid-template-columns: 1fr 260px; }.welcome-copy { padding: 43px 39px; }.welcome-art span { right: 23px; font-size: 128px; }.art-book { transform: scale(.8) !important; transform-origin: bottom left; }.art-one { left: 27px; }.art-two { left: 75px; }.art-three { left: 123px; }.book-intro { grid-template-columns: 180px minmax(0, 1fr); gap: 27px; }.cover-detail { width: 162px; height: 232px; }.book-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }.entry-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 680px) { body { font-size: 14px; }.site-header { height: 62px; }.header-inner, .main-shell { width: min(100% - 24px, 560px); }.header-inner { gap: 0; }.brand { font-size: 19px; }.brand-mark { width: 28px; height: 28px; }.main-nav { margin-left: auto; gap: 0; }.nav-item { padding: 0 8px; font-size: 13px; }.nav-item::after { left: 9px; right: 9px; }.header-actions { margin-left: 5px; gap: 4px; }.header-search { display: none; }.icon-button { width: 32px; height: 32px; }.main-shell { padding-top: 32px; padding-bottom: 52px; }.home-shell { padding-top: 24px; }.welcome-panel { min-height: auto; grid-template-columns: 1fr; }.welcome-copy { padding: 33px 24px 30px; }.welcome-copy h1 { font-size: 35px; }.welcome-art { min-height: 122px; }.welcome-art span { bottom: -16px; right: 26px; font-size: 116px; }.welcome-art::after { display: none; }.art-book { bottom: 0; transform: scale(.51) !important; }.art-one { left: 30px; }.art-two { left: 60px; }.art-three { left: 92px; }.quick-search { flex-direction: column; }.quick-search .button { width: 100%; }.stats-section { padding: 37px 0 23px; }.stats-grid { grid-template-columns: repeat(2, 1fr); }.stat-card { min-height: 89px; padding: 13px; }.stat-card strong { font-size: 24px; }.content-section { padding: 24px 0; }.section-title { align-items: end; }.section-title h2 { font-size: 19px; }.book-grid { grid-template-columns: 1fr; gap: 10px; }.book-card-main { min-height: 142px; }.book-card.compact .book-card-main { min-height: 133px; }.cover-card { width: 74px; height: 105px; }.book-card.compact .cover-card { width: 70px; height: 99px; }.page-heading { margin-bottom: 21px; }.page-heading h1 { font-size: 30px; }.search-panel { padding: 16px; }.large-search { flex-direction: column; }.large-search .button { width: 100%; }.results-heading { margin-top: 29px; }.library-toolbar { align-items: stretch; flex-direction: column; }.filter-row { overflow-x: auto; flex-wrap: nowrap; padding-bottom: 2px; }.library-search { width: 100%; }.book-intro { grid-template-columns: 116px minmax(0, 1fr); gap: 18px; padding-bottom: 31px; }.cover-detail { width: 116px; height: 166px; }.detail-summary h1 { font-size: 29px; }.detail-authors { margin: 6px 0 12px; }.description { grid-column: 1 / -1; }.detail-summary { display: contents; }.detail-summary .eyebrow, .detail-summary h1, .detail-summary .subtitle, .detail-summary .detail-authors { grid-column: 2; }.detail-summary .description, .detail-summary .missing-copy, .detail-summary .book-facts { grid-column: 1 / -1; }.book-facts { margin-top: 18px; grid-template-columns: repeat(2, minmax(0, 1fr)); }.add-panel { flex-direction: column; align-items: stretch; padding: 22px; }.add-panel .button { width: 100%; }.entry-fields { grid-template-columns: 1fr 1fr; gap: 10px; }.reading-editor, .detail-notes { padding: 27px 0; }.note-form { padding: 14px; }.note-form-bottom { grid-template-columns: 1fr 1fr; }.note-form-bottom label:nth-child(2) { grid-column: 1 / -1; }.note-form-bottom .button { grid-column: 1 / -1; }.notes-toolbar { gap: 12px; }.tag-filter { overflow-x: auto; flex-wrap: nowrap; width: 100%; padding-bottom: 2px; }.toast-region { top: 70px; right: 12px; }.period-stats { justify-content: space-between; gap: 6px; }.period-stats span { white-space: nowrap; } }
@media (max-width: 480px) { .login-card { padding: 30px 22px; }.login-card h1 { font-size: 31px; } }
@media (max-width: 390px) { .main-nav .nav-item:nth-child(2) { display: none; }.entry-fields { grid-template-columns: 1fr; }.stats-grid { gap: 7px; }.stat-card { padding: 12px; }.book-intro { grid-template-columns: 98px minmax(0, 1fr); }.cover-detail { width: 98px; height: 140px; } }

.book-heading-actions { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; }
.book-heading-actions h1 { margin-bottom: 0; }
.book-metadata-editor { padding: 26px; margin-bottom: 30px; background: var(--paper); border: 1px solid var(--border); border-radius: 15px; }
.book-metadata-editor .entry-fields { margin-top: 19px; }
.book-metadata-editor label { color: var(--muted); font-size: 13px; }
.metadata-description { display: grid; gap: 7px; margin-bottom: 18px; }
.metadata-description textarea { width: 100%; padding: 11px 12px; color: var(--text); background: var(--paper); border: 1px solid var(--border); border-radius: 9px; resize: vertical; font: inherit; line-height: 1.7; }
.session-list { display: flex; gap: 9px; overflow-x: auto; padding: 2px 2px 13px; margin-bottom: 10px; }
.session-chip { min-width: 145px; display: grid; gap: 5px; justify-items: start; padding: 11px 13px; color: var(--text); text-align: left; background: var(--paper); border: 1px solid var(--border); border-radius: 10px; }
.session-chip.active { border-color: var(--brand); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 12%, transparent); }
.session-chip span { color: var(--muted); font-size: 12px; }
.session-chip i { font-style: normal; }
.session-heading { display: flex; align-items: center; gap: 10px; margin: 4px 0 16px; color: var(--muted); font-size: 13px; }
.note-session { margin: 10px 0 0; color: var(--subtle); font-size: 12px; }
.sync-notice { position: fixed; z-index: 30; left: 50%; bottom: max(18px, env(safe-area-inset-bottom)); transform: translateX(-50%); max-width: calc(100vw - 28px); width: max-content; padding: 10px 15px; border: 1px solid var(--border); border-radius: 12px; background: var(--paper); color: var(--muted); box-shadow: 0 4px 20px rgba(0,0,0,.09); font-size: 13px; }
.sync-notice[hidden] { display: none; }
.sync-notice button { margin-left: 10px; border: 0; padding: 0; background: transparent; color: var(--brand); font: inherit; cursor: pointer; white-space: nowrap; }
@media (max-width: 680px) { .book-metadata-editor { padding: 17px; }.book-heading-actions { grid-column: 2; align-items: flex-start; flex-wrap: wrap; }.book-heading-actions .button { padding: 7px 9px; font-size: 12px; }.session-chip { min-width: 125px; }.session-heading { align-items: flex-start; flex-direction: column; gap: 5px; } }
