/* ============================================
   MAWAR — Novel Website
   Color Palette: Cool slate, dusty teal, soft lavender, muted sage
   ============================================ */

:root {
  --cream: #f4f7f7;
  --cream-dark: #e8eef0;
  --rose: #6a8fa0;
  --rose-light: #9ab8c8;
  --rose-pale: #dce9ef;
  --burgundy: #2d5a6e;
  --burgundy-dark: #1e3d4f;
  --sage: #7a9e8a;
  --gold: #8baaa0;
  --gold-light: #aac5be;
  --brown: #3d5a5a;
  --text-dark: #1a3040;
  --text-mid: #3a5a6a;
  --text-light: #7090a0;
  --shadow-warm: rgba(45, 90, 110, 0.15);
  --shadow-deep: rgba(26, 48, 64, 0.25);
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans: 'DM Sans', system-ui, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--cream);
  color: var(--text-dark);
  overflow-x: hidden;
  min-height: 100vh;
}

.hidden {
  display: none !important;
}

/* ============================================
   LANDING PAGE
   ============================================ */
.landing-page {
  min-height: 100vh;
  background: linear-gradient(145deg, #e8f0f4 0%, #dfe8f0 30%, #e4eaf4 60%, #ddeeed 100%);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Ambient glow blobs */
.landing-page::before {
  content: '';
  position: fixed;
  top: -20%;
  left: -10%;
  width: 60%;
  height: 60%;
  background: radial-gradient(ellipse, rgba(106, 143, 160, 0.18) 0%, transparent 70%);
  animation: blobFloat1 8s ease-in-out infinite alternate;
  pointer-events: none;
}

.landing-page::after {
  content: '';
  position: fixed;
  bottom: -10%;
  right: -10%;
  width: 55%;
  height: 55%;
  background: radial-gradient(ellipse, rgba(122, 158, 138, 0.14) 0%, transparent 70%);
  animation: blobFloat2 10s ease-in-out infinite alternate;
  pointer-events: none;
}

@keyframes blobFloat1 {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(5%, 8%) scale(1.1); }
}

@keyframes blobFloat2 {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(-5%, -8%) scale(1.08); }
}

/* ---- Petals ---- */
.petals-container {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.petal {
  position: absolute;
  top: -60px;
  width: 16px;
  height: 20px;
  background: radial-gradient(ellipse at 40% 30%, rgba(154, 184, 200, 0.85), rgba(106, 143, 160, 0.4));
  border-radius: 50% 10% 50% 10%;
  animation: petalFall linear infinite;
  opacity: 0;
  filter: blur(0.5px);
}

@keyframes petalFall {
  0% {
    opacity: 0;
    transform: translateY(-60px) rotate(0deg) translateX(0px);
  }
  10% { opacity: 0.9; }
  90% { opacity: 0.7; }
  100% {
    opacity: 0;
    transform: translateY(110vh) rotate(720deg) translateX(80px);
  }
}

/* ---- Particles ---- */
.particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}

.particle {
  position: absolute;
  border-radius: 50%;
  background: var(--gold-light);
  animation: particleDrift linear infinite;
  opacity: 0;
}

@keyframes particleDrift {
  0% { opacity: 0; transform: translateY(0) scale(0); }
  20% { opacity: 0.6; transform: translateY(-20px) scale(1); }
  80% { opacity: 0.4; }
  100% { opacity: 0; transform: translateY(-100px) scale(0.5); }
}

/* ---- Landing Header ---- */
.landing-header {
  position: relative;
  z-index: 10;
  padding: 12px 40px;
  display: flex;
  justify-content: center;
  animation: slideDown 0.8s ease forwards;
}

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

.publisher-corner {
  position: absolute;
  bottom: 24px;
  right: 32px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  animation: fadeIn 1.2s ease 1s both;
}

.publisher-label {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--text-light);
}

.publisher-name {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 500;
  color: var(--burgundy);
  letter-spacing: 2px;
}

/* ---- Landing Main ---- */
.landing-main {
  position: relative;
  z-index: 10;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 80px;
  padding: 20px 60px;
  flex-wrap: wrap;
}

/* ============================================
   BOOK 3D
   ============================================ */
.book-wrapper {
  position: relative;
  perspective: 1200px;
  animation: bookEntry 1.2s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s both;
}

