:root {
  --bg: #000000;
  --bg-elevated: #0a0a0a;
  --bg-glass: rgba(12, 12, 12, 0.85);
  --surface: #121212;
  --border: rgba(255, 255, 255, 0.06);
  --border-glow: rgba(196, 30, 58, 0.4);
  --text: #eceae6;
  --text-muted: #8c8883;
  --crimson: #c41e3a;
  --crimson-bright: #e8243f;
  --crimson-dim: #8b1528;
  --ember: #ff4d6d;
  --font-display: "Cinzel", "Times New Roman", serif;
  --font-body: "Literata", "Georgia", serif;
  --font-ui: "DM Sans", system-ui, sans-serif;
  --radius: 16px;
  --radius-pill: 999px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  --nav-height: 76px;
  --reader-width: 42rem;
  --sidebar-width: 17rem;
  --space-xs: 0.5rem;
  --space-sm: 0.75rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2rem;
  --space-2xl: 3rem;
  --space-3xl: 5rem;
  --ease-out-expo: cubic-bezier(0.22, 1, 0.36, 1);
  --duration-normal: 0.45s;
  --duration-slow: 0.65s;
}

@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes navReveal {
  from { opacity: 0; transform: translateY(-100%); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes shimmer {
  0%, 100% { box-shadow: 0 0 8px rgba(196, 30, 58, 0.35); }
  50% { box-shadow: 0 0 14px rgba(232, 36, 63, 0.5); }
}

@keyframes navSlideDown {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 70% 45% at 50% -15%, rgba(196, 30, 58, 0.08), transparent),
    radial-gradient(ellipse 50% 35% at 100% 100%, rgba(139, 21, 40, 0.06), transparent);
  pointer-events: none;
  z-index: 0;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; border: none; background: none; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 9999;
  padding: 0.75rem 1rem;
  background: var(--crimson);
  color: white;
}
.skip-link:focus { left: 1rem; top: 1rem; }

/* Progress */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, var(--crimson-dim), var(--crimson-bright));
  z-index: 200;
  transition: width 0.1s linear;
  animation: shimmer 4s ease-in-out infinite;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-height);
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  animation: navReveal 0.55s var(--ease-out-expo) both;
}

.header-inner {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--space-lg);
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
}

.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-primary);
  text-decoration: none;
  transition: color var(--duration-normal) var(--ease-out-expo),
    text-shadow var(--duration-normal) var(--ease-out-expo);
}

.brand:hover {
  color: var(--text-primary);
  text-shadow: 0 0 12px rgba(196, 30, 58, 0.35);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.15rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.site-nav a {
  position: relative;
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius-pill);
  color: var(--text-muted);
  transition: color var(--duration-normal) var(--ease-out-expo),
    background var(--duration-normal) var(--ease-out-expo);
}

.site-nav a::after {
  content: "";
  position: absolute;
  bottom: 0.2rem;
  left: 50%;
  width: 0;
  height: 1px;
  background: var(--crimson-bright);
  transition: width var(--duration-normal) var(--ease-out-expo), left var(--duration-normal) var(--ease-out-expo);
}

.site-nav a:hover { color: var(--text); }

.site-nav a:hover::after,
.site-nav a.active::after {
  width: 60%;
  left: 20%;
}

.site-nav a.active {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.site-nav a.nav-support {
  border: 1px solid var(--border);
  margin-left: 0.35rem;
}

.site-nav a.nav-support:hover {
  border-color: var(--border-glow);
  background: rgba(196, 30, 58, 0.08);
}

.site-nav a.nav-support::after { display: none; }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  color: var(--text);
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 4px auto;
  background: currentColor;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-ui);
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  padding: 0.8rem 1.45rem;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  transition: transform var(--duration-normal) var(--ease-out-expo),
    box-shadow var(--duration-normal) var(--ease-out-expo),
    background var(--duration-normal) var(--ease-out-expo),
    border-color var(--duration-normal) var(--ease-out-expo),
    color var(--duration-normal) var(--ease-out-expo);
}

.btn::before {
  content: "";
  position: absolute;
  inset: -120% auto auto -30%;
  width: 60%;
  height: 280%;
  transform: rotate(18deg);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.28), transparent);
  opacity: 0;
  transition: opacity 0.35s var(--ease-out-expo), left 0.45s var(--ease-out-expo);
  pointer-events: none;
  z-index: -1;
}

.btn:active { transform: scale(0.98); }

