/* Webtoon Reader — tema terang, aksen hijau, mobile-first. */
:root {
  --hijau: #00b85c;
  --hijau-tua: #009a4d;
  --teal: #0d9488;
  --tinta: #14171a;
  --abu: #6b7280;
  --garis: #e8eae9;
  --latar: #ffffff;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--latar);
  color: var(--tinta);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  padding-bottom: 72px;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* Header */
.app-header {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 10px 16px;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--garis);
  backdrop-filter: blur(8px);
}
.brand {
  display: inline-flex; align-items: center; justify-content: center;
  height: 40px; padding: 0 12px; border-radius: 10px;
  background: #ecfdf3; color: var(--hijau-tua); font-weight: 900; font-size: 15px;
  letter-spacing: .08em;
}
.brand span { transform: none; }
.header-note { font-size: 11px; color: var(--abu); text-align: right; }

/* Hero */
.hero { position: relative; margin: 12px 14px 0; border-radius: 20px; overflow: hidden;
  min-height: 400px; display: flex; align-items: flex-end; background: #0b1220; }
.hero-art { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.hero-scrim { position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(4,8,18,0) 30%, rgba(4,8,18,.72) 68%, rgba(4,8,18,.94) 100%); }
.hero-content { position: relative; z-index: 1; width: 100%; padding: 20px 18px 22px; text-align: center; color: #fff; }
.hero-kicker { margin: 0 0 8px; font-size: 10px; font-weight: 800; letter-spacing: .18em; color: #9ff5c4; }
.hero h1 { margin: 0 0 6px; font-size: clamp(26px, 8vw, 38px); font-style: italic;
  font-weight: 900; line-height: 1.02; letter-spacing: -.02em; text-shadow: 0 3px 14px rgba(0,0,0,.6); }
.hero-genre { margin: 0 0 16px; font-size: 12px; opacity: .92; }
.hero-actions { display: flex; gap: 10px; }
.btn { flex: 1; min-height: 44px; border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; display: inline-flex;
  align-items: center; justify-content: center; }
.btn-primary { background: #fff; color: #111; }
.btn-ghost { background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.65); }
.btn-ghost[aria-pressed="true"] { background: var(--hijau); border-color: var(--hijau); }

/* Section + kartu */
.section { padding: 22px 14px 0; }
.section h2 { margin: 0 0 12px; font-size: 19px; font-weight: 800; letter-spacing: -.01em; }
.section-note { margin: -4px 0 12px; font-size: 12px; color: var(--abu); }
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.series-card { min-width: 0; }
.cover-link { display: block; position: relative; border-radius: 10px; overflow: hidden;
  aspect-ratio: 3 / 4; background: #eef1ef; box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.cover-link img { width: 100%; height: 100%; object-fit: cover; display: block; }
.badge { position: absolute; top: 6px; left: 6px; z-index: 2; padding: 3px 7px; border-radius: 6px;
  background: var(--hijau); color: #fff; font-size: 9px; font-weight: 800; }
.cover-title { position: absolute; inset: auto 0 0; padding: 22px 7px 8px; color: #fff;
  font-size: 11px; font-weight: 800; line-height: 1.15; text-shadow: 0 2px 6px rgba(0,0,0,.85);
  background: linear-gradient(180deg, transparent, rgba(0,0,0,.75)); }
.card-caption { margin: 7px 2px 0; font-size: 10px; font-weight: 600; color: var(--teal); line-height: 1.3; }
.plain-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.plain-list li { display: flex; justify-content: space-between; gap: 10px; align-items: center;
  padding: 12px 14px; border: 1px solid var(--garis); border-radius: 12px; font-size: 13px; font-weight: 600; }
.plain-list li span { font-size: 11px; color: var(--abu); white-space: nowrap; }
.empty-state { margin: 0; padding: 18px 14px; border: 1px dashed #cfd6d1; border-radius: 12px;
  font-size: 12px; color: var(--abu); text-align: center; }
.search-wrap input { width: 100%; min-height: 44px; padding: 0 14px; border-radius: 12px;
  border: 1px solid var(--garis); font: inherit; font-size: 13px; background: #fafbfa; }

/* Bottom nav */
.bottom-nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 6px 2px calc(6px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.98); border-top: 1px solid var(--garis);
  box-shadow: 0 -2px 12px rgba(0,0,0,.05); }
.nav-item { display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 5px 0; color: #9aa0a6; }
.nav-item svg { width: 21px; height: 21px; fill: currentColor; }
.nav-item span { font-size: 8px; font-weight: 800; letter-spacing: .06em; }
.nav-item.active, .nav-item:target { color: var(--hijau); }

/* Reader */
body.reader { padding-bottom: 84px; background: #fff; }
.reader-head { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 10px;
  min-height: 56px; padding: 8px 12px; background: rgba(255,255,255,.97);
  border-bottom: 1px solid var(--garis); backdrop-filter: blur(8px); }
.reader-back { width: 40px; height: 40px; flex: 0 0 40px; border-radius: 50%; background: #f1f4f2;
  display: grid; place-items: center; font-size: 20px; font-weight: 700; }
.reader-meta { min-width: 0; flex: 1; display: flex; flex-direction: column; line-height: 1.25; }
.reader-meta strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reader-meta span { font-size: 10px; color: var(--abu); }
.reader-home { font-size: 10px; font-weight: 800; color: var(--hijau); letter-spacing: .06em; }
.chapter { margin: 0 auto; width: 100%; max-width: 780px; }
.chapter img { display: block; width: 100%; height: auto; margin: 0; padding: 0; }
.chapter-nav { position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 8px; align-items: center;
  padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.98); border-top: 1px solid var(--garis); }
.chapter-nav a { min-width: 0; padding: 8px 10px; border-radius: 10px; background: #f1f4f2;
  display: flex; flex-direction: column; gap: 2px; }
.chapter-nav a:last-child { text-align: right; align-items: flex-end; }
.chapter-nav span { font-size: 9px; font-weight: 700; color: var(--hijau); }
.chapter-nav strong { font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.chapter-nav .chapter-home { background: var(--hijau); color: #fff; font-size: 10px; font-weight: 800;
  display: grid; place-items: center; text-align: center; white-space: nowrap; }

@media (min-width: 640px) {
  .hero { min-height: 480px; margin: 16px auto 0; max-width: 760px; }
  .section { max-width: 760px; margin: 0 auto; }
  .card-grid { gap: 14px; }
  .card-caption { font-size: 11px; }
  .app-header, .bottom-nav, .chapter-nav { padding-left: max(16px, calc((100vw - 760px) / 2));
    padding-right: max(16px, calc((100vw - 760px) / 2)); }
}