@keyframes bookEntry {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.85);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.book {
  position: relative;
  width: 220px;
  height: 310px;
  transform-style: preserve-3d;
  transform: rotateY(-20deg) rotateX(5deg);
  transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: bookFloat 4s ease-in-out infinite;
  cursor: pointer;
}

@keyframes bookFloat {
  0%, 100% { transform: rotateY(-20deg) rotateX(5deg) translateY(0px); }
  50% { transform: rotateY(-20deg) rotateX(5deg) translateY(-12px); }
}

.book:hover {
  transform: rotateY(-30deg) rotateX(5deg) translateY(-8px) scale(1.04);
  animation: none;
}

.book-front {
  position: absolute;
  width: 220px;
  height: 310px;
  transform-origin: left center;
  backface-visibility: hidden;
}

.book-cover {
  width: 100%;
  height: 100%;
  border-radius: 4px 10px 10px 4px;
  background: linear-gradient(165deg, #2e6a82 0%, #1e4d62 35%, #163848 70%, #0f2a38 100%);
  position: relative;
  overflow: hidden;
  box-shadow:
    inset -4px 0 8px rgba(0,0,0,0.3),
    2px 0 0 rgba(255,255,255,0.05);
}

.cover-texture {
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(255,255,255,0.015) 3px, rgba(255,255,255,0.015) 4px),
    repeating-linear-gradient(90deg, transparent, transparent 3px, rgba(255,255,255,0.01) 3px, rgba(255,255,255,0.01) 4px);
  pointer-events: none;
}

.cover-floral-top {
  position: absolute;
  top: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 130px;
  height: 100px;
  background: radial-gradient(ellipse at center bottom, rgba(106, 143, 160, 0.18) 0%, transparent 70%);
  border-radius: 50%;
}

.cover-floral-bottom {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 160px;
  height: 100px;
  background: radial-gradient(ellipse at center top, rgba(106, 143, 160, 0.12) 0%, transparent 70%);
  border-radius: 50%;
}

.cover-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(255,255,255,0.08) 0%, transparent 50%, rgba(0,0,0,0.1) 100%);
  pointer-events: none;
}

.cover-content {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 20px 16px;
}

.cover-ornament {
  font-family: var(--font-serif);
  color: var(--gold-light);
  opacity: 0.6;
  font-size: 11px;
  letter-spacing: 4px;
}

.cover-ornament.top { margin-bottom: 4px; }
.cover-ornament.bot { margin-top: 4px; }

.cover-rose {
  font-size: 32px;
  filter: drop-shadow(0 2px 8px rgba(106, 143, 160, 0.6));
  animation: rosePulse 3s ease-in-out infinite;
}

@keyframes rosePulse {
  0%, 100% { filter: drop-shadow(0 2px 8px rgba(106, 143, 160, 0.6)); transform: scale(1); }
  50% { filter: drop-shadow(0 4px 16px rgba(106, 143, 160, 0.9)); transform: scale(1.08); }
}

.cover-title {
  font-family: var(--font-serif);
  font-size: 36px;
  font-weight: 600;
  letter-spacing: 8px;
  color: var(--cream);
  text-shadow: 0 2px 12px rgba(106,143,160,0.4);
}

.cover-ornament.mid {
  letter-spacing: 6px;
  font-size: 9px;
}

.cover-subtitle {
  font-family: var(--font-serif);
  font-size: 9.5px;
  font-weight: 300;
  font-style: italic;
  color: rgba(253, 248, 243, 0.65);
  text-align: center;
  line-height: 1.6;
  letter-spacing: 0.5px;
}

.cover-divider {
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-light), transparent);
  opacity: 0.5;
  margin: 4px 0;
}

.cover-author {
  font-family: var(--font-serif);
  font-size: 13px;
  font-weight: 400;
  letter-spacing: 4px;
  color: var(--gold-light);
  opacity: 0.85;
  text-transform: uppercase;
}

