:root {
  --paper: #f3f6f9;
  --paper-2: #e3ebf1;
  --card: #ffffff;
  --ink: #13294b;
  --ink-2: #4a5d78;
  --ink-3: #8193a8;
  --line: #d5dfe8;
  --accent: #2b7697;
  --accent-ink: #fff;
  --accent-soft: #dcebf3;
  --red: #d63a2c;
  --green: #13294b;
  --gold: #f2c14e;
  --banner: linear-gradient(105deg, #12384d 0%, #1e5874 40%, #2f7898 72%, #3b88a8 100%);
  --shadow: 0 1px 2px rgba(19, 41, 75, .08), 0 6px 18px rgba(19, 41, 75, .08);
  --serif: "Oswald", "Arial Narrow", Impact, sans-serif;
  --thin: "Josefin Sans", "Futura", "Century Gothic", sans-serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0c1726; --paper-2: #15243a; --card: #12203a;
    --ink: #eef3f8; --ink-2: #a9b8ca; --ink-3: #6f8299; --line: #24364f;
    --accent: #5fb0d6; --accent-ink: #08131f; --accent-soft: #16344a;
    --red: #ef5545; --green: #3d8fb3; --gold: #f2c14e;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 18px rgba(0, 0, 0, .3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0c1726; --paper-2: #15243a; --card: #12203a;
  --ink: #eef3f8; --ink-2: #a9b8ca; --ink-3: #6f8299; --line: #24364f;
  --accent: #5fb0d6; --accent-ink: #08131f; --accent-soft: #16344a;
  --red: #ef5545; --green: #3d8fb3; --gold: #f2c14e;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 18px rgba(0, 0, 0, .3);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font: 16px/1.55 var(--sans); overflow-x: hidden;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0; letter-spacing: .005em; }
h1 { text-transform: uppercase; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: var(--paper); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }
main { min-height: 70vh; outline: none; }
main.wrap { padding-bottom: 72px; }

/* header */
.top { position: sticky; top: 0; z-index: 5; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top-in { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font: 600 19px var(--serif); text-decoration: none; white-space: nowrap; }
.brand-mark { display: inline-flex; align-items: flex-end; gap: 2px; height: 22px; }
.brand-mark i { display: block; width: 6px; border-radius: 1px; }
.brand-mark i:nth-child(1) { height: 22px; background: var(--red); }
.brand-mark i:nth-child(2) { height: 18px; background: var(--ink); }
.brand-mark i:nth-child(3) { height: 20px; background: var(--gold); transform: rotate(9deg); transform-origin: bottom left; }
.nav { display: flex; gap: 4px; }
.nav a { text-decoration: none; font-size: 14px; font-weight: 500; color: var(--ink-2); padding: 7px 10px; border-radius: 999px; white-space: nowrap; }
.nav a:hover { color: var(--ink); background: var(--paper-2); }
.nav a.on { color: var(--ink); background: var(--paper-2); }
.shelf-count { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: var(--accent-ink); font-size: 11px; line-height: 18px; text-align: center; margin-left: 2px; }
@media (max-width: 620px) {
  .top-in { height: auto; padding-top: 10px; padding-bottom: 8px; flex-direction: column; align-items: flex-start; gap: 6px; }
  .nav { margin-left: -10px; }
}

/* hero */
.hero { padding: 56px 0 28px; display: grid; grid-template-columns: 1.25fr 1fr; gap: 40px; align-items: center; }
.kicker { font-size: 12px; font-weight: 600; letter-spacing: .28em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 14px; }
.hero h1 { font-size: clamp(36px, 6vw, 60px); font-weight: 700; }
.hero h1 em { font-style: normal; color: var(--red); }
.lede { font-size: 18px; color: var(--ink-2); margin-top: 18px; max-width: 34em; }
.story { background: var(--banner); color: #fff; border-radius: 14px; padding: 24px; box-shadow: var(--shadow); position: relative; overflow: hidden; }
.story::before { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at 15% 115%, rgba(255, 255, 255, .16), transparent 55%); pointer-events: none; }
.story > * { position: relative; }
.story-books { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.story-books .arrow { color: rgba(255, 255, 255, .7); font-size: 22px; }
.story blockquote { margin: 0; font: 400 23px/1.3 var(--thin); }
.story .who { margin-top: 12px; font-size: 14px; color: rgba(255, 255, 255, .85); }
.story .who a { color: #fff; }
.story .btn { background: #fff; border-color: #fff; color: #13294b; }
.story .play { margin-top: 18px; }
@media (max-width: 820px) { .hero { grid-template-columns: 1fr; gap: 28px; padding-top: 36px; } }

.btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--card); color: var(--ink); padding: 9px 14px; border-radius: 999px; font: 500 14px var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--ink-3); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.06); }
.btn .tri { width: 0; height: 0; border-left: 8px solid currentColor; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 20px 0 8px; }
.stat { padding: 18px 12px; text-align: center; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat b { display: block; font: 700 32px var(--serif); }
.stat span { font-size: 13px; color: var(--ink-2); }
@media (max-width: 620px) { .stats { grid-template-columns: repeat(2, 1fr); } .stat:nth-child(3) { border-left: 0; } .stat:nth-child(n+3) { border-top: 1px solid var(--line); } }

/* sections */
.section { margin-top: 48px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.section-head h2 { font-size: 28px; }
.section-head p { color: var(--ink-2); margin-top: 6px; }
.more { font-size: 14px; font-weight: 500; color: var(--accent); text-decoration: none; white-space: nowrap; }
.more:hover { text-decoration: underline; }
.page-head { padding: 40px 0 8px; }
.page-head h1 { font-size: clamp(30px, 5vw, 44px); }
.page-head p { color: var(--ink-2); margin-top: 10px; max-width: 42em; font-size: 17px; }

/* generated covers */
.cover { --c: #2f4b3a; position: relative; flex: none; width: 64px; aspect-ratio: 2 / 3; border-radius: 3px 6px 6px 3px; background: var(--c); color: #fff; overflow: hidden; box-shadow: var(--shadow); container-type: inline-size; text-decoration: none; display: block; }
.cover::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 8%; background: rgba(0, 0, 0, .22); }
.cover::after { content: ""; position: absolute; left: 16%; right: 10%; top: 52%; height: 1px; background: rgba(255, 255, 255, .35); }
.cover .in { position: absolute; inset: 0; padding: 9cqw 10cqw 9cqw 16cqw; display: flex; flex-direction: column; justify-content: space-between; }
.cover .ct { text-transform: uppercase; font: 600 14cqw/1.08 var(--serif); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow-wrap: anywhere; hyphens: auto; }
.cover .ca { font: 500 6.5cqw/1.2 var(--sans); opacity: .82; text-transform: uppercase; letter-spacing: .06em; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.cover.md { width: 120px; }
.cover.lg { width: 180px; } .cover.lg .ct { -webkit-line-clamp: 5; }
.cover.sm { width: 44px; } .cover.sm .ca { display: none; } .cover.sm .ct { font-size: 15cqw; -webkit-line-clamp: 5; }
.story .cover.sm { width: 84px; } .story .cover.sm .ct { font-size: 11.5cqw; }

/* start-here cards */
.shelf-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 18px; }
.pick { text-decoration: none; display: flex; flex-direction: column; gap: 10px; }
.pick .cover { width: 100%; }
.pick:hover .cover { transform: translateY(-3px); }
.pick .cover { transition: transform .15s ease; }
.pick-meta { font-size: 13px; color: var(--ink-2); }
.pick-meta b { color: var(--ink); font-weight: 600; display: block; font-size: 14px; line-height: 1.3; }
.rankpill { display: inline-block; font: 600 11px var(--sans); color: var(--red); letter-spacing: .04em; }
@media (max-width: 820px) { .shelf-row { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 420px) { .shelf-row { gap: 12px; } }

/* ranked list */
.tools { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin: 22px 0 12px; }
.search { flex: 1 1 260px; min-width: 0; position: relative; }
.search input { width: 100%; font: 16px var(--sans); padding: 11px 14px 11px 38px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); }
.search input:focus { outline: 2px solid var(--accent); outline-offset: 0; border-color: transparent; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-3); }
.toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); cursor: pointer; user-select: none; }
.toggle input { accent-color: var(--accent); width: 16px; height: 16px; }
.count-note { font-size: 13px; color: var(--ink-3); margin-bottom: 8px; }
.list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.row { display: grid; grid-template-columns: 44px auto 1fr auto; gap: 14px; align-items: center; padding: 12px 4px; border-bottom: 1px solid var(--line); }
.row .rank { font: 600 22px var(--serif); color: var(--ink-3); text-align: right; }
.row:nth-child(-n+3) .rank { color: var(--red); }
.row-main { min-width: 0; }
.row-title { font: 600 17px/1.25 var(--serif); text-decoration: none; }
.row-title:hover { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.row-sub { font-size: 13.5px; color: var(--ink-2); margin-top: 2px; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.tag { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--paper-2); color: var(--ink-2); white-space: nowrap; }
.tag.hot { background: var(--accent-soft); color: var(--accent); }
.bar { height: 4px; border-radius: 2px; background: var(--paper-2); margin-top: 8px; max-width: 260px; overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--red); border-radius: 2px; }
.row-side { display: flex; align-items: center; gap: 14px; }
.times { text-align: right; line-height: 1.1; }
.times b { font: 700 22px var(--serif); display: block; }
.times span { font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; }
@media (max-width: 620px) {
  .row { grid-template-columns: 28px auto 1fr; gap: 10px; }
  .row .rank { font-size: 17px; }
  .row-side { grid-column: 3; justify-content: space-between; }
  .times { text-align: left; display: flex; align-items: baseline; gap: 6px; }
  .times b { display: inline; font-size: 17px; }
}

/* read toggle */
.readbtn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--card); color: var(--ink-2); border-radius: 999px; padding: 6px 11px 6px 8px; font: 500 13px var(--sans); cursor: pointer; white-space: nowrap; }
.readbtn .box { width: 16px; height: 16px; border-radius: 4px; border: 1.5px solid var(--ink-3); display: grid; place-items: center; }
.readbtn[aria-pressed="true"] { background: var(--green); border-color: var(--green); color: var(--paper); }
.readbtn[aria-pressed="true"] .box { border-color: currentColor; }
.readbtn[aria-pressed="true"] .box::after { content: ""; width: 8px; height: 4px; border: solid currentColor; border-width: 0 0 2px 2px; transform: rotate(-45deg) translate(1px, -1px); }
.readbtn:hover { border-color: var(--ink-3); }
.readbtn.big { padding: 10px 16px 10px 12px; font-size: 15px; }

/* book page */
.crumbs { padding-top: 28px; font-size: 14px; }
.crumbs a { color: var(--ink-2); text-decoration: none; }
.crumbs a:hover { color: var(--ink); }
.book-hero { display: grid; grid-template-columns: auto 1fr; gap: 32px; padding: 20px 0 8px; align-items: start; }
.book-hero h1 { font-size: clamp(30px, 5vw, 46px); }
.book-hero .by { font-size: 18px; color: var(--ink-2); margin-top: 8px; }
.facts { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.fact { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; min-width: 120px; }
.fact b { font: 700 24px var(--serif); display: block; line-height: 1.1; }
.fact span { font-size: 13px; color: var(--ink-2); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; align-items: center; }
.get { margin-top: 22px; }
.get h3 { font: 600 12px var(--sans); text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); margin-bottom: 8px; }
.get .btns { display: flex; gap: 8px; flex-wrap: wrap; }
.get small { display: block; margin-top: 8px; color: var(--ink-3); font-size: 12.5px; }
.note { margin-top: 16px; padding: 12px 14px; border-radius: 10px; background: var(--accent-soft); color: var(--ink); font-size: 14px; }
@media (max-width: 620px) { .book-hero { grid-template-columns: 1fr; gap: 20px; } .book-hero .cover.lg { width: 130px; } .book-hero .cover.lg .ct { font-size: 16px; } }

