:root {
  --bg: #f6f1ea;
  --bg-deep: #eee5d8;
  --surface: rgba(255, 252, 247, 0.84);
  --surface-strong: rgba(255, 255, 255, 0.96);
  --surface-soft: rgba(250, 245, 238, 0.86);
  --ink: #201914;
  --muted: #6e6257;
  --accent: #b56034;
  --accent-strong: #7f391b;
  --accent-soft: rgba(181, 96, 52, 0.12);
  --line: rgba(44, 31, 24, 0.08);
  --line-strong: rgba(44, 31, 24, 0.14);
  --shadow-soft: 0 18px 44px rgba(53, 34, 19, 0.08);
  --shadow: 0 34px 84px rgba(53, 34, 19, 0.12);
  --radius-2xl: 36px;
  --radius-xl: 28px;
  --radius-lg: 22px;
  --radius-md: 16px;
}

* {
  box-sizing: border-box;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  position: relative;
  color: var(--ink);
  font-family: var(--font-ui), "Segoe UI", sans-serif;
  font-size: 15px;
  background:
    radial-gradient(circle at top left, rgba(181, 96, 52, 0.16), transparent 30%),
    radial-gradient(circle at 88% 12%, rgba(79, 120, 133, 0.1), transparent 22%),
    linear-gradient(180deg, #fbf8f3 0%, var(--bg) 46%, var(--bg-deep) 100%);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.36;
  background:
    linear-gradient(to right, rgba(89, 69, 56, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(89, 69, 56, 0.03) 1px, transparent 1px);
  background-size: 36px 36px;
}

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

img {
  display: block;
  max-width: 100%;
}

code {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(44, 31, 24, 0.08);
  background: rgba(255, 255, 255, 0.72);
  font-size: 0.92rem;
}

.site-shell {
  width: min(1480px, calc(100% - 24px));
  margin: 0 auto;
  padding: 18px 0 32px;
}

.site-header,
.hero,
.catalog-card,
.book-page--themed,
.reader-page,
.detail-panel,
.empty-state {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.site-header::after,
.hero::after,
.catalog-card::after,
.book-page--themed::after,
.reader-page::after,
.detail-panel::after,
.empty-state::after {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.32), transparent 42%);
}

.site-header > *,
.hero > *,
.catalog-card > *,
.book-page--themed > *,
.reader-page > *,
.detail-panel > *,
.empty-state > * {
  position: relative;
  z-index: 1;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.3rem;
  padding: 1rem 1.15rem;
  border-radius: 999px;
  background: rgba(255, 252, 247, 0.82);
}

.site-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  font-family: var(--font-display), Georgia, serif;
  font-size: 1.28rem;
}

.site-brand span {
  color: var(--muted);
}

.site-brand strong {
  font-weight: 700;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: var(--muted);
}

.site-nav a,
.subtle-link {
  transition: color 0.18s ease, opacity 0.18s ease;
}

.site-nav a:hover,
.site-brand:hover,
.subtle-link:hover,
.subtle-link:focus-visible {
  color: var(--accent-strong);
}

.site-main {
  padding-bottom: 1.5rem;
}

.site-footer {
  margin-top: 1.7rem;
  padding: 0.5rem 0 1rem;
  color: var(--muted);
  text-align: center;
}

.page-stack,
.catalog-section,
.book-page,
.featured-comments,
.reader-settings,
.reader-settings-panel,
.detail-panel,
.comment-panel,
.comment-list,
.comment-groups,
.chapters-block,
.chapter-list__controls,
.chapter-list,
.section-heading,
.description-disclosure,
.genre-disclosure,
.comment-form,
.comment-form__actions,
.comment-composer,
.comment-composer__profile,
.reader-control-group,
.reader-page__top {
  display: grid;
  gap: 1rem;
}

.hero,
.detail-panel,
.empty-state,
.reader-page,
.book-page--themed,
.book-hero {
  border-radius: var(--radius-2xl);
}

.hero {
  padding: clamp(1.4rem, 3.4vw, 2.6rem);
}

.hero--home {
  gap: 1.4rem;
}

.hero__copy {
  display: grid;
  gap: 1rem;
}

.hero__copy h1,
.section-heading h1,
.section-heading h2,
.book-hero h1,
.reader-page h1,
.empty-state h3,
.chapters-block__heading h3,
.comment-group__heading h3,
.catalog-card__heading h2 {
  margin: 0;
  font-family: var(--font-display), Georgia, serif;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 0.95;
}

.hero__copy h1 {
  font-size: clamp(2.2rem, 6vw, 4.5rem);
  max-width: 12ch;
}

.hero__copy p,
.hero__caption,
.book-description,
.muted,
.detail-panel p,
.legal-panel p,
.catalog-card__description,
.reader-meta,
.hero-callout p,
.comment-empty {
  margin: 0;
  color: var(--muted);
  line-height: 1.7;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.hero__secondary-link {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
}

.hero__meta {
  display: grid;
  gap: 0.9rem;
  padding: 1.15rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.76), rgba(249, 244, 236, 0.74)),
    rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}

.hero-stat {
  display: grid;
  gap: 0.18rem;
}

.hero-stat strong {
  font-size: 1.08rem;
}

.hero__caption {
  padding-top: 0.2rem;
  border-top: 1px solid rgba(44, 31, 24, 0.08);
}

.eyebrow {
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.catalog-grid {
  display: grid;
  gap: 1rem;
}

.catalog-card {
  padding: 0.88rem;
  border-radius: var(--radius-xl);
  align-content: start;
}

.catalog-card__cover-wrap,
.book-hero__cover {
  overflow: hidden;
  border-radius: calc(var(--radius-xl) - 8px);
  background:
    linear-gradient(135deg, rgba(32, 25, 20, 0.88), rgba(108, 60, 36, 0.84)),
    #38241b;
  box-shadow: 0 24px 48px rgba(36, 24, 18, 0.18);
  justify-self: center;
}

.catalog-card__cover-wrap {
  aspect-ratio: 3 / 4;
  width: min(100%, 204px);
}

.book-hero__cover-stack {
  display: grid;
  gap: 0.75rem;
  width: min(100%, 320px);
  justify-self: center;
}

.book-hero__facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 0.7rem;
}

.book-hero__fact {
  display: grid;
  gap: 0.28rem;
  padding: 0.75rem 0.85rem;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--theme-accent, var(--accent)) 14%, var(--line));
  background: rgba(255, 251, 245, 0.88);
}

.book-hero__fact span {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.book-hero__fact strong,
.book-hero__fact-link {
  color: var(--ink);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.45;
}

.book-hero__fact-link {
  text-decoration: none;
}

.book-hero__fact-link:hover {
  color: var(--theme-accent, var(--accent-strong));
}

.book-hero__cover {
  aspect-ratio: 3 / 4;
  width: 100%;
}

.book-hero__cover-cta {
  width: 100%;
}

.book-cover {
  position: relative;
}

.catalog-card__cover,
.book-hero__cover-image,
.catalog-card__cover--fallback,
.book-hero__cover-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.catalog-card__cover--fallback,
.book-hero__cover-fallback {
  display: grid;
  place-items: center;
}

.cover-poster {
  padding: 1.2rem;
  color: #fff7f0;
  text-align: center;
  font-family: var(--font-display), Georgia, serif;
  font-size: clamp(1.4rem, 3.4vw, 2rem);
  line-height: 1.04;
  background:
    linear-gradient(180deg, rgba(15, 12, 10, 0.18), rgba(15, 12, 10, 0.42)),
    linear-gradient(135deg, #2d1f18, #8e5837 58%, #d6a16d);
}

.catalog-card__body {
  display: grid;
  gap: 0.8rem;
}

.catalog-card__heading {
  display: grid;
  gap: 0.45rem;
}

.catalog-card__heading h2 {
  font-size: clamp(1.4rem, 2vw, 1.72rem);
}

.catalog-card__rating-grid {
  gap: 0.55rem;
}

.catalog-card__overview {
  display: grid;
  gap: 0.7rem;
}

.catalog-card__praise {
  height: 100%;
  align-content: start;
}

.catalog-card__actions,
.book-hero__actions,
.reader-actions,
.chapters-block__actions,
.comment-card__meta,
.reader-nav,
.reader-segmented,
.reader-inline-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.source-rating-list {
  display: grid;
  gap: 0.65rem;
}

.source-rating-list--desktop-inline {
  display: none;
}

.source-rating-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.72rem 0.84rem;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--theme-accent, var(--accent)) 14%, var(--line));
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(249, 244, 237, 0.78)),
    rgba(255, 255, 255, 0.7);
}

.source-rating-row.is-primary {
  border-color: color-mix(in srgb, var(--theme-accent, var(--accent)) 34%, transparent);
  box-shadow:
    inset 3px 0 0 var(--theme-accent, var(--accent)),
    0 12px 26px rgba(53, 34, 19, 0.08);
}

.source-rating-row__label,
.source-rating-row__value {
  display: grid;
  gap: 0.18rem;
}

.source-rating-row__label span,
.source-rating-row__value strong {
  font-weight: 700;
}

.source-rating-row__value {
  justify-items: end;
  text-align: right;
}

.source-rating-row__value span {
  color: var(--muted);
  font-size: 0.76rem;
}

.book-rating-summary {
  display: grid;
  gap: 0.7rem;
  padding: 0.95rem 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid color-mix(in srgb, var(--theme-accent, var(--accent)) 18%, var(--line));
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--theme-accent, var(--accent)) 10%, transparent), transparent 74%),
    rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 34px rgba(53, 34, 19, 0.08);
}

.book-rating-summary--catalog {
  gap: 0.55rem;
}

.book-rating-summary__score-block,
.book-rating-summary__meta,
.book-rating-widget,
.book-rating-widget__header {
  display: grid;
  gap: 0.25rem;
}

.book-rating-summary__score-line {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
}

.book-rating-summary__pills {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.book-rating-summary__eyebrow,
.book-rating-widget__eyebrow {
  color: var(--theme-accent, var(--accent-strong));
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.book-rating-summary__score {
  font-family: var(--font-display), Georgia, serif;
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 700;
  line-height: 0.9;
  letter-spacing: -0.04em;
}

.book-rating-summary__chapters {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.34rem 0.72rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--theme-accent, var(--accent)) 12%, rgba(255, 255, 255, 0.88));
  color: var(--theme-accent, var(--accent-strong));
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.book-rating-summary__status {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.34rem 0.72rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--theme-accent, var(--accent)) 10%, rgba(255, 255, 255, 0.92));
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
  border: 1px solid color-mix(in srgb, var(--theme-accent, var(--accent)) 12%, transparent);
}

.book-rating-summary__meta span {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.55;
}

.book-rating-summary--mobile {
  display: grid;
}

.book-rating-summary--desktop {
  display: none;
}

.book-rating-widget {
  padding: 0.95rem 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid color-mix(in srgb, var(--theme-accent, var(--accent)) 14%, var(--line));
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(249, 244, 237, 0.84)),
    rgba(255, 255, 255, 0.86);
}

.book-rating-widget__header strong {
  font-size: 1rem;
}

.book-rating-widget__grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 0.55rem;
}

.book-rating-widget__button {
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--theme-accent, var(--accent)) 18%, var(--line));
  background: rgba(255, 255, 255, 0.92);
  color: var(--text);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  transition:
    transform 180ms ease,
    border-color 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.book-rating-widget__button:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--theme-accent, var(--accent)) 34%, transparent);
  box-shadow: 0 10px 20px rgba(53, 34, 19, 0.08);
}

.book-rating-widget__button.is-active {
  color: #fff8f1;
  border-color: transparent;
  background: linear-gradient(135deg, var(--theme-accent, var(--accent)), var(--accent-strong));
  box-shadow: 0 14px 24px rgba(127, 57, 27, 0.2);
}

.book-rating-widget__button:disabled {
  cursor: default;
  opacity: 0.72;
  transform: none;
}

.book-rating-widget__error {
  margin: 0;
  color: #a53b25;
  font-size: 0.84rem;
}

.description-disclosure__summary,
.genre-disclosure__summary,
.comment-group__summary,
.comment-card__summary,
.featured-comments__summary,
.reader-settings-toggle {
  list-style: none;
  cursor: pointer;
}

.description-disclosure__summary::-webkit-details-marker,
.genre-disclosure__summary::-webkit-details-marker,
.comment-group__summary::-webkit-details-marker,
.comment-card__summary::-webkit-details-marker,
.featured-comments__summary::-webkit-details-marker,
.reader-settings-toggle::-webkit-details-marker {
  display: none;
}

.description-disclosure__action,
.genre-disclosure__summary,
.genre-disclosure__action,
.comment-group__summary,
.comment-card__summary-action,
.featured-comments__action {
  color: var(--theme-accent, var(--accent-strong));
  font-size: 0.84rem;
  font-weight: 700;
}

.description-disclosure__summary {
  display: grid;
  gap: 0.6rem;
}

.genre-disclosure__summary {
  display: inline-flex;
  align-items: center;
}

.description-disclosure__body {
  padding-top: 0.15rem;
}

.description-disclosure--expand-only[open] > .description-disclosure__summary,
.genre-disclosure__details--expand-only[open] > .genre-disclosure__summary,
.featured-comments__details--expand-only[open] > .featured-comments__summary,
.comment-card__details--expand-only[open] > .comment-card__summary,
.comment-group__details--expand-only[open] > .comment-group__summary {
  display: none;
}

.description-disclosure--expand-only[open] > .description-disclosure__body,
.featured-comments__details--expand-only[open] > .featured-comments__body,
.comment-card__details--expand-only[open] > .comment-card__body {
  padding-top: 0;
}

.genre-disclosure__details--expand-only[open],
.featured-comments__details--expand-only[open],
.comment-card__details--expand-only[open],
.comment-group__details--expand-only[open] {
  gap: 0.2rem;
}

.description-disclosure__action--open,
.genre-disclosure__action--open,
.featured-comments__action--open,
.comment-card__summary-action--open {
  display: none;
}

.description-disclosure[open] .description-disclosure__action--closed,
.genre-disclosure__details[open] .genre-disclosure__action--closed,
.featured-comments__details[open] .featured-comments__action--closed,
.comment-card__details[open] .comment-card__summary-action--closed,
.comment-card__details[open] .comment-card__summary-text {
  display: none;
}

.description-disclosure[open] .description-disclosure__action--open,
.genre-disclosure__details[open] .genre-disclosure__action--open,
.featured-comments__details[open] .featured-comments__action--open,
.comment-card__details[open] .comment-card__summary-action--open {
  display: inline;
}

.genre-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.genre-chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0.42rem 0.82rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--theme-accent, var(--accent)) 18%, var(--line));
  background: rgba(255, 255, 255, 0.72);
  color: var(--theme-accent, var(--accent-strong));
  font-size: 0.88rem;
  font-weight: 700;
}

.genre-chip-list--expanded {
  padding-top: 0.2rem;
}

.primary-link,
.ghost-button,
.reader-chip,
.vote-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.68rem 0.94rem;
  border: 1px solid transparent;
  border-radius: 999px;
  cursor: pointer;
  font: inherit;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease;
}

.primary-link {
  color: #fff8f1;
  background: linear-gradient(135deg, var(--theme-accent, var(--accent)), var(--accent-strong));
  box-shadow: 0 16px 28px rgba(127, 57, 27, 0.22);
}

.primary-link:hover,
.ghost-button:hover,
.reader-chip:hover,
.vote-button:hover {
  transform: translateY(-1px);
}

.ghost-button,
.reader-chip,
.vote-button,
.catalog-card__secondary-link {
  color: var(--ink);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
}

.catalog-card__secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.68rem 0.94rem;
  border-radius: 999px;
  font-weight: 700;
  background:
    linear-gradient(135deg, rgba(255, 252, 247, 0.98), rgba(246, 237, 228, 0.94));
}

.subtle-link {
  color: var(--ink);
  font-weight: 700;
}

.ghost-button--disabled,
.ghost-button:disabled,
.primary-link:disabled,
.vote-button:disabled {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
  transform: none;
  box-shadow: none;
}

.book-page--themed {
  display: grid;
  gap: 1.2rem;
  padding: 1rem;
  border-color: var(--theme-border, var(--line));
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.58), transparent 28%),
    var(--theme-glow, radial-gradient(circle at top left, rgba(181, 96, 52, 0.16), transparent 38%)),
    linear-gradient(180deg, rgba(255, 255, 255, 0.36), rgba(255, 255, 255, 0.12));
}

.book-page__glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 16% 16%, rgba(255, 255, 255, 0.22), transparent 20%),
    radial-gradient(circle at bottom right, color-mix(in srgb, var(--theme-accent, var(--accent)) 12%, transparent), transparent 28%);
}

.book-hero {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--theme-border, var(--line));
  background:
    var(--theme-glow, radial-gradient(circle at top left, rgba(181, 96, 52, 0.16), transparent 40%)),
    var(--theme-wash, linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(249, 244, 236, 0.82)));
}

.book-hero__content,
.book-hero__composition,
.book-hero__story,
.book-hero__aside {
  display: grid;
  gap: 1rem;
}

.book-hero__story,
.book-hero__aside,
.chapters-block,
.comment-composer,
.comment-group,
.reader-settings-panel {
  padding: 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid color-mix(in srgb, var(--theme-accent, var(--accent)) 12%, var(--line));
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.84), rgba(249, 244, 237, 0.74)),
    rgba(255, 255, 255, 0.72);
  box-shadow: var(--shadow-soft);
}

.book-description {
  font-size: 0.94rem;
  line-height: 1.58;
}

.description-disclosure[open] .description-disclosure__preview {
  display: none;
}

.book-hero__translation-status {
  margin: 0.35rem 0 0;
  color: color-mix(in srgb, var(--theme-accent, var(--accent-strong)) 82%, var(--ink));
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.4;
}

.featured-comments__title,
.hero-callout__label {
  color: var(--theme-accent, var(--accent-strong));
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.featured-comments__list {
  display: grid;
  gap: 0.7rem;
}

.featured-comments__item {
  padding: 0.82rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--theme-accent, var(--accent)) 14%, var(--line));
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--theme-accent, var(--accent)) 8%, transparent), transparent 78%),
    rgba(255, 255, 255, 0.8);
}

.featured-comments__item--compact {
  padding: 0.8rem 0.9rem;
}

.featured-comments__details {
  display: grid;
  gap: 0.55rem;
}

.featured-comments__summary {
  display: grid;
  gap: 0.45rem;
}

.featured-comments__body {
  margin: 0;
  line-height: 1.7;
}

.featured-comments__meta {
  display: grid;
  gap: 0.18rem;
}

.featured-comments__meta span {
  color: var(--muted);
  font-size: 0.76rem;
}

.hero-callout {
  display: grid;
  gap: 0.45rem;
  padding: 0.78rem 0.9rem;
  border-radius: var(--radius-md);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--theme-accent, var(--accent)) 14%, transparent), transparent 72%),
    rgba(255, 255, 255, 0.84);
}

.chapters-block__title-row,
.comment-card__top,
.comment-group__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.chapter-list__item,
.comment-card {
  display: grid;
  gap: 0.75rem;
  padding: 0.82rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid rgba(44, 31, 24, 0.08);
  background: rgba(255, 255, 255, 0.82);
}

.chapter-list__item {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.chapter-list__item:hover {
  border-color: color-mix(in srgb, var(--theme-accent, var(--accent)) 28%, transparent);
  box-shadow: var(--shadow-soft);
}

.chapter-list__item span:last-child,
.comment-card__top span {
  color: var(--muted);
  font-size: 0.78rem;
  text-align: right;
}

.chapter-list__pager {
  align-items: center;
  justify-content: space-between;
}

.comment-card__body,
.comment-card__summary-text {
  margin: 0;
  line-height: 1.68;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: pre-line;
}

.comment-card__details,
.comment-group__details {
  display: grid;
  gap: 0.7rem;
}

.comment-card__summary {
  display: grid;
  gap: 0.55rem;
}

.comment-card__body--source,
.comment-card__summary-text {
  font-size: 0.9rem;
}

.metric-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.46rem 0.72rem;
  border-radius: 999px;
  background: rgba(44, 31, 24, 0.06);
}

.metric-chip span {
  color: var(--muted);
  font-size: 0.76rem;
}

