/* ============================================================
   NovelKu
   Palet & aturan dari brief:
     bg #0F1012 · surface #181A1E · border #292C32
     teks utama #F0F0F2 · teks sekunder #9296A0 · aksen #C5A574
     font Inter · radius 10-14px · spasi 8px
   Aksen HANYA untuk: label "BARU", state aktif, tombol utama.
   Border tipis tetap ada sebagai pemisah, tapi tidak berulang.
   ============================================================ */

:root {
  --bg:       #000000;
  --surface:  #111111;
  --surface2: #171717;
  --border:   #262626;
  --line:     #1c1c1c;
  --fg:       #f2f2f2;
  --fg2:      #92929a;
  --fg3:      #707078;
  --accent:   #e6a23b;
  --radius:   16px;
  --wrap:     1120px;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
}

html[data-theme="light"] {
  --bg:       #fafaf9;
  --surface:  #ffffff;
  --surface2: #f4f4f2;
  --border:   #e3e3df;
  --line:     #ecece8;
  --fg:       #14151a;
  --fg2:      #5c6068;
  --fg3:      #8c9099;
  --accent:   #8f6f33;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3 { line-height: 1.25; margin: 0; }
button { font-family: inherit; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
main.wrap { padding-top: 24px; }
.muted { color: var(--fg3); }
.small { font-size: 12.5px; }
.inline { display: inline; }
.off { opacity: .3; pointer-events: none; }
.only-mobile { display: none; }

/* ============ header: 60px, logo kiri / aksi kanan ============ */
.hdr {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(14px) saturate(150%);
  border-bottom: 1px solid var(--line);
  transition: transform .28s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: transform;
}

.hdr.hdr-hidden {
  transform: translateY(-100%);
}
.hdr-in {
  max-width: var(--wrap); margin: 0 auto;
  padding: 0 20px; height: 60px;
  display: flex; align-items: center; gap: 22px;
}
.logo {
  font-size: 19px;
  font-weight: 800;
  letter-spacing: -.03em;
  white-space: nowrap;
  color: var(--fg);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
}
.logo-accent {
  color: var(--accent);
  margin-right: 0.5px;
}
.hdr-nav { display: flex; gap: 6px; }
.hdr-nav a {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 34px; padding: 0 14px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--fg2); font-size: 13px; font-weight: 500;
  text-decoration: none; transition: all .15s ease;
}
.hdr-nav a svg { width: 16px; height: 16px; flex: none; color: var(--fg3); transition: color .15s ease; }
.hdr-nav a:hover { background: var(--surface2); border-color: var(--fg3); color: var(--fg); }
.hdr-nav a:hover svg { color: var(--fg); }
.hdr-nav a.on {
  background: rgba(230, 162, 59, 0.12);
  border-color: var(--accent);
  color: var(--accent);
  font-weight: 600;
}
.hdr-nav a.on svg { color: var(--accent); }

.hdr-search {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 9px; padding: 7px 12px; width: 240px;
  transition: border-color .15s, background .15s;
  cursor: pointer; user-select: none;
}
.hdr-search:hover { border-color: var(--fg3); background: var(--surface2); }
.hdr-search svg { color: var(--fg3); flex: none; width: 16px; height: 16px; }
.hdr-search-ph {
  color: var(--fg3); font-size: 13px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* .hdr-right yang mendorong dirinya ke kanan.
   Di mobile search disembunyikan, jadi auto-margin HARUS di sini,
   bukan di .hdr-search (kalau di sana, menu akun nyangkut di tengah). */
.hdr-lib-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 34px; height: 34px; border-radius: 50%;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--fg2); text-decoration: none; transition: all .15s ease;
}
.hdr-lib-btn:hover {
  background: var(--surface2); color: var(--accent); border-color: var(--accent);
}

.hdr-right {
  margin-left: auto;
  display: flex; align-items: center; gap: 12px;
  min-width: 0;
}

/* Desktop: search yang mengambil ruang sisa, grup akun menempel kanan. */
@media (min-width: 721px) {
  .hdr-search { margin-left: auto; }
  .hdr-right { margin-left: 0; }
}