/* episode mentions */
.eps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.ep { display: grid; grid-template-columns: 132px 1fr; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px; align-items: start; }
.ep .thumb { width: 132px; aspect-ratio: 16 / 9; border-radius: 7px; overflow: hidden; background: var(--paper-2); position: relative; }
.ep .thumb img { width: 100%; height: 100%; object-fit: cover; }
.ep-title { font-size: 14px; font-weight: 600; line-height: 1.3; text-decoration: none; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ep-title:hover { text-decoration: underline; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.chip { display: inline-flex; align-items: center; gap: 5px; font: 600 12.5px var(--sans); font-variant-numeric: tabular-nums; padding: 4px 9px; border-radius: 999px; background: var(--accent); color: var(--accent-ink); text-decoration: none; }
.chip .tri { width: 0; height: 0; border-left: 6px solid currentColor; border-top: 4px solid transparent; border-bottom: 4px solid transparent; }
.chip.ghost { background: var(--paper-2); color: var(--ink-2); }
.chip:hover { filter: brightness(1.08); }
.ep-who { font-size: 13px; color: var(--ink-2); margin-top: 4px; }
.ep-who a { color: var(--ink); font-weight: 600; text-decoration: none; }
.ep-who a:hover { text-decoration: underline; }
@media (max-width: 760px) { .eps { grid-template-columns: 1fr; } }
@media (max-width: 420px) { .ep { grid-template-columns: 104px 1fr; } .ep .thumb { width: 104px; } }

/* guests */
.guest-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.gcard { display: flex; gap: 12px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 10px; text-decoration: none; min-width: 0; }
.gcard:hover { border-color: var(--ink-3); }
.gcard .thumb { width: 72px; flex: none; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: var(--paper-2); }
.gcard .thumb img { width: 100%; height: 100%; object-fit: cover; }
.gcard b { display: block; font-weight: 600; font-size: 15px; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; }
.gcard span { font-size: 13px; color: var(--ink-2); }
.letter { font: 600 22px var(--serif); color: var(--accent); margin: 26px 0 10px; }
.guest-books { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.gbook { display: flex; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; align-items: center; }
.gbook .row-title { font-size: 16px; }

/* shelf */
.progress { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px; margin-top: 22px; }
.progress b { font: 700 28px var(--serif); }
.progress .bar { max-width: none; height: 8px; border-radius: 4px; margin-top: 12px; }
.progress .bar i { background: var(--green); border-radius: 4px; }
.empty { text-align: center; padding: 48px 16px; color: var(--ink-2); }
.empty h2 { color: var(--ink); margin-bottom: 8px; }
.empty .btn { margin-top: 18px; }

.own { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.own-card { display: flex; gap: 18px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 18px; align-items: center; text-decoration: none; }
.own-card:hover { border-color: var(--ink-3); }
.own-card h3 { font-size: 22px; }
.own-card p { color: var(--ink-2); font-size: 14px; margin-top: 6px; }
@media (max-width: 620px) { .own { grid-template-columns: 1fr; } }

.foot { border-top: 1px solid var(--line); padding: 28px 0 40px; color: var(--ink-2); font-size: 13.5px; }
.foot p + p { margin-top: 8px; }
.foot strong { color: var(--ink); }
.muted { color: var(--ink-3); }

/* real cover images */
.cover.has-img { background: var(--paper-2); }
.cover.has-img::before, .cover.has-img::after, .cover.has-img .in { display: none; }
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.cover img.wide { object-fit: contain; }

/* guest picks */
.pickedby { font-size: 13px; color: var(--ink-2); margin-top: 4px; }
.pickedby a { color: var(--ink); font-weight: 500; text-decoration: none; }
.pickedby a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.loadmore { display: flex; justify-content: center; margin-top: 18px; }
.tag.soon { background: var(--gold); color: #13294b; font-weight: 600; }