.btn-primary {
  background: linear-gradient(135deg, #d02644 0%, #8f1329 55%, #5e0e1d 100%);
  color: white;
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow:
    0 10px 30px rgba(196, 30, 58, 0.36),
    inset 0 1px 0 rgba(255, 255, 255, 0.26),
    inset 0 -8px 18px rgba(0, 0, 0, 0.24);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 14px 38px rgba(196, 30, 58, 0.48),
    0 0 0 1px rgba(255, 255, 255, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.btn-primary:hover::before {
  opacity: 1;
  left: 100%;
}

.btn-ghost {
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text);
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.06), rgba(255, 255, 255, 0.01)),
    rgba(8, 8, 8, 0.42);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 8px 22px rgba(0, 0, 0, 0.22);
}

.btn-ghost:hover {
  border-color: rgba(196, 30, 58, 0.44);
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.08), rgba(196, 30, 58, 0.1)),
    rgba(10, 10, 10, 0.58);
  transform: translateY(-1px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 10px 24px rgba(0, 0, 0, 0.28);
}

.btn-ghost:hover::before {
  opacity: 0.75;
  left: 100%;
}

.btn:focus-visible {
  outline: none;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.25),
    0 0 0 4px rgba(196, 30, 58, 0.24);
}

/* Hero */
.hero {
  position: relative;
  z-index: 1;
  padding: var(--space-3xl) var(--space-lg) var(--space-2xl);
  text-align: center;
}

.hero::before {
  content: "";
  display: block;
  width: 3rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--crimson), transparent);
  margin: 0 auto var(--space-xl);
}

.hero-inner {
  max-width: 44rem;
  margin: 0 auto;
  animation: fadeInUp var(--duration-slow) var(--ease-out-expo) 0.08s both;
}

.hero-eyebrow {
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5.5vw, 3.75rem);
  font-weight: 600;
  line-height: 1.12;
  margin: 0 0 var(--space-lg);
  color: var(--text);
}

.hero-subtitle {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 32rem;
  margin: 0 auto var(--space-xl);
  line-height: 1.65;
}

.hero-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm) var(--space-lg);
  font-family: var(--font-ui);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-xl);
}

.hero-stats span::before {
  content: "·";
  margin-right: var(--space-lg);
  opacity: 0.4;
}

.hero-stats span:first-child::before { content: none; margin: 0; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-md);
  justify-content: center;
}

/* Sections */
.section {
  position: relative;
  z-index: 1;
  padding: var(--space-2xl) var(--space-lg) var(--space-3xl);
}

.section-header {
  max-width: 1280px;
  margin: 0 auto var(--space-2xl);
  text-align: center;
  animation: fadeInUp var(--duration-slow) var(--ease-out-expo) 0.15s both;
}

.section-header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 600;
  margin: 0 0 var(--space-sm);
}

.section-header p {
  color: var(--text-muted);
  margin: 0;
  max-width: 28rem;
  margin-inline: auto;
  font-size: 0.95rem;
}

/* Bento book grid */
.book-grid {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

.book-grid a.book-card {
  display: flex;
  flex-direction: column;
  color: inherit;
  min-height: 100%;
}

.book-card {
  position: relative;
  padding: var(--space-xl);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background:
    radial-gradient(120% 120% at 10% 0%, rgba(255, 255, 255, 0.08), transparent 48%),
    linear-gradient(145deg, rgba(18, 18, 18, 0.94), rgba(8, 8, 8, 0.9));
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  overflow: hidden;
  transition: transform var(--duration-normal) var(--ease-out-expo),
    border-color var(--duration-normal) var(--ease-out-expo),
    box-shadow var(--duration-normal) var(--ease-out-expo),
    background var(--duration-normal) var(--ease-out-expo);
  animation: fadeInUp var(--duration-slow) var(--ease-out-expo) both;
}

.book-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--crimson);
  opacity: 0.7;
  transition: opacity var(--duration-normal) var(--ease-out-expo),
    box-shadow var(--duration-normal) var(--ease-out-expo);
}

.book-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid transparent;
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.22), rgba(255, 255, 255, 0) 35%) border-box;
  -webkit-mask:
    linear-gradient(#fff 0 0) padding-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.52;
}

.book-card:hover {
  transform: translateY(-6px) scale(1.01);
  border-color: rgba(196, 30, 58, 0.34);
  box-shadow:
    0 20px 52px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(196, 30, 58, 0.14);
  background:
    radial-gradient(120% 120% at 10% 0%, rgba(255, 255, 255, 0.1), transparent 52%),
    linear-gradient(145deg, rgba(21, 21, 21, 0.98), rgba(10, 10, 10, 0.92));
}