.quiet, .link {
  background: none; border: 0; padding: 0; cursor: pointer;
  color: var(--fg3); font: inherit; font-size: 13.5px;
}
.quiet:hover, .link:hover { color: var(--fg); }
.link.danger { color: #d98d90; }

.icon-btn, .icon {
  background: none; border: 0; padding: 5px; cursor: pointer;
  color: var(--fg2); display: flex; border-radius: 7px;
}
.icon-btn:hover, .icon:hover { color: var(--fg); background: var(--surface); }

.btn-solid, .btn, .solid {
  display: inline-block; background: var(--accent); color: #17181a;
  border: 1px solid var(--accent); border-radius: 9px;
  padding: 8px 15px; font-size: 13.5px; font-weight: 600;
  cursor: pointer; text-align: center; transition: opacity .15s;
}
.btn-solid:hover, .btn:hover, .solid:hover { opacity: .88; }
.btn-solid.sm, .solid.sm { padding: 7px 13px; font-size: 13px; }

.btn-ghost {
  display: inline-block; background: none; color: var(--fg);
  border: 1px solid var(--border); border-radius: 9px;
  padding: 8px 15px; font-size: 13.5px; font-weight: 500; cursor: pointer;
}
.btn-ghost:hover { border-color: var(--fg3); }

.btn-danger {
  background: none; border: 1px solid #5c3336; border-radius: 9px;
  color: #d98d90; padding: 8px 15px; font-size: 13.5px; cursor: pointer;
}
.btn-danger:hover { background: rgba(217,141,144,.08); }

/* menu akun */
.acct { position: relative; }
.acct > summary { list-style: none; cursor: pointer; display: flex; align-items: center; }
.acct > summary::-webkit-details-marker { display: none; }
.av {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--surface2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 12.5px; font-weight: 600; color: var(--fg2);
  overflow: hidden; flex-shrink: 0;
}
.av img {
  width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block;
}
.acct-menu {
  position: absolute; right: 0; top: calc(100% + 10px);
  min-width: 190px; max-width: calc(100vw - 32px);
  background: var(--surface);
  border: 1px solid var(--border); border-radius: 11px;
  padding: 6px; box-shadow: 0 12px 30px rgba(0,0,0,.35);
  display: flex; flex-direction: column;
}
.acct-head {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px 10px; margin-bottom: 4px;
  border-bottom: 1px solid var(--line);
}
.acct-name { font-size: 13.5px; font-weight: 600; }
.acct-menu a, .acct-menu button {
  display: block; width: 100%; text-align: left;
  background: none; border: 0; cursor: pointer;
  color: var(--fg2); font: inherit; font-size: 13.5px;
  padding: 9px 10px; border-radius: 7px;
}
.acct-menu a:hover, .acct-menu button:hover { background: var(--surface2); color: var(--fg); }
.acct-menu form { margin: 0; }

/* ============ flash ============ */
.flash {
  margin: 16px 0 0; padding: 10px 14px; font-size: 13.5px;
  border: 1px solid var(--border); border-radius: 10px; background: var(--surface);
}
.flash.ok { border-color: #2f4a38; color: #9ed4b3; }
.flash.bad { border-color: #5c3336; color: #e0a1a4; }

/* ============ intro & chips genre ============ */
.intro { padding: 40px 0 22px; }
.intro h1 { font-size: 30px; font-weight: 700; letter-spacing: -.025em; }
.intro p { margin: 8px 0 0; font-size: 14.5px; }

.chips {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-bottom: 34px;
}
.chip {
  flex: none; font-size: 13px; color: var(--fg2);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 6px 12px; white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.chip:hover { color: var(--fg); border-color: var(--fg3); }
.chip.on {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
}

/* ============ blok ============ */
.block { margin-bottom: 46px; scroll-margin-top: 115px; }
.block-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 16px;
}
.block-head h2 { font-size: 15.5px; font-weight: 600; letter-spacing: -.005em; }

/* ============ kartu novel — satu-satunya gaya katalog ============ */
.grid {
  display: grid; gap: 26px 18px;
  grid-template-columns: repeat(auto-fill, minmax(146px, 1fr));
}
.card { display: block; }
.card .cover {
  position: relative; aspect-ratio: 2 / 3;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.card .cover img { width: 100%; height: 100%; object-fit: cover; transition: opacity .18s; }
.card:hover .cover img { opacity: .84; }
.cover-ph {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%;
  font-family: var(--serif); font-size: 38px; font-weight: 600;
  color: var(--fg2); opacity: .55;
  background-color: var(--surface2);
  background-image:
    repeating-linear-gradient(-45deg,
      transparent 0 13px,
      color-mix(in srgb, var(--border) 55%, transparent) 13px 14px),
    linear-gradient(150deg,
      color-mix(in srgb, var(--surface2) 100%, transparent) 0%,
      color-mix(in srgb, var(--surface2) 55%, var(--border)) 100%);
}
.card h3 {
  margin: 10px 0 3px; font-size: 13.5px; font-weight: 600; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.card .meta {
  margin: 0; font-size: 12px; color: var(--fg3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.st {
  position: absolute; left: 8px; top: 8px;
  font-size: 9.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 3px 7px; border-radius: 5px;
  background: rgba(12,13,15,.74); color: #d3d6db;
}
html[data-theme="light"] .st { background: rgba(255,255,255,.88); color: #3c3f45; }
/* status sebagai teks (halaman novel & admin) */
.st-text {
  font-size: 11px; font-weight: 600; letter-spacing: .05em;
  text-transform: uppercase; color: var(--fg2);
}

/* ============ update terbaru (feed aktivitas & card expandable) ============ */
.feed-head-sub {
  display: flex; align-items: center; gap: 6px;
  margin-top: 4px; font-size: 12.5px; color: var(--fg3);
}
.feed-head-sub svg { width: 14px; height: 14px; flex: none; color: var(--accent); }

/* ============================================================
   UPDATE TERBARU: FEED TABBED (konsep 3)
   ============================================================ */
.up-feed {
  display: flex; flex-direction: column;
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; background: var(--surface);
}
.up-row {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 14px 16px; border-bottom: 1px solid var(--line);
  transition: background .13s ease;
}
.up-row:last-child { border-bottom: none; }
.up-row:hover { background: var(--surface2); }

/* COVER BESAR sesuai request */
.up-cover {
  flex: none; width: 72px; aspect-ratio: 2 / 3;
  border-radius: 8px; overflow: hidden; background: var(--surface2);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
}
.up-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.up-cover .cover-ph { font-size: 24px; font-weight: 700; color: var(--fg2); }

.up-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 6px; }

.up-head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
}
.up-title {
  font-size: 15.5px; font-weight: 700; color: var(--fg);
  text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color .15s ease;
}
.up-title:hover { color: var(--accent); }
.up-time {
  flex: none; font-size: 11.5px; color: var(--fg3); font-weight: 500;
}

.up-author-row {
  font-size: 12px;
  color: var(--fg3);
  margin-top: -2px;
}

/* CARD METRICS (Views + Rating Bintang) */
.card-metrics {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 1px 0 2px;
  font-size: 12px;
  color: var(--fg3);
}
.metric-item {
  display: inline-flex;
  align-items: center;
  gap: 4.5px;
}
.metric-item svg {
  color: var(--fg3);
  flex: none;
}
.metric-item.rating {
  color: var(--accent);
  font-weight: 600;
}
.metric-item.rating svg {
  color: var(--accent);
}

/* Chapter terbaru = pill outline */
.up-ch-pill {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface2);
  text-decoration: none;
  transition: border-color .15s ease, background .15s ease;
}
.up-ch-pill:hover { border-color: var(--accent); background: var(--surface); }
.up-ch-label {
  font-size: 13px; font-weight: 600; color: var(--fg);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.up-ch-pill:hover .up-ch-label { color: var(--accent); }
.up-badge-new {
  flex: none; font-size: 10px; font-weight: 700;
  color: var(--accent); letter-spacing: .04em;
}
.up-ch-chev {
  margin-left: auto; flex: none; width: 14px; height: 14px; color: var(--fg3);
  transition: transform .15s ease;
}
.up-ch-pill:hover .up-ch-chev { color: var(--accent); transform: translateX(2px); }

/* Chapter lama = baris teks polos + waktu kanan */
.up-old-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}
.up-ch-old {
  font-size: 12.5px; font-weight: 500; color: var(--fg2);
  text-decoration: none; transition: color .15s ease;
}
.up-ch-old:hover { color: var(--fg); text-decoration: underline; }
.up-old-time { font-size: 11px; color: var(--fg3); }

/* PAGINATION UPDATE TERBARU */
.up-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding: 6px 0;
  gap: 12px;
}
.up-pager-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--fg2);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: all .15s ease;
}
.up-pager-btn:hover {
  border-color: var(--fg3);
  color: var(--fg);
  background: var(--surface2);
}
.up-pager-btn.off {
  opacity: .35;
  pointer-events: none;
}
.up-pager-info {
  font-size: 12.5px;
  color: var(--fg3);
  font-weight: 500;
}

/* ============ baru diperbarui (fallback/legacy) ============ */
.updates {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px; background: var(--line);
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
/* align-items: flex-start -> cover TIDAK ikut melar setinggi teks
   (kalau stretch, aspect-ratio 2/3 diabaikan dan cover jadi gepeng). */
.update {
  display: flex; gap: 15px; align-items: flex-start;
  background: var(--surface); padding: 15px 14px;
}
.update-cover {
  flex: none; width: 66px; aspect-ratio: 2 / 3;
  border-radius: 7px; overflow: hidden; background: var(--surface2);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
}
.update-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.update-cover .cover-ph { font-size: 22px; }
.update-body { min-width: 0; flex: 1; }
.update-title {
  display: block; font-size: 14px; font-weight: 600; margin-bottom: 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.update-title:hover { color: var(--accent); }
.update-body .feed-tags { margin-bottom: 7px; }
.chapter-mini { list-style: none; margin: 0; padding: 0; }
.chapter-mini li { margin: 4px 0; }
.chapter-mini a {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--fg3);
}
.chapter-mini a:hover { color: var(--fg); }
.chapter-mini .new {
  font-size: 9px; font-weight: 700; letter-spacing: .07em;
  text-transform: uppercase; color: var(--accent);
}

/* ============ tag (di halaman novel) ============ */
.tagbar { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 18px; }
.tags { display: flex; flex-wrap: wrap; gap: 7px; margin: 0 0 18px; }
.tag {
  font-size: 12px; color: var(--fg2);
  border: 1px solid var(--border); border-radius: 7px; padding: 4px 10px;
  transition: border-color .15s, color .15s;
}
.tag:hover { color: var(--fg); border-color: var(--fg3); }
.tag .cnt { color: var(--fg3); margin-left: 5px; font-size: 11px; }

/* ============ TOMBOL BACK (OPSI B) ============ */
.page-top-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0 10px;
}

.btn-back {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  min-width: 38px;
  min-height: 38px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--fg);
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, border-color .15s, color .15s;
  padding: 0;
  flex: none;
}

.btn-back:hover {
  background: var(--border);
  color: var(--fg);
  border-color: var(--fg3);
}

.btn-back svg {
  width: 19px;
  height: 19px;
}

.reader-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.reader-title-truncate {
  font-size: 14px;
  font-weight: 500;
  color: var(--fg2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
}

@media (max-width: 480px) {
  .reader-title-truncate {
    max-width: 140px;
  }
}

/* ============ SPLIT PANEL DETAIL NOVEL (OPSI 5) ============ */
.novel-panel {
  position: relative;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 16px 0 32px;
}

.panel-top-bar {
  display: flex;
  align-items: center;
  margin-bottom: -4px;
}

/* Header / Cover Split */
.panel-split {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 16px;
  align-items: center;
}

.panel-cover {
  width: 110px;
  aspect-ratio: 2 / 3;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface2);
  border: 1px solid var(--border);
  flex: none;
}

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

.panel-cover .cover-ph {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 38px;
  font-weight: 700;
  color: var(--fg3);
}

.panel-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.panel-title {
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--fg);
  line-height: 1.25;
  margin: 0;
  word-break: break-word;
}

.panel-author {
  font-size: 0.875rem;
  color: var(--fg2);
  margin: 0;
}

.panel-badge {
  align-self: flex-start;
  margin-top: 2px;
}

.panel-badge .st-pill {
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.72rem;
  font-weight: 600;
  display: inline-block;
}

.panel-tags {
  font-size: 0.8rem;
  color: var(--fg2);
  margin: 2px 0 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  line-height: 1.4;
}

.panel-tag-link {
  color: var(--fg2);
  text-decoration: none;
  transition: color .15s;
}

.panel-tag-link:hover {
  color: var(--accent);
}

.panel-tag-dot {
  color: var(--fg3);
  font-size: 0.75rem;
  user-select: none;
}

/* 3-Column Stats Grid */
.panel-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.panel-stat-card {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 6px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.panel-stat-card svg {
  width: 18px;
  height: 18px;
  stroke: var(--accent);
  color: var(--accent);
  fill: none;
  stroke-width: 2;
  flex: none;
}

.panel-stat-val {
  font-size: 1rem;
  font-weight: 700;
  color: var(--fg);
  margin: 0;
  line-height: 1.2;
}

.panel-stat-lbl {
  font-size: 0.72rem;
  color: var(--fg2);
  margin: 0;
  line-height: 1.2;
}

/* Actions Row */
.panel-actions {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.panel-btn-read {
  flex: 1;
  background: var(--accent);
  color: #000000 !important;
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  border-radius: 12px;
  padding: 13px 16px;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity .15s;
}

.panel-btn-read:hover {
  opacity: 0.88;
}

.panel-btn-read.disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.panel-bookmark-form {
  margin: 0;
  display: flex;
}

.panel-btn-icon {
  width: 48px;
  height: 48px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--fg);
  padding: 0;
  flex: none;
  transition: background .15s, border-color .15s, color .15s;
}

.panel-btn-icon:hover {
  border-color: var(--fg3);
}

.panel-btn-icon.active {
  color: var(--accent);
  border-color: var(--accent);
}

.panel-btn-icon svg {
  width: 20px;
  height: 20px;
}

/* Synopsis Card */
.panel-synopsis {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.panel-synopsis-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--fg);
  margin: 0;
}

.panel-synopsis-text {
  font-size: 0.84rem;
  color: var(--fg2);
  line-height: 1.5;
  margin: 0;
  white-space: pre-wrap;
}

/* Desktop tweaks */
@media (min-width: 680px) {
  .novel-panel {
    padding: 24px;
    gap: 20px;
  }
  .panel-split {
    grid-template-columns: 135px 1fr;
    gap: 22px;
  }
  .panel-cover {
    width: 135px;
  }
  .panel-title {
    font-size: 1.45rem;
  }
  .panel-stat-card {
    padding: 14px 10px;
  }
  .panel-stat-val {
    font-size: 1.15rem;
  }
  .panel-btn-read {
    font-size: 1rem;
  }
  .panel-synopsis {
    padding: 18px;
  }
  .panel-synopsis-text {
    font-size: 0.9rem;
  }
}

.meta-line { margin: 0 0 18px; color: var(--fg2); font-size: 13.5px; }
.actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.actions form { display: inline; }
.synopsis {
  color: var(--fg2); font-size: 14.5px; line-height: 1.75;
  max-width: 64ch; white-space: pre-wrap;
}