.vote-button.is-active {
  border-color: color-mix(in srgb, var(--theme-accent, var(--accent)) 38%, transparent);
  background: color-mix(in srgb, var(--theme-accent, var(--accent)) 10%, rgba(255, 255, 255, 0.9));
}

.vote-button--negative.is-active {
  border-color: rgba(138, 67, 83, 0.38);
  background: rgba(143, 67, 83, 0.08);
}

.scroll-to-top {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 40;
  width: 3rem;
  height: 3rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  background: rgba(255, 250, 244, 0.72);
  color: var(--ink);
  box-shadow: 0 18px 34px rgba(44, 31, 24, 0.18);
  backdrop-filter: blur(16px);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.scroll-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.scroll-to-top:hover {
  background: rgba(255, 252, 247, 0.9);
}

.scroll-to-top--reader {
  right: max(1rem, calc(env(safe-area-inset-right) + 1rem));
  bottom: max(4.75rem, calc(env(safe-area-inset-bottom) + 4.75rem));
  z-index: 120;
  width: 3.2rem;
  height: 3.2rem;
  border-color: color-mix(in srgb, var(--theme-accent, var(--accent)) 26%, rgba(255, 255, 255, 0.7));
  background: rgba(255, 248, 241, 0.94);
  box-shadow: 0 22px 38px rgba(44, 31, 24, 0.24);
}

.scroll-to-top--reader span {
  font-size: 1.2rem;
}

.reader-page {
  gap: 1.1rem;
  padding: 1rem;
}

.reader-page__top {
  padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--line);
}

.reader-nav,
.reader-settings-panel {
  width: min(100%, 78ch);
  margin: 0 auto;
}

.reader-settings {
  gap: 0.8rem;
}

.reader-settings-toggle {
  justify-self: start;
  gap: 0.5rem;
}

.reader-settings-toggle__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1rem;
  height: 1rem;
}

.reader-settings-toggle__icon::before {
  content: "\2699";
  font-size: 1rem;
  line-height: 1;
}

.reader-settings-panel[open] .reader-settings-toggle {
  margin-bottom: 0.15rem;
}

.reader-control-group__label {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.reader-inline-controls {
  align-items: center;
}

.reader-inline-value {
  min-width: 64px;
  text-align: center;
  font-weight: 700;
}

.reader-chip.is-active {
  color: #fff8f1;
  border-color: transparent;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
}

.reader-content {
  width: min(100%, 78ch);
  margin: 0 auto;
  padding: clamp(1rem, 2.4vw, 1.8rem);
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.9);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.9;
  font-size: clamp(0.95rem, calc(0.95rem * var(--reader-font-scale, 1)), 1.14rem);
  box-shadow: var(--shadow-soft);
}

.reader-content p {
  margin-top: 0;
  margin-bottom: 1rem;
}

.reader-content h1,
.reader-content h2,
.reader-content h3 {
  font-family: var(--font-display), Georgia, serif;
  line-height: 1.08;
}

.reader-content img {
  margin: 1.5rem auto;
  border-radius: 18px;
}

.source-comment-link {
  display: inline-flex;
  align-items: center;
}

.comment-list--nested {
  padding-top: 0.15rem;
}

.reader-page--theme-paper .reader-content {
  background: rgba(255, 255, 255, 0.92);
  color: #241c16;
}

.reader-page--theme-sepia .reader-content {
  background: rgba(249, 238, 219, 0.94);
  color: #34261f;
}

.reader-page--theme-night {
  color: #eadfce;
  background:
    radial-gradient(circle at top right, rgba(102, 130, 168, 0.14), transparent 26%),
    linear-gradient(180deg, rgba(19, 23, 30, 0.96), rgba(25, 29, 37, 0.94));
}

.reader-page--theme-night .reader-page__top,
.reader-page--theme-night .reader-settings-panel,
.reader-page--theme-night .reader-chip,
.reader-page--theme-night .ghost-button,
.reader-page--theme-night .reader-content,
.reader-page--theme-night .reader-nav {
  border-color: rgba(255, 255, 255, 0.08);
}

.reader-page--theme-night .reader-settings-panel,
.reader-page--theme-night .ghost-button,
.reader-page--theme-night .reader-chip {
  background: rgba(20, 24, 31, 0.84);
  color: #eadfce;
}

.reader-page--theme-night .reader-content {
  background: rgba(16, 19, 26, 0.96);
  color: #f0e7db;
}

.reader-page--theme-night .reader-meta,
.reader-page--theme-night .muted,
.reader-page--theme-night .reader-control-group__label,
.reader-page--theme-night .eyebrow {
  color: rgba(234, 223, 206, 0.7);
}

.reader-page--line-compact .reader-content {
  line-height: 1.68;
}

.reader-page--line-relaxed .reader-content {
  line-height: 1.9;
}

.reader-page--line-airy .reader-content {
  line-height: 2.08;
}

.legal-panel,
.empty-state {
  padding: 1.4rem;
}

.empty-state {
  text-align: center;
}

.narrow-page {
  max-width: 760px;
  margin: 0 auto;
}

.catalog-card--themed,
.book-hero--themed,
.detail-panel--themed {
  border-color: var(--theme-border, var(--line));
  background:
    var(--theme-glow, radial-gradient(circle at top left, rgba(181, 96, 52, 0.16), transparent 42%)),
    var(--theme-wash, linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(249, 244, 236, 0.82)));
}

@media (min-width: 720px) {
  .site-shell {
    width: min(1480px, calc(100% - 48px));
    padding-top: 28px;
  }

  .hero--home {
    grid-template-columns: minmax(0, 1.5fr) minmax(320px, 0.85fr);
    align-items: end;
  }

  .catalog-grid {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .catalog-card {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    min-height: 336px;
  }

  .catalog-card__cover-wrap {
    flex: 0 0 228px;
    width: 228px;
    max-width: 228px;
    justify-self: start;
  }

  .catalog-card__rating-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .catalog-card__body {
    flex: 1 1 auto;
    min-width: 0;
    height: 100%;
    grid-template-rows: minmax(102px, auto) minmax(150px, auto) minmax(92px, 1fr) auto;
    align-content: start;
  }

  .catalog-card__overview--split {
    grid-template-columns: 1fr;
  }

  .catalog-card__heading {
    align-content: start;
  }

  .catalog-card__heading h2 {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    min-height: 2.1em;
  }

  .catalog-card__heading .genre-disclosure {
    align-content: start;
    min-height: 70px;
  }

  .book-hero {
      grid-template-columns: 220px minmax(0, 1fr);
      align-items: start;
    }

    .book-hero__cover-stack {
      width: 250px;
    }

    .book-hero__cover {
      width: 100%;
    }

  .book-page--themed {
    padding: 1.2rem;
  }

  .book-hero__composition {
    grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.86fr);
    align-items: start;
  }

  .source-rating-list--mobile-after-cover {
    display: none;
  }

  .source-rating-list--desktop-inline {
    display: grid;
  }

  .book-rating-summary--mobile {
    display: none;
  }

  .book-rating-summary--desktop {
    display: grid;
  }

  .catalog-card__rating-grid {
    min-height: 150px;
    align-content: start;
  }

  .catalog-card__overview {
    min-height: 92px;
    align-content: start;
  }

  .catalog-card__overview .catalog-card__description {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    overflow: hidden;
  }

  .catalog-card__praise .featured-comments__item {
    min-height: 100%;
    align-content: start;
  }

  .catalog-card__actions {
    margin-top: auto;
  }

  .reader-settings {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 980px) {
  .catalog-grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 1080px) {
  .catalog-card {
    padding: 0.8rem;
  }

  .catalog-card__body {
    gap: 0.7rem;
  }

  .catalog-card__heading h2 {
    font-size: 1.5rem;
  }
}

@media (min-width: 1380px) {
  .catalog-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 719px) {
  .site-header {
    flex-direction: column;
    align-items: stretch;
    border-radius: 28px;
  }

  .site-nav {
    justify-content: space-between;
  }

  .source-rating-row,
  .chapter-list__item,
  .comment-card__top,
  .chapter-list__pager {
    flex-direction: column;
    align-items: stretch;
  }

  .source-rating-row__value,
  .chapter-list__item span:last-child,
  .comment-card__top span {
    justify-items: start;
    text-align: left;
  }

  .book-rating-widget__grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .site-shell {
    width: calc(100% - 20px);
    padding-top: 10px;
  }

  .hero,
  .reader-page,
  .detail-panel,
  .book-page--themed {
    border-radius: 28px;
  }

  .hero__copy h1 {
    max-width: 100%;
  }

  .book-hero__cover {
      width: 100%;
    }

    .book-hero__cover-stack {
      width: min(100%, 420px);
    }

  .book-hero__facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .catalog-card__actions,
  .book-hero__actions,
  .reader-actions,
  .chapters-block__actions,
  .reader-segmented,
  .reader-inline-controls {
    display: grid;
    grid-template-columns: 1fr;
  }

  .primary-link,
  .ghost-button,
  .reader-chip,
  .vote-button,
  .catalog-card__secondary-link,
  .chapter-list__expand-button {
    width: 100%;
  }

  .book-rating-widget__grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .book-rating-summary__score {
    font-size: 2.1rem;
  }

  .genre-chip-list,
  .comment-card__meta {
    gap: 0.5rem;
  }

  .scroll-to-top {
    right: 0.8rem;
    bottom: 0.8rem;
    width: 2.85rem;
    height: 2.85rem;
  }

  .scroll-to-top--reader {
    right: max(0.8rem, calc(env(safe-area-inset-right) + 0.8rem));
    bottom: max(4.35rem, calc(env(safe-area-inset-bottom) + 4.35rem));
    width: 3rem;
    height: 3rem;
  }

  .reader-content {
    padding: 1rem;
  }
}

.site-nav {
  flex-wrap: wrap;
}

.book-cover--animated::before,
.book-cover--animated::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

.book-cover--animated::before {
  background:
    radial-gradient(circle at 18% 24%, rgba(255, 246, 230, 0.28), transparent 32%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 42%, rgba(255, 255, 255, 0.16));
  mix-blend-mode: screen;
  opacity: 0.45;
}

.book-cover--animated::after {
  inset: 8% -20% auto auto;
  width: 54%;
  height: 120%;
  background: linear-gradient(120deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transform: translate3d(-12%, 0, 0) rotate(8deg);
  opacity: 0;
}

.book-cover--animated img,
.book-cover--animated .cover-poster {
  transition: transform 0.7s ease, filter 0.7s ease;
}

.catalog-card:hover .book-cover--animated img,
.catalog-card:focus-within .book-cover--animated img,
.explore-card:hover .book-cover--animated img,
.explore-card:focus-within .book-cover--animated img,
.catalog-preview:hover .book-cover--animated img,
.catalog-preview:focus-within .book-cover--animated img {
  transform: scale(1.12);
  filter: saturate(1.08) contrast(1.04);
}

.catalog-card:hover .book-cover--animated::after,
.catalog-card:focus-within .book-cover--animated::after,
.explore-card:hover .book-cover--animated::after,
.explore-card:focus-within .book-cover--animated::after,
.catalog-preview:hover .book-cover--animated::after,
.catalog-preview:focus-within .book-cover--animated::after {
  opacity: 0.85;
  transform: translate3d(14%, 0, 0) rotate(8deg);
}

.book-hero__cover.book-cover--animated::before {
  opacity: 0.7;
}

.book-hero__cover.book-cover--animated .book-hero__cover-image,
.book-hero__cover.book-cover--animated .book-hero__cover-fallback {
  animation: coverDrift 18s ease-in-out infinite alternate;
}

.book-hero__cover.book-cover--animated::after {
  opacity: 0.65;
  animation: coverSheen 10s ease-in-out infinite;
}

@keyframes coverDrift {
  0% {
    transform: scale(1.1) translate3d(0, 0, 0);
  }
  100% {
    transform: scale(1.16) translate3d(1.5%, -1.6%, 0);
  }
}

@keyframes coverSheen {
  0%,
  28%,
  100% {
    transform: translate3d(-22%, 0, 0) rotate(8deg);
    opacity: 0;
  }
  42%,
  64% {
    transform: translate3d(22%, 0, 0) rotate(8deg);
    opacity: 0.82;
  }
}

.ratings-page,
.explore-page {
  display: grid;
  gap: 1rem;
}

.ratings-layout {
  display: grid;
  gap: 1rem;
}

.ratings-list,
.ratings-preview-pane,
.explore-toolbar,
.explore-genres,
.explore-card,
.catalog-preview,
.ambient-player {
  padding: 1rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(249, 244, 236, 0.82)),
    rgba(255, 255, 255, 0.78);
  box-shadow: var(--shadow-soft);
}

.ratings-list {
  display: grid;
  gap: 0.65rem;
}

.ratings-row {
  display: grid;
  gap: 0.75rem;
  padding: 0.35rem 0;
  border-bottom: 1px solid rgba(126, 104, 85, 0.14);
}

.ratings-row:last-child {
  border-bottom: 0;
}

.ratings-row__main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.9rem;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.ratings-row__index {
  color: var(--accent-strong);
  font-size: 0.85rem;
  font-weight: 700;
}

.ratings-row__title {
  font-family: var(--font-display), Georgia, serif;
  font-size: 1.18rem;
  font-weight: 700;
}

.ratings-row__stats {
  display: grid;
  justify-items: end;
  gap: 0.2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.ratings-row__stats strong {
  color: var(--ink);
  font-size: 1rem;
}

.ratings-row__link {
  justify-self: start;
}

.ratings-row.is-active .ratings-row__title,
.ratings-row:hover .ratings-row__title {
  color: var(--accent-strong);
}

.ratings-row__preview-mobile {
  display: none;
}

.ratings-preview-pane {
  display: none;
}

.catalog-preview {
  display: grid;
  gap: 1rem;
}

.catalog-preview__cover-wrap {
  width: min(100%, 220px);
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: calc(var(--radius-lg) - 4px);
  justify-self: center;
}

.catalog-preview__cover,
.catalog-preview__cover-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.catalog-preview__cover-fallback {
  display: grid;
  place-items: center;
}

.catalog-preview__body,
.catalog-preview__heading,
.catalog-preview__quotes {
  display: grid;
  gap: 0.65rem;
}

.catalog-preview__heading h3,
.explore-card__heading h3 {
  margin: 0;
  font-family: var(--font-display), Georgia, serif;
  font-size: clamp(1.5rem, 2vw, 1.8rem);
}

.catalog-preview__meta,
.explore-card__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.catalog-preview__quote,
.explore-card__quote {
  margin: 0;
  padding: 0.85rem 0.9rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(126, 104, 85, 0.14);
  color: var(--ink);
}

.catalog-preview__quote p,
.catalog-preview__quote span {
  margin: 0;
}

.catalog-preview__quote span {
  display: block;
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.84rem;
}

.catalog-preview__empty,
.explore-card__quote--empty {
  color: var(--muted);
}

.catalog-preview__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.explore-toolbar {
  display: grid;
  gap: 1rem;
}

.explore-toolbar__search,
.explore-toolbar__sort {
  display: grid;
  gap: 0.5rem;
}

.explore-toolbar__search span,
.explore-toolbar__sort span,
.ambient-player__volume span:first-child {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.explore-toolbar input,
.explore-toolbar select,
.ambient-player__volume input[type="range"] {
  width: 100%;
}

.explore-toolbar input,
.explore-toolbar select {
  min-height: 48px;
  padding: 0.85rem 0.95rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  font: inherit;
}

.explore-genres {
  display: grid;
  gap: 0.8rem;
}

.explore-genres__heading,
.explore-results__meta,
.ambient-player__header,
.ambient-player__volume {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.explore-genres__heading h2 {
  margin: 0;
  font-size: 1rem;
}

.explore-genres__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.genre-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink);
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.genre-chip:hover,
.genre-chip.is-active {
  border-color: color-mix(in srgb, var(--accent-strong) 45%, var(--line));
  background: rgba(255, 248, 242, 0.95);
}

.genre-chip--link {
  text-decoration: none;
}

.explore-results {
  display: grid;
  gap: 1rem;
}

.explore-results__grid {
  display: grid;
  gap: 1rem;
}

.explore-card {
  display: grid;
  gap: 1rem;
}

.explore-card__cover-wrap {
  width: min(100%, 180px);
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: calc(var(--radius-lg) - 4px);
  justify-self: center;
}

.explore-card__cover,
.explore-card__cover-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.explore-card__cover-fallback {
  display: grid;
  place-items: center;
}

.explore-card__body,
.explore-card__heading {
  display: grid;
  gap: 0.65rem;
}

.explore-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}

.ambient-player {
  display: grid;
  gap: 0.9rem;
}

.ambient-player__header {
  align-items: start;
}

.ambient-player__header h3,
.ambient-player__header p {
  margin: 0;
}

.ambient-player__hint,
.ambient-player__loading {
  color: var(--muted);
}

.ambient-player__toggle.is-active {
  border-color: color-mix(in srgb, var(--accent-strong) 34%, var(--line));
  background: rgba(255, 248, 242, 0.95);
}

.ambient-player__volume {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.ambient-player__error {
  margin: 0;
  color: #9d3b2f;
}

.ambient-player-compact {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.ambient-player-compact__toggle {
  width: auto;
  min-width: 0;
}

.ambient-player-compact__toggle.is-active {
  border-color: color-mix(in srgb, var(--accent-strong) 34%, var(--line));
  background: rgba(255, 248, 242, 0.95);
}

.ambient-player-compact__error {
  margin: 0;
  color: #9d3b2f;
  font-size: 0.82rem;
}

.genre-showcase-section,
.review-panel,
.review-summary,
.review-form,
.review-list,
.review-panel__toolbar,
.review-summary__aspects,
.review-summary__tags,
.review-summary__tag-group,
.review-summary__tag-list,
.review-form__section,
.review-form__section-heading,
.review-form__aspect-grid,
.review-form__aspect,
.review-form__tag-grid,
.review-form__footer,
.review-form__messages,
.review-list,
.review-card,
.review-card__top,
.review-card__aspects,
.review-card__tags,
.review-card__helpful,
.discovery-book-card,
.discovery-book-card__body,
.discovery-book-card__header,
.discovery-book-card__title-wrap,
.discovery-book-card__facts,
.discovery-book-card__quote-zone,
.discovery-book-card__details-body,
.discovery-book-card__review-signals,
.discovery-book-card__tag-group,
.discovery-book-card__tag-list,
.genre-showcase-card,
.genre-showcase-card__body,
.genre-showcase-card__header,
.genre-showcase-card__samples {
  display: grid;
  gap: 1rem;
}

.genre-showcase-grid,
.review-summary__aspects,
.review-form__aspect-grid,
.review-list,
.explore-results__grid {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

.genre-showcase-grid {
  display: grid;
  gap: 1rem;
}

.genre-showcase-card,
.discovery-book-card,
.review-summary,
.review-form,
.review-card {
  padding: 1rem;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(249, 244, 236, 0.84)),
    rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow-soft);
}

.genre-showcase-card {
  overflow: hidden;
}

.genre-showcase-card__image-wrap {
  overflow: hidden;
  border-radius: calc(var(--radius-lg) - 2px);
  aspect-ratio: 16 / 9;
}

.genre-showcase-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.genre-showcase-card__header {
  align-items: start;
}

.genre-showcase-card__header h2 {
  margin: 0.2rem 0 0;
  font-family: var(--font-display), Georgia, serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
}

.genre-showcase-card__stats {
  display: grid;
  gap: 0.2rem;
  color: var(--muted);
}

.genre-showcase-card__stats strong {
  color: var(--ink);
  font-size: 1.1rem;
}

.genre-showcase-card__description,
.genre-showcase-card__samples span,
.discovery-book-card__facts span,
.review-form__section-heading span,
.review-panel__toolbar span,
.review-card__top span,
.review-card__aspect span,
.review-summary__hero p {
  color: var(--muted);
}

.genre-showcase-card__samples ul {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.5rem;
}

.genre-showcase-card__samples li::marker {
  color: var(--theme-accent, var(--accent-strong));
}

.discovery-book-card {
  grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
  align-items: stretch;
  min-height: 100%;
  border-color: color-mix(in srgb, var(--theme-accent, var(--accent)) 18%, var(--line));
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--theme-accent, var(--accent)) 10%, transparent), transparent 54%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(249, 244, 236, 0.86)),
    rgba(255, 255, 255, 0.82);
}