/* Book Spine */
.book-spine {
  position: absolute;
  left: 0;
  top: 0;
  width: 22px;
  height: 310px;
  background: linear-gradient(180deg, #1e4d62 0%, #163848 50%, #0f2a38 100%);
  transform: rotateY(90deg) translateZ(-11px);
  transform-origin: right center;
  border-radius: 3px 0 0 3px;
  box-shadow: inset -3px 0 6px rgba(0,0,0,0.4);
}

/* Book Back */
.book-back {
  position: absolute;
  width: 220px;
  height: 310px;
  background: linear-gradient(165deg, #163848 0%, #0f2a38 100%);
  transform: translateZ(-22px);
  border-radius: 4px 10px 10px 4px;
}

/* Book shadow */
.book-shadow {
  position: absolute;
  bottom: -30px;
  left: 10%;
  width: 80%;
  height: 30px;
  background: radial-gradient(ellipse, rgba(45, 90, 110, 0.4) 0%, transparent 70%);
  filter: blur(8px);
  animation: shadowPulse 4s ease-in-out infinite;
}

@keyframes shadowPulse {
  0%, 100% { transform: scaleX(1); opacity: 0.7; }
  50% { transform: scaleX(0.9); opacity: 0.5; }
}

/* ---- Landing Text ---- */
.landing-text {
  max-width: 400px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: textEntry 1s ease 0.6s both;
}

@keyframes textEntry {
  from { opacity: 0; transform: translateX(30px); }
  to { opacity: 1; transform: translateX(0); }
}

.tagline {
  font-family: var(--font-serif);
  font-size: 24px;
  font-weight: 400;
  font-style: italic;
  color: var(--burgundy);
  line-height: 1.5;
}

.tagline em {
  font-style: normal;
  font-weight: 600;
  color: var(--rose);
}

.tagline-sub {
  font-family: var(--font-sans);
  font-size: 15px;
  font-weight: 300;
  color: var(--text-mid);
  line-height: 1.7;
}

/* ---- Open Button ---- */
.open-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 36px;
  background: linear-gradient(135deg, var(--burgundy) 0%, #2e6a82 60%, var(--rose) 100%);
  color: var(--cream);
  border: none;
  border-radius: 50px;
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 500;
  letter-spacing: 1px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
  box-shadow: 0 8px 30px rgba(45, 90, 110, 0.4), 0 2px 8px rgba(45, 90, 110, 0.2);
  width: fit-content;
}

.open-btn:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 14px 40px rgba(45, 90, 110, 0.5), 0 4px 12px rgba(45, 90, 110, 0.3);
}

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

.btn-icon {
  font-size: 20px;
}

.btn-shimmer {
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  animation: shimmer 2.5s ease-in-out infinite;
}

@keyframes shimmer {
  from { left: -100%; }
  to { left: 150%; }
}

/* ---- Landing Footer ---- */
.landing-footer {
  position: relative;
  z-index: 10;
  padding: 20px;
  text-align: center;
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--text-light);
  text-transform: uppercase;
  animation: fadeIn 1.2s ease 1s both;
}

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

/* ============================================
   PAGE TRANSITION
   ============================================ */
.page-transition {
  position: fixed;
  inset: 0;
  background: var(--burgundy-dark);
  z-index: 1000;
  transform: scaleX(0);
  transform-origin: left;
}

.page-transition.enter {
  animation: transitionEnter 0.5s cubic-bezier(0.76, 0, 0.24, 1) forwards;
}

.page-transition.exit {
  transform-origin: right;
  animation: transitionExit 0.5s cubic-bezier(0.76, 0, 0.24, 1) forwards;
}

@keyframes transitionEnter {
  from { transform: scaleX(0); }
  to { transform: scaleX(1); }
}

@keyframes transitionExit {
  from { transform: scaleX(1); }
  to { transform: scaleX(0); }
}

/* ============================================
   READER PAGE
   ============================================ */
.reader-page {
  min-height: 100vh;
  background: var(--cream);
  position: relative;
}

/* Reader Header */
.reader-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(253, 248, 243, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(106, 143, 160, 0.15);
  padding: 12px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  transition: box-shadow 0.3s ease;
}

.reader-header.scrolled {
  box-shadow: 0 4px 20px rgba(45, 90, 110, 0.08);
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: transparent;
  border: 1.5px solid rgba(106, 143, 160, 0.35);
  border-radius: 30px;
  color: var(--rose);
  font-family: var(--font-sans);
  font-size: 13px;
  font-weight: 400;
  cursor: pointer;
  transition: all 0.25s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.back-btn:hover {
  background: var(--rose-pale);
  border-color: var(--rose);
  color: var(--burgundy);
  transform: translateX(-2px);
}

.reader-title-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  flex: 1;
  text-align: center;
}

.reader-novel-title {
  font-family: var(--font-serif);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 4px;
  color: var(--burgundy);
}

.reader-author {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 300;
  color: var(--text-light);
  letter-spacing: 1px;
}