/* ============ TOOLBAR FILTER & SORT CHAPTER (ala wetriedtls) ============ */
.ch-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 16px;
}

.ch-filter-wrap {
  flex: 1;
  position: relative;
  display: flex;
  align-items: center;
  min-width: 0;
}

.ch-filter-icon {
  position: absolute;
  left: 12px;
  color: var(--fg3);
  pointer-events: none;
}

.ch-filter-input {
  width: 100%;
  height: 40px;
  padding: 0 32px 0 36px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--fg);
  font-family: inherit;
  font-size: 13px;
  outline: none;
  transition: border-color .15s, background .15s;
}

.ch-filter-input:focus {
  border-color: var(--accent);
  background: var(--surface);
}

.ch-filter-input::placeholder {
  color: var(--fg3);
  font-size: 12.5px;
}

.ch-filter-clear {
  position: absolute;
  right: 8px;
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--fg2);
  border-radius: 50%;
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}

.ch-sort-group {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
}

.ch-sort-btn {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--fg3);
  text-decoration: none;
  cursor: pointer;
  transition: all .15s ease;
}

.ch-sort-btn:hover {
  color: var(--fg);
  border-color: var(--fg3);
}

.ch-sort-btn.active {
  background: #2e323b;
  border-color: #424754;
  color: #ffffff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* daftar chapter: nomor besar, judul + subtitle, chevron */
.chapter-list { list-style: none; margin: 0; padding: 0; }
.chapter-list li { border-bottom: 1px solid var(--line); }
.chapter-list li:last-child { border-bottom: 0; }

/* pagination daftar chapter */
.ch-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.pg-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface2);
  color: var(--fg);
  text-decoration: none;
  cursor: pointer;
  transition: background .15s, border-color .15s;
}

.pg-nav:hover {
  background: var(--border);
  border-color: var(--fg3);
}

.pg-nav.disabled {
  opacity: 0.35;
  cursor: not-allowed;
  pointer-events: none;
}

.pg-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--fg2);
  text-decoration: none;
  font-variant-numeric: tabular-nums;
  transition: background .15s, color .15s, border-color .15s;
  border: 1px solid transparent;
}

a.pg-num:hover {
  background: var(--surface2);
  color: var(--fg);
}

.pg-num.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(230, 162, 59, 0.08);
}

.pg-dots {
  color: var(--fg3);
  padding: 0 2px;
  user-select: none;
}
.chapter-list a {
  display: flex; align-items: center; gap: 16px;
  padding: 13px 6px;
  transition: background .13s;
}
.chapter-list a:hover { background: var(--surface); }
.ch-num {
  flex: none; width: 30px; text-align: right;
  font-size: 14px; font-weight: 700; color: var(--fg3);
  font-variant-numeric: tabular-nums;
}
.ch-text { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.ch-title {
  font-size: 14px; font-weight: 600; color: var(--fg);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ch-sub { font-size: 11.5px; color: var(--fg3); }
.ch-go { flex: none; color: var(--fg3); }
.chapter-list a:hover .ch-go { color: var(--accent); }

/* ============ komentar ============ */
.comments { margin: 34px 0; }
.comment-form { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; margin-bottom: 22px; }
.comment-form-user { display: flex; align-items: center; gap: 10px; margin-bottom: 2px; }
.cform-name { font-size: 13px; font-weight: 600; color: var(--fg2); }
.comment-form textarea,
.admin-form textarea, .admin-form input, .admin-form select,
.auth-box input {
  width: 100%; background: var(--surface); color: var(--fg);
  border: 1px solid var(--border); border-radius: 9px;
  padding: 11px 13px; font: inherit; font-size: 14px; outline: none;
}
.comment-form textarea { resize: vertical; }
.comment-form textarea:focus,
.admin-form textarea:focus, .admin-form input:focus, .admin-form select:focus,
.auth-box input:focus { border-color: var(--fg3); }

/* avatar komentar */
.cavatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--surface2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 13.5px; font-weight: 700; color: var(--accent);
  overflow: hidden; flex-shrink: 0;
}
.cavatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cavatar-lg { width: 40px; height: 40px; font-size: 15px; }
.cavatar-sm { width: 30px; height: 30px; font-size: 12px; }

.comments-list { display: flex; flex-direction: column; gap: 18px; }
.comment-card { border-bottom: 1px solid var(--line); padding-bottom: 16px; }
.comment-card:last-child { border-bottom: none; }
.comment-main { display: flex; gap: 12px; align-items: flex-start; }
.comment-body { flex: 1; min-width: 0; }

.comment-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 4px; }
.comment-user-meta { display: flex; flex-direction: column; gap: 1px; }
.comment-user-meta .cuser { font-size: 14.5px; font-weight: 700; color: var(--fg); line-height: 1.25; }
.comment-user-meta .ctime { font-size: 11.5px; color: var(--fg3); }

/* menu tiga titik ••• */
details.comment-opts { position: relative; }
details.comment-opts summary {
  list-style: none; cursor: pointer; color: var(--fg3);
  font-size: 14px; padding: 2px 6px; border-radius: 5px;
  user-select: none; line-height: 1;
}
details.comment-opts summary::-webkit-details-marker { display: none; }
details.comment-opts summary:hover { color: var(--fg); background: var(--surface2); }
details.comment-opts .comment-opts-menu {
  position: absolute; right: 0; top: calc(100% + 4px);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 4px; box-shadow: 0 8px 24px rgba(0,0,0,.5);
  display: flex; flex-direction: column; z-index: 20; min-width: 130px;
}
details.comment-opts .comment-opts-menu button {
  background: none; border: none; padding: 7px 10px; font: inherit;
  font-size: 12px; text-align: left; cursor: pointer; border-radius: 6px;
  color: var(--fg2); width: 100%; display: block;
}
details.comment-opts .comment-opts-menu button:hover { background: var(--surface2); color: var(--fg); }
details.comment-opts .comment-opts-menu .btn-del-comment { color: #ef4444; }
details.comment-opts .comment-opts-menu .btn-del-comment:hover { color: #f87171; background: rgba(239,68,68,.12); }

.ccontent {
  margin: 6px 0 10px 0; font-size: 14px; line-height: 1.55;
  color: var(--fg); white-space: pre-wrap; overflow-wrap: break-word;
}

/* aksi komentar: Suka & Balas */
.comment-actions {
  display: flex; align-items: center; gap: 14px; font-size: 12px;
}
.btn-like {
  display: inline-flex; align-items: center; gap: 5px;
  background: none; border: none; padding: 0; font: inherit;
  font-size: 12px; color: var(--fg3); cursor: pointer; transition: color .15s;
}
.btn-like:hover, .btn-like.liked { color: var(--accent); }
.btn-like.liked svg { fill: var(--accent); }

.btn-reply {
  background: none; border: none; padding: 0; font: inherit;
  font-size: 12px; font-weight: 500; color: var(--fg3);
  cursor: pointer; transition: color .15s;
}
.btn-reply:hover { color: var(--accent); text-decoration: underline; }

/* replies bersarang */
.comment-replies {
  margin-top: 14px; margin-left: 20px;
  padding-left: 14px;
  border-left: 2px solid var(--border);
  display: flex; flex-direction: column; gap: 14px;
}
.reply-item { padding: 4px 0; }
.reply-mention {
  font-size: 12px; color: var(--fg3); margin: 1px 0 4px;
}
.reply-mention-name {
  color: var(--accent); font-weight: 600;
}

/* reply box */
.reply-box {
  background: var(--surface); border: 1px solid var(--accent);
  border-radius: 12px; padding: 14px; margin: 10px 0 14px;
}
.reply-box-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 10px; font-size: 13px; color: var(--fg2);
}
.reply-box-head button {
  background: none; border: none; color: var(--fg3);
  font-size: 15px; cursor: pointer; padding: 2px 6px;
}
.reply-box .comment-form { margin-bottom: 0; }

/* ============ reader ============ */
.reader-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 0;
  margin-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.btn-bubble-progress {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--fg2);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
  flex: none;
}

.btn-bubble-progress:hover,
.btn-bubble-progress:active {
  background: var(--surface);
  border-color: var(--accent);
  color: var(--accent);
}

.btn-bubble-progress svg {
  color: var(--fg3);
  transition: transform .15s ease, color .15s ease;
}

.btn-bubble-progress:hover svg {
  color: var(--accent);
  transform: translateY(1px);
}

.btn-icon-reader {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--fg2);
  border-radius: 50%;
  cursor: pointer;
  transition: all .15s;
}

.btn-icon-reader:hover {
  color: var(--fg);
  border-color: var(--accent);
}

.reader {
  --reader-size: 19px;
  --reader-line-height: 1.85;
  --reader-font-family: var(--serif);
  max-width: 640px; margin: 0 auto 44px;
  font-family: var(--reader-font-family);
  font-size: var(--reader-size);
  line-height: var(--reader-line-height);
}

.reader-head {
  margin-bottom: 28px;
  font-family: var(--reader-font-family, var(--serif));
}

.reader-ch-tag {
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: .04em;
  margin: 0 0 4px;
  text-transform: uppercase;
  font-family: var(--sans);
}

.reader-head h1 {
  font-family: inherit;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -.012em;
  margin: 0;
  line-height: 1.32;
  color: var(--fg);
}
.reader .content .ch-title,
.reader .content > h2:first-child,
.reader .content > h1:first-child {
  display: none !important;
}

