:root {
  --ink: #172725;
  --ink-soft: #4d5d59;
  --forest: #18302d;
  --forest-2: #24443f;
  --paper: #f3efe6;
  --paper-deep: #e8e0d1;
  --surface: #fbf9f4;
  --white: #fffefa;
  --rust: #bd6248;
  --rust-dark: #954832;
  --gold: #cf9f55;
  --line: rgba(23, 39, 37, 0.14);
  --line-light: rgba(255, 255, 255, 0.17);
  --shadow-sm: 0 8px 30px rgba(23, 39, 37, 0.09);
  --shadow-md: 0 24px 64px rgba(23, 39, 37, 0.17);
  --shadow-cover: 0 16px 30px rgba(12, 24, 22, 0.22);
  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 30px;
  --display: Georgia, 'Times New Roman', serif;
  --sans: 'Avenir Next', Avenir, 'Segoe UI', Helvetica, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
}

body {
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 9% 7%, rgba(255, 255, 255, 0.8), transparent 27%),
    var(--paper);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

button,
a,
select,
label {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

a {
  color: inherit;
  text-decoration: none;
}

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

[hidden] {
  display: none !important;
}

.page-shell {
  min-height: 100vh;
  overflow: hidden;
}

.topbar {
  position: sticky;
  z-index: 30;
  top: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 76px;
  padding: 12px clamp(22px, 4vw, 72px);
  border-bottom: 1px solid rgba(23, 39, 37, 0.09);
  background: rgba(248, 245, 238, 0.9);
  backdrop-filter: blur(20px) saturate(1.2);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: max-content;
}

.brand-mark {
  display: inline-flex;
  align-items: flex-end;
  gap: 3px;
  height: 28px;
  padding: 5px 7px;
  border-radius: 7px 7px 4px 4px;
  background: var(--forest);
  box-shadow: inset 0 -2px 0 rgba(255, 255, 255, 0.07);
}

.brand-mark span {
  display: block;
  width: 4px;
  border-radius: 4px 4px 1px 1px;
  background: var(--paper);
}

.brand-mark span:nth-child(1) {
  height: 14px;
}

.brand-mark span:nth-child(2) {
  height: 18px;
  background: #d58460;
}

.brand-mark span:nth-child(3) {
  height: 11px;
}

.brand-copy {
  display: grid;
  line-height: 1.05;
}

.brand-copy strong {
  font-family: var(--display);
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.brand-copy small {
  margin-top: 4px;
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.desktop-nav {
  display: flex;
  align-items: center;
  gap: 34px;
  color: var(--ink-soft);
  font-size: 13px;
  font-weight: 650;
}

.desktop-nav a {
  position: relative;
  padding: 10px 0;
}

.desktop-nav a::after {
  position: absolute;
  right: 50%;
  bottom: 4px;
  left: 50%;
  height: 1.5px;
  background: var(--rust);
  content: '';
  transition: right 180ms ease, left 180ms ease;
}

.desktop-nav a:hover::after,
.desktop-nav a:focus-visible::after {
  right: 0;
  left: 0;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-dark {
  color: var(--surface);
  background: var(--forest);
  box-shadow: 0 8px 20px rgba(24, 48, 45, 0.16);
}

.button-dark:hover {
  background: #23433f;
  box-shadow: 0 11px 25px rgba(24, 48, 45, 0.21);
}

.button-outline {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.45);
}

.button svg {
  width: 17px;
  height: 17px;
}

.surprise-button {
  justify-self: end;
}

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.95fr);
  min-height: 650px;
  padding: clamp(66px, 8vw, 118px) clamp(24px, 7vw, 118px) 84px;
  overflow: hidden;
  color: var(--surface);
  background:
    linear-gradient(115deg, rgba(16, 40, 36, 0.99) 0%, rgba(25, 57, 52, 0.97) 53%, rgba(36, 68, 63, 0.94) 100%),
    var(--forest);
}

.hero::before {
  position: absolute;
  inset: 0;
  opacity: 0.21;
  background-image: url("data:image/svg+xml,%3Csvg width='90' height='90' viewBox='0 0 90 90' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.7' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.14'/%3E%3C/svg%3E");
  content: '';
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 2;
  align-self: center;
  max-width: 690px;
}

.eyebrow {
  margin: 0 0 16px;
  color: var(--rust);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.24em;
  text-transform: uppercase;
}

.hero .eyebrow {
  color: #e49773;
}

.hero h1 {
  max-width: 680px;
  margin: 0;
  font-family: var(--display);
  font-size: clamp(51px, 6vw, 86px);
  font-weight: 400;
  letter-spacing: -0.055em;
  line-height: 0.98;
}

.hero-intro {
  max-width: 610px;
  margin: 28px 0 0;
  color: rgba(255, 254, 250, 0.7);
  font-family: var(--display);
  font-size: 18px;
  line-height: 1.65;
}

.library-search {
  display: flex;
  align-items: center;
  width: min(660px, 100%);
  min-height: 58px;
  margin: 0 0 18px;
  padding: 0 15px 0 18px;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--ink-soft);
  background: var(--white);
  box-shadow: 0 10px 24px rgba(23, 39, 37, 0.08);
  transition: border 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.library-search:focus-within {
  border-color: rgba(24, 48, 45, 0.48);
  box-shadow: 0 14px 30px rgba(23, 39, 37, 0.12);
  transform: translateY(-1px);
}

.library-search svg {
  flex: 0 0 auto;
  width: 21px;
  height: 21px;
  margin-right: 13px;
}

.library-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 15px;
}

.library-search input::placeholder {
  color: #8b9692;
}

.library-search kbd {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #80908a;
  background: var(--paper);
  font-family: var(--sans);
  font-size: 12px;
}

.hero-status-toggle {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 15px;
  color: rgba(255, 254, 250, 0.72);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.hero-status-chip {
  border-color: rgba(255, 255, 255, 0.22);
  color: rgba(255, 254, 250, 0.82);
  background: rgba(255, 255, 255, 0.08);
}

.hero-status-chip:hover,
.hero-status-chip.is-active {
  color: var(--ink);
  background: var(--white);
}

.hero-stats {
  display: flex;
  align-items: stretch;
  gap: 0;
  margin-top: 36px;
}

.hero-stat {
  min-width: 116px;
  padding: 1px 26px;
  border-left: 1px solid rgba(255, 255, 255, 0.15);
}

.hero-stat:first-child {
  padding-left: 0;
  border-left: 0;
}

.hero-stat strong {
  display: block;
  font-family: var(--display);
  font-size: 27px;
  font-weight: 400;
  line-height: 1;
}

.hero-stat span {
  display: block;
  margin-top: 7px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.hero-visual {
  position: relative;
  z-index: 1;
  min-height: 470px;
}

.cover-stage {
  position: absolute;
  inset: 7% 0 0 5%;
}

.hero-book {
  position: absolute;
  display: block;
  width: clamp(145px, 13vw, 205px);
  aspect-ratio: 0.655;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 3px 8px 8px 3px;
  background: #d9d2c6;
  box-shadow: 0 30px 55px rgba(3, 17, 14, 0.35);
  cursor: pointer;
  transition: transform 240ms ease, filter 240ms ease;
}

.hero-book::after {
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.24), rgba(255, 255, 255, 0.12));
  content: '';
}