.progress-display {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.progress-bar-track {
  width: 80px;
  height: 3px;
  background: rgba(106, 143, 160, 0.2);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--rose), var(--burgundy));
  border-radius: 3px;
  width: 0%;
  transition: width 0.4s ease;
}

.progress-text {
  font-size: 11px;
  color: var(--text-light);
  font-weight: 300;
  white-space: nowrap;
}

/* Reader Body */
.reader-body {
  max-width: 720px;
  margin: 0 auto;
  padding: 110px 28px 80px;
}

/* Chapter Navigation */
.chapter-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 20px 0;
}

.chapter-navigation.top {
  border-bottom: 1px solid rgba(106, 143, 160, 0.12);
  margin-bottom: 20px;
}

.chapter-navigation.bottom {
  border-top: 1px solid rgba(106, 143, 160, 0.12);
  margin-top: 40px;
}

.chapter-btn {
  padding: 10px 22px;
  background: transparent;
  border: 1.5px solid rgba(106, 143, 160, 0.3);
  border-radius: 30px;
  color: var(--rose);
  font-family: var(--font-sans);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.chapter-btn:hover:not(:disabled) {
  background: var(--rose-pale);
  border-color: var(--rose);
  color: var(--burgundy);
}

.chapter-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.toc-btn {
  padding: 10px 20px;
  background: linear-gradient(135deg, var(--burgundy), #2e6a82);
  border: none;
  border-radius: 30px;
  color: var(--cream);
  font-family: var(--font-sans);
  font-size: 13px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.toc-btn:hover {
  transform: scale(1.04);
  box-shadow: 0 4px 16px rgba(45, 90, 110, 0.35);
}

/* Chapter Content */
.chapter-content {
  animation: chapterFadeIn 0.5s ease forwards;
}

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

.chapter-number {
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--rose-light);
  margin-bottom: 8px;
  font-weight: 400;
}

.chapter-title {
  font-family: var(--font-serif);
  font-size: clamp(26px, 5vw, 38px);
  font-weight: 600;
  color: var(--burgundy);
  line-height: 1.2;
  margin-bottom: 32px;
  position: relative;
}

.chapter-title::after {
  content: '';
  display: block;
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--rose), transparent);
  margin-top: 16px;
}

.chapter-body {
  font-family: var(--font-serif);
  font-size: clamp(17px, 2.5vw, 20px);
  line-height: 1.95;
  color: var(--text-dark);
}

.chapter-body p {
  margin-bottom: 1.4em;
  text-indent: 2em;
}

.chapter-body p:first-child {
  text-indent: 0;
}

.chapter-body p:first-child::first-letter {
  font-size: 4.5em;
  font-weight: 600;
  color: var(--burgundy);
  float: left;
  line-height: 0.75;
  padding-right: 8px;
  padding-top: 8px;
  font-family: var(--font-serif);
}

.chapter-end-ornament {
  text-align: center;
  margin: 48px 0 24px;
  color: var(--rose-light);
  font-size: 20px;
  letter-spacing: 8px;
  opacity: 0.6;
}

/* TAMAT page */
.tamat-block {
  text-align: center;
  padding: 60px 20px;
}

.tamat-rose {
  font-size: 64px;
  margin-bottom: 24px;
  animation: rosePulse 3s ease-in-out infinite;
  display: block;
}

.tamat-title {
  font-family: var(--font-serif);
  font-size: 48px;
  letter-spacing: 10px;
  color: var(--burgundy);
  margin-bottom: 12px;
}

.tamat-subtitle {
  font-family: var(--font-sans);
  font-size: 14px;
  letter-spacing: 2px;
  color: var(--text-light);
  text-transform: uppercase;
  margin-bottom: 32px;
}

.tamat-quote {
  font-family: var(--font-serif);
  font-size: 18px;
  font-style: italic;
  color: var(--text-mid);
  line-height: 1.7;
  max-width: 500px;
  margin: 0 auto;
}

/* ---- TOC Sidebar ---- */
.toc-sidebar {
  position: fixed;
  top: 0;
  left: -340px;
  width: 320px;
  height: 100vh;
  background: var(--cream);
  border-right: 1px solid rgba(106, 143, 160, 0.15);
  z-index: 200;
  transition: left 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  overflow-y: auto;
  box-shadow: 4px 0 30px rgba(45, 90, 110, 0.08);
}