.reader .content {
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

.reader .content::selection,
.reader .content *::selection {
  background: transparent;
}
.reader .content p { margin: 0 0 1.15em; }

/* Kunci: cegah copy/paste & save isi cerita via konteks menu */
.reader .content {
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}
.reader .content::selection { background: transparent; }
.reader .content *::selection { background: transparent; }

.reader .content img { max-width: 100%; height: auto; margin: 1.4em 0; border-radius: 8px; -webkit-user-drag: none; user-drag: none; pointer-events: none; }
.reader .content h2, .reader .content h3 {
  font-family: var(--sans);
  font-size: calc(var(--reader-size) * .95);
  margin: 1.8em 0 .7em;
}
.reader .content blockquote {
  margin: 1.4em 0; padding-left: 18px;
  border-left: 2px solid var(--border); color: var(--fg2); font-style: italic;
}
.reader-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 640px;
  margin: 0 auto;
  padding: 24px 0 36px;
  border-top: 1px solid var(--line);
}

.btn-nav-prev,
.btn-nav-next {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  border-radius: 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--fg);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: all .15s ease;
}

.btn-nav-prev:hover {
  background: var(--border);
  color: var(--fg);
}

.btn-nav-next {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
  font-weight: 700;
  box-shadow: 0 3px 12px rgba(230, 162, 59, 0.25);
}

.btn-nav-next:hover {
  filter: brightness(1.08);
}

.btn-nav-prev.disabled,
.btn-nav-next.disabled {
  opacity: 0.35;
  pointer-events: none;
  cursor: not-allowed;
}

.btn-nav-toc {
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--fg2);
  border-radius: 50%;
  cursor: pointer;
  transition: all .15s ease;
  flex: none;
}

.btn-nav-toc:hover {
  background: var(--surface);
  color: var(--accent);
  border-color: var(--accent);
  transform: scale(1.06);
}

.btn-nav-toc:active {
  transform: scale(0.96);
}

/* ============ READER SETTINGS MODAL / DRAWER ============ */
.reader-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 999;
  opacity: 0;
  visibility: hidden;
  transition: opacity .2s ease, visibility .2s ease;
}

.reader-modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.reader-sheet {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 500px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 20px 20px 0 0;
  padding: 20px 20px 32px;
  z-index: 1000;
  transform: translateY(100%);
  transition: transform .25s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 -10px 40px rgba(0,0,0,0.5);
}

.reader-sheet.open {
  transform: translateY(0);
}

.reader-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.reader-sheet-head h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 0;
  color: var(--fg);
}

.reader-sheet-close {
  background: var(--surface2);
  border: none;
  color: var(--fg2);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.reader-opt-group {
  margin-bottom: 18px;
}

.reader-opt-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--fg3);
  margin-bottom: 8px;
}

.reader-btn-row {
  display: flex;
  gap: 8px;
  background: var(--surface2);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.reader-btn-row button {
  flex: 1;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  background: transparent;
  border: none;
  color: var(--fg2);
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s, color .15s;
}

.reader-btn-row button.active {
  background: var(--surface);
  color: var(--fg);
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
}

.reader-size-ctrl {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface2);
  padding: 6px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.reader-size-ctrl button {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--fg);
  border-radius: 10px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 700;
}

.reader-size-val {
  flex: 1;
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
}

/* ============ CHAPTER LIST SIDE DRAWER (ala wetriedtls) ============ */
.ch-drawer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(4px);
  z-index: 1050;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}

.ch-drawer-overlay.open {
  opacity: 1;
  visibility: visible;
}

.ch-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 86%;
  max-width: 360px;
  background: var(--surface);
  border-left: 1px solid var(--border);
  z-index: 1060;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .28s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: -10px 0 35px rgba(0, 0, 0, 0.6);
}

.ch-drawer.open {
  transform: translateX(0);
}

.ch-drawer-head {
  padding: 14px 14px 12px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-drawer-back {
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--fg2);
  border-radius: 50%;
  cursor: pointer;
  flex: none;
  transition: all .15s ease;
}

.btn-drawer-back:hover,
.btn-drawer-back:active {
  color: var(--fg);
  border-color: var(--accent);
}

.ch-drawer-head-info {
  flex: 1;
  min-width: 0;
}

.ch-drawer-head h3 {
  font-size: 15px;
  font-weight: 700;
  margin: 0 0 2px;
  color: var(--fg);
}

.ch-drawer-head .muted {
  font-size: 11px;
}

.ch-drawer-close {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--fg2);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: none;
}

.ch-drawer-search {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.ch-drawer-search input {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--fg);
  font-size: 12.5px;
  outline: none;
}

.ch-drawer-search input:focus {
  border-color: var(--accent);
}

.ch-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overscroll-behavior: contain;
}

.ch-drawer-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 10px;
  text-decoration: none;
  color: var(--fg);
  transition: all .15s ease;
}

.ch-drawer-item:hover {
  background: var(--surface3, #23252a);
  border-color: var(--fg3);
}

.ch-drawer-item.active {
  background: rgba(230, 162, 59, 0.12);
  border-color: var(--accent);
  color: var(--accent);
}

.ch-drawer-item-title {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ch-drawer-num {
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}

.ch-drawer-name {
  font-size: 11.5px;
  color: var(--fg2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ch-drawer-item.active .ch-drawer-name {
  color: var(--fg);
}

.ch-drawer-badge {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  background: var(--accent);
  color: #000;
  padding: 2px 7px;
  border-radius: 999px;
  flex: none;
}

/* ============ FLOATING QUICK-NAV BAR (Center Tap Trigger) ============ */
.reader-floating-bar {
  position: fixed;
  bottom: 24px;
  left: 16px;
  right: 16px;
  max-width: 420px;
  margin: 0 auto;
  background: rgba(18, 18, 20, 0.95);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  z-index: 950;
  transform: translateY(140%);
  opacity: 0;
  transition: transform .28s cubic-bezier(0.16, 1, 0.3, 1), opacity .2s ease;
  pointer-events: none;
}

.reader-floating-bar.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.floating-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--fg);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all .15s ease;
}

.floating-btn:hover {
  background: var(--border);
}

.floating-btn.toc {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--fg);
  font-weight: 600;
  cursor: pointer;
}

.floating-btn.toc:hover,
.floating-btn.toc:active {
  background: var(--surface);
  color: var(--accent);
  border-color: var(--accent);
}

.floating-btn.active-btn {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
  font-weight: 700;
  box-shadow: 0 4px 12px rgba(230, 162, 59, 0.3);
}

.floating-btn.disabled {
  opacity: 0.35;
  pointer-events: none;
  cursor: not-allowed;
}

/* ============ pencarian / kosong ============ */
.page-head { padding: 36px 0 22px; border-bottom: 1px solid var(--line); margin-bottom: 28px; }
.page-head h1 { font-size: 25px; font-weight: 700; letter-spacing: -.02em; margin-bottom: 7px; }
.page-head p { margin: 0; font-size: 13.5px; }
.page-head em { color: var(--fg); font-style: normal; font-weight: 600; }
.empty { padding: 64px 0; text-align: center; color: var(--fg3); }

.pager {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-top: 32px; padding-top: 18px;
  border-top: 1px solid var(--line);
}

/* ============ auth & admin ============ */
.auth-box {
  max-width: 380px; margin: 56px auto;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 28px;
}
.auth-box h1 { font-size: 23px; font-weight: 700; letter-spacing: -.02em; margin-bottom: 22px; }
.auth-box form { display: flex; flex-direction: column; gap: 15px; }
.auth-box label { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--fg3); }
.auth-box .btn-solid, .auth-box .btn { margin-top: 6px; }
.auth-box p { font-size: 13px; margin: 18px 0 0; }

.nav-tg-link, .hdr-nav a.nav-tg-link {
  color: #229ED9 !important;
}
.hdr-nav a.nav-tg-link svg {
  fill: #229ED9 !important;
  color: #229ED9 !important;
}
.nav-tg-link:hover {
  filter: brightness(1.25);
  transform: translateY(-1px);
}

.telegram-widget-wrapper {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.btn-telegram-direct {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 16px;
  background: #229ED9;
  border: none;
  border-radius: var(--radius);
  color: #fff;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
  box-sizing: border-box;
}

.btn-telegram-direct:hover {
  background: #1c88bc;
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(34, 158, 217, 0.4);
}

.btn-telegram-direct svg {
  flex: none;
}

.tg-status-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: color-mix(in srgb, #229ED9 12%, var(--surface));
  border: 1px solid color-mix(in srgb, #229ED9 35%, var(--border));
  border-radius: var(--radius);
  text-align: left;
}

.tg-status-card .spinner {
  width: 22px;
  height: 22px;
  border: 2.5px solid rgba(34, 158, 217, 0.3);
  border-top-color: #229ED9;
  border-radius: 50%;
  animation: spin .8s linear infinite;
  flex: none;
}

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

.tg-status-text strong {
  display: block;
  font-size: 13.5px;
  color: var(--fg);
}

.tg-status-text p {
  font-size: 12px;
  color: var(--fg2);
  margin: 2px 0 0;
}

.tg-link-fallback {
  display: inline-block;
  margin-top: 6px;
  color: #229ED9;
  font-size: 11.5px;
  font-weight: 600;
  text-decoration: underline;
}

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 10px 16px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--fg);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition: all .15s ease;
  box-sizing: border-box;
}

.btn-google:hover {
  background: var(--surface);
  border-color: var(--accent);
  color: var(--fg);
  transform: translateY(-1px);
}

.btn-google svg {
  flex: none;
}

.auth-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: 16px 0;
  color: var(--fg3);
  font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border);
}

.auth-divider span {
  padding: 0 10px;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: 11px;
}

.admin-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  padding: 32px 0 20px; border-bottom: 1px solid var(--line); margin-bottom: 24px;
}
.admin-head h1 { font-size: 25px; font-weight: 700; letter-spacing: -.02em; }
.admin-form {
  display: flex; flex-direction: column; gap: 14px; max-width: 620px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px; margin-bottom: 10px;
}
.admin-form label { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--fg3); }
.admin-form label.check { flex-direction: row; align-items: center; gap: 8px; color: var(--fg); font-size: 13.5px; }
.admin-form label.check input { width: auto; }
.admin-form .row { display: flex; gap: 12px; flex-wrap: wrap; }
.admin-form input[type="file"] { padding: 7px; }
.admin-form .btn-solid, .admin-form .btn, .admin-form .btn-ghost { align-self: flex-start; }
.admin-list {
  display: flex; flex-direction: column;
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; background: var(--surface);
}