.discovery-book-card__cover-wrap {
  width: 100%;
  min-height: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: calc(var(--radius-lg) - 2px);
}

.discovery-book-card__cover,
.discovery-book-card__cover-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.discovery-book-card__cover-fallback {
  display: grid;
  place-items: center;
}

.discovery-book-card__body {
  align-content: start;
  min-height: 100%;
}

.discovery-book-card__header {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 1rem;
}

.discovery-book-card__title-wrap h3 {
  margin: 0;
  font-family: var(--font-display), Georgia, serif;
  font-size: clamp(1.45rem, 3vw, 2rem);
}

.discovery-book-card__stats {
  display: grid;
  justify-items: end;
  gap: 0.2rem;
  color: var(--muted);
  text-align: right;
  font-size: 0.92rem;
}

.discovery-book-card__facts {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem 1rem;
}

.discovery-book-card__facts strong {
  color: var(--ink);
}

.discovery-book-card__quote {
  margin: 0;
  padding: 0.9rem 1rem;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--theme-accent, var(--accent)) 16%, var(--line));
  background: color-mix(in srgb, var(--theme-accent, var(--accent)) 7%, rgba(255, 255, 255, 0.84));
}

.discovery-book-card__quote p,
.discovery-book-card__quote footer {
  margin: 0;
}

.discovery-book-card__quote footer {
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: 0.88rem;
}

.discovery-book-card__quote--empty {
  color: var(--muted);
}

.discovery-book-card__summary {
  color: var(--theme-accent, var(--accent-strong));
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
}

.discovery-book-card__details {
  border-top: 1px solid var(--line);
  padding-top: 0.8rem;
}

.discovery-book-card__description {
  line-height: 1.7;
}

.discovery-book-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: auto;
  align-items: center;
}

.review-signal-chip {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.25;
}

.review-signal-chip--positive {
  color: #2f6b4a;
  background: rgba(103, 176, 130, 0.16);
  border-color: rgba(80, 145, 105, 0.2);
}

.review-signal-chip--caution {
  color: #8b5d1f;
  background: rgba(224, 171, 79, 0.16);
  border-color: rgba(188, 138, 55, 0.2);
}

.review-panel__toolbar {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.review-panel__toolbar strong {
  font-size: 1.02rem;
}

.review-panel__sort {
  display: grid;
  gap: 0.4rem;
}

.review-panel__sort select,
.review-form__body textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--ink);
  font: inherit;
}

.review-panel__sort select {
  min-height: 2.8rem;
  padding: 0.7rem 0.9rem;
}

.review-summary__hero {
  display: grid;
  gap: 0.28rem;
}

.review-summary__hero span {
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.review-summary__hero strong {
  font-family: var(--font-display), Georgia, serif;
  font-size: clamp(2rem, 4vw, 2.8rem);
  line-height: 0.95;
}

.review-summary__aspects {
  gap: 0.8rem;
}

.review-summary__aspect {
  display: grid;
  gap: 0.2rem;
  padding: 0.8rem 0.9rem;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.78);
}

.review-summary__aspect strong {
  font-size: 1rem;
}

.review-form__section {
  padding: 1rem;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.74);
}

.review-form__section-heading strong,
.review-card__top strong {
  color: var(--ink);
}

.review-form__rating-grid,
.review-form__aspect-buttons,
.review-form__tag-grid,
.review-card__aspects,
.review-card__helpful,
.review-summary__tag-list,
.discovery-book-card__tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.review-rating-button,
.review-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.4rem;
  min-width: 2.4rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

.review-rating-button.is-active,
.review-chip.is-active {
  border-color: transparent;
  color: #fff8f1;
  background: linear-gradient(135deg, var(--theme-accent, var(--accent)), var(--accent-strong));
  box-shadow: 0 14px 24px rgba(127, 57, 27, 0.18);
}

.review-chip--positive:not(.is-active) {
  color: #2f6b4a;
}

.review-chip--caution:not(.is-active) {
  color: #8b5d1f;
}

.review-form__aspect-grid {
  gap: 0.9rem;
}

.review-form__aspect {
  gap: 0.6rem;
}

.review-form__body textarea {
  min-height: 7.5rem;
  padding: 0.9rem 1rem;
  resize: vertical;
}

.review-form__footer {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.review-form__message {
  margin: 0;
  color: #2f6b4a;
}

.review-form__error {
  margin: 0;
  color: #a53b25;
}

.review-card {
  align-content: start;
}

.review-card__top {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
}

.review-card__top > div:first-child {
  display: grid;
  gap: 0.2rem;
}

.review-card__overall {
  display: grid;
  justify-items: end;
  gap: 0.2rem;
}

.review-card__overall strong {
  font-size: 1.1rem;
}

.review-card__aspect {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
}

.review-card__body {
  margin: 0;
  line-height: 1.7;
}

.catalog-preview--desktop-sticky {
  position: sticky;
  top: 1rem;
}

@media (min-width: 920px) {
  .genre-showcase-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .genre-showcase-card {
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    align-items: stretch;
  }

  .review-summary__aspects,
  .review-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .review-form__aspect-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ratings-layout {
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    align-items: start;
  }

  .ratings-preview-pane {
    display: block;
    position: sticky;
    top: 1rem;
  }

  .ratings-row__preview-mobile {
    display: none !important;
  }

  .explore-toolbar {
    grid-template-columns: minmax(0, 1fr) 240px;
    align-items: end;
  }

  .explore-results__grid {
    grid-template-columns: 1fr;
  }

  .catalog-preview,
  .explore-results__grid .discovery-book-card {
    grid-template-columns: minmax(180px, 220px) minmax(0, 1fr);
    align-items: start;
  }
}

@media (max-width: 919px) {
  .ratings-row__preview-mobile {
    display: block;
  }
}

@media (max-width: 719px) {
  .genre-showcase-card,
  .discovery-book-card,
  .review-form__footer,
  .review-panel__toolbar,
  .review-card__top,
  .discovery-book-card__header {
    grid-template-columns: 1fr;
  }

  .discovery-book-card__facts {
    grid-template-columns: 1fr;
  }

  .genre-showcase-card__stats,
  .discovery-book-card__stats,
  .review-card__overall {
    justify-items: start;
    text-align: left;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .ratings-row__main {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .ratings-row__stats {
    grid-column: 2;
    justify-items: start;
  }

  .ratings-row__link {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .book-cover--animated::before,
  .book-cover--animated::after,
  .book-cover--animated img,
  .book-cover--animated .cover-poster {
    animation: none !important;
    transition: none !important;
  }
}

.book-page-intro {
  display: grid;
  gap: 1.1rem;
}

.book-page-intro__lead {
  margin: 0;
  color: var(--ink);
  font-size: 1.02rem;
  line-height: 1.75;
}

.book-page-intro__facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.85rem;
}

.book-page-intro__fact {
  display: grid;
  gap: 0.3rem;
  padding: 0.95rem 1rem;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 20px;
  background: rgba(255, 251, 246, 0.88);
}

.book-page-intro__fact span {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.book-page-intro__fact strong {
  font-size: 0.98rem;
  line-height: 1.45;
}

.related-books {
  display: grid;
  gap: 1.1rem;
}

.related-books__grid {
  display: grid;
  gap: 0.9rem;
}

.related-books__card {
  display: grid;
  gap: 0.8rem;
  padding: 1rem 1.05rem;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 22px;
  background: rgba(255, 252, 248, 0.88);
}

.related-books__card h3,
.related-books__card p {
  margin: 0;
}

.related-books__card-copy {
  display: grid;
  gap: 0.45rem;
}

.related-books__card-copy p {
  color: var(--muted);
  line-height: 1.6;
}

.related-books__card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.75rem;
  color: var(--muted);
  font-size: 0.9rem;
}

@media (min-width: 920px) {
  .related-books__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

[data-site-theme="night"] {
  --bg: #0f1218;
  --bg-deep: #090c12;
  --surface: rgba(19, 24, 32, 0.86);
  --surface-strong: rgba(23, 29, 38, 0.96);
  --surface-soft: rgba(26, 33, 42, 0.88);
  --ink: #d5dee9;
  --muted: #95a4b8;
  --accent: #e28753;
  --accent-strong: #f1a06b;
  --accent-soft: rgba(226, 135, 83, 0.16);
  --line: rgba(233, 239, 248, 0.08);
  --line-strong: rgba(233, 239, 248, 0.14);
  --shadow-soft: 0 18px 44px rgba(4, 8, 15, 0.34);
  --shadow: 0 34px 84px rgba(4, 8, 15, 0.45);
}

[data-site-theme="night"] body {
  background:
    radial-gradient(circle at top left, rgba(226, 135, 83, 0.14), transparent 28%),
    radial-gradient(circle at 88% 12%, rgba(91, 120, 170, 0.14), transparent 24%),
    linear-gradient(180deg, #131924 0%, var(--bg) 46%, var(--bg-deep) 100%);
}

[data-site-theme="night"] body::before {
  opacity: 0.22;
  background:
    linear-gradient(to right, rgba(203, 215, 235, 0.025) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(203, 215, 235, 0.022) 1px, transparent 1px);
}

[data-site-theme="night"] code {
  background: rgba(26, 33, 42, 0.92);
}

[data-site-theme="night"] .comment-card,
[data-site-theme="night"] .review-card,
[data-site-theme="night"] .discovery-book-card,
[data-site-theme="night"] .genre-showcase-card,
[data-site-theme="night"] .review-summary,
[data-site-theme="night"] .review-form,
[data-site-theme="night"] .catalog-preview,
[data-site-theme="night"] .ratings-list,
[data-site-theme="night"] .ratings-preview-pane,
[data-site-theme="night"] .explore-toolbar,
[data-site-theme="night"] .explore-genres {
  background:
    linear-gradient(180deg, rgba(28, 35, 45, 0.96), rgba(19, 24, 32, 0.92)),
    rgba(20, 26, 34, 0.92);
}

[data-site-theme="night"] .genre-chip,
[data-site-theme="night"] .review-chip,
[data-site-theme="night"] .metric-chip,
[data-site-theme="night"] .source-rating-row,
[data-site-theme="night"] .book-hero__fact {
  background: rgba(28, 35, 45, 0.92);
}

[data-site-theme="night"] .discovery-book-card__quote,
[data-site-theme="night"] .review-card__body,
[data-site-theme="night"] .auth-gate,
[data-site-theme="night"] .comment-card__body {
  color: #cdd7e2;
}

.site-header__actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.8rem;
}

.site-theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
}

.site-theme-toggle__icon {
  width: 1rem;
  height: 1rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--line-strong) 80%, transparent);
  background: linear-gradient(135deg, #ffd786 0%, #ffc45f 34%, #7aa9ff 35%, #6c7fff 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}

.site-theme-toggle--compact {
  min-height: auto;
  padding: 0.55rem 0.8rem;
}

.site-account {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.site-account__meta {
  display: grid;
  justify-items: end;
  gap: 0.12rem;
}

.site-account__meta strong {
  font-size: 0.95rem;
}

.site-account__meta span {
  color: var(--muted);
  font-size: 0.82rem;
}

.auth-page {
  display: grid;
  gap: 1.2rem;
}

.auth-card {
  display: grid;
  gap: 1rem;
  padding: 1.2rem;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 28px;
  background: var(--surface-strong);
  box-shadow: var(--shadow-soft);
}

.auth-card__summary {
  display: grid;
  gap: 0.25rem;
}

.auth-card__summary span {
  color: var(--muted);
}

.auth-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.auth-form {
  display: grid;
  gap: 0.95rem;
}

.auth-form__field {
  display: grid;
  gap: 0.45rem;
}

.auth-form__field span {
  color: var(--muted);
  font-size: 0.92rem;
}

.auth-form__field input {
  width: 100%;
  min-height: 3rem;
  padding: 0.85rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface-strong) 88%, transparent);
  color: var(--ink);
  font: inherit;
}

.auth-form__error,
.ambient-player-compact__error {
  margin: 0;
  color: #d55d5d;
}

.auth-form__message,
.auth-form__debug {
  margin: 0;
  color: var(--muted);
}

.auth-form__debug {
  font-size: 0.92rem;
}

.book-rating-widget__login {
  justify-self: start;
}

.auth-gate {
  display: grid;
  gap: 0.75rem;
  padding: 1rem 1.05rem;
  border: 1px dashed var(--line-strong);
  border-radius: 22px;
  background: color-mix(in srgb, var(--surface-soft) 78%, transparent);
}

.auth-gate p {
  margin: 0;
  color: var(--muted);
}

.reader-toolbar {
  position: sticky;
  top: 0.9rem;
  z-index: 20;
  display: grid;
  gap: 0.85rem;
  padding: 1rem 1.05rem;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 24px;
  background: color-mix(in srgb, var(--surface-strong) 92%, transparent);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.reader-toolbar__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.reader-toolbar__actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.reader-controls {
  display: grid;
  gap: 0.95rem;
}

.reader-auth-hint {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  border: 1px dashed var(--line-strong);
  border-radius: 20px;
  color: var(--muted);
}

.reader-mobile-sheet-handle,
.reader-mobile-sheet,
.reader-mobile-sheet__backdrop {
  display: none;
}

.reader-mobile-sheet-handle {
  position: fixed;
  left: 50%;
  bottom: 1rem;
  z-index: 40;
  transform: translateX(-50%);
  align-items: center;
  gap: 0.55rem;
  min-height: 0;
  padding: 0.75rem 1rem;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-strong) 94%, transparent);
  color: var(--ink);
  box-shadow: var(--shadow-soft);
}

.reader-mobile-sheet-handle__bar {
  width: 2.4rem;
  height: 0.25rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--muted) 48%, transparent);
}

.reader-mobile-sheet__backdrop {
  position: fixed;
  inset: 0;
  z-index: 48;
  border: none;
  background: rgba(3, 7, 14, 0.42);
}

.reader-mobile-sheet {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 49;
  display: grid;
  gap: 1rem;
  padding: 0.9rem 1rem 1.2rem;
  border-radius: 28px 28px 0 0;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-bottom: none;
  background: color-mix(in srgb, var(--surface-strong) 98%, transparent);
  box-shadow: var(--shadow);
}

.reader-mobile-sheet__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
}

.reader-mobile-sheet__title-wrap {
  display: grid;
  gap: 0.15rem;
}

.reader-mobile-sheet__title-wrap span {
  color: var(--muted);
  font-size: 0.88rem;
}

.reader-mobile-sheet__grabber {
  width: 2.8rem;
  height: 0.28rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--muted) 44%, transparent);
}

.reader-mobile-sheet__body {
  display: grid;
  gap: 1rem;
}

.reader-mobile-sheet__theme {
  display: flex;
  justify-content: flex-start;
}

@media (max-width: 920px) {
  .site-header {
    border-radius: 28px;
    align-items: stretch;
  }

  .site-header,
  .site-header__actions {
    flex-wrap: wrap;
  }

  .site-account__meta {
    justify-items: start;
  }

  .reader-toolbar {
    display: none;
  }

  .reader-auth-hint {
    flex-direction: column;
    align-items: flex-start;
  }

  .reader-mobile-sheet-handle,
  .reader-mobile-sheet,
  .reader-mobile-sheet__backdrop {
    display: flex;
  }

  .reader-mobile-sheet {
    display: grid;
  }
}

/* MangaLib-inspired product shell overrides */

:root {
  --bg: #eef2f6;
  --bg-deep: #e3e8ee;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-strong: rgba(255, 255, 255, 0.96);
  --surface-soft: rgba(247, 249, 252, 0.9);
  --ink: #1e293b;
  --muted: #64748b;
  --accent: #f58d45;
  --accent-strong: #d56c2b;
  --accent-soft: rgba(245, 141, 69, 0.12);
  --line: rgba(148, 163, 184, 0.18);
  --line-strong: rgba(100, 116, 139, 0.28);
  --shadow-soft: 0 12px 30px rgba(15, 23, 42, 0.06);
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.08);
  --radius-2xl: 28px;
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
}

body {
  font-size: 14px;
  background:
    radial-gradient(circle at top left, rgba(245, 141, 69, 0.14), transparent 24%),
    linear-gradient(180deg, #f6f8fb 0%, var(--bg) 54%, var(--bg-deep) 100%);
}

body::before {
  opacity: 0.12;
  background:
    linear-gradient(to right, rgba(148, 163, 184, 0.035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(148, 163, 184, 0.03) 1px, transparent 1px);
  background-size: 22px 22px;
}

.site-shell {
  width: min(1480px, calc(100% - 20px));
  padding: 12px 0 88px;
}

.site-header,
.detail-panel,
.reader-page,
.book-page--themed,
.book-hero,
.genre-showcase-card,
.discovery-book-card,
.review-summary,
.review-form,
.review-card,
.home-hero,
.home-rail-card,
.home-update-card,
.discovery-panel,
.ratings-list {
  border-radius: 20px;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(249, 251, 253, 0.92)),
    var(--surface);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.site-header {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(260px, 1fr) auto;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 0.8rem 1rem;
  border-radius: 22px;
}

.site-header__primary {
  display: flex;
  align-items: center;
  gap: 1.2rem;
  min-width: 0;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  font-size: 1rem;
}

.site-brand__mark {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: #fff;
  font-family: var(--font-display), Georgia, serif;
  font-size: 1.35rem;
  font-weight: 700;
  box-shadow: 0 10px 24px rgba(213, 108, 43, 0.28);
}

.site-brand__text {
  display: grid;
  gap: 0.1rem;
}

.site-brand__text strong {
  color: var(--ink);
  font-size: 1.02rem;
}

.site-brand__text small {
  color: var(--muted);
  font-size: 0.8rem;
}

.site-nav {
  gap: 0.55rem;
}

.site-nav__link {
  display: inline-flex;
  align-items: center;
  min-height: 2.55rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 700;
}

.site-nav__link.is-active,
.site-nav__link:hover {
  color: var(--ink);
  background: rgba(245, 141, 69, 0.1);
}

.site-header__search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 0.7rem;
}

.site-header__search-field {
  display: grid;
  gap: 0.35rem;
}

.site-header__search-field span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.site-header__search-field input,
.discovery-field input,
.discovery-field select {
  width: 100%;
  min-height: 2.95rem;
  padding: 0.78rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--ink);
  font: inherit;
}

.site-header__search-submit {
  min-height: 2.95rem;
}

.site-main {
  display: grid;
  gap: 1.1rem;
}

.site-mobile-nav {
  position: fixed;
  left: 50%;
  bottom: 0.9rem;
  z-index: 55;
  display: none;
  transform: translateX(-50%);
  width: min(100%, calc(100vw - 22px));
  max-width: 520px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.45rem;
  padding: 0.5rem;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: color-mix(in srgb, var(--surface-strong) 94%, transparent);
  box-shadow: var(--shadow);
  backdrop-filter: blur(20px);
}

.site-mobile-nav__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.9rem;
  padding: 0.6rem 0.45rem;
  border-radius: 16px;
  color: var(--muted);
  font-weight: 700;
  text-align: center;
}

.site-mobile-nav__link.is-active {
  color: var(--ink);
  background: rgba(245, 141, 69, 0.12);
}

.home-page,
.discovery-page {
  display: grid;
  gap: 1rem;
}

.home-hero,
.discovery-page__intro {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.8fr);
  gap: 1rem;
  padding: 1.15rem;
}

.home-hero__copy,
.home-hero__stats,
.home-layout,
.home-layout__main,
.home-layout__rail,
.home-updates-feed,
.discovery-layout,
.discovery-results,
.discovery-results__grid,
.home-rail-list,
.home-rail-quotes {
  display: grid;
  gap: 0.9rem;
}

.home-hero__copy h1,
.discovery-page__intro h1 {
  max-width: 16ch;
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1;
}

.home-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.home-hero__stats {
  align-content: start;
  grid-template-columns: 1fr;
}

.home-hero__stat,
.discovery-page__intro-meta {
  display: grid;
  gap: 0.2rem;
  padding: 0.95rem 1rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
}

.home-hero__stat span,
.discovery-page__intro-meta span {
  color: var(--muted);
}