.book-card:hover::before {
  opacity: 1;
  box-shadow: 0 0 16px rgba(196, 30, 58, 0.4);
}

.book-card--featured {
  grid-column: 1 / -1;
  padding: var(--space-2xl);
}

.book-grid .book-card:nth-child(1) { animation-delay: 0.05s; }
.book-grid .book-card:nth-child(2) { animation-delay: 0.1s; }
.book-grid .book-card:nth-child(3) { animation-delay: 0.15s; }

.book-tag {
  display: inline-block;
  font-family: var(--font-ui);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--crimson-bright);
  margin-bottom: var(--space-md);
}

.book-card h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 600;
  margin: 0 0 var(--space-sm);
}

.book-card--featured h3 { font-size: 1.75rem; }

.book-card p {
  color: var(--text-muted);
  margin: 0 0 var(--space-lg);
  font-size: 0.92rem;
  line-height: 1.65;
  flex-grow: 1;
}

.book-card__cta {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--crimson-bright);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: gap var(--duration-normal) var(--ease-out-expo);
}

.book-card:hover .book-card__cta { gap: 0.65rem; }
.book-card:hover .book-card__cta span[aria-hidden="true"] { transform: translateX(2px); }
.book-card__cta span[aria-hidden="true"] { transition: transform var(--duration-normal) var(--ease-out-expo); }

/* Reader */
.reader-page { position: relative; z-index: 1; }

.reader-hero {
  padding: var(--space-2xl) var(--space-lg) var(--space-xl);
  text-align: center;
  border-bottom: 1px solid var(--border);
  animation: fadeInUp var(--duration-slow) var(--ease-out-expo) 0.08s both;
}

.reader-hero::after {
  content: "";
  display: block;
  width: 4rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--crimson-dim), transparent);
  margin: var(--space-lg) auto 0;
}

.reader-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: 600;
  margin: 0 0 var(--space-md);
}

.synopsis {
  max-width: var(--reader-width);
  margin: 0 auto;
  color: var(--text-muted);
  font-size: 1rem;
  line-height: 1.7;
}

.reader-layout {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  max-width: 72rem;
  margin: 0 auto;
}

.chapter-sidebar {
  position: sticky;
  top: var(--nav-height);
  height: calc(100vh - var(--nav-height));
  overflow-y: auto;
  padding: var(--space-lg) var(--space-md) var(--space-xl) var(--space-lg);
  border-right: 1px solid var(--border);
  scrollbar-width: thin;
  scrollbar-color: var(--crimson-dim) transparent;
}

.chapter-sidebar::-webkit-scrollbar { width: 4px; }
.chapter-sidebar::-webkit-scrollbar-thumb {
  background: var(--crimson-dim);
  border-radius: var(--radius-pill);
}

.sidebar-label {
  font-family: var(--font-ui);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-md);
}

.chapter-list {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: chapter;
}

.chapter-list li { counter-increment: chapter; }

.chapter-list a {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  padding: 0.5rem 0.7rem;
  border-radius: 8px;
  color: var(--text-muted);
  border-left: 2px solid transparent;
  transition: color var(--duration-normal) var(--ease-out-expo),
    background var(--duration-normal) var(--ease-out-expo),
    border-color var(--duration-normal) var(--ease-out-expo);
}

.chapter-list a::before {
  content: counter(chapter, decimal-leading-zero);
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--crimson-dim);
  min-width: 1.25rem;
  flex-shrink: 0;
}

.chapter-list a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  border-left-color: rgba(196, 30, 58, 0.35);
}

.chapter-list a.active {
  color: var(--crimson-bright);
  background: rgba(196, 30, 58, 0.08);
  border-left-color: var(--crimson);
}

.chapter-list a.active::before { color: var(--crimson-bright); }

.reader-content {
  padding: var(--space-2xl) var(--space-xl) var(--space-3xl);
}

.chapter {
  max-width: var(--reader-width);
  margin: 0 auto var(--space-3xl);
  scroll-margin-top: calc(var(--nav-height) + 1.5rem);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.55s var(--ease-out-expo), transform 0.55s var(--ease-out-expo);
}

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

.chapter h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0 0 var(--space-xl);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--border);
}

.chapter p {
  margin: 0 0 var(--space-lg);
  text-align: left;
  hyphens: auto;
}