/* ---------- panel admin (mockup) ---------- */
.adm-top {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 16px; padding: 26px 0 18px;
}
.adm-top h1 { font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.adm-top p { margin: 4px 0 0; }

.adm-search {
  display: flex; align-items: center; gap: 9px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 9px; padding: 9px 13px; margin-bottom: 14px;
  transition: border-color .15s;
}
.adm-search:focus-within { border-color: var(--fg3); }
.adm-search svg { color: var(--fg3); flex: none; }
.adm-search input {
  background: none; border: 0; outline: none; width: 100%;
  color: var(--fg); font: inherit; font-size: 13.5px;
}
.adm-search input::placeholder { color: var(--fg3); }

.adm-tabs {
  display: flex; gap: 6px; flex-wrap: nowrap;
  overflow-x: auto; scrollbar-width: none;
  padding-bottom: 4px; margin-bottom: 20px;
}
.adm-tabs::-webkit-scrollbar { display: none; }
.adm-tab {
  flex: none; display: flex; align-items: center; gap: 5px;
  font-size: 12.5px; color: var(--fg2);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 5px 10px; white-space: nowrap;
  transition: color .15s, border-color .15s;
}
.adm-tab:hover { color: var(--fg); border-color: var(--fg3); }
.adm-tab.on {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  background: color-mix(in srgb, var(--accent) 10%, var(--surface));
}
.adm-tab .n { color: var(--fg3); font-size: 11px; }
.adm-tab.on .n { color: color-mix(in srgb, var(--accent) 80%, var(--fg3)); }

.adm-list {
  display: flex; flex-direction: column;
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; background: var(--surface);
}
.adm-row {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 15px 14px;
  border-bottom: 1px solid var(--line);
}
.adm-row:last-child { border-bottom: 0; }
.adm-cover {
  flex: none; width: 54px; aspect-ratio: 2 / 3;
  border-radius: 8px; overflow: hidden;
  background: var(--surface2); border: 1px solid var(--border);
}
.adm-cover img { width: 100%; height: 100%; object-fit: cover; }
.adm-cover .cover-ph { font-size: 19px; }
.adm-info { min-width: 0; flex: 1; }
.adm-title {
  display: block; font-size: 14.5px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.adm-title:hover { color: var(--accent); }
.adm-author { margin: 3px 0 0; font-size: 12.5px; color: var(--fg3); }
.adm-badges {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin: 8px 0 0;
}
.st-pill {
  display: inline-block; font-size: 10.5px; font-weight: 600;
  letter-spacing: .03em; padding: 3px 9px; border-radius: 6px;
  border: 1px solid transparent;
}
.st-pill.ongoing {
  color: #7fb2e8; background: rgba(127,178,232,.12);
  border-color: rgba(127,178,232,.3);
}
.st-pill.completed {
  color: #7fc79b; background: rgba(127,199,155,.12);
  border-color: rgba(127,199,155,.3);
}
.st-pill.hiatus {
  color: #d9b06a; background: rgba(217,176,106,.12);
  border-color: rgba(217,176,106,.3);
}
.adm-ch { font-size: 12px; color: var(--fg3); }
.adm-pub { margin: 7px 0 0; font-size: 12px; color: var(--fg3); }
.adm-acts {
  flex: none; display: flex; flex-direction: column; gap: 8px;
  align-items: flex-end; padding-top: 2px;
}
.adm-acts .quiet { font-size: 12.5px; }

/* ---------- halaman kelola novel ---------- */
.edit-top {
  display: flex; align-items: flex-start; gap: 20px;
  padding: 4px 0 26px;
}
.edit-top-info { min-width: 0; flex: 1; }
.edit-top-info h2 { font-size: 19px; font-weight: 700; letter-spacing: -.015em; }
.edit-top-info p { margin: 8px 0 0; }
.admin-form .row .num-field { max-width: 120px; }
.admin-form .row .grow { flex: 1; min-width: 200px; }

/* ---------- pemilih genre (checkbox jadi chip) ---------- */
.pick {
  border: 0; padding: 0; margin: 0;
}
.pick legend {
  font-size: 12.5px; color: var(--fg3);
  padding: 0; margin-bottom: 10px;
}
.pick-grid {
  display: flex; flex-wrap: wrap; gap: 7px;
}
.pick-chip {
  display: inline-flex; align-items: center;
  cursor: pointer; user-select: none;
}
.pick-chip input {
  position: absolute; opacity: 0; width: 0; height: 0;
}
.pick-chip span {
  display: inline-block;
  font-size: 12.5px; color: var(--fg2);
  background: var(--bg); border: 1px solid var(--border);
  border-radius: 8px; padding: 6px 11px;
  transition: color .13s, border-color .13s, background .13s;
}
.pick-chip:hover span { color: var(--fg); border-color: var(--fg3); }
.pick-chip input:checked + span {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  background: color-mix(in srgb, var(--accent) 12%, var(--bg));
}
.pick-chip input:focus-visible + span {
  outline: 2px solid var(--accent); outline-offset: 2px;
}
/* di halaman edit, form-nya punya background surface */
.admin-form .pick-chip span { background: var(--bg); }

.admin-row {
  display: flex; align-items: center; gap: 14px;
  padding: 14px;
  border-bottom: 1px solid var(--line);
}
.admin-row:last-child { border-bottom: 0; }
.admin-cover {
  flex: none; width: 46px; aspect-ratio: 2 / 3;
  border-radius: 7px; overflow: hidden;
  background: var(--surface2); border: 1px solid var(--border);
}
.admin-cover img { width: 100%; height: 100%; object-fit: cover; }
.admin-cover .cover-ph { font-size: 17px; }
.admin-info { min-width: 0; flex: 1; }
.admin-title {
  display: block; font-size: 14px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.admin-title:hover { color: var(--accent); }
.admin-meta { margin: 4px 0 0; font-size: 12.5px; color: var(--fg3); }
.admin-meta .dot { opacity: .5; }
.admin-flags { margin: 7px 0 0; }
.flag {
  display: inline-block; font-size: 10px; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase;
  padding: 2px 7px; border-radius: 5px;
  border: 1px solid var(--border); color: var(--fg3);
}
.flag.on { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }
.admin-acts { display: flex; align-items: center; gap: 12px; flex: none; }
.admin-acts .btn-ghost { padding: 6px 12px; font-size: 12.5px; }
.admin-acts .quiet { font-size: 12.5px; }

/* tabel lama — masih dipakai di halaman kelola chapter */
.admin-table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 13.5px; }
.admin-table th, .admin-table td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--line); }
.admin-table th { color: var(--fg3); font-size: 11px; text-transform: uppercase; letter-spacing: .07em; font-weight: 600; }
.admin-table form { display: inline; }
/* bungkus tabel supaya bisa di-scroll, bukan kepotong */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
hr { border: 0; border-top: 1px solid var(--line); margin: 38px 0; }

/* ============ footer ============ */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 56px; padding: 24px 0 42px;
  color: var(--fg3); font-size: 12.5px;
}
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ============ responsif ============ */
@media (max-width: 860px) {
  .updates { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .hdr-in {
    flex-wrap: wrap;
    height: auto;
    padding: 0 14px;
    row-gap: 0;
  }
  .logo {
    display: flex;
    align-items: center;
    height: 52px;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -.03em;
    flex: none;
  }
  .hdr-search {
    display: flex;
    order: 2;
    flex: 1;
    min-width: 0;
    max-width: none;
    height: 36px;
    margin: 0 6px;
    padding: 0 10px;
    gap: 6px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
  }
  .hdr-search svg { width: 15px; height: 15px; }
  .hdr-search-ph { font-size: 12px; }
  .hdr-right {
    order: 3;
    height: 52px;
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 0;
    flex: none;
  }
  .hdr-right .icon-btn {
    width: 36px;
    height: 36px;
    padding: 0;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
  }
  .hdr-right .icon-btn svg {
    width: 19px;
    height: 19px;
  }
  .hdr-right .av {
    width: 34px;
    height: 34px;
    font-size: 13px;
    border-radius: 50%;
  }
  /* kalau masih nggak muat, kasih petunjuk visual ada yang bisa di-scroll */
  .adm-tabs, .chips {
    -webkit-mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 26px), transparent 100%);
    mask-image: linear-gradient(90deg, #000 0, #000 calc(100% - 26px), transparent 100%);
  }
  .hdr-nav {
    display: flex;
    order: 4;
    flex-basis: 100%;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    padding: 8px 0 10px;
    margin: 0;
    border-top: 1px solid var(--line);
    overflow: visible;
  }
  .hdr-nav::-webkit-scrollbar { display: none; }
  .hdr-nav a {
    flex: 1;
    height: 38px;
    padding: 0;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all .15s ease;
  }
  .hdr-nav a svg { width: 17px; height: 17px; color: var(--fg3); }
  .hdr-nav a:hover { background: var(--surface2); border-color: var(--fg3); }
  .hdr-nav a:hover svg { color: var(--fg); }
  .hdr-nav a.on {
    background: rgba(230, 162, 59, 0.14);
    border-color: var(--accent);
    color: var(--accent);
  }
  .hdr-nav a.on svg { color: var(--accent); }
  .only-mobile { display: flex; }
  .only-desktop { display: none; }
  .wrap { padding: 0 16px; }
  main.wrap { padding-top: 16px; }
  .intro { padding: 28px 0 18px; }
  .intro h1 { font-size: 25px; }
  .chips {
    flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none;
    margin-bottom: 28px; padding-bottom: 4px;
    /* biar chip pertama & terakhir nggak nempel tepi */
    margin-left: -16px; margin-right: -16px; padding-left: 16px; padding-right: 16px;
  }
  .chips::-webkit-scrollbar { display: none; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 22px 13px; }
  .card h3 { font-size: 13px; }
  .novel-head { gap: 16px; padding: 20px 0 26px; margin-bottom: 26px; align-items: flex-start; }
  .cover.big { width: 108px; }
  .novel-meta h1 { font-size: 20px; margin-bottom: 5px; letter-spacing: -.02em; }
  .novel-author { font-size: 12.5px; margin-bottom: 10px; }
  .novel-badges { gap: 8px; margin-bottom: 10px; }
  .novel-stat { font-size: 11.5px; }
  .st-pill { font-size: 10.5px; padding: 3px 8px; }
  .tagbar { gap: 5px; margin-bottom: 12px; }
  .tag { font-size: 10.5px; padding: 3px 9px; }
  .actions { gap: 8px; }
  .actions .btn-solid, .actions .btn-ghost { font-size: 12.5px; padding: 9px 13px; }
  .reader { font-size: 17.5px; }
  .block { margin-bottom: 36px; scroll-margin-top: 115px; }
}