.home-hero__stat strong {
  color: var(--ink);
  font-size: 1rem;
}

.home-layout {
  grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr);
  align-items: start;
}

.home-section,
.discovery-results,
.ratings-list,
.home-rail-card,
.discovery-panel {
  padding: 1rem;
}

.section-heading--dense {
  gap: 0.45rem;
}

.section-heading--dense h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  line-height: 1.05;
}

.genre-showcase-grid--compact {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.genre-showcase-card {
  display: grid;
  grid-template-columns: minmax(160px, 188px) minmax(0, 1fr);
  gap: 0.9rem;
  padding: 0.85rem;
  min-height: 100%;
  align-items: start;
}

.genre-showcase-card__media,
.genre-showcase-card__body {
  display: grid;
  gap: 0.8rem;
  min-width: 0;
}

.genre-showcase-card__media {
  align-content: start;
}

.genre-showcase-card__body {
  grid-template-rows: auto auto 1fr auto;
}

.genre-showcase-card__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.8rem;
}

.genre-showcase-card__header h2 {
  margin: 0.18rem 0 0;
  line-height: 1.02;
}

.genre-showcase-card__image-wrap {
  overflow: hidden;
  border-radius: calc(var(--radius-lg) - 2px);
  aspect-ratio: 3 / 4;
  background: color-mix(in srgb, var(--surface-strong) 18%, white);
}

.genre-showcase-card__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.home-update-card {
  display: grid;
  grid-template-columns: minmax(150px, 180px) minmax(0, 1fr);
  gap: 0.95rem;
  padding: 0.9rem;
  align-items: start;
}

.home-update-card__media {
  display: grid;
  gap: 0.7rem;
  align-content: start;
}

.home-update-card__cover-wrap {
  overflow: hidden;
  width: 100%;
  aspect-ratio: 3 / 4;
  border-radius: 18px;
}

.home-update-card__cover,
.home-update-card__cover-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.home-update-card__cover-fallback {
  display: grid;
  place-items: center;
}

.home-update-card__cover-rating {
  display: flex;
  flex-wrap: wrap;
}

.home-update-card__cover-rating span {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.3rem 0.72rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--theme-accent, var(--accent)) 14%, var(--line));
  background: rgba(255, 255, 255, 0.76);
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 700;
}

.home-update-card__body {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 0.8rem;
  min-height: 100%;
}

.home-update-card__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.85rem;
}

.home-update-card__heading {
  display: grid;
  gap: 0.35rem;
}

.home-update-card__heading h2 {
  margin: 0;
  font-family: var(--font-display), Georgia, serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.02;
}

.home-update-card__latest-chapter {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.home-update-card__update-meta span,
.home-update-card__stats span,
.home-rail-list__copy small,
.home-rail-quote p,
.discovery-panel__heading span,
.discovery-results__summary span,
.ratings-row__copy small {
  color: var(--muted);
}

.home-update-card__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.home-update-card__stats span {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--theme-accent, var(--accent)) 14%, var(--line));
  background: rgba(255, 255, 255, 0.76);
  font-size: 0.84rem;
  font-weight: 700;
}

.home-update-card__quote {
  margin: 0;
  padding: 0.85rem 0.95rem;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--theme-accent, var(--accent)) 15%, var(--line));
  background: color-mix(in srgb, var(--theme-accent, var(--accent)) 6%, rgba(255, 255, 255, 0.9));
}

.home-update-card__quote p,
.home-update-card__quote footer,
.home-update-card__description {
  margin: 0;
}

.home-update-card__quote footer {
  margin-top: 0.55rem;
  color: var(--muted);
  font-size: 0.84rem;
}

.home-update-card__description {
  color: var(--muted);
  line-height: 1.7;
}

.home-update-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
}

.home-rail-card__heading,
.discovery-panel__heading {
  display: grid;
  gap: 0.25rem;
  margin-bottom: 0.8rem;
}

.home-rail-card__heading h3 {
  margin: 0;
  font-family: var(--font-display), Georgia, serif;
  font-size: 1.35rem;
  line-height: 1.05;
}

.home-rail-list__item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.8rem;
  align-items: center;
  padding: 0.8rem 0.9rem;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
}

.home-rail-list__item--compact {
  grid-template-columns: minmax(0, 1fr);
}

.home-rail-list__index,
.home-rail-list__value {
  color: var(--accent-strong);
  font-weight: 800;
}

.home-rail-list__copy {
  display: grid;
  gap: 0.12rem;
}

.home-rail-quote {
  display: grid;
  gap: 0.45rem;
  padding: 0.9rem 1rem;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.7);
}

.home-rail-quote__title {
  font-weight: 800;
}

.discovery-layout {
  grid-template-columns: minmax(260px, 300px) minmax(0, 1fr);
  align-items: start;
}

.discovery-sidebar {
  position: sticky;
  top: 96px;
  display: grid;
  gap: 0.9rem;
}

.discovery-panel__heading {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.discovery-field {
  display: grid;
  gap: 0.38rem;
}

.discovery-field span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.discovery-sidebar__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.discovery-results__toolbar {
  display: grid;
  gap: 0.8rem;
}

.discovery-results__summary {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
}

.discovery-results__summary strong {
  font-family: var(--font-display), Georgia, serif;
  font-size: 2rem;
  line-height: 1;
}

.discovery-results__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.discovery-book-card {
  grid-template-columns: minmax(150px, 178px) minmax(0, 1fr);
  gap: 0.9rem;
  padding: 0.9rem;
  min-height: 100%;
}

.discovery-book-card__body {
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  gap: 0.8rem;
  min-height: 100%;
}

.discovery-book-card__header {
  grid-template-columns: minmax(0, 1fr) auto;
}

.discovery-book-card__title-wrap {
  display: grid;
  gap: 0.35rem;
}

.discovery-book-card__title-wrap h3 {
  line-height: 1.02;
}

.discovery-book-card__stats {
  gap: 0.24rem;
  font-size: 0.84rem;
}

.discovery-book-card__facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem 1rem;
}

.discovery-book-card__facts span {
  min-width: 0;
}

.discovery-book-card__quote,
.discovery-book-card__quote--secondary {
  margin: 0;
}

.discovery-book-card__quote-zone {
  min-height: 100%;
}

.discovery-book-card__details {
  border-top: 1px solid var(--line);
  padding-top: 0.75rem;
}

.discovery-book-card__details-body {
  display: grid;
  gap: 0.8rem;
  padding-top: 0.75rem;
}

.discovery-book-card__tag-group {
  display: grid;
  gap: 0.45rem;
}

.ratings-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(380px, 1.05fr);
  align-items: start;
  gap: 1rem;
}

.ratings-list {
  display: grid;
  gap: 0.7rem;
}

.ratings-row {
  display: grid;
  gap: 0.7rem;
  padding: 0.85rem;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
}

.ratings-row.is-active {
  border-color: color-mix(in srgb, var(--accent) 36%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 30%, transparent);
}

.ratings-row__main {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 0.9rem;
  align-items: center;
  border: none;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.ratings-row__copy {
  display: grid;
  gap: 0.12rem;
}

.ratings-row__copy strong {
  font-size: 1rem;
}

.ratings-row__index {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 3rem;
  min-height: 3rem;
  border-radius: 14px;
  background: rgba(245, 141, 69, 0.1);
  color: var(--accent-strong);
  font-weight: 800;
}

.ratings-row__stats {
  display: grid;
  justify-items: end;
  gap: 0.1rem;
  color: var(--muted);
  text-align: right;
}

.ratings-row__link {
  justify-self: start;
}

.ratings-preview-pane {
  position: sticky;
  top: 96px;
}

.catalog-preview--desktop-sticky {
  position: static;
  top: auto;
}

.book-page--themed {
  padding: 0.9rem;
  gap: 0.95rem;
}

.book-hero {
  display: grid;
  grid-template-columns: minmax(240px, 320px) minmax(0, 1fr);
  align-items: start;
  gap: 1rem;
  padding: 1rem;
}

.book-hero__cover-stack {
  position: sticky;
  top: 96px;
}

.book-anchor-nav {
  position: sticky;
  top: 88px;
  z-index: 15;
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--surface-strong) 94%, transparent);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
}

.book-anchor-nav__link {
  display: inline-flex;
  align-items: center;
  min-height: 2.4rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  color: var(--muted);
  font-weight: 700;
}

.book-anchor-nav__link:hover {
  color: var(--ink);
  background: rgba(245, 141, 69, 0.12);
}

.book-hero__composition {
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
}

.book-hero__story,
.book-hero__aside {
  align-content: start;
}

.reader-page {
  gap: 1rem;
  padding: 1rem;
}

.reader-page__top {
  gap: 0.6rem;
}

.reader-toolbar {
  top: 82px;
  border-radius: 18px;
  padding: 0.85rem 0.95rem;
}

.reader-content {
  padding: clamp(1rem, 2vw, 1.5rem);
  border-radius: 20px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

[data-site-theme="night"] {
  --bg: #121821;
  --bg-deep: #0b1017;
  --surface: rgba(24, 31, 40, 0.9);
  --surface-strong: rgba(28, 36, 46, 0.97);
  --surface-soft: rgba(22, 29, 38, 0.94);
  --ink: #b4c0cd;
  --muted: #79889a;
  --accent: #ff9a57;
  --accent-strong: #ffb26c;
  --accent-soft: rgba(255, 154, 87, 0.16);
  --line: rgba(148, 163, 184, 0.13);
  --line-strong: rgba(148, 163, 184, 0.2);
  --shadow-soft: 0 16px 34px rgba(2, 6, 14, 0.34);
  --shadow: 0 28px 60px rgba(2, 6, 14, 0.44);
}

[data-site-theme="night"] body {
  background:
    radial-gradient(circle at top left, rgba(255, 154, 87, 0.12), transparent 24%),
    linear-gradient(180deg, #161d27 0%, var(--bg) 52%, var(--bg-deep) 100%);
}

[data-site-theme="night"] .site-header,
[data-site-theme="night"] .detail-panel,
[data-site-theme="night"] .reader-page,
[data-site-theme="night"] .book-page--themed,
[data-site-theme="night"] .book-hero,
[data-site-theme="night"] .genre-showcase-card,
[data-site-theme="night"] .discovery-book-card,
[data-site-theme="night"] .review-summary,
[data-site-theme="night"] .review-form,
[data-site-theme="night"] .review-card,
[data-site-theme="night"] .home-hero,
[data-site-theme="night"] .home-rail-card,
[data-site-theme="night"] .home-update-card,
[data-site-theme="night"] .discovery-panel,
[data-site-theme="night"] .ratings-list,
[data-site-theme="night"] .reader-content {
  background:
    linear-gradient(180deg, rgba(29, 37, 47, 0.97), rgba(18, 24, 33, 0.95)),
    rgba(18, 24, 33, 0.94);
}

[data-site-theme="night"] .site-header__search-field input,
[data-site-theme="night"] .discovery-field input,
[data-site-theme="night"] .discovery-field select,
[data-site-theme="night"] .home-hero__stat,
[data-site-theme="night"] .discovery-page__intro-meta,
[data-site-theme="night"] .home-rail-list__item,
[data-site-theme="night"] .home-rail-quote,
[data-site-theme="night"] .ratings-row,
[data-site-theme="night"] .discovery-book-card__quote,
[data-site-theme="night"] .home-update-card__quote,
[data-site-theme="night"] .source-rating-row,
[data-site-theme="night"] .book-hero__fact,
[data-site-theme="night"] .genre-chip,
[data-site-theme="night"] .review-chip,
[data-site-theme="night"] .metric-chip {
  background: rgba(31, 40, 52, 0.9);
}

[data-site-theme="night"] .comment-card__body,
[data-site-theme="night"] .review-card__body,
[data-site-theme="night"] .book-description,
[data-site-theme="night"] .home-update-card__description,
[data-site-theme="night"] .home-rail-quote p,
[data-site-theme="night"] .discovery-book-card__quote p,
[data-site-theme="night"] .reader-content,
[data-site-theme="night"] .description-disclosure__preview,
[data-site-theme="night"] .description-disclosure__body p {
  color: #aeb8c4;
}

[data-site-theme="night"] .muted,
[data-site-theme="night"] .book-rating-summary__meta span,
[data-site-theme="night"] .home-update-card__update-meta span,
[data-site-theme="night"] .home-rail-list__copy small,
[data-site-theme="night"] .ratings-row__copy small,
[data-site-theme="night"] .recommended-shelf-card__author,
[data-site-theme="night"] .recommended-shelf-card__stats span,
[data-site-theme="night"] .reader-meta {
  color: #7f8ea0;
}

[data-site-theme="night"] .site-nav__link.is-active,
[data-site-theme="night"] .site-nav__link:hover,
[data-site-theme="night"] .site-mobile-nav__link.is-active,
[data-site-theme="night"] .book-anchor-nav__link:hover {
  background: rgba(255, 154, 87, 0.16);
}

@media (max-width: 1160px) {
  .site-header {
    grid-template-columns: 1fr;
  }

  .site-header__primary,
  .site-header__actions {
    flex-wrap: wrap;
  }

  .home-layout,
  .ratings-layout,
  .book-hero,
  .book-hero__composition,
  .home-hero,
  .discovery-page__intro {
    grid-template-columns: 1fr;
  }

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

  .discovery-sidebar,
  .ratings-preview-pane,
  .book-hero__cover-stack {
    position: static;
    top: auto;
  }
}

@media (max-width: 820px) {
  .site-shell {
    width: min(100%, calc(100% - 14px));
    padding-bottom: 104px;
  }

  .site-nav {
    overflow-x: auto;
    padding-bottom: 0.2rem;
  }

  .site-mobile-nav {
    display: grid;
  }

  .genre-showcase-grid--compact,
  .genre-showcase-card,
  .home-update-card,
  .discovery-book-card,
  .discovery-book-card__facts,
  .home-update-card__header,
  .discovery-book-card__header,
  .ratings-row__main {
    grid-template-columns: 1fr;
  }

  .home-update-card__update-meta,
  .discovery-book-card__stats,
  .ratings-row__stats {
    justify-items: start;
    text-align: left;
  }

  .ratings-row__link {
    width: 100%;
  }

  .book-anchor-nav {
    top: 74px;
  }
}

.recommended-shelf {
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(249, 251, 253, 0.92)),
    var(--surface);
  box-shadow: var(--shadow-soft);
}

.recommended-shelf__heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 1rem;
}

.recommended-shelf__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.recommended-shelf__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(300px, 360px);
  gap: 0.9rem;
  overflow-x: auto;
  padding-bottom: 0.25rem;
  scroll-snap-type: x mandatory;
}

.recommended-shelf__track::-webkit-scrollbar {
  height: 10px;
}

.recommended-shelf__track::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 26%, transparent);
}

.recommended-shelf-card {
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 0.85rem;
  padding: 0.85rem;
  min-height: 100%;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--theme-accent, var(--accent)) 18%, var(--line));
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--theme-accent, var(--accent)) 8%, transparent), transparent 56%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(249, 244, 236, 0.88));
  box-shadow: var(--shadow-soft);
  scroll-snap-align: start;
}

.recommended-shelf-card__cover-wrap {
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 16px;
}

.recommended-shelf-card__cover,
.recommended-shelf-card__cover-fallback {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.recommended-shelf-card__cover-fallback {
  display: grid;
  place-items: center;
}

.recommended-shelf-card__body {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 0.65rem;
  min-height: 100%;
  min-width: 0;
}

.recommended-shelf-card__meta {
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.recommended-shelf-card__meta h3 {
  margin: 0;
  font-family: var(--font-display), Georgia, serif;
  font-size: clamp(1.1rem, 1.4vw, 1.28rem);
  line-height: 1.08;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.recommended-shelf-card__author {
  display: block;
  color: var(--muted);
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.recommended-shelf-card__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.recommended-shelf-card__stats span {
  display: inline-flex;
  align-items: center;
  min-height: 1.9rem;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--theme-accent, var(--accent)) 15%, var(--line));
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.recommended-shelf-card__description {
  color: var(--muted);
  line-height: 1.65;
}

.recommended-shelf-card__quote {
  margin: 0;
  padding: 0.8rem 0.9rem;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--theme-accent, var(--accent)) 14%, var(--line));
  background: color-mix(in srgb, var(--theme-accent, var(--accent)) 6%, rgba(255, 255, 255, 0.84));
}

.recommended-shelf-card__quote p,
.recommended-shelf-card__quote footer {
  margin: 0;
}

.recommended-shelf-card__quote footer {
  margin-top: 0.45rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.recommended-shelf-card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  align-items: center;
  margin-top: auto;
}

.book-cover__zoom-trigger {
  width: 100%;
  height: 100%;
  padding: 0;
  border: none;
  background: transparent;
  cursor: zoom-in;
}

.book-cover__zoom-trigger img,
.book-cover__zoom-trigger .cover-poster {
  transition: transform 180ms ease;
}

.book-cover__zoom-trigger:hover img,
.book-cover__zoom-trigger:hover .cover-poster {
  transform: scale(1.03);
}

.book-cover-lightbox {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.book-cover-lightbox__backdrop {
  position: absolute;
  inset: 0;
  border: none;
  background: rgba(8, 12, 20, 0.76);
}

.book-cover-lightbox__content {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.8rem;
  justify-items: end;
  max-width: min(90vw, 720px);
  width: 100%;
}

.book-cover-lightbox__frame {
  width: 100%;
  max-height: calc(100vh - 100px);
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid color-mix(in srgb, var(--line) 88%, transparent);
  background: rgba(255, 255, 255, 0.06);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.28);
}

.book-cover-lightbox__image,
.book-cover-lightbox__poster {
  width: 100%;
  max-height: calc(100vh - 100px);
  object-fit: contain;
}

.book-cover-lightbox__poster {
  min-height: 70vh;
}

.discovery-book-card__facts .subtle-link,
.home-update-card__stats .subtle-link {
  color: var(--ink);
}

.genre-showcase-card__cover-book-author,
.recommended-shelf-card__author {
  color: var(--muted);
}

.genre-showcase-card__cover-book-author:hover,
.genre-showcase-card__cover-book-author:focus-visible,
.recommended-shelf-card__author:hover,
.recommended-shelf-card__author:focus-visible {
  color: var(--accent-strong);
}

[data-site-theme="night"] .recommended-shelf,
[data-site-theme="night"] .recommended-shelf-card {
  background:
    linear-gradient(180deg, rgba(30, 38, 49, 0.96), rgba(18, 24, 33, 0.94)),
    rgba(18, 24, 33, 0.92);
}

[data-site-theme="night"] .recommended-shelf-card__stats span,
[data-site-theme="night"] .book-cover-lightbox__frame {
  background: rgba(31, 40, 52, 0.9);
}

[data-site-theme="night"] .recommended-shelf-card__description,
[data-site-theme="night"] .recommended-shelf-card__quote p {
  color: #aeb8c4;
}

@media (max-width: 920px) {
  .recommended-shelf__heading {
    grid-template-columns: 1fr;
  }

  .recommended-shelf__track {
    grid-auto-columns: minmax(280px, 90vw);
  }
}

@media (max-width: 720px) {
  .recommended-shelf-card {
    grid-template-columns: 1fr;
  }
}

.genre-showcase-card__cover-book,
.genre-showcase-card__top-book {
  display: grid;
  gap: 0.22rem;
  padding: 0.8rem 0.9rem;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--theme-accent, var(--accent)) 14%, var(--line));
  background: color-mix(in srgb, var(--theme-accent, var(--accent)) 6%, rgba(255, 255, 255, 0.84));
}

.genre-showcase-card__cover-book span,
.genre-showcase-card__cover-book small,
.genre-showcase-card__top-book span,
.genre-showcase-card__top-book small {
  color: var(--muted);
}

.genre-showcase-card__cover-book a,
.genre-showcase-card__top-book a {
  font-weight: 700;
  color: var(--ink);
}

.profile-page-layout,
.messages-page {
  display: grid;
  gap: 1rem;
}

.profile-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  gap: 1rem;
}

.profile-hero__main,
.profile-sidebar,
.profile-sidebar__stats,
.profile-content-layout,
.profile-shelf-counters,
.profile-tabs,
.profile-activity-list,
.profile-card-list,
.messages-inbox__list,
.messages-thread,
.messages-thread__list,
.profile-wall__list {
  display: grid;
  gap: 0.8rem;
}