.hero-book img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-book:nth-child(1) {
  z-index: 4;
  top: 6%;
  left: 27%;
  transform: rotate(-5deg);
}

.hero-book:nth-child(2) {
  z-index: 2;
  top: 34%;
  left: 4%;
  transform: rotate(8deg) scale(0.91);
  filter: brightness(0.83);
}

.hero-book:nth-child(3) {
  z-index: 3;
  top: 29%;
  left: 54%;
  transform: rotate(7deg) scale(0.95);
}

.hero-book:nth-child(4) {
  z-index: 1;
  top: 2%;
  left: 67%;
  transform: rotate(13deg) scale(0.77);
  filter: brightness(0.72);
}

.hero-book:hover {
  z-index: 10;
  transform: translateY(-10px) rotate(0) scale(1.02);
  filter: brightness(1);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(1px);
}

.orb-one {
  top: -38px;
  right: -76px;
  width: 360px;
  height: 360px;
  border: 1px solid rgba(223, 159, 110, 0.15);
  box-shadow: inset 0 0 80px rgba(223, 159, 110, 0.05);
}

.orb-two {
  right: 21%;
  bottom: 0;
  width: 230px;
  height: 230px;
  background: rgba(211, 127, 88, 0.07);
}

.hero-note {
  position: absolute;
  right: 2%;
  bottom: 4%;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: rgba(255, 255, 255, 0.42);
  font-family: var(--display);
  font-size: 11px;
  font-style: italic;
  line-height: 1.45;
}

.note-line {
  width: 28px;
  height: 1px;
  margin-top: 7px;
  background: rgba(255, 255, 255, 0.26);
}

.section {
  padding: 92px clamp(24px, 7vw, 118px);
}

.section-heading,
.library-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 34px;
}

.section h2,
.library-section h2 {
  margin: 0;
  font-family: var(--display);
  font-size: clamp(36px, 4vw, 52px);
  font-weight: 400;
  letter-spacing: -0.035em;
  line-height: 1.06;
}

.section-intro {
  max-width: 580px;
  margin: 11px 0 0;
  color: var(--ink-soft);
  font-family: var(--display);
  font-size: 17px;
}

.text-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 0;
  border: 0;
  color: var(--rust-dark);
  background: transparent;
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.text-button svg {
  width: 17px;
  height: 17px;
  transition: transform 160ms ease;
}

.text-button:hover svg {
  transform: translateX(3px);
}

.currently-reading {
  position: relative;
  padding-top: 82px;
  padding-bottom: 82px;
  background: var(--surface);
}

.reading-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.reading-card {
  position: relative;
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 25px;
  min-height: 205px;
  padding: 22px 26px 22px 22px;
  overflow: hidden;
  border: 1px solid rgba(23, 39, 37, 0.09);
  border-radius: var(--radius-md);
  background: var(--white);
  box-shadow: 0 10px 30px rgba(23, 39, 37, 0.06);
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.reading-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
}

.reading-cover {
  align-self: start;
  width: 128px;
  aspect-ratio: 0.66;
  overflow: hidden;
  border-radius: 2px 6px 6px 2px;
  background: var(--paper-deep);
  box-shadow: 0 13px 24px rgba(23, 39, 37, 0.18);
}

.reading-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.reading-card-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  min-width: 0;
  padding: 7px 0;
}

.mini-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 15px;
  color: var(--rust-dark);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.mini-label::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--rust);
  content: '';
  box-shadow: 0 0 0 4px rgba(189, 98, 72, 0.1);
}

.reading-card h3 {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  font-family: var(--display);
  font-size: 25px;
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.12;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.reading-author {
  margin: 8px 0 0;
  color: var(--ink-soft);
  font-size: 12px;
}

.reading-description {
  display: -webkit-box;
  margin: 16px 0 0;
  overflow: hidden;
  color: #6f7a77;
  font-family: var(--display);
  font-size: 13px;
  line-height: 1.5;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.recently-read-section {
  position: relative;
  overflow: hidden;
  background: var(--paper-deep);
}

.recently-read-section::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 10px;
  background: linear-gradient(180deg, rgba(23, 39, 37, 0.04), rgba(23, 39, 37, 0.12));
  content: '';
}

.recently-read-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: clamp(13px, 1.5vw, 22px);
}

.recently-read-card {
  display: flex;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  flex-direction: column;
  text-align: left;
}