/* ============================================================
   OVERLAY PENCARIAN
   Layer di bawah header; header tetap, homepage tidak tertimpa.
   Tinggi dibatasi + body di-scroll di dalam panel.
   ============================================================ */
.search-layer {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(0, 0, 0, .65);
  backdrop-filter: blur(4px);
  display: flex; align-items: flex-start; justify-content: center;
}
.search-layer[hidden] { display: none; }
body.search-lock { overflow: hidden; }

.search-panel {
  width: 100%; max-width: min(var(--wrap), 580px);
  margin: 16px auto 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .5);
  display: flex; flex-direction: column;
  max-height: min(78vh, 620px);
  overflow: hidden;
}

.search-bar {
  display: flex; align-items: center; gap: 10px;
  background: transparent; border: none;
  padding: 12px 14px;
  flex: none;
}
.search-bar svg { color: var(--fg3); flex: none; }
.search-bar input {
  flex: 1; min-width: 0; background: none; border: 0; outline: none;
  color: var(--fg); font-size: 15px; font-family: inherit; padding: 2px 0;
}
.search-bar input::placeholder { color: var(--fg3); }
.search-clear {
  flex: none; background: none; border: 0; cursor: pointer;
  color: var(--fg3); display: flex; padding: 4px; border-radius: 50%;
  transition: color .13s, background .13s;
}
.search-clear:hover { color: var(--fg); background: var(--surface2); }
.search-close {
  flex: none; background: var(--surface2); border: 1px solid var(--border);
  cursor: pointer; color: var(--fg2);
  font-size: 13px; font-weight: 600; font-family: inherit;
  padding: 5px 12px; border-radius: 8px;
  transition: color .13s, border-color .13s;
}
.search-close:hover { color: var(--fg); border-color: var(--fg3); }

.search-body {
  flex: 1; min-height: 0; overflow-y: auto;
  overscroll-behavior: contain;
  background: transparent;
  border-top: 1px solid var(--line);
  padding: 14px 14px 18px;
}
.search-sec { margin-bottom: 4px; }
.search-hint {
  margin: 0 0 12px; font-size: 11px; font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; color: var(--fg3);
}
.search-tags { display: flex; flex-wrap: wrap; gap: 7px; }
.search-tag {
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--fg2); font-family: inherit; font-size: 12.5px;
  padding: 6px 13px; border-radius: 999px; cursor: pointer;
  transition: border-color .13s, color .13s, background .13s;
}
.search-tag:hover { border-color: var(--fg3); color: var(--fg); background: var(--surface); }