.profile-hero__handle {
  margin: 0;
  color: var(--theme-accent, var(--accent-strong));
  font-weight: 700;
}

.profile-hero__bio {
  margin: 0;
  max-width: 64ch;
  color: var(--muted);
  line-height: 1.7;
}

.profile-shelf-counters {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.profile-shelf-counters__item,
.profile-sidebar__stat,
.profile-tabs__link,
.profile-book-card,
.profile-review-card,
.profile-activity-card,
.messages-inbox__item,
.messages-thread__message,
.profile-wall__message {
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--line) 86%, transparent);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.profile-shelf-counters__item,
.profile-sidebar__stat {
  display: grid;
  gap: 0.25rem;
  padding: 0.9rem 1rem;
}

.profile-shelf-counters__item span,
.profile-sidebar__stat span,
.profile-book-card__meta,
.profile-review-card__meta,
.profile-activity-card__meta,
.messages-inbox__item-meta,
.profile-wall__message-top span {
  color: var(--muted);
}

.profile-shelf-counters__item strong,
.profile-sidebar__stat strong {
  font-size: 1.25rem;
}

.profile-content-layout {
  grid-template-columns: minmax(0, 1fr) 360px;
  align-items: start;
}

.profile-tabs {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
}

.profile-tabs__link {
  padding: 0.8rem 0.95rem;
  text-align: center;
  font-weight: 700;
}

.profile-tabs__link.is-active {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
  color: var(--ink);
}

.profile-book-card,
.profile-review-card,
.profile-activity-card,
.messages-inbox__item,
.profile-wall__message {
  padding: 1rem 1.05rem;
}

.profile-book-card,
.profile-activity-card,
.messages-inbox__item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.8rem;
  align-items: center;
}

.profile-book-card p,
.profile-review-card p,
.profile-activity-card p,
.messages-inbox__item span,
.messages-thread__message p,
.profile-wall__message p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.profile-review-card__top,
.profile-wall__message-top,
.messages-thread__message-top {
  display: flex;
  justify-content: space-between;
  gap: 0.8rem;
  align-items: flex-start;
}

.profile-editor,
.profile-wall__composer,
.messages-thread__composer,
.user-library-control {
  display: grid;
  gap: 0.7rem;
}

.profile-editor__summary {
  list-style: none;
}

.profile-editor__summary::-webkit-details-marker {
  display: none;
}

.profile-editor__form,
.messages-thread__composer,
.profile-wall__composer {
  display: grid;
  gap: 0.75rem;
}

.profile-editor__field,
.user-library-control__field {
  display: grid;
  gap: 0.35rem;
}

.profile-editor__field span,
.user-library-control__field span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.profile-editor__field input,
.profile-editor__field textarea,
.profile-wall__composer textarea,
.messages-thread__composer textarea,
.user-library-control__field select {
  width: 100%;
  border-radius: 14px;
  border: 1px solid color-mix(in srgb, var(--line) 86%, transparent);
  background: var(--surface-soft);
  color: var(--ink);
  padding: 0.85rem 0.95rem;
  font: inherit;
}

.profile-editor__actions,
.profile-wall__actions,
.messages-thread__composer-actions,
.profile-hero__actions,
.profile-message-trigger {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  align-items: center;
}

.profile-editor__error,
.profile-editor__message,
.profile-wall__error,
.profile-message-trigger__error,
.messages-thread__error,
.user-library-control__error {
  margin: 0;
  font-size: 0.9rem;
}

.profile-editor__error,
.profile-wall__error,
.profile-message-trigger__error,
.messages-thread__error,
.user-library-control__error {
  color: #d64b4b;
}

.profile-editor__message {
  color: #2f8a52;
}

.messages-inbox__item-copy,
.messages-inbox__item-meta {
  display: grid;
  gap: 0.25rem;
}

.messages-inbox__item-meta {
  justify-items: end;
}

.messages-inbox__item-meta b,
.site-account__badge {
  display: inline-grid;
  place-items: center;
  min-width: 1.5rem;
  min-height: 1.5rem;
  padding: 0 0.38rem;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
}

.messages-thread__message {
  max-width: min(720px, 100%);
}

.messages-thread__message.is-own {
  margin-left: auto;
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
}

.profile-sidebar__stat:hover,
.profile-shelf-counters__item:hover,
.profile-tabs__link:hover,
.messages-inbox__item:hover {
  transform: translateY(-1px);
}

.book-hero__aside .user-library-control {
  padding: 0.95rem 1rem;
  border-radius: 18px;
  border: 1px solid color-mix(in srgb, var(--line) 86%, transparent);
  background: var(--surface);
}

[data-site-theme="night"] {
  --bg: #08101c;
  --bg-deep: #060d17;
  --surface: rgba(13, 22, 34, 0.92);
  --surface-strong: #101b2a;
  --surface-soft: #152235;
  --ink: #f6fbff;
  --muted: #adc0dc;
}

[data-site-theme="night"] .site-header,
[data-site-theme="night"] .site-mobile-nav,
[data-site-theme="night"] .detail-panel,
[data-site-theme="night"] .recommended-shelf,
[data-site-theme="night"] .recommended-shelf-card,
[data-site-theme="night"] .genre-showcase-card,
[data-site-theme="night"] .home-rail-card,
[data-site-theme="night"] .home-update-card,
[data-site-theme="night"] .book-hero,
[data-site-theme="night"] .source-rating-row,
[data-site-theme="night"] .book-rating-widget,
[data-site-theme="night"] .comment-card,
[data-site-theme="night"] .comment-group,
[data-site-theme="night"] .auth-card,
[data-site-theme="night"] .messages-inbox__item,
[data-site-theme="night"] .messages-thread__message,
[data-site-theme="night"] .profile-shelf-counters__item,
[data-site-theme="night"] .profile-sidebar__stat,
[data-site-theme="night"] .profile-book-card,
[data-site-theme="night"] .profile-review-card,
[data-site-theme="night"] .profile-activity-card,
[data-site-theme="night"] .profile-wall__message,
[data-site-theme="night"] .book-hero__aside .user-library-control {
  background: var(--surface);
}

[data-site-theme="night"] .profile-editor__field input,
[data-site-theme="night"] .profile-editor__field textarea,
[data-site-theme="night"] .profile-wall__composer textarea,
[data-site-theme="night"] .messages-thread__composer textarea,
[data-site-theme="night"] .user-library-control__field select,
[data-site-theme="night"] .site-header__search-field input,
[data-site-theme="night"] .comment-form__textarea,
[data-site-theme="night"] .auth-form__field input {
  background: var(--surface-soft);
  color: var(--ink);
  border-color: color-mix(in srgb, var(--accent) 12%, var(--line));
}

[data-site-theme="night"] .site-brand__text small,
[data-site-theme="night"] .muted,
[data-site-theme="night"] .profile-review-card p,
[data-site-theme="night"] .profile-book-card p,
[data-site-theme="night"] .profile-activity-card p,
[data-site-theme="night"] .messages-thread__message p,
[data-site-theme="night"] .messages-inbox__item span,
[data-site-theme="night"] .profile-wall__message p,
[data-site-theme="night"] .book-description,
[data-site-theme="night"] .comment-card__body,
[data-site-theme="night"] .featured-praise-card__body,
[data-site-theme="night"] .home-update-card__description,
[data-site-theme="night"] .genre-showcase-card__description {
  color: var(--muted);
}

[data-site-theme="night"] .site-nav__link,
[data-site-theme="night"] .subtle-link,
[data-site-theme="night"] .genre-showcase-card__cover-book a,
[data-site-theme="night"] .genre-showcase-card__top-book a,
[data-site-theme="night"] .home-rail-quote__title {
  color: #d7e7ff;
}

[data-site-theme="night"] .genre-showcase-card__cover-book-author,
[data-site-theme="night"] .recommended-shelf-card__author {
  color: var(--muted);
}

[data-site-theme="night"] .recommended-shelf-card__stats span,
[data-site-theme="night"] .genre-showcase-card__cover-book,
[data-site-theme="night"] .home-update-card__cover-rating span,
[data-site-theme="night"] .metric-chip,
[data-site-theme="night"] .book-cover-lightbox__frame {
  background: rgba(16, 27, 42, 0.92);
}

[data-site-theme="night"] .primary-link {
  box-shadow: 0 18px 36px rgba(242, 133, 58, 0.18);
}

@media (max-width: 980px) {
  .profile-hero,
  .profile-content-layout {
    grid-template-columns: 1fr;
  }

  .profile-shelf-counters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .profile-tabs {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .profile-book-card,
  .profile-activity-card,
  .messages-inbox__item {
    grid-template-columns: 1fr;
  }

  .messages-inbox__item-meta {
    justify-items: start;
  }
}

/* Monochrome text + profile refresh */

:root {
  --ink: #111111;
  --muted: #4f4f4f;
}

[data-site-theme="night"] {
  --ink: #f5f5f5;
  --muted: #d1d5db;
}

.site-brand,
.site-nav__link,
.subtle-link,
.profile-hero__handle,
.book-rating-summary__eyebrow,
.book-rating-widget__eyebrow,
.book-rating-summary__chapters,
.description-disclosure__action,
.genre-disclosure__summary,
.genre-disclosure__action,
.comment-group__summary,
.comment-card__summary-action,
.featured-comments__action,
.genre-chip,
.featured-comments__title,
.hero-callout__label,
.discovery-book-card__summary,
.ratings-row__index,
.home-rail-list__index,
.home-rail-list__value {
  color: var(--ink);
}

.site-brand small,
.site-nav,
.site-account__meta span,
.profile-hero__bio,
.profile-hero__handle,
.book-rating-summary__eyebrow,
.book-rating-widget__eyebrow,
.featured-comments__title,
.hero-callout__label {
  color: var(--muted);
}

.site-nav__link.is-active {
  color: var(--ink);
  background: color-mix(in srgb, var(--surface-strong) 88%, var(--line));
}

.site-nav__link:hover,
.site-nav__link:focus-visible,
.subtle-link:hover,
.subtle-link:focus-visible,
.site-brand:hover,
.site-brand:focus-visible,
.book-hero__fact-link:hover,
.profile-tabs__link:hover {
  color: var(--accent-strong);
}

.site-nav__link:hover,
.site-nav__link:focus-visible {
  background: color-mix(in srgb, var(--accent) 8%, var(--surface-strong));
}

.book-rating-summary__chapters {
  background: color-mix(in srgb, var(--surface-strong) 92%, var(--line));
}

.profile-page-layout,
.messages-page,
.settings-page {
  display: grid;
  gap: 1rem;
}

.profile-hero {
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 1rem;
  padding: 1rem;
}

.profile-hero__banner {
  grid-column: 1 / -1;
  position: relative;
  overflow: hidden;
  min-height: 220px;
  border-radius: 24px;
  border: 1px solid color-mix(in srgb, var(--line) 84%, transparent);
  background: linear-gradient(135deg, color-mix(in srgb, var(--surface-strong) 88%, var(--line)), color-mix(in srgb, var(--surface-soft) 80%, var(--bg)));
}

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

.profile-hero__banner-fallback {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top left, color-mix(in srgb, var(--accent) 20%, transparent), transparent 34%),
    linear-gradient(145deg, color-mix(in srgb, var(--surface-strong) 90%, var(--bg)), color-mix(in srgb, var(--surface-soft) 84%, var(--bg-deep)));
}

.profile-hero__content {
  display: grid;
  gap: 1rem;
  align-content: start;
}

.profile-hero__identity {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
  align-items: end;
  margin-top: -4.2rem;
  padding: 0 0.4rem;
}

.profile-hero__avatar {
  position: relative;
  overflow: hidden;
  display: grid;
  place-items: center;
  width: 128px;
  height: 128px;
  border-radius: 28px;
  border: 4px solid var(--surface-strong);
  background: color-mix(in srgb, var(--surface-strong) 92%, var(--line));
  box-shadow: var(--shadow-soft);
}

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

.profile-hero__avatar span {
  font-family: var(--font-display), Georgia, serif;
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
}

.profile-hero__copy {
  display: grid;
  gap: 0.4rem;
  align-content: end;
}

.profile-hero__copy h1 {
  margin: 0;
  font-family: var(--font-display), Georgia, serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 0.95;
}

.profile-hero__handle {
  margin: 0;
  font-weight: 700;
}

.profile-hero__bio {
  margin: 0;
  max-width: 64ch;
  line-height: 1.7;
}

.profile-overview-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.profile-settings-form {
  gap: 1.2rem;
}

.profile-settings-form__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
  gap: 1rem;
}

.profile-settings-form__panel,
.profile-settings-media {
  display: grid;
  gap: 0.85rem;
}

.profile-settings-form__panel h2 {
  margin: 0;
  font-family: var(--font-display), Georgia, serif;
  font-size: 1.65rem;
}

.profile-settings-form__field {
  display: grid;
  gap: 0.42rem;
}

.profile-settings-form__field span {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.profile-settings-form__field input,
.profile-settings-form__field textarea {
  width: 100%;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--line) 86%, transparent);
  background: var(--surface-soft);
  color: var(--ink);
  font: inherit;
}

.profile-settings-form__field input:not([type="file"]) {
  min-height: 3rem;
  padding: 0.82rem 0.95rem;
}

.profile-settings-form__field textarea {
  min-height: 9.5rem;
  padding: 0.95rem 1rem;
  resize: vertical;
}

.profile-settings-media__preview {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid color-mix(in srgb, var(--line) 86%, transparent);
  background: color-mix(in srgb, var(--surface-strong) 90%, var(--line));
}

.profile-settings-media__preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-settings-media__preview--banner {
  min-height: 180px;
}

.profile-settings-media__preview--banner span,
.profile-settings-media__preview--avatar span {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  color: var(--muted);
}

.profile-settings-media__avatar-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
}

.profile-settings-media__preview--avatar {
  width: 120px;
  height: 120px;
  border-radius: 28px;
}

.profile-settings-media__preview--avatar span {
  font-family: var(--font-display), Georgia, serif;
  font-size: 2.5rem;
  color: var(--ink);
}

.profile-settings-media__copy {
  display: grid;
  gap: 0.2rem;
}

.profile-settings-media__copy span {
  color: var(--muted);
}

.profile-settings-media__actions,
.profile-settings-form__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
  align-items: center;
}

.profile-settings-form__error,
.profile-settings-form__message {
  margin: 0;
  font-size: 0.92rem;
}

.profile-settings-form__error {
  color: #d64b4b;
}

.profile-settings-form__message {
  color: #2f8a52;
}

[data-site-theme="night"] .site-nav__link,
[data-site-theme="night"] .subtle-link,
[data-site-theme="night"] .profile-hero__handle,
[data-site-theme="night"] .site-brand,
[data-site-theme="night"] .book-rating-summary__chapters,
[data-site-theme="night"] .ratings-row__index,
[data-site-theme="night"] .home-rail-list__index,
[data-site-theme="night"] .home-rail-list__value {
  color: var(--ink);
}

[data-site-theme="night"] .site-brand small,
[data-site-theme="night"] .site-account__meta span,
[data-site-theme="night"] .profile-hero__bio,
[data-site-theme="night"] .book-rating-summary__eyebrow,
[data-site-theme="night"] .book-rating-widget__eyebrow {
  color: var(--muted);
}

@media (max-width: 1100px) {
  .profile-hero,
  .profile-content-layout,
  .profile-settings-form__grid {
    grid-template-columns: 1fr;
  }

  .profile-overview-grid {
    grid-template-columns: 1fr;
  }

  .profile-sidebar {
    order: 3;
  }
}

@media (max-width: 720px) {
  .profile-hero {
    padding: 0.8rem;
  }

  .profile-hero__banner {
    min-height: 160px;
  }

  .profile-hero__identity {
    grid-template-columns: 1fr;
    margin-top: -2.8rem;
  }

  .profile-hero__avatar {
    width: 104px;
    height: 104px;
  }

  .profile-settings-media__avatar-row {
    grid-template-columns: 1fr;
  }
}

.genre-showcase-card__top-book {
  display: none;
}