.chapter-nav {
  max-width: var(--reader-width);
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: var(--space-md);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--border);
}

.chapter-nav[hidden],
.chapter-nav .btn[hidden] { display: none; }
.chapter-nav--start { justify-content: flex-end; }

.chapter-nav .btn {
  font-size: 0.78rem;
  padding: 0.65rem 1rem;
}

/* Footer */
.site-footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
  padding: var(--space-xl) var(--space-lg);
  margin-top: auto;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
}

.footer-copy {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm) var(--space-lg);
  justify-content: center;
}

.footer-nav a {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color var(--duration-normal) var(--ease-out-expo);
}

.footer-nav a:hover { color: var(--text); }

.footer-support {
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: border-color var(--duration-normal) var(--ease-out-expo),
    color var(--duration-normal) var(--ease-out-expo);
}

.footer-support:hover {
  border-color: var(--border-glow);
  color: var(--crimson-bright);
}

/* About */
.page-hero {
  position: relative;
  z-index: 1;
  padding: var(--space-3xl) var(--space-lg) var(--space-xl);
  text-align: center;
  animation: fadeInUp var(--duration-slow) var(--ease-out-expo) 0.08s both;
}

.page-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 3.5vw, 2.5rem);
  font-weight: 600;
  margin: 0 0 var(--space-sm);
}

.page-tagline {
  font-family: var(--font-ui);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0;
}

.about-layout {
  position: relative;
  z-index: 1;
  max-width: 56rem;
  margin: 0 auto;
  padding: 0 var(--space-lg) var(--space-3xl);
  display: grid;
  grid-template-columns: 1fr 16rem;
  gap: var(--space-xl);
  align-items: start;
}

.glass-card {
  padding: var(--space-xl);
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.11);
  background:
    radial-gradient(130% 110% at 8% 0%, rgba(255, 255, 255, 0.08), transparent 42%),
    linear-gradient(150deg, rgba(18, 18, 18, 0.95), rgba(8, 8, 8, 0.9));
  backdrop-filter: blur(16px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 16px 34px rgba(0, 0, 0, 0.34);
  animation: fadeInUp var(--duration-slow) var(--ease-out-expo) 0.2s both;
}

.glass-card p {
  color: var(--text-muted);
  margin: 0 0 var(--space-lg);
  line-height: 1.75;
}

.glass-card p:last-child { margin-bottom: 0; }

.about-sidebar {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  animation: fadeInUp var(--duration-slow) var(--ease-out-expo) 0.3s both;
}

.about-sidebar .btn { width: 100%; }

.about-sidebar-label {
  font-family: var(--font-ui);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-xs);
}

.reader-layout--single {
  grid-template-columns: 1fr;
  max-width: var(--reader-width);
  margin-inline: auto;
}

.reader-layout--single .reader-content {
  padding: var(--space-2xl) var(--space-lg) var(--space-3xl);
}

.toc-toggle {
  display: none;
  position: fixed;
  bottom: var(--space-lg);
  right: var(--space-lg);
  z-index: 90;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 1.1rem;
  box-shadow: var(--shadow);
}

@media (max-width: 900px) {
  .reader-layout { grid-template-columns: 1fr; }
  .chapter-sidebar {
    display: none;
    position: fixed;
    inset: var(--nav-height) 0 0 0;
    z-index: 80;
    background: rgba(0, 0, 0, 0.96);
    backdrop-filter: blur(24px);
    border-right: none;
    padding: var(--space-lg);
  }
  .chapter-sidebar.open { display: block; }
  .toc-toggle { display: grid; place-items: center; }
  .reader-content { padding: var(--space-lg) var(--space-md) 5rem; }
  .about-layout { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .book-grid { grid-template-columns: 1fr; }
  .nav-toggle { display: grid; place-items: center; }
  .site-nav {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    padding: var(--space-md);
    background: rgba(0, 0, 0, 0.97);
    border-bottom: 1px solid var(--border);
  }
  .site-nav.open {
    display: flex;
    animation: navSlideDown 0.35s var(--ease-out-expo) both;
  }
  .site-nav a { width: 100%; text-align: center; }
  .site-nav a.nav-support { margin-left: 0; margin-top: var(--space-xs); }
  .footer-inner { flex-direction: column; text-align: center; }
}

@media (min-width: 769px) {
  .book-card--featured {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--space-2xl);
    align-items: end;
  }
  .book-card--featured .book-card__cta { align-self: end; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .chapter { opacity: 1; transform: none; }
}
