/* ══════════════════════════════════════════════════════════
   TakeNovel Theme — Main Stylesheet v1.2.0
   Supports: Light mode / Dark mode / System preference
══════════════════════════════════════════════════════════ */

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ══════════════════════════════
   CSS VARIABLES — DARK (default)
══════════════════════════════ */
:root {
  --bg:      #0d0d12;
  --bg2:     #13131a;
  --bg3:     #1a1a24;
  --bg4:     #22222f;
  --accent:  #c9a84c;
  --accent2: #e8c97a;
  --purple:  #9b72cf;
  --teal:    #4ecdc4;
  --text:    #f0eee8;
  --text2:   #b8b4a8;
  --text3:   #6e6b62;
  --border:  rgba(255,255,255,0.07);
  --border2: rgba(201,168,76,0.25);
  --shadow:  0 6px 24px rgba(0,0,0,0.4);
  --radius:  10px;
  --radius-lg: 16px;
  --font-head: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', sans-serif;
  --side: 2rem;
  --reader-max: 720px;
  --reader-lh:  1.9;
  --reader-font: 18px;
  --ch-grid-cols: 4;
  --header-h: 60px;
}

/* ══════════════════════════════
   LIGHT MODE VARIABLES
══════════════════════════════ */
:root[data-theme="light"],
body.theme-light {
  --bg:     #f8f7f4;
  --bg2:    #ffffff;
  --bg3:    #f0eeea;
  --bg4:    #e8e5df;
  --text:   #1a1a1a;
  --text2:  #4a4a4a;
  --text3:  #888880;
  --border: rgba(0,0,0,0.08);
  --border2:rgba(180,130,40,0.35);
  --shadow: 0 6px 24px rgba(0,0,0,0.1);
}

/* System preference (when no manual override set) */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]):not([data-theme="light"]) {
    --bg:     #f8f7f4;
    --bg2:    #ffffff;
    --bg3:    #f0eeea;
    --bg4:    #e8e5df;
    --text:   #1a1a1a;
    --text2:  #4a4a4a;
    --text3:  #888880;
    --border: rgba(0,0,0,0.08);
    --border2:rgba(180,130,40,0.35);
    --shadow: 0 6px 24px rgba(0,0,0,0.1);
  }
}

/* ── SCROLLBAR ── */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 3px; }

/* ── BASE ── */
html { background: var(--bg) !important; min-height: 100%; }
body {
  font-family: var(--font-body) !important;
  background: var(--bg) !important;
  color: var(--text) !important;
  min-height: 100vh;
  overflow-x: hidden;
  margin: 0 !important; padding: 0 !important; width: 100%;
  transition: background 0.3s, color 0.3s;
}
#page, #page-wrapper, .site, .site-content, #content, main {
  background: var(--bg) !important;
  max-width: 100% !important; width: 100% !important;
}

/* ══════════════════════════════
   ANNOUNCE BAR
══════════════════════════════ */
.announce-bar {
  background: linear-gradient(90deg,#1a0a2e,#4c1d95 50%,#1a0a2e);
  border-bottom: 1px solid rgba(155,114,207,0.2);
  padding: 0.4rem var(--side);
  display: flex; align-items: center; justify-content: center; gap: 0.75rem;
  font-size: 0.75rem; color: rgba(255,255,255,0.7);
  text-align: center; flex-wrap: wrap; width: 100%;
}
.announce-bar strong { color: #e8c97a; }
.announce-bar a { color: var(--purple); text-decoration: none; font-weight: 600; white-space: nowrap; }

/* ══════════════════════════════
   HEADER
══════════════════════════════ */
#site-header {
  position: sticky; top: 0; z-index: 200;
  background: rgba(13,13,18,0.97) !important;
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  padding: 0 var(--side); height: var(--header-h,60px);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; width: 100%;
  transition: box-shadow 0.3s;
}
body.theme-light #site-header {
  background: rgba(248,247,244,0.97) !important;
  border-bottom-color: rgba(0,0,0,0.1);
}
#site-header.scrolled { box-shadow: 0 4px 24px rgba(0,0,0,0.25); }

.logo { font-family: var(--font-head) !important; font-size: 1.4rem; font-weight: 900; color: var(--accent) !important; letter-spacing: -0.5px; text-decoration: none !important; flex-shrink: 0; }
.logo span { color: var(--text) !important; font-weight: 400; font-style: italic; }

.main-nav { display: flex; align-items: center; flex: 1; justify-content: center; }
.main-nav ul, .main-nav .nav-list { list-style: none !important; margin: 0 !important; padding: 0 !important; display: flex !important; align-items: center; gap: 1.5rem; background: none !important; }
.main-nav ul li { list-style: none !important; margin: 0 !important; padding: 0 !important; }
.main-nav ul li a, .main-nav .nav-list li a { color: var(--text2) !important; text-decoration: none !important; font-size: 0.875rem; font-weight: 500; white-space: nowrap; transition: color 0.2s; background: none !important; padding: 0 !important; }
.main-nav ul li a:hover, .main-nav ul li.current-menu-item a { color: var(--accent) !important; }

.header-right { display: flex; align-items: center; gap: 0.75rem; flex-shrink: 0; }

.search-box { display: flex; align-items: center; background: var(--bg3); border: 1px solid var(--border); border-radius: 8px; padding: 0 0.75rem; height: 34px; gap: 0.5rem; transition: border-color 0.2s, box-shadow 0.2s; }
.search-box:focus-within { border-color: rgba(201,168,76,0.4); box-shadow: 0 0 0 3px rgba(201,168,76,0.08); }
.search-box input { background: none; border: none; outline: none; color: var(--text); font-family: var(--font-body); font-size: 0.8125rem; width: 140px; }
.search-box input::placeholder { color: var(--text3); }
.search-box svg { opacity: 0.4; flex-shrink: 0; }

/* Theme toggle button */
.theme-toggle-btn {
  width: 34px; height: 34px; border-radius: 8px;
  border: 1px solid var(--border); background: var(--bg3);
  color: var(--text2); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem; transition: all 0.2s; flex-shrink: 0;
}
.theme-toggle-btn:hover { border-color: var(--border2); color: var(--accent); }