@media (max-width: 820px) {
  .home-section,
  .discovery-results,
  .ratings-list,
  .home-rail-card,
  .discovery-panel,
  .recommended-shelf {
    padding: 0.9rem;
  }

  .section-heading--dense h2 {
    font-size: clamp(1.65rem, 6vw, 1.8rem);
    line-height: 1.12;
  }

  .site-header__search-field input,
  .discovery-field input,
  .discovery-field select,
  .user-library-control__field select,
  .auth-form__field input,
  .profile-settings-form__field input,
  .profile-settings-form__field textarea {
    font-size: 16px;
  }

  .primary-link,
  .ghost-button,
  .genre-chip,
  .site-nav__link,
  .site-mobile-nav__link,
  .profile-tabs__link {
    min-height: 44px;
  }

  .recommended-shelf__heading {
    gap: 0.75rem;
  }

  .recommended-shelf__controls .ghost-button {
    width: auto;
  }

  .recommended-shelf__track {
    grid-auto-columns: minmax(252px, 82vw);
    gap: 0.8rem;
  }

  .recommended-shelf-card {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 0.75rem;
    padding: 0.8rem;
    align-items: start;
  }

  .recommended-shelf-card__cover-wrap {
    width: 76px;
    max-width: 76px;
    border-radius: 14px;
  }

  .recommended-shelf-card__meta h3,
  .genre-showcase-card__header h2,
  .home-update-card__heading h2,
  .discovery-book-card__title-wrap h3 {
    font-family: var(--font-ui), "Segoe UI", sans-serif;
    font-size: 1.2rem;
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: -0.02em;
  }

  .recommended-shelf-card__meta h3,
  .home-update-card__heading h2,
  .discovery-book-card__title-wrap h3 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .recommended-shelf-card__author,
  .home-update-card__update-meta span,
  .home-update-card__update-meta strong,
  .home-update-card__stats span,
  .genre-showcase-card__description,
  .genre-showcase-card__samples span,
  .genre-showcase-card__top-book span,
  .genre-showcase-card__top-book small,
  .discovery-book-card__facts span,
  .discovery-book-card__stats,
  .description-disclosure__action,
  .genre-disclosure__summary,
  .genre-disclosure__action {
    font-size: 0.95rem;
    line-height: 1.48;
  }

  .description-disclosure__preview,
  .description-disclosure__body p,
  .home-update-card__description,
  .discovery-book-card__description {
    font-size: 1.0625rem;
    line-height: 1.56;
  }

  .description-disclosure__preview {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .genre-showcase-grid--compact {
    grid-template-columns: 1fr;
  }

  .genre-showcase-card {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 0.75rem;
    padding: 0.8rem;
    align-items: start;
  }

  .genre-showcase-card__media {
    gap: 0;
  }

  .genre-showcase-card__image-wrap {
    width: 76px;
    max-width: 76px;
    aspect-ratio: 3 / 4;
    border-radius: 14px;
  }

  .genre-showcase-card__cover-book {
    display: none;
  }

  .genre-showcase-card__top-book {
    display: grid;
    gap: 0.2rem;
  }

  .genre-showcase-card__top-book a {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.35;
  }

  .genre-showcase-card__body {
    gap: 0.65rem;
    grid-template-rows: auto auto auto 1fr auto;
  }

  .genre-showcase-card__header {
    grid-template-columns: 1fr;
    gap: 0.35rem;
  }

  .genre-showcase-card__stats {
    gap: 0.1rem;
  }

  .genre-showcase-card__description {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .genre-showcase-card__samples ul {
    gap: 0.35rem;
    padding-left: 1rem;
  }

  .genre-showcase-card__samples li:nth-child(n + 3) {
    display: none;
  }

  .home-update-card {
    grid-template-columns: 80px minmax(0, 1fr);
    gap: 0.75rem;
    padding: 0.85rem;
    align-items: start;
  }

  .home-update-card__cover-wrap {
    width: 80px;
    max-width: 80px;
    border-radius: 14px;
  }

  .home-update-card__cover-rating span,
  .recommended-shelf-card__stats span {
    min-height: 1.85rem;
    padding: 0.25rem 0.62rem;
    font-size: 0.8125rem;
  }

  .home-update-card__header {
    grid-template-columns: 1fr;
    gap: 0.55rem;
  }

  .home-update-card__update-meta {
    justify-items: start;
    text-align: left;
    gap: 0.12rem;
  }

  .home-update-card__update-meta span,
  .home-update-card__update-meta strong {
    max-width: none;
  }

  .home-update-card__stats {
    gap: 0.45rem;
  }

  .home-update-card__stats span {
    min-height: 1.85rem;
    padding: 0.25rem 0.62rem;
    font-size: 0.8125rem;
  }

  .discovery-book-card {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 0.75rem;
    padding: 0.85rem;
    align-items: start;
  }

  .discovery-book-card__cover-wrap {
    width: 72px;
    max-width: 72px;
    min-height: auto;
    align-self: start;
    border-radius: 14px;
  }

  .discovery-book-card__body {
    gap: 0.65rem;
  }

  .discovery-book-card__header {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  .discovery-book-card__stats {
    justify-items: start;
    text-align: left;
    gap: 0.18rem;
  }

  .discovery-book-card__facts {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  .discovery-book-card__details {
    padding-top: 0.65rem;
  }

  .discovery-book-card__actions {
    gap: 0.55rem;
  }
}

@media (max-width: 720px) {
  .site-shell {
    width: min(100%, calc(100% - 14px));
  }

  .recommended-shelf-card__actions,
  .home-update-card__actions,
  .discovery-book-card__actions {
    align-items: stretch;
  }

  .discovery-book-card__quote-zone,
  .discovery-book-card__review-signals,
  .home-update-card__quote {
    display: none;
  }
}

/* Final interaction and palette overrides */
:root {
  --bg: #ffffff;
  --bg-deep: #f3f3f3;
  --surface: rgba(255, 255, 255, 0.94);
  --surface-strong: #ffffff;
  --surface-soft: rgba(0, 0, 0, 0.03);
  --ink: #050505;
  --muted: rgba(0, 0, 0, 0.72);
  --accent: #f2c94c;
  --accent-strong: #ddb100;
  --accent-soft: rgba(242, 201, 76, 0.18);
  --line: rgba(0, 0, 0, 0.12);
  --line-strong: rgba(0, 0, 0, 0.22);
  --shadow-soft: 0 14px 30px rgba(0, 0, 0, 0.08);
  --shadow: 0 24px 56px rgba(0, 0, 0, 0.12);
}

body {
  background:
    radial-gradient(circle at top left, rgba(242, 201, 76, 0.16), transparent 24%),
    linear-gradient(180deg, #ffffff 0%, var(--bg) 52%, var(--bg-deep) 100%);
}

body::before {
  opacity: 0.18;
  background:
    linear-gradient(to right, rgba(0, 0, 0, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(0, 0, 0, 0.04) 1px, transparent 1px);
}

[data-site-theme="night"] {
  --bg: #050505;
  --bg-deep: #000000;
  --surface: rgba(12, 12, 12, 0.94);
  --surface-strong: #111111;
  --surface-soft: rgba(255, 255, 255, 0.06);
  --ink: #ffffff;
  --muted: rgba(255, 255, 255, 0.76);
  --accent: #f2c94c;
  --accent-strong: #ffd84d;
  --accent-soft: rgba(242, 201, 76, 0.22);
  --line: rgba(255, 255, 255, 0.14);
  --line-strong: rgba(255, 255, 255, 0.24);
  --shadow-soft: 0 14px 30px rgba(0, 0, 0, 0.44);
  --shadow: 0 24px 56px rgba(0, 0, 0, 0.6);
}

[data-site-theme="night"] body {
  background:
    radial-gradient(circle at top left, rgba(242, 201, 76, 0.12), transparent 26%),
    linear-gradient(180deg, #090909 0%, var(--bg) 50%, var(--bg-deep) 100%);
}

.site-header,
.site-mobile-nav,
.detail-panel,
.recommended-shelf,
.recommended-shelf-card,
.genre-showcase-card,
.home-rail-card,
.home-update-card,
.book-hero,
.book-page--themed,
.discovery-panel,
.ratings-list,
.comment-card,
.comment-group,
.auth-card,
.messages-inbox__item,
.messages-thread__message,
.profile-shelf-counters__item,
.profile-sidebar__stat,
.profile-book-card,
.profile-review-card,
.profile-activity-card,
.profile-wall__message,
.book-hero__aside .user-library-control {
  background: linear-gradient(180deg, var(--surface-strong), var(--surface));
  border-color: var(--line);
  box-shadow: var(--shadow-soft);
}

.site-header {
  overflow: visible;
}

.site-header__primary,
.site-nav,
.site-header__search,
.site-header__actions,
.site-mobile-nav {
  position: relative;
}

.site-header__primary {
  z-index: 3;
}

.site-nav {
  z-index: 4;
  flex-wrap: wrap;
  pointer-events: auto;
}

.site-header__search {
  z-index: 1;
  min-width: 0;
}

.site-header__actions {
  z-index: 2;
  min-width: 0;
}

.site-brand,
.site-nav__link,
.site-mobile-nav__link,
.site-header__auth-link {
  position: relative;
  z-index: 1;
  pointer-events: auto;
  cursor: pointer;
}

.site-mobile-nav {
  z-index: 90;
  pointer-events: auto;
}

.site-mobile-nav__link,
.site-nav__link {
  min-height: 44px;
}

.site-brand,
.site-nav__link,
.site-mobile-nav__link,
.subtle-link,
.book-hero__fact-link,
.profile-hero__handle,
.book-rating-summary__eyebrow,
.book-rating-widget__eyebrow,
.book-rating-summary__chapters,
.description-disclosure__action,
.genre-disclosure__summary,
.genre-disclosure__action,
.comment-group__summary,
.comment-card__summary-action,
.featured-comments__action,
.featured-comments__title,
.hero-callout__label,
.profile-tabs__link,
.site-account__meta span,
.home-update-card__update-meta span,
.home-update-card__update-meta strong,
.genre-showcase-card__top-book small,
.genre-showcase-card__cover-book-author,
.recommended-shelf-card__author,
.muted {
  color: var(--muted);
}

.site-nav__link.is-active,
.site-mobile-nav__link.is-active,
.profile-tabs__link.is-active,
.book-anchor-nav__link:hover,
.ratings-row.is-active,
.messages-thread__message.is-own {
  color: var(--ink);
  background: color-mix(in srgb, var(--accent) 12%, var(--surface-strong));
  border-color: color-mix(in srgb, var(--accent) 35%, var(--line));
}

.site-nav__link:hover,
.site-nav__link:focus-visible,
.site-mobile-nav__link:hover,
.site-mobile-nav__link:focus-visible,
.subtle-link:hover,
.subtle-link:focus-visible,
.site-brand:hover,
.site-brand:focus-visible,
.book-hero__fact-link:hover,
.book-hero__fact-link:focus-visible,
.description-disclosure__action:hover,
.description-disclosure__action:focus-visible,
.genre-disclosure__summary:hover,
.genre-disclosure__summary:focus-visible,
.genre-disclosure__action:hover,
.genre-disclosure__action:focus-visible,
.featured-comments__action:hover,
.featured-comments__action:focus-visible,
.comment-card__summary-action:hover,
.comment-card__summary-action:focus-visible,
.profile-tabs__link:hover,
.profile-tabs__link:focus-visible {
  color: var(--accent-strong);
}

.site-nav__link:hover,
.site-nav__link:focus-visible,
.site-mobile-nav__link:hover,
.site-mobile-nav__link:focus-visible {
  background: color-mix(in srgb, var(--accent) 8%, var(--surface-strong));
}

.primary-link,
.ghost-button,
.secondary-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.68rem 0.94rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 700;
  transition:
    transform 0.18s ease,
    color 0.18s ease,
    border-color 0.18s ease,
    background 0.18s ease,
    box-shadow 0.18s ease;
}

.primary-link {
  color: #050505;
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
  border-color: color-mix(in srgb, var(--accent-strong) 46%, var(--line));
  box-shadow: 0 14px 28px rgba(242, 201, 76, 0.28);
}

.ghost-button,
.secondary-link-button {
  color: var(--ink);
  background: color-mix(in srgb, var(--surface-strong) 96%, transparent);
  border-color: var(--line-strong);
  box-shadow: var(--shadow-soft);
}

.primary-link:hover,
.ghost-button:hover,
.secondary-link-button:hover {
  transform: translateY(-1px);
}

.secondary-link-button:hover,
.secondary-link-button:focus-visible,
.ghost-button:hover,
.ghost-button:focus-visible {
  color: var(--accent-strong);
  background: color-mix(in srgb, var(--accent) 8%, var(--surface-strong));
  border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
}

.primary-link:disabled,
.ghost-button:disabled,
.ghost-button--disabled {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
  transform: none;
  box-shadow: none;
}

.site-brand__mark,
.site-account__badge,
.ratings-row__index,
.home-rail-list__index,
.home-rail-list__value {
  background: var(--accent);
  color: #050505;
  box-shadow: none;
}

.book-rating-widget__button.is-active,
.reader-chip.is-active,
.review-rating-button.is-active,
.review-chip.is-active,
.vote-button.is-active {
  color: #050505;
  border-color: color-mix(in srgb, var(--accent-strong) 46%, var(--line));
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
  box-shadow: 0 12px 24px rgba(242, 201, 76, 0.24);
}

.home-update-card__stats span,
.home-update-card__cover-rating span,
.metric-chip,
.genre-chip,
.book-rating-summary__chapters,
.review-signal-chip--positive,
.review-signal-chip--caution {
  color: var(--ink);
  border-color: color-mix(in srgb, var(--accent) 24%, var(--line));
  background: color-mix(in srgb, var(--accent) 10%, var(--surface-strong));
}

.home-update-card__quote,
.discovery-book-card__quote,
.home-rail-quote,
.hero-callout {
  border-color: color-mix(in srgb, var(--accent) 22%, var(--line));
  background: color-mix(in srgb, var(--accent) 8%, var(--surface-strong));
}

.home-rail-list__item,
.ratings-row,
.book-anchor-nav,
.reader-content,
.site-header__search-field input,
.discovery-field input,
.discovery-field select,
.user-library-control__field select,
.auth-form__field input,
.profile-settings-form__field input,
.profile-settings-form__field textarea,
.profile-editor__field input,
.profile-editor__field textarea,
.profile-wall__composer textarea,
.messages-thread__composer textarea,
.comment-form__textarea {
  background: color-mix(in srgb, var(--surface-strong) 96%, transparent);
  color: var(--ink);
  border-color: var(--line);
}

.home-update-card__header,
.home-update-card__story,
.book-hero__content,
.book-hero__composition {
  align-content: start;
}

.book-hero__description-block {
  margin-top: -0.15rem;
}

.discovery-book-card__description,
.home-update-card__description,
.book-description {
  color: var(--muted);
}

@media (max-width: 980px) {
  .site-header__primary,
  .site-header__actions {
    flex-wrap: wrap;
  }
}

@media (max-width: 720px) {
  .site-header,
  .site-mobile-nav,
  .recommended-shelf-card,
  .genre-showcase-card,
  .home-update-card,
  .discovery-book-card,
  .ratings-row,
  .book-hero,
  .detail-panel,
  .auth-card,
  .profile-book-card,
  .profile-review-card,
  .profile-activity-card,
  .messages-inbox__item,
  .messages-thread__message,
  .profile-wall__message {
    color: var(--ink);
  }

  .site-header h1,
  .site-header h2,
  .site-header h3,
  .site-header strong,
  .site-mobile-nav strong,
  .recommended-shelf-card h3,
  .genre-showcase-card h3,
  .home-update-card h2,
  .discovery-book-card h3,
  .ratings-row strong,
  .book-hero h1,
  .detail-panel h2,
  .detail-panel h3,
  .auth-card h1,
  .auth-card h2,
  .profile-book-card h3,
  .profile-review-card h3,
  .profile-activity-card h3,
  .messages-inbox__item strong,
  .messages-thread__message strong,
  .profile-wall__message strong {
    color: var(--ink);
  }

  .site-header p,
  .site-header span,
  .site-header small,
  .site-mobile-nav span,
  .recommended-shelf-card p,
  .recommended-shelf-card span,
  .recommended-shelf-card small,
  .genre-showcase-card p,
  .genre-showcase-card span,
  .genre-showcase-card small,
  .home-update-card p,
  .home-update-card span,
  .home-update-card small,
  .discovery-book-card p,
  .discovery-book-card span,
  .discovery-book-card small,
  .ratings-row p,
  .ratings-row span,
  .book-hero p,
  .book-hero span,
  .book-hero small,
  .detail-panel p,
  .detail-panel span,
  .detail-panel small,
  .auth-card p,
  .auth-card span,
  .auth-card small,
  .profile-book-card p,
  .profile-book-card span,
  .profile-book-card small,
  .profile-review-card p,
  .profile-review-card span,
  .profile-review-card small,
  .profile-activity-card p,
  .profile-activity-card span,
  .profile-activity-card small,
  .messages-inbox__item p,
  .messages-inbox__item span,
  .messages-thread__message p,
  .messages-thread__message span,
  .profile-wall__message p,
  .profile-wall__message span {
    color: inherit;
  }

  .muted,
  .site-brand__text small,
  .site-account__meta span,
  .recommended-shelf-card__author,
  .genre-showcase-card__cover-book-author,
  .genre-showcase-card__description,
  .home-update-card__description,
  .home-update-card__update-meta,
  .discovery-book-card__description,
  .book-description,
  .book-rating-summary__eyebrow,
  .book-rating-widget__eyebrow,
  .profile-hero__handle,
  .profile-hero__bio,
  .messages-inbox__item-meta span {
    color: var(--muted) !important;
  }

  .primary-link,
  .secondary-link-button,
  .ghost-button,
  .site-nav__link,
  .site-mobile-nav__link {
    color: var(--ink);
  }
}

[data-site-theme="night"] .recommended-shelf-card__stats span,
[data-site-theme="night"] .home-update-card__cover-rating span,
[data-site-theme="night"] .home-update-card__stats span,
[data-site-theme="night"] .book-rating-summary__chapters {
  background: rgba(255, 255, 255, 0.08) !important;
  color: var(--ink) !important;
  border-color: rgba(242, 201, 76, 0.34) !important;
}

@media (max-width: 720px) {
  [data-site-theme="night"] .recommended-shelf-card__stats span,
  [data-site-theme="night"] .home-update-card__cover-rating span,
  [data-site-theme="night"] .home-update-card__stats span,
  [data-site-theme="night"] .book-rating-summary__chapters {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #ffffff !important;
    border-color: rgba(242, 201, 76, 0.42) !important;
  }
}

[data-site-theme="night"] .home-hero__stat,
[data-site-theme="night"] .discovery-page__intro-meta,
[data-site-theme="night"] .home-rail-list__item,
[data-site-theme="night"] .home-rail-quote,
[data-site-theme="night"] .book-rating-summary,
[data-site-theme="night"] .recommended-shelf-card__stats span,
[data-site-theme="night"] .home-update-card__cover-rating span,
[data-site-theme="night"] .home-update-card__stats span,
[data-site-theme="night"] .book-rating-summary__chapters,
[data-site-theme="night"] .featured-comments__item,
[data-site-theme="night"] .recommended-shelf-card__quote,
[data-site-theme="night"] .home-update-card__quote,
[data-site-theme="night"] .genre-showcase-card__image-wrap,
[data-site-theme="night"] .genre-showcase-card__cover-book,
[data-site-theme="night"] .genre-showcase-card__top-book,
[data-site-theme="night"] .metric-chip,
[data-site-theme="night"] .genre-chip,
[data-site-theme="night"] .review-signal-chip--positive,
[data-site-theme="night"] .review-signal-chip--caution {
  background: color-mix(in srgb, var(--surface-strong) 94%, black) !important;
  border-color: rgba(242, 201, 76, 0.28) !important;
}

[data-site-theme="night"] .home-hero__stat,
[data-site-theme="night"] .discovery-page__intro-meta,
[data-site-theme="night"] .home-rail-list__item,
[data-site-theme="night"] .home-rail-quote,
[data-site-theme="night"] .book-rating-summary,
[data-site-theme="night"] .recommended-shelf-card__stats span,
[data-site-theme="night"] .home-update-card__cover-rating span,
[data-site-theme="night"] .home-update-card__stats span,
[data-site-theme="night"] .book-rating-summary__chapters,
[data-site-theme="night"] .featured-comments__item,
[data-site-theme="night"] .recommended-shelf-card__quote,
[data-site-theme="night"] .home-update-card__quote,
[data-site-theme="night"] .genre-showcase-card__cover-book,
[data-site-theme="night"] .genre-showcase-card__top-book,
[data-site-theme="night"] .metric-chip,
[data-site-theme="night"] .genre-chip,
[data-site-theme="night"] .review-signal-chip--positive,
[data-site-theme="night"] .review-signal-chip--caution,
[data-site-theme="night"] .home-hero__stat *,
[data-site-theme="night"] .discovery-page__intro-meta *,
[data-site-theme="night"] .home-rail-list__item *,
[data-site-theme="night"] .home-rail-quote *,
[data-site-theme="night"] .book-rating-summary *,
[data-site-theme="night"] .recommended-shelf-card__stats span *,
[data-site-theme="night"] .home-update-card__cover-rating span *,
[data-site-theme="night"] .home-update-card__stats span *,
[data-site-theme="night"] .book-rating-summary__chapters *,
[data-site-theme="night"] .featured-comments__item *,
[data-site-theme="night"] .recommended-shelf-card__quote *,
[data-site-theme="night"] .home-update-card__quote *,
[data-site-theme="night"] .genre-showcase-card__cover-book *,
[data-site-theme="night"] .genre-showcase-card__top-book *,
[data-site-theme="night"] .metric-chip *,
[data-site-theme="night"] .genre-chip *,
[data-site-theme="night"] .review-signal-chip--positive *,
[data-site-theme="night"] .review-signal-chip--caution * {
  color: var(--ink) !important;
}

[data-site-theme="night"] .book-rating-summary {
  background:
    linear-gradient(180deg, rgba(22, 22, 22, 0.96), rgba(10, 10, 10, 0.94)) !important;
  border-color: rgba(242, 201, 76, 0.28) !important;
}

[data-site-theme="night"] .book-rating-summary__eyebrow,
[data-site-theme="night"] .book-rating-summary__meta span {
  color: var(--muted) !important;
}

[data-site-theme="night"] .book-rating-summary__score,
[data-site-theme="night"] .book-rating-summary__score-line,
[data-site-theme="night"] .book-rating-summary__score-block,
[data-site-theme="night"] .book-rating-summary__pills {
  color: var(--ink) !important;
}

[data-site-theme="night"] .featured-comments__item {
  background:
    linear-gradient(180deg, rgba(22, 22, 22, 0.96), rgba(10, 10, 10, 0.94)) !important;
  border-color: rgba(242, 201, 76, 0.24) !important;
}

[data-site-theme="night"] .featured-comments__body,
[data-site-theme="night"] .featured-comments__summary,
[data-site-theme="night"] .featured-comments__meta strong {
  color: var(--ink) !important;
}

[data-site-theme="night"] .featured-comments__meta span {
  color: var(--muted) !important;
}

/* Reader reset and minimal reading mode */
.reader-page--minimal {
  gap: 0;
  padding: 0;
  border: none;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  overflow: visible;
}

.reader-page--minimal::after {
  display: none;
}

.reader-page--minimal .reader-content {
  width: min(100%, 74ch);
  margin: 0 auto;
  padding: clamp(0.2rem, 1vw, 0.6rem) 0 1.8rem;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #111111;
  font-family: Georgia, "Times New Roman", serif;
  font-size: calc(1.14rem * var(--reader-font-scale));
  line-height: 1.9;
}

.reader-page--minimal .reader-content,
.reader-page--minimal .reader-content p,
.reader-page--minimal .reader-content li,
.reader-page--minimal .reader-content blockquote,
.reader-page--minimal .reader-content h1,
.reader-page--minimal .reader-content h2,
.reader-page--minimal .reader-content h3,
.reader-page--minimal .reader-content h4 {
  color: inherit;
}

.reader-page--minimal .reader-content h1,
.reader-page--minimal .reader-content h2,
.reader-page--minimal .reader-content h3,
.reader-page--minimal .reader-content h4 {
  margin-top: 1.7rem;
  margin-bottom: 0.85rem;
  font-family: var(--font-display), Georgia, serif;
  line-height: 1.1;
}

.reader-page--minimal .reader-content a {
  color: var(--accent-strong);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.16em;
}

.reader-page--minimal .reader-content img {
  border-radius: 18px;
  border: 1px solid var(--line);
}

.reader-page--minimal.reader-page--line-compact .reader-content {
  line-height: 1.72;
}

.reader-page--minimal.reader-page--line-relaxed .reader-content {
  line-height: 1.9;
}

.reader-page--minimal.reader-page--line-airy .reader-content {
  line-height: 2.08;
}

.reader-page--minimal .reader-nav {
  width: min(100%, 74ch);
  margin: 0 auto 2.8rem;
}

.reader-nav--minimal {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
}

.reader-nav__button {
  width: 100%;
  min-width: 0;
}

.reader-scroll-header {
  position: fixed;
  top: max(0.7rem, calc(env(safe-area-inset-top) + 0.3rem));
  left: 50%;
  z-index: 72;
  width: min(980px, calc(100% - 1rem));
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -0.85rem);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.reader-scroll-header.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.reader-scroll-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 52px;
  padding: 0.75rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-strong) 94%, transparent);
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(16px);
}

.reader-scroll-header__site,
.reader-scroll-header__book {
  min-width: 0;
  font-weight: 700;
  color: var(--ink);
}

.reader-scroll-header__site:hover,
.reader-scroll-header__site:focus-visible,
.reader-scroll-header__book:hover,
.reader-scroll-header__book:focus-visible {
  color: var(--accent-strong);
}

.reader-scroll-header__book {
  max-width: 55%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
}

.reader-settings-gear {
  position: fixed;
  top: 50%;
  right: max(0.9rem, calc(env(safe-area-inset-right) + 0.7rem));
  z-index: 76;
  width: 3.15rem;
  height: 3.15rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-strong) 95%, transparent);
  color: var(--ink);
  font: inherit;
  font-size: 1.35rem;
  cursor: pointer;
  box-shadow: var(--shadow-soft);
  transform: translateY(-50%);
  transition:
    transform 180ms ease,
    background 180ms ease,
    color 180ms ease,
    border-color 180ms ease;
}

.reader-settings-gear:hover,
.reader-settings-gear:focus-visible {
  transform: translateY(-50%) scale(1.03);
  color: var(--accent-strong);
  border-color: color-mix(in srgb, var(--accent) 38%, var(--line));
}

.reader-settings-gear.is-open {
  color: #050505;
  background: linear-gradient(180deg, var(--accent), var(--accent-strong));
  border-color: color-mix(in srgb, var(--accent-strong) 46%, var(--line));
}

.reader-settings-overlay {
  position: fixed;
  inset: 0;
  z-index: 74;
  border: none;
  background: transparent;
}

.reader-settings-popover {
  position: fixed;
  top: 50%;
  right: max(4.75rem, calc(env(safe-area-inset-right) + 4.65rem));
  z-index: 75;
  display: grid;
  gap: 1rem;
  width: min(320px, calc(100vw - 6rem));
  padding: 1rem;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface-strong) 96%, transparent);
  box-shadow: var(--shadow);
  transform: translateY(-50%);
  backdrop-filter: blur(16px);
}

.reader-settings-popover__header {
  display: grid;
  gap: 0.2rem;
}

.reader-settings-popover__header strong {
  font-size: 1rem;
  line-height: 1.2;
}

.reader-settings-popover__theme .site-theme-toggle {
  width: 100%;
  justify-content: center;
}

.reader-settings-popover .reader-controls {
  gap: 1rem;
}

.reader-settings-popover .reader-control-group {
  gap: 0.65rem;
}

.reader-settings-popover .reader-control-group__label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.reader-settings-popover .reader-inline-controls {
  align-items: center;
}

.reader-inline-value {
  min-width: 3.4rem;
  text-align: center;
  font-weight: 700;
  color: var(--ink);
}

[data-site-theme="night"] .reader-page--minimal .reader-content,
[data-site-theme="night"] .reader-page--minimal .reader-content p,
[data-site-theme="night"] .reader-page--minimal .reader-content li,
[data-site-theme="night"] .reader-page--minimal .reader-content blockquote,
[data-site-theme="night"] .reader-page--minimal .reader-content h1,
[data-site-theme="night"] .reader-page--minimal .reader-content h2,
[data-site-theme="night"] .reader-page--minimal .reader-content h3,
[data-site-theme="night"] .reader-page--minimal .reader-content h4 {
  color: rgba(255, 255, 255, 0.94);
}

[data-site-theme="night"] .reader-page--minimal .reader-content a {
  color: #ffe17b;
}

[data-site-theme="night"] .reader-scroll-header__inner,
[data-site-theme="night"] .reader-settings-popover,
[data-site-theme="night"] .reader-settings-gear,
[data-site-theme="night"] .reader-page--minimal .ghost-button,
[data-site-theme="night"] .reader-page--minimal .reader-chip {
  background: rgba(16, 16, 16, 0.96);
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.34);
}

[data-site-theme="night"] .reader-settings-gear.is-open,
[data-site-theme="night"] .reader-page--minimal .reader-chip.is-active {
  color: #050505;
}

[data-site-theme="night"] .reader-page--minimal .reader-control-group__label,
[data-site-theme="night"] .reader-inline-value {
  color: rgba(255, 255, 255, 0.84);
}

@media (max-width: 920px) {
  .reader-scroll-header {
    width: calc(100% - 0.75rem);
  }

  .reader-scroll-header__inner {
    min-height: 48px;
    padding: 0.68rem 0.85rem;
  }

  .reader-settings-gear {
    width: 2.9rem;
    height: 2.9rem;
    right: max(0.65rem, calc(env(safe-area-inset-right) + 0.5rem));
    font-size: 1.22rem;
  }

  .reader-settings-popover {
    width: min(280px, calc(100vw - 5.4rem));
    right: max(4.1rem, calc(env(safe-area-inset-right) + 4rem));
  }
}

@media (max-width: 720px) {
  .reader-page--minimal .reader-content {
    width: calc(100% - 0.85rem);
    padding-bottom: 1.3rem;
    font-size: calc(1.08rem * var(--reader-font-scale));
  }

  .reader-scroll-header {
    top: max(0.45rem, calc(env(safe-area-inset-top) + 0.15rem));
    width: calc(100% - 0.5rem);
  }

  .reader-scroll-header__site,
  .reader-scroll-header__book {
    font-size: 0.92rem;
  }

  .reader-scroll-header__book {
    max-width: 56%;
  }

  .reader-settings-popover {
    top: 50%;
    transform: translateY(-50%);
    gap: 0.9rem;
    padding: 0.9rem;
  }

  .reader-nav--minimal {
    gap: 0.6rem;
  }

  .reader-nav__button {
    min-height: 46px;
    padding-inline: 0.7rem;
    font-size: 0.94rem;
  }
}

/* Stable disclosures and book-page black/white theme */
.description-disclosure__action,
.featured-comments__action,
.genre-disclosure__summary {
  padding: 0;
  border: none;
  background: transparent;
  text-align: left;
  font: inherit;
  cursor: pointer;
}

.description-disclosure--inline,
.description-disclosure--overlay-card,
.genre-disclosure,
.featured-comments__item {
  display: grid;
  gap: 0.55rem;
}

.description-disclosure__text,
.featured-comments__body {
  margin: 0;
  line-height: 1.68;
}

.description-disclosure--overlay-card .description-disclosure__text {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.genre-disclosure__details {
  display: grid;
  gap: 0.45rem;
}

.content-overlay {
  position: fixed;
  inset: 0;
  z-index: 160;
}

.content-overlay__backdrop {
  position: absolute;
  inset: 0;
  border: none;
  background: rgba(0, 0, 0, 0.42);
}

.content-overlay__panel {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(640px, calc(100vw - 1.5rem));
  max-height: min(72vh, 760px);
  display: grid;
  gap: 0.9rem;
  padding: 1rem;
  overflow: auto;
  border-radius: 24px;
  border: 1px solid rgba(0, 0, 0, 0.14);
  background: #ffffff;
  color: #111111;
  box-shadow: 0 24px 56px rgba(0, 0, 0, 0.22);
  transform: translate(-50%, -50%);
}

.content-overlay__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.content-overlay__header strong {
  color: inherit;
  font-size: 1rem;
  line-height: 1.2;
}

.content-overlay__body {
  display: grid;
  gap: 0.8rem;
}

.content-overlay__body p,
.content-overlay__body span,
.content-overlay__body strong {
  color: inherit;
}

.page-stack .book-page--themed,
.page-stack .detail-panel--themed,
.page-stack .detail-panel.related-books,
.page-stack .book-anchor-nav {
  --book-surface: #ffffff;
  --book-surface-soft: #f4f4f4;
  --book-ink: #111111;
  --book-muted: rgba(0, 0, 0, 0.72);
  --book-line: rgba(0, 0, 0, 0.12);
  border-color: var(--book-line);
  background: linear-gradient(180deg, var(--book-surface), rgba(248, 248, 248, 0.96));
  color: var(--book-ink);
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.1);
}

.page-stack .book-page--themed *,
.page-stack .detail-panel--themed *,
.page-stack .detail-panel.related-books *,
.page-stack .book-anchor-nav * {
  color: inherit;
}

.page-stack .book-page--themed .muted,
.page-stack .detail-panel--themed .muted,
.page-stack .detail-panel.related-books .muted,
.page-stack .book-page--themed .eyebrow,
.page-stack .detail-panel--themed .eyebrow,
.page-stack .detail-panel.related-books .eyebrow,
.page-stack .book-page--themed .book-description,
.page-stack .detail-panel--themed .book-description,
.page-stack .detail-panel.related-books .book-description,
.page-stack .book-page--themed .book-rating-summary__meta span,
.page-stack .book-page--themed .book-rating-summary__eyebrow,
.page-stack .book-page--themed .book-rating-widget__eyebrow,
.page-stack .book-page--themed .featured-comments__title,
.page-stack .book-page--themed .featured-comments__meta span,
.page-stack .detail-panel--themed .chapter-list__item span:last-child,
.page-stack .detail-panel.related-books .related-books__card-copy p,
.page-stack .detail-panel.related-books .related-books__card-meta {
  color: var(--book-muted);
}

.page-stack .book-page--themed .book-hero,
.page-stack .book-page--themed .book-rating-summary,
.page-stack .book-page--themed .book-rating-widget,
.page-stack .book-page--themed .source-rating-row,
.page-stack .book-page--themed .book-hero__fact,
.page-stack .book-page--themed .featured-comments__item,
.page-stack .detail-panel--themed .chapters-block,
.page-stack .detail-panel--themed .chapter-list__item,
.page-stack .detail-panel.related-books .related-books__card {
  border-color: var(--book-line);
  background: var(--book-surface);
  color: var(--book-ink);
  box-shadow: none;
}

.page-stack .book-page--themed .book-rating-summary__chapters,
.page-stack .book-page--themed .metric-chip,
.page-stack .detail-panel--themed .metric-chip,
.page-stack .book-page--themed .genre-chip,
.page-stack .detail-panel--themed .genre-chip {
  background: var(--book-surface-soft);
  color: var(--book-ink);
  border-color: var(--book-line);
}

.page-stack .book-page--themed .primary-link,
.page-stack .detail-panel--themed .primary-link,
.page-stack .detail-panel.related-books .primary-link {
  color: #ffffff;
  border-color: #111111;
  background: #111111;
  box-shadow: none;
}

.page-stack .book-page--themed .ghost-button,
.page-stack .book-page--themed .secondary-link-button,
.page-stack .detail-panel--themed .ghost-button,
.page-stack .detail-panel--themed .secondary-link-button,
.page-stack .detail-panel.related-books .ghost-button,
.page-stack .detail-panel.related-books .secondary-link-button,
.page-stack .detail-panel.related-books .subtle-link,
.page-stack .book-anchor-nav__link {
  color: #111111;
  border-color: var(--book-line);
  background: var(--book-surface);
  box-shadow: none;
}

.page-stack .book-page--themed .ghost-button:hover,
.page-stack .book-page--themed .secondary-link-button:hover,
.page-stack .detail-panel--themed .ghost-button:hover,
.page-stack .detail-panel--themed .secondary-link-button:hover,
.page-stack .detail-panel.related-books .ghost-button:hover,
.page-stack .detail-panel.related-books .secondary-link-button:hover,
.page-stack .detail-panel.related-books .subtle-link:hover,
.page-stack .book-anchor-nav__link:hover {
  background: var(--book-surface-soft);
  color: #111111;
}

.page-stack .detail-panel--themed .chapter-list__item {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.page-stack .detail-panel--themed .chapter-list__item span:first-child {
  color: var(--book-ink);
  font-weight: 600;
}

.page-stack .detail-panel--themed .chapter-list__item:hover {
  border-color: rgba(0, 0, 0, 0.24);
  background: var(--book-surface-soft);
}

.page-stack .detail-panel.related-books .related-books__grid {
  align-items: stretch;
}

.page-stack .detail-panel.related-books .related-books__card {
  grid-template-rows: auto 1fr auto auto;
  height: 100%;
  align-content: start;
}

.page-stack .detail-panel.related-books .related-books__card-copy {
  gap: 0.55rem;
}

.page-stack .detail-panel.related-books .related-books__card h3 {
  line-height: 1.22;
}

.page-stack .detail-panel.related-books .related-books__card-copy p {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.page-stack .detail-panel.related-books .subtle-link {
  justify-self: start;
}

[data-site-theme="night"] .content-overlay__panel {
  border-color: rgba(255, 255, 255, 0.14);
  background: #101010;
  color: #f5f5f5;
}

[data-site-theme="night"] .page-stack .book-page--themed,
[data-site-theme="night"] .page-stack .detail-panel--themed,
[data-site-theme="night"] .page-stack .detail-panel.related-books,
[data-site-theme="night"] .page-stack .book-anchor-nav {
  --book-surface: #101010;
  --book-surface-soft: #181818;
  --book-ink: #f5f5f5;
  --book-muted: rgba(255, 255, 255, 0.72);
  --book-line: rgba(255, 255, 255, 0.14);
  background: linear-gradient(180deg, #101010, #0a0a0a);
  color: var(--book-ink);
}

[data-site-theme="night"] .page-stack .book-page--themed .primary-link,
[data-site-theme="night"] .page-stack .detail-panel--themed .primary-link,
[data-site-theme="night"] .page-stack .detail-panel.related-books .primary-link {
  color: #111111;
  border-color: #ffffff;
  background: #ffffff;
}

[data-site-theme="night"] .page-stack .book-page--themed .ghost-button,
[data-site-theme="night"] .page-stack .book-page--themed .secondary-link-button,
[data-site-theme="night"] .page-stack .detail-panel--themed .ghost-button,
[data-site-theme="night"] .page-stack .detail-panel--themed .secondary-link-button,
[data-site-theme="night"] .page-stack .detail-panel.related-books .ghost-button,
[data-site-theme="night"] .page-stack .detail-panel.related-books .secondary-link-button,
[data-site-theme="night"] .page-stack .detail-panel.related-books .subtle-link,
[data-site-theme="night"] .page-stack .book-anchor-nav__link {
  color: #f5f5f5;
  background: #101010;
  border-color: rgba(255, 255, 255, 0.14);
}

[data-site-theme="night"] .page-stack .book-page--themed .ghost-button:hover,
[data-site-theme="night"] .page-stack .book-page--themed .secondary-link-button:hover,
[data-site-theme="night"] .page-stack .detail-panel--themed .ghost-button:hover,
[data-site-theme="night"] .page-stack .detail-panel--themed .secondary-link-button:hover,
[data-site-theme="night"] .page-stack .detail-panel.related-books .ghost-button:hover,
[data-site-theme="night"] .page-stack .detail-panel.related-books .secondary-link-button:hover,
[data-site-theme="night"] .page-stack .detail-panel.related-books .subtle-link:hover,
[data-site-theme="night"] .page-stack .book-anchor-nav__link:hover,
[data-site-theme="night"] .page-stack .detail-panel--themed .chapter-list__item:hover {
  background: #181818;
  color: #ffffff;
}

[data-site-theme="night"] .page-stack .book-page--themed .book-hero,
[data-site-theme="night"] .page-stack .book-page--themed .book-rating-summary,
[data-site-theme="night"] .page-stack .book-page--themed .book-rating-widget,
[data-site-theme="night"] .page-stack .book-page--themed .source-rating-row,
[data-site-theme="night"] .page-stack .book-page--themed .book-hero__fact,
[data-site-theme="night"] .page-stack .book-page--themed .featured-comments__item,
[data-site-theme="night"] .page-stack .detail-panel--themed .chapters-block,
[data-site-theme="night"] .page-stack .detail-panel--themed .chapter-list__item,
[data-site-theme="night"] .page-stack .detail-panel.related-books .related-books__card {
  background: #101010;
  color: #f5f5f5;
  border-color: rgba(255, 255, 255, 0.14);
}

[data-site-theme="night"] .page-stack .book-page--themed .book-rating-summary__score,
[data-site-theme="night"] .page-stack .book-page--themed .book-rating-summary__score-line,
[data-site-theme="night"] .page-stack .book-page--themed .book-rating-summary__score-block,
[data-site-theme="night"] .page-stack .book-page--themed .book-rating-summary__pills,
[data-site-theme="night"] .page-stack .book-page--themed .book-hero__fact strong,
[data-site-theme="night"] .page-stack .detail-panel--themed .chapter-list__item span:first-child,
[data-site-theme="night"] .page-stack .detail-panel.related-books .related-books__card h3,
[data-site-theme="night"] .page-stack .detail-panel.related-books .related-books__card .subtle-link,
[data-site-theme="night"] .page-stack .book-page--themed .featured-comments__body,
[data-site-theme="night"] .page-stack .book-page--themed .featured-comments__meta strong {
  color: #f5f5f5;
}

@media (max-width: 720px) {
  .content-overlay__panel {
    width: calc(100vw - 0.9rem);
    padding: 0.9rem;
  }

  .content-overlay__header {
    align-items: flex-start;
  }

  .page-stack .detail-panel.related-books .related-books__card {
    grid-template-rows: auto 1fr auto auto;
  }
}

/* Catalog pagination, stable text overflow, and cover presentation */
.pagination-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  flex-wrap: wrap;
  margin-top: 0.25rem;
}

.pagination-controls__pages {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.pagination-controls__button,
.pagination-controls__page {
  min-width: 2.8rem;
}

.pagination-controls__page.is-active {
  color: var(--ink);
  border-color: color-mix(in srgb, var(--accent) 34%, var(--line));
  background: color-mix(in srgb, var(--accent) 12%, var(--surface-strong));
}

.pagination-controls__ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  color: var(--muted);
  font-weight: 700;
}

.discovery-results__page-meta {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.recommended-shelf-card__meta,
.home-update-card__heading,
.home-update-card__update-meta,
.discovery-book-card__title-wrap,
.discovery-book-card__header,
.discovery-book-card__body,
.discovery-book-card__quote-zone,
.ratings-row__copy,
.related-books__card-copy,
.related-books__card-meta {
  min-width: 0;
}

.recommended-shelf-card__meta h3,
.home-update-card__heading h2,
.discovery-book-card__title-wrap h3,
.related-books__card h3,
.ratings-row__copy strong {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.recommended-shelf-card__author,
.ratings-row__copy small,
.home-update-card__update-meta span,
.home-update-card__update-meta strong,
.discovery-book-card__facts span,
.discovery-book-card__stats span,
.related-books__card-meta span {
  min-width: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  text-overflow: ellipsis;
  word-break: break-word;
}

.ratings-row__copy {
  display: grid;
  gap: 0.18rem;
}

.ratings-row__copy small {
  display: block;
  white-space: nowrap;
}

.discovery-book-card__facts span,
.related-books__card-meta span {
  white-space: normal;
}

.discovery-book-card__quote p,
.home-update-card__quote p,
.related-books__card-copy p {
  display: -webkit-box;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.description-disclosure__action,
.genre-disclosure__summary,
.genre-disclosure__action,
.featured-comments__action,
.subtle-link,
.secondary-link-button {
  overflow-wrap: anywhere;
}

.home-update-card__actions,
.recommended-shelf-card__actions,
.discovery-book-card__actions {
  align-items: center;
  align-self: end;
}

.related-books__card {
  grid-template-rows: auto 1fr auto auto;
  height: 100%;
  align-content: start;
}

.book-cover img[data-cover-mode="poster"],
.book-cover-lightbox__image[data-cover-mode="poster"] {
  object-fit: contain !important;
  padding: 0.5rem;
  background: color-mix(in srgb, var(--surface-soft) 90%, transparent);
}

.book-cover-lightbox__image[data-cover-mode="poster"] {
  padding: 0.85rem;
}

[data-site-theme="night"] .book-cover img[data-cover-mode="poster"],
[data-site-theme="night"] .book-cover-lightbox__image[data-cover-mode="poster"] {
  background: rgba(255, 255, 255, 0.04);
}

@media (max-width: 920px) {
  .pagination-controls {
    justify-content: center;
  }
}

@media (max-width: 720px) {
  .pagination-controls {
    gap: 0.65rem;
  }

  .pagination-controls__button {
    flex: 1 1 0;
  }

  .pagination-controls__pages {
    width: 100%;
    justify-content: center;
    order: 3;
  }

  .recommended-shelf-card__meta h3,
  .home-update-card__heading h2,
  .discovery-book-card__title-wrap h3,
  .related-books__card h3,
  .ratings-row__copy strong {
    line-height: 1.22;
  }

  .related-books__card-meta {
    gap: 0.45rem 0.65rem;
  }

  .home-update-card__update-meta span,
  .home-update-card__update-meta strong {
    display: -webkit-box;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
}

/* Homepage right rail: prevent horizontal page scroll and keep long text stable */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

.home-page,
.home-layout,
.home-layout__main,
.home-layout__rail,
.home-section,
.home-rail-card,
.home-rail-list,
.home-rail-list__item,
.home-rail-list__copy,
.home-rail-quotes,
.home-rail-quote,
.home-rail-quote .description-disclosure,
.home-rail-quote .description-disclosure__text {
  min-width: 0;
  max-width: 100%;
}

.home-layout__rail,
.home-rail-card,
.home-rail-list__item,
.home-rail-quote {
  overflow: hidden;
}

.home-rail-card__heading h3,
.home-rail-list__copy strong,
.home-rail-quote__title {
  display: -webkit-box;
  overflow: hidden;
  overflow-wrap: anywhere;
  word-break: break-word;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.home-rail-card__heading h3 {
  line-height: 1.12;
}

.home-rail-list__copy strong,
.home-rail-quote__title {
  line-height: 1.2;
}

.home-rail-list__copy small {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.home-rail-list__index,
.home-rail-list__value {
  flex-shrink: 0;
  white-space: nowrap;
}

.home-rail-list__value {
  justify-self: end;
}

.home-rail-quote .description-disclosure--overlay-card {
  display: grid;
  gap: 0.45rem;
  align-items: start;
}

.home-rail-quote .description-disclosure__text,
.home-rail-quote .description-disclosure__body p {
  margin: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.home-rail-quote .description-disclosure__text {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.home-rail-quote .description-disclosure__action {
  justify-self: start;
  max-width: 100%;
  white-space: normal;
  text-align: left;
}

@media (max-width: 1180px) {
  .home-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 720px) {
  .home-rail-list__item {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.7rem;
  }

  .home-rail-list__value {
    grid-column: 2;
    justify-self: start;
  }
}

/* Mobile ratings stability, neutral numeric badges, and compact mobile chrome */
:root {
  --rank-chip-bg: rgba(27, 23, 19, 0.08);
  --rank-chip-bg-strong: rgba(27, 23, 19, 0.12);
  --rank-chip-border: rgba(27, 23, 19, 0.16);
  --rank-chip-text: #171411;
  --mobile-chrome-bg: rgba(35, 36, 40, 0.96);
  --mobile-chrome-surface: rgba(49, 50, 56, 0.92);
  --mobile-chrome-line: rgba(255, 255, 255, 0.1);
  --mobile-chrome-text: #f5f3ef;
  --mobile-chrome-muted: rgba(245, 243, 239, 0.7);
}

[data-site-theme="night"] {
  --rank-chip-bg: rgba(255, 255, 255, 0.08);
  --rank-chip-bg-strong: rgba(255, 255, 255, 0.12);
  --rank-chip-border: rgba(255, 255, 255, 0.16);
  --rank-chip-text: #f5f5f5;
}

.site-header__mobile-bar,
.site-header__mobile-panels {
  display: none;
}

.ratings-row,
.ratings-row__preview-mobile,
.ratings-list__mobile-preview {
  overflow-anchor: none;
}

.ratings-page,
.ratings-layout,
.ratings-list {
  overflow-anchor: none;
}

.ratings-row {
  scroll-margin-top: 96px;
}

.ratings-row.is-active {
  background: color-mix(in srgb, var(--rank-chip-bg-strong) 64%, var(--surface-strong));
  border-color: var(--rank-chip-border);
  box-shadow: inset 0 0 0 1px var(--rank-chip-border);
}

.ratings-preview-pane {
  max-height: calc(100vh - 112px);
  overflow: auto;
  overscroll-behavior: contain;
}

.ratings-row__index,
.home-rail-list__index,
.home-rail-list__value {
  background: var(--rank-chip-bg) !important;
  color: var(--rank-chip-text) !important;
  border: 1px solid var(--rank-chip-border);
  box-shadow: none !important;
}

.home-rail-list__index,
.home-rail-list__value {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  padding: 0.3rem 0.72rem;
  border-radius: 999px;
}

.home-update-card__stats span,
.home-update-card__cover-rating span,
.recommended-shelf-card__stats span,
.metric-chip,
.book-rating-summary__chapters {
  border-color: var(--rank-chip-border) !important;
  background: var(--rank-chip-bg) !important;
  color: var(--ink) !important;
  box-shadow: none !important;
}

[data-site-theme="night"] .home-update-card__stats span,
[data-site-theme="night"] .home-update-card__cover-rating span,
[data-site-theme="night"] .recommended-shelf-card__stats span,
[data-site-theme="night"] .metric-chip,
[data-site-theme="night"] .book-rating-summary__chapters {
  color: var(--rank-chip-text) !important;
}

@media (max-width: 919px) {
  .ratings-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .ratings-preview-pane {
    display: none;
  }
}

@media (max-width: 720px) {
  .site-shell {
    padding-bottom: 90px;
  }

  .site-header {
    gap: 0.8rem;
    padding: 0.75rem;
    border-radius: 24px;
    border-color: var(--mobile-chrome-line);
    background:
      radial-gradient(circle at top right, rgba(255, 255, 255, 0.06), transparent 28%),
      linear-gradient(180deg, rgba(42, 43, 47, 0.98), rgba(29, 30, 34, 0.98));
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.26);
  }

  .site-header::after {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.08), transparent 46%);
  }

  .site-header__mobile-bar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.5rem;
  }

  .site-header__mobile-shortcuts {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.45rem;
  }

  .site-header__mobile-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 44px;
    padding: 0.7rem 0.85rem;
    border-radius: 14px;
    border: 1px solid var(--mobile-chrome-line);
    background: rgba(255, 255, 255, 0.04);
    color: var(--mobile-chrome-text);
    font-size: 0.92rem;
    font-weight: 800;
    letter-spacing: 0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .site-header__mobile-toggle,
  .site-header__mobile-shortcuts .site-theme-toggle--compact {
    min-height: 44px;
    padding: 0.7rem 0.82rem;
    border-radius: 14px;
    border-color: var(--mobile-chrome-line);
    background: rgba(255, 255, 255, 0.04);
    color: var(--mobile-chrome-text);
    box-shadow: none;
  }

  .site-header__mobile-toggle.is-open,
  .site-header__mobile-toggle:hover,
  .site-header__mobile-shortcuts .site-theme-toggle--compact:hover,
  .site-header__mobile-shortcuts .site-theme-toggle--compact:focus-visible {
    border-color: rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
  }

  .site-header__mobile-shortcuts .site-theme-toggle--compact {
    width: 44px;
    padding-inline: 0;
  }

  .site-header__mobile-shortcuts .site-theme-toggle--compact span:last-child {
    display: none;
  }

  .site-header__mobile-panels {
    display: grid;
    gap: 0.65rem;
  }

  .site-header__mobile-panel {
    display: none;
    gap: 0.75rem;
    padding: 0.85rem;
    border-radius: 18px;
    border: 1px solid var(--mobile-chrome-line);
    background: rgba(255, 255, 255, 0.04);
  }

  .site-header__mobile-panel.is-open {
    display: grid;
  }

  .site-header__mobile-panel-heading {
    display: grid;
    gap: 0.22rem;
  }

  .site-header__mobile-panel-heading strong,
  .site-header__mobile-panel-heading span {
    color: inherit;
  }

  .site-header__mobile-panel-heading strong {
    color: var(--mobile-chrome-text);
    font-size: 0.94rem;
  }

  .site-header__mobile-panel-heading span {
    color: var(--mobile-chrome-muted);
    font-size: 0.78rem;
    line-height: 1.5;
  }

  .site-header__mobile-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
  }

  .site-header__mobile-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    padding: 0.75rem 0.82rem;
    border-radius: 14px;
    border: 1px solid var(--mobile-chrome-line);
    background: rgba(255, 255, 255, 0.03);
    color: var(--mobile-chrome-text);
    font-weight: 700;
    text-align: center;
  }

  .site-header__mobile-link.is-active {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
  }

  .site-header__mobile-search {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.55rem;
  }

  .site-header__mobile-search .site-header__search-field span {
    color: var(--mobile-chrome-muted);
  }

  .site-header__mobile-search .site-header__search-field input {
    border-color: var(--mobile-chrome-line);
    background: rgba(16, 16, 18, 0.7);
    color: #ffffff;
  }

  .site-header__mobile-search .site-header__search-submit {
    border-color: rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.08);
    color: var(--mobile-chrome-text);
    box-shadow: none;
  }

  .site-header__primary,
  .site-header__search--desktop,
  .site-header__actions {
    display: none;
  }

  .site-mobile-nav {
    display: grid;
    bottom: max(0.65rem, calc(env(safe-area-inset-bottom) + 0.5rem));
    width: min(100%, calc(100vw - 16px));
    max-width: 430px;
    gap: 0.35rem;
    padding: 0.42rem;
    border-radius: 20px;
    border-color: var(--mobile-chrome-line);
    background: var(--mobile-chrome-bg);
    box-shadow: 0 22px 36px rgba(0, 0, 0, 0.32);
  }

  .site-mobile-nav__link {
    min-height: 3rem;
    padding: 0.58rem 0.35rem;
    border-radius: 14px;
    color: var(--mobile-chrome-muted);
    font-size: 0.82rem;
    font-weight: 800;
    background: transparent;
  }

  .site-mobile-nav__link.is-active {
    color: var(--mobile-chrome-text);
    border: 1px solid rgba(255, 255, 255, 0.14);
    background: rgba(255, 255, 255, 0.1);
  }

  .site-mobile-nav__link:hover,
  .site-mobile-nav__link:focus-visible {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.08);
  }

  .ratings-row {
    gap: 0.8rem;
    scroll-margin-top: 132px;
  }

  .ratings-row__main {
    gap: 0.75rem;
  }

  .ratings-row__index {
    min-width: 2.85rem;
    min-height: 2.85rem;
    font-size: 0.82rem;
  }

  .ratings-row__stats {
    gap: 0.18rem;
  }
}

/* Final catalog/rating overrides: keep these at the end so old duplicated blocks
   from earlier iterations cannot override the repaired local UI. */
.discovery-page__intro--ratings {
  display: grid;
  gap: 0.85rem;
  align-items: start;
}

.ratings-controls {
  display: grid;
  gap: 0.6rem;
}

.ratings-controls__label {
  color: var(--muted);
  font-size: 0.92rem;
}

.ratings-controls__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.ratings-controls__chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.45rem;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.84);
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.ratings-controls__chip.is-active {
  border-color: var(--rank-chip-border);
  background: var(--rank-chip-bg-strong);
  color: var(--rank-chip-text);
}

.ratings-row__stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  gap: 0.45rem;
  min-width: 0;
  text-align: right;
}

.ratings-row__metric,
.recommended-shelf-card__stats span {
  white-space: nowrap;
  font-weight: 700;
}

.ratings-row__metric {
  font-size: 0.82rem;
}

.ratings-preview-pane {
  align-self: start;
}

.recommended-shelf-card__stats {
  align-items: center;
}

.genre-showcase-card__header {
  grid-template-columns: minmax(0, 1fr);
}

.book-rating-widget__header strong {
  line-height: 1.35;
}

@media (max-width: 919px) {
  .ratings-row__stats {
    justify-content: flex-start;
    text-align: left;
  }

  .ratings-controls__chip {
    width: 100%;
    justify-content: flex-start;
  }
}

.seo-section {
  display: grid;
  gap: 1.5rem;
  margin: 1.5rem 0 2rem;
  padding: 1.35rem;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.seo-section--compact {
  margin-top: 1rem;
}

.seo-copy {
  display: grid;
  gap: 0.85rem;
}

.seo-copy h2 {
  margin: 0;
  font-size: clamp(1.7rem, 4vw, 2.45rem);
  line-height: 0.98;
}

.seo-copy p {
  margin: 0;
  max-width: 72ch;
  color: var(--muted);
}

.seo-link-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.9rem;
}

.seo-link-grid--compact {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.seo-link-card {
  display: grid;
  gap: 0.45rem;
  min-width: 0;
  padding: 1rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: color-mix(in srgb, var(--surface) 82%, var(--accent) 18%);
  text-decoration: none;
  color: inherit;
}

.seo-link-card strong {
  font-size: 1rem;
  line-height: 1.2;
}

.seo-link-card span {
  color: var(--muted);
  font-size: 0.94rem;
  line-height: 1.45;
}

.seo-link-card:hover,
.seo-link-card:focus-visible {
  border-color: color-mix(in srgb, var(--accent) 40%, var(--line) 60%);
  transform: translateY(-1px);
}

.seo-faq {
  display: grid;
  gap: 0.85rem;
}

.seo-faq--compact {
  gap: 0.75rem;
}

.seo-faq__item {
  display: grid;
  gap: 0.4rem;
  padding: 0.95rem 1rem;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
}

.seo-faq__question {
  margin: 0;
  font-size: 1rem;
  line-height: 1.3;
}

.seo-faq__answer {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.ratings-page-shell,
.explore-page-shell {
  display: grid;
}

@media (min-width: 920px) {
  .seo-section {
    grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.95fr);
    align-items: start;
  }

  .seo-section--compact {
    grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  }
}

@media (max-width: 919px) {
  .seo-section {
    margin: 1rem 0 1.5rem;
    padding: 1rem;
    border-radius: 22px;
  }

  .seo-copy h2 {
    font-size: clamp(1.35rem, 7vw, 2rem);
  }
}

.book-cover__link,
.ratings-row__title-link,
.discovery-book-card__title-link {
  color: inherit;
  text-decoration: none;
}

.book-cover__link {
  display: block;
  width: 100%;
  height: 100%;
}

.ratings-row__main:focus-visible,
.book-cover__link:focus-visible,
.ratings-row__title-link:focus-visible,
.discovery-book-card__title-link:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--accent) 72%, #ffffff 28%);
  outline-offset: 3px;
}

.ratings-row__title-link:hover,
.ratings-row__title-link:focus-visible,
.discovery-book-card__title-link:hover,
.discovery-book-card__title-link:focus-visible {
  color: var(--accent-strong);
}

body:has(.reader-page--minimal) {
  background: #f7f2e8;
}

[data-site-theme="night"] body:has(.reader-page--minimal) {
  background: #000000;
}

[data-site-theme="night"] .site-shell:has(.reader-page--minimal),
[data-site-theme="night"] .site-main:has(.reader-page--minimal),
[data-site-theme="night"] .reader-page--minimal,
[data-site-theme="night"] .reader-page--minimal .reader-content {
  background: #000000 !important;
}

[data-site-theme="night"] .reader-page--minimal,
[data-site-theme="night"] .reader-page--minimal .reader-content,
[data-site-theme="night"] .reader-page--minimal .reader-content p,
[data-site-theme="night"] .reader-page--minimal .reader-content li,
[data-site-theme="night"] .reader-page--minimal .reader-content blockquote,
[data-site-theme="night"] .reader-page--minimal .reader-content h1,
[data-site-theme="night"] .reader-page--minimal .reader-content h2,
[data-site-theme="night"] .reader-page--minimal .reader-content h3,
[data-site-theme="night"] .reader-page--minimal .reader-content h4 {
  color: #ffffff !important;
}

[data-site-theme="night"] .reader-page--minimal .reader-content a {
  color: #ffe17b !important;
}

[data-site-theme="night"] .reader-scroll-header__inner,
[data-site-theme="night"] .reader-settings-popover,
[data-site-theme="night"] .reader-settings-gear,
[data-site-theme="night"] .reader-page--minimal .ghost-button,
[data-site-theme="night"] .reader-page--minimal .reader-chip {
  background: #050505 !important;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.16) !important;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.42) !important;
}

.site-mobile-nav {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.top-ranobe-page {
  display: grid;
  gap: 1.2rem;
}

.top-ranobe-hero {
  display: grid;
  gap: 0.9rem;
  padding: 1.2rem 1.25rem;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.top-ranobe-hero__copy {
  display: grid;
  gap: 0.8rem;
}

.top-ranobe-hero__copy h1 {
  margin: 0;
  max-width: 16ch;
  font-size: clamp(2rem, 5vw, 4rem);
  line-height: 0.95;
}

.top-ranobe-hero__copy p:last-child {
  margin: 0;
  max-width: 72ch;
  color: var(--muted);
}

.top-ranobe-controls {
  display: grid;
  gap: 0.6rem;
}

.top-ranobe-controls__label {
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.top-ranobe-controls__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.top-ranobe-controls__chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.45rem;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.84);
  color: var(--ink);
  font-weight: 700;
}

.top-ranobe-controls__chip.is-active {
  border-color: var(--rank-chip-border);
  background: var(--rank-chip-bg-strong);
  color: var(--rank-chip-text);
}

.top-ranobe-periods[hidden],
.top-ranobe-list__views[hidden] {
  display: none !important;
}

.top-ranobe-list {
  display: grid;
  gap: 0.75rem;
}

.top-ranobe-list__item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.9rem;
  padding: 0.95rem 1rem;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.top-ranobe-list__rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.8rem;
  min-height: 2.8rem;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  background: var(--rank-chip-bg);
  border: 1px solid var(--rank-chip-border);
  color: var(--rank-chip-text);
  font-weight: 800;
}

.top-ranobe-list__copy {
  display: grid;
  gap: 0.18rem;
  min-width: 0;
}

.top-ranobe-list__title {
  display: block;
  color: var(--ink);
  font-size: 1.06rem;
  font-weight: 800;
  line-height: 1.3;
}

.top-ranobe-list__title:hover,
.top-ranobe-list__title:focus-visible {
  color: var(--accent-strong);
}

.top-ranobe-list__author {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.4;
}

.top-ranobe-list__stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.45rem;
}

.top-ranobe-list__metric {
  white-space: nowrap;
}

@media (max-width: 920px) {
  .top-ranobe-list__item {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .top-ranobe-list__stats {
    grid-column: 2;
    justify-content: flex-start;
  }
}

@media (max-width: 720px) {
  .site-mobile-nav {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .site-mobile-nav__link {
    font-size: 0.72rem;
    padding-inline: 0.18rem;
  }

  .top-ranobe-hero {
    padding: 1rem;
    border-radius: 22px;
  }

  .top-ranobe-controls__chips {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .top-ranobe-controls__chip {
    width: 100%;
  }

  .top-ranobe-hero__copy h1 {
    max-width: none;
    font-size: clamp(1.5rem, 9vw, 2.4rem);
  }

  .top-ranobe-list__item {
    padding: 0.85rem;
    gap: 0.75rem;
  }

  .top-ranobe-list__rank {
    min-width: 2.4rem;
    min-height: 2.4rem;
  }

  .top-ranobe-list__title {
    font-size: 0.98rem;
  }
}