/* baris hasil */
.s-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 8px; border-radius: 10px;
  transition: background .13s;
}
.s-row:hover { background: var(--surface2); }
.s-cover {
  flex: none; width: 44px; aspect-ratio: 2 / 3;
  border-radius: 6px; overflow: hidden;
  background: var(--surface2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
}
.s-cover img { width: 100%; height: 100%; object-fit: cover; }
.s-cover .cover-ph { font-size: 17px; }
.s-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.s-title {
  font-size: 13.5px; font-weight: 600; color: var(--fg);
  line-height: 1.25;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.s-sub { font-size: 11.5px; color: var(--fg3); }
.s-tags { display: flex; gap: 5px; margin-top: 3px; }
.s-tag {
  font-size: 10px; color: var(--fg2);
  border: 1px solid var(--border); border-radius: 999px; padding: 1px 7px;
}
.s-status {
  flex: none; font-size: 11px; font-weight: 500;
  color: var(--accent);
  background: rgba(197, 165, 116, 0.08);
  border: 1px solid rgba(197, 165, 116, 0.25);
  padding: 2px 8px; border-radius: 6px;
  text-align: right;
  white-space: nowrap;
  margin-top: 1px;
}
.s-more {
  display: flex; align-items: center; justify-content: center;
  margin-top: 12px; padding: 10px 14px; border-radius: 8px;
  background: var(--surface2); border: 1px solid var(--border);
  color: var(--accent); font-size: 12.5px; font-weight: 500;
  text-align: center; text-decoration: none;
  transition: border-color .13s, background .13s;
}
.s-more:hover { border-color: var(--accent); background: var(--surface); }

/* tidak ada hasil */
.s-empty { padding: 26px 10px 22px; text-align: center; }
.s-empty-title { margin: 0 0 6px; font-size: 14.5px; font-weight: 600; color: var(--fg); }
.s-empty .btn-ghost { margin-top: 14px; }

/* ============================================================
   LANJUTKAN MEMBACA
   ============================================================ */
.cr-block { margin-bottom: 32px; }
.cr-card {
  display: flex; align-items: center; gap: 15px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px;
  transition: border-color .14s;
}
.cr-card:hover { border-color: var(--fg3); }
.cr-cover {
  flex: none; width: 54px; aspect-ratio: 2 / 3;
  border-radius: 7px; overflow: hidden;
  background: var(--surface2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
}
.cr-cover img { width: 100%; height: 100%; object-fit: cover; }
.cr-cover .cover-ph { font-size: 20px; }
.cr-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 3px; }
.cr-label {
  font-size: 10px; font-weight: 600; letter-spacing: .07em;
  text-transform: uppercase; color: var(--accent);
}
.cr-title {
  font-size: 14.5px; font-weight: 600; color: var(--fg);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cr-sub { font-size: 12px; color: var(--fg3); }
.cr-bar {
  display: block; height: 3px; border-radius: 2px;
  background: var(--surface2); margin-top: 6px; overflow: hidden;
}
.cr-bar i { display: block; height: 100%; background: var(--accent); border-radius: 2px; }
.cr-go {
  flex: none; font-size: 12.5px; font-weight: 600; color: var(--accent);
  white-space: nowrap;
}

/* ============================================================
   FEED — satu gaya baris untuk semua daftar
   (Pilihan editor, Terbaru, dll). Bikin halaman terasa nyatu.
   ============================================================ */
.feed {
  display: flex; flex-direction: column;
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; background: var(--surface);
}
.feed-row {
  display: flex; align-items: center; gap: 14px;
  padding: 13px 14px; border-bottom: 1px solid var(--line);
  transition: background .13s;
}
.feed-row:last-child { border-bottom: 0; }
.feed-row:hover { background: var(--surface2); }
.feed-rank {
  flex: none; width: 22px; text-align: center;
  font-size: 15px; font-weight: 700; color: var(--fg3);
  font-variant-numeric: tabular-nums;
}
.rank-pos-1 { color: var(--accent); font-size: 17px; font-weight: 800; }
.rank-pos-2 { color: #d1d5db; font-size: 16px; font-weight: 700; }
.rank-pos-3 { color: #d97706; font-size: 16px; font-weight: 700; }
.feed-cover {
  flex: none; width: 70px; aspect-ratio: 2 / 3;
  border-radius: 8px; overflow: hidden;
  background: var(--surface2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
}
.feed-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.feed-cover .cover-ph { font-size: 22px; font-weight: 700; color: var(--fg2); }
.feed-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.feed-title {
  font-size: 13.5px; font-weight: 600; color: var(--fg);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.feed-sub { margin: 0; font-size: 11.5px; color: var(--fg3); }

/* statistik ranking (Opsi 3) */
.feed-stat {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--fg2);
  margin-top: 2px;
}

.feed-stat svg {
  color: var(--accent);
  flex: none;
}
.feed-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; }
.f-tag {
  font-size: 10px; color: var(--fg2);
  border: 1px solid var(--border); border-radius: 999px; padding: 1.5px 8px;
  white-space: nowrap;
}
.feed-body .chapter-mini { margin-top: 6px; }

/* ============================================================
   PILIHAN EDITOR (lama — masih dipakai kalau ada)
   ============================================================ */
.editor-list {
  display: flex; flex-direction: column;
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; background: var(--surface);
}
.ed-row {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 14px; border-bottom: 1px solid var(--line);
  transition: background .13s;
}
.ed-row:last-child { border-bottom: 0; }
.ed-row:hover { background: var(--surface2); }
.ed-rank {
  flex: none; width: 20px; text-align: center;
  font-size: 15px; font-weight: 700; color: var(--accent);
  font-variant-numeric: tabular-nums;
}
.ed-cover {
  flex: none; width: 40px; aspect-ratio: 2 / 3;
  border-radius: 6px; overflow: hidden;
  background: var(--surface2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
}
.ed-cover img { width: 100%; height: 100%; object-fit: cover; }
.ed-cover .cover-ph { font-size: 16px; }
.ed-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.ed-title {
  font-size: 13.5px; font-weight: 600; color: var(--fg);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ed-sub { font-size: 11.5px; color: var(--fg3); }

@media (max-width: 720px) {
  .search-panel { margin: 12px 12px 0; width: calc(100% - 24px); max-height: 84vh; }
  .cr-card { padding: 12px; gap: 12px; }
  .cr-cover { width: 46px; }
  .cr-title { font-size: 13.5px; }
  .ed-row { padding: 11px 12px; gap: 11px; }
}

/* ============================================================
   HALAMAN SEMUA NOVEL & GENRE CAROUSEL
   ============================================================ */
.novels-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 16px;
  margin: 10px 0 28px;
  flex-wrap: wrap;
}
.novels-head h1 {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.02em;
  margin: 0 0 4px;
}
.filter-dropdown-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.filter-dropdown-wrap select {
  appearance: none;
  -webkit-appearance: none;
  background: var(--surface);
  color: var(--fg);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 8px 36px 8px 14px;
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  transition: border-color .15s, background .15s;
}
.filter-dropdown-wrap select:focus,
.filter-dropdown-wrap select:hover {
  border-color: var(--fg3);
  background: var(--surface2);
}
.dropdown-icon {
  position: absolute;
  right: 12px;
  pointer-events: none;
  color: var(--fg3);
}

.genre-section {
  margin-bottom: 28px;
}
.genre-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  gap: 12px;
}
.genre-head h2 {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.01em;
  margin: 0;
}
.genre-head a {
  font-size: 13px;
  color: var(--fg2);
  text-decoration: none;
  white-space: nowrap;
  transition: color .15s ease;
}
.genre-head a:hover {
  color: var(--accent);
}

.carousel-track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scrollbar-width: none;
  padding-bottom: 6px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
.carousel-track::-webkit-scrollbar {
  display: none;
}
@media (max-width: 720px) {
  .carousel-track {
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 16px;
    padding-right: 16px;
  }
}

.carousel-card {
  flex: 0 0 124px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  scroll-snap-align: start;
  text-decoration: none;
  transition: transform .14s;
}
.carousel-card:hover {
  transform: translateY(-2px);
}
.carousel-cover {
  width: 124px;
  aspect-ratio: 2 / 3;
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}
.carousel-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.carousel-cover .cover-ph {
  font-size: 32px;
}
.carousel-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.carousel-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.carousel-sub {
  font-size: 11.5px;
  color: var(--fg3);
}

/* ============================================================
   RANKING EDITORIAL (tabs Populer/Mingguan/Terbaru + feed)
   ============================================================ */
.rank-tabs {
  display: inline-flex; gap: 6px;
}
.rank-tab {
  font-size: 12px; font-weight: 500; color: var(--fg3);
  padding: 5px 12px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
  text-decoration: none; transition: all .15s ease;
}
.rank-tab:hover { color: var(--fg); border-color: var(--fg3); }
.rank-tab.on {
  color: var(--accent); border-color: var(--accent);
  background: rgba(230, 162, 59, 0.12); font-weight: 600;
}
.rank-more {
  display: flex; align-items: center; justify-content: center;
  margin-top: 10px; padding: 11px 0;
  border: 1px solid var(--border); border-radius: var(--radius);
  font-size: 13px; font-weight: 600; color: var(--fg2);
  text-decoration: none; transition: all .15s ease;
}
.rank-more:hover { color: var(--accent); border-color: var(--accent); background: var(--surface); }

/* ============ CTA EKSPLORASI NOVEL (OPSI 1 ala ChatGPT) ============ */
.explore-cta-card {
  margin-top: 14px;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.explore-cta-title {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--fg);
  margin: 0 0 4px;
  letter-spacing: -.01em;
}

.explore-cta-desc {
  font-size: 13px;
  color: var(--fg2);
  margin: 0;
  line-height: 1.45;
}

.explore-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
  transition: gap .15s ease, filter .15s ease;
  align-self: flex-start;
}

.explore-cta-btn:hover {
  gap: 9px;
  filter: brightness(1.15);
}

.explore-cta-btn svg {
  flex: none;
  transition: transform .15s ease;
}

.explore-cta-btn:hover svg {
  transform: translateX(3px);
}

/* ============ COMMUNITY & REQUEST NOVEL BANNER ============ */
.community-cta-card {
  margin-top: 14px;
  padding: 18px 20px;
  background: color-mix(in srgb, #229ED9 9%, var(--surface));
  border: 1px solid color-mix(in srgb, #229ED9 28%, var(--border));
  border-radius: var(--radius);
  display: flex;
  gap: 14px;
  align-items: flex-start;
}

.community-cta-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #229ED9;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: none;
  box-shadow: 0 4px 14px rgba(34, 158, 217, 0.3);
}

.community-cta-body {
  flex: 1;
  min-width: 0;
}

.community-cta-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--fg);
  margin: 0 0 4px;
}

.community-cta-desc {
  font-size: 12.5px;
  color: var(--fg2);
  margin: 0 0 10px;
  line-height: 1.45;
}

.community-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #229ED9;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: gap .15s ease, filter .15s ease;
}

.community-cta-btn:hover {
  gap: 9px;
  filter: brightness(1.2);
}

/* ============ PODIUM TOP 3 (ranking) ============ */
.podium-tag {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 14px 0 12px;
}

.podium {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  align-items: start;
  margin-bottom: 30px;
}

.podium-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  gap: 2px;
}

.podium-item.r1 { margin-top: 0; }
.podium-item.r2 { margin-top: 18px; }
.podium-item.r3 { margin-top: 36px; }

.podium-cover {
  width: 100%;
  aspect-ratio: 2 / 3;
  border-radius: 9px;
  overflow: hidden;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 7px;
}

.podium-item.r1 .podium-cover {
  box-shadow: 0 8px 22px rgba(230, 162, 59, 0.22);
  border-color: rgba(230, 162, 59, 0.5);
}

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

.podium-cover .cover-ph {
  font-size: 26px;
  font-weight: 700;
  color: var(--fg3);
}

.podium-rank {
  font-size: 14px;
  font-weight: 700;
  margin-bottom: 2px;
}

.podium-item.r1 .podium-rank { color: var(--accent); }
.podium-item.r2 .podium-rank { color: #9aa3b2; }
.podium-item.r3 .podium-rank { color: #cd7f32; }

.podium-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--fg);
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.podium-sub {
  font-size: 11px;
  color: var(--fg2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
}

.podium-sub svg {
  color: var(--accent);
  flex: none;
}

.rank-rest-title {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 10px;
}

/* ============================================================
   RANKING COMPACT HEADER & ITEM
   ============================================================ */
.rank-page-head {
  padding: 16px 0 12px;
  margin-bottom: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rank-page-head .rank-title-group h1 {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.02em;
  margin: 0 0 2px;
}
.rank-page-head .rank-title-group p {
  margin: 0;
  font-size: 13px;
  color: var(--fg3);
}

.rank-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  transition: background .13s;
}
.rank-row .feed-title {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--fg);
}
.rank-row .feed-sub {
  margin: 0;
  font-size: 12px;
  color: var(--fg3);
}
.rank-tag {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  margin-top: 2px;
  letter-spacing: .02em;
  text-transform: capitalize;
}

/* ============================================================
   PANEL PILIH GENRE (overlay)
   ============================================================ */
.genre-layer {
  position: fixed; inset: 0; z-index: 70;
  background: rgba(0, 0, 0, .65);
  backdrop-filter: blur(4px);
  display: flex; align-items: flex-end; justify-content: center;
}
.genre-layer[hidden] { display: none; }

.genre-panel {
  width: 100%; max-width: min(var(--wrap), 560px);
  background: var(--surface);
  border: 1px solid var(--border); border-bottom: 0;
  border-radius: 16px 16px 0 0;
  display: flex; flex-direction: column;
  max-height: 78vh;
}
.genre-bar {
  flex: none; display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--line);
}
.genre-title { font-size: 15px; font-weight: 700; }
.genre-close {
  background: none; border: 0; cursor: pointer; color: var(--fg3);
  display: flex; padding: 6px; border-radius: 50%;
}
.genre-close:hover { color: var(--fg); background: var(--surface2); }

.genre-search-wrap {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 9px; padding: 7px 12px; margin-bottom: 12px;
}
.genre-search-wrap svg { color: var(--fg3); flex: none; }
.genre-search-wrap input {
  flex: 1; min-width: 0; background: none; border: 0; outline: none;
  color: var(--fg); font-family: inherit; font-size: 13.5px;
}
.genre-search-wrap input::placeholder { color: var(--fg3); }

.genre-body { flex: 1; min-height: 0; overflow-y: auto; padding: 14px 16px; }
.genre-hint { margin: 0 0 12px; font-size: 12px; color: var(--fg3); }
.genre-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.g-opt {
  font-family: inherit; font-size: 13px; color: var(--fg2);
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: 999px; padding: 8px 15px; cursor: pointer;
  transition: color .13s, border-color .13s, background .13s;
}
.g-opt:hover { color: var(--fg); border-color: var(--fg3); }
.g-opt.on {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 55%, transparent);
  background: color-mix(in srgb, var(--accent) 10%, var(--surface2));
}
.genre-foot {
  flex: none; display: flex; align-items: center; gap: 10px;
  padding: 12px 16px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
}
.genre-foot #genre-count { margin-right: auto; }

.filter-btn {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--fg2); font-family: inherit; font-size: 13px; font-weight: 500;
  padding: 8px 14px; border-radius: 9px; cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.filter-btn:hover { border-color: var(--fg3); color: var(--fg); background: var(--surface2); }
.filter-btn svg { color: var(--fg3); flex: none; }

/* icon-only filter button (compact list) */
.filter-btn.icon-only {
  width: 40px; height: 40px;
  padding: 0; justify-content: center; border-radius: 10px;
}

