/* nustreads: follows goodreads.com's current (2026) design system, measured element by element from the live site.
   Their fonts are licensed (Copernicus, Proxima Nova), so the closest free faces stand in:
   Copernicus -> Literata at weight 560, Proxima Nova -> Figtree (tracked in 1%); the nav uses Lato, as theirs does. */
:root {
  --bg: #ffffff;
  --bar: #faf8f6;          /* header bar */
  --cream: #f4f1ea;        /* placeholders */
  --soft: #fafafa;         /* search panel */
  --hover: #f2f0ed;
  --line: #e9e6e2;
  --line-2: #cfccc9;       /* dividers */
  --row: #e9e6e2;
  --ink: #1e1915;
  --ink-2: #1e1915;
  --muted: #707070;
  --sub: #4f4f4d;
  --brown: #1e1915;
  --link: #1e1915;
  --accent: #3f8363;
  --accent-h: #377458;
  --accent-line: #409970;
  --accent-ink: #ffffff;
  --accent-soft: #eef5f1;
  --ok: #3f8363;
  --ref: #8a6a24;
  --out: #707070;
  --star: #e87400;
  --star-off: #c9c4bf;
  --back: #fdf6e3;
  --danger: #b4371f;
  --band: #2f3a2c;
  --field: #ffffff;
  --field-line: #dcd6cc;
  --serif: Literata, "Libre Baskerville", Georgia, serif;
  --hw: 560;               /* heading weight: Copernicus 600 reads like Literata 560 */
  --sans: Figtree, "Proxima Nova", Montserrat, Arial, sans-serif;
  --top-h: 0px;          /* the header scrolls away, as on goodreads.com */
  --wrap: 1146px;
  --ph-l: 92%;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1714; --bar: #221e1a; --cream: #2a251f; --soft: #26221d; --line: #332d27; --line-2: #45403a; --row: #332d27;
    --ink: #f0ebe4; --ink-2: #f0ebe4; --muted: #a8a19a; --sub: #c4bdb5; --brown: #f0ebe4; --link: #f0ebe4;
    --accent: #3f8363; --accent-h: #4a9572; --accent-line: #57a882; --accent-ink: #ffffff; --accent-soft: #1f2e26;
    --ok: #6cc28f; --ref: #d3b06a; --out: #a8a19a; --star: #f08a24; --star-off: #5a524a; --back: #3a2f1c; --danger: #ec8e78;
    --band: #232b21; --field: #1a1714; --field-line: #4a443d; --ph-l: 24%;
    color-scheme: dark;
  }
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--ink);
  font: 16px/1.44 var(--sans);
  letter-spacing: -.01em;
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; }
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
.u { text-decoration: underline; text-underline-offset: 2px; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; border-radius: 2px; }
h1, h2, h3 { font-family: var(--serif); font-weight: var(--hw); letter-spacing: 0; color: var(--ink); margin: 0; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 30; background: var(--ink); color: var(--bg); padding: 8px 12px; border-radius: 3px; }
.skip:focus { left: 8px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 12px; width: 100%; }
.plain { color: inherit; }
.muted { color: var(--muted); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- header: two rows like goodreads.com ---------- */
.top { position: relative; z-index: 20; background: var(--bar); border-bottom: 1px solid var(--line-2); }
.promo { display: flex; align-items: center; justify-content: center; gap: 10px; height: 40px; padding: 0 16px; background: #283828; color: #fff; font-size: 12px; letter-spacing: 0; white-space: nowrap; overflow: hidden; }
.promo:hover { text-decoration: none; }
.promo b { font: var(--hw) 15px var(--serif); }
.promo .tag { font: 700 9px/1 var(--sans); text-transform: uppercase; color: #f6d77a; border: 1px solid #f6d77a; padding: 2px 3px; border-radius: 2px; text-align: center; }
.promo span:last-child::after { content: " ›"; font-size: 15px; }
.top-in { margin: 0 auto; height: 50px; padding: 0 8px 0 14px; display: flex; align-items: center; }
.brand { font: var(--hw) 30px/1 var(--serif); color: var(--ink); letter-spacing: -.03em; white-space: nowrap; width: 148px; margin: -4px 22px 0 -5px; }
.brand:hover { text-decoration: none; }
.brand span { font-weight: 400; }
.mainnav { display: flex; justify-content: center; gap: 0; height: 50px; border-top: 1px solid #e8e3dc; }
.mainnav a { display: flex; align-items: center; padding: 0 32px; color: var(--ink); font: 400 16px "Lato", var(--sans); letter-spacing: 0; white-space: nowrap; }
.mainnav a:hover { text-decoration: none; background: var(--hover); }
.mainnav a.on { background: none; }
.top-search { flex: 0 1 360px; min-width: 0; }
.acct { margin-left: auto; display: flex; align-items: center; gap: 4px; position: relative; padding-left: 15px; }
.acct > a { color: var(--ink); font-size: 16px; font-weight: 600; padding: 0 8px; white-space: nowrap; }
.icon-btn { display: none; width: 44px; height: 44px; border: 0; background: none; color: var(--ink); cursor: pointer; place-items: center; padding: 0; }
.icon-btn svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.avatar-btn { display: flex; align-items: center; border: 0; background: none; padding: 4px; border-radius: 50%; cursor: pointer; }
.av { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex: none; background: #c1b8a6; color: #fff; display: inline-grid; place-items: center; font: 700 14px var(--sans); }
.av.sq { border-radius: 0; }
.menu { position: absolute; right: 0; top: calc(100% + 9px); min-width: 210px; background: var(--bg); border: 1px solid var(--line-2); border-radius: 8px; padding: 6px 0; display: grid; box-shadow: 0 2px 8px rgb(0 0 0 / .15); z-index: 30; }
.menu .who-line { padding: 6px 14px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.menu .who-line b { display: block; color: var(--brown); font-weight: 700; font-size: 14px; text-transform: none; letter-spacing: 0; }
.menu a, .menu button { display: block; text-align: left; padding: 8px 16px; color: var(--ink); font-size: 15px; border: 0; background: none; cursor: pointer; }
.menu a:hover, .menu button:hover { background: var(--soft); text-decoration: none; }
.meter { height: 3px; position: absolute; left: 0; right: 0; bottom: 0; overflow: hidden; }
.meter span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .35s ease, opacity .4s; }
.meter span.done { opacity: 0; }

/* ---------- search box ---------- */
.ask { display: flex; align-items: flex-start; width: 100%; background: var(--field); border: 1px solid var(--field-line); border-radius: 3px; }
.ask:focus-within { border-color: var(--muted); }
.src { flex: none; margin: 7px 0 0 8px; font: 700 11px/18px var(--sans); letter-spacing: .04em; text-transform: uppercase; color: var(--accent); padding: 0 8px; border-radius: 9px; background: var(--accent-soft); white-space: nowrap; }
.src:empty { display: none; }
.ask textarea {
  flex: 1; min-width: 0; height: 30px; max-height: 220px; padding: 6px 8px; resize: none; overflow-y: hidden;
  border: 0; outline: 0; background: transparent; color: var(--ink); font: 14px/18px var(--sans);
}
.ask textarea::placeholder { color: #767676; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ask button { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 30px; width: 34px; padding: 0; border: 0; background: none; color: var(--ink); cursor: pointer; }
.ask button span { display: none; }
.ask button svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
.ask button:disabled { opacity: .5; cursor: progress; }
/* docked in the header: one line */
.top-search .ask textarea { height: 18px !important; max-height: 18px; padding: 0 8px; margin: 6px 0; overflow: hidden !important; }
/* home: goodreads' search panel, a grey rounded box with a pill field and a round dark button */
.home-card .ask { position: relative; align-items: center; height: auto; min-height: 54px; border: 1px solid #ababb0; border-radius: 999px; background: var(--field); padding: 4px 5px 4px 18px; }
.home-card .ask:focus-within { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.home-card .ask textarea { height: 24px; padding: 0; margin: 11px 0; font-size: 16px; line-height: 24px; }
.home-card .src { margin: 0 8px 0 0; }
.home-card .ask button { width: 44px; height: 44px; border-radius: 50%; background: #1e1915; color: #fff; align-self: flex-end; }
.home-card .ask button:hover { background: #000; }
.home-card .ask button svg { width: 20px; height: 20px; }

/* ---------- home ---------- */
.home { padding: 40px 0 0; }
.masthead { display: none; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; column-gap: 32px; align-items: start; }
.home-main { min-width: 0; }
.home-main > h1 { font: var(--hw) 36px/46px var(--serif); color: var(--ink); margin: 0 0 8px; letter-spacing: -.005em; }
.lede { margin: 0 0 22px; font-size: 18px; line-height: 1.45; color: var(--ink); max-width: 62ch; }
.home-card { background: var(--soft); border-radius: 16px; padding: 24px; margin: 0 0 36px; }
.home-card .fine { margin: 16px 2px 0; font-size: 14px; color: var(--muted); line-height: 1.5; }
.card-foot { margin: 10px 2px 0; font-size: 14px; color: var(--ink); }
.card-foot a, .home-card .fine .file { text-decoration: underline; text-underline-offset: 2px; color: var(--ink); }
.file { cursor: pointer; }
.file input { display: none; }
.home-side { padding: 6px 0 20px; }
.home-side h2 { font: var(--hw) 20px/28px var(--serif); color: var(--ink); margin: 0 0 8px; }
.home-side p { margin: 0 0 22px; padding-bottom: 22px; border-bottom: 1px solid var(--line-2); font-size: 16px; line-height: 1.44; color: var(--ink); }
.home-side p:last-child { border-bottom: 0; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; margin-bottom: 36px; padding-top: 28px; border-top: 1px solid var(--line-2); }
.cols h2, .h-plain { font: var(--hw) 20px/28px var(--serif); color: var(--ink); margin: 0 0 8px; }
.cols p { margin: 0; font-size: 16px; line-height: 1.44; color: var(--ink); }
.link-cols { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 14px; }
.link-cols li { font-size: 16px; font-weight: 600; }
.link-cols a { display: inline-block; padding-bottom: 2px; border-bottom: 2px solid var(--accent-line); }
.link-cols a:hover { text-decoration: none; color: var(--accent); }
body:not(.mode-home) .home { display: none; }
body.mode-home .top-search { visibility: hidden; }

.discover { background: var(--soft); border-radius: 16px; padding: 20px 24px 0; margin: 0 0 36px; overflow: hidden; }
.discover h2 { font: var(--hw) 20px/28px var(--serif); color: var(--ink); margin: 0 0 14px; }
.discover h2 i { font-style: italic; }
.shelf-ex { display: grid; grid-template-columns: minmax(0, 1fr) 40px minmax(0, 150px); gap: 0 10px; align-items: end; margin: 0 -24px; padding: 0 24px; }
.shelf-ex + .shelf-ex { border-top: 1px solid var(--line-2); padding-top: 12px; }
.shelf-ex .lbl { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1fr) 40px minmax(0, 150px); gap: 0 10px; font-size: 13px; color: var(--sub); margin-bottom: 8px; }
.shelf-ex .lbl span:last-child { grid-column: 3; }
.shelf-ex .books { display: flex; gap: 8px; padding-bottom: 0; position: relative; }
.shelf-ex .found { display: flex; gap: 8px; align-items: flex-start; }
.shelf-ex .found b { font-size: 13px; font-weight: 600; color: var(--ink); max-width: 70px; }
.shelf-ex .cv { width: 72px; border-radius: 0 4px 4px 0; box-shadow: 0 2px 6px rgb(0 0 0 / .2); z-index: 1; }
.shelf-ex .arrow { align-self: center; color: var(--muted); font-size: 30px; text-align: center; }
.shelf-ex .ledge { grid-column: 1 / -1; height: 16px; margin: -8px -24px 0; background: #e6e2dd; border-top: 1px solid var(--line-2); }

/* ---------- results / list page ---------- */
.results, .view { padding: 20px 0 0; width: 100%; }
.two { display: grid; grid-template-columns: minmax(0, 813px) 300px; justify-content: space-between; gap: 32px; align-items: start; }
.pipe { padding: 4px 0 16px; }
.results .two { grid-template-rows: auto 1fr; }
.results .two > .pipe { grid-column: 1; grid-row: 1; }
.results .two > .col { grid-column: 1; grid-row: 2; }
.results .two > .side { grid-column: 2; grid-row: 1 / span 2; }
.who { display: flex; align-items: center; gap: 12px; min-width: 0; }
.who .av { width: 56px; height: 56px; font-size: 22px; border-radius: 50%; }
.who h1 { font: var(--hw) 36px/46px var(--serif); color: var(--ink); }
.who small { display: block; color: var(--muted); font-size: 14px; margin-top: 4px; }
.msg { margin: 10px 0 0; display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.msg:not(.busy) .spin { display: none; }
.msg.err { color: var(--danger); font-size: 14px; }
.msg .act { background: none; border: 0; padding: 0; font: inherit; color: var(--link); cursor: pointer; text-decoration: underline; }
.spin { width: 12px; height: 12px; border: 2px solid var(--line-2); border-right-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; flex: none; }

.tabs-wrap { position: sticky; top: var(--top-h); z-index: 5; background: var(--bg); display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--line-2); }
.tabs { display: flex; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: none; border: 0; background: none; padding: 12px 16px 10px; cursor: pointer; color: var(--ink); font: 400 16px var(--sans); border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button:first-child { padding-left: 8px; }
.tabs button i { font-style: normal; margin-left: 5px; font-size: 13px; color: var(--muted); }
.tabs button:hover { color: var(--accent); }
.tabs button[aria-selected="true"] { font-weight: 700; border-bottom-color: var(--ink); }
.tabs button:focus-visible { outline-offset: -2px; }
.only { flex: none; display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink); cursor: pointer; user-select: none; }
.only input { accent-color: var(--accent); width: 14px; height: 14px; margin: 0; }
.sub { margin: 16px 0 28px; color: var(--sub); font-size: 16px; }
.empty { padding: 30px 0; color: var(--muted); }

/* book rows: the list/search-result table */
.rows { counter-reset: rank; }
.row { counter-increment: rank; }
.row.hide { counter-increment: none; }
.row { position: relative; display: grid; grid-template-columns: 150px minmax(0, 1fr); column-gap: 24px; align-items: start; padding: 0; margin: 0 0 56px; }
.row::before { display: none; }
.row { grid-template-rows: auto 1fr; }
.row .cv { grid-row: 1 / span 2; }
.row .meta { grid-column: 2; grid-row: 1; }
.row .act { grid-column: 2; grid-row: 2; align-self: start; }
.row.hide { display: none; }
.cv { position: relative; display: block; width: 150px; aspect-ratio: 2 / 3; overflow: hidden; background: var(--cream); border-radius: 0 6% 6% 0 / 0 4% 4% 0; filter: drop-shadow(0 2px 8px rgb(0 0 0 / .2)); }
.cv img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .2s; }
.cv img.ok { opacity: 1; }
.ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; padding: 8px; text-align: center; background: var(--ph, var(--cream)); }
.ph b { font: var(--hw) 12px/1.25 var(--serif); color: color-mix(in srgb, var(--ink) 85%, transparent); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; word-break: break-word; }
.meta { min-width: 0; }
.meta h3 { font: var(--hw) 20px/28px var(--serif); }
.meta h3 a { color: var(--ink); }
.meta h3 a:hover { text-decoration: underline; }
.by { margin: 0; font: 400 16px/23px var(--sans); color: var(--ink); }
.mini { margin: 10px 0 0; font-size: 18px; color: var(--ink); line-height: 24px; }
.mini:empty, .why:empty, .by:empty { display: none; }
.stars { color: var(--star); letter-spacing: 2px; white-space: nowrap; font-size: 24px; line-height: 1; vertical-align: -3px; }
.stars .off { color: var(--star-off); }
.mini .stars { margin-right: 10px; }
.where b { font-weight: 700; }
.where { color: var(--ink); }
.where.available b { color: var(--ok); }
.where.reference b { color: var(--ref); }
.where.out b, .where.unknown b, .where.none b { color: var(--muted); }
.why { margin: 10px 0 0; color: var(--ink); font-size: 16px; line-height: 1.44; max-width: 60ch; }
.act { display: grid; justify-items: start; gap: 8px; margin-top: 20px; }
.act .hint { font-size: 14px; color: var(--muted); }

/* the green split button */
.split { position: relative; display: inline-flex; height: 44px; width: 260px; }
.split-main { flex: 1; display: inline-flex; align-items: center; justify-content: center; min-width: 0; padding: 0 14px; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 30px 0 0 30px; font: 600 16px var(--sans); white-space: nowrap; cursor: pointer; }
.split-main:hover { background: var(--accent-h); text-decoration: none; }
.split-arrow { width: 44px; display: grid; place-items: center; background: var(--accent); color: var(--accent-ink); border: 0; border-left: 1px solid rgb(255 255 255 / .35); border-radius: 0 50% 50% 0; cursor: pointer; padding: 0 4px 0 0; }
.split-arrow:hover { background: var(--accent-h); }
.split-arrow svg { width: 12px; height: 12px; fill: currentColor; }
.split.on .split-main, .split.on .split-arrow { background: var(--bg); color: var(--ink); box-shadow: inset 0 0 0 2px var(--accent-line); }
.split.on .split-main { box-shadow: inset 2px 0 0 var(--accent-line), inset 0 2px 0 var(--accent-line), inset 0 -2px 0 var(--accent-line); }
.split.on .split-arrow { box-shadow: inset -2px 0 0 var(--accent-line), inset 0 2px 0 var(--accent-line), inset 0 -2px 0 var(--accent-line); border-left: 1px solid var(--accent-line); }
.split.on .split-main::before { content: "✓"; color: var(--accent); font-weight: 700; margin-right: 6px; }
.split.quiet .split-main, .split.quiet .split-arrow { background: var(--bg); color: var(--ink); }
.split.quiet .split-main { box-shadow: inset 2px 0 0 var(--accent-line), inset 0 2px 0 var(--accent-line), inset 0 -2px 0 var(--accent-line); }
.split.quiet .split-arrow { box-shadow: inset -2px 0 0 var(--accent-line), inset 0 2px 0 var(--accent-line), inset 0 -2px 0 var(--accent-line); border-left: 1px solid var(--accent-line); }
.split.quiet .split-main:hover, .split.quiet .split-arrow:hover { background: var(--accent-soft); }
.split-menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 10; min-width: 216px; background: var(--bg); border: 1px solid var(--line-2); border-radius: 8px; box-shadow: 0 4px 14px rgb(0 0 0 / .14); padding: 6px 0; display: grid; }
.split-menu a, .split-menu button { display: block; text-align: left; padding: 8px 16px; font-size: 15px; color: var(--ink); border: 0; background: none; cursor: pointer; white-space: nowrap; }
.split-menu a:hover, .split-menu button:hover { background: var(--soft); text-decoration: none; }

/* buttons elsewhere */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 32px; padding: 0 14px;
  border-radius: 30px; border: 2px solid var(--accent); background: var(--accent); color: var(--accent-ink);
  font: 600 14px var(--sans); white-space: nowrap; cursor: pointer;
}
.btn:hover { background: var(--accent-h); border-color: var(--accent-h); text-decoration: none; }
.btn.ghost { background: var(--bg); color: var(--ink); border-color: var(--accent-line); }
.btn.ghost:hover { background: var(--accent-soft); }
.btn.quiet { background: var(--bg); border-color: var(--accent-line); color: var(--ink); }
.btn.quiet:hover { background: var(--accent-soft); }
.btn.dark { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.danger.ghost { background: var(--bg); color: var(--danger); border-color: var(--line-2); }
.btn.sm { height: 26px; padding: 0 10px; font-size: 12px; }
.btn.on { background: var(--bg); color: var(--ink); border-color: var(--accent-line); }
.btn.on::before { content: "✓"; color: var(--accent); font-weight: 700; }
.btn:disabled { opacity: .6; cursor: default; }
.pill { height: 44px; border-radius: 30px; font-size: 16px; font-weight: 600; width: 100%; }
.pill.outline { background: var(--bg); color: var(--ink); border: 2px solid var(--accent-line); font-weight: 600; }
.pill.outline:hover { background: var(--accent-soft); }
.pill.on { background: var(--bg); color: var(--ink); border: 2px solid var(--accent-line); }
.link { border: 0; background: none; padding: 0; color: var(--ink); cursor: pointer; font-size: inherit; text-decoration: underline; text-underline-offset: 2px; }
.link:hover { text-decoration: underline; }

/* ---------- sidebar blocks ---------- */
.side { display: grid; gap: 28px; }
.block { min-width: 0; }
.side > :first-child .kicker:first-child, .side > .kicker:first-child { border-top: 0; padding-top: 0; }
main p a:not(.btn), .side a:not(.btn) { text-decoration: underline; text-underline-offset: 2px; }
.kicker { margin: 0 0 12px; padding-top: 22px; border-top: 1px solid var(--line-2); font: var(--hw) 20px/28px var(--serif); color: var(--ink); }
.kicker a { color: inherit; }
.summary { margin: 0; font-size: 16px; line-height: 1.44; color: var(--ink); }
.summary.clamp { display: -webkit-box; -webkit-line-clamp: 6; -webkit-box-orient: vertical; overflow: hidden; }
.more { border: 0; background: none; padding: 0; margin-top: 6px; color: var(--ink); font: 600 16px var(--sans); cursor: pointer; }
.more:hover { text-decoration: underline; }
.themes { list-style: none; display: flex; flex-wrap: wrap; gap: 10px 12px; margin: 14px 0 0; padding: 0; }
.themes li { font-size: 16px; font-weight: 600; color: var(--ink); padding-bottom: 1px; border-bottom: 2px solid var(--accent-line); text-transform: capitalize; }
.peers p { margin: 0 0 12px; font-size: 16px; color: var(--ink); }
.peers p b { color: var(--ink); }
.shelf-counts { list-style: none; margin: 0; padding: 0; font-size: 16px; display: grid; gap: 6px; }
.shelf-counts li { margin-bottom: 3px; break-inside: avoid; color: var(--ink-2); }
.shelf-counts button { border: 0; background: none; padding: 0; color: var(--ink); cursor: pointer; font: 600 16px var(--sans); text-align: left; text-decoration: underline; text-underline-offset: 2px; }
.shelf-counts button:hover { text-decoration: underline; }
.shelf-counts button[aria-pressed="true"] { font-weight: 700; }

/* ---------- pages ---------- */
.view:focus { outline: none; }
.page-h { padding-bottom: 14px; }
.page-h h1 { font: var(--hw) 36px/46px var(--serif); }
.page-h p { margin: 6px 0 0; color: var(--sub); font-size: 16px; }
.crumb { display: inline-block; margin-bottom: 8px; font-size: 14px; color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.note { padding: 26px 0; color: var(--ink-2); }
.note h2 { font: var(--hw) 20px/28px var(--serif); margin-bottom: 8px; }
.note p { margin: 0 0 16px; max-width: 56ch; }
.loading { padding: 40px 0; color: var(--muted); display: flex; gap: 10px; align-items: center; }

/* readers: the friends list */
.friend { display: grid; grid-template-columns: 50px minmax(0, 1fr); gap: 12px; align-items: start; margin-bottom: 14px; font-size: 14px; }
.friend .av { width: 50px; height: 50px; border-radius: 50%; font-size: 18px; }
.friend p { margin: 2px 0 0; color: var(--ink-2); }
.reader { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 20px; align-items: start; padding: 20px 0; border-bottom: 1px solid var(--line-2); }
.reader .av { width: 64px; height: 64px; font-size: 24px; border-radius: 50%; }
.reader h3 { font: var(--hw) 20px/28px var(--serif); color: var(--ink); }
.reader .count-line { margin: 2px 0 0; font-size: 14px; color: var(--muted); }
.reader .about { margin: 6px 0 0; color: var(--ink); font-size: 16px; }
.reader .shared { margin: 6px 0 0; color: var(--muted); font-size: 14px; }
.reader .shared em { font: italic 600 14px var(--serif); color: var(--ink); }
.pct { text-align: right; font: var(--hw) 26px/1 var(--serif); color: var(--accent); white-space: nowrap; }
.pct small { display: block; margin-top: 4px; font: 400 14px var(--sans); color: var(--muted); }

/* my shelf: left shelf list + table */
.shelf-page { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 30px; align-items: start; }
.shelf-nav { display: grid; gap: 8px; font-size: 16px; }
.shelf-nav button { border: 0; background: none; padding: 2px 0; text-align: left; color: var(--ink); cursor: pointer; font-size: 16px; }
.shelf-nav button:hover { text-decoration: underline; }
.shelf-nav button[aria-current="true"] { font-weight: 700; color: var(--ink); box-shadow: inset 3px 0 0 var(--accent); padding-left: 10px; }
.shelf-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.shelf-table th { text-align: left; font: 600 14px var(--sans); color: var(--muted); padding: 6px 8px 6px 0; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.shelf-table td { padding: 14px 10px 14px 0; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.shelf-table .cv { width: 50px; }
.shelf-table .t { font: var(--hw) 16px/1.35 var(--serif); color: var(--ink); }
.shelf-table td.au { color: var(--ink); }
.shelf-table tr.hidden-row .t, .shelf-table tr.hidden-row td.au, .shelf-table tr.hidden-row .stars { opacity: .45; }
.switch { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.switch input { appearance: none; -webkit-appearance: none; width: 28px; height: 16px; border-radius: 999px; background: var(--line-2); position: relative; margin: 0; cursor: pointer; transition: background .15s; flex: none; }
.switch input::after { content: ""; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; transition: transform .15s; }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(12px); }
.watches { margin-bottom: 26px; }
.watch { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 9px 8px; border-bottom: 1px solid var(--row); }
.watch.back { background: var(--back); }
.watch h3 { font: var(--hw) 16px var(--serif); }
.watch h3 a { color: var(--ink); }
.watch p { margin: 2px 0 0; font-size: 14px; color: var(--muted); }
.watch.back p b { color: var(--ok); }
.more-row { text-align: center; padding: 16px 0; margin: 0; }

/* profile */
.profile { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 30px; align-items: start; }
.profile-left { display: grid; gap: 8px; justify-items: center; text-align: center; font-size: 14px; }
.profile-left .av { width: 150px; height: 150px; border-radius: 50%; font-size: 56px; }
.profile-left > a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.profile-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line-2); margin-bottom: 14px; }
.profile-head h1 { font: var(--hw) 36px/46px var(--serif); }
.details { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 8px 12px; margin: 0 0 22px; font-size: 14px; }
.details dt { color: var(--muted); }
.details dd { margin: 0; color: var(--ink-2); }
.profile-sec { margin-top: 26px; }
.strip { display: flex; gap: 4px; flex-wrap: wrap; }
.strip .cv { width: 72px; }
.strip { gap: 10px; }
.bookshelves { list-style: none; columns: 3; column-gap: 16px; margin: 0; padding: 0; font-size: 16px; }
.bookshelves li { white-space: nowrap; }
.bookshelves li { margin-bottom: 3px; }
.field textarea { width: 100%; min-height: 84px; resize: vertical; padding: 8px 10px; border: 1px solid var(--field-line); border-radius: 3px; background: var(--field); color: var(--ink); font: 16px/1.44 var(--sans);
  letter-spacing: -.01em; }
.field textarea:focus { outline: none; border-color: var(--muted); }
.field .help { margin: 0 0 8px; color: var(--muted); font-size: 12px; }
.field .row-end { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.count { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.count.over { color: var(--danger); }
.saved { font-size: 12px; color: var(--ok); margin-right: 10px; }
.saved.bad { color: var(--danger); }
.about-text { margin: 0; font-size: 16px; color: var(--ink); white-space: pre-line; }
.zone { display: grid; gap: 8px; justify-items: start; font-size: 13px; color: var(--ink-2); }
.zone p { margin: 0; max-width: 60ch; }
.confirm { padding: 16px; background: var(--soft); border: 0; border-radius: 12px; display: grid; gap: 10px; justify-items: start; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; }

/* book page: sticky cover column + details */
.wrap.wide { max-width: 1144px; }
.book-page { display: grid; grid-template-columns: 269px minmax(0, 1fr); gap: 56px; align-items: start; padding-top: 20px; }
.book-left { position: sticky; top: calc(var(--top-h) + 30px); display: grid; gap: 12px; justify-items: center; }
.book-left .cv { width: 215px; }
.book-left .ph b { font-size: 16px; -webkit-line-clamp: 8; }
.book-left .pill { margin-top: 12px; }
.book-left .pill + .pill { margin-top: 0; }
.book-left .hint { font-size: 16px; color: var(--ink); margin-top: 4px; text-align: center; }
.book-main h1 { font: var(--hw) 36px/46px var(--serif); color: var(--ink); }
.book-main .subtitle { margin: 4px 0 0; font: 400 20px/1.35 var(--serif); color: var(--sub); }
.book-main .author { margin: 0; font: 400 20px/28px var(--serif); color: var(--ink); }
.bigstars { display: flex; align-items: center; gap: 14px; margin: 14px 0 0; flex-wrap: wrap; }
.bigstars .stars { font-size: 32px; letter-spacing: 4px; }
.bigstars b { font: var(--hw) 26px/1 var(--serif); color: var(--ink); }
.bigstars span { font-size: 14px; color: var(--muted); }
.bigstars.status b { font-size: 26px; }
.bigstars.status.available b { color: var(--ok); }
.blurb { margin: 20px 0 0; font-size: 16px; line-height: 1.37; color: var(--ink); max-width: 72ch; white-space: pre-line; }
.blurb.clamp { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.show-more { margin-top: 10px; border: 0; background: none; padding: 0; font: 600 16px var(--sans); color: var(--ink); cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.show-more svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; }
.facts { margin: 20px 0 0; color: var(--sub); font-size: 14px; display: grid; gap: 12px; }
.facts p { margin: 0; }
.book-sec { margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--line-2); }
.book-sec h2 { font: var(--hw) 20px/28px var(--serif); color: var(--ink); margin-bottom: 14px; }
.copies { width: 100%; border-collapse: collapse; font-size: 16px; }
.copies th { text-align: left; font: 600 14px var(--sans); color: var(--muted); padding: 0 12px 6px 0; border-bottom: 1px solid var(--line-2); }
.copies td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.copies td.st { white-space: nowrap; }
.copies .in { color: var(--ok); font-weight: 700; }
.copies .gone { color: var(--muted); }
.faces { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; font-size: 14px; color: var(--ink-2); }
.faces .stack { display: flex; }
.faces .stack .av { width: 36px; height: 36px; border: 2px solid var(--bg); margin-left: -10px; font-size: 14px; }
.faces .stack .av:first-child { margin-left: 0; }
.people { list-style: none; margin: 0; padding: 0; }
.people li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); font-size: 16px; }
.people li span { color: var(--muted); }
.ext { font-size: 14px; margin-top: 24px; }
.m0 { margin: 0 !important; }

/* ---------- sign-in sheet ---------- */
.sheet { width: min(440px, calc(100% - 32px)); border: 0; border-radius: 16px; padding: 30px 30px 24px; background: var(--bg); color: var(--ink); text-align: center; box-shadow: 0 4px 18px rgb(0 0 0 / .2); }
.sheet::backdrop { background: rgb(0 0 0 / .45); }
.sheet h2 { font: var(--hw) 26px/1.25 var(--serif); color: var(--ink); margin: 0 0 12px; }
.sheet p { margin: 0 auto 22px; color: var(--ink); font-size: 16px; max-width: 38ch; line-height: 1.44; }
.sheet .btn.google { width: 100%; height: 48px; background: var(--bg); color: var(--ink); border: 1px solid var(--ink); border-radius: 30px; font: 600 16px var(--sans); }
.sheet .btn.google:hover { background: var(--soft); }
.sheet .btn.google svg { width: 18px; height: 18px; }
.sheet .sheet-fine { margin: 14px auto 0; font-size: 14px; color: var(--muted); }
.sheet-x { position: absolute; top: 8px; right: 8px; margin: 0; }
.sheet-x button { width: 34px; height: 34px; border: 0; border-radius: 50%; background: none; cursor: pointer; display: grid; place-items: center; color: var(--muted); }
.sheet-x button:hover { background: var(--soft); color: var(--ink); }
.sheet-x svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }

/* ---------- footer ---------- */
.foot { background: var(--bar); margin-top: 72px; padding: 36px 0 44px; border-top: 1px solid var(--line-2); }
.foot-in { display: flex; gap: 60px; flex-wrap: wrap; }
.foot-col { display: grid; gap: 4px; align-content: start; }
.foot-col h2 { font: 600 16px var(--sans); color: var(--ink); margin-bottom: 8px; }
.foot-col a { color: var(--ink); font-size: 15px; }
.foot-note { margin: 0 0 0 auto; font-size: 14px; color: var(--muted); line-height: 1.6; text-align: right; }

.dropzone { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; background: color-mix(in srgb, var(--bg) 88%, transparent); }
.dropzone div { display: grid; gap: 6px; text-align: center; padding: 48px 64px; border: 2px dashed var(--accent); border-radius: 6px; background: var(--bg); }
.dropzone b { font: var(--hw) 22px var(--serif); color: var(--ink); }
.dropzone span { color: var(--muted); font-size: 14px; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes up { from { transform: translateY(100%); } to { transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- tablet ---------- */
@media (max-width: 940px) {
  .two { grid-template-columns: minmax(0, 1fr); }
  .results .two { grid-template-rows: none; }
  .results .two > .pipe, .results .two > .col, .results .two > .side { grid-column: 1; grid-row: auto; }
  .results .two > .side { gap: 18px; padding-bottom: 6px; }
  .view .side { margin-top: 30px; }
  .summary.clamp { -webkit-line-clamp: 3; }
  .book-page { grid-template-columns: 220px minmax(0, 1fr); gap: 32px; }
  .home-grid { grid-template-columns: minmax(0, 1fr); }
  .home-side { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
  .row { grid-template-columns: 120px minmax(0, 1fr); }
  .cv { width: 120px; }
}

/* ---------- phone: Goodreads' mobile web layout ---------- */
@media (max-width: 700px) {
  :root { --top-h: 56px; }
  body { font-size: 15px; }
  .top { position: static; }
  .top-in { height: auto; padding: 0; flex-wrap: wrap; }
  .icon-btn { display: grid; margin-left: 4px; }
  .brand { flex: 1; width: auto; text-align: center; margin: 0; font-size: 28px; line-height: 56px; }
  .acct { margin: 0; padding: 0 10px 0 0; min-width: 48px; justify-content: flex-end; }
  .acct > a { background: var(--accent); color: #fff; font-size: 14px; padding: 8px 14px; border-radius: 30px; }
  .acct > a:hover { text-decoration: none; }
  .mainnav { height: 48px; justify-content: space-around; }
  .mainnav a { font-size: 16px; padding: 0 10px; }
  .top-search { order: 4; flex-basis: 100%; max-width: none; margin: 0; padding: 10px 12px; border-top: 1px solid var(--line-2); display: none; }
  body.search-open .top-search { display: block; }
  .top-search .ask textarea { height: 22px !important; max-height: 22px; margin: 7px 0; font-size: 16px; line-height: 22px; }
  .top-search .ask button { height: 36px; }
  body.mode-home .search-toggle { visibility: hidden; }
  .home { padding-top: 24px; }
  .home-main > h1 { font-size: 30px; line-height: 38px; }
  .lede { font-size: 16px; }
  .home-card { padding: 16px; margin: 0 -2px 28px; border-radius: 12px; }
  .home-side { display: block; padding-top: 0; }
  .cols { grid-template-columns: 1fr; gap: 10px; margin-bottom: 20px; }
  .link-cols { columns: 2; }
  .results, .view { padding-top: 14px; }
  .wrap { padding: 0 14px; }
  .tabs-wrap { top: 0; margin: 0 -24px; padding: 0 24px; }
  .tabs button { padding: 12px 12px 10px; font-size: 15px; }
  .only { display: none; }
  .row { grid-template-columns: 96px minmax(0, 1fr); column-gap: 16px; margin-bottom: 36px; }
  .promo { font-size: 11px; gap: 6px; }
  .promo b { font-size: 13px; }
  .promo .tag { display: none; }
  .row::before { display: none; }
  .shelf-ex .cv { width: 56px; }
  .shelf-ex { grid-template-columns: minmax(0, 1fr) 24px minmax(0, 110px); }
  .shelf-ex .lbl { grid-template-columns: minmax(0, 1fr) 24px minmax(0, 110px); }
  .shelf-ex .books .cv:nth-child(n+4) { display: none; }
  .cv { width: 96px; }
  .ph b { font-size: 10px; }
  .meta h3 { font-size: 18px; line-height: 24px; }
  .by { font-size: 15px; line-height: 21px; }
  .mini { font-size: 16px; }
  .stars { font-size: 17px; }
  .row .cv { grid-row: 1; }
  .row .act { grid-column: 1 / -1; grid-row: 2; justify-items: stretch; min-width: 0; margin-top: 14px; }
  .split { height: 44px; width: 100%; max-width: none; }
  .split-main { font-size: 15px; }
  .split-arrow { width: 42px; }
  .act .hint { display: none; }
  .page-h h1, .who h1, .profile-head h1 { font-size: 28px; line-height: 36px; }
  .reader { grid-template-columns: 50px minmax(0, 1fr) auto; gap: 12px; }
  .shelf-page { grid-template-columns: 1fr; gap: 12px; }
  .shelf-nav { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 6px; border-bottom: 1px solid var(--line-2); }
  .shelf-nav .kicker { display: none; }
  .shelf-nav button { white-space: nowrap; font-size: 14px; }
  .shelf-table thead { display: none; }
  .shelf-table tr { display: grid; grid-template-columns: 50px minmax(0, 1fr); column-gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--row); }
  .shelf-table td { border: 0; padding: 0; }
  .shelf-table td.c-cv { grid-row: 1 / span 4; }
  .shelf-table td.c-hide { margin-top: 6px; }
  .shelf-table .cv { width: 50px; }
  .profile { grid-template-columns: 1fr; gap: 16px; }
  .profile-left { grid-template-columns: 90px 1fr; justify-items: start; text-align: left; align-items: center; }
  .profile-left .av { width: 90px; height: 90px; font-size: 36px; grid-row: span 3; }
  .bookshelves { columns: 2; }
  .book-page { grid-template-columns: 1fr; gap: 20px; padding-top: 6px; }
  .book-left { position: static; }
  .book-left .cv { width: 160px; }
  .book-left .split { max-width: none; }
  .book-main { text-align: left; }
  .book-main h1 { font-size: 28px; }
  .bigstars .stars { font-size: 24px; }
  .copies th:nth-child(3), .copies td:nth-child(3) { display: none; }
  .sheet { width: 100%; max-width: 100%; margin: auto 0 0; border: 0; border-radius: 16px 16px 0 0; padding: 34px 22px max(24px, env(safe-area-inset-bottom)); }
  .sheet[open] { animation: up .25s cubic-bezier(.2,.8,.2,1); }
  .foot { margin-top: 40px; padding: 24px 0 30px; }
  .foot-in { gap: 30px; }
  .foot-note { margin: 0; text-align: left; flex-basis: 100%; }
}
