/* ==========================================================================
   OtakuDesu Stream — stylesheet utama
   Desain: gelap, modern, kartu bersudut lembut, aksen biru-ungu.
   ========================================================================== */

:root {
  --accent: #5b8cff;
  --accent-2: #a06bff;
  --accent-soft: rgba(91, 140, 255, 0.14);
  --bg: #0a0c10;
  --bg-1: #0e1116;
  --bg-2: #131820;
  --bg-3: #1a212b;
  --line: #222b37;
  --line-soft: #1a212b;
  --text: #e9eef6;
  --text-2: #a8b4c4;
  --text-3: #6d7a8c;
  --danger: #ff6b7d;
  --ok: #3ddc97;
  --warn: #ffc857;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 10px 34px -14px rgba(0, 0, 0, 0.85);
  --header-h: 62px;
  --maxw: 1400px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

[data-theme='light'] {
  --bg: #f5f7fb;
  --bg-1: #ffffff;
  --bg-2: #ffffff;
  --bg-3: #eef2f8;
  --line: #dfe6f0;
  --line-soft: #e9eef6;
  --text: #10151d;
  --text-2: #4a5768;
  --text-3: #7b8798;
  --accent-soft: rgba(91, 140, 255, 0.12);
  --shadow: 0 10px 30px -18px rgba(20, 35, 70, 0.35);
}

* { box-sizing: border-box; }

/* [hidden] harus mengalahkan aturan display lain (mis. .mobile-nav). */
[hidden] { display: none !important; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
a:hover { color: var(--accent); }

img { max-width: 100%; display: block; }

h1, h2, h3, h4 { margin: 0 0 .5em; line-height: 1.25; font-weight: 700; letter-spacing: -0.015em; }
h1 { font-size: clamp(1.45rem, 3.2vw, 2.05rem); }
h2 { font-size: clamp(1.15rem, 2.2vw, 1.45rem); }
h3 { font-size: 1.05rem; }

p { margin: 0 0 1em; }

::selection { background: var(--accent); color: #fff; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ---------- Layout ---------- */
.shell { max-width: var(--maxw); margin: 0 auto; padding: 0 18px; }

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 26px;
  align-items: start;
  padding: 26px 0 60px;
}

@media (max-width: 1080px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { order: 2; }
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--bg-1) 88%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  height: var(--header-h);
}

.brand { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.brand-logo {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid; place-items: center;
  font-weight: 800; font-size: 15px; color: #fff;
  box-shadow: 0 4px 16px -4px var(--accent);
}
.brand-logo img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
.brand-name { font-weight: 800; font-size: 16px; letter-spacing: -0.02em; white-space: nowrap; }
.brand-name span { color: var(--accent); }

.main-nav { display: flex; gap: 2px; margin-left: 8px; }
.main-nav a {
  padding: 8px 13px; border-radius: 9px; font-size: 14px; font-weight: 550;
  color: var(--text-2); transition: .16s;
}
.main-nav a:hover { background: var(--bg-3); color: var(--text); }
.main-nav a.active { background: var(--accent-soft); color: var(--accent); }

.header-search { margin-left: auto; flex: 1; max-width: 380px; }
.search-form { position: relative; display: flex; }
.search-form input {
  width: 100%; height: 40px; padding: 0 42px 0 15px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px;
  color: var(--text); font-size: 14px; font-family: inherit;
  transition: .18s;
}
.search-form input::placeholder { color: var(--text-3); }
.search-form input:focus {
  outline: none; border-color: var(--accent); background: var(--bg-1);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.search-form button {
  position: absolute; right: 4px; top: 4px; bottom: 4px; width: 33px;
  border: 0; border-radius: 50%; background: transparent; color: var(--text-2);
  cursor: pointer; display: grid; place-items: center; transition: .15s;
}
.search-form button:hover { background: var(--accent); color: #fff; }

.icon-btn {
  width: 40px; height: 40px; flex-shrink: 0;
  display: grid; place-items: center; border-radius: 10px;
  background: var(--bg-2); border: 1px solid var(--line);
  color: var(--text-2); cursor: pointer; transition: .15s;
}
.icon-btn:hover { background: var(--bg-3); color: var(--text); }

.nav-toggle { display: none; }

@media (max-width: 900px) {
  .main-nav { display: none; }
  .header-search { max-width: none; }
  .brand-name { display: none; }
  .nav-toggle { display: grid; }
  .mobile-nav {
    display: block; border-top: 1px solid var(--line);
    background: var(--bg-1); padding: 10px 18px 14px;
  }
  .mobile-nav a {
    display: block; padding: 10px 4px; font-size: 14.5px; color: var(--text-2);
    border-bottom: 1px solid var(--line-soft);
  }
  .mobile-nav a:last-child { border-bottom: 0; }
}
@media (min-width: 901px) { .mobile-nav { display: none !important; } }

/* ---------- Notifikasi ---------- */
.announce {
  display: flex; gap: 10px; align-items: center;
  padding: 11px 15px; margin: 14px 0 0;
  background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 32%, transparent);
  border-radius: var(--radius-sm); font-size: 14px; color: var(--text);
}
.announce svg { flex-shrink: 0; color: var(--accent); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  border-radius: 18px; margin-bottom: 26px;
  border: 1px solid var(--line);
  background: var(--bg-1);
  box-shadow: var(--shadow);
}

.hero-track { display: flex; transition: transform .55s cubic-bezier(.4,0,.2,1); }
.hero-slide { min-width: 100%; position: relative; }

/* Poster anime selalu portrait, jadi area hero memakai poster blur sebagai
   latar dan poster tajam sebagai fokus — bukan memaksa crop 21:9. */
.hero-media { position: relative; aspect-ratio: 16/7; min-height: 260px; overflow: hidden; }
@media (max-width: 860px) { .hero-media { aspect-ratio: 4/3; min-height: 300px; } }
@media (max-width: 520px) { .hero-media { aspect-ratio: 5/4; min-height: 340px; } }

.hero-bg {
  position: absolute; inset: -12%;
  width: 124%; height: 124%; object-fit: cover;
  filter: blur(34px) saturate(150%) brightness(.5);
  transform: scale(1.06);
}
.hero-media::after {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(120% 90% at 12% 50%, rgba(8,10,14,.5) 0%, rgba(8,10,14,.82) 55%, rgba(8,10,14,.96) 100%),
    linear-gradient(90deg, rgba(8,10,14,.94) 0%, rgba(8,10,14,.55) 45%, rgba(8,10,14,.72) 100%);
}

.hero-fg {
  position: absolute; inset: 0; z-index: 2;
  display: flex; align-items: center; gap: clamp(16px, 2.6vw, 32px);
  padding: clamp(18px, 3vw, 38px);
}
.hero-poster {
  width: clamp(104px, 15vw, 172px); flex-shrink: 0;
  aspect-ratio: 3/4; border-radius: 12px; overflow: hidden;
  border: 1px solid rgba(255,255,255,.16);
  box-shadow: 0 18px 44px -16px rgba(0,0,0,.95);
}
.hero-poster img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 620px) { .hero-poster { display: none; } }

.hero-body {
  display: flex; flex-direction: column; justify-content: center;
  max-width: 620px; min-width: 0; position: static;
  padding: 0; inset: auto;
}
.hero-tag {
  display: inline-flex; align-items: center; gap: 6px; align-self: flex-start;
  padding: 4px 11px; border-radius: 999px; margin-bottom: 12px;
  background: var(--accent); color: #fff; font-size: 11.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .07em;
}
.hero-title { font-size: clamp(1.3rem, 3.4vw, 2.1rem); margin-bottom: 8px; color: #fff; }
.hero-meta { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; font-size: 12.5px; color: #c4d0e0; }
.hero-desc {
  font-size: 13.5px; color: #b3c1d3; margin-bottom: 16px;
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.hero-actions { display: flex; gap: 9px; flex-wrap: wrap; }

.hero-nav {
  position: absolute; bottom: 18px; right: 18px; z-index: 3;
  display: flex; gap: 7px;
}
.hero-dot {
  width: 8px; height: 8px; border-radius: 50%; padding: 0;
  background: rgba(255,255,255,.35); border: 0; cursor: pointer; transition: .2s;
}
.hero-dot.on { background: #fff; width: 22px; border-radius: 4px; }

/* ---------- Tombol ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 40px; padding: 0 17px; border-radius: 10px; border: 1px solid transparent;
  font-size: 14px; font-weight: 600; font-family: inherit; cursor: pointer;
  transition: .16s; white-space: nowrap;
}
.btn svg { flex-shrink: 0; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 20px -8px var(--accent); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, #fff); color: #fff; transform: translateY(-1px); }
.btn-ghost { background: rgba(255,255,255,.08); color: var(--text); border-color: rgba(255,255,255,.14); }
.btn-ghost:hover { background: rgba(255,255,255,.15); color: var(--text); }
.btn-soft { background: var(--bg-3); color: var(--text); border-color: var(--line); }
.btn-soft:hover { background: var(--bg-2); color: var(--accent); border-color: var(--accent); }
.btn-sm { height: 33px; padding: 0 12px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

/* ---------- Judul seksi ---------- */
.section-head {
  display: flex; align-items: center; gap: 12px;
  margin: 30px 0 15px;
}
.section-head h2 { margin: 0; display: flex; align-items: center; gap: 9px; }
.section-head h2::before {
  content: ''; width: 4px; height: 19px; border-radius: 3px;
  background: linear-gradient(180deg, var(--accent), var(--accent-2));
}
.section-head .more { margin-left: auto; font-size: 13.5px; color: var(--text-2); font-weight: 550; display: flex; align-items: center; gap: 4px; }
.section-head .more:hover { color: var(--accent); }

/* ---------- Grid kartu ---------- */
.grid-cards {
  display: grid; gap: 15px;
  grid-template-columns: repeat(auto-fill, minmax(146px, 1fr));
}
@media (max-width: 480px) { .grid-cards { grid-template-columns: repeat(2, 1fr); gap: 12px; } }

.card {
  position: relative; display: block; border-radius: var(--radius);
  background: var(--bg-1); border: 1px solid var(--line);
  overflow: hidden; transition: .2s;
}
.card:hover {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  transform: translateY(-3px);
  box-shadow: 0 14px 30px -16px rgba(0,0,0,.9);
}

.card-thumb { position: relative; aspect-ratio: 3/4; overflow: hidden; background: var(--bg-3); }
.card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.card:hover .card-thumb img { transform: scale(1.06); }

.card-badges { position: absolute; top: 7px; left: 7px; right: 7px; display: flex; gap: 5px; flex-wrap: wrap; }
.badge {
  padding: 3px 7px; border-radius: 6px; font-size: 10.5px; font-weight: 700;
  background: rgba(6,8,12,.82); color: #e9eef6; backdrop-filter: blur(4px);
  letter-spacing: .02em;
}
.badge-accent { background: var(--accent); color: #fff; }
.badge-score { background: rgba(6,8,12,.82); color: var(--warn); display: inline-flex; align-items: center; gap: 3px; }
.badge-ep { position: absolute; bottom: 7px; left: 7px; background: var(--accent); color: #fff; }

.card-body { padding: 9px 10px 11px; }
.card-title {
  font-size: 13px; font-weight: 600; line-height: 1.35; margin: 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  min-height: 2.7em;
}
.card-sub { margin-top: 5px; font-size: 11.5px; color: var(--text-3); display: flex; gap: 6px; flex-wrap: wrap; }

/* ---------- Sidebar ---------- */
.sidebar { display: flex; flex-direction: column; gap: 18px; position: sticky; top: calc(var(--header-h) + 18px); }
@media (max-width: 1080px) { .sidebar { position: static; } }

.widget {
  background: var(--bg-1); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
}
.widget-head {
  display: flex; align-items: center; gap: 8px;
  padding: 13px 15px; border-bottom: 1px solid var(--line);
  font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  color: var(--text-2);
}
.widget-head svg { color: var(--accent); }
.widget-body { padding: 12px 15px; }
.widget-body.flush { padding: 6px 0; }

.mini-list { display: flex; flex-direction: column; }
.mini-item {
  display: flex; gap: 11px; padding: 9px 15px; transition: .15s;
}
.mini-item:hover { background: var(--bg-3); }
.mini-thumb {
  width: 44px; height: 60px; border-radius: 7px; object-fit: cover;
  flex-shrink: 0; background: var(--bg-3);
}
.mini-meta { min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 3px; }
.mini-title {
  font-size: 12.8px; font-weight: 600; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.mini-sub { font-size: 11px; color: var(--text-3); }

.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  padding: 5px 10px; border-radius: 8px; font-size: 12px;
  background: var(--bg-3); color: var(--text-2); border: 1px solid var(--line);
  transition: .15s;
}
.tag:hover { background: var(--accent-soft); color: var(--accent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }
.tag.on { background: var(--accent); color: #fff; border-color: var(--accent); }

.schedule-day { padding: 10px 15px; border-bottom: 1px solid var(--line-soft); }
.schedule-day:last-child { border-bottom: 0; }
.schedule-day h4 { margin: 0 0 6px; font-size: 12px; color: var(--accent); text-transform: uppercase; letter-spacing: .05em; }
.schedule-day a { display: block; font-size: 12.5px; color: var(--text-2); padding: 3px 0; }
.schedule-day a:hover { color: var(--accent); }

/* ---------- Detail anime ---------- */
.anime-head {
  display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 22px;
  padding: 20px; border-radius: var(--radius); background: var(--bg-1);
  border: 1px solid var(--line); margin-bottom: 22px;
}
@media (max-width: 640px) { .anime-head { grid-template-columns: 1fr; } }

.anime-poster {
  border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 3/4;
  border: 1px solid var(--line); background: var(--bg-3);
}
.anime-poster img { width: 100%; height: 100%; object-fit: cover; }

.anime-title { margin-bottom: 10px; }
.anime-alt { font-size: 13px; color: var(--text-3); margin: -6px 0 12px; }

.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.chip {
  padding: 4px 10px; border-radius: 7px; font-size: 12px;
  background: var(--bg-3); border: 1px solid var(--line); color: var(--text-2);
}
.chip b { color: var(--text); font-weight: 600; }

.info-table { display: grid; grid-template-columns: minmax(96px, auto) 1fr; gap: 7px 14px; font-size: 13.4px; }
.info-table dt { color: var(--text-3); }
.info-table dd { margin: 0; color: var(--text); }
.info-table dd a { color: var(--accent); }

.synopsis { font-size: 14px; color: var(--text-2); line-height: 1.75; margin-top: 16px; }
.synopsis p { margin: 0 0 .8em; }

/* ---------- Daftar episode ---------- */
.ep-toolbar { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; margin-bottom: 13px; }
.ep-toolbar .spacer { flex: 1; }

.ep-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 9px; }
.ep-item {
  display: flex; align-items: center; gap: 9px;
  padding: 11px 13px; border-radius: 10px; font-size: 13.4px;
  background: var(--bg-1); border: 1px solid var(--line); color: var(--text-2);
  transition: .15s;
}
.ep-item:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.ep-item.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.ep-num {
  width: 27px; height: 27px; flex-shrink: 0; border-radius: 7px;
  background: var(--bg-3); display: grid; place-items: center;
  font-size: 11.5px; font-weight: 700; color: var(--text-2);
}
.ep-item:hover .ep-num { background: color-mix(in srgb, var(--accent) 22%, transparent); color: var(--accent); }
.ep-item.on .ep-num { background: rgba(255,255,255,.22); color: #fff; }
.ep-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Player ---------- */
.player-wrap {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: #000; border: 1px solid var(--line);
  aspect-ratio: 16/9;
}
.player-wrap video, .player-wrap iframe { width: 100%; height: 100%; display: block; border: 0; background: #000; }

.player-loading {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: #05070a; color: var(--text-2); gap: 10px; z-index: 5;
  flex-direction: column;
}
.player-loading.hide { display: none; }
.spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid var(--bg-3); border-top-color: var(--accent);
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.watermark {
  position: absolute; z-index: 6; pointer-events: none;
  padding: 5px 11px; border-radius: 7px;
  background: rgba(4, 6, 10, .55); backdrop-filter: blur(3px);
  font-size: 12px; font-weight: 700; color: #fff; letter-spacing: .03em;
  text-shadow: 0 1px 3px rgba(0,0,0,.8);
  user-select: none; white-space: nowrap;
}
.watermark a { pointer-events: auto; color: #fff; }
.wm-top-left { top: 12px; left: 12px; }
.wm-top-right { top: 12px; right: 12px; }
.wm-bottom-left { bottom: 56px; left: 12px; }
.wm-bottom-right { bottom: 56px; right: 12px; }

.player-controls {
  display: flex; gap: 9px; align-items: center; flex-wrap: wrap;
  padding: 12px 14px; background: var(--bg-1);
  border: 1px solid var(--line); border-top: 0;
  border-radius: 0 0 var(--radius) var(--radius);
  margin-bottom: 20px;
}
.ctrl-label { font-size: 12px; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; font-weight: 600; }

/* Dropdown server & kualitas */
.select-wrap { position: relative; display: inline-flex; }
.select-wrap select {
  appearance: none; height: 38px; padding: 0 34px 0 13px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 9px;
  color: var(--text); font-size: 13.5px; font-family: inherit; font-weight: 550;
  cursor: pointer; transition: .15s; min-width: 148px;
}
.select-wrap select:hover { border-color: var(--accent); }
.select-wrap select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.select-wrap::after {
  content: ''; position: absolute; right: 13px; top: 50%; width: 7px; height: 7px;
  border-right: 2px solid var(--text-3); border-bottom: 2px solid var(--text-3);
  transform: translateY(-70%) rotate(45deg); pointer-events: none;
}

/* ---------- Peringatan / status ---------- */
.notice {
  display: flex; gap: 11px; padding: 13px 15px; border-radius: var(--radius-sm);
  font-size: 13.6px; line-height: 1.6; margin-bottom: 16px;
  background: var(--bg-1); border: 1px solid var(--line); color: var(--text-2);
}
.notice svg { flex-shrink: 0; margin-top: 1px; }
.notice-warn { background: color-mix(in srgb, var(--warn) 10%, var(--bg-1)); border-color: color-mix(in srgb, var(--warn) 35%, var(--line)); }
.notice-warn svg { color: var(--warn); }
.notice-error { background: color-mix(in srgb, var(--danger) 10%, var(--bg-1)); border-color: color-mix(in srgb, var(--danger) 35%, var(--line)); }
.notice-error svg { color: var(--danger); }
.notice-ok { background: color-mix(in srgb, var(--ok) 10%, var(--bg-1)); border-color: color-mix(in srgb, var(--ok) 32%, var(--line)); }
.notice-ok svg { color: var(--ok); }

/* ---------- Breadcrumb ---------- */
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; font-size: 12.5px; color: var(--text-3); margin-bottom: 16px; }
.crumbs a { color: var(--text-2); }
.crumbs a:hover { color: var(--accent); }
.crumbs .sep { opacity: .5; }

/* ---------- Pagination ---------- */
.pager { display: flex; gap: 7px; justify-content: center; flex-wrap: wrap; margin: 30px 0 0; }
.pager a, .pager span {
  min-width: 38px; height: 38px; padding: 0 12px; border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 13.6px; font-weight: 600;
  background: var(--bg-1); border: 1px solid var(--line); color: var(--text-2);
  transition: .15s;
}
.pager a:hover { border-color: var(--accent); color: var(--accent); }
.pager .current { background: var(--accent); border-color: var(--accent); color: #fff; }
.pager .dots { background: transparent; border-color: transparent; color: var(--text-3); }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 5px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tabs a {
  padding: 10px 15px; font-size: 13.6px; font-weight: 600; color: var(--text-2);
  border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; transition: .15s;
}
.tabs a:hover { color: var(--text); }
.tabs a.on { color: var(--accent); border-bottom-color: var(--accent); }

/* ---------- Download ---------- */
.dl-group { margin-bottom: 16px; }
.dl-group h4 { font-size: 12.5px; color: var(--accent); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 8px; }
.dl-links { display: flex; flex-wrap: wrap; gap: 6px; }
.dl-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 8px; font-size: 12.6px;
  background: var(--bg-1); border: 1px solid var(--line); color: var(--text-2); transition: .15s;
}
.dl-link:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.dl-size { font-size: 11px; color: var(--text-3); margin-left: auto; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-1); margin-top: 40px; padding: 34px 0 26px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 30px; margin-bottom: 26px; }
@media (max-width: 760px) { .footer-grid { grid-template-columns: 1fr; gap: 22px; } }
.footer-grid h4 { font-size: 12.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); margin-bottom: 11px; }
.footer-grid a { display: block; font-size: 13.4px; color: var(--text-2); padding: 4px 0; }
.footer-grid a:hover { color: var(--accent); }
.footer-desc { font-size: 13.4px; color: var(--text-2); line-height: 1.7; max-width: 420px; }
.footer-bottom {
  display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap;
  padding-top: 20px; border-top: 1px solid var(--line-soft);
  font-size: 12.4px; color: var(--text-3);
}
.footer-social { display: flex; gap: 7px; }
.footer-social a {
  width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center;
  background: var(--bg-2); border: 1px solid var(--line); color: var(--text-2);
}
.footer-social a:hover { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ---------- Iklan ---------- */
.ad-slot { margin: 18px 0; text-align: center; overflow: hidden; }
.ad-slot:empty { display: none; }
.ad-slot img { margin: 0 auto; }
.ad-slot ins { display: block; }
.ad-label { font-size: 9.5px; color: var(--text-3); text-transform: uppercase; letter-spacing: .12em; margin-bottom: 5px; opacity: .7; }

.ad-mobile-sticky {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 80;
  background: var(--bg-1); border-top: 1px solid var(--line);
  padding: 6px; text-align: center; min-height: 58px;
}
@media (max-width: 900px) { .ad-mobile-sticky:not(:empty) { display: block; } .ad-mobile-sticky:not(:empty) ~ .site-footer { padding-bottom: 80px; } }

/* ---------- Utility ---------- */
.muted { color: var(--text-3); }
.small { font-size: 12.5px; }
.center { text-align: center; }
.empty-state { padding: 48px 20px; text-align: center; color: var(--text-3); }
.empty-state svg { margin-bottom: 12px; opacity: .4; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 999;
  padding: 10px 16px; background: var(--accent); color: #fff; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; }

/* ---------- Scrollbar ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--bg-3); border-radius: 6px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #2b3648; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  html { scroll-behavior: auto; }
}
/* ==========================================================================
   Komponen tambahan: tab populer, baris episode, strip kartu,
   navigasi episode, spoiler download, sinopsis.
   ========================================================================== */

/* ---------- Tab Populer (sidebar) ---------- */
.mini-tabs {
  display: flex;
  gap: 3px;
  padding: 8px 10px 0;
  border-bottom: 1px solid var(--line);
}
.mini-tab {
  flex: 1;
  padding: 7px 4px 9px;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font: inherit;
  font-size: 11.8px;
  font-weight: 600;
  color: var(--text-3);
  cursor: pointer;
  transition: color .15s, border-color .15s;
  white-space: nowrap;
}
.mini-tab:hover { color: var(--text-2); }
.mini-tab.on { color: var(--accent); border-bottom-color: var(--accent); }

.mini-panel { display: none; }
.mini-panel.on { display: block; }

.mini-rank {
  width: 20px;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-size: 11.5px;
  font-weight: 800;
  color: var(--text-3);
  font-variant-numeric: tabular-nums;
}
.mini-rank.top { color: var(--accent); }

.mini-empty {
  padding: 16px 15px;
  font-size: 12.4px;
  color: var(--text-3);
}

/* ---------- Baris episode terbaru (beranda) ---------- */
.ep-rows {
  display: grid;
  gap: 7px;
}
@media (min-width: 700px) {
  .ep-rows { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1180px) {
  .ep-rows { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.ep-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 11px;
  border-radius: 11px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  transition: border-color .16s, background .16s, transform .16s;
  min-width: 0;
}
.ep-row:hover {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  background: var(--bg-2);
  transform: translateY(-1px);
}

.ep-row-thumb {
  width: 42px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 7px;
  overflow: hidden;
  background: var(--bg-3);
}
.ep-row-thumb img { width: 100%; height: 100%; object-fit: cover; }

.ep-row-body { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 4px; }
.ep-row-title {
  font-size: 12.8px;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ep-row-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-3);
  flex-wrap: wrap;
}
.badge-ep-inline {
  padding: 1px 6px;
  border-radius: 5px;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .02em;
}
.ep-row-play {
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--accent-soft);
  color: var(--accent);
  transition: background .16s, color .16s;
}
.ep-row:hover .ep-row-play { background: var(--accent); color: #fff; }

/* ---------- Strip kartu (geser horizontal) ---------- */
.card-strip {
  display: flex;
  gap: 13px;
  overflow-x: auto;
  padding-bottom: 8px;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}
.card-strip > .card {
  flex: 0 0 146px;
  scroll-snap-align: start;
}
@media (max-width: 480px) {
  .card-strip { gap: 11px; }
  .card-strip > .card { flex-basis: 132px; }
}

/* ---------- Navigasi episode (prev / semua / next) ---------- */
.epnav {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 8px;
  margin: 16px 0 20px;
}
@media (max-width: 640px) {
  .epnav { grid-template-columns: 1fr 1fr; }
  .epnav .all { grid-column: 1 / -1; grid-row: 1; }
}

.epnav-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 13px;
  border-radius: 11px;
  background: var(--bg-1);
  border: 1px solid var(--line);
  color: var(--text-2);
  transition: .16s;
  min-width: 0;
}
.epnav-btn.next { justify-content: flex-end; text-align: right; }
.epnav-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
}
.epnav-btn.disabled {
  opacity: .45;
  cursor: not-allowed;
  pointer-events: none;
}
.epnav-btn svg { flex-shrink: 0; }
.epnav-text { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.epnav-label {
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-3);
  font-weight: 600;
}
.epnav-num {
  font-size: 12.8px;
  font-weight: 650;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.epnav-btn:hover .epnav-num { color: var(--accent); }
.epnav-btn.all {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  justify-content: center;
}
.epnav-btn.all .epnav-label { color: rgba(255,255,255,.75); }
.epnav-btn.all .epnav-num { color: #fff; }
.epnav-btn.all:hover { filter: brightness(1.08); }
.epnav-btn.all.disabled { opacity: .4; }

/* ---------- Spoiler Link Download ---------- */
/* Konten <details> harus disembunyikan saat tertutup. Peramban hanya melakukan
   ini untuk gaya bawaannya, jadi aturan eksplisit diperlukan setelah styling. */
.dl-spoiler > .widget-body { display: none; }
.dl-spoiler[open] > .widget-body { display: block; }
.dl-spoiler { margin-top: 20px; }
.dl-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 13px 15px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--text-2);
  list-style: none;
  user-select: none;
}
.dl-summary::-webkit-details-marker { display: none; }
.dl-summary:hover { color: var(--accent); }
.dl-summary svg { color: var(--accent); flex-shrink: 0; }
.dl-hint {
  margin-left: auto;
  font-size: 10.5px;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  color: var(--text-3);
}
.dl-spoiler[open] .dl-hint { display: none; }
.dl-spoiler[open] > .dl-summary { border-bottom: 1px solid var(--line); }

/* ---------- Sinopsis di blok Informasi ---------- */
.info-subhead {
  margin: 18px 0 8px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-3);
  font-weight: 700;
}
.info-synopsis { border-top: 1px solid var(--line-soft); margin-top: 4px; }
.info-synopsis .synopsis { margin-top: 0; }
.info-synopsis .synopsis p:last-child { margin-bottom: 0; }

/* ==========================================================================
   Penyempurnaan mobile
   Fokus: rapat, mudah dijangkau jempol, teks tidak terpotong, tidak ada
   geser horizontal. Semua angka di bawah diuji pada 360-430px.
   ========================================================================== */

@media (max-width: 620px) {
  :root { --header-h: 56px; }

  body { font-size: 14.5px; }

  .shell { padding: 0 13px; }

  .layout { padding: 16px 0 80px; gap: 18px; }

  /* Header: brand + pencarian + menu */
  .header-inner {
    gap: 9px;
    height: var(--header-h);
  }
  .brand-logo { width: 30px; height: 30px; border-radius: 9px; font-size: 13px; }
  .brand-name { font-size: 14.5px; }
  .header-search { flex: 1; min-width: 0; }
  .search-form input { height: 37px; font-size: 14px; padding: 0 38px 0 13px; }
  .search-form button { width: 29px; height: 29px; top: 4px; right: 4px; }
  .icon-btn { width: 37px; height: 37px; border-radius: 9px; }

  /* Hero: teks saja, tinggi dikurangi, tombol sebaris penuh */
  .hero { border-radius: 15px; margin-bottom: 20px; }
  .hero-media { aspect-ratio: auto; height: 100%; min-height: 0; position: absolute; inset: 0; }
  .hero-slide { display: flex; flex-direction: column; }
  .hero-media::after {
    background:
      radial-gradient(120% 100% at 50% 0%, rgba(8,10,14,.55) 0%, rgba(8,10,14,.88) 60%, rgba(8,10,14,.97) 100%);
  }
  .hero-fg { position: relative; padding: 18px 16px; min-height: 268px; align-items: flex-end; }
  .hero-body { max-width: none; width: 100%; }
  .hero-tag { font-size: 10.5px; padding: 3px 9px; margin-bottom: 9px; }
  .hero-title {
    font-size: 1.22rem;
    line-height: 1.3;
    margin-bottom: 7px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .hero-meta { font-size: 11.5px; gap: 6px; margin-bottom: 12px; }
  .hero-actions { gap: 7px; }
  .hero-actions .btn { flex: 1; height: 38px; padding: 0 12px; font-size: 13px; }
  .hero-nav { bottom: 13px; right: 13px; }

  /* Judul seksi lebih ringkas */
  .section-head { margin: 22px 0 12px; gap: 9px; }
  .section-head h2 { font-size: 1.02rem; }
  .section-head h2::before { width: 3px; height: 16px; }
  .section-head .more { font-size: 12.5px; }

  /* Kartu: 2 kolom, judul 2 baris, jarak rapat */
  .grid-cards { gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card { border-radius: 12px; }
  .card-body { padding: 8px 9px 10px; }
  .card-title { font-size: 12.4px; line-height: 1.35; min-height: 2.7em; }
  .card-sub { font-size: 10.8px; margin-top: 3px; }
  .card-badges { top: 6px; left: 6px; right: 6px; gap: 4px; }
  .badge { font-size: 9.8px; padding: 2px 6px; }
  .badge-ep { bottom: 6px; left: 6px; }

  /* Baris episode */
  .ep-rows { gap: 6px; }
  .ep-row { padding: 7px 9px; border-radius: 10px; gap: 9px; }
  .ep-row-thumb { width: 38px; height: 51px; border-radius: 6px; }
  .ep-row-title { font-size: 12.2px; }
  .ep-row-meta { font-size: 10.2px; gap: 5px; }
  .ep-row-play { width: 24px; height: 24px; }

  /* Strip kartu */
  .card-strip { gap: 10px; margin: 0 -13px; padding: 0 13px 8px; }
  .card-strip > .card { flex-basis: 128px; }

  /* Detail anime */
  .anime-head {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 15px;
    border-radius: 13px;
  }
  .anime-poster {
    width: 100%;
    max-width: 128px;
    aspect-ratio: 3/4;
    border-radius: 10px;
  }
  .anime-title { font-size: 1.22rem; margin-bottom: 8px; }
  .chips { gap: 5px; margin-bottom: 11px; }
  .chip { font-size: 11.2px; padding: 3px 8px; }
  .synopsis { font-size: 13.4px; }
  .info-table { font-size: 12.8px; gap: 6px 11px; grid-template-columns: minmax(80px, auto) 1fr; }

  /* Daftar episode */
  .ep-list { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 7px; }
  .ep-item { padding: 9px 11px; font-size: 12.6px; gap: 8px; }
  .ep-num { width: 24px; height: 24px; font-size: 10.5px; }

  /* Player */
  .player-wrap { border-radius: 11px; }
  .player-controls { padding: 9px 11px; gap: 7px; margin-bottom: 16px; }
  .ctrl-label { display: none; }
  .select-wrap select { height: 35px; font-size: 12.8px; min-width: 0; width: 100%; }
  .select-wrap { flex: 1; }
  .player-controls .btn-sm { height: 35px; font-size: 12.4px; }
  .watermark { font-size: 10.6px; padding: 3px 8px; }
  .wm-top-left, .wm-top-right { top: 8px; }
  .wm-top-left { left: 8px; }
  .wm-top-right { right: 8px; }
  .wm-bottom-left, .wm-bottom-right { bottom: 46px; }
  .wm-bottom-left { left: 8px; }
  .wm-bottom-right { right: 8px; }

  /* Navigasi episode */
  .epnav { gap: 7px; margin: 13px 0 16px; }
  .epnav-btn { padding: 9px 10px; border-radius: 10px; gap: 6px; }
  .epnav-label { font-size: 9.5px; letter-spacing: .04em; }
  .epnav-num { font-size: 11.8px; }
  .epnav-btn.all { padding: 10px; }

  /* Sidebar menjadi kartu bertumpuk dengan jarak ringkas */
  .sidebar { gap: 14px; }
  .widget { border-radius: 13px; }
  .widget-head { padding: 11px 13px; font-size: 12px; }
  .widget-body { padding: 10px 13px; }
  .mini-item { padding: 8px 13px; gap: 9px; }
  .mini-thumb { width: 40px; height: 54px; }
  .mini-title { font-size: 12.2px; }
  .mini-tab { font-size: 11.2px; padding: 6px 3px 8px; }
  .tag { font-size: 11.4px; padding: 4px 9px; }

  /* Iklan: jangan sampai menutupi konten */
  .ad-slot { margin: 14px 0; }
  .ad-mobile-sticky > .ad-slot { margin: 0; }
  .ad-mobile-sticky > .ad-slot .ad-label { display: none; }
  .ad-mobile-sticky ~ .site-footer { padding-bottom: 78px; }

  /* Footer ringkas */
  .site-footer { padding: 24px 0 20px; margin-top: 28px; }
  .footer-grid { gap: 18px; margin-bottom: 20px; }
  .footer-grid h4 { margin-bottom: 8px; }
  .footer-grid a { font-size: 12.8px; padding: 3px 0; }
  .footer-desc { font-size: 12.8px; }
  .footer-bottom { font-size: 11.6px; gap: 8px; }

  /* Pagination lebih mudah disentuh */
  .pager { gap: 6px; margin-top: 22px; }
  .pager a, .pager span { min-width: 35px; height: 35px; font-size: 12.8px; padding: 0 9px; }

  /* Tabs */
  .tabs { margin-bottom: 16px; }
  .tabs a { padding: 9px 12px; font-size: 12.8px; }

  /* Download spoiler */
  .dl-summary { padding: 11px 13px; font-size: 12px; }
  .dl-hint { font-size: 9.8px; }
  .dl-spoiler > .widget-body { padding: 13px; }
  .dl-links { gap: 5px; }
  .dl-link { font-size: 11.8px; padding: 6px 10px; }

  /* Breadcrumb */
  .crumbs { font-size: 11.6px; gap: 5px; margin-bottom: 12px; }

  /* Pengumuman */
  .announce { padding: 9px 12px; font-size: 12.8px; border-radius: 9px; margin-top: 11px; }
}

/* Layar sangat kecil: satu kolom ringkas */
@media (max-width: 360px) {
  .card-strip > .card { flex-basis: 118px; }
  .hero-title { font-size: 1.1rem; }
  .ep-row-thumb { width: 34px; height: 46px; }
}

/* ---------- Search bar mobile (dropdown di bawah header) ---------- */
.search-bar {
  padding: 10px 18px 12px;
  border-top: 1px solid var(--line);
  background: var(--bg-1);
}
.search-bar .search-form input {
  height: 40px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0 42px 0 15px;
  color: var(--text);
}
@media (min-width: 901px) {
  .search-bar { display: none !important; }
  .search-toggle { display: none; }
  .header-search { display: flex; }
}
@media (max-width: 900px) {
  .header-search { display: none; }
  .search-toggle { display: grid; }
}

/* ---------- Menu mobile: panel yang tidak menutup layar penuh ---------- */
.mobile-nav {
  max-height: 72vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 14px 32px -18px rgba(0,0,0,.8);
}
.mobile-nav a {
  display: flex;
  align-items: center;
  padding: 12px 4px;
  font-size: 15px;
}
.mobile-nav a::before {
  content: '';
  width: 3px; height: 16px;
  background: var(--accent);
  border-radius: 2px;
  margin-right: 10px;
  opacity: .45;
}

/* ---------- Hero ---------- */
.hero-slide .hero-fg {
  padding: clamp(16px, 3vw, 36px) clamp(14px, 2.6vw, 34px);
}
@media (max-width: 620px) {
  .hero-media { min-height: 280px; }
  .hero-fg { min-height: 280px; align-items: flex-end; }
  .hero-body { width: 100%; }
  .hero-title { font-size: 1.24rem; }
  .hero-actions { gap: 8px; }
  .hero-actions .btn { flex: 1 1 0; min-width: 0; font-size: 13px; }
  .hero-nav { bottom: 12px; right: 12px; }
}

/* ---------- Kartu ringkas ---------- */
.card { border-radius: 12px; }
.card-thumb { aspect-ratio: 3/4; }
.card-body { padding: 9px 10px 11px; }

/* ---------- Detail anime: sinopsis lebih ringkas di mobile ---------- */
@media (max-width: 620px) {
  .anime-head { padding: 14px; }
  .anime-title { font-size: 1.2rem; }
  .info-synopsis { margin-top: 12px; padding-top: 12px; }
  .info-synopsis .synopsis { font-size: 13.4px; }
  .info-synopsis .synopsis p { margin: 0 0 .7em; }
}

/* ---------- Player watermark tetap terlihat saat fullscreen ---------- */
.player-wrap { isolation: isolate; }

/* ---------- Minimalisasi noise di mobile ---------- */
@media (max-width: 620px) {
  .ad-label { font-size: 8.5px; margin-bottom: 3px; }
  .dl-hint { font-size: 9px; }
  .section-head { margin: 20px 0 11px; }
  .widget { border-radius: 12px; }
  .crumbs { margin-bottom: 12px; }
  h1 { margin-bottom: 10px; }
  h2 { margin-bottom: 8px; }
}
/* ==========================================================================
   Mobile polish (v2) — tambahan di atas style.css utama
   ========================================================================== */

@media (max-width: 620px) {
  :root { --header-h: 56px; }
  body { font-size: 14.5px; }
  .shell { padding: 0 13px; }
  .layout { padding: 16px 0 80px; gap: 18px; }
  .header-inner { gap: 9px; height: var(--header-h); }
  .brand-logo { width: 30px; height: 30px; border-radius: 9px; font-size: 13px; }
  .brand-name { font-size: 14.5px; }
  .search-form input { height: 37px; font-size: 14px; padding: 0 38px 0 13px; }
  .search-form button { width: 29px; height: 29px; top: 4px; right: 4px; }
  .icon-btn { width: 37px; height: 37px; border-radius: 9px; }
  .hero { border-radius: 15px; margin-bottom: 20px; }
  .hero-media { min-height: 260px; }
  .hero-fg { min-height: 260px; align-items: flex-end; padding: 18px 16px; }
  .hero-body { width: 100%; }
  .hero-title { font-size: 1.22rem; line-height: 1.3; margin-bottom: 7px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .hero-meta { font-size: 11.5px; gap: 6px; margin-bottom: 12px; }
  .hero-actions { gap: 7px; }
  .hero-actions .btn { flex: 1; height: 38px; padding: 0 12px; font-size: 13px; }
  .hero-nav { bottom: 13px; right: 13px; }
  .section-head { margin: 22px 0 12px; gap: 9px; }
  .section-head h2 { font-size: 1.02rem; }
  .section-head h2::before { width: 3px; height: 16px; }
  .section-head .more { font-size: 12.5px; }
  .grid-cards { gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .card { border-radius: 12px; }
  .card-body { padding: 8px 9px 10px; }
  .card-title { font-size: 12.4px; line-height: 1.35; min-height: 2.7em; }
  .card-sub { font-size: 10.8px; margin-top: 3px; }
  .card-badges { top: 6px; left: 6px; right: 6px; gap: 4px; }
  .badge { font-size: 9.8px; padding: 2px 6px; }
  .badge-ep { bottom: 6px; left: 6px; }
  .ep-rows { gap: 6px; }
  .ep-row { padding: 7px 9px; border-radius: 10px; gap: 9px; }
  .ep-row-thumb { width: 38px; height: 51px; border-radius: 6px; }
  .ep-row-title { font-size: 12.2px; }
  .ep-row-meta { font-size: 10.2px; gap: 5px; }
  .ep-row-play { width: 24px; height: 24px; }
  .card-strip { gap: 10px; margin: 0 -13px; padding: 0 13px 8px; }
  .card-strip > .card { flex-basis: 128px; }
  .anime-head { grid-template-columns: 1fr; gap: 14px; padding: 15px; border-radius: 13px; }
  .anime-poster { width: 100%; max-width: 128px; aspect-ratio: 3/4; border-radius: 10px; }
  .anime-title { font-size: 1.2rem; margin-bottom: 8px; }
  .chips { gap: 5px; margin-bottom: 11px; }
  .chip { font-size: 11.2px; padding: 3px 8px; }
  .synopsis { font-size: 13.4px; }
  .info-table { font-size: 12.8px; gap: 6px 11px; grid-template-columns: minmax(80px, auto) 1fr; }
  .ep-list { grid-template-columns: repeat(auto-fill, minmax(132px, 1fr)); gap: 7px; }
  .ep-item { padding: 9px 11px; font-size: 12.6px; gap: 8px; }
  .ep-num { width: 24px; height: 24px; font-size: 10.5px; }
  .player-wrap { border-radius: 11px; }
  .player-controls { padding: 9px 11px; gap: 7px; margin-bottom: 16px; }
  .ctrl-label { display: none; }
  .select-wrap select { height: 35px; font-size: 12.8px; min-width: 0; width: 100%; }
  .select-wrap { flex: 1; }
  .player-controls .btn-sm { height: 35px; font-size: 12.4px; }
  .watermark { font-size: 10.6px; padding: 3px 8px; }
  .wm-top-left, .wm-top-right { top: 8px; }
  .wm-top-left { left: 8px; }
  .wm-top-right { right: 8px; }
  .wm-bottom-left, .wm-bottom-right { bottom: 46px; }
  .wm-bottom-left { left: 8px; }
  .wm-bottom-right { right: 8px; }
  .epnav { gap: 7px; margin: 13px 0 16px; }
  .epnav-btn { padding: 9px 10px; border-radius: 10px; gap: 6px; }
  .epnav-label { font-size: 9.5px; letter-spacing: .04em; }
  .epnav-num { font-size: 11.8px; }
  .epnav-btn.all { padding: 10px; }
  .sidebar { gap: 14px; }
  .widget { border-radius: 13px; }
  .widget-head { padding: 11px 13px; font-size: 12px; }
  .widget-body { padding: 10px 13px; }
  .mini-item { padding: 8px 13px; gap: 9px; }
  .mini-thumb { width: 40px; height: 54px; }
  .mini-title { font-size: 12.2px; }
  .mini-tab { font-size: 11.2px; padding: 6px 3px 8px; }
  .tag { font-size: 11.4px; padding: 4px 9px; }
  .ad-slot { margin: 14px 0; }
  .ad-mobile-sticky > .ad-slot { margin: 0; }
  .ad-mobile-sticky > .ad-slot .ad-label { display: none; }
  .ad-mobile-sticky ~ .site-footer { padding-bottom: 78px; }
  .site-footer { padding: 24px 0 20px; margin-top: 28px; }
  .footer-grid { gap: 18px; margin-bottom: 20px; }
  .footer-grid h4 { margin-bottom: 8px; }
  .footer-grid a { font-size: 12.8px; padding: 3px 0; }
  .footer-desc { font-size: 12.8px; }
  .footer-bottom { font-size: 11.6px; gap: 8px; }
  .pager { gap: 6px; margin-top: 22px; }
  .pager a, .pager span { min-width: 35px; height: 35px; font-size: 12.8px; padding: 0 9px; }
  .tabs { margin-bottom: 16px; }
  .tabs a { padding: 9px 12px; font-size: 12.8px; }
  .dl-summary { padding: 11px 13px; font-size: 12px; }
  .dl-hint { font-size: 9.8px; }
  .dl-spoiler > .widget-body { padding: 13px; }
  .dl-links { gap: 5px; }
  .dl-link { font-size: 11.8px; padding: 6px 10px; }
  .crumbs { font-size: 11.6px; gap: 5px; margin-bottom: 12px; }
  .announce { padding: 9px 12px; font-size: 12.8px; border-radius: 9px; margin-top: 11px; }
  .info-synopsis { margin-top: 12px; padding-top: 12px; }
  .info-synopsis .synopsis { font-size: 13.4px; }
  .info-synopsis .synopsis p { margin: 0 0 .7em; }
}

@media (max-width: 360px) {
  .card-strip > .card { flex-basis: 118px; }
  .hero-title { font-size: 1.1rem; }
  .ep-row-thumb { width: 34px; height: 46px; }
}

/* ---------- Search bar mobile ---------- */
.search-bar { padding: 10px 18px 12px; border-top: 1px solid var(--line); background: var(--bg-1); }
.search-bar .search-form input { height: 40px; background: var(--bg-2); border: 1px solid var(--line); border-radius: 999px; padding: 0 42px 0 15px; color: var(--text); }
@media (min-width: 901px) {
  .search-bar { display: none !important; }
  .search-toggle { display: none; }
  .header-search { display: flex; }
}
@media (max-width: 900px) {
  .header-search { display: none; }
  .search-toggle { display: grid; }
}

/* ---------- Menu mobile ---------- */
.mobile-nav { max-height: 72vh; overflow-y: auto; -webkit-overflow-scrolling: touch; box-shadow: 0 14px 32px -18px rgba(0,0,0,.8); }
.mobile-nav a { display: flex; align-items: center; padding: 12px 4px; font-size: 15px; }
.mobile-nav a::before { content: ''; width: 3px; height: 16px; background: var(--accent); border-radius: 2px; margin-right: 10px; opacity: .45; }

/* ---------- Spoiler Link Download ---------- */
.dl-spoiler > .widget-body { display: none; }
.dl-spoiler[open] > .widget-body { display: block; }
.dl-spoiler { margin-top: 20px; }
.dl-summary { display: flex; align-items: center; gap: 8px; padding: 13px 15px; cursor: pointer; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-2); list-style: none; user-select: none; }
.dl-summary::-webkit-details-marker { display: none; }
.dl-summary:hover { color: var(--accent); }
.dl-summary svg { color: var(--accent); flex-shrink: 0; }
.dl-hint { margin-left: auto; font-size: 10.5px; text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--text-3); }
.dl-spoiler[open] .dl-hint { display: none; }
.dl-spoiler[open] > .dl-summary { border-bottom: 1px solid var(--line); }
.dl-spoiler > .widget-body { padding: 13px; }

/* ---------- Sinopsis ---------- */
.info-subhead { margin: 18px 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: .07em; color: var(--text-3); font-weight: 700; }
.info-synopsis { border-top: 1px solid var(--line-soft); margin-top: 4px; }
.info-synopsis .synopsis { margin-top: 0; }
.info-synopsis .synopsis p:last-child { margin-bottom: 0; }

/* ---------- [hidden] ---------- */
[hidden] { display: none !important; }
'''

# Hindari duplikasi: hanya tambahkan jika belum ada
if 'Penyempurnaan mobile (v2)' not in open('public/assets/style.css', encoding='utf-8').read():
    open('public/assets/style.css', 'a', encoding='utf-8').write(extra)
    print('mobile polish appended')
else:
    print('already appended, skip')

# bump css version
for p in ['src/lib/layout.js', 'src/pages/admin.js']:
    s = open(p, encoding='utf-8').read()
    s = s.replace(/style\.css\?v=\d+/g, 'style.css?v=9').replace(/admin\.css\?v=\d+/g, 'admin.css?v=9')
    open(p, 'w', encoding='utf-8').write(s)
print('css bumped to v9')