:root {
  --bg: #f7f6f3;
  --surface: #ffffff;
  --reader-bg: #fffefb;
  --text: #2a2a28;
  --text-soft: #57564f;
  --muted: #8a8880;
  --border: #e8e6e0;
  --hover: #efede8;
  --accent: #ffd234;
  --accent-ink: #2a2a28;
  --link: #3a6ea5;
  --danger: #c2412d;
  --warn: #9a6b00;
  --shadow: 0 1px 2px rgba(30, 28, 20, .06), 0 4px 16px rgba(30, 28, 20, .05);
  --ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Literata", Georgia, "Times New Roman", serif;
  --hl-yellow: #ffe48a; --hl-green: #cdeebc; --hl-blue: #c9def7; --hl-pink: #f9cfe1;
  --c0: #f5e3b3; --c0t: #6b4c00;
  --c1: #d7ead2; --c1t: #2f5a26;
  --c2: #d5e4f2; --c2t: #244a70;
  --c3: #ecd9ee; --c3t: #5d2f63;
  --c4: #f6d8cf; --c4t: #7a3220;
  --c5: #d3ece8; --c5t: #1f5a52;
  --c6: #e6e1d6; --c6t: #4f4635;
  --c7: #e0dcf5; --c7t: #3e3478;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1b1a;
    --surface: #242422;
    --reader-bg: #1f1f1e;
    --text: #e9e7e1;
    --text-soft: #c4c1b8;
    --muted: #8f8c84;
    --border: #34332f;
    --hover: #2d2c29;
    --link: #8fb8e6;
    --danger: #ef7a66;
    --warn: #e1b44a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3);
    --hl-yellow: #6b5714; --hl-green: #2f5726; --hl-blue: #24476e; --hl-pink: #6a2c4a;
    --c0: #4a3d17; --c0t: #f3d78a;
    --c1: #283f24; --c1t: #b7dcaa;
    --c2: #233649; --c2t: #a9c9ec;
    --c3: #3f2a43; --c3t: #e1bce6;
    --c4: #4a2a21; --c4t: #f2b8a6;
    --c5: #1f3f3a; --c5t: #a6ddd3;
    --c6: #3a362d; --c6t: #d9d0bc;
    --c7: #312c50; --c7t: #c7bff2;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--ui); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
img { max-width: 100%; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
input, button { font: inherit; color: inherit; }
button { cursor: pointer; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.error { color: var(--danger); }
.warn { color: var(--warn); }

/* ---- controls ---- */
input[type=url], input[type=password], input[type=search], input[name=name], .copy-field {
  width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px;
  background: var(--surface); outline: none; transition: border-color .15s, box-shadow .15s;
}
input:focus { border-color: #d9b21f; box-shadow: 0 0 0 3px rgba(255, 210, 52, .3); }
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border: 0; border-radius: 8px; background: var(--accent); color: var(--accent-ink);
  font-weight: 600; white-space: nowrap; transition: filter .15s;
}
.btn-primary:hover { filter: brightness(.96); }
.btn-small { padding: 6px 12px; border: 1px solid var(--border); border-radius: 7px; background: var(--surface); font-size: 13px; font-weight: 500; }
.btn-small:hover { background: var(--hover); }
.link-btn { border: 0; background: none; padding: 4px 6px; color: var(--muted); font-size: 13px; }
.link-btn:hover { color: var(--text); }
.danger, .link-btn.danger:hover { color: var(--danger); }
.icon-btn {
  display: inline-grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 8px;
  background: none; color: var(--text-soft); list-style: none; text-decoration: none;
}
.icon-btn:hover { background: var(--hover); color: var(--text); }
summary.icon-btn::-webkit-details-marker { display: none; }
.label-busy { display: none; }
.busy .label-idle { display: none; }
.busy .label-busy { display: inline; }
.busy button { opacity: .7; pointer-events: none; }

.chip { display: inline-block; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 500; line-height: 20px; }
.dot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.c0 { background: var(--c0); color: var(--c0t); } .c1 { background: var(--c1); color: var(--c1t); }
.c2 { background: var(--c2); color: var(--c2t); } .c3 { background: var(--c3); color: var(--c3t); }
.c4 { background: var(--c4); color: var(--c4t); } .c5 { background: var(--c5); color: var(--c5t); }
.c6 { background: var(--c6); color: var(--c6t); } .c7 { background: var(--c7); color: var(--c7t); }
.dot.c0 { background: var(--c0t); } .dot.c1 { background: var(--c1t); } .dot.c2 { background: var(--c2t); } .dot.c3 { background: var(--c3t); }
.dot.c4 { background: var(--c4t); } .dot.c5 { background: var(--c5t); } .dot.c6 { background: var(--c6t); } .dot.c7 { background: var(--c7t); }

.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; font-size: 17px; letter-spacing: -.01em; }
.logo svg { width: 28px; height: 28px; stroke: none; }
.logo-bg { fill: var(--accent); }
.logo-fg { fill: none; stroke: var(--accent-ink); stroke-width: 2.4; }

/* ---- centered pages: login, share, saved ---- */
.page-center { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.card-narrow { width: 100%; max-width: 360px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 28px; box-shadow: var(--shadow); }
.card-narrow .logo { margin-bottom: 20px; }
.stack { display: grid; gap: 10px; }
.stack label { font-size: 13px; font-weight: 500; color: var(--text-soft); }
.share-title { margin: 0; font-weight: 600; }
.saved { text-align: center; }
.saved-status { margin: 0 0 6px; font-weight: 700; font-size: 18px; }
.saved-title { margin: 0 0 12px; color: var(--text-soft); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.saved a { color: var(--link); }

/* ---- library ---- */
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; overflow-y: auto; padding: 20px 12px; border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: 18px; }
.sidebar .logo { padding: 0 8px; }
.nav-group { display: grid; gap: 1px; }
.nav-bottom { margin-top: auto; }
.nav-heading { padding: 6px 10px; font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 7px; text-decoration: none; color: var(--text-soft); font-weight: 500; }
.nav-item svg { width: 18px; height: 18px; }
.nav-item:hover { background: var(--hover); color: var(--text); }
.nav-item.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.nav-item .count { margin-left: auto; font-size: 12px; color: var(--muted); }

.library { width: 100%; max-width: 820px; margin: 0 auto; padding: 28px 32px 80px; }
.library-head { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.library-head h1 { margin: 0; font-size: 26px; letter-spacing: -.02em; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search { position: relative; width: 240px; }
.search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); }
.search input { padding-left: 32px; }
.add-link { display: flex; gap: 8px; margin-bottom: 20px; }
.banner { margin: -8px 0 16px; }

.items { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.item { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; transition: box-shadow .15s, border-color .15s; }
.item:hover { box-shadow: var(--shadow); }
.item-link { display: flex; gap: 16px; padding: 16px 18px; text-decoration: none; }
.item-body { flex: 1; min-width: 0; }
.item-meta { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 72px; }
.item-title { margin: 3px 0 4px; font-size: 16.5px; line-height: 1.35; font-weight: 600; letter-spacing: -.01em; overflow-wrap: anywhere; }
.item-excerpt { margin: 0 0 8px; color: var(--text-soft); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 12.5px; }
.item-thumb { width: 88px; height: 88px; object-fit: cover; border-radius: 8px; background: var(--hover); flex: none; }
.item-progress { position: absolute; left: 0; bottom: 0; width: 100%; height: 3px; border: 0; appearance: none; background: transparent; }
.item-progress::-webkit-progress-bar { background: transparent; }
.item-progress::-webkit-progress-value { background: var(--accent); }
.item-progress::-moz-progress-bar { background: var(--accent); }
.item-actions { position: absolute; top: 8px; right: 8px; display: flex; gap: 2px; opacity: 0; transition: opacity .15s; background: var(--surface); border-radius: 8px; }
.item-actions .icon-btn { width: 32px; height: 32px; }
.item-actions svg { width: 18px; height: 18px; }
.item:hover .item-actions, .item:focus-within .item-actions { opacity: 1; }
@media (hover: none) { .item-actions { opacity: 1; } }
.empty { text-align: center; padding: 64px 16px; color: var(--text-soft); }
.empty a { color: var(--link); }

/* ---- reader ---- */
.page-reader { background: var(--reader-bg); }
.read-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 20; }
.read-progress-bar { height: 100%; width: 0; background: var(--accent); transition: width .1s linear; }
.toolbar {
  position: sticky; top: 0; z-index: 10; display: flex; justify-content: space-between; align-items: center;
  padding: 10px 16px; background: color-mix(in srgb, var(--reader-bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  transition: transform .2s;
}
.toolbar.hidden { transform: translateY(-100%); }
.toolbar-right { display: flex; gap: 2px; align-items: center; }
.menu { position: relative; }
.menu-panel { position: absolute; right: 0; top: 42px; min-width: 200px; padding: 6px; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; box-shadow: 0 8px 30px rgba(0,0,0,.12); z-index: 30; }
.menu-title { padding: 6px 8px; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.menu-item { display: block; width: 100%; text-align: left; padding: 8px 10px; border: 0; border-radius: 6px; background: none; }
.menu-item:hover { background: var(--hover); }
.labels-panel { width: 260px; }
.chip-row { display: flex; justify-content: space-between; align-items: center; padding: 3px 4px 3px 8px; }
.label-add { display: flex; gap: 6px; padding: 6px 4px 4px; }
.label-add input { padding: 6px 10px; font-size: 14px; }

.reader { max-width: 680px; margin: 0 auto; padding: 24px 24px 120px; }
.reader-head { margin-bottom: 36px; }
.reader-site { font-size: 14px; font-weight: 500; color: var(--muted); text-decoration: none; }
.reader-site:hover { color: var(--text); }
.reader-head h1 { margin: 10px 0 14px; font: 700 34px/1.2 var(--ui); letter-spacing: -.025em; overflow-wrap: anywhere; }
.reader-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 14px; color: var(--text-soft); }
.reader-meta span + span::before { content: "·"; margin-right: 14px; color: var(--muted); }
.reader-labels { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }

.reader-content { font: 20px/1.7 var(--serif); color: var(--text); overflow-wrap: break-word; }
.reader-content > :first-child { margin-top: 0; }
.reader-content p, .reader-content ul, .reader-content ol, .reader-content blockquote, .reader-content figure, .reader-content pre, .reader-content table { margin: 0 0 1.15em; }
.reader-content h1, .reader-content h2, .reader-content h3, .reader-content h4 { font-family: var(--ui); line-height: 1.3; letter-spacing: -.015em; margin: 1.8em 0 .6em; }
.reader-content h1 { font-size: 1.4em; } .reader-content h2 { font-size: 1.25em; } .reader-content h3 { font-size: 1.1em; } .reader-content h4 { font-size: 1em; }
.reader-content a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.reader-content img { display: block; height: auto; margin: 1.6em auto; border-radius: 6px; }
.reader-content figure img { margin-bottom: .5em; }
.reader-content figcaption { font: 14px/1.5 var(--ui); color: var(--muted); text-align: center; }
.reader-content blockquote { padding: .1em 0 .1em 1.1em; border-left: 3px solid var(--accent); color: var(--text-soft); font-style: italic; }
.reader-content pre { padding: 14px 16px; border-radius: 8px; background: var(--hover); overflow-x: auto; font-size: 14px; line-height: 1.55; }
.reader-content code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: .85em; }
.reader-content :not(pre) > code { padding: .1em .35em; border-radius: 4px; background: var(--hover); }
.reader-content hr { border: 0; border-top: 1px solid var(--border); margin: 2.4em auto; width: 40%; }
.reader-content table { display: block; overflow-x: auto; border-collapse: collapse; font: 15px/1.5 var(--ui); }
.reader-content th, .reader-content td { padding: 6px 10px; border: 1px solid var(--border); text-align: left; }
.reader-content li { margin-bottom: .35em; }
.notice { padding: 16px 18px; border-radius: 10px; background: var(--hover); color: var(--text-soft); }
.notice p { margin: 0 0 6px; } .notice a { color: var(--link); }
.reader-end { margin-top: 56px; padding-top: 28px; border-top: 1px solid var(--border); text-align: center; }
.reader-end svg { width: 18px; height: 18px; }

/* ---- highlights ---- */
mark.hl { color: inherit; border-radius: 2px; padding: .05em 0; cursor: pointer; transition: background-color .3s, box-shadow .3s; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
mark.hl-yellow { background: var(--hl-yellow); } mark.hl-green { background: var(--hl-green); }
mark.hl-blue { background: var(--hl-blue); } mark.hl-pink { background: var(--hl-pink); }
mark.hl mark.hl { background: color-mix(in srgb, currentColor 8%, transparent); }
mark.has-note { text-decoration: underline dotted color-mix(in srgb, currentColor 45%, transparent); text-underline-offset: 4px; }
mark.has-note.hl-last::after { content: ""; display: inline-block; width: .5em; height: .5em; margin-left: .2em; border-radius: 50%; background: var(--text-soft); vertical-align: super; }
mark.flash { box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 70%, transparent); }

.hl-pop {
  position: absolute; z-index: 40; display: flex; align-items: center; gap: 2px; padding: 5px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 8px 28px rgba(0,0,0,.16);
  font: 13px/1 var(--ui); user-select: none; -webkit-user-select: none;
}
.hl-swatches { display: flex; gap: 4px; padding: 0 6px 0 4px; }
.swatch { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border); padding: 0; }
.swatch:hover { transform: scale(1.1); }
.swatch.current { box-shadow: 0 0 0 2px var(--text-soft); }
.sw-yellow { background: var(--hl-yellow); } .sw-green { background: var(--hl-green); }
.sw-blue { background: var(--hl-blue); } .sw-pink { background: var(--hl-pink); }
.pop-btn { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 9px; border: 0; border-radius: 8px; background: none; color: var(--text-soft); font-weight: 500; }
.pop-btn:hover { background: var(--hover); color: var(--text); }
.pop-btn svg { width: 17px; height: 17px; }
.hl-pop .pop-btn[data-act="note"] { border-left: 1px solid var(--border); border-radius: 0 8px 8px 0; }
.hl-pop:not(.existing) .only-existing { display: none; }

.toolbar .icon-btn { position: relative; }
.badge { position: absolute; top: 3px; right: 2px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font: 600 10px/16px var(--ui); }
.badge:empty { min-width: 8px; width: 8px; height: 8px; top: 6px; right: 6px; padding: 0; }

.note-dialog { width: min(520px, calc(100vw - 32px)); padding: 0; border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.note-dialog::backdrop { background: rgba(20, 18, 12, .35); }
.note-dialog form { display: grid; gap: 12px; padding: 18px; }
.nd-quote { margin: 0; padding: 2px 0 2px 12px; border-left: 3px solid var(--accent); font: italic 15px/1.55 var(--serif); color: var(--text-soft); max-height: 9.5em; overflow: auto; }
.note-dialog textarea, .nb-note { width: 100%; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--bg); color: var(--text); font: 15px/1.5 var(--ui); resize: vertical; outline: none; }
.note-dialog textarea:focus, .nb-note:focus { border-color: #d9b21f; box-shadow: 0 0 0 3px rgba(255, 210, 52, .3); }
.nd-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.nd-actions .muted { margin-right: auto; }
@media (pointer: coarse) { .nd-actions .muted { display: none; } }

.notebook {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 25; width: 380px; max-width: 100vw; display: flex; flex-direction: column;
  background: var(--surface); border-left: 1px solid var(--border); box-shadow: -8px 0 30px rgba(0,0,0,.08);
}
.nb-head { display: flex; align-items: center; gap: 8px; padding: 12px 12px 12px 20px; border-bottom: 1px solid var(--border); }
.nb-head h2 { margin: 0 auto 0 0; font-size: 16px; }
.nb-body { flex: 1; overflow-y: auto; padding: 4px 20px 40px; }
.nb-body h3 { margin: 20px 0 8px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.nb-status { min-height: 18px; margin-top: 4px; }
.nb-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.nb-item { padding-left: 12px; border-left: 3px solid var(--hl-yellow); }
.nb-quote { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; padding: 0; border: 0; background: none; text-align: left; font: 15px/1.55 var(--serif); color: var(--text); }
.nb-quote:hover { color: var(--link); }
.nb-hl-note, .hl-note { margin: 8px 0 0; padding: 8px 10px; border-radius: 8px; background: var(--hover); font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.nb-actions { display: flex; gap: 2px; margin: 4px 0 0 -6px; }
.hc-yellow { border-left-color: var(--hl-yellow); } .hc-green { border-left-color: var(--hl-green); }
.hc-blue { border-left-color: var(--hl-blue); } .hc-pink { border-left-color: var(--hl-pink); }
@media (min-width: 1180px) {
  .notebook-open .reader, .notebook-open .toolbar { margin-right: 380px; }
  .notebook-open .reader { margin-left: max(24px, calc((100vw - 380px - 680px) / 2)); }
}

.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; padding: 10px 16px; border-radius: 10px; background: var(--text); color: var(--bg); font-size: 14px; font-weight: 500; box-shadow: var(--shadow); }

/* highlights page & library badges */
.hl-count { display: inline-flex; align-items: center; gap: 3px; color: var(--muted); }
.hl-count svg { width: 14px; height: 14px; }
.hl-group { margin-bottom: 32px; }
.hl-group h2 { margin: 0 0 12px; font-size: 17px; letter-spacing: -.01em; }
.hl-group h2 a { text-decoration: none; }
.hl-group h2 a:hover { text-decoration: underline; text-underline-offset: 3px; }
.hl-card { margin-bottom: 10px; padding: 14px 16px 10px; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--hl-yellow); border-radius: 10px; }
.hl-card.hc-yellow { border-left-color: var(--hl-yellow); } .hl-card.hc-green { border-left-color: var(--hl-green); }
.hl-card.hc-blue { border-left-color: var(--hl-blue); } .hl-card.hc-pink { border-left-color: var(--hl-pink); }
.hl-quote { display: block; font: 16px/1.6 var(--serif); text-decoration: none; white-space: pre-wrap; }
.hl-quote:hover { color: var(--link); }
.hl-card-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }

/* ---- settings ---- */
.settings { max-width: 640px; margin: 0 auto; padding: 24px 24px 80px; }
.settings h1 { font-size: 26px; letter-spacing: -.02em; margin: 16px 0 8px; }
.settings section { padding: 22px 0; border-bottom: 1px solid var(--border); }
.settings section:last-child { border-bottom: 0; }
.settings h2 { font-size: 16px; margin: 0 0 8px; }
.settings p { color: var(--text-soft); }
.settings details { margin: 12px 0 18px; } .settings summary { cursor: pointer; font-weight: 500; }
.back-link { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); text-decoration: none; font-weight: 500; }
.back-link:hover { color: var(--text); }
.back-link svg { width: 18px; height: 18px; }
.bookmarklet { display: inline-block; padding: 9px 16px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-weight: 600; text-decoration: none; cursor: grab; }
.copy-field { font: 13px ui-monospace, Menlo, monospace; }
.label-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.label-list li { display: flex; align-items: center; gap: 10px; }
.inline-form { display: flex; gap: 6px; flex: 1; }
.inline-form input { padding: 6px 10px; }

/* ---- small screens ---- */
@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; align-items: center; gap: 6px; padding: 10px 16px; border-right: 0; border-bottom: 1px solid var(--border); overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
  .sidebar .logo span, .nav-heading { display: none; }
  .sidebar .logo { padding: 0 6px 0 0; }
  .nav-group { display: flex; gap: 2px; }
  .nav-bottom { margin-top: 0; margin-left: auto; }
  .nav-item { white-space: nowrap; padding: 6px 10px; }
  .nav-item .count { display: none; }
  .library { padding: 18px 16px 64px; }
  .library-head { flex-wrap: wrap; }
  .search { width: 100%; }
  .item-link { padding: 14px; gap: 12px; }
  .item-thumb { width: 64px; height: 64px; }
  .reader { padding: 12px 16px 96px; }
  .reader-head h1 { font-size: 27px; }
  .reader-content { font-size: 18.5px; }
  .toolbar { padding: 8px 10px; }
  .settings { padding: 16px 16px 64px; }
}
