/*
Theme Name:   Komiku Reader
Description:  Tema pembaca komik gelap dengan sidebar navigasi, hero slider, komik populer, update terbaru, genre, favorit & riwayat baca. Membutuhkan plugin "Komiku Scraper".
Version:      2.5.1
Requires PHP: 7.4
Author:       Adriyansyah
License:      GPL-2.0-or-later
Text Domain:  komiku-reader
*/

/* ============================== Tokens ============================== */
:root {
	--bg: #0a0f1e;
	--bg-2: #0d1326;
	--surface: #121a2f;
	--surface-2: #18223b;
	--surface-3: #1f2a47;
	--border: #222c48;
	--text: #e9edf6;
	--text-2: #c3cadb;
	--muted: #8690a8;
	--accent: #ff2d63;
	--accent-2: #ff5a85;
	--accent-ink: #ffffff;
	--accent-soft: rgba(255, 45, 99, .14);
	--star: #ffc23d;
	--shadow: 0 10px 30px rgba(0, 0, 0, .35);
	--radius: 12px;
	--radius-sm: 8px;
	--topbar: 64px;
	--side: 236px;
	--font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
	color-scheme: dark;
}
:root[data-theme="light"] {
	--bg: #f3f5fa;
	--bg-2: #eef1f8;
	--surface: #ffffff;
	--surface-2: #f2f4f9;
	--surface-3: #e7ebf3;
	--border: #e1e6ef;
	--text: #141a2b;
	--text-2: #36405a;
	--muted: #6b7489;
	--accent-soft: rgba(255, 45, 99, .1);
	--shadow: 0 8px 24px rgba(20, 30, 60, .08);
	color-scheme: light;
}
@media (prefers-color-scheme: light) {
	:root:not([data-theme="dark"]) {
		--bg: #f3f5fa;
		--bg-2: #eef1f8;
		--surface: #ffffff;
		--surface-2: #f2f4f9;
		--surface-3: #e7ebf3;
		--border: #e1e6ef;
		--text: #141a2b;
		--text-2: #36405a;
		--muted: #6b7489;
		--accent-soft: rgba(255, 45, 99, .1);
		--shadow: 0 8px 24px rgba(20, 30, 60, .08);
		color-scheme: light;
	}
}