.toc-sidebar.open {
  left: 0;
}

.toc-overlay {
  position: fixed;
  inset: 0;
  background: rgba(26, 48, 64, 0.3);
  z-index: 190;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(2px);
}

.toc-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

.toc-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 24px 16px;
  border-bottom: 1px solid rgba(106, 143, 160, 0.15);
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 500;
  color: var(--burgundy);
  position: sticky;
  top: 0;
  background: var(--cream);
  z-index: 1;
}

.toc-close {
  background: none;
  border: none;
  font-size: 16px;
  color: var(--text-light);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: all 0.2s;
}

.toc-close:hover {
  background: var(--rose-pale);
  color: var(--rose);
}

.toc-list {
  list-style: none;
  padding: 16px 0 40px;
}

.toc-item {
  padding: 14px 24px;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: all 0.25s ease;
}

.toc-item:hover {
  background: var(--rose-pale);
  border-left-color: var(--rose-light);
}

.toc-item.active {
  background: rgba(106, 143, 160, 0.1);
  border-left-color: var(--rose);
}

.toc-item-number {
  font-family: var(--font-sans);
  font-size: 10px;
  letter-spacing: 2px;
  color: var(--rose-light);
  text-transform: uppercase;
  display: block;
  margin-bottom: 3px;
}

.toc-item-title {
  font-family: var(--font-serif);
  font-size: 15px;
  color: var(--text-dark);
  line-height: 1.4;
}

.toc-item.active .toc-item-title {
  color: var(--burgundy);
  font-weight: 500;
}

/* FAB TOC Button */
.fab-toc {
  position: fixed;
  bottom: 30px;
  right: 24px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--burgundy), #2e6a82);
  color: var(--cream);
  border: none;
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(45, 90, 110, 0.4);
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 150;
}

.fab-toc:hover {
  transform: scale(1.1) translateY(-2px);
  box-shadow: 0 10px 28px rgba(45, 90, 110, 0.5);
}

/* Scroll to top prompt */
.scroll-top-btn {
  position: fixed;
  bottom: 92px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(253, 248, 243, 0.92);
  backdrop-filter: blur(8px);
  border: 1.5px solid rgba(106, 143, 160, 0.3);
  color: var(--rose);
  font-size: 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s ease;
  z-index: 150;
}

.scroll-top-btn.visible {
  opacity: 1;
  pointer-events: all;
}

.scroll-top-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 4px 16px rgba(45, 90, 110, 0.2);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
  .landing-main {
    flex-direction: column;
    gap: 48px;
    padding: 20px 24px 40px;
    text-align: center;
  }

  .landing-text {
    align-items: center;
    max-width: 100%;
  }

  .book-wrapper {
    transform: scale(0.9);
  }

  .tagline {
    font-size: 20px;
  }

  .landing-header {
    padding: 20px 24px;
  }

  .reader-body {
    padding: 90px 20px 80px;
  }

  .reader-header {
    padding: 10px 16px;
    flex-wrap: wrap;
    gap: 8px;
  }

  .reader-novel-title {
    font-size: 15px;
  }

  .progress-bar-track {
    width: 60px;
  }

  .chapter-navigation {
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
  }

  .chapter-btn {
    font-size: 12px;
    padding: 8px 16px;
  }

  .toc-sidebar {
    width: 100%;
    left: -100%;
  }

  .back-btn span:last-child {
    display: none;
  }
}

@media (max-width: 480px) {
  .book {
    width: 180px;
    height: 254px;
  }

  .book-front, .book-back {
    width: 180px;
    height: 254px;
  }

  .book-spine {
    height: 254px;
  }

  .cover-title {
    font-size: 28px;
  }

  .cover-rose {
    font-size: 26px;
  }

  .open-btn {
    padding: 14px 28px;
    font-size: 16px;
  }

  .reader-body {
    padding: 100px 16px 80px;
  }

  .chapter-body {
    font-size: 16px;
  }
}

/* ============================================
   SCROLLBAR CUSTOM
   ============================================ */
::-webkit-scrollbar {
  width: 6px;
}

::-webkit-scrollbar-track {
  background: var(--cream-dark);
}

::-webkit-scrollbar-thumb {
  background: var(--rose-light);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--rose);
}

/* ============================================
   SELECTION
   ============================================ */
::selection {
  background: rgba(106, 143, 160, 0.25);
  color: var(--burgundy);
}