/* ============ COMPACT LIST (Opsi 1) + CATALOG ROWS (Opsi 4) ============ */
.novel-list {
  list-style: none;
  margin: 0; padding: 0;
}

.novel-item {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 2px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: background .13s;
}

.novel-list li:last-child .novel-item { border-bottom: 0; }

.nl-cover {
  flex: none;
  width: 72px;
  aspect-ratio: 2 / 3;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.nl-cover .cover-ph {
  font-size: 26px;
  font-weight: 700;
  color: var(--fg3);
}

.nl-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nl-title {
  font-size: 15.5px;
  font-weight: 700;
  color: var(--fg);
  line-height: 1.3;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nl-author {
  font-size: 12.5px;
  color: var(--fg2);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nl-meta {
  font-size: 12px;
  color: var(--fg3);
  margin: 0;
}

.nl-go {
  flex: none;
  color: var(--fg3);
}

.novel-item:hover .nl-go { color: var(--accent); }

/* ============ FILTER STATUS PILLS (Opsi 4) ============ */
.status-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -8px 0 14px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.status-filter::-webkit-scrollbar { display: none; }

.sf-pill {
  flex: none;
  display: inline-flex;
  align-items: center;
  padding: 7px 15px;
  border-radius: 999px;
  background: var(--surface2);
  border: 1px solid transparent;
  color: var(--fg2);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s, color .15s, border-color .15s;
  white-space: nowrap;
}

.sf-pill:hover {
  color: var(--fg);
  border-color: var(--border);
}

.sf-pill.active {
  background: rgba(230, 162, 59, 0.14);
  border-color: rgba(230, 162, 59, 0.45);
  color: var(--accent);
}

.bubble-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--fg2);
  font-size: 12px;
  font-weight: 500;
  padding: 5px 13px;
  border-radius: 999px;
  text-decoration: none;
  transition: border-color .15s, background .15s, color .15s;
  white-space: nowrap;
}
.bubble-btn:hover {
  border-color: var(--fg3);
  background: var(--surface);
  color: var(--fg);
}

/* ============================================================
   GRID GENRE (halaman Semua Novel)
   ============================================================ */
.genre-result-head { align-items: center; }
.genre-grid-static {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px; margin-bottom: 8px;
}
.g-tile {
  font-family: inherit; text-align: left; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 16px 14px;
  transition: border-color .15s, background .15s;
}
.g-tile:hover { border-color: var(--fg3); background: var(--surface2); }
.g-tile-name { font-size: 14px; font-weight: 600; color: var(--fg); }
@media (max-width: 720px) {
  .genre-grid-static { grid-template-columns: repeat(2, 1fr); }
  .g-tile { padding: 14px 13px; }
  .genre-layer { align-items: flex-end; }
}

/* ============================================================
   HERO: REKOMENDASI UNTUKMU (KARTU PILIHAN EDITOR)
   ============================================================ */
.rec-title-wrap {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
}
.rec-counter {
  font-size: 13px;
  font-weight: 500;
  color: var(--fg3);
}

.hero-slider {
  position: relative;
  width: 100%;
}
.hero-track {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-bottom: 4px;
}
.hero-track::-webkit-scrollbar {
  display: none;
}
@media (max-width: 720px) {
  .hero-track {
    margin-left: -16px;
    margin-right: -16px;
    padding-left: 16px;
    padding-right: 16px;
  }
}

.hero-card {
  flex: 0 0 100%;
  max-width: 100%;
  box-sizing: border-box;
  scroll-snap-align: start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color .15s ease;
}
.hero-card:hover {
  border-color: var(--fg3);
}

.hero-main {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.hero-cover {
  flex: none;
  width: 90px;
  aspect-ratio: 2 / 3;
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-cover .cover-ph {
  font-size: 28px;
  font-weight: 700;
  color: var(--fg2);
}

.hero-info {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.hero-badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 10px;
  font-weight: 700;
  color: var(--accent);
  background: rgba(230, 162, 59, 0.12);
  border: 1px solid rgba(230, 162, 59, 0.3);
  border-radius: 999px;
  padding: 2px 8px;
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-bottom: 2px;
}
.hero-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--fg);
  text-decoration: none;
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color .15s ease;
}
.hero-title:hover {
  color: var(--accent);
}
.hero-meta {
  font-size: 12px;
  color: var(--fg3);
  margin-top: 1px;
}
.hero-metrics {
  margin: 3px 0 2px;
  gap: 12px;
}
.hero-metrics .metric-item {
  font-size: 11.5px;
  color: var(--fg3);
}
.hero-metrics .metric-item.rating {
  color: var(--accent);
  font-weight: 700;
}
.hero-tags {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.hero-tag {
  font-size: 10.5px;
  color: var(--fg2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 1.5px 7px;
  background: var(--surface2);
}
.hero-desc {
  font-size: 12px;
  color: var(--fg3);
  line-height: 1.45;
  margin: 5px 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-actions {
  display: flex;
  gap: 10px;
}
.hero-actions .hero-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.hero-actions .btn-solid.hero-btn {
  background: var(--accent);
  color: #000000;
  border: 1px solid var(--accent);
}
.hero-actions .btn-ghost.hero-btn {
  background: var(--surface2);
  color: var(--fg);
  border: 1px solid var(--border);
}
.hero-actions .btn-ghost.hero-btn:hover {
  border-color: var(--fg3);
}

/* ============================================================
   RIWAYAT BACAAN (activity cards)
   ============================================================ */
.hist-head { padding: 16px 0 10px; }
.hist-head h1 { font-size: 24px; font-weight: 700; letter-spacing: -.02em; margin: 0 0 3px; }
.hist-head p { margin: 0; font-size: 13px; color: var(--fg3); }

.hist-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 16px; flex-wrap: wrap;
}
.hist-tabs { display: inline-flex; gap: 6px; }
.hist-tab {
  font-size: 12.5px; font-weight: 500; color: var(--fg3);
  padding: 5px 13px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--surface);
  text-decoration: none; transition: all .15s ease;
}
.hist-tab:hover { color: var(--fg); border-color: var(--fg3); }
.hist-tab.on {
  color: var(--accent); border-color: var(--accent);
  background: rgba(230, 162, 59, 0.12); font-weight: 600;
}
.hist-clear-btn {
  display: inline-flex; align-items: center; gap: 5px;
  background: none; border: 0; padding: 4px 6px; cursor: pointer;
  font-size: 12px; color: var(--fg3); transition: color .15s ease;
}
.hist-clear-btn:hover { color: #f87171; }
.hist-clear-btn svg { width: 13px; height: 13px; }

.hist-list {
  display: flex; flex-direction: column; gap: 12px;
}
.hist-card {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 14px; background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--radius);
  transition: border-color .15s ease;
}
.hist-card:hover { border-color: var(--fg3); }
.hist-cover {
  flex: none; width: 62px; aspect-ratio: 2 / 3;
  border-radius: 6px; overflow: hidden; background: var(--surface2);
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
}
.hist-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hist-cover .cover-ph { font-size: 20px; font-weight: 700; color: var(--fg2); }
.hist-body { min-width: 0; flex: 1; display: flex; flex-direction: column; }
.hist-top {
  display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  margin-bottom: 4px;
}
.hist-title {
  font-size: 15px; font-weight: 700; color: var(--fg);
  text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.hist-title:hover { color: var(--accent); }
.hist-time {
  flex: none; font-size: 11.5px; color: var(--fg3);
}
.hist-tags { display: flex; gap: 5px; margin-bottom: 6px; flex-wrap: wrap; }
.hist-tag {
  font-size: 10px; color: var(--fg2);
  border: 1px solid var(--border); border-radius: 999px;
  padding: 1px 7px; background: var(--surface2);
}
.hist-ch-label {
  font-size: 12px; color: var(--fg2); margin-bottom: 6px;
}
.hist-bar {
  height: 4px; border-radius: 999px;
  background: var(--surface2); overflow: hidden; margin-bottom: 7px;
}
.hist-bar i {
  display: block; height: 100%; background: var(--accent); border-radius: 999px;
}
.hist-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.hist-progress-num {
  font-size: 11.5px; color: var(--fg3);
}
.hist-continue {
  font-size: 12.5px; font-weight: 600; color: var(--accent);
  text-decoration: none; transition: opacity .15s ease;
}
.hist-continue:hover { opacity: .85; text-decoration: underline; }

/* ============ admin: akun & komentar ============ */
.adm-hr { border: 0; border-top: 1px solid var(--line); margin: 30px 0; }
.adm-sec { margin: 26px 0; }
.adm-sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.adm-sec-head h2 { font-size: 17px; }

.adm-users { display: flex; flex-direction: column; gap: 8px; }
.adm-user-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--bg2);
}
.adm-user-av { width: 40px; height: 40px; flex: none; overflow: hidden; border-radius: 50%; }
.adm-user-av img { width: 100%; height: 100%; object-fit: cover; }
.adm-user-av.sm { width: 32px; height: 32px; }
.adm-user-av .av-ph {
  display: flex; align-items: center; justify-content: center;
  width: 100%; height: 100%; border-radius: 50%;
  background: var(--bg3); color: var(--fg2); font-weight: 700; font-size: 15px;
}
.adm-user-info { flex: 1; min-width: 0; }
.adm-user-name { font-weight: 600; display: flex; align-items: center; gap: 8px; }

.adm-cmts { display: flex; flex-direction: column; gap: 8px; }
.adm-cmt-row {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 12px; background: var(--bg2);
}
.adm-cmt-info { flex: 1; min-width: 0; }
.adm-cmt-meta { font-size: 13px; color: var(--fg2); }
.adm-cmt-meta a { color: var(--accent); }
.adm-cmt-body { font-size: 14px; margin-top: 2px; word-break: break-word; }
.adm-cmt-acts { flex: none; }