/* ============================== Base ============================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--topbar) + 12px); }
body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.55 var(--font); -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent-2); }
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5em; letter-spacing: -.01em; }
p { margin: 0 0 .8em; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.icon { flex: none; }
[hidden] { display: none !important; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }
.skip-link:focus { position: fixed !important; top: 8px; left: 8px; width: auto; height: auto; clip: auto; z-index: 999; padding: 8px 14px; background: var(--accent); color: #fff; border-radius: 8px; }
.clamp-2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp-3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.nowrap { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ============================== Buttons ============================== */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	min-height: 42px; padding: 0 18px; border-radius: 10px; font-weight: 700;
	border: 1px solid var(--border); background: var(--surface-2); cursor: pointer; transition: .15s; white-space: nowrap;
}
.btn:hover { color: var(--text); border-color: var(--muted); }
.btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-color: transparent; color: var(--accent-ink); box-shadow: 0 6px 18px rgba(255, 45, 99, .3); }
.btn-primary:hover { color: var(--accent-ink); filter: brightness(1.08); }
.btn-ghost { background: rgba(255, 255, 255, .04); border-color: rgba(255, 255, 255, .35); color: #fff; }
.btn-ghost:hover { color: #fff; border-color: #fff; }
.btn-ghost.is-fav, .btn.is-fav { border-color: var(--accent); color: var(--accent-2); }
.btn-ghost.is-fav .icon, .btn.is-fav .icon { fill: currentColor; }
.btn-block { width: 100%; }
.btn[aria-disabled="true"] { opacity: .4; pointer-events: none; }
.icon-btn {
	display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none;
	border-radius: 10px; border: 0; background: transparent; color: var(--text-2); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }

/* ============================== Topbar ============================== */
.topbar {
	position: sticky; top: 0; z-index: 60; height: var(--topbar);
	display: flex; align-items: center; gap: 16px; padding: 0 20px;
	background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(12px);
	border-bottom: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; letter-spacing: -.02em; flex: none; min-width: calc(var(--side) - 36px); }
.brand:hover { color: var(--text); }
.brand-mark {
	display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
	background: linear-gradient(135deg, var(--accent), #ff8a3d); color: #fff; font-size: 18px; font-weight: 800;
	box-shadow: 0 4px 14px rgba(255, 45, 99, .35);
}
.brand-logo { width: 36px; height: 36px; object-fit: contain; border-radius: 10px; filter: drop-shadow(0 4px 12px rgba(255, 45, 99, .35)); }
.brand-logo-sm { width: 30px; height: 30px; }
.top-search { position: relative; flex: 1 1 auto; max-width: 560px; display: flex; align-items: center; }
.top-search input {
	width: 100%; height: 42px; padding: 0 44px 0 42px; border-radius: 12px;
	border: 1px solid var(--border); background: var(--surface); color: var(--text);
}
.top-search input::placeholder { color: var(--muted); }
.top-search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.top-search .search-icon { position: absolute; left: 13px; color: var(--muted); pointer-events: none; }
.search-submit { position: absolute; right: 4px; width: 36px; height: 34px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.search-submit:hover { color: var(--text); background: var(--surface-2); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.notif { position: relative; }
.notif-badge { position: absolute; top: 4px; right: 4px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 99px; background: var(--accent); color: #fff; font-size: 10.5px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--bg); }
.notif-panel { position: absolute; right: 0; top: calc(100% + 8px); width: 320px; max-height: 420px; overflow-y: auto; padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); z-index: 90; }
.notif-head { margin: 0 4px 8px; font-weight: 700; }
.notif-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.notif-list a { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 10px; }
.notif-list a:hover { background: var(--surface-2); color: var(--text); }
.notif-list img { width: 38px; height: 46px; border-radius: 6px; object-fit: cover; flex: none; }
.notif-list .t { font-weight: 700; font-size: 13px; line-height: 1.3; }
.notif-list .m { font-size: 12px; color: var(--accent-2); }
.notif-list .new .m::after { content: " • baru"; color: var(--muted); }
.notif-empty { margin: 4px; color: var(--muted); font-size: 13px; }
.account-caret { width: 16px; height: 16px; color: var(--muted); }
.account { display: flex; align-items: center; gap: 10px; padding: 4px 10px 4px 4px; border-radius: 999px; font-weight: 600; }
.account:hover { background: var(--surface-2); color: var(--text); }
.avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; }
.avatar-empty { display: grid; place-items: center; background: var(--surface-3); color: var(--muted); }
.menu-toggle { display: none; }

/* ============================== Shell & sidebar ============================== */
.shell { display: grid; grid-template-columns: var(--side) minmax(0, 1fr); min-height: calc(100vh - var(--topbar)); }
.sidebar {
	position: sticky; top: var(--topbar); height: calc(100vh - var(--topbar)); overflow-y: auto;
	padding: 16px 14px 24px; border-right: 1px solid var(--border); background: var(--bg);
	scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent;
}
.sidebar-head { display: none; }
.side-menu { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.side-menu a { display: flex; align-items: center; gap: 14px; padding: 10px 14px; border-radius: 10px; color: var(--text-2); font-weight: 500; }
.side-menu a:hover { background: var(--surface); color: var(--text); }
.side-menu a.active, .side-menu .current-menu-item > a { background: var(--surface-2); color: var(--text); font-weight: 700; box-shadow: inset 3px 0 0 var(--accent); }
.side-menu a.active .icon { color: var(--accent); }
.side-menu.small a { padding: 7px 14px; font-size: 13.5px; gap: 12px; }
.side-menu.small .icon { width: 17px; height: 17px; color: var(--muted); }
.side-group { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--border); }
.side-label { margin: 0 0 6px 14px; color: var(--muted); font-size: 12.5px; font-weight: 600; }
.donate-card {
	margin-top: 22px; padding: 18px; border-radius: var(--radius); border: 1px solid var(--border);
	background: radial-gradient(120% 90% at 0% 0%, rgba(255, 45, 99, .22), transparent 60%), var(--surface);
}
.donate-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-2); margin-bottom: 10px; }
.donate-title { font-weight: 800; font-size: 16px; margin-bottom: 4px; }
.donate-text { color: var(--text-2); font-size: 13px; }
.drawer-backdrop { position: fixed; inset: 0; background: rgba(0, 0, 0, .55); z-index: 70; }

.page-main { min-width: 0; padding: 20px 22px 32px; }
.home-grid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 22px; align-items: start; }
.rail { display: grid; gap: 18px; position: sticky; top: calc(var(--topbar) + 20px); }

/* ============================== Section ============================== */
.section { margin-top: 26px; }
.section:first-child { margin-top: 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head h1, .section-head h2, .section-head h3 { display: flex; align-items: center; gap: 10px; margin: 0; font-size: 20px; font-weight: 800; }
.section-icon { color: var(--accent); width: 22px; height: 22px; }
.more { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 13px; font-weight: 600; white-space: nowrap; }
.more .icon { width: 16px; height: 16px; }

/* ============================== Hero slider ============================== */
/* Slide ditumpuk di satu sel grid: tinggi slider mengikuti slide tertinggi, jadi isi tidak pernah terpotong. */
.hero-slider { position: relative; display: grid; border-radius: 16px; overflow: hidden; background: var(--surface); box-shadow: var(--shadow); }
.slide { position: relative; grid-area: 1 / 1; overflow: hidden; opacity: 0; visibility: hidden; transition: opacity .6s ease, visibility .6s; }
.slide.is-active { opacity: 1; visibility: visible; }
.slide-bg { position: absolute; inset: -20px; background-size: cover; background-position: center 25%; filter: blur(30px) saturate(1.4) brightness(.45); transform: scale(1.15); }
.slide::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(90deg, rgba(8, 11, 24, .97) 0%, rgba(8, 11, 24, .88) 36%, rgba(8, 11, 24, .25) 62%, rgba(8, 11, 24, 0) 100%), linear-gradient(0deg, rgba(8, 11, 24, .55) 0%, transparent 35%); }
/* Gambar memenuhi sisi kanan dan memudar ke kiri (seperti ilustrasi lebar di referensi). */
.slide-art { position: absolute; top: 0; right: 0; bottom: 0; width: 62%; z-index: 0; -webkit-mask-image: linear-gradient(90deg, transparent 0%, #000 38%); mask-image: linear-gradient(90deg, transparent 0%, #000 38%); }
.slide-art img { width: 100%; height: 100%; object-fit: cover; object-position: center 18%; }
.slide-body { position: relative; z-index: 2; min-height: 340px; display: flex; flex-direction: column; justify-content: center; max-width: 56%; padding: 32px 36px 52px; color: #fff; }
.pill { display: inline-flex; align-self: flex-start; align-items: center; padding: 3px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--accent); color: #fff; margin-bottom: 12px; }
.slide-title { font-size: clamp(26px, 2.8vw, 42px); line-height: 1.15; padding-bottom: .08em; font-weight: 800; letter-spacing: -.02em; margin-bottom: 6px; }
.slide-title a:hover { color: #fff; }
.slide-genres { color: #d9deea; font-weight: 500; margin-bottom: 12px; }
.slide-text { color: #c6ccdb; max-width: 520px; margin-bottom: 20px; }
.slide-actions { display: flex; gap: 12px; flex-wrap: wrap; }
.slider-ui { position: absolute; z-index: 3; right: 18px; bottom: 16px; display: flex; align-items: center; gap: 8px; }
.slider-count { position: absolute; z-index: 3; right: 18px; top: 50%; transform: translateY(-50%); font-size: 12px; font-weight: 700; color: #fff; background: rgba(0, 0, 0, .45); padding: 3px 10px; border-radius: 999px; }
.slider-btn { width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(0, 0, 0, .5); color: #fff; cursor: pointer; display: grid; place-items: center; }
.slider-btn:hover { background: var(--accent); }
.slider-dots { position: absolute; z-index: 3; left: 50%; bottom: 18px; transform: translateX(-50%); display: flex; gap: 6px; }
.slider-dots button { width: 8px; height: 8px; padding: 0; border-radius: 99px; border: 0; background: rgba(255, 255, 255, .35); cursor: pointer; transition: width .25s; }
.slider-dots button[aria-current="true"] { width: 22px; background: #fff; }

/* ============================== Cards ============================== */
.row-6 { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 16px; }
.card { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: transform .2s, border-color .2s; }
.card:hover { transform: translateY(-3px); border-color: var(--surface-3); }
.card-cover { position: relative; display: block; aspect-ratio: 3 / 3.4; background: var(--surface-2); overflow: hidden; }
.card-cover img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s; }
.card:hover .card-cover img { transform: scale(1.05); }
.card-body { padding: 10px 12px 12px; display: grid; gap: 3px; }
.card-title { font-weight: 700; font-size: 14px; line-height: 1.3; }
.card-meta { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); }
.card-meta .icon { width: 14px; height: 14px; color: var(--star); }
.card-sub { font-size: 11.5px; color: var(--muted); }
.rank {
	position: absolute; top: 8px; left: 8px; z-index: 1; min-width: 26px; height: 26px; padding: 0 6px;
	display: grid; place-items: center; border-radius: 7px; font-weight: 800; font-size: 13px; color: #fff;
	background: var(--accent); box-shadow: 0 3px 10px rgba(0, 0, 0, .35);
}
.rank.r2 { background: #ff7a2f; } .rank.r3 { background: #e8a312; } .rank.r4 { background: #3a7bfd; } .rank.r5 { background: #10b981; } .rank.r6 { background: #8b5cf6; }
.type-badge { position: absolute; top: 8px; right: 8px; z-index: 1; padding: 2px 8px; border-radius: 6px; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; background: rgba(0, 0, 0, .65); color: #fff; }
.type-badge.manhwa { background: #2b6cf0; } .type-badge.manhua { background: #0f9f6e; } .type-badge.manga { background: var(--accent); }

/* Update card (thumbnail lebar + badge chapter) */
.card-update .card-cover { aspect-ratio: 16 / 9.5; }
.card-update .card-cover img { object-position: center 20%; }
.ch-badge { position: absolute; top: 8px; right: 8px; z-index: 1; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 800; color: #fff; background: #2b6cf0; box-shadow: 0 3px 10px rgba(0, 0, 0, .3); }
.card-update .card-body { gap: 1px; padding: 9px 11px 11px; }
.card-update .card-title { font-size: 13.5px; }
.card-update .ch { font-size: 12.5px; color: var(--text-2); }
.card-update .ch:hover { color: var(--accent-2); }

/* Genre tiles */
.genre-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.genre-tile {
	--c1: #e11d48; --c2: #7f1d3a;
	position: relative; display: flex; align-items: center; gap: 12px; padding: 12px 16px; min-height: 58px;
	border-radius: 12px; overflow: hidden; color: #fff;
	background: linear-gradient(110deg, var(--c1), var(--c2));
}
.genre-tile > * { position: relative; z-index: 1; }
.genre-tile .g-bg { position: absolute; z-index: 0; top: 0; right: 0; width: 70%; height: 100%; object-fit: cover; object-position: center 20%; opacity: .38; mix-blend-mode: luminosity; -webkit-mask-image: linear-gradient(90deg, transparent, #000 60%); mask-image: linear-gradient(90deg, transparent, #000 60%); }
.genre-tile:hover { color: #fff; filter: brightness(1.12); }
.genre-tile .g-ico { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: rgba(255, 255, 255, .22); flex: none; }
.genre-tile .g-ico .icon { width: 18px; height: 18px; }
.genre-tile b { display: block; font-size: 14px; line-height: 1.2; }
.genre-tile small { opacity: .85; font-size: 12px; }
.genre-tile.rose { --c1: #e11d48; --c2: #7c1238; } .genre-tile.emerald { --c1: #059669; --c2: #064e3b; }
.genre-tile.amber { --c1: #d97706; --c2: #78350f; } .genre-tile.violet { --c1: #7c3aed; --c2: #3b1a7a; }
.genre-tile.sky { --c1: #2563eb; --c2: #1e3a8a; } .genre-tile.crimson { --c1: #b91c1c; --c2: #5a0f12; }
.genre-tile.pink { --c1: #db2777; --c2: #831843; } .genre-tile.blue { --c1: #0284c7; --c2: #0c4a6e; }
.genre-tile.teal { --c1: #0d9488; --c2: #134e4a; } .genre-tile.orange { --c1: #ea580c; --c2: #7c2d12; }

/* ============================== Rail (kolom kanan) ============================== */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px; }
.panel .section-head { margin-bottom: 10px; }
.panel .section-head h2 { font-size: 17px; }
.top-list, .mini-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.top-list li { display: flex; align-items: center; gap: 12px; padding: 8px 4px; border-radius: 10px; }
.top-list li:hover { background: var(--surface-2); }
.top-num { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--surface-3); font-weight: 800; font-size: 13px; flex: none; }
.top-list li:hover .top-num { background: var(--accent); color: #fff; }
.thumb { width: 50px; height: 58px; border-radius: 8px; object-fit: cover; flex: none; background: var(--surface-2); }
.mini-list .thumb { width: 42px; height: 42px; }
.list-body { min-width: 0; display: grid; gap: 1px; }
.list-title { font-weight: 700; font-size: 14px; }
.list-sub { font-size: 12px; color: var(--muted); }
.list-meta { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-2); }
.list-meta .icon { width: 13px; height: 13px; color: var(--star); }
.mini-list li { display: flex; align-items: center; gap: 12px; padding: 7px 4px; border-radius: 10px; }
.mini-list li:hover { background: var(--surface-2); }
.promo-card {
	position: relative; overflow: hidden; border-radius: 14px; padding: 22px 20px; border: 1px solid var(--border);
	background: radial-gradient(90% 120% at 100% 0%, rgba(80, 110, 255, .35), transparent 60%), radial-gradient(80% 90% at 0% 100%, rgba(255, 45, 99, .25), transparent 60%), var(--surface);
}
.promo-card h2 { font-size: 19px; font-weight: 800; }
.promo-card p { color: var(--text-2); font-size: 13px; }
.promo-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.promo-actions .btn { min-height: 40px; background: #000; color: #fff; border-color: #333; }
:root[data-theme="light"] .promo-actions .btn { background: #111; }

/* ============================== Continue reading ============================== */
.continue { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.continue a { scroll-snap-align: start; flex: 0 0 250px; display: flex; gap: 10px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 8px; }
.continue img { width: 44px; height: 56px; object-fit: cover; border-radius: 8px; }
.continue .t { font-weight: 700; font-size: 13px; line-height: 1.3; }
.continue .m { font-size: 12px; color: var(--accent-2); }
[data-continue]:empty { display: none; }

/* ============================== Detail komik ============================== */
.detail-hero { position: relative; border-radius: 16px; overflow: hidden; background: var(--surface); border: 1px solid var(--border); }
.detail-hero-bg { position: absolute; inset: -20px; background-size: cover; background-position: center; filter: blur(30px) saturate(1.3) brightness(.45); transform: scale(1.1); }
.detail-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8, 11, 24, .35), rgba(8, 11, 24, .92)); }
.detail-inner { position: relative; z-index: 1; display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 26px; padding: 26px; color: #fff; }
.detail-cover img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 12px; box-shadow: 0 16px 40px rgba(0, 0, 0, .5); }
.detail-inner h1 { font-size: clamp(24px, 3vw, 36px); font-weight: 800; margin-bottom: 4px; }
.alt-title { color: #c3cadb; margin-bottom: 12px; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 12.5px; font-weight: 600; padding: 4px 11px; border-radius: 999px; background: rgba(255, 255, 255, .1); color: #fff; }
.chip:hover { background: var(--accent); color: #fff; }
.info { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px 18px; margin: 16px 0; }
.info dt { color: #aab3c7; font-size: 12px; }
.info dd { margin: 0; font-weight: 700; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.breadcrumb { font-size: 13px; color: #aab3c7; margin-bottom: 10px; }
.breadcrumb a:hover { color: #fff; }
.breadcrumb span[aria-hidden] { margin: 0 6px; }
.synopsis { color: var(--text-2); max-width: 78ch; }
.chapter-panel header { display: flex; gap: 10px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 12px; }
.chapter-panel header h2 { display: flex; align-items: center; gap: 10px; font-size: 18px; margin: 0; }
.chapter-tools { display: flex; gap: 8px; }
.chapter-tools input { height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); width: 170px; }
.chapter-list { list-style: none; margin: 0; padding: 0; max-height: 620px; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px; scrollbar-width: thin; }
.chapter-list a { display: flex; justify-content: space-between; gap: 10px; padding: 11px 13px; border-radius: 10px; background: var(--surface-2); border: 1px solid transparent; }
.chapter-list a:hover { border-color: var(--accent); color: var(--text); }
.chapter-list .t { font-weight: 700; white-space: nowrap; }
.chapter-list time { color: var(--muted); font-size: 12px; white-space: nowrap; }
.chapter-list a.read .t { color: var(--muted); font-weight: 500; }
.chapter-list a.last { border-color: var(--accent); background: var(--accent-soft); }

/* ============================== Arsip ============================== */
.page-title { font-size: 24px; font-weight: 800; margin: 0 0 16px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.filters select { height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); }
.pagination .nav-links { display: flex; justify-content: center; gap: 6px; margin: 28px 0 0; flex-wrap: wrap; }
.pagination .page-numbers { min-width: 40px; height: 40px; display: grid; place-items: center; padding: 0 10px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); font-weight: 600; }
.pagination .current { background: var(--accent); color: #fff; border-color: var(--accent); }
.empty { text-align: center; padding: 60px 16px; color: var(--muted); }
.entry-content { background: var(--surface); padding: 20px; border-radius: var(--radius); border: 1px solid var(--border); margin-bottom: 20px; }

/* ============================== Footer ============================== */
.site-footer {
	display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; padding: 16px 24px;
	border-top: 1px solid var(--border); background: var(--bg); color: var(--muted); font-size: 12.5px;
}
.footer-tagline { color: var(--text-2); }
.footer-copy { font-size: 12px; }
.site-footer .brand { min-width: 0; font-size: 18px; color: var(--text); }
.site-footer .brand-mark { width: 30px; height: 30px; font-size: 15px; }
.footer-nav { margin-left: auto; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; }
.footer-nav a:hover, .footer-social a:hover { color: var(--text); }
.footer-nav li { list-style: none; }
.footer-social { display: flex; gap: 14px; }

/* ============================== Reader ============================== */
body.reader { background: #07090f; color: #e7e9ee; }
.reader-bar {
	position: sticky; top: 0; z-index: 60; display: flex; align-items: center; gap: 10px; padding: 8px 12px;
	background: rgba(10, 13, 22, .92); backdrop-filter: blur(10px); border-bottom: 1px solid #1d2335; transition: transform .25s;
}
.reader-bar.hide { transform: translateY(-100%); }
.reader-bar .title { min-width: 0; flex: 1; }
.reader-bar .title a { display: block; font-size: 12px; color: #98a1b6; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reader-bar .title h1 { margin: 0; font-size: 15px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.reader-bar select, .reader-nav select { max-width: 160px; height: 38px; padding: 0 10px; border-radius: 10px; border: 1px solid #262d42; background: #121827; color: #e7e9ee; }
.reader-bar .icon-btn { color: #e7e9ee; }
.reader-bar .icon-btn:hover { background: #1a2133; }
.reader-progress { position: fixed; top: 0; left: 0; height: 3px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); width: 0; z-index: 70; }
.reader-pages { max-width: 800px; margin: 0 auto; }
.reader-pages.fit-width { max-width: 100%; }
.reader-pages img { width: 100%; height: auto; min-height: 200px; background: #10131b; }
.reader-pages img.loaded { min-height: 0; }
.reader-empty { text-align: center; padding: 80px 16px; color: #98a1b6; }
.spinner { display: inline-block; width: 34px; height: 34px; border-radius: 50%; border: 3px solid #262d42; border-top-color: var(--accent); animation: kr-spin .8s linear infinite; }
@keyframes kr-spin { to { transform: rotate(360deg); } }
.reader-nav { display: flex; justify-content: center; align-items: center; gap: 10px; flex-wrap: wrap; padding: 24px 16px 40px; }
.reader-nav .btn { background: #121827; border-color: #262d42; color: #e7e9ee; }
.reader-nav .btn-primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-color: transparent; color: #fff; }
.reader-hint { text-align: center; color: #6c7488; font-size: 12px; padding-bottom: 24px; }

/* ============================== Responsive ============================== */
@media (max-width: 1440px) {
	.row-6 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
	.row-6 > :nth-child(n+6) { display: none; }
}
@media (max-width: 1280px) {
	.home-grid { grid-template-columns: minmax(0, 1fr); }
	.rail { position: static; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
	.row-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
	.row-6 > :nth-child(n+6) { display: block; }
}
@media (max-width: 1024px) {
	.shell { grid-template-columns: minmax(0, 1fr); }
	.menu-toggle { display: inline-grid; }
	.brand { min-width: 0; }
	.sidebar {
		position: fixed; top: 0; left: 0; bottom: 0; height: 100vh; width: 280px; z-index: 80;
		transform: translateX(-100%); transition: transform .25s ease; border-right: 1px solid var(--border); box-shadow: var(--shadow);
	}
	.sidebar.open { transform: none; }
	.sidebar-head { display: flex; align-items: center; justify-content: space-between; margin: -4px 0 12px 14px; font-weight: 800; font-size: 18px; }
	.row-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
	.genre-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.account-name { display: none; }
}
@media (max-width: 760px) {
	.topbar { gap: 8px; padding: 0 10px; }
	.brand-name { display: none; }
	.topbar .brand { display: none; }
	.topbar .icon-btn { width: 36px; height: 36px; }
	.topbar-actions { gap: 2px; }
	.account { padding: 2px; }
	.account-caret { display: none; }
	.top-search input { padding-right: 10px; }
	.search-submit { display: none; }
	.notif-panel { position: fixed; left: 10px; right: 10px; top: calc(var(--topbar) + 6px); width: auto; }
	.page-main { padding: 14px 16px 28px; }
	.slide-body { max-width: 100%; min-height: 0; padding: 236px 20px 44px; justify-content: flex-start; }
	.slide::after { background: linear-gradient(0deg, rgba(8, 11, 24, .98) 52%, rgba(8, 11, 24, .1) 100%); }
	.slide-art { width: 100%; bottom: auto; height: 300px; -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent 100%); mask-image: linear-gradient(180deg, #000 55%, transparent 100%); }
	.slider-count { top: 14px; transform: none; }
	.slide-title { font-size: 26px; }
	.slide-text { -webkit-line-clamp: 2; }
	.slide-actions .btn { flex: 1 1 0; padding: 0 12px; }
	.slider-ui { display: none; }
	.slider-dots { bottom: 10px; }
	.row-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.row-6 > :nth-child(n+5) { display: none; }
	.grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
	.detail-inner { grid-template-columns: 1fr; text-align: center; padding: 20px; }
	.detail-cover { max-width: 190px; margin: 0 auto; }
	.detail-inner .tags, .detail-inner .actions { justify-content: center; }
	.info { text-align: left; }
	.footer-nav { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition: none !important; animation: none !important; }
}

/* ============================== Akun: masuk & daftar ============================== */
.btn-sm { min-height: 34px; padding: 0 14px; border-radius: 9px; font-size: 13px; }
.auth-wrap { display: grid; place-items: start center; padding: 24px 0 40px; }
.auth-card { width: 100%; max-width: 420px; padding: 28px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); }
.auth-head { text-align: center; margin-bottom: 18px; }
.auth-logo { width: 56px; height: 56px; margin: 0 auto 12px; border-radius: 16px; }
.auth-head h1 { font-size: 24px; font-weight: 800; margin-bottom: 4px; }
.auth-head p { color: var(--muted); margin: 0; }
.auth-form { display: grid; gap: 14px; }
.field { display: grid; gap: 6px; }
.field > span:first-child { font-size: 13px; font-weight: 600; color: var(--text-2); }
.field input { width: 100%; height: 44px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); }
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field input:user-invalid { border-color: #f87171; }
.field small { color: var(--muted); font-size: 12px; }
.pw-wrap { position: relative; display: block; }
.pw-wrap input { padding-right: 46px; }
.pw-toggle { position: absolute; right: 4px; top: 4px; width: 36px; height: 36px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; }
.pw-toggle:hover, .pw-toggle[aria-pressed="true"] { color: var(--text); background: var(--surface-3); }
.auth-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; }
.auth-row a, .auth-switch a { color: var(--accent-2); font-weight: 600; }
.check { display: inline-flex; align-items: center; gap: 8px; color: var(--text-2); cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }
.auth-alert { margin-bottom: 14px; padding: 10px 14px; border-radius: 10px; background: rgba(248, 113, 113, .1); border: 1px solid rgba(248, 113, 113, .4); color: #fecaca; font-size: 13px; }
:root[data-theme="light"] .auth-alert { color: #b91c1c; }
.auth-alert p { margin: 2px 0; }
.auth-switch { text-align: center; margin: 18px 0 0; color: var(--muted); font-size: 13.5px; }
/* jebakan bot: di luar layar, bukan display:none (sebagian bot melewati field yang display:none) */
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Menu akun */
.account-menu { position: relative; }
button.account { border: 0; background: transparent; color: inherit; cursor: pointer; font: inherit; }
.account-panel { position: absolute; right: 0; top: calc(100% + 8px); width: 240px; padding: 8px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); z-index: 90; display: grid; gap: 2px; }
.account-who { margin: 4px 8px 8px; display: grid; }
.account-who span { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; }
.account-panel a { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 9px; color: var(--text-2); font-weight: 500; }
.account-panel a:hover { background: var(--surface-2); color: var(--text); }
.account-panel .icon { width: 18px; height: 18px; }
.sync-note { margin: 0 0 14px; padding: 10px 14px; border-radius: 10px; background: var(--accent-soft); color: var(--text-2); font-size: 13px; }
@media (max-width: 760px) {
	.register-btn { display: none; }
	.auth-card { padding: 22px 18px; }
}
.guest-card { margin: 8px auto 0; text-align: center; }
.guest-card h2 { font-size: 20px; font-weight: 800; margin-bottom: 4px; }
.notif-login { margin: 4px 4px 2px; }

/* ============================== Iklan ============================== */
.ad-slot { margin: 18px auto; text-align: center; max-width: 100%; overflow: hidden; }
.ad-slot .ad-body { display: flex; justify-content: center; }
.ad-slot .ad-body > * { max-width: 100%; }
.ad-label { display: block; margin-bottom: 4px; font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.page-main > .ad-header_below { margin-top: 0; }
.rail .ad-slot { margin: 0; }
.ad-placeholder { display: grid; place-items: center; gap: 2px; width: 100%; min-height: 90px; padding: 12px; border: 2px dashed var(--accent); border-radius: 12px; background: var(--accent-soft); color: var(--text); font-weight: 700; font-size: 13px; }
.ad-placeholder small { font-weight: 500; color: var(--muted); font-family: ui-monospace, monospace; }
.rail .ad-placeholder, .ad-detail .ad-placeholder { min-height: 250px; }
body.reader .ad-slot { margin: 14px auto; max-width: 800px; }
body.reader .ad-label { color: #6c7488; }
.ad-sticky { position: fixed; left: 0; right: 0; bottom: 0; z-index: 75; display: none; justify-content: center; padding: 6px 40px 6px 8px; background: rgba(10, 13, 22, .96); border-top: 1px solid var(--border); }
.ad-sticky .ad-slot { margin: 0; }
.ad-sticky .ad-label { display: none; }
.ad-sticky-close { position: absolute; top: 6px; right: 6px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: var(--surface-3); color: var(--text); font-size: 18px; line-height: 1; cursor: pointer; }
@media (max-width: 760px) {
	.ad-sticky:not([hidden]) { display: flex; }
	body.has-sticky-ad { padding-bottom: 72px; }
}
.interstitial { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px; background: rgba(4, 6, 12, .88); backdrop-filter: blur(4px); }
.interstitial-box { position: relative; width: min(100%, 520px); padding: 48px 16px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); text-align: center; }
.interstitial-close { position: absolute; top: 8px; right: 8px; min-height: 34px; font-size: 13px; }
.interstitial-close:disabled { opacity: .6; cursor: default; }

/* ============================== Toast ============================== */
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 210; transform: translateX(-50%); max-width: calc(100% - 32px); padding: 12px 16px; border-radius: 12px; background: var(--surface-3); color: var(--text); box-shadow: var(--shadow); font-size: 13.5px; transition: opacity .4s; }
.toast a { color: var(--accent-2); font-weight: 700; }
.toast.out { opacity: 0; }
body.has-sticky-ad .toast { bottom: 84px; }

/* ============================== Premium ============================== */
.premium-badge { display: inline-flex; align-items: center; margin-left: 6px; padding: 1px 7px; border-radius: 6px; font-size: 10.5px; font-weight: 800; letter-spacing: .03em; color: #fff; background: linear-gradient(135deg, var(--accent), #ff8a3d); vertical-align: middle; }
.premium-badge.is-lifetime { background: linear-gradient(135deg, #f5b301, #ff7a2f); color: #2a1600; }
.account-plan { color: var(--text-2) !important; }
.account-panel a.account-upgrade { color: #ffb347; font-weight: 700; }
.premium-page { max-width: 1100px; }
.premium-hero { text-align: center; margin: 8px 0 24px; }
.premium-hero .pill { gap: 6px; }
.premium-hero .pill .icon { width: 14px; height: 14px; }
.premium-hero h1 { font-size: clamp(24px, 3vw, 34px); font-weight: 800; }
.premium-hero p { color: var(--text-2); }
.premium-status { margin-top: 10px; }
.plan-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.plan { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 22px 18px 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--border); }
.plan h2 { font-size: 16px; margin: 0; }
.plan-price { font-size: 26px; font-weight: 800; margin: 4px 0 0; }
.plan-term, .plan-save { margin: 0; color: var(--muted); font-size: 13px; }
.plan-save { color: var(--accent-2); }
.plan .btn { margin-top: auto; }
.plan.is-best { border: 2px solid #f5b301; background: radial-gradient(120% 80% at 50% 0%, rgba(245, 179, 1, .14), transparent 60%), var(--surface); }
.plan-flag { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); padding: 2px 12px; border-radius: 999px; background: #f5b301; color: #2a1600; font-size: 11.5px; font-weight: 800; white-space: nowrap; }
.premium-perks { margin-top: 22px; }
.premium-perks ul { list-style: none; padding: 0; margin: 0 0 18px; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.premium-perks li { display: flex; gap: 10px; align-items: center; }
.premium-perks li .icon { color: #f5b301; width: 18px; height: 18px; }
.compare { width: 100%; border-collapse: collapse; font-size: 14px; }
.compare th, .compare td { padding: 10px 12px; border-bottom: 1px solid var(--border); text-align: center; }
.compare th:first-child, .compare td:first-child { text-align: left; }
.premium-note { margin: 14px 0 0; color: var(--muted); font-size: 13px; }
@media (max-width: 1024px) { .plan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .plan-grid { grid-template-columns: 1fr; } }

/* ============================== Pembayaran (/bayar/) ============================== */
.pay-page { max-width: 880px; }
.pay-hero { text-align: center; margin: 8px 0 24px; }
.pay-hero .pill { gap: 6px; }
.pay-hero .pill .icon { width: 14px; height: 14px; }
.pay-hero h1 { font-size: clamp(22px, 3vw, 30px); font-weight: 800; }
.pay-hero p { color: var(--text-2); }
.tx-code { font-size: .75em; padding: 3px 10px; border-radius: 8px; background: var(--accent-soft); color: var(--accent-2); letter-spacing: 2px; }
.pay-panel + .pay-panel { margin-top: 16px; }
.pay-panel h2 { font-size: 17px; margin: 0 0 10px; }
.pay-plans { margin-bottom: 10px; }
.pay-plans .plan h3 { font-size: 16px; margin: 0; }
.pay-plans .plan .btn { width: 100%; }
.pay-hint { color: var(--muted); font-size: 13px; margin: 6px 0 0; }
.pay-amount-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.pay-label { margin: 0; color: var(--muted); font-size: 13px; }
.pay-amount { margin: 2px 0 0; font-size: 34px; font-weight: 800; letter-spacing: .5px; }
.tx-countdown { color: var(--accent-2); font-weight: 600; }
.pay-qr-box { margin-top: 18px; text-align: center; }
.pay-qr { display: inline-flex; padding: 14px; border-radius: 16px; background: #fff; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); }
.pay-qr svg { width: 220px; height: 220px; display: block; }
.pay-qr-box .pay-hint { margin-top: 12px; }
.pay-instructions { margin-top: 10px; text-align: left; color: var(--text-2); font-size: 13.5px; }
.pay-upload { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 12px; }
.pay-file { flex: 1 1 240px; display: flex; align-items: center; gap: 10px; padding: 0 14px; height: 46px; border: 1px dashed var(--border); border-radius: 12px; background: var(--surface-2); cursor: pointer; overflow: hidden; }
.pay-file input[type="file"] { display: none; }
.pay-file span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); font-size: 13px; }
.pay-preview { max-width: 260px; max-height: 200px; border-radius: 12px; border: 1px solid var(--border); }
.pay-preview.is-shown { display: block; margin: 12px 0; }
.pay-cancel { margin-top: 12px; }
.pay-note { padding: 10px 14px; border-radius: 10px; background: var(--accent-soft); }
.pay-back { margin: 18px 0 0; color: var(--muted); }
.tx-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.tx-table th, .tx-table td { padding: 9px 10px; border-bottom: 1px solid var(--border); text-align: left; }
.tx-chip { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.tx-pending { background: rgba(245, 179, 1, .16); color: #f5b301; }
.tx-review { background: rgba(56, 132, 255, .16); color: #6ea8ff; }
.tx-approved { background: rgba(52, 199, 123, .16); color: #34c77b; }
.tx-rejected { background: var(--accent-soft); color: var(--accent-2); }
.tx-canceled, .tx-expired { background: rgba(134, 144, 168, .16); color: var(--muted); }
.notice-ok-line, .notice-error-line { padding: 10px 16px; border-radius: 12px; margin-bottom: 16px; font-size: 14px; }
.notice-ok-line { background: rgba(52, 199, 123, .14); color: #34c77b; }
.notice-error-line { background: var(--accent-soft); color: var(--accent-2); }
@media (max-width: 640px) { .pay-amount { font-size: 27px; } .pay-qr svg { width: 180px; height: 180px; } }
.ad-frame { display: block; width: 100%; min-height: 50px; border: 0; background: transparent; }