.btn-login  { background: transparent; border: 1px solid var(--border2); color: var(--accent) !important; font-family: var(--font-body); font-size: 0.8125rem; font-weight: 500; padding: 0.375rem 0.875rem; border-radius: 8px; cursor: pointer; white-space: nowrap; text-decoration: none !important; display: inline-block; transition: background 0.2s; }
.btn-login:hover { background: rgba(201,168,76,0.1); }
.btn-primary { background: var(--accent); border: none; color: #0d0d12 !important; font-family: var(--font-body); font-size: 0.8125rem; font-weight: 600; padding: 0.375rem 0.875rem; border-radius: 8px; cursor: pointer; white-space: nowrap; text-decoration: none !important; display: inline-block; transition: background 0.2s; }
.btn-primary:hover { background: var(--accent2); color: #0d0d12 !important; }

/* Hamburger */
.hamburger { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 36px; height: 36px; background: var(--bg3); border: 1px solid var(--border); border-radius: 8px; cursor: pointer; padding: 0 9px; flex-shrink: 0; }
.hamburger span { display: block; height: 1.5px; background: var(--text2); border-radius: 2px; transition: all 0.3s; }
.hamburger.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* Mobile drawer */
.mobile-menu { display: none; position: fixed; top: var(--header-h,60px); left: 0; right: 0; background: rgba(13,13,18,0.99); backdrop-filter: blur(20px); border-bottom: 1px solid var(--border); padding: 1.25rem var(--side) 1.5rem; z-index: 199; flex-direction: column; gap: 0; }
body.theme-light .mobile-menu { background: rgba(248,247,244,0.99); }
.mobile-menu.open { display: flex; }
.mobile-menu .mobile-nav-list { list-style: none !important; margin: 0 !important; padding: 0 !important; }
.mobile-menu .mobile-nav-list li { list-style: none !important; margin: 0 !important; }
.mobile-menu .mobile-nav-list li a, .mobile-menu > a { display: block; color: var(--text2) !important; text-decoration: none !important; font-size: 1rem; font-weight: 500; padding: 0.75rem 0; border-bottom: 1px solid var(--border); transition: color 0.2s; }
.mobile-menu .mobile-nav-list li a:hover { color: var(--accent) !important; }
.mobile-search { display: flex; align-items: center; background: var(--bg3); border: 1px solid var(--border); border-radius: 8px; padding: 0 0.75rem; height: 40px; gap: 0.5rem; margin-bottom: 1rem; }
.mobile-search input { flex: 1; background: none; border: none; outline: none; color: var(--text); font-family: var(--font-body); font-size: 0.9rem; }
.mobile-search input::placeholder { color: var(--text3); }
.mobile-menu-actions { display: flex; gap: 0.75rem; margin-top: 1rem; }
.mobile-menu-actions .btn-login, .mobile-menu-actions .btn-primary { flex: 1; text-align: center; padding: 0.6rem; }

/* ══════════════════════════════
   PAGE WRAPPER
══════════════════════════════ */
#page-wrapper { background: var(--bg); min-height: 60vh; width: 100%; overflow-x: hidden; }
.divider { height: 1px; background: var(--border); margin: 0; }

/* ══════════════════════════════
   HERO
══════════════════════════════ */
.hero { position: relative; min-height: 480px; display: flex; align-items: center; overflow: hidden; padding: 3rem var(--side) 2.5rem; width: 100%; background: var(--bg); }
.hero-bg { position: absolute; inset: 0; background: radial-gradient(ellipse 60% 60% at 80% 50%, rgba(155,114,207,0.12) 0%, transparent 70%), radial-gradient(ellipse 40% 80% at 20% 30%, rgba(201,168,76,0.08) 0%, transparent 60%), linear-gradient(180deg,var(--bg) 0%,var(--bg2) 100%); }
.hero-grid { position: absolute; inset: 0; opacity: 0.025; background-image: linear-gradient(var(--accent) 1px,transparent 1px), linear-gradient(90deg,var(--accent) 1px,transparent 1px); background-size: 40px 40px; }
.hero-inner { position: relative; z-index: 2; display: flex; align-items: center; width: 100%; gap: 2rem; }
.hero-content { flex: 1; min-width: 0; }
.hero-badge { display: inline-flex; align-items: center; gap: 6px; background: rgba(201,168,76,0.1); border: 1px solid var(--border2); color: var(--accent); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; padding: 0.3rem 0.75rem; border-radius: 999px; margin-bottom: 1.25rem; }
.hero-badge::before { content: ''; width: 6px; height: 6px; background: var(--accent); border-radius: 50%; flex-shrink: 0; animation: pulse 2s infinite; }
@keyframes pulse { 0%,100%{opacity:1;}50%{opacity:0.3;} }
.hero h1 { font-family: var(--font-head) !important; font-size: clamp(2rem,5vw,3.4rem); font-weight: 900; line-height: 1.1; margin-bottom: 1.1rem; letter-spacing: -1px; color: var(--text) !important; }
.hero h1 em { font-style: italic; color: var(--accent); }
.hero p { color: var(--text2); font-size: 0.9375rem; line-height: 1.7; margin-bottom: 1.75rem; max-width: 420px; }
.hero-actions { display: flex; align-items: center; gap: 0.875rem; flex-wrap: wrap; }
.btn-hero { background: var(--accent); color: #0d0d12 !important; font-family: var(--font-body); font-size: 0.9375rem; font-weight: 700; padding: 0.7rem 1.5rem; border-radius: var(--radius); border: none; cursor: pointer; transition: all 0.2s; white-space: nowrap; text-decoration: none !important; display: inline-flex; align-items: center; gap: 0.4rem; }
.btn-hero:hover { background: var(--accent2); transform: translateY(-1px); color: #0d0d12 !important; }
.btn-hero-ghost { background: transparent; color: var(--text) !important; font-family: var(--font-body); font-size: 0.9375rem; font-weight: 500; padding: 0.7rem 1.25rem; border-radius: var(--radius); border: 1px solid var(--border); cursor: pointer; transition: all 0.2s; display: inline-flex; align-items: center; gap: 0.5rem; white-space: nowrap; text-decoration: none !important; }
.btn-hero-ghost:hover { border-color: rgba(255,255,255,0.2); background: rgba(255,255,255,0.04); }
.hero-stats { display: flex; gap: 2rem; margin-top: 2.5rem; flex-wrap: wrap; }
.stat-num { font-family: var(--font-head); font-size: 1.6rem; font-weight: 700; color: var(--accent); line-height: 1; }
.stat-label { font-size: 0.7rem; color: var(--text3); margin-top: 3px; letter-spacing: 0.03em; }

/* Hero books */
.hero-books { display: flex; align-items: flex-end; gap: 1rem; flex-shrink: 0; }
.book-float { border-radius: 10px; overflow: hidden; box-shadow: 0 24px 48px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,255,255,0.07); transition: transform 0.3s; }
.book-float:hover { transform: translateY(-6px) rotate(-1deg); }
.book-float-sm  { width: 110px; margin-bottom: 1.5rem; }
.book-float-lg  { width: 145px; }
.book-float-sm2 { width: 110px; margin-bottom: 1rem; }
.book-cover-art { width: 100%; aspect-ratio: 2/3; display: flex; align-items: flex-end; padding: 0.75rem; position: relative; overflow: hidden; }
.bc1{background:linear-gradient(160deg,#1a0a2e 0%,#4a1060 40%,#c9336e 100%);}
.bc2{background:linear-gradient(160deg,#0a1a2e 0%,#10406a 50%,#1890b8 100%);}
.bc3{background:linear-gradient(160deg,#1a1a0a 0%,#4a3810 50%,#c98033 100%);}
.book-title-text { font-family: var(--font-head); font-size: 0.65rem; font-weight: 700; color: rgba(255,255,255,0.92); line-height: 1.3; position: relative; z-index: 1; }
.book-decor { position: absolute; top: -1rem; right: -1rem; width: 80px; height: 80px; border-radius: 50%; background: rgba(255,255,255,0.07); }

/* ══════════════════════════════
   SECTION HEADERS — MOBILE LAYOUT
   Title on row 1, filter on row 2
══════════════════════════════ */
.section { padding: 2rem var(--side); }
.section-header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 0.75rem; margin-bottom: 1.25rem; flex-wrap: wrap;
}
.section-title { font-family: var(--font-head); font-size: 1.375rem; font-weight: 700; letter-spacing: -0.3px; color: var(--text) !important; white-space: nowrap; }
.section-title span { color: var(--accent); font-style: italic; }
.see-all { font-size: 0.8125rem; color: var(--accent) !important; text-decoration: none !important; font-weight: 500; display: flex; align-items: center; gap: 4px; white-space: nowrap; transition: gap 0.2s; }
.see-all:hover { gap: 8px; }

/* Sort bar — sits beside section title on desktop, below on mobile */
.sort-bar {
  display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap;
  flex-shrink: 0;
}
.sort-label { font-size: 0.78rem; color: var(--text3); }
.sort-btn { font-size: 0.78rem; padding: 0.28rem 0.7rem; border-radius: 999px; border: 1px solid var(--border); background: var(--bg3); color: var(--text2) !important; text-decoration: none !important; transition: all 0.2s; white-space: nowrap; }
.sort-btn.active, .sort-btn:hover { background: rgba(201,168,76,0.12); border-color: var(--border2); color: var(--accent) !important; }

/* Genre pills */
.genre-scroll { display: flex; gap: 0.5rem; overflow-x: auto; padding-bottom: 0.25rem; scrollbar-width: none; -ms-overflow-style: none; }
.genre-scroll::-webkit-scrollbar { display: none; }
.genre-pill { padding: 0.35rem 1rem; border-radius: 999px; font-size: 0.8125rem; font-weight: 500; cursor: pointer; border: 1px solid var(--border); color: var(--text2); background: var(--bg3); white-space: nowrap; transition: all 0.2s; flex-shrink: 0; text-decoration: none !important; display: inline-block; }
.genre-pill:hover, .genre-pill.active { background: rgba(201,168,76,0.12); border-color: var(--border2); color: var(--accent) !important; }

/* ══════════════════════════════
   NOVEL / BOOK CARDS GRID
   No horizontal overflow — proper
   auto-fill responsive grid
══════════════════════════════ */
.novels-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  width: 100%;
  /* Prevent ANY horizontal scroll */
  overflow: hidden;
}

/* Card */
.novel-card { cursor: pointer; transition: transform 0.25s; min-width: 0; }
.novel-card:hover { transform: translateY(-4px); }
.novel-card-link { text-decoration: none !important; color: inherit !important; display: block; }

/* ── COVER IMAGE — fixed aspect ratio, no zoom overflow ── */
.novel-thumb {
  width: 100%;
  aspect-ratio: 2/3;
  border-radius: var(--radius);
  overflow: hidden;          /* clip the image inside */
  position: relative;
  margin-bottom: 0.65rem;
  box-shadow: var(--shadow);
  background: var(--bg3);   /* placeholder while image loads */
}
.novel-thumb::after {
  content: 'Read Now →';
  position: absolute; inset: 0;
  background: rgba(13,13,18,0.75);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.7rem; font-weight: 700; color: var(--accent); letter-spacing: 0.05em;
  opacity: 0; transition: opacity 0.25s; border-radius: var(--radius);
}
.novel-card:hover .novel-thumb::after { opacity: 1; }

/* Cover image — fill the box properly, never zoom beyond container */
.novel-thumb .book-cover-img,
.novel-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;       /* fills without distortion */
  object-position: center top; /* show top of cover (title area) */
  display: block;
}

/* CSS fallback cover */
.novel-thumb .book-cover-fallback {
  position: absolute; inset: 0;
  display: flex; align-items: flex-end; padding: 0.6rem;
  font-family: var(--font-head); font-size: 0.6rem; color: rgba(255,255,255,0.9); font-weight: 700; line-height: 1.3;
}

.novel-badge { position: absolute; top: 7px; left: 7px; font-size: 0.58rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; padding: 2px 6px; border-radius: 4px; z-index: 2; }
.badge-hot  { background: #e05252; color: #fff; }
.badge-new  { background: var(--accent); color: #0d0d12; }
.badge-top  { background: var(--purple); color: #fff; }
.badge-comp { background: var(--teal); color: #0d0d12; }

/* Cover decorative decor element */
.cover-decor { position: absolute; top: -1.5rem; right: -1.5rem; width: 90px; height: 90px; border-radius: 50%; background: rgba(255,255,255,0.07); pointer-events: none; }
.cover-label { font-family: var(--font-head); font-size: 0.6rem; color: rgba(255,255,255,0.9); font-weight: 700; line-height: 1.3; position: relative; z-index: 1; }

.novel-title  { font-size: 0.84rem; font-weight: 600; line-height: 1.35; margin-bottom: 0.2rem; color: var(--text) !important; }
.novel-author { font-size: 0.72rem; color: var(--text3); margin-bottom: 0.3rem; }
.novel-meta   { display: flex; align-items: center; gap: 0.4rem; font-size: 0.68rem; color: var(--text3); flex-wrap: wrap; }
.novel-meta .star { color: var(--accent); }
.novel-meta .dot  { opacity: 0.3; }

/* Color palette for CSS fallback covers */
.c1{background:linear-gradient(145deg,#2d0a3e 0%,#7b1fa2 50%,#e91e8c 100%);}
.c2{background:linear-gradient(145deg,#0a1929 0%,#1565c0 50%,#42a5f5 100%);}
.c3{background:linear-gradient(145deg,#1a0000 0%,#7f1d1d 50%,#dc2626 100%);}
.c4{background:linear-gradient(145deg,#0d2818 0%,#065f46 50%,#34d399 100%);}
.c5{background:linear-gradient(145deg,#1c1830 0%,#4c1d95 50%,#8b5cf6 100%);}
.c6{background:linear-gradient(145deg,#1a1200 0%,#78350f 50%,#f59e0b 100%);}
.c7{background:linear-gradient(145deg,#1a0a14 0%,#831843 50%,#f472b6 100%);}
.c8{background:linear-gradient(145deg,#001a1a 0%,#134e4a 50%,#2dd4bf 100%);}

/* No books placeholder */
.no-novels-placeholder { grid-column: 1/-1; text-align: center; padding: 3rem; color: var(--text3); border: 1px dashed var(--border); border-radius: var(--radius-lg); }
.no-novels-placeholder a { color: var(--accent); text-decoration: none; }

/* ══════════════════════════════
   FEATURED BANNER
══════════════════════════════ */
.featured-banner { background: linear-gradient(135deg,#1a0a2e 0%,#2d1060 40%,#1a0a2e 100%); border: 1px solid rgba(155,114,207,0.2); border-radius: var(--radius-lg); padding: 2rem; display: flex; gap: 1.5rem; align-items: center; position: relative; overflow: hidden; margin: 0 var(--side) 2.5rem; }
.featured-banner::before { content:''; position:absolute; right:-80px; top:-80px; width:250px; height:250px; border-radius:50%; background:radial-gradient(circle,rgba(155,114,207,0.15) 0%,transparent 70%); pointer-events:none; }
.featured-label { position:absolute; top:1rem; right:1rem; font-size:0.62rem; font-weight:700; letter-spacing:0.12em; text-transform:uppercase; color:var(--purple); background:rgba(155,114,207,0.12); border:1px solid rgba(155,114,207,0.25); padding:3px 9px; border-radius:999px; }
.featured-book-thumb { width:110px; min-width:110px; height:165px; border-radius:10px; overflow:hidden; box-shadow:0 16px 40px rgba(0,0,0,0.6); position:relative; z-index:1; flex-shrink:0; }
.featured-book-thumb img { width:100%; height:100%; object-fit:cover; object-position:center top; display:block; }
.featured-book-inner { width:100%; height:100%; background:linear-gradient(155deg,#0a0a1e 0%,#4c1d95 50%,#7c3aed 100%); display:flex; align-items:flex-end; padding:0.875rem; }
.featured-content { position:relative; z-index:1; flex:1; min-width:0; }
.featured-genre { font-size:0.68rem; font-weight:700; letter-spacing:0.1em; text-transform:uppercase; color:var(--purple); margin-bottom:0.5rem; }
.featured-title { font-family:var(--font-head); font-size:clamp(1.1rem,3vw,1.4rem); font-weight:900; line-height:1.2; margin-bottom:0.4rem; letter-spacing:-0.3px; color:var(--text) !important; }
.featured-author { font-size:0.78rem; color:var(--text2); margin-bottom:0.6rem; }
.featured-stars { display:flex; align-items:center; gap:4px; font-size:0.72rem; color:var(--accent); margin-bottom:0.6rem; }
.featured-stars span { color:var(--text2); margin-left:3px; }
.featured-desc { font-size:0.8rem; color:var(--text2); line-height:1.6; margin-bottom:1rem; display:-webkit-box; -webkit-line-clamp:3; -webkit-box-orient:vertical; overflow:hidden; }
.featured-actions { display:flex; gap:0.625rem; align-items:center; }
.btn-read { background:var(--purple); color:#fff !important; font-family:var(--font-body); font-size:0.84rem; font-weight:600; padding:0.55rem 1.25rem; border-radius:var(--radius); border:none; cursor:pointer; text-decoration:none !important; display:inline-block; transition:all 0.2s; white-space:nowrap; }
.btn-read:hover { background:#b48ee8; transform:translateY(-1px); }
.btn-bookmark { width:36px; height:36px; border-radius:8px; flex-shrink:0; border:1px solid rgba(155,114,207,0.3); background:rgba(155,114,207,0.08); color:var(--purple); cursor:pointer; display:flex; align-items:center; justify-content:center; font-size:1rem; transition:all 0.2s; }
.btn-bookmark:hover { background:rgba(155,114,207,0.15); }

/* ══════════════════════════════
   TWO-COLUMN LAYOUT
══════════════════════════════ */
.two-col { display:grid; grid-template-columns:1fr 310px; gap:2rem; padding:0 var(--side) 3rem; align-items:start; }
.novel-row-grid { display:grid; grid-template-columns:1fr 1fr; gap:0.875rem; margin-bottom:2.5rem; }
.novel-row-card { background:var(--bg2); border:1px solid var(--border); border-radius:var(--radius-lg); overflow:hidden; transition:all 0.25s; }
.novel-row-card:hover { border-color:var(--border2); background:var(--bg3); transform:translateY(-2px); }
.novel-row-card-inner { text-decoration:none !important; color:inherit !important; display:flex; gap:0.75rem; padding:0.875rem; }

/* Row card thumb — fixed size, no zoom */
.row-thumb { width:58px; height:87px; border-radius:7px; overflow:hidden; flex-shrink:0; box-shadow:0 4px 12px rgba(0,0,0,0.3); position:relative; }
.row-thumb img, .row-thumb .book-cover-img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; object-position:center top; display:block; }
.row-thumb-inner { width:100%; height:100%; display:flex; align-items:flex-end; padding:0.35rem; }
.row-thumb-text { font-size:0.42rem; font-family:var(--font-head); color:rgba(255,255,255,0.85); font-weight:700; line-height:1.2; }

.row-info { flex:1; min-width:0; }
.row-rank    { font-size:0.62rem; font-weight:700; color:var(--accent); letter-spacing:0.08em; text-transform:uppercase; margin-bottom:0.3rem; }
.row-title   { font-size:0.84rem; font-weight:600; line-height:1.3; margin-bottom:0.25rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; color:var(--text) !important; }
.row-excerpt { font-size:0.7rem; color:var(--text3); line-height:1.5; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; margin-bottom:0.5rem; }
.row-tags    { display:flex; gap:0.3rem; flex-wrap:wrap; }
.row-tag     { font-size:0.58rem; padding:2px 5px; border-radius:4px; background:var(--bg4); color:var(--text3); border:1px solid var(--border); }

/* ══════════════════════════════
   SIDEBAR
══════════════════════════════ */
.sidebar-widget { background:var(--bg2); border:1px solid var(--border); border-radius:var(--radius-lg); padding:1.1rem; margin-bottom:1.1rem; }
.widget_search,.widget_recent_entries,.widget_recent_comments,.widget_archives,.widget_meta,.widget_categories { display:none !important; }
.widget-title { font-family:var(--font-head); font-size:0.9375rem; font-weight:700; margin-bottom:0.875rem; display:flex; align-items:center; gap:0.5rem; color:var(--text) !important; }
.widget-title::before { content:''; width:3px; height:14px; background:var(--accent); border-radius:2px; flex-shrink:0; }
.trending-list { display:flex; flex-direction:column; gap:0.7rem; }
.trending-item { display:flex; gap:0.7rem; align-items:flex-start; cursor:pointer; transition:opacity 0.2s; text-decoration:none !important; color:inherit !important; }
.trending-item:hover { opacity:0.8; }
.trending-cover { width:42px; height:60px; border-radius:6px; overflow:hidden; flex-shrink:0; position:relative; }
.trending-cover img, .trending-cover .book-cover-img { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; object-position:center top; display:block; }
.trending-cover .book-cover-fallback { position:absolute; inset:0; display:flex; align-items:flex-end; padding:0.25rem; font-size:0.4rem; font-family:var(--font-head); color:rgba(255,255,255,0.85); font-weight:700; line-height:1.2; }
.t-title { font-size:0.8rem; font-weight:600; line-height:1.3; margin-bottom:0.2rem; color:var(--text) !important; }
.t-meta  { font-size:0.68rem; color:var(--text3); display:flex; align-items:center; gap:0.4rem; }
.t-meta .star { color:var(--accent); }
.genre-grid { display:grid; grid-template-columns:1fr 1fr; gap:0.4rem; }
a.genre-item, .genre-item { padding:0.55rem 0.65rem; background:var(--bg3); border:1px solid var(--border); border-radius:8px; font-size:0.72rem; color:var(--text2) !important; cursor:pointer; transition:all 0.2s; display:flex; align-items:center; justify-content:space-between; gap:4px; text-decoration:none !important; }
a.genre-item:hover, a.genre-item.active, .genre-item:hover { border-color:var(--border2); color:var(--accent) !important; background:rgba(201,168,76,0.06); }
.genre-count { font-size:0.6rem; color:var(--text3); background:var(--bg4); padding:1px 4px; border-radius:3px; flex-shrink:0; }
a.genre-item.active .genre-count { background:rgba(201,168,76,0.2); color:var(--accent); }
.continue-item { display:flex; gap:0.7rem; align-items:center; padding:0.65rem; background:var(--bg3); border-radius:var(--radius); margin-bottom:0.45rem; cursor:pointer; transition:background 0.2s; text-decoration:none !important; color:inherit !important; }
.continue-item:last-child { margin-bottom:0; }
.continue-item:hover { background:var(--bg4); }
.continue-thumb { width:42px; height:60px; border-radius:6px; overflow:hidden; flex-shrink:0; position:relative; }
.continue-thumb .row-thumb-inner { position:absolute; inset:0; width:100%; height:100%; }
.continue-info { flex:1; min-width:0; }
.continue-title   { font-size:0.78rem; font-weight:600; line-height:1.3; margin-bottom:0.2rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; color:var(--text) !important; }
.continue-chapter { font-size:0.68rem; color:var(--accent); margin-bottom:0.35rem; }
.progress-bar-wrap  { width:100%; height:3px; background:var(--bg4); border-radius:2px; overflow:hidden; }
.progress-bar-fill  { height:100%; background:var(--accent); border-radius:2px; }
.no-history { font-size:0.8rem; color:var(--text3); margin:0; }

/* ══════════════════════════════
   FOOTER
══════════════════════════════ */
#site-footer { background:var(--bg2) !important; border-top:1px solid var(--border); padding:2.5rem var(--side) 1.25rem; width:100%; }
.footer-grid { display:grid; grid-template-columns:2fr 1fr 1fr 1fr; gap:2rem; margin-bottom:2rem; }
.footer-brand p { font-size:0.8rem; color:var(--text3); line-height:1.7; margin-top:0.75rem; }
.footer-socials { display:flex; gap:0.5rem; margin-top:0.875rem; }
.social-btn { width:32px; height:32px; border-radius:7px; border:1px solid var(--border); background:var(--bg3); color:var(--text2) !important; display:flex; align-items:center; justify-content:center; cursor:pointer; font-size:0.8rem; transition:all 0.2s; text-decoration:none !important; }
.social-btn:hover { border-color:var(--border2); color:var(--accent) !important; }
.footer-col h4 { font-size:0.72rem; font-weight:700; color:var(--text); letter-spacing:0.06em; text-transform:uppercase; margin-bottom:0.875rem; }
.footer-col a { display:block; color:var(--text3) !important; text-decoration:none !important; font-size:0.8rem; margin-bottom:0.55rem; transition:color 0.2s; }
.footer-col a:hover { color:var(--accent) !important; }
.footer-bottom { border-top:1px solid var(--border); padding-top:1.1rem; display:flex; justify-content:space-between; align-items:center; gap:1rem; flex-wrap:wrap; }
.footer-bottom p { font-size:0.72rem; color:var(--text3); }
.footer-bottom-links { display:flex; gap:1.25rem; flex-wrap:wrap; }
.footer-bottom-links a { font-size:0.72rem; color:var(--text3) !important; text-decoration:none !important; transition:color 0.2s; }
.footer-bottom-links a:hover { color:var(--accent) !important; }

/* ══════════════════════════════
   NOVEL HERO (book detail page)
══════════════════════════════ */
.novel-hero { position:relative; overflow:hidden; background:var(--bg); min-height:360px; }
.novel-hero-blur { position:absolute; inset:-20px; z-index:0; filter:blur(40px) brightness(0.25) saturate(1.5); overflow:hidden; }
.novel-hero-blur-img { width:100%; height:100%; object-fit:cover; }
.novel-hero-overlay { position:absolute; inset:0; z-index:1; background:linear-gradient(to bottom,rgba(13,13,18,0.6) 0%,rgba(13,13,18,0.95) 100%); }
body.theme-light .novel-hero-overlay { background:linear-gradient(to bottom,rgba(248,247,244,0.5) 0%,rgba(248,247,244,0.95) 100%); }
.novel-hero-inner { position:relative; z-index:2; display:flex; gap:2.5rem; align-items:flex-start; padding:2.5rem var(--side) 2rem; }
.novel-cover-wrap { flex-shrink:0; position:relative; width:190px; }
.novel-cover-main { width:190px; aspect-ratio:2/3; border-radius:var(--radius-lg); object-fit:cover; object-position:center top; display:block; box-shadow:0 24px 60px rgba(0,0,0,0.6),0 0 0 1px rgba(255,255,255,0.08); }
.novel-cover-fallback { display:flex; align-items:flex-end; padding:1rem; }
.cover-label-lg { font-family:var(--font-head); font-size:0.875rem; font-weight:700; color:rgba(255,255,255,0.92); line-height:1.3; position:relative; z-index:1; }
.cover-bookmark { position:absolute; top:10px; right:10px; width:34px; height:34px; border-radius:8px; background:rgba(0,0,0,0.5); border:1px solid rgba(255,255,255,0.15); cursor:pointer; display:flex; align-items:center; justify-content:center; font-size:0.875rem; transition:all 0.2s; }
.cover-bookmark:hover { background:rgba(201,168,76,0.2); border-color:var(--border2); }
.novel-hero-info { flex:1; min-width:0; }
.novel-breadcrumb { font-size:0.72rem; color:var(--text3); margin-bottom:0.75rem; display:flex; align-items:center; gap:0.375rem; flex-wrap:wrap; }
.novel-breadcrumb a { color:var(--text3) !important; text-decoration:none !important; transition:color 0.2s; }
.novel-breadcrumb a:hover { color:var(--accent) !important; }
.novel-hero-title { font-family:var(--font-head) !important; font-size:clamp(1.6rem,4vw,2.5rem); font-weight:900; line-height:1.15; margin-bottom:0.6rem; letter-spacing:-0.5px; color:var(--text) !important; }
.novel-hero-author { font-size:0.9rem; color:var(--text2); margin-bottom:0.875rem; }
.author-link { color:var(--accent) !important; text-decoration:none !important; font-weight:600; }
.novel-rating-row { display:flex; align-items:center; gap:0.5rem; margin-bottom:1rem; flex-wrap:wrap; }
.stars-display { display:flex; gap:2px; }
.star-icon { font-size:1.1rem; line-height:1; }
.star-icon.filled { color:var(--accent); }
.star-icon.empty  { color:var(--bg4); }
.rating-number { font-family:var(--font-head); font-size:1rem; font-weight:700; color:var(--accent); }
.rating-count  { font-size:0.75rem; color:var(--text3); }
.novel-stats-row { display:flex; gap:1.5rem; margin-bottom:1rem; flex-wrap:wrap; }
.nstat { display:flex; align-items:center; gap:0.5rem; }
.nstat-icon { width:16px; height:16px; color:var(--text3); flex-shrink:0; }
.nstat-val   { font-size:0.875rem; font-weight:700; color:var(--text); line-height:1.2; }
.nstat-label { font-size:0.65rem; color:var(--text3); }
.novel-genre-tags { display:flex; gap:0.4rem; flex-wrap:wrap; margin-bottom:1.25rem; }
.genre-tag { padding:0.3rem 0.75rem; border-radius:999px; background:rgba(155,114,207,0.12); border:1px solid rgba(155,114,207,0.25); color:var(--purple) !important; font-size:0.78rem; text-decoration:none !important; transition:all 0.2s; }
.genre-tag:hover { background:rgba(155,114,207,0.22); }
.novel-hero-actions { display:flex; gap:0.75rem; align-items:center; flex-wrap:wrap; }
.btn-start-reading { display:inline-flex; align-items:center; gap:0.5rem; }

/* Novel body */
.novel-body { padding:2rem var(--side) 3rem; max-width:1100px; margin:0 auto; }
.novel-synopsis-box { background:var(--bg2); border:1px solid var(--border); border-radius:var(--radius-lg); padding:1.5rem; margin-bottom:2rem; }
.synopsis-heading { font-family:var(--font-head); font-size:1rem; font-weight:700; color:var(--text) !important; margin-bottom:0.875rem; display:flex; align-items:center; gap:0.5rem; }
.synopsis-heading::before { content:''; width:3px; height:14px; background:var(--accent); border-radius:2px; flex-shrink:0; }
.synopsis-body { font-size:0.9375rem; line-height:1.8; color:var(--text2); }
.synopsis-body p { margin-bottom:0.875em; }
.synopsis-toggle { display:inline-block; margin-top:0.75rem; background:none; border:none; color:var(--accent) !important; font-family:var(--font-body); font-size:0.84rem; font-weight:600; cursor:pointer; padding:0; }

/* ══════════════════════════════
   CHAPTER GRID
══════════════════════════════ */
.chapter-grid-section {}
.chapter-grid-header { background:var(--bg2); border:1px solid var(--border); border-radius:var(--radius-lg) var(--radius-lg) 0 0; padding:1rem 1.25rem; }
.chapter-grid-title-row { display:flex; align-items:center; justify-content:space-between; gap:1rem; margin-bottom:0.75rem; }
.chapter-total-badge { display:inline-flex; align-items:center; justify-content:center; background:rgba(201,168,76,0.15); border:1px solid var(--border2); color:var(--accent); font-size:0.7rem; font-weight:700; padding:2px 8px; border-radius:999px; margin-left:0.5rem; font-family:var(--font-body); }
.chapter-grid-controls { display:flex; align-items:center; gap:0.625rem; }
.view-toggle { display:flex; background:var(--bg3); border:1px solid var(--border); border-radius:8px; overflow:hidden; }
.view-btn { padding:0.35rem 0.6rem; background:none; border:none; color:var(--text3); cursor:pointer; transition:all 0.2s; display:flex; align-items:center; }
.view-btn.active { background:var(--bg4); color:var(--accent); }
.view-btn:hover  { color:var(--text); }
.sort-toggle-btn { display:flex; align-items:center; gap:0.35rem; background:var(--bg3); border:1px solid var(--border); border-radius:8px; padding:0.35rem 0.75rem; color:var(--text2); font-size:0.78rem; font-weight:500; cursor:pointer; font-family:var(--font-body); transition:all 0.2s; }
.sort-toggle-btn:hover { border-color:var(--border2); color:var(--accent); }
.chapter-search-box { display:flex; align-items:center; gap:0.5rem; background:var(--bg3); border:1px solid var(--border); border-radius:8px; padding:0.4rem 0.875rem; height:36px; transition:border-color 0.2s; }
.chapter-search-box:focus-within { border-color:var(--border2); }
.chapter-search-box input { flex:1; background:none; border:none; outline:none; color:var(--text); font-family:var(--font-body); font-size:0.8125rem; }
.chapter-search-box input::placeholder { color:var(--text3); }
.chapters-grid { background:var(--bg2); border:1px solid var(--border); border-top:none; padding:1rem; border-radius:0 0 var(--radius-lg) var(--radius-lg); }
.chapters-grid[data-view="grid"] { display:grid; grid-template-columns:repeat(var(--ch-grid-cols,4),1fr); gap:0.625rem; }
.chapters-grid[data-view="list"] { display:flex; flex-direction:column; gap:0.3rem; }
.chapters-grid[data-view="list"] .chapter-card { flex-direction:row; align-items:center; border-radius:8px; padding:0.7rem 1rem; gap:1rem; border-bottom:1px solid var(--border); }
.chapters-grid[data-view="list"] .chapter-card:last-child { border-bottom:none; }
.chapters-grid[data-view="list"] .chapter-card-num   { font-size:0.78rem; min-width:60px; }
.chapters-grid[data-view="list"] .chapter-card-title { flex:1; font-size:0.875rem; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.chapters-grid[data-view="list"] .chapter-card-date  { font-size:0.72rem; color:var(--text3); flex-shrink:0; margin-top:0; }
.chapter-card { display:flex; flex-direction:column; gap:0.25rem; background:var(--bg3); border:1px solid var(--border); border-radius:8px; padding:0.75rem 0.875rem; text-decoration:none !important; color:inherit !important; transition:all 0.2s; cursor:pointer; }
.chapter-card:hover { background:var(--bg4); border-color:var(--border2); transform:translateY(-2px); }
.chapter-card-num   { display:flex; align-items:center; justify-content:space-between; font-size:0.7rem; font-weight:700; color:var(--accent); letter-spacing:0.05em; margin-bottom:0.2rem; }
.ch-new-dot { width:6px; height:6px; border-radius:50%; background:var(--accent); flex-shrink:0; animation:pulse 2s infinite; }
.chapter-card-title { font-size:0.8rem; font-weight:600; line-height:1.35; color:var(--text) !important; display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden; }
.chapter-card-date { font-size:0.65rem; color:var(--text3); margin-top:0.25rem; }
.no-chapters-msg { grid-column:1/-1; text-align:center; padding:3rem; color:var(--text3); font-size:0.875rem; }
.chapter-pagination { margin-top:1.25rem; }
.chapter-pagination ul { list-style:none; display:flex; gap:0.5rem; flex-wrap:wrap; margin:0; padding:0; }
.chapter-pagination ul li a, .chapter-pagination ul li span { display:flex; align-items:center; justify-content:center; min-width:36px; height:36px; padding:0 0.5rem; border-radius:8px; border:1px solid var(--border); background:var(--bg3); color:var(--text2) !important; text-decoration:none !important; font-size:0.875rem; transition:all 0.2s; }
.chapter-pagination ul li a:hover, .chapter-pagination ul li .current { background:rgba(201,168,76,0.12); border-color:var(--border2); color:var(--accent) !important; }

/* ══════════════════════════════
   READER PAGE
══════════════════════════════ */
.reader-page { min-height:100vh; background:var(--bg); }
.reader-bar { position:sticky; top:0; z-index:150; background:rgba(13,13,18,0.97); backdrop-filter:blur(16px); border-bottom:1px solid var(--border); display:flex; align-items:center; justify-content:space-between; padding:0 var(--side); height:52px; gap:1rem; }
body.theme-light .reader-bar { background:rgba(248,247,244,0.97); }
.reader-bar-left  { display:flex; align-items:center; flex:1; min-width:0; }
.reader-bar-center{ flex:1; text-align:center; display:flex; align-items:center; justify-content:center; gap:0.5rem; flex-shrink:0; }
.reader-bar-right { display:flex; align-items:center; gap:0.5rem; flex:1; justify-content:flex-end; }
.reader-back { display:flex; align-items:center; gap:0.5rem; color:var(--text2) !important; text-decoration:none !important; font-size:0.8rem; transition:color 0.2s; min-width:0; }
.reader-back:hover { color:var(--accent) !important; }
.reader-back-title { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; max-width:180px; }
.reader-bar-chnum    { font-size:0.78rem; font-weight:700; color:var(--accent); white-space:nowrap; }
.reader-bar-sep      { color:var(--text3); font-size:0.7rem; }
.reader-bar-progress { font-size:0.72rem; color:var(--text3); white-space:nowrap; }
.reader-tool-btn { width:32px; height:32px; border-radius:7px; border:1px solid var(--border); background:var(--bg3); color:var(--text2); cursor:pointer; display:flex; align-items:center; justify-content:center; font-size:0.8rem; font-family:var(--font-body); flex-shrink:0; transition:all 0.2s; text-decoration:none !important; }
.reader-tool-btn:hover { border-color:var(--border2); color:var(--accent); }
.reader-settings-panel { position:fixed; top:52px; right:var(--side); z-index:200; background:var(--bg2); border:1px solid var(--border); border-radius:var(--radius-lg); padding:1.1rem; min-width:220px; box-shadow:0 12px 40px rgba(0,0,0,0.4); }
.rsp-label  { font-size:0.72rem; font-weight:700; color:var(--text3); letter-spacing:0.06em; text-transform:uppercase; margin-bottom:0.5rem; }
.rsp-bg-options { display:flex; gap:0.5rem; }
.rsp-bg-btn { width:40px; height:40px; border-radius:8px; border:2px solid transparent; font-weight:700; font-size:0.8rem; cursor:pointer; transition:all 0.2s; }
.rsp-bg-btn:hover { border-color:var(--accent); }
.rsp-font-slider { display:flex; align-items:center; gap:0.75rem; }
.rsp-font-btn { width:32px; height:32px; border-radius:7px; border:1px solid var(--border); background:var(--bg3); color:var(--text2); cursor:pointer; font-family:var(--font-body); font-size:0.78rem; transition:all 0.2s; }
.rsp-font-btn:hover { border-color:var(--border2); color:var(--accent); }
.rsp-font-val { flex:1; text-align:center; font-size:0.8rem; color:var(--text); font-weight:600; }
.reader-article { max-width:var(--reader-max,720px); margin:0 auto; padding:3rem var(--side) 2rem; }
.reader-chapter-label { font-size:0.72rem; font-weight:700; letter-spacing:0.14em; text-transform:uppercase; color:var(--accent); margin-bottom:0.6rem; }
.reader-chapter-title { font-family:var(--font-head) !important; font-size:clamp(1.4rem,3vw,2rem); font-weight:700; margin-bottom:1.25rem; letter-spacing:-0.3px; color:var(--text) !important; line-height:1.2; }
.reader-divider { text-align:center; color:var(--text3); font-size:0.875rem; margin-bottom:2rem; letter-spacing:0.2em; }
.reader-content { font-size:var(--reader-font,18px); line-height:var(--reader-lh,1.9); color:#c8c4bc; font-family:Georgia,serif; transition:font-size 0.2s,background 0.3s; }
body.theme-light .reader-content { color:#2a2a2a; }
.reader-content p { margin-bottom:1.4em; }
.reader-progress-strip { position:fixed; bottom:0; left:0; right:0; height:3px; background:var(--bg3); z-index:100; }
.reader-progress-fill  { height:100%; background:var(--accent); border-radius:0 2px 0 0; transition:width 0.1s; width:0; }
.reader-chapter-nav { display:flex; align-items:stretch; gap:0.75rem; max-width:var(--reader-max,720px); margin:0 auto; padding:1.5rem var(--side) 4rem; }
.rcn-btn { flex:1; display:flex; align-items:center; gap:0.875rem; background:var(--bg2); border:1px solid var(--border); border-radius:var(--radius-lg); padding:1rem 1.25rem; text-decoration:none !important; color:inherit !important; transition:all 0.25s; min-width:0; }
.rcn-btn:hover { border-color:var(--border2); background:var(--bg3); transform:translateY(-2px); }
.rcn-prev { justify-content:flex-start; }
.rcn-next { justify-content:flex-end; text-align:right; }
.rcn-info { min-width:0; }
.rcn-label { font-size:0.68rem; font-weight:700; color:var(--accent); text-transform:uppercase; letter-spacing:0.08em; margin-bottom:0.2rem; }
.rcn-title { font-size:0.84rem; font-weight:600; color:var(--text); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.rcn-index-btn { width:48px; flex-shrink:0; display:flex; align-items:center; justify-content:center; background:var(--bg2); border:1px solid var(--border); border-radius:var(--radius-lg); color:var(--text2) !important; text-decoration:none !important; transition:all 0.2s; }
.rcn-index-btn:hover { border-color:var(--border2); color:var(--accent) !important; }
.reader-comments-wrap { max-width:var(--reader-max,720px); margin:0 auto; padding:0 var(--side) 3rem; }

/* ══════════════════════════════
   LOADER
══════════════════════════════ */
.loader-spinner { width:32px; height:32px; border:3px solid var(--border); border-top-color:var(--accent); border-radius:50%; animation:spin 0.8s linear infinite; margin:1.5rem auto; }
@keyframes spin { to { transform:rotate(360deg); } }
.grid-loader { text-align:center; }

/* ══════════════════════════════
   ARCHIVE / SEARCH
══════════════════════════════ */
.archive-wrap { display:grid; grid-template-columns:1fr 300px; gap:2rem; padding:2rem var(--side) 3rem; align-items:start; background:var(--bg); }
.novel-count { font-size:0.8rem; color:var(--text3); }
.pagination { margin-top:2rem; }
.pagination ul { list-style:none; display:flex; gap:0.5rem; flex-wrap:wrap; margin:0; padding:0; }
.pagination ul li a, .pagination ul li span { display:flex; align-items:center; justify-content:center; width:36px; height:36px; border-radius:8px; border:1px solid var(--border); background:var(--bg3); color:var(--text2) !important; text-decoration:none !important; font-size:0.875rem; transition:all 0.2s; }
.pagination ul li a:hover, .pagination ul li .current { background:rgba(201,168,76,0.12); border-color:var(--border2); color:var(--accent) !important; }
.no-results { grid-column:1/-1; text-align:center; padding:3rem; color:var(--text2); }

/* ══════════════════════════════
   COMMENTS
══════════════════════════════ */
.comment-list { list-style:none; margin:0; padding:0; }
.comment-list .comment { background:var(--bg2); border:1px solid var(--border); border-radius:var(--radius); padding:1rem; margin-bottom:0.75rem; }
.comment-author .fn { font-weight:600; color:var(--text); font-size:0.875rem; }
.comment-metadata { font-size:0.72rem; color:var(--text3); }
.comment-content p { font-size:0.875rem; color:var(--text2); line-height:1.6; margin-top:0.5rem; }
#respond { background:var(--bg2); border:1px solid var(--border); border-radius:var(--radius-lg); padding:1.5rem; margin-top:1.5rem; }
#respond h3 { font-family:var(--font-head); color:var(--text); margin-bottom:1rem; font-size:1.1rem; }
#respond input, #respond textarea { background:var(--bg3); border:1px solid var(--border); border-radius:8px; color:var(--text); font-family:var(--font-body); padding:0.6rem 0.875rem; width:100%; margin-bottom:0.75rem; font-size:0.875rem; outline:none; }
#respond input:focus, #respond textarea:focus { border-color:var(--border2); }
#respond .submit { background:var(--accent); color:#0d0d12; font-weight:600; border:none; padding:0.6rem 1.5rem; border-radius:8px; cursor:pointer; font-family:var(--font-body); }

/* ══════════════════════════════
   CHAPTER CONTENT STYLES
   (match editor-style.css exactly)
══════════════════════════════ */
.reader-content p.chapter-break, .entry-content p.chapter-break { text-align:center; color:var(--accent); letter-spacing:0.3em; font-size:1.1rem; margin:2em 0; font-family:var(--font-body); }
.reader-content p.chapter-break::before, .entry-content p.chapter-break::before { content:'— '; }
.reader-content p.chapter-break::after,  .entry-content p.chapter-break::after  { content:' —'; }
.reader-content p.scene-separator, .entry-content p.scene-separator { text-align:center; color:var(--text3); letter-spacing:0.5em; font-size:1.2rem; margin:2em 0; }
.reader-content p.scene-separator::before, .entry-content p.scene-separator::before { content:'· · ·'; }
.reader-content p.italic-narration, .entry-content p.italic-narration { font-style:italic; color:#a09c94; }
.reader-content p.dialogue, .entry-content p.dialogue { border-left:2px solid rgba(201,168,76,0.3); padding-left:1rem; margin-left:0.5rem; }
.reader-content p.inner-thought, .entry-content p.inner-thought { font-style:italic; color:#b8a8d4; }
.reader-content div.flashback-block, .entry-content div.flashback-block { background:#1e1a0e; border:1px solid rgba(201,168,76,0.15); border-radius:8px; padding:1.25rem 1.5rem; margin:1.5em 0; color:#b0a890; font-style:italic; }
.reader-content blockquote, .entry-content blockquote { border-left:3px solid var(--accent); margin:1.5em 0; padding:0.75em 1.25em; background:var(--bg3); border-radius:0 8px 8px 0; font-style:italic; color:var(--text2); }
.reader-content hr, .entry-content hr { border:none; border-top:1px solid rgba(255,255,255,0.08); margin:2em auto; width:60%; }
.reader-content ::selection { background:rgba(201,168,76,0.25); color:#f0eee8; }

/* ══════════════════════════════════════════
   RESPONSIVE — TABLET ≤ 1024px
══════════════════════════════════════════ */
@media (max-width:1024px) {
  .main-nav ul { gap:1.1rem; }
  .search-box input { width:110px; }
  .two-col { grid-template-columns:1fr 270px; }
  .footer-grid { grid-template-columns:1fr 1fr; gap:1.5rem; }
  .footer-brand { grid-column:1/-1; }
  .chapters-grid[data-view="grid"] { grid-template-columns:repeat(3,1fr); }
}

/* ══════════════════════════════════════════
   RESPONSIVE — TABLET ≤ 860px
══════════════════════════════════════════ */
@media (max-width:860px) {
  :root { --side:1rem; }
  .main-nav,.search-box,.btn-login,.btn-primary { display:none; }
  .hamburger { display:flex; }
  .hero-books { display:none; }
  .hero { min-height:auto; padding:2.5rem var(--side) 2rem; }
  .featured-banner { flex-direction:column; align-items:flex-start; }
  .featured-book-thumb { width:90px; min-width:90px; height:135px; }
  .two-col { grid-template-columns:1fr; gap:0; padding-bottom:2rem; }
  .novel-row-grid { grid-template-columns:1fr; }
  .footer-grid { grid-template-columns:1fr 1fr; }
  .footer-brand { grid-column:1/-1; }
  .archive-wrap { grid-template-columns:1fr; }
  .archive-sidebar { display:none; }
  .novel-hero-inner { flex-direction:column; align-items:center; text-align:center; gap:1.5rem; }
  .chapters-grid[data-view="grid"] { grid-template-columns:repeat(3,1fr); }
}

/* ══════════════════════════════════════════
   RESPONSIVE — MOBILE ≤ 600px
   KEY FIXES:
   - Section title 100% width row 1
   - Sort bar wraps to row 2
   - Grid 2 columns
   - No horizontal scrollbar
══════════════════════════════════════════ */
@media (max-width:600px) {
  :root { --side:0.875rem; }
  .announce-bar { font-size:0.68rem; gap:0.5rem; }
  .logo { font-size:1.2rem; }

  /* Hero */
  .hero { padding:2rem var(--side) 1.75rem; }
  .hero h1 { font-size:clamp(1.75rem,8vw,2.4rem); letter-spacing:-0.5px; }
  .hero p { font-size:0.875rem; }
  .btn-hero { font-size:0.875rem; padding:0.6rem 1.25rem; }
  .btn-hero-ghost { font-size:0.875rem; padding:0.6rem 1rem; }
  .hero-stats { gap:1.5rem; margin-top:2rem; }
  .stat-num { font-size:1.35rem; }

  /* Section header: title fills row 1, sort wraps to row 2 */
  .section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.625rem;
  }
  .section-title { width:100%; font-size:1.15rem; }
  .sort-bar { width:100%; }

  /* Book grid: ALWAYS 2 columns on mobile, no overflow */
  .novels-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 0.625rem;
    overflow: hidden;
  }

  /* Featured banner */
  .featured-banner { padding:1.25rem; gap:1rem; }
  .featured-banner::before { display:none; }
  .featured-book-thumb { display:none; }
  .featured-label { position:static; margin-bottom:0.5rem; display:inline-block; }

  /* Row cards */
  .novel-row-card-inner { padding:0.75rem; gap:0.625rem; }
  .row-title { font-size:0.8rem; }

  /* Chapter grid */
  .chapters-grid[data-view="grid"] { grid-template-columns:repeat(2,1fr) !important; gap:0.5rem; }
  .chapter-card { padding:0.625rem 0.75rem; }
  .chapter-grid-title-row { flex-wrap:wrap; }

  /* Reader */
  .reader-bar { padding:0 0.875rem; }
  .reader-back-title { max-width:100px; }
  .reader-bar-center { display:none; }
  .reader-article { padding:2rem var(--side) 1.5rem; }
  .rcn-btn { padding:0.875rem 1rem; }
  .rcn-title { display:none; }

  /* Footer */
  .footer-grid { grid-template-columns:1fr; gap:1.25rem; }
  .footer-brand { grid-column:auto; }
  .footer-bottom { flex-direction:column; align-items:flex-start; gap:0.75rem; }

  /* Novel detail */
  .novel-hero-inner { padding:1.75rem var(--side) 1.5rem; }
  .novel-cover-wrap { width:130px; }
  .novel-cover-main { width:130px; }
  .novel-stats-row  { justify-content:center; }
  .novel-genre-tags { justify-content:center; }
  .novel-rating-row { justify-content:center; }
  .novel-hero-actions { justify-content:center; }

  /* Prevent any section from causing horizontal scroll */
  .section, .two-col, .novel-body, .reader-article { overflow-x:hidden; }
}

/* ══════════════════════════════════════════
   RESPONSIVE — SMALL ≤ 380px
══════════════════════════════════════════ */
@media (max-width:380px) {
  .hero h1 { font-size:1.6rem; }
  .hero-actions { flex-direction:column; align-items:stretch; }
  .btn-hero, .btn-hero-ghost { text-align:center; justify-content:center; width:100%; }
  .novels-grid { grid-template-columns:repeat(2,1fr) !important; gap:0.5rem; }
}

/* ══════════════════════════════════════════════════════════
   LIGHT MODE — COMPREHENSIVE OVERRIDES
   Covers: homepage sections, featured banner, book hero,
   chapter reader text, cards, sidebar, footer
══════════════════════════════════════════════════════════ */

[data-theme="light"], body.theme-light {

  /* ── Base backgrounds ── */
  background: var(--bg) !important;

  /* ── Announce bar — keep purple but adjust ── */
}

/* ── All section backgrounds ── */
[data-theme="light"] .section,
[data-theme="light"] #page-wrapper,
[data-theme="light"] main,
body.theme-light .section,
body.theme-light #page-wrapper,
body.theme-light main {
  background: var(--bg) !important;
}

/* ── HERO ── */
[data-theme="light"] .hero,
body.theme-light .hero {
  background: var(--bg) !important;
}
[data-theme="light"] .hero-bg,
body.theme-light .hero-bg {
  background:
    radial-gradient(ellipse 60% 60% at 80% 50%, rgba(155,114,207,0.08) 0%, transparent 70%),
    radial-gradient(ellipse 40% 80% at 20% 30%, rgba(201,168,76,0.06) 0%, transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg2) 100%) !important;
}
[data-theme="light"] .hero h1,
body.theme-light .hero h1 {
  color: #1a1a1a !important;
}
[data-theme="light"] .hero p,
body.theme-light .hero p {
  color: #4a4a4a !important;
}
[data-theme="light"] .btn-hero-ghost,
body.theme-light .btn-hero-ghost {
  color: #1a1a1a !important;
  border-color: rgba(0,0,0,0.2) !important;
}
[data-theme="light"] .btn-hero-ghost:hover,
body.theme-light .btn-hero-ghost:hover {
  background: rgba(0,0,0,0.05) !important;
}
[data-theme="light"] .stat-label,
body.theme-light .stat-label {
  color: #888 !important;
}

/* ── FEATURED BANNER — full light restyle ── */
[data-theme="light"] .featured-banner,
body.theme-light .featured-banner {
  background: linear-gradient(135deg, #f0eaf8 0%, #e8dcf5 40%, #f0eaf8 100%) !important;
  border-color: rgba(155,114,207,0.3) !important;
}
[data-theme="light"] .featured-banner::before,
body.theme-light .featured-banner::before {
  background: radial-gradient(circle, rgba(155,114,207,0.1) 0%, transparent 70%) !important;
}
[data-theme="light"] .featured-title,
body.theme-light .featured-title {
  color: #1a1a1a !important;
}
[data-theme="light"] .featured-author,
[data-theme="light"] .featured-desc,
body.theme-light .featured-author,
body.theme-light .featured-desc {
  color: #4a4a4a !important;
}

/* ── NOVEL CARDS ── */
[data-theme="light"] .novel-title,
body.theme-light .novel-title {
  color: #1a1a1a !important;
}
[data-theme="light"] .novel-author,
[data-theme="light"] .novel-meta,
body.theme-light .novel-author,
body.theme-light .novel-meta {
  color: #666 !important;
}
[data-theme="light"] .novel-thumb::after,
body.theme-light .novel-thumb::after {
  background: rgba(255,255,255,0.8) !important;
  color: var(--accent) !important;
}

/* ── RECENTLY UPDATED ROW CARDS ── */
[data-theme="light"] .novel-row-card,
body.theme-light .novel-row-card {
  background: #ffffff !important;
  border-color: rgba(0,0,0,0.08) !important;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06) !important;
}
[data-theme="light"] .novel-row-card:hover,
body.theme-light .novel-row-card:hover {
  border-color: rgba(201,168,76,0.4) !important;
  background: #fdf9f0 !important;
}
[data-theme="light"] .row-title,
body.theme-light .row-title {
  color: #1a1a1a !important;
}
[data-theme="light"] .row-excerpt,
body.theme-light .row-excerpt {
  color: #666 !important;
}
[data-theme="light"] .row-tag,
body.theme-light .row-tag {
  background: #f0eeea !important;
  color: #666 !important;
  border-color: rgba(0,0,0,0.08) !important;
}

/* ── SIDEBAR ── */
[data-theme="light"] .sidebar-widget,
body.theme-light .sidebar-widget {
  background: #ffffff !important;
  border-color: rgba(0,0,0,0.08) !important;
  box-shadow: 0 2px 12px rgba(0,0,0,0.05) !important;
}
[data-theme="light"] .widget-title,
body.theme-light .widget-title {
  color: #1a1a1a !important;
}
[data-theme="light"] .t-title,
body.theme-light .t-title {
  color: #1a1a1a !important;
}
[data-theme="light"] .t-meta,
body.theme-light .t-meta {
  color: #888 !important;
}
[data-theme="light"] a.genre-item,
[data-theme="light"] .genre-item,
body.theme-light a.genre-item,
body.theme-light .genre-item {
  background: #f5f3ef !important;
  border-color: rgba(0,0,0,0.1) !important;
  color: #4a4a4a !important;
}
[data-theme="light"] a.genre-item:hover,
[data-theme="light"] a.genre-item.active,
body.theme-light a.genre-item:hover,
body.theme-light a.genre-item.active {
  background: rgba(201,168,76,0.12) !important;
  border-color: rgba(201,168,76,0.4) !important;
  color: var(--accent) !important;
}
[data-theme="light"] .genre-count,
body.theme-light .genre-count {
  background: rgba(0,0,0,0.06) !important;
  color: #888 !important;
}
[data-theme="light"] .continue-item,
body.theme-light .continue-item {
  background: #f5f3ef !important;
}
[data-theme="light"] .continue-item:hover,
body.theme-light .continue-item:hover {
  background: #ede9e1 !important;
}
[data-theme="light"] .continue-title,
body.theme-light .continue-title {
  color: #1a1a1a !important;
}
[data-theme="light"] .progress-bar-wrap,
body.theme-light .progress-bar-wrap {
  background: rgba(0,0,0,0.1) !important;
}
[data-theme="light"] .no-history,
body.theme-light .no-history {
  color: #888 !important;
}

/* ── BOOK HERO PAGE (category.php) ── */
[data-theme="light"] .novel-hero,
body.theme-light .novel-hero {
  background: var(--bg) !important;
}
[data-theme="light"] .novel-hero-blur,
body.theme-light .novel-hero-blur {
  filter: blur(40px) brightness(0.6) saturate(0.8) !important;
  opacity: 0.4 !important;
}
[data-theme="light"] .novel-hero-overlay,
body.theme-light .novel-hero-overlay {
  background: linear-gradient(
    to bottom,
    rgba(248,247,244,0.3) 0%,
    rgba(248,247,244,0.97) 70%,
    rgba(248,247,244,1) 100%
  ) !important;
}
[data-theme="light"] .novel-hero-title,
body.theme-light .novel-hero-title {
  color: #1a1a1a !important;
  text-shadow: none !important;
}
[data-theme="light"] .novel-hero-author,
body.theme-light .novel-hero-author {
  color: #4a4a4a !important;
}
[data-theme="light"] .novel-breadcrumb,
[data-theme="light"] .novel-breadcrumb a,
body.theme-light .novel-breadcrumb,
body.theme-light .novel-breadcrumb a {
  color: #888 !important;
}
[data-theme="light"] .novel-breadcrumb a:hover,
body.theme-light .novel-breadcrumb a:hover {
  color: var(--accent) !important;
}
[data-theme="light"] .nstat-val,
body.theme-light .nstat-val {
  color: #1a1a1a !important;
}
[data-theme="light"] .nstat-label,
[data-theme="light"] .nstat-icon,
body.theme-light .nstat-label,
body.theme-light .nstat-icon {
  color: #888 !important;
}
[data-theme="light"] .novel-cover-main,
body.theme-light .novel-cover-main {
  box-shadow: 0 16px 48px rgba(0,0,0,0.25), 0 0 0 1px rgba(0,0,0,0.08) !important;
}

/* ── BOOK BODY (synopsis + chapter grid) ── */
[data-theme="light"] .novel-synopsis-box,
body.theme-light .novel-synopsis-box {
  background: #ffffff !important;
  border-color: rgba(0,0,0,0.08) !important;
}
[data-theme="light"] .synopsis-body,
body.theme-light .synopsis-body {
  color: #3a3a3a !important;
}
[data-theme="light"] .synopsis-heading,
body.theme-light .synopsis-heading {
  color: #1a1a1a !important;
}

/* ── CHAPTER GRID ── */
[data-theme="light"] .chapter-grid-header,
[data-theme="light"] .chapters-grid,
body.theme-light .chapter-grid-header,
body.theme-light .chapters-grid {
  background: #ffffff !important;
  border-color: rgba(0,0,0,0.08) !important;
}
[data-theme="light"] .chapter-card,
body.theme-light .chapter-card {
  background: #f5f3ef !important;
  border-color: rgba(0,0,0,0.08) !important;
}
[data-theme="light"] .chapter-card:hover,
body.theme-light .chapter-card:hover {
  background: #ede9e1 !important;
  border-color: rgba(201,168,76,0.4) !important;
}
[data-theme="light"] .chapter-card-title,
body.theme-light .chapter-card-title {
  color: #1a1a1a !important;
}
[data-theme="light"] .chapter-card-date,
body.theme-light .chapter-card-date {
  color: #888 !important;
}
[data-theme="light"] .view-toggle,
[data-theme="light"] .sort-toggle-btn,
[data-theme="light"] .chapter-search-box,
body.theme-light .view-toggle,
body.theme-light .sort-toggle-btn,
body.theme-light .chapter-search-box {
  background: #f0eeea !important;
  border-color: rgba(0,0,0,0.1) !important;
}
[data-theme="light"] .sort-toggle-btn,
body.theme-light .sort-toggle-btn {
  color: #4a4a4a !important;
}
[data-theme="light"] .chapter-search-box input,
body.theme-light .chapter-search-box input {
  color: #1a1a1a !important;
}
[data-theme="light"] .view-btn,
body.theme-light .view-btn {
  color: #888 !important;
}
[data-theme="light"] .view-btn.active,
body.theme-light .view-btn.active {
  background: #e0ddd6 !important;
  color: var(--accent) !important;
}

/* ── CHAPTER READER — Fix gray text ── */
[data-theme="light"] .reader-page,
body.theme-light .reader-page {
  background: #f8f7f4 !important;
}
[data-theme="light"] .reader-content,
body.theme-light .reader-content {
  /* Override the dark hardcoded color */
  color: #1a1a1a !important;
}
[data-theme="light"] .reader-content p,
body.theme-light .reader-content p {
  color: #1a1a1a !important;
}
[data-theme="light"] .reader-article,
body.theme-light .reader-article {
  background: #f8f7f4 !important;
}
[data-theme="light"] .reader-chapter-title,
body.theme-light .reader-chapter-title {
  color: #1a1a1a !important;
}
[data-theme="light"] .reader-chapter-label,
body.theme-light .reader-chapter-label {
  color: var(--accent) !important;
}
[data-theme="light"] .reader-divider,
body.theme-light .reader-divider {
  color: #aaa !important;
}
/* Reader bar in light mode */
[data-theme="light"] .reader-bar,
body.theme-light .reader-bar {
  background: rgba(248,247,244,0.97) !important;
  border-bottom-color: rgba(0,0,0,0.1) !important;
}
[data-theme="light"] .reader-bar-chnum,
body.theme-light .reader-bar-chnum {
  color: var(--accent) !important;
}
[data-theme="light"] .reader-bar-progress,
[data-theme="light"] .reader-bar-sep,
body.theme-light .reader-bar-progress,
body.theme-light .reader-bar-sep {
  color: #888 !important;
}
[data-theme="light"] .reader-back,
body.theme-light .reader-back {
  color: #4a4a4a !important;
}
[data-theme="light"] .reader-tool-btn,
body.theme-light .reader-tool-btn {
  background: #ede9e1 !important;
  border-color: rgba(0,0,0,0.1) !important;
  color: #4a4a4a !important;
}
[data-theme="light"] .reader-tool-btn:hover,
body.theme-light .reader-tool-btn:hover {
  color: var(--accent) !important;
  border-color: rgba(201,168,76,0.4) !important;
}
/* Reader chapter nav */
[data-theme="light"] .rcn-btn,
body.theme-light .rcn-btn {
  background: #ffffff !important;
  border-color: rgba(0,0,0,0.08) !important;
}
[data-theme="light"] .rcn-btn:hover,
body.theme-light .rcn-btn:hover {
  background: #fdf9f0 !important;
  border-color: rgba(201,168,76,0.4) !important;
}
[data-theme="light"] .rcn-title,
body.theme-light .rcn-title {
  color: #1a1a1a !important;
}
[data-theme="light"] .rcn-index-btn,
body.theme-light .rcn-index-btn {
  background: #ffffff !important;
  border-color: rgba(0,0,0,0.08) !important;
  color: #4a4a4a !important;
}
/* Reader settings panel */
[data-theme="light"] .reader-settings-panel,
body.theme-light .reader-settings-panel {
  background: #ffffff !important;
  border-color: rgba(0,0,0,0.1) !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12) !important;
}
[data-theme="light"] .rsp-label,
body.theme-light .rsp-label {
  color: #888 !important;
}
[data-theme="light"] .rsp-font-btn,
body.theme-light .rsp-font-btn {
  background: #f0eeea !important;
  border-color: rgba(0,0,0,0.1) !important;
  color: #4a4a4a !important;
}
[data-theme="light"] .rsp-font-val,
body.theme-light .rsp-font-val {
  color: #1a1a1a !important;
}
/* Reader content custom styles */
[data-theme="light"] .reader-content blockquote,
body.theme-light .reader-content blockquote {
  background: #fdf8f0 !important;
  color: #444 !important;
}
[data-theme="light"] .reader-content hr,
body.theme-light .reader-content hr {
  border-top-color: rgba(0,0,0,0.12) !important;
}
[data-theme="light"] .reader-content p.italic-narration,
body.theme-light .reader-content p.italic-narration {
  color: #555 !important;
}
[data-theme="light"] .reader-content p.inner-thought,
body.theme-light .reader-content p.inner-thought {
  color: #7a6fa8 !important;
}
[data-theme="light"] .reader-content div.flashback-block,
body.theme-light .reader-content div.flashback-block {
  background: #fdf6e3 !important;
  border-color: #e8d5a0 !important;
  color: #5a4a2a !important;
}
/* Progress strip */
[data-theme="light"] .reader-progress-strip,
body.theme-light .reader-progress-strip {
  background: rgba(0,0,0,0.08) !important;
}

/* ── FOOTER ── */
[data-theme="light"] #site-footer,
body.theme-light #site-footer {
  background: #f0eeea !important;
  border-top-color: rgba(0,0,0,0.1) !important;
}
[data-theme="light"] .footer-col h4,
body.theme-light .footer-col h4 {
  color: #1a1a1a !important;
}
[data-theme="light"] .footer-col a,
body.theme-light .footer-col a {
  color: #666 !important;
}
[data-theme="light"] .footer-col a:hover,
body.theme-light .footer-col a:hover {
  color: var(--accent) !important;
}
[data-theme="light"] .footer-brand p,
body.theme-light .footer-brand p {
  color: #666 !important;
}
[data-theme="light"] .footer-bottom,
body.theme-light .footer-bottom {
  border-top-color: rgba(0,0,0,0.1) !important;
}
[data-theme="light"] .footer-bottom p,
[data-theme="light"] .footer-bottom-links a,
body.theme-light .footer-bottom p,
body.theme-light .footer-bottom-links a {
  color: #888 !important;
}
[data-theme="light"] .social-btn,
body.theme-light .social-btn {
  background: #e8e5df !important;
  border-color: rgba(0,0,0,0.1) !important;
  color: #4a4a4a !important;
}

/* ── GENRE FILTER PILLS (homepage) ── */
[data-theme="light"] .genre-pill,
body.theme-light .genre-pill {
  background: #ffffff !important;
  border-color: rgba(0,0,0,0.12) !important;
  color: #4a4a4a !important;
}
[data-theme="light"] .genre-pill:hover,
[data-theme="light"] .genre-pill.active,
body.theme-light .genre-pill:hover,
body.theme-light .genre-pill.active {
  background: rgba(201,168,76,0.12) !important;
  border-color: rgba(201,168,76,0.4) !important;
  color: var(--accent) !important;
}

/* ── SORT BUTTONS ── */
[data-theme="light"] .sort-btn,
body.theme-light .sort-btn {
  background: #ffffff !important;
  border-color: rgba(0,0,0,0.12) !important;
  color: #4a4a4a !important;
}
[data-theme="light"] .sort-btn.active,
[data-theme="light"] .sort-btn:hover,
body.theme-light .sort-btn.active,
body.theme-light .sort-btn:hover {
  background: rgba(201,168,76,0.12) !important;
  border-color: rgba(201,168,76,0.4) !important;
  color: var(--accent) !important;
}

/* ── DIVIDER ── */
[data-theme="light"] .divider,
body.theme-light .divider {
  background: rgba(0,0,0,0.1) !important;
}

/* ── CHAPTER PAGINATION ── */
[data-theme="light"] .chapter-pagination ul li a,
[data-theme="light"] .chapter-pagination ul li span,
body.theme-light .chapter-pagination ul li a,
body.theme-light .chapter-pagination ul li span {
  background: #ffffff !important;
  border-color: rgba(0,0,0,0.1) !important;
  color: #4a4a4a !important;
}
[data-theme="light"] .chapter-pagination ul li .current,
[data-theme="light"] .chapter-pagination ul li a:hover,
body.theme-light .chapter-pagination ul li .current,
body.theme-light .chapter-pagination ul li a:hover {
  background: rgba(201,168,76,0.12) !important;
  border-color: rgba(201,168,76,0.4) !important;
  color: var(--accent) !important;
}

/* ── COMMENTS ── */
[data-theme="light"] .comment-list .comment,
body.theme-light .comment-list .comment {
  background: #ffffff !important;
  border-color: rgba(0,0,0,0.08) !important;
}
[data-theme="light"] .comment-author .fn,
body.theme-light .comment-author .fn {
  color: #1a1a1a !important;
}
[data-theme="light"] .comment-content p,
body.theme-light .comment-content p {
  color: #3a3a3a !important;
}
[data-theme="light"] #respond,
body.theme-light #respond {
  background: #ffffff !important;
  border-color: rgba(0,0,0,0.08) !important;
}
[data-theme="light"] #respond h3,
body.theme-light #respond h3 {
  color: #1a1a1a !important;
}
[data-theme="light"] #respond input,
[data-theme="light"] #respond textarea,
body.theme-light #respond input,
body.theme-light #respond textarea {
  background: #f5f3ef !important;
  border-color: rgba(0,0,0,0.1) !important;
  color: #1a1a1a !important;
}