.recently-read-cover {
  display: block;
  width: 100%;
  aspect-ratio: 0.655;
  overflow: hidden;
  border-radius: 3px 7px 7px 3px;
  background: var(--surface);
  box-shadow: var(--shadow-cover);
  transform-origin: center bottom;
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.recently-read-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recently-read-card:hover .recently-read-cover {
  transform: translateY(-7px) rotate(-0.6deg);
  box-shadow: 0 23px 38px rgba(12, 24, 22, 0.24);
}

.recently-read-copy {
  display: flex;
  min-width: 0;
  padding: 16px 3px 0;
  flex-direction: column;
}

.recently-read-copy time {
  margin-bottom: 7px;
  color: var(--rust-dark);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.recently-read-copy strong {
  display: -webkit-box;
  overflow: hidden;
  font-family: var(--display);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.18;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.recently-read-copy small {
  display: block;
  margin-top: 7px;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.five-star-section {
  color: var(--surface);
  background:
    radial-gradient(circle at 86% 12%, rgba(207, 159, 85, 0.24), transparent 28%),
    linear-gradient(135deg, #102925, var(--forest-2));
}

.five-star-section .eyebrow {
  color: #edbb6e;
}

.five-star-section .section-intro {
  color: rgba(255, 254, 250, 0.68);
}

.text-button-light {
  color: #f3c981;
}

.best-books-grid {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: clamp(13px, 1.5vw, 22px);
}

.best-book-card {
  min-width: 0;
  padding: 0;
  border: 0;
  color: inherit;
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.best-book-cover {
  position: relative;
  display: block;
  aspect-ratio: 0.655;
  overflow: hidden;
  border-radius: 2px 8px 8px 2px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.28);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.best-book-cover::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0, 0, 0, 0.2));
  content: '';
}

.best-book-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.best-book-card:hover .best-book-cover {
  transform: translateY(-7px) rotate(-1deg);
  box-shadow: 0 26px 42px rgba(0, 0, 0, 0.35);
}

.best-book-copy {
  display: block;
  padding-top: 12px;
}

.best-book-category {
  display: block;
  overflow: hidden;
  color: #ddb66e;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.best-book-copy strong {
  display: -webkit-box;
  margin-top: 5px;
  overflow: hidden;
  font-family: var(--display);
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.018em;
  line-height: 1.17;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.best-book-copy small {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: rgba(255, 254, 250, 0.55);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.best-book-rating {
  display: block;
  margin-top: 7px;
  color: #f0bf67;
  font-size: 10px;
  letter-spacing: 0.04em;
}

.topic-section {
  background: var(--paper);
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.topic-card {
  --topic-accent: var(--rust);
  position: relative;
  display: flex;
  min-height: 278px;
  flex-direction: column;
  padding: 25px;
  overflow: hidden;
  border: 1px solid rgba(23, 39, 37, 0.1);
  border-radius: 17px;
  color: var(--ink);
  text-align: left;
  background: linear-gradient(145deg, color-mix(in srgb, var(--topic-accent) 24%, #fffdf8), color-mix(in srgb, var(--topic-accent) 12%, #f7f0e2));
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border 180ms ease;
}

.topic-card:hover {
  transform: translateY(-5px);
  border-color: color-mix(in srgb, var(--topic-accent) 45%, transparent);
  box-shadow: var(--shadow-md);
}

.topic-card:focus-visible, .author-card:focus-visible, .most-read-author-bar:focus-visible { outline: 3px solid color-mix(in srgb, var(--topic-accent) 72%, white); outline-offset: 3px; }

.topic-card::before {
  position: absolute;
  right: -35px;
  bottom: -48px;
  width: 140px;
  height: 140px;
  border: 22px solid color-mix(in srgb, var(--topic-accent) 12%, transparent);
  border-radius: 50%;
  content: '';
}

.topic-card::after,
.author-card::after {
  position: absolute;
  inset: -28px;
  z-index: 0;
  background-image: var(--panel-cover);
  background-position: center;
  background-size: cover;
  content: '';
  filter: blur(24px) saturate(1.15);
  opacity: 0.22;
  transform: scale(1.12);
}

.topic-card > *,
.author-card > * {
  position: relative;
  z-index: 1;
}

.topic-number {
  color: var(--topic-accent);
  font-family: var(--display);
  font-size: 12px;
  font-style: italic;
}

.topic-card h3 {
  max-width: 175px;
  margin: 0 0 8px;
  font-family: var(--display);
  font-size: 25px;
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.05;
}

.topic-count {
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.topic-samples {
  position: absolute;
  right: 58px;
  bottom: 20px;
  left: 22px;
  display: flex;
  align-items: flex-end;
  height: 148px;
}

.topic-card .topic-samples {
  position: relative;
  right: auto;
  bottom: auto;
  left: auto;
  height: 118px;
  margin: 7px 34px 15px 0;
}

.topic-card .topic-sample {
  width: 74px;
}

.topic-sample {
  position: relative;
  display: block;
  width: 92px;
  aspect-ratio: 0.655;
  margin-left: -10px;
  border: 0;
  border-radius: 2px 5px 5px 2px;
  padding: 0;
  background: #ddd5c6;
  box-shadow: 0 12px 24px rgba(23, 39, 37, 0.2);
  transform: rotate(-3deg);
  transition: transform 180ms ease;
  cursor: pointer;
}

.topic-sample:first-child {
  z-index: 3;
  margin-left: 0;
}

.topic-sample:nth-child(2) {
  z-index: 2;
  transform: translateY(4px) rotate(2deg);
}

.topic-sample:nth-child(3) {
  z-index: 1;
  transform: translateY(7px) rotate(5deg);
}

.topic-card:hover .topic-sample {
  transform: translateY(-3px) rotate(0);
}

.topic-sample img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.topic-sample small {
  position: absolute;
  right: 4px;
  bottom: 4px;
  padding: 2px 4px;
  border-radius: 999px;
  color: #fff;
  background: rgba(17, 35, 32, 0.82);
  font-size: 7px;
  font-weight: 800;
}

.topic-arrow {
  position: absolute;
  right: 20px;
  bottom: 20px;
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.64);
}

.author-section {
  color: var(--surface);
  background:
    radial-gradient(circle at 86% 12%, rgba(207, 159, 85, 0.24), transparent 28%),
    linear-gradient(135deg, #102925, var(--forest-2));
}

.author-section .eyebrow {
  color: #edbb6e;
}

.author-section .section-intro {
  color: rgba(255, 254, 250, 0.68);
}

.author-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.author-card {
  --topic-accent: var(--forest);
  position: relative;
  min-height: 325px;
  padding: 23px;
  overflow: hidden;
  border: 1px solid rgba(23, 39, 37, 0.1);
  border-radius: 17px;
  color: var(--ink);
  background: linear-gradient(145deg, color-mix(in srgb, var(--topic-accent) 22%, #fffdf8), color-mix(in srgb, var(--topic-accent) 10%, #f7f0e2));
  cursor: pointer;
  transition: transform 180ms ease, box-shadow 180ms ease, border 180ms ease;
}

.author-card:hover { transform: translateY(-5px); border-color: color-mix(in srgb, var(--topic-accent) 45%, transparent); box-shadow: var(--shadow-md); }
.author-card:hover .topic-sample { transform: translateY(-3px) rotate(0); }
.author-icon { position: absolute; top: 22px; right: 22px; display: grid; width: 30px; height: 30px; place-items: center; color: var(--topic-accent); }
.author-icon svg, .author-chart-icon svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.7; }
.author-icon { top: auto; right: -22%; bottom: -30%; width: auto; height: 114.4%; aspect-ratio: 1; border-radius: 0; color: #8b9390; background: transparent; opacity: .3; }
.author-icon svg { width: 66%; height: 66%; stroke-width: 1.1; }
.author-arrow { right: 20px; bottom: 20px; border: 1px solid var(--line); border-radius: 50%; color: var(--ink); background: rgba(255, 255, 255, 0.64); }

.author-card .topic-samples {
  position: relative;
  right: auto;
  bottom: auto;
  left: auto;
  margin: 14px 0 18px;
}

.author-card h3 {
  max-width: 88%;
  margin: 0 0 7px;
  font-family: var(--display);
  font-size: 25px;
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.05;
}

.most-read-author-section {
  background: #f6f1e7;
}

.most-read-author-grid {
  display: grid;
  gap: 8px;
}

.most-read-author-bar { --topic-accent: var(--forest); position: relative; display: grid; grid-template-columns: 30px 28px minmax(120px, .7fr) 90px minmax(120px, 2.1fr); align-items: center; gap: 13px; width: 100%; min-height: 62px; padding: 10px 17px; border: 1px solid rgba(23,39,37,.1); border-radius: 12px; color: var(--ink); text-align: left; background: #fffaf0; cursor: pointer; transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease; }
.most-read-author-bar:hover { transform: translateX(4px); border-color: color-mix(in srgb, var(--topic-accent) 48%, transparent); box-shadow: 0 10px 22px rgba(23,39,37,.08); }
.most-read-author-bar:hover, .most-read-author-bar:focus-visible { z-index: 10; }
.author-chart-rank { color: var(--topic-accent); font-family: var(--display); font-size: 13px; font-style: italic; }
.author-chart-icon { display: grid; width: 26px; height: 26px; place-items: center; border-radius: 50%; color: var(--topic-accent); background: color-mix(in srgb, var(--topic-accent) 12%, transparent); }
.most-read-author-bar .most-read-author-name { overflow: hidden; color: var(--ink); font-family: var(--display); font-size: 18px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.author-chart-count { color: var(--ink-soft); font-size: 9px; font-weight: 800; letter-spacing: .08em; text-align: right; text-transform: uppercase; }
.author-chart-track { display: block; height: 10px; overflow: hidden; border-radius: 999px; background: color-mix(in srgb, var(--topic-accent) 10%, var(--paper)); }
.author-chart-fill { display: block; width: var(--author-bar-size); height: 100%; border-radius: inherit; background: linear-gradient(90deg, color-mix(in srgb, var(--topic-accent) 72%, white), var(--topic-accent)); }
.author-chart-tooltip { position: absolute; z-index: 4; top: calc(100% + 8px); left: 84px; width: min(420px, calc(100% - 100px)); padding: 11px 13px; border-radius: 9px; color: #fff; background: rgba(17,35,32,.96); box-shadow: 0 12px 24px rgba(17,35,32,.24); font-size: 10px; line-height: 1.35; opacity: 0; pointer-events: none; transform: translateY(-4px); transition: opacity 160ms ease, transform 160ms ease; }
.most-read-author-bar:hover .author-chart-tooltip, .most-read-author-bar:focus-visible .author-chart-tooltip { opacity: 1; transform: translateY(0); }

.most-read-author-card {
  --topic-accent: var(--forest);
  padding: 21px 23px;
  border: 1px solid rgba(23, 39, 37, 0.1);
  border-radius: 14px;
  background: linear-gradient(145deg, color-mix(in srgb, var(--topic-accent) 13%, #fffdf8), #fffaf0);
}

.most-read-author-line {
  margin: 8px 0 10px;
  color: var(--ink-soft);
  font-family: var(--display);
  font-size: 17px;
  line-height: 1.35;
}

.most-read-author-name,
.book-author,
.dialog-author-button {
  margin: 0;
  padding: 0;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: inherit;
  background: transparent;
  cursor: pointer;
}

.most-read-author-name {
  color: var(--ink);
  font-weight: 600;
}

.most-read-author-name:hover,
.most-read-author-name:focus-visible,
.book-author:hover,
.book-author:focus-visible,
.dialog-author-button:hover,
.dialog-author-button:focus-visible {
  color: var(--rust-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.most-read-author-divider {
  margin: 0 5px;
  color: var(--topic-accent);
}

.most-read-author-books {
  color: var(--ink-soft);
}

.topic-arrow svg {
  width: 14px;
  height: 14px;
}

.all-topic-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 22px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: rgba(255, 254, 250, 0.54);
}

.topic-pill {
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: var(--white);
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
  transition: border 150ms ease, color 150ms ease, transform 150ms ease;
}

.topic-pill:hover {
  transform: translateY(-1px);
  border-color: var(--rust);
  color: var(--rust-dark);
}

.recommendations {
  color: var(--surface);
  background: var(--forest);
}

.recommendations .eyebrow {
  color: #e49773;
}

.recommendation-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.recommendation-card {
  position: relative;
  min-height: 345px;
  padding: 29px;
  overflow: hidden;
  border: 1px solid var(--line-light);
  border-radius: var(--radius-md);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.075), rgba(255, 255, 255, 0.025));
}

.recommendation-card::before {
  position: absolute;
  inset: 0;
  opacity: 0.5;
  background: radial-gradient(circle at 100% 0, rgba(214, 137, 96, 0.13), transparent 42%);
  content: '';
  pointer-events: none;
}

.recommendation-card-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.recommendation-card .eyebrow {
  margin-bottom: 7px;
}

.recommendation-card h3 {
  margin: 0;
  font-family: var(--display);
  font-size: 27px;
  font-weight: 400;
}

.recommendation-stack {
  position: absolute;
  inset: 116px 18px 12px;
}

.stack-book {
  position: absolute;
  bottom: 9px;
  width: 118px;
  aspect-ratio: 0.655;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 2px 6px 6px 2px;
  background: #ddd;
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  transition: transform 180ms ease;
}

.stack-book:nth-child(1) {
  z-index: 3;
  left: 10%;
  transform: rotate(-4deg);
}

.stack-book:nth-child(2) {
  z-index: 2;
  left: 36%;
  transform: rotate(3deg) translateY(8px);
}

.stack-book:nth-child(3) {
  z-index: 1;
  left: 61%;
  transform: rotate(7deg) translateY(15px);
}

.stack-book:hover {
  z-index: 5;
  transform: translateY(-7px) rotate(0);
}

.stack-book img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.library-section {
  padding: 98px clamp(24px, 5vw, 78px) 120px;
  background: var(--surface);
}

.library-heading {
  margin-bottom: 24px;
}

.library-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.share-library-button {
  min-height: 42px;
  white-space: nowrap;
}

.sort-control {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 42px;
  padding: 0 13px 0 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  font-size: 11px;
}

.sort-control > span {
  color: #7a8581;
}

.sort-control select {
  max-width: 155px;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-weight: 700;
  appearance: none;
  cursor: pointer;
}

.sort-control svg {
  width: 14px;
  height: 14px;
  pointer-events: none;
}

.view-toggle {
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
}

.view-toggle button {
  display: grid;
  width: 35px;
  height: 35px;
  padding: 0;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #7d8985;
  background: transparent;
  cursor: pointer;
}

.view-toggle button.is-active {
  color: var(--surface);
  background: var(--forest);
}

.view-toggle svg {
  width: 17px;
  height: 17px;
}

.mobile-filter-button,
.filter-close {
  display: none;
}

.quick-filter-bar {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, auto) 1fr;
  align-items: center;
  gap: 22px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 15px;
  background: var(--paper);
}

.quick-filter-group {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.quick-filter-label {
  flex: 0 0 auto;
  color: #7e8985;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}

.quick-filter-chips {
  display: flex;
  align-items: center;
  gap: 5px;
}

.quick-filter-chip {
  min-height: 31px;
  padding: 0 11px;
  border: 1px solid rgba(23, 39, 37, 0.13);
  border-radius: 999px;
  color: var(--ink-soft);
  background: rgba(255, 255, 255, 0.58);
  font-size: 9px;
  font-weight: 720;
  white-space: nowrap;
  cursor: pointer;
  transition: color 150ms ease, background 150ms ease, border 150ms ease, transform 150ms ease;
}

.quick-filter-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(24, 48, 45, 0.35);
}

.quick-filter-chip.is-active {
  border-color: var(--forest);
  color: var(--surface);
  background: var(--forest);
  box-shadow: 0 5px 12px rgba(24, 48, 45, 0.13);
}

.hero-status-toggle .hero-status-chip {
  border-color: rgba(255, 255, 255, 0.22);
  color: rgba(255, 254, 250, 0.82);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.hero-status-toggle .hero-status-chip.is-active,
.hero-status-toggle .hero-status-chip:hover {
  color: var(--ink);
  border-color: var(--white);
  background: var(--white);
  box-shadow: 0 12px 26px rgba(4, 15, 13, 0.22);
}

.quick-star-chip {
  color: #96712e;
}

.quick-star-chip.is-active {
  color: #fff5d8;
}

.quick-results-count {
  justify-self: end;
  margin: 0;
  padding-left: 19px;
  border-left: 1px solid var(--line);
  text-align: right;
  line-height: 1;
}

.quick-results-count strong {
  display: block;
  font-family: var(--display);
  font-size: 22px;
  font-weight: 500;
}

.quick-results-count span {
  display: block;
  margin-top: 5px;
  color: #87918e;
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.filter-count {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  color: white;
  background: var(--rust);
  font-size: 9px;
}

.active-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
  margin-bottom: 19px;
}

.active-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 31px;
  padding: 0 10px 0 12px;
  border: 1px solid rgba(189, 98, 72, 0.25);
  border-radius: 999px;
  color: var(--rust-dark);
  background: rgba(189, 98, 72, 0.07);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.active-filter-pill svg {
  width: 12px;
  height: 12px;
}

.library-layout {
  display: grid;
  grid-template-columns: 224px minmax(0, 1fr);
  align-items: start;
  gap: clamp(28px, 4vw, 54px);
}

.filter-panel {
  position: sticky;
  top: 100px;
  padding-right: 3px;
}

.filter-backdrop {
  display: none;
}

.filter-panel-header {
  display: none;
}

.filter-group {
  padding: 20px 0 23px;
  border-bottom: 1px solid var(--line);
}

.filter-group:first-of-type {
  padding-top: 0;
}

.filter-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-align: left;
  text-transform: uppercase;
  cursor: pointer;
}

.filter-group-title svg {
  width: 15px;
  height: 15px;
  transition: transform 160ms ease;
}

.filter-group-title[aria-expanded='false'] svg {
  transform: rotate(-90deg);
}

.filter-group-title[aria-expanded='false'] + .filter-options,
.filter-group-title[aria-expanded='false'] + .rating-filter {
  display: none;
}

.filter-options {
  display: grid;
  gap: 11px;
  margin-top: 17px;
}

.filter-option {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 10px;
  color: #596662;
  font-size: 11px;
  cursor: pointer;
}

.filter-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.fake-checkbox {
  position: relative;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  border: 1px solid rgba(23, 39, 37, 0.25);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.7);
  transition: border 130ms ease, background 130ms ease;
}

.filter-option input:checked + .fake-checkbox {
  border-color: var(--forest);
  background: var(--forest);
}

.filter-option input:checked + .fake-checkbox::after {
  position: absolute;
  top: 3px;
  left: 5px;
  width: 4px;
  height: 7px;
  border-right: 1.5px solid white;
  border-bottom: 1.5px solid white;
  content: '';
  transform: rotate(42deg);
}

.filter-option-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.option-count {
  margin-left: auto;
  color: #9aa29f;
  font-size: 9px;
}

.category-dot {
  flex: 0 0 auto;
  width: 7px;
  height: 7px;
  margin-left: -4px;
  border-radius: 50%;
  background: var(--category-color);
}

.rating-filter {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 17px;
}

.rating-star {
  padding: 1px;
  border: 0;
  color: #c9c6bc;
  background: transparent;
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
}

.rating-star.is-active,
.rating-star:hover {
  color: var(--gold);
}

.rating-label {
  margin-left: 6px;
  color: #7c8884;
  font-size: 9px;
}

.clear-filters {
  margin-top: 21px;
  padding: 0 0 3px;
  border: 0;
  border-bottom: 1px solid rgba(149, 72, 50, 0.35);
  color: var(--rust-dark);
  background: transparent;
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.results-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 32px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.results-meta p {
  margin: 0 0 12px;
  color: #7c8784;
  font-size: 10px;
}

#results-count {
  color: var(--ink);
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.book-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 31px 18px;
}

.book-card {
  min-width: 0;
  padding: 0;
  border: 0;
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.book-cover-wrap {
  position: relative;
  aspect-ratio: 0.655;
  overflow: hidden;
  border-radius: 2px 8px 8px 2px;
  background: #ded7ca;
  box-shadow: 0 10px 22px rgba(23, 39, 37, 0.17);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.book-cover-wrap::before {
  position: absolute;
  z-index: 2;
  inset: 0 auto 0 0;
  width: 4px;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.2), rgba(255, 255, 255, 0.1));
  content: '';
  pointer-events: none;
}

.book-cover-wrap::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 62%, rgba(11, 20, 19, 0.23));
  content: '';
  opacity: 0;
  transition: opacity 180ms ease;
  pointer-events: none;
}

.book-card:hover .book-cover-wrap {
  transform: translateY(-6px);
  box-shadow: 0 18px 30px rgba(23, 39, 37, 0.23);
}

.book-card:hover .book-cover-wrap::after {
  opacity: 1;
}

.book-cover {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.cover-fallback {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  padding: 17%;
  color: var(--surface);
  text-align: center;
  background: linear-gradient(145deg, var(--fallback-color, #506e68), #172d2a);
}

.cover-fallback strong {
  font-family: var(--display);
  font-size: clamp(14px, 1.5vw, 22px);
  font-weight: 400;
  line-height: 1.15;
}

.cover-fallback span {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.66);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.book-status {
  position: absolute;
  z-index: 3;
  top: 9px;
  right: 9px;
  display: grid;
  width: 19px;
  height: 19px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 50%;
  color: white;
  background: rgba(23, 39, 37, 0.72);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(6px);
}

.book-status svg {
  width: 9px;
  height: 9px;
}

.ai-book-badge {
  position: absolute;
  z-index: 4;
  right: 8px;
  bottom: 8px;
  display: grid;
  width: 29px;
  height: 29px;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 9px;
  color: white;
  background: rgba(24, 48, 45, 0.88);
  box-shadow: 0 7px 18px rgba(8, 24, 21, 0.3);
  backdrop-filter: blur(8px);
}

.ai-book-badge > span,
.ask-book-mark > span,
.button-ai-mark > span {
  position: absolute;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.65;
}

.ai-book-badge > span:nth-child(1), .ask-book-mark > span:nth-child(1) { top: 5px; left: 6px; }
.ai-book-badge > span:nth-child(2), .ask-book-mark > span:nth-child(2) { top: 5px; right: 6px; }
.ai-book-badge > span:nth-child(3), .ask-book-mark > span:nth-child(3) { top: 9px; left: 13px; }
.ai-book-badge b { margin-top: 7px; font-size: 8px; letter-spacing: -0.04em; }

.reading-cover,
.recently-read-cover,
.best-book-cover { position: relative; }

.book-card-meta {
  padding-top: 10px;
}

.category-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  color: var(--category-color, var(--rust-dark));
  font-size: 7px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.category-tag::before {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
  content: '';
}

.book-card h3 {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  font-family: var(--display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.018em;
  line-height: 1.24;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.book-author {
  overflow: hidden;
  margin: 3px 0 0;
  color: #77817e;
  font-size: 8px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.book-rating {
  display: flex;
  align-items: center;
  gap: 3px;
  min-height: 17px;
  margin-top: 4px;
  color: var(--gold);
  font-size: 8px;
}

.book-rating .muted-star {
  color: #d8d5cd;
}

.book-rating span:last-child {
  margin-left: 2px;
  color: #8b9491;
  font-size: 7px;
}

.book-grid.is-list {
  display: block;
}

.book-grid.is-list .book-card {
  display: grid;
  grid-template-columns: 52px minmax(0, 1.4fr) minmax(130px, 0.75fr) 110px;
  align-items: center;
  gap: 17px;
  width: 100%;
  padding: 10px 7px;
  border-bottom: 1px solid var(--line);
}

.book-grid.is-list .book-cover-wrap {
  width: 48px;
  border-radius: 2px;
  box-shadow: 0 4px 8px rgba(23, 39, 37, 0.13);
}

.book-grid.is-list .book-status {
  display: none;
}

.book-grid.is-list .book-card-meta {
  display: contents;
}

.book-grid.is-list .category-tag {
  grid-column: 3;
  grid-row: 1;
  margin: 0;
}

.book-grid.is-list .book-card h3 {
  grid-column: 2;
  grid-row: 1;
  -webkit-line-clamp: 1;
  font-size: 16px;
}

.book-grid.is-list .book-author {
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  margin-bottom: 6px;
  transform: translateY(10px);
  font-size: 10px;
}

.book-grid.is-list .book-rating {
  grid-column: 4;
  grid-row: 1;
  justify-self: end;
  font-size: 10px;
}

.book-grid.is-list .category-tag {
  font-size: 8px;
}

.load-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: min(310px, 100%);
  min-height: 48px;
  margin: 46px auto 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  background: transparent;
  font-size: 11px;
  font-weight: 750;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}

.load-more:hover {
  transform: translateY(-2px);
  background: var(--paper);
}

.load-more span {
  color: #89928f;
  font-weight: 500;
}

.load-more #load-more-label {
  color: inherit;
  font-weight: 750;
}

.infinite-spinner {
  display: none;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(23, 39, 37, 0.17);
  border-top-color: var(--rust);
  border-radius: 50%;
}

.load-more.is-loading {
  pointer-events: none;
}

.load-more.is-loading .infinite-spinner {
  display: block;
  animation: infinite-spin 700ms linear infinite;
}

@keyframes infinite-spin {
  to {
    transform: rotate(360deg);
  }
}

.empty-state {
  padding: 80px 20px;
  text-align: center;
}

.empty-icon {
  display: block;
  color: #a3aaa7;
  font-family: var(--display);
  font-size: 52px;
}

.empty-state h3 {
  margin: 10px 0 5px;
  font-family: var(--display);
  font-size: 29px;
  font-weight: 400;
}

.empty-state p {
  margin: 0 0 23px;
  color: var(--ink-soft);
  font-size: 12px;
}

.footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  padding: 45px clamp(24px, 7vw, 118px);
  color: rgba(255, 255, 255, 0.55);
  background: #102522;
}

.footer > div {
  display: flex;
  align-items: center;
  gap: 13px;
}

.brand-mark-light {
  border: 1px solid rgba(255, 255, 255, 0.15);
}

.footer p {
  margin: 0;
  font-family: var(--display);
  font-size: 12px;
  font-style: italic;
}

#footer-meta {
  font-family: var(--sans);
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.book-dialog {
  width: min(940px, calc(100vw - 32px));
  max-height: min(820px, calc(100vh - 40px));
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 23px;
  color: var(--ink);
  background: var(--surface);
  box-shadow: 0 45px 100px rgba(11, 24, 21, 0.42);
}

.book-dialog::backdrop {
  background: rgba(11, 26, 23, 0.72);
  backdrop-filter: blur(7px);
}

.dialog-close {
  position: absolute;
  z-index: 5;
  top: 16px;
  right: 16px;
  display: grid;
  width: 38px;
  height: 38px;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--ink);
  background: rgba(255, 254, 250, 0.88);
  box-shadow: 0 6px 18px rgba(23, 39, 37, 0.12);
  cursor: pointer;
  backdrop-filter: blur(8px);
}

.dialog-close svg {
  width: 17px;
  height: 17px;
}

.dialog-content {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  max-height: min(820px, calc(100vh - 40px));
  overflow: auto;
  border-radius: inherit;
}

.dialog-visual {
  position: sticky;
  top: 0;
  display: grid;
  min-height: 650px;
  padding: 65px 54px;
  place-items: start center;
  overflow: hidden;
  isolation: isolate;
  background: var(--forest);
}

.dialog-visual::before {
  position: absolute;
  z-index: 0;
  inset: -34px;
  background-image: var(--dialog-cover);
  background-position: center;
  background-size: cover;
  content: '';
  filter: blur(28px) saturate(1.25);
  opacity: .52;
  transform: scale(1.14);
}

.dialog-visual::after { position: absolute; z-index: 1; inset: 0; background: linear-gradient(145deg, color-mix(in srgb, var(--dialog-color) 28%, rgba(14,35,32,.58)), rgba(10,27,24,.48)); content: ''; }

.dialog-cover {
  position: relative;
  z-index: 3;
  width: min(225px, 100%);
  aspect-ratio: 0.655;
  overflow: hidden;
  border-radius: 3px 9px 9px 3px;
  background: var(--paper-deep);
  box-shadow: 0 27px 50px rgba(0, 0, 0, 0.4);
  transform: rotate(-1.8deg);
}

.dialog-cover img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  opacity: 1;
  object-fit: cover;
}

.dialog-copy {
  padding: 64px 58px 55px;
}

.dialog-heading-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.dialog-action-buttons {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dialog-share-button {
  min-height: 38px;
  padding-inline: 16px;
  color: var(--forest);
  background: rgba(255, 255, 255, 0.72);
}

.dialog-ask-button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding-inline: 14px;
}

.button-ai-mark {
  position: relative;
  display: inline-grid;
  width: 17px;
  height: 17px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 5px;
  font-size: 0;
}

.button-ai-mark b { font-size: 6px; }
.button-ai-mark > span:nth-child(1) { top: 2px; left: 3px; }
.button-ai-mark > span:nth-child(2) { top: 2px; right: 3px; }
.button-ai-mark > span:nth-child(3) { top: 5px; left: 7px; }

.dialog-shelf {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 27px;
  padding: 0 10px;
  border-radius: 999px;
  color: var(--rust-dark);
  background: rgba(189, 98, 72, 0.09);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.dialog-shelf::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--rust);
  content: '';
}

.dialog-copy h2 {
  margin: 20px 0 8px;
  font-family: var(--display);
  font-size: clamp(35px, 4vw, 51px);
  font-weight: 400;
  letter-spacing: -0.045em;
  line-height: 1.02;
}

.dialog-author {
  margin: 0;
  color: var(--ink-soft);
  font-size: 14px;
}

.dialog-author-button {
  color: var(--ink-soft);
}

.dialog-ratings {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin: 22px 0;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.rating-block {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--gold);
  font-size: 13px;
}

.rating-block small {
  color: #87908d;
  font-size: 9px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dialog-description {
  margin: 0;
  color: #52615d;
  font-family: var(--display);
  font-size: 15px;
  line-height: 1.7;
}

.ask-book-section {
  padding: 21px;
  border: 1px solid rgba(24, 48, 45, 0.12);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(232, 238, 231, 0.8), rgba(255, 255, 255, 0.7));
  scroll-margin-top: 20px;
}

.ask-book-heading {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ask-book-mark {
  position: relative;
  display: grid;
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  place-items: center;
  overflow: hidden;
  border-radius: 12px;
  color: white;
  background: var(--forest);
}

.ask-book-mark b { margin-top: 8px; font-size: 10px; }
.ask-book-heading .ask-book-eyebrow { color: #73807c; font-size: 7px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.ask-book-heading h3 { margin: 3px 0 0; color: var(--ink); font-family: var(--display); font-size: 22px; font-weight: 500; letter-spacing: -.02em; text-transform: none; }
.ask-book-intro { margin: 13px 0; color: #61706b; font-size: 11px; line-height: 1.55; }
.ask-suggestions { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.ask-suggestions button { padding: 7px 10px; border: 1px solid rgba(24, 48, 45, .14); border-radius: 999px; color: var(--forest); background: rgba(255,255,255,.64); font-size: 8px; font-weight: 700; cursor: pointer; }
.ask-suggestions button:hover { border-color: var(--forest); background: white; }
.ask-book-form textarea { width: 100%; min-height: 82px; padding: 13px; resize: vertical; border: 1px solid rgba(24, 48, 45, .16); border-radius: 11px; color: var(--ink); background: rgba(255,255,255,.88); font: 12px/1.5 var(--sans); outline: none; }
.ask-book-form textarea:focus { border-color: var(--forest); box-shadow: 0 0 0 3px rgba(24,48,45,.08); }
.ask-book-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 9px; }
.ask-book-footer > span { color: #77847f; font-size: 8px; line-height: 1.4; }
.ask-book-footer .button { flex: 0 0 auto; min-height: 36px; padding-inline: 14px; }
.ask-book-answer { margin-top: 15px; padding: 15px 16px; border-left: 3px solid var(--rust); border-radius: 3px 10px 10px 3px; color: #42514d; background: rgba(255,255,255,.82); font-family: var(--display); font-size: 14px; line-height: 1.65; white-space: pre-wrap; }
.ask-book-answer.is-loading { color: #78837f; font-family: var(--sans); font-size: 10px; }

.dialog-section {
  margin-top: 28px;
}

.dialog-section h3 {
  margin: 0 0 12px;
  color: #687470;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.dialog-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.dialog-topic {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink-soft);
  background: transparent;
  font-size: 9px;
  font-weight: 650;
  cursor: pointer;
}

.dialog-topic:hover {
  border-color: var(--rust);
  color: var(--rust-dark);
}

.metadata-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.metadata-item {
  padding: 12px 14px;
  border-radius: 10px;
  background: var(--paper);
}

.metadata-item span {
  display: block;
  color: #88918e;
  font-size: 8px;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.metadata-item strong {
  display: block;
  margin-top: 4px;
  overflow: hidden;
  font-family: var(--display);
  font-size: 13px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dialog-review {
  margin: 0;
  padding: 18px 20px;
  border-left: 3px solid var(--rust);
  color: #56635f;
  background: rgba(189, 98, 72, 0.055);
  font-family: var(--display);
  font-size: 14px;
  font-style: italic;
  line-height: 1.65;
}

.toast {
  position: fixed;
  z-index: 80;
  right: 24px;
  bottom: 24px;
  max-width: min(360px, calc(100vw - 48px));
  padding: 13px 17px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  color: white;
  background: rgba(24, 48, 45, 0.94);
  box-shadow: var(--shadow-md);
  font-size: 11px;
  transform: translateY(30px);
  opacity: 0;
  pointer-events: none;
  transition: transform 200ms ease, opacity 200ms ease;
  backdrop-filter: blur(10px);
}

.toast.is-visible {
  transform: translateY(0);
  opacity: 1;
}

@media (max-width: 1220px) {
  .hero {
    grid-template-columns: 1.15fr 0.85fr;
  }

  .cover-stage {
    left: -4%;
  }

  .book-grid {
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  }

  .topic-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .author-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .best-books-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    row-gap: 28px;
  }

  .recently-read-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    row-gap: 28px;
  }

}

@media (max-width: 960px) {
  .topbar {
    grid-template-columns: 1fr auto;
  }

  .desktop-nav {
    display: none;
  }

  .hero {
    grid-template-columns: 1fr;
    padding-bottom: 36px;
  }

  .hero-copy {
    max-width: 720px;
  }

  .hero-visual {
    min-height: 390px;
    margin-top: 25px;
  }

  .cover-stage {
    inset: 0 8% 0 8%;
  }

  .hero-book {
    width: 175px;
  }

  .reading-strip {
    grid-template-columns: 1fr;
  }

  .recently-read-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .recommendation-grid {
    grid-template-columns: 1fr;
  }

  .recommendation-card {
    min-height: 300px;
  }

  .stack-book:nth-child(1) {
    left: 18%;
  }

  .stack-book:nth-child(2) {
    left: 39%;
  }

  .stack-book:nth-child(3) {
    left: 60%;
  }

  .library-layout {
    grid-template-columns: 1fr;
  }

  .mobile-filter-button,
  .filter-close {
    display: inline-flex;
  }

  .filter-panel {
    position: fixed;
    z-index: 60;
    top: 0;
    bottom: 0;
    left: 0;
    width: min(365px, calc(100vw - 36px));
    padding: 27px 27px 40px;
    overflow-y: auto;
    background: var(--surface);
    box-shadow: 24px 0 60px rgba(23, 39, 37, 0.25);
    transform: translateX(-105%);
    transition: transform 220ms ease;
  }

  .filter-panel.is-open {
    transform: translateX(0);
  }

  .filter-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
  }

  .filter-panel-header h3 {
    margin: 1px 0 0;
    font-family: var(--display);
    font-size: 30px;
    font-weight: 400;
  }

  .filter-kicker {
    color: var(--rust);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.15em;
    text-transform: uppercase;
  }

  .icon-button {
    display: grid;
    width: 38px;
    height: 38px;
    padding: 0;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 50%;
    background: transparent;
  }

  .icon-button svg {
    width: 16px;
    height: 16px;
  }

  .filter-backdrop {
    position: fixed;
    z-index: 55;
    inset: 0;
    display: block;
    background: rgba(17, 35, 32, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 200ms ease;
  }

  .filter-backdrop.is-open {
    opacity: 1;
    pointer-events: auto;
  }

  .dialog-content {
    grid-template-columns: 285px minmax(0, 1fr);
  }

  .dialog-copy {
    padding: 60px 38px 48px;
  }
}

@media (max-width: 720px) {
  .topbar {
    min-height: 68px;
    padding: 10px 18px;
  }

  .brand-copy small {
    display: none;
  }

  .surprise-button {
    min-height: 40px;
    padding: 0 13px;
    font-size: 11px;
  }

  .hero {
    min-height: auto;
    padding: 72px 22px 29px;
  }

  .hero h1 {
    font-size: clamp(49px, 14vw, 68px);
  }

  .hero h1 br {
    display: none;
  }

  .hero-intro {
    margin-top: 22px;
    font-size: 16px;
  }

  .library-search {
    min-height: 56px;
    margin-bottom: 15px;
  }

  .library-search kbd {
    display: none;
  }

  .hero-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .hero-stat {
    min-width: 0;
    padding: 1px 14px;
  }

  .hero-stat strong {
    font-size: 23px;
  }

  .hero-stat span {
    font-size: 7px;
  }

  .hero-visual {
    min-height: 300px;
    margin-top: 20px;
  }

  .cover-stage {
    inset: 0 -8% 0 0;
  }

  .hero-book {
    width: 125px;
  }

  .hero-book:nth-child(1) {
    left: 31%;
  }

  .hero-book:nth-child(2) {
    top: 29%;
    left: 3%;
  }

  .hero-book:nth-child(3) {
    top: 25%;
    left: 59%;
  }

  .hero-note,
  .orb-one {
    display: none;
  }

  .section,
  .library-section {
    padding: 68px 20px;
  }

  .section-heading,
  .library-heading {
    align-items: flex-start;
  }

  .section-heading .text-button {
    margin-top: 23px;
  }

  .section h2,
  .library-section h2 {
    font-size: 39px;
  }

  .currently-reading {
    padding-top: 62px;
  }

  .recently-read-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px 17px;
  }

  .five-star-heading {
    display: block;
  }

  .five-star-heading .text-button {
    margin-top: 12px;
  }

  .best-books-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px 17px;
  }

  .best-book-copy strong {
    font-size: 17px;
  }

  .reading-card {
    grid-template-columns: 94px minmax(0, 1fr);
    min-height: 175px;
    gap: 18px;
    padding: 17px;
  }

  .reading-cover {
    width: 94px;
  }

  .reading-card-copy {
    padding-top: 1px;
  }

  .reading-card h3 {
    font-size: 20px;
  }

  .reading-description {
    display: none;
  }

  .topic-heading {
    display: block;
  }

  .topic-heading .text-button {
    margin-top: 12px;
  }

  .topic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .author-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .topic-card {
    min-height: 252px;
    padding: 19px;
  }

  .topic-card h3 {
    margin-top: 0;
    font-size: 21px;
  }

  .topic-card .topic-samples {
    height: 100px;
    margin-bottom: 12px;
  }

  .topic-card .topic-sample {
    width: 62px;
  }

  .recommendation-card {
    min-height: 280px;
    padding: 23px;
  }

  .recommendation-stack {
    top: 107px;
  }

  .stack-book {
    width: 98px;
  }

  .stack-book:nth-child(1) {
    left: 7%;
  }

  .stack-book:nth-child(2) {
    left: 35%;
  }

  .stack-book:nth-child(3) {
    left: 63%;
  }

  .library-section {
    padding-top: 74px;
  }

  .library-heading {
    display: block;
  }

  .quick-filter-bar {
    display: block;
    padding: 13px;
    overflow: hidden;
  }

  .quick-filter-group {
    display: block;
    margin-bottom: 12px;
  }

  .quick-filter-label {
    display: block;
    margin-bottom: 7px;
  }

  .quick-filter-chips {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 3px;
    scrollbar-width: none;
  }

  .quick-filter-chips::-webkit-scrollbar {
    display: none;
  }

  .quick-results-count {
    display: flex;
    align-items: baseline;
    gap: 7px;
    padding: 11px 0 0;
    border-top: 1px solid var(--line);
    border-left: 0;
    text-align: left;
  }

  .quick-results-count strong,
  .quick-results-count span {
    display: inline;
    margin: 0;
  }

  .library-actions {
    flex-wrap: wrap;
    margin-top: 23px;
  }

  .share-library-button {
    order: 2;
  }

  .sort-control {
    flex: 1;
  }

  .sort-control select {
    width: 100%;
    max-width: none;
  }

  .view-toggle {
    display: none;
  }

  .book-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 30px 17px;
  }

  .book-card h3 {
    font-size: 16px;
  }

  .book-grid.is-list .book-card {
    grid-template-columns: 48px minmax(0, 1fr) 90px;
  }

  .book-grid.is-list .category-tag {
    grid-column: 3;
  }

  .book-grid.is-list .book-rating {
    display: none;
  }

  .results-meta #results-context {
    display: none;
  }

  .footer {
    display: grid;
    padding: 35px 22px;
  }

  .book-dialog {
    width: 100vw;
    max-width: 100vw;
    max-height: 100vh;
    margin: 0;
    border-radius: 0;
  }

  .dialog-content {
    display: block;
    max-height: 100vh;
  }

  .dialog-visual {
    position: relative;
    min-height: 405px;
    padding: 52px 80px;
  }

  .dialog-cover {
    width: 190px;
  }

  .dialog-copy {
    padding: 37px 24px 55px;
  }

  .dialog-copy h2 {
    font-size: 38px;
  }

  .dialog-heading-actions {
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
