/* ==========================================================================
   Sorot — stylesheet utama
   Identitas sendiri: hitam kebiruan + aksen emas, Plus Jakarta Sans (UI) dan
   Instrument Serif (judul). Font di-host sendiri (subset Latin, WOFF2; SIL OFL 1.1,
   lihat assets/fonts/LICENSES.md).
   ========================================================================== */
@font-face { font-family: 'Plus Jakarta Sans'; font-style: normal; font-weight: 200 800; font-display: swap; src: url('../fonts/plus-jakarta-sans-var.woff2') format('woff2'); }
@font-face { font-family: 'Instrument Serif'; font-style: normal; font-weight: 400; font-display: swap; src: url('../fonts/instrument-serif-400.woff2') format('woff2'); }
@font-face { font-family: 'Instrument Serif'; font-style: italic; font-weight: 400; font-display: swap; src: url('../fonts/instrument-serif-400-italic.woff2') format('woff2'); }

:root {
  --ink: #07090f;
  --surface-1: #10141f;
  --surface-2: #171c2a;
  --surface-3: #1f2536;
  --line: #262d3f;
  --line-soft: rgba(255, 255, 255, 0.08);
  --glass: rgba(7, 9, 15, 0.55);
  --glass-light: rgba(242, 244, 248, 0.14);
  --text: #f2f4f8;
  --text-2: #c9ceda;
  --muted: #a3abbd;
  --dim: #8b93a7;
  --accent: #f4c056;
  --accent-hover: #f8d27f;
  --on-accent: #1a1405;
  --danger: #ff8f80;
  --ok: #7dd3a8;
  --font-sans: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --gutter: clamp(16px, 4vw, 56px);
  --topbar-h: 72px;
  --tabbar-h: 0px;
  --gap: 18px;
  --radius-sm: 8px;
  --radius: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: dark;
}
@media (max-width: 900px) {
  :root { --topbar-h: 60px; --tabbar-h: calc(64px + env(safe-area-inset-bottom, 0px)); --gap: 12px; }
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: #3a4256 var(--ink); }
html.is-locked { overflow: hidden; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; }
ul, ol { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, h4, p, dl, dd, figure { margin: 0; }
svg { display: block; flex: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.spacer { flex: 1; }

/* ---------- Tipografi kecil ---------- */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}

/* ---------- Logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 9px; color: var(--text); flex: none; }
.logo__glyph { width: 26px; height: 26px; color: var(--accent); }
.logo__word { font-weight: 800; font-size: 25px; letter-spacing: -0.045em; line-height: 1; text-transform: lowercase; }
.logo:hover .logo__word { color: var(--text); }

/* ---------- Spinner & skeleton ---------- */
.spinner {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 3px solid rgba(242, 244, 248, 0.15);
  border-top-color: var(--accent);
  animation: spin 0.9s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%, 100% { opacity: 0.55; } 50% { opacity: 1; } }
.skeleton-line,
.skeleton {
  display: block;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  animation: pulse 1.6s ease-in-out infinite;
}
.skeleton--landscape { aspect-ratio: 16 / 9; border-radius: var(--radius); }
.skeleton--poster,
.skeleton--rank { aspect-ratio: 2 / 3; border-radius: var(--radius); }
.skeleton--hub { min-height: 150px; border-radius: var(--radius-lg); }

/* ==========================================================================
   Tombol
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: var(--radius);
  background: var(--surface-3);
  color: var(--text);
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
  transition: background-color 0.2s, color 0.2s, transform 0.15s, box-shadow 0.2s;
}
.btn svg { width: 18px; height: 18px; }
.btn:active { transform: scale(0.97); }
.btn--lg { min-height: 54px; padding: 0 26px; font-size: 16px; }
.btn--sm { min-height: 34px; padding: 0 12px; gap: 6px; font-size: 13px; border-radius: var(--radius-sm); }
.btn--sm svg { width: 15px; height: 15px; }
.btn--primary { background: var(--accent); color: var(--on-accent); font-weight: 800; }
.btn--primary:hover { background: var(--accent-hover); }
.btn--light { background: var(--text); color: var(--ink); font-weight: 800; }
.btn--light:hover { background: #fff; }
.btn--glass { background: var(--glass-light); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.btn--glass:hover { background: rgba(242, 244, 248, 0.24); }
.btn--outline { background: transparent; box-shadow: inset 0 0 0 1px #3a4258; }
.btn--outline:hover { background: rgba(242, 244, 248, 0.06); box-shadow: inset 0 0 0 1px #5a6380; }
.btn--icon { padding: 0; width: 54px; }
.btn[aria-pressed='true'] svg { color: var(--accent); }

.icon-btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1.5px solid #4a5370;
  border-radius: 50%;
  background: rgba(16, 20, 31, 0.6);
  color: var(--text);
  transition: background-color 0.2s, border-color 0.2s, transform 0.15s;
  flex: none;
}
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:hover { border-color: var(--text); background: rgba(242, 244, 248, 0.1); }
.icon-btn--glass { border: 0; background: var(--glass-light); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
.icon-btn--glass:hover { background: rgba(242, 244, 248, 0.24); }
.icon-btn--outline { background: rgba(7, 9, 15, 0.35); border-color: rgba(242, 244, 248, 0.5); }
.icon-btn--primary { border: 0; background: var(--accent); color: var(--on-accent); }
.icon-btn--primary:hover { background: var(--accent-hover); }
.icon-btn--sm { width: 34px; height: 34px; }
.icon-btn--sm svg { width: 16px; height: 16px; }
.icon-btn[aria-pressed='true'] { border-color: var(--accent); color: var(--accent); }

.link-btn { border: 0; background: none; padding: 0; color: var(--accent); font-weight: 700; text-decoration: underline; }

.segmented {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: var(--surface-1);
  border: 1px solid var(--line);
}
.segmented button {
  min-height: 34px;
  padding: 0 16px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.segmented button:hover { color: var(--text); }
.segmented button[aria-pressed='true'] { background: var(--text); color: var(--ink); }

.select {
  min-height: 40px;
  padding: 0 36px 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface-1) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6' fill='none' stroke='%23c9ceda' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") right 12px center / 16px no-repeat;
  appearance: none;
  font-size: 14px;
  font-weight: 600;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
}
.chip:hover { border-color: #5a6380; }

.badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border: 1px solid rgba(242, 244, 248, 0.45);
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text);
  line-height: 1.5;
}

/* Tooltip kecil di atas tombol ikon */
[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translate(-50%, 4px);
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  background: var(--text);
  color: var(--ink);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s, transform 0.15s;
  z-index: 5;
}
[data-tooltip]:hover::after,
[data-tooltip]:focus-visible::after { opacity: 1; transform: translate(-50%, 0); }

/* Rating: pil berisi 3 pilihan muncul saat hover */
.rate { position: relative; display: inline-flex; }
.rate__panel {
  position: absolute;
  left: 50%;
  top: 50%;
  display: flex;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background: var(--surface-3);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.5);
  transform: translate(-50%, -50%) scale(0.6);
  opacity: 0;
  visibility: hidden;
  transition: transform 0.2s var(--ease), opacity 0.2s, visibility 0.2s;
  z-index: 6;
}
.rate:hover .rate__panel,
.rate:focus-within .rate__panel { transform: translate(-50%, -50%) scale(1); opacity: 1; visibility: visible; transition-delay: 0.3s; }
.rate__option {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text);
}
.rate__option svg { width: 20px; height: 20px; }
.rate__option:hover { background: rgba(242, 244, 248, 0.14); }
.rate__option[aria-pressed='true'] { color: var(--accent); }
.rate__option[aria-pressed='true'] svg path,
.rate .icon-btn[data-value] svg path { fill: currentColor; }
.rate .icon-btn[data-value] { color: var(--accent); border-color: var(--accent); }

/* ==========================================================================
   Header (kaca) & tab bar
   ========================================================================== */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  height: var(--topbar-h);
}
.topbar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 9, 15, 0.7), rgba(7, 9, 15, 0.25));
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--line-soft);
  transition: background-color 0.3s;
}
.topbar.is-scrolled::before { background: rgba(7, 9, 15, 0.86); }
.topbar__inner {
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 0 var(--gutter);
}
.topnav > ul {
  display: flex;
  gap: 2px;
  padding: 4px;
  border-radius: 999px;
  background: rgba(242, 244, 248, 0.06);
}
.topnav > ul > li > a {
  display: block;
  padding: 9px 16px;
  border-radius: 999px;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 0.2s, color 0.2s;
}
.topnav > ul > li > a:hover { color: var(--text); }
.topnav > ul > li > a.is-current { background: var(--text); color: var(--ink); }

/* Mega menu "Jelajahi": panel di bawah header, di tengah layar (diposisikan terhadap .topbar__inner). */
.topnav .has-mega > a { display: inline-flex; align-items: center; gap: 4px; }
.topnav .has-mega > a svg { width: 14px; height: 14px; opacity: 0.7; transition: transform 0.2s var(--ease); }
.has-mega.is-open > a svg { transform: rotate(180deg); }
.mega {
  position: absolute;
  left: 50%;
  top: calc(100% + 2px);
  width: min(1040px, calc(100vw - 2 * var(--gutter)));
  max-height: calc(100vh - var(--topbar-h) - 24px);
  overflow-y: auto;
  padding: 26px 28px 20px;
  border-radius: var(--radius-xl);
  background: rgba(16, 20, 31, 0.97);
  -webkit-backdrop-filter: blur(24px);
  backdrop-filter: blur(24px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, -8px);
  transition: opacity 0.2s, transform 0.25s var(--ease), visibility 0.2s;
}
.has-mega.is-open .mega {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
  /* Langsung terlihat saat dibuka (link bisa langsung difokus dengan Tab); jeda hanya saat menutup. */
  transition: opacity 0.2s, transform 0.25s var(--ease), visibility 0s;
}
.mega__cols { display: grid; grid-template-columns: 1.4fr 0.85fr 1.75fr 0.95fr; }
.mega__col { min-width: 0; padding: 0 26px; }
.mega__col:first-child { padding-left: 0; }
.mega__col:last-child { padding-right: 0; }
.mega__col + .mega__col { border-left: 1px solid var(--line-soft); }
.mega__title { margin-bottom: 12px; font-size: 12px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.mega__list { display: grid; gap: 2px 14px; }
.mega__list--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.mega__list--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); min-height: 200px; }
.mega__link {
  display: block;
  margin: 0 -8px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background-color 0.15s, color 0.15s;
}
.mega__link:hover, .mega__link:focus-visible { background: var(--surface-2); color: var(--text); }
.mega__years { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.mega__chip {
  display: grid;
  place-items: center;
  height: 36px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  transition: border-color 0.15s, color 0.15s;
}
.mega__chip:hover, .mega__chip:focus-visible { border-color: var(--accent); color: var(--accent); }
.mega__more { display: inline-flex; align-items: center; gap: 4px; margin-top: 12px; color: var(--muted); font-size: 13px; font-weight: 700; }
.mega__more svg { width: 14px; height: 14px; }
.mega__more:hover { color: var(--text); }
.mega__networks { display: grid; gap: 8px; }
.mega__network {
  display: flex;
  align-items: center;
  height: 44px;
  padding: 0 16px;
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--surface-2), var(--surface-1));
  border: 1px solid var(--line);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
  transition: border-color 0.15s, transform 0.15s var(--ease);
}
.mega__network:hover, .mega__network:focus-visible { border-color: var(--accent); transform: translateX(3px); }
.mega__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line-soft); }
.mega__label { font-size: 12px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.mega__presets { display: flex; flex: 1; flex-wrap: wrap; gap: 8px; }
.mega__presets .chip:hover, .mega__presets .chip:focus-visible { border-color: var(--accent); color: var(--accent); }
.mega__all { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-size: 14px; font-weight: 800; }
.mega__all svg { width: 16px; height: 16px; }
.mega__all:hover { color: var(--accent-hover); }
.topbar__actions { display: flex; align-items: center; gap: 6px; }
.topbar .icon-btn:not(.search__clear) { border: 0; background: transparent; }
.topbar .icon-btn:hover { background: rgba(242, 244, 248, 0.1); }

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -80px;
  z-index: 100;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 800;
}
.skip-link:focus { top: 12px; }

/* Pencarian yang melebar */
.search {
  display: flex;
  align-items: center;
  height: 44px;
  border-radius: 999px;
  transition: background-color 0.25s, box-shadow 0.25s;
}
.search__input {
  width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  outline: none;
  font-size: 14px;
  transition: width 0.3s var(--ease), padding 0.3s;
}
.search__input::placeholder { color: var(--dim); }
.search__input::-webkit-search-cancel-button { display: none; }
.search__clear { display: none; width: 34px; height: 34px; border: 0; background: transparent; }
.search.is-open { background: var(--surface-1); box-shadow: inset 0 0 0 1px var(--line); }
.search.is-open .search__input { width: 220px; padding-right: 6px; }
.search.is-open.has-value .search__clear { display: inline-grid; }

/* Menu notifikasi */
.has-menu { position: relative; }
.menu {
  position: absolute;
  right: 0;
  top: calc(100% + 12px);
  width: min(380px, calc(100vw - 32px));
  padding: 10px;
  border-radius: var(--radius-lg);
  background: rgba(16, 20, 31, 0.96);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.2s, transform 0.2s var(--ease), visibility 0.2s;
}
.has-menu.is-open .menu { opacity: 1; visibility: visible; transform: none; }
.menu__title { padding: 8px 10px 10px; font-size: 13px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }
.notif__list { max-height: min(60vh, 460px); overflow-y: auto; }
/* Ponsel: menu header diposisikan terhadap layar (bukan terhadap ikonnya) agar tidak terpotong di kiri
   ketika ikon tidak berada di ujung kanan, dan tidak tertutup tab bar bawah. */
@media (max-width: 900px) {
  .topbar .menu {
    position: fixed;
    top: calc(var(--topbar-h) + 8px);
    left: 12px;
    right: 12px;
    width: auto;
    max-height: calc(100dvh - var(--topbar-h) - var(--tabbar-h) - 24px);
    display: flex;
    flex-direction: column;
  }
  .topbar .notif__list { max-height: none; flex: 1; min-height: 0; overscroll-behavior: contain; }
}
.notif__item { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: var(--radius); }
.notif__item:hover { background: var(--surface-2); }
.notif__img { flex: none; width: 112px; aspect-ratio: 16 / 9; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-3); }
.notif__img img { width: 100%; height: 100%; object-fit: cover; }
.notif__kicker { display: block; font-size: 12px; font-weight: 700; color: var(--accent); }
.notif__title { display: block; font-weight: 700; font-size: 14px; line-height: 1.3; }
.notif__time { display: block; font-size: 12px; color: var(--muted); }
.notif__empty { padding: 18px 10px; color: var(--muted); text-align: center; }
.notif__badge {
  position: absolute;
  top: 4px;
  right: 2px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 11px;
  font-weight: 800;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.tabbar { display: none; }

@media (max-width: 1100px) {
  .topnav > ul > li > a { padding: 9px 12px; font-size: 13px; }
  .mega { padding: 22px 20px 18px; }
  .mega__col { padding: 0 18px; }
  .mega__list--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .topnav { display: none; }
  .logo__word { font-size: 22px; }
  .topbar.is-searching .logo { display: none; }
  .topbar.is-searching .topbar__actions { flex: 1; }
  .topbar.is-searching .search { flex: 1; }
  .search.is-open .search__input { width: 100%; flex: 1; }
  .tabbar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 60;
    height: var(--tabbar-h);
    padding: 6px 6px env(safe-area-inset-bottom, 0px);
    display: flex;
    justify-content: space-around;
    background: rgba(16, 20, 31, 0.86);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    backdrop-filter: blur(20px) saturate(140%);
    border-top: 1px solid var(--line-soft);
  }
  .tabbar a {
    flex: 1;
    max-width: 92px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
  }
  .tabbar a svg { width: 22px; height: 22px; }
  .tabbar a.is-current { color: var(--accent); }
}

/* ==========================================================================
   Tata letak
   ========================================================================== */
.main { min-height: 100vh; padding-bottom: var(--tabbar-h); }
.main:focus { outline: none; }
.page { padding: calc(var(--topbar-h) + 40px) var(--gutter) 40px; }
.page .shelves { margin: 0 calc(var(--gutter) * -1); }
.page__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin-bottom: 28px; }
.page__title { font-family: var(--font-serif); font-weight: 400; font-size: clamp(40px, 5vw, 64px); line-height: 1; letter-spacing: -0.01em; }
.page__sub { margin-top: 8px; color: var(--muted); font-size: 15px; }
.page__controls { display: flex; flex-wrap: wrap; gap: 12px 18px; }
.page__controls label { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; font-weight: 700; }
.page-enter { animation: fade-in 0.4s ease both; }
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.empty-state {
  display: grid;
  justify-items: center;
  gap: 14px;
  padding: 64px 16px;
  text-align: center;
  color: var(--text-2);
}
.empty-state > svg { width: 40px; height: 40px; color: var(--dim); }
.empty-state ul { color: var(--muted); font-size: 14px; display: grid; gap: 4px; }

/* ---------- Jelajahi (#/explore): hero satu judul + kepala + grid kartu besar ---------- */
.explore { position: relative; z-index: 2; margin-top: -120px; padding: 0 var(--gutter) 40px; }
/* Hero tidak ada (hasil kosong / gagal dimuat): beri jarak dari header. */
.main > .explore:first-child { margin-top: 0; padding-top: calc(var(--topbar-h) + 32px); }
.explore__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 24px; margin-bottom: 26px; }
.explore__heading { min-width: 0; }
.explore__title { margin-top: 6px; font-family: var(--font-serif); font-weight: 400; font-size: clamp(34px, 4.4vw, 56px); line-height: 1.05; letter-spacing: -0.01em; }
.explore__count { margin-top: 6px; color: var(--muted); font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.explore__count:empty { display: none; }
.explore__filter { position: relative; }
.explore__badge {
  display: grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 12px;
  font-weight: 800;
}
.poster-grid--large { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 28px 20px; }
.card__rankbar--stack { flex-direction: column; align-items: stretch; gap: 2px; }
.card__rankbar--stack .card__main { display: block; max-width: 100%; font-size: 14px; }
@media (max-width: 900px) { .explore { margin-top: -56px; } }
@media (max-width: 599px) {
  .poster-grid--large { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 16px 12px; }
  .explore__filter { min-height: 40px; padding: 0 14px; }
}

/* ---------- Popup filter Jelajahi ---------- */
.fdlg {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(3, 5, 10, 0.66);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.2s;
}
.fdlg.is-open { opacity: 1; }
.fdlg__box {
  display: flex;
  flex-direction: column;
  width: min(720px, 100%);
  max-height: min(86vh, 840px);
  border-radius: var(--radius-xl);
  background: var(--surface-1);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  transform: translateY(12px) scale(0.98);
  transition: transform 0.25s var(--ease);
}
.fdlg.is-open .fdlg__box { transform: none; }
.fdlg__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px 14px; }
.fdlg__head h2 { font-family: var(--font-serif); font-weight: 400; font-size: 32px; line-height: 1; }
.fdlg__body { display: grid; gap: 22px; padding: 6px 24px 22px; overflow-y: auto; overscroll-behavior: contain; }
.fdlg__group { margin: 0; padding: 0; border: 0; min-width: 0; }
.fdlg__legend { display: block; margin-bottom: 10px; padding: 0; font-size: 12px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent); }
.fdlg__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.fdlg__chips .chip:hover { border-color: var(--accent); color: var(--accent); }
.fdlg__select { min-width: 200px; }
.fchip { position: relative; display: inline-flex; }
.fchip input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.fchip span {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.fchip:hover span { border-color: #5a6380; }
.fchip input:checked + span { background: var(--accent); border-color: transparent; color: var(--on-accent); font-weight: 800; }
.fchip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.fdlg__foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 24px; border-top: 1px solid var(--line-soft); }
@media (max-width: 599px) {
  /* Ponsel: bottom sheet selebar layar. */
  .fdlg { align-items: flex-end; padding: 0; }
  .fdlg__box { width: 100%; max-height: 90vh; border-radius: var(--radius-xl) var(--radius-xl) 0 0; transform: translateY(40px); padding-bottom: env(safe-area-inset-bottom, 0px); }
  .fdlg__head, .fdlg__body, .fdlg__foot { padding-left: 18px; padding-right: 18px; }
  .fdlg__foot .btn { flex: 1; }
}

.search-related { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: -8px 0 24px; color: var(--muted); font-size: 14px; }

/* ==========================================================================
   Hero (carousel)
   ========================================================================== */
.hero {
  position: relative;
  min-height: min(90vh, 880px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  overflow: hidden;
  background: var(--surface-1);
}
.hero__media { position: absolute; inset: 0; container-type: size; }
.hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
  opacity: 0;
  transform: scale(1.05);
  transition: opacity 0.9s ease, transform 9s linear;
}
.hero__img.is-loaded { opacity: 1; transform: scale(1); }
.hero__img--poster { object-position: center 20%; }
.hero__img.is-leaving,
.hero__video.is-leaving { opacity: 0; }
.hero__video { position: absolute; inset: 0; opacity: 0; transition: opacity 0.8s ease; pointer-events: none; }
.hero.is-playing .hero__video:not(.is-leaving) { opacity: 1; }
.hero__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, var(--ink) 0%, rgba(7, 9, 15, 0.8) 30%, rgba(7, 9, 15, 0) 68%),
    linear-gradient(0deg, var(--ink) 0%, rgba(7, 9, 15, 0) 45%),
    linear-gradient(180deg, rgba(7, 9, 15, 0.55) 0%, rgba(7, 9, 15, 0) 22%);
}
.preview-layer { position: absolute; inset: 0; overflow: hidden; }
.preview-layer video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.preview-layer iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: max(100cqw, 177.78cqh);
  height: max(100cqh, 56.25cqw);
  transform: translate(-50%, -50%);
  border: 0;
  pointer-events: none;
}
.hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
  padding: calc(var(--topbar-h) + 64px) var(--gutter) 200px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
}
.hero__info { flex: 0 1 640px; min-width: 0; }
/* `backwards`, bukan `both`: setelah selesai animasi tidak boleh menahan opacity/transform,
   supaya keadaan .is-shrunk (judul mengecil, tagline & sinopsis hilang) tetap berlaku. */
.hero__info.is-entering > * { animation: rise-in 0.7s var(--ease) backwards; }
.hero__info.is-entering > *:nth-child(2) { animation-delay: 0.05s; }
.hero__info.is-entering > *:nth-child(3) { animation-delay: 0.1s; }
.hero__info.is-entering > *:nth-child(n + 4) { animation-delay: 0.15s; }
@keyframes rise-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.hero__title {
  margin-top: 12px;
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(52px, 7vw, 104px);
  line-height: 0.92;
  letter-spacing: -0.015em;
  text-wrap: balance;
  transform-origin: left bottom;
  transition: transform 1.2s var(--ease);
}
.hero__tagline {
  margin-top: 10px;
  max-height: 4em;
  overflow: hidden;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 24px;
  color: var(--text-2);
  transition: opacity 0.8s ease, max-height 0.8s ease, margin-top 0.8s ease;
}
.hero .meta { margin-top: 16px; }
.hero__synopsis {
  margin-top: 14px;
  max-width: 560px;
  font-size: 16px;
  color: #d5d9e3;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: opacity 0.8s ease, max-height 0.8s ease;
  max-height: 8em;
}
.hero.is-shrunk .hero__title { transform: scale(0.72); }
.hero.is-shrunk .hero__synopsis,
.hero.is-shrunk .hero__tagline { opacity: 0; max-height: 0; margin-top: 0; }
.hero__buttons { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 10px; }
.hero__side { display: flex; flex-direction: column; align-items: flex-end; gap: 14px; }
.hero__peek {
  display: flex;
  align-items: center;
  gap: 12px;
  max-width: 300px;
  padding: 8px 14px 8px 8px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: rgba(7, 9, 15, 0.5);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  text-align: left;
  transition: background-color 0.2s;
}
.hero__peek:hover { background: rgba(23, 28, 42, 0.8); }
.hero__peek-img { flex: none; width: 72px; aspect-ratio: 16 / 9; border-radius: 6px; overflow: hidden; background: var(--surface-3); }
.hero__peek-img img { width: 100%; height: 100%; object-fit: cover; }
.hero__peek-text { min-width: 0; font-size: 12px; line-height: 1.35; }
.hero__peek-text span { display: block; color: var(--muted); }
.hero__peek-text b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hero__controls { display: flex; align-items: center; gap: 10px; }
.hero__segs { display: flex; gap: 6px; margin-right: 4px; }
.hero__seg {
  position: relative;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  background: transparent;
  transition: width 0.3s var(--ease);
}
.hero__seg::before,
.hero__seg span {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  height: 4px;
  margin-top: -2px;
  border-radius: 4px;
}
.hero__seg::before { right: 0; background: rgba(242, 244, 248, 0.28); }
.hero__seg span { width: 0; background: var(--text); }
.hero__seg.is-active { width: 44px; }
.hero__seg.is-active span { width: 100%; }
.hero__seg.is-active.is-running span { width: 0; animation: seg-fill var(--slide-ms, 9s) linear forwards; }
.hero.is-holding .hero__seg.is-active span { width: 100%; animation: none; }
.hero.is-paused .hero__seg.is-running span { animation-play-state: paused; }
@keyframes seg-fill { to { width: 100%; } }
.hero.is-loading .hero__info { display: grid; gap: 0; }
.hero.is-loading .skeleton-line { background: var(--surface-3); }

@media (max-width: 900px) {
  .hero { min-height: min(82vh, 640px); }
  .hero__inner { padding: calc(var(--topbar-h) + 40px) var(--gutter) 110px; justify-content: center; text-align: center; }
  .hero__info { flex-basis: 100%; }
  .hero__info .eyebrow, .hero .meta, .hero__buttons { justify-content: center; }
  .hero__synopsis { display: none; }
  .hero__tagline { font-size: 19px; }
  .hero__title { font-size: clamp(42px, 11vw, 64px); transform-origin: center bottom; }
  .hero__buttons .btn--lg { flex: 1; max-width: 240px; padding: 0 16px; }
  .hero__buttons .btn--icon { flex: none; }
  .hero__scrim {
    background:
      linear-gradient(0deg, var(--ink) 0%, rgba(7, 9, 15, 0.78) 34%, rgba(7, 9, 15, 0) 70%),
      linear-gradient(180deg, rgba(7, 9, 15, 0.5) 0%, rgba(7, 9, 15, 0) 25%);
  }
  .hero__side { width: 100%; align-items: center; }
  .hero__peek { display: none; }
  .hero__controls .icon-btn { display: none; }
  .hero__sound { position: absolute; right: var(--gutter); top: calc(var(--topbar-h) + 16px); }
}

/* ==========================================================================
   Rak (shelf) & kartu
   ========================================================================== */
.shelves { position: relative; z-index: 3; display: grid; gap: 44px; padding-bottom: 24px; }
.shelves--overlap { margin-top: -150px; }
@media (max-width: 900px) { .shelves { gap: 32px; } .shelves--overlap { margin-top: -70px; } }

.shelf { --n: 4; min-width: 0; }
.shelf--poster { --n: 7; }
.shelf--rank { --n: 6; }
@media (min-width: 1600px) { .shelf { --n: 5; } .shelf--poster { --n: 8; } .shelf--rank { --n: 7; } }
@media (max-width: 1199px) { .shelf { --n: 3.2; } .shelf--poster { --n: 5.3; } .shelf--rank { --n: 4.3; } }
@media (max-width: 899px) { .shelf { --n: 2.3; } .shelf--poster { --n: 4.3; } .shelf--rank { --n: 3.3; } }
@media (max-width: 599px) { .shelf { --n: 1.4; } .shelf--poster { --n: 2.7; } .shelf--rank { --n: 2.2; } }

.shelf__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  padding: 0 var(--gutter);
  margin-bottom: 14px;
}
.shelf__title { font-size: 20px; font-weight: 800; letter-spacing: -0.015em; }
.shelf__note { font-size: 13px; font-weight: 600; color: var(--muted); }
.shelf__head .segmented { margin-left: auto; }
.shelf__more { display: inline-flex; align-items: center; gap: 2px; margin-left: auto; font-size: 14px; font-weight: 600; color: var(--muted); }
.shelf__head .segmented + .shelf__more { margin-left: 0; }
.shelf__more svg { width: 16px; height: 16px; }
.shelf__more:hover { color: var(--text); }
/* Ponsel: judul + "Lihat semua" sebaris, tanggal di bawah judul, filter selebar layar di bawahnya. */
@media (max-width: 599px) {
  .shelf__head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 0 12px; }
  .shelf__title { grid-row: 1; grid-column: 1; font-size: 18px; }
  .shelf__more { grid-row: 1; grid-column: 2; margin-left: 0; white-space: nowrap; }
  .shelf__note { grid-row: 2; grid-column: 1 / -1; margin-top: 2px; }
  .shelf__head .segmented { grid-row: 3; grid-column: 1 / -1; margin: 12px 0 2px; display: flex; }
  .shelf__head .segmented button { flex: 1; }
}
.shelf__error { padding: 0 var(--gutter); color: var(--muted); }

.shelf__viewport { position: relative; }
.shelf__track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: calc((100% - (var(--n) - 1) * var(--gap)) / var(--n));
  gap: var(--gap);
  padding: 4px var(--gutter) 14px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter);
  scrollbar-width: none;
}
.shelf__track::-webkit-scrollbar { display: none; }
.shelf__item { scroll-snap-align: start; min-width: 0; }
.shelf__nav {
  position: absolute;
  top: calc(50% - 24px);
  z-index: 4;
  width: 44px;
  height: 44px;
  margin-top: -22px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(23, 28, 42, 0.85);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: var(--text);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transition: opacity 0.2s, background-color 0.2s;
}
.shelf__nav svg { width: 22px; height: 22px; }
.shelf__nav--prev { left: calc(var(--gutter) / 2 - 10px); }
.shelf__nav--next { right: calc(var(--gutter) / 2 - 10px); }
.shelf__nav:hover { background: var(--surface-3); }
.shelf__nav:disabled { opacity: 0 !important; pointer-events: none; }
.shelf__viewport.is-scrollable:hover .shelf__nav,
.shelf__nav:focus-visible { opacity: 1; }
@media (hover: none) { .shelf__nav { display: none; } }
.shelf--poster .shelf__nav,
.shelf--rank .shelf__nav { top: calc(50% - 30px); }

.card { position: relative; display: flex; flex-direction: column; gap: 10px; color: var(--text); border-radius: var(--radius); }
.card__art {
  position: relative;
  display: block;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--surface-2);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  transition: transform 0.3s var(--ease), box-shadow 0.3s;
}
.card--poster .card__art,
.card--rank .card__art { aspect-ratio: 2 / 3; }
.card__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.4s; }
.card__img.is-loaded { opacity: 1; }
.card__img--poster { object-position: center 22%; }
.card--landscape .card__art::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(7, 9, 15, 0.85) 0%, rgba(7, 9, 15, 0) 55%);
}
.card__title {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 12px;
  z-index: 1;
  font-family: var(--font-serif);
  font-size: clamp(20px, 1.7vw, 27px);
  line-height: 1;
  text-wrap: balance;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card--poster .card__title,
.card--rank .card__title { font-size: 22px; }
.card__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  z-index: 1;
  padding: 3px 8px;
  border-radius: 6px;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.card__progress { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; height: 4px; background: rgba(242, 244, 248, 0.22); }
.card__progress span { display: block; height: 100%; background: var(--accent); }
.card__caption { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; min-width: 0; }
.card__caption--stack { flex-direction: column; gap: 1px; }
.card__main { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.card__sub { color: var(--muted); white-space: nowrap; }
.card--rank { gap: 0; background: var(--surface-1); border: 1px solid #1c2233; border-radius: 14px; overflow: hidden; }
.card--rank .card__art { border-radius: 0; box-shadow: none; }
.card__rankbar { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; padding: 10px 12px 12px; }
.card__rank { font-family: var(--font-serif); font-size: 26px; line-height: 1; color: var(--accent); }
.card__rankbar .card__sub { font-size: 12px; font-weight: 600; }
@media (hover: hover) {
  .card:hover .card__art { transform: translateY(-3px); box-shadow: 0 18px 36px rgba(0, 0, 0, 0.55); }
}
.card:focus-visible { outline-offset: 4px; }

/* Grid poster (galeri, lebih banyak seperti ini) */
.poster-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 26px 18px; }
@media (max-width: 599px) { .poster-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 18px 12px; } }
.gallery__more { min-height: 1px; margin-top: 24px; }

/* Meta & genre */
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; font-size: 14px; color: var(--text-2); }
.meta__rating { font-weight: 800; color: var(--text); }
.meta__new { font-weight: 800; color: var(--accent); }
.genres { display: flex; flex-wrap: wrap; gap: 4px 0; font-size: 13px; color: var(--text-2); }
.genres span + span::before { content: '·'; margin: 0 8px; color: var(--dim); }

/* ==========================================================================
   Koleksi (hub) & Sorotan
   ========================================================================== */
.hubs-shelf .hub-grid { padding: 0 var(--gutter); }
.hub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: var(--gap); }
.hub {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 6px;
  min-height: 160px;
  padding: 22px 24px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  isolation: isolate;
}
.hub__img { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s var(--ease); }
.hub::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(7, 9, 15, 0.9) 0%, rgba(7, 9, 15, 0.55) 60%, rgba(7, 9, 15, 0.35) 100%);
}
.hub:hover .hub__img { transform: scale(1.05); }
.hub__name { font-family: var(--font-serif); font-style: italic; font-size: 34px; line-height: 1; text-wrap: balance; }
.hub__desc { font-size: 13px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.hub__count { position: absolute; top: 16px; right: 18px; font-size: 12px; font-weight: 800; color: var(--accent); }
.hub__count svg { width: 22px; height: 22px; color: var(--text); }
.hub--catalog { background: var(--surface-1); border: 1px dashed #3a4258; }
.hub--catalog::before { display: none; }
.hub-grid--page { margin-top: 8px; }

.spotlight {
  display: flex;
  flex-wrap: wrap;
  margin: 0 var(--gutter);
  border-radius: 22px;
  overflow: hidden;
  background: var(--surface-1);
  border: 1px solid #1c2233;
}
.spotlight__art { position: relative; flex: 1 1 520px; min-height: 360px; background: var(--surface-2); }
.spotlight__art img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.spotlight__art::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(16, 20, 31, 0) 60%, var(--surface-1) 100%); }
.spotlight__body { flex: 1 1 380px; min-width: 0; padding: clamp(26px, 4vw, 52px); display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.spotlight__title { font-family: var(--font-serif); font-weight: 400; font-size: clamp(40px, 4vw, 60px); line-height: 1; text-wrap: balance; }
.spotlight__synopsis { color: #d5d9e3; font-size: 16px; display: -webkit-box; -webkit-line-clamp: 5; -webkit-box-orient: vertical; overflow: hidden; }
.spotlight__buttons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
@media (max-width: 899px) {
  .spotlight__art { min-height: 220px; flex-basis: 100%; }
  .spotlight__art::after { background: linear-gradient(0deg, var(--surface-1) 0%, rgba(16, 20, 31, 0) 60%); }
}

/* ==========================================================================
   Kartu "intip" (hover)
   ========================================================================== */
.peek {
  position: absolute;
  z-index: 40;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface-2);
  box-shadow: 0 24px 50px rgba(0, 0, 0, 0.6), 0 0 0 1px var(--line-soft);
  transform: scale(0.82);
  opacity: 0;
  transition: transform 0.28s var(--ease), opacity 0.2s;
}
.peek.is-open { transform: none; opacity: 1; }
.peek.is-closing { transform: scale(0.9); opacity: 0; }
.peek__media { position: relative; aspect-ratio: 16 / 9; background: var(--surface-3); cursor: pointer; container-type: size; }
.peek__media img { width: 100%; height: 100%; object-fit: cover; }
.peek__media::after { content: ''; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(23, 28, 42, 0.95) 0%, rgba(23, 28, 42, 0) 55%); pointer-events: none; }
.peek__title { position: absolute; left: 14px; right: 50px; bottom: 10px; z-index: 2; font-family: var(--font-serif); font-size: 26px; line-height: 1; transition: opacity 0.4s; }
.peek__mute { position: absolute; right: 10px; bottom: 10px; z-index: 3; }
.peek .preview-layer { opacity: 0; transition: opacity 0.5s; z-index: 1; }
.peek.is-previewing .preview-layer { opacity: 1; }
.peek.is-previewing .peek__title { opacity: 0; }
.peek__info { display: grid; gap: 10px; padding: 14px 16px 16px; }
.peek__buttons { display: flex; align-items: center; gap: 8px; }
.peek__buttons .icon-btn { width: 38px; height: 38px; }
.peek__buttons .icon-btn svg { width: 17px; height: 17px; }
.peek .meta { font-size: 13px; }

/* ==========================================================================
   Sheet detail
   ========================================================================== */
.sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 40px 16px;
  background: rgba(3, 4, 8, 0);
  transition: background-color 0.3s;
}
.sheet-overlay.is-open { background: rgba(3, 4, 8, 0.72); }
.sheet {
  position: relative;
  max-width: 1120px;
  margin: 0 auto;
  border-radius: var(--radius-xl);
  overflow: hidden;
  background: var(--ink);
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7), 0 0 0 1px var(--line-soft);
  transform: translateY(30px) scale(0.98);
  opacity: 0;
  transition: transform 0.35s var(--ease), opacity 0.3s;
}
.sheet-overlay.is-open .sheet { transform: none; opacity: 1; }
.sheet-overlay.is-closing .sheet { transform: translateY(20px); opacity: 0; }
.sheet__hero { position: relative; min-height: 520px; display: flex; align-items: flex-end; container-type: inline-size; }
.sheet__hero .preview-layer { opacity: 0; transition: opacity 0.6s; container-type: size; }
.sheet.is-previewing .sheet__hero .preview-layer { opacity: 1; }
.sheet__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.sheet__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, var(--ink) 0%, rgba(7, 9, 15, 0.75) 35%, rgba(7, 9, 15, 0) 75%),
    linear-gradient(0deg, var(--ink) 0%, rgba(7, 9, 15, 0) 50%);
}
.sheet__close { position: absolute; top: 18px; right: 18px; z-index: 3; }
.sheet__hero-info { position: relative; z-index: 2; width: 100%; padding: 120px clamp(22px, 4vw, 52px) 30px; display: grid; gap: 12px; justify-items: start; }
.sheet__title { font-family: var(--font-serif); font-weight: 400; font-size: clamp(44px, 6vw, 84px); line-height: 0.95; max-width: 780px; text-wrap: balance; }
.sheet__tagline { font-family: var(--font-serif); font-style: italic; font-size: 22px; color: var(--text-2); }
.sheet__buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; width: 100%; margin-top: 10px; }
.sheet__buttons .rate > .icon-btn { border: 0; background: var(--glass-light); }
.sheet__buttons .rate > .icon-btn[data-value] { box-shadow: inset 0 0 0 1.5px var(--accent); }
.sheet__body { padding: 8px clamp(22px, 4vw, 52px) 48px; display: grid; gap: 40px; }
.sheet__cols { display: flex; flex-wrap: wrap; gap: 36px 52px; }
.sheet__main { flex: 999 1 520px; min-width: 0; display: grid; gap: 28px; align-content: start; }
.sheet__aside { flex: 1 1 280px; min-width: 0; display: grid; gap: 28px; align-content: start; }
.sheet__synopsis { font-size: 17px; color: #d5d9e3; max-width: 70ch; }
.sheet__h3 { font-size: 20px; font-weight: 800; letter-spacing: -0.015em; }
.sheet__section-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.sheet__season-name { color: var(--muted); font-weight: 700; }
.sheet__about { padding: 20px; border-radius: var(--radius-lg); background: var(--surface-1); border: 1px solid #1c2233; }
.sheet__about .sheet__h3 { margin-bottom: 12px; font-size: 17px; }
.sheet__about dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 9px 18px; font-size: 14px; }
.sheet__about dt { color: var(--muted); }
.sheet__aside .sheet__h3 { margin-bottom: 12px; font-size: 17px; }
.sheet__section .sheet__h3 + .poster-grid { margin-top: 16px; }

.cast { display: grid; gap: 12px; }
.cast__item { display: flex; align-items: center; gap: 12px; min-width: 0; }
.avatar {
  position: relative;
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--surface-3);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
  color: var(--text-2);
}
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.3s; }
.avatar img.is-loaded { opacity: 1; }
.cast__text { min-width: 0; }
.cast__name { display: block; font-weight: 700; font-size: 14px; }
.cast__role { display: block; font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.episode-list { display: grid; }
.episode {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  padding: 16px 12px;
  border-top: 1px solid #1c2233;
  border-radius: var(--radius);
  cursor: pointer;
  transition: background-color 0.2s;
}
.episode:hover,
.episode.is-current { background: var(--surface-1); }
.episode__thumb { position: relative; flex: 0 0 220px; aspect-ratio: 16 / 9; border-radius: 10px; overflow: hidden; background: var(--surface-3); }
.episode__thumb img { width: 100%; height: 100%; object-fit: cover; }
.episode__play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border-radius: 50%;
  border: 1px solid rgba(242, 244, 248, 0.5);
  background: rgba(7, 9, 15, 0.55);
  display: grid;
  place-items: center;
  opacity: 0.85;
  transition: opacity 0.2s, transform 0.2s;
}
.episode__play svg { width: 16px; height: 16px; }
.episode:hover .episode__play { opacity: 1; transform: scale(1.08); }
.episode__progress { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: rgba(242, 244, 248, 0.22); }
.episode__progress span { display: block; height: 100%; background: var(--accent); }
.episode__body { flex: 1 1 260px; min-width: 0; display: grid; gap: 6px; align-content: center; }
.episode__head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.episode__name { font-size: 16px; font-weight: 800; }
.episode__meta { font-size: 13px; color: var(--muted); }
.episode__desc { font-size: 14px; color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.episode__desc:empty { display: none; }
.episode__state { font-size: 12px; font-weight: 800; color: var(--accent); }

@media (max-width: 700px) {
  .sheet-overlay { padding: 0; }
  .sheet { border-radius: 0; min-height: 100%; }
  .sheet__hero { min-height: 440px; }
  .sheet__hero-info { padding-top: 90px; }
  .sheet__buttons .btn--lg { flex: 1 1 100%; }
  .episode { padding: 14px 4px; }
  .episode__thumb { flex-basis: 140px; }
  .episode__body { flex-basis: 150px; }
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  display: grid;
  justify-items: center;
  gap: 16px;
  margin-top: 40px;
  padding: 44px var(--gutter) 36px;
  border-top: 1px solid #1c2233;
  text-align: center;
}
.footer__logo .logo__word { font-size: 22px; }
.footer__tagline { color: var(--muted); font-family: var(--font-serif); font-style: italic; font-size: 19px; }
.footer__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; font-size: 14px; }
.footer__links a,
.footer__linkbtn { color: var(--muted); line-height: 1.5; }
.footer__links a:hover,
.footer__linkbtn:hover { color: var(--text); }
.footer__linkbtn { padding: 0; border: 0; background: none; font-size: 14px; }
.footer__social { display: flex; gap: 10px; }
.footer__social a {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--text-2);
}
.footer__social a:hover { color: var(--text); border-color: #5a6380; }
.footer__social svg { width: 20px; height: 20px; }
.footer__lang { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 0 6px 0 14px; border: 1px solid var(--line); border-radius: 999px; color: var(--text-2); }
.footer__lang svg { width: 16px; height: 16px; }
.footer__lang select { min-height: 40px; padding: 0 8px 0 0; border: 0; background: transparent; font-size: 14px; font-weight: 600; }
.footer__lang option { background: var(--surface-1); }
.footer__copy { max-width: 640px; font-size: 13px; color: var(--dim); }

/* ==========================================================================
   Player (/watch)
   ========================================================================== */
.watch {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: #000;
  color: var(--text);
  font-size: clamp(13px, 1.05vw, 18px);
  user-select: none;
  overflow: hidden;
}
.watch.is-idle { cursor: none; }
/* Lapisan isi player. Di HP yang masih portrait (termasuk di dalam layar penuh bila kunci landscape
   ditolak), lapisan ini yang diputar 90° agar film tampil landscape; elemen layar penuhnya tidak
   (browser membuang transform pada elemen fullscreen). */
.watch__stage { position: absolute; inset: 0; overflow: hidden; container: watch / size; }
.watch.is-rotated .watch__stage {
  right: auto;
  bottom: auto;
  width: 100vh;
  width: 100dvh;
  height: 100vw;
  transform: translateX(100vw) rotate(90deg);
  transform-origin: 0 0;
}
.watch__video { position: absolute; inset: 0; width: 100%; height: 100%; background: #000; }
.watch__subs {
  position: absolute;
  left: 5%;
  right: 5%;
  bottom: 7%;
  z-index: 8;
  text-align: center;
  pointer-events: none;
  transition: bottom 0.3s ease;
}
.watch:not(.is-idle):not(.is-loading) .watch__subs { bottom: 20%; }
.watch__subs span {
  display: inline-block;
  font-size: clamp(17px, 2.3vw, 42px);
  font-weight: 600;
  line-height: 1.25;
  white-space: pre-line;
  text-shadow: #000 0 0 7px, #000 1px 1px 2px, #000 -1px -1px 2px;
}
/* Tombol "Laporkan masalah" tetap tampil saat loading: justru saat video tidak mau diputar
   pengguna perlu melaporkannya. */
.watch.is-loading .watch__bottom { display: none; }

.watch__loading {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.3em;
  padding: 0 8%;
  background: #000 center / cover no-repeat;
  text-align: center;
  transition: opacity 0.5s;
}
.watch__loading::before { content: ''; position: absolute; inset: 0; background: rgba(7, 9, 15, 0.8); }
.watch__loading > * { position: relative; }
.watch__loading.is-hidden { opacity: 0; pointer-events: none; }
.watch__progress-ring { position: relative; width: 6.5em; height: 6.5em; display: grid; place-items: center; }
.watch__progress-ring .spinner { position: absolute; inset: 0; width: 100%; height: 100%; }
.watch__percent { font-size: 1.2em; font-weight: 800; }
.watch__loading-title { font-family: var(--font-serif); font-size: 2.4em; line-height: 1; }
.watch__loading-hint { color: var(--text); font-size: 1.05em; font-weight: 700; }
.watch__loading-note { margin-top: -0.6em; max-width: 30em; color: var(--muted); font-size: 0.9em; }

.watch__error {
  position: absolute;
  inset: 0;
  z-index: 6;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1em;
  padding: 0 10%;
  background: var(--ink);
  text-align: center;
}
.watch.has-error .watch__error { display: flex; }
.watch__error h2 { font-family: var(--font-serif); font-weight: 400; font-size: 2.6em; line-height: 1; }
.watch__error p { color: var(--text-2); max-width: 40em; }
.watch__error-code { font-size: 0.85em; color: var(--dim); }

.watch__controls { position: absolute; inset: 0; z-index: 10; transition: opacity 0.4s; }
.watch.is-idle .watch__controls { opacity: 0; }
.watch__top {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 1em;
  padding: 1.4em 2em 3em;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.65), transparent);
}
.watch__back {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  min-height: 44px;
  padding: 0 0.9em 0 0.4em;
  border: 0;
  border-radius: 999px;
  background: transparent;
  font-weight: 700;
}
.watch__back svg { width: 1.5em; height: 1.5em; }
.watch__back:hover { background: rgba(242, 244, 248, 0.12); }
.watch__title { flex: 1; min-width: 0; text-align: center; font-size: 1em; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.watch__title b { color: var(--text); font-weight: 800; }
.watch__icon {
  position: relative;
  display: grid;
  place-items: center;
  width: 2.8em;
  height: 2.8em;
  min-width: 44px;
  min-height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: none;
  color: var(--text);
  transition: background-color 0.15s, transform 0.15s;
  flex: none;
}
.watch__icon svg { width: 55%; height: 55%; }
.watch__icon:hover { background: rgba(242, 244, 248, 0.12); }
.watch__icon--main { width: 3.4em; height: 3.4em; background: var(--text); color: var(--ink); }
.watch__icon--main:hover { background: #fff; transform: scale(1.05); }
.watch__pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  min-height: 44px;
  padding: 0 1.1em;
  border: 0;
  border-radius: 999px;
  background: rgba(242, 244, 248, 0.14);
  font-weight: 700;
  font-size: 0.95em;
}
.watch__pill svg { width: 1.1em; height: 1.1em; }
.watch__pill:hover { background: rgba(242, 244, 248, 0.24); }

.watch__bottom {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 4em 2em 1.5em;
  background: linear-gradient(0deg, rgba(0, 0, 0, 0.8), transparent);
}
.watch__timeline-row { display: flex; align-items: center; gap: 1em; margin-bottom: 1em; }
.watch__timeline { position: relative; flex: 1; height: 1.6em; display: flex; align-items: center; cursor: pointer; touch-action: none; }
.watch__track { position: relative; width: 100%; height: 0.35em; border-radius: 1em; background: rgba(242, 244, 248, 0.22); transition: height 0.15s; }
.watch__timeline:hover .watch__track { height: 0.5em; }
.watch__buffered,
.watch__played { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 1em; }
.watch__buffered { background: rgba(242, 244, 248, 0.35); }
.watch__played { background: var(--accent); }
.watch__scrubber {
  position: absolute;
  top: 50%;
  width: 1.05em;
  height: 1.05em;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 0.3em rgba(244, 192, 86, 0.25);
  transform: translate(-50%, -50%);
  transition: transform 0.15s;
}
.watch__timeline:hover .watch__scrubber { transform: translate(-50%, -50%) scale(1.25); }
.watch__hover-time {
  position: absolute;
  bottom: 2em;
  transform: translateX(-50%);
  padding: 0.3em 0.6em;
  border-radius: 6px;
  background: var(--surface-2);
  font-size: 0.9em;
  font-weight: 700;
  display: none;
}
.watch__timeline:hover .watch__hover-time { display: block; }
.watch__time { min-width: 4.5em; text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text-2); }
.watch__buttons { display: flex; align-items: center; gap: 0.5em; }
.watch__volume { display: flex; align-items: center; gap: 0.4em; }
.watch__volume-slider { position: relative; width: 6.5em; height: 0.35em; margin-right: 0.6em; border-radius: 1em; background: rgba(242, 244, 248, 0.25); cursor: pointer; touch-action: none; }
.watch__volume-slider::before { content: ''; position: absolute; inset: -0.8em 0; }
.watch__volume-fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 1em; background: var(--text); }
.watch__volume-knob { position: absolute; top: 50%; width: 0.95em; height: 0.95em; border-radius: 50%; background: var(--text); transform: translate(-50%, -50%); }

.watch__panel {
  position: absolute;
  bottom: 6.5em;
  right: 2em;
  z-index: 3;
  max-width: calc(100% - 4em);
  border-radius: var(--radius-lg);
  background: rgba(16, 20, 31, 0.96);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: none;
}
.watch__panel.is-open { display: block; animation: fade-in 0.15s ease; }
.audio-subs { display: grid; grid-template-columns: repeat(2, minmax(10em, auto)); gap: 0 1em; padding: 1.2em 1em; }
.audio-subs h3 { padding: 0 1em 0.6em 1.8em; font-size: 1em; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }
.audio-subs ul li button {
  display: flex;
  align-items: center;
  gap: 0.6em;
  width: 100%;
  padding: 0.5em 1em 0.5em 0;
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--text-2);
  font-size: 1.05em;
  text-align: left;
}
.audio-subs ul li button:hover { color: var(--text); }
.audio-subs .check { width: 1.2em; height: 1.2em; visibility: hidden; color: var(--accent); }
.audio-subs .check svg { width: 100%; height: 100%; }
.audio-subs ul li button[aria-checked='true'] { color: var(--text); font-weight: 800; }
.audio-subs ul li button[aria-checked='true'] .check { visibility: visible; }
.speed-panel { padding: 1.4em 2em 1.8em; min-width: min(30em, 80vw); }
.speed-panel h3 { margin-bottom: 1.2em; font-size: 1em; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: 0.1em; }
.speed-scale { display: flex; flex-wrap: wrap; gap: 0.5em; }
.speed-scale button { min-height: 40px; padding: 0 1em; border: 1px solid var(--line); border-radius: 999px; background: transparent; color: var(--text-2); font-weight: 700; }
.speed-scale button:hover { color: var(--text); border-color: #5a6380; }
.speed-scale button[aria-checked='true'] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

.watch__flash {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 11;
  width: 5.5em;
  height: 5.5em;
  margin: -2.75em 0 0 -2.75em;
  padding: 1.5em;
  border-radius: 50%;
  background: rgba(7, 9, 15, 0.55);
  pointer-events: none;
  opacity: 0;
}
.watch__flash svg { width: 100%; height: 100%; }
.watch__flash.is-animating { animation: flash 0.6s ease-out; }
@keyframes flash { 0% { opacity: 1; transform: scale(0.8); } 100% { opacity: 0; transform: scale(1.4); } }

.watch__paused {
  position: absolute;
  inset: 0;
  z-index: 9;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2em;
  padding: 0 7% 0 7%;
  background: linear-gradient(90deg, rgba(7, 9, 15, 0.9) 0%, rgba(7, 9, 15, 0.6) 50%, rgba(7, 9, 15, 0.35) 100%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 1s ease;
}
.watch.is-paused-long .watch__paused { opacity: 1; }
.watch.is-paused-long .watch__controls { opacity: 0; }
.watch__paused-text { flex: 0 1 36em; min-width: 0; }
.watch__paused small { color: var(--text-2); font-size: 1.1em; font-weight: 600; }
.watch__paused h2 { margin: 0.2em 0 0.3em; font-family: var(--font-serif); font-weight: 400; font-size: 3.6em; line-height: 0.95; }
.watch__paused .meta { font-size: 1.05em; }
.watch__paused p { margin-top: 0.7em; font-size: 1.1em; color: #d5d9e3; }
.watch__cast { flex: 0 1 20em; padding: 1.4em; border-radius: var(--radius-lg); background: rgba(16, 20, 31, 0.72); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); border: 1px solid rgba(255, 255, 255, 0.1); }
.watch__cast .eyebrow { margin-bottom: 1em; }
.watch.is-loading .watch__paused,
.watch.has-error .watch__paused { opacity: 0; }

/* Player pendek (HP landscape / diputar): info jeda ringkas, pemeran tetap di kanan. */
@container watch (max-height: 520px) {
  .watch__paused { flex-wrap: nowrap; gap: 1.4em; padding: 0 5%; }
  .watch__paused-text { flex: 1 1 auto; }
  .watch__paused h2 { font-size: 2.3em; }
  .watch__paused .meta { font-size: 0.95em; }
  .watch__paused p {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 1em;
  }
  .watch__cast { display: block; flex: 0 0 15.5em; max-height: calc(100% - 2em); overflow: hidden; padding: 1em; font-size: 0.85em; }
  .watch__cast .eyebrow { margin-bottom: 0.7em; }
  .watch__cast .cast { gap: 8px; }
  .watch__cast .cast__item:nth-child(n+4) { display: none; }
  .watch__cast .avatar { width: 34px; height: 34px; }
  .watch__panel { bottom: 5.5em; max-height: calc(100% - 7em); overflow-y: auto; }
  .watch__loading-title { font-size: 1.8em; }
}
/* Tata letak player mengikuti ukuran player sendiri (container query), bukan ukuran layar: saat HP
   portrait player diputar, layar 390px tetapi player 844x390; saat landscape sungguhan sebaliknya. */
@container watch (max-width: 700px) {
  .watch__top { padding: 0.8em 0.8em 2.4em; }
  .watch__back span { display: none; }
  .watch__bottom { padding: 3em 0.8em calc(0.8em + env(safe-area-inset-bottom, 0px)); }
  .watch__buttons { gap: 0.1em; }
  .watch__volume-slider,
  .watch__pill span { display: none; }
  .watch__cast { display: none; }
  .watch__paused h2 { font-size: 2.6em; }
  .watch__panel { right: 0.8em; max-width: calc(100% - 1.6em); }
  .audio-subs { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Toast
   ========================================================================== */
#toast-root {
  position: fixed;
  left: 50%;
  bottom: calc(24px + var(--tabbar-h));
  z-index: 400;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transform: translateX(-50%);
  pointer-events: none;
}
.toast {
  max-width: min(90vw, 520px);
  padding: 12px 18px;
  border-radius: var(--radius);
  background: var(--surface-2);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  font-size: 14px;
  font-weight: 600;
  animation: toast-in 0.3s ease both;
}
.toast--error { border-color: rgba(255, 143, 128, 0.5); }
.toast.is-leaving { animation: toast-out 0.3s ease both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(12px); } }

/* ==========================================================================
   Disclaimer (kunjungan pertama)
   ========================================================================== */
.gate {
  position: fixed;
  inset: 0;
  z-index: 500;
  overflow-y: auto;
  display: grid;
  place-items: center;
  padding: 24px 16px;
  background:
    radial-gradient(ellipse 60% 50% at 80% 0%, rgba(244, 227, 181, 0.12), transparent 70%),
    rgba(7, 9, 15, 0.97);
  animation: fade-in 0.3s ease both;
}
.gate.is-leaving { animation: fade-out 0.3s ease both; }
@keyframes fade-out { to { opacity: 0; } }
.gate__box {
  width: min(640px, 100%);
  display: grid;
  gap: 20px;
  padding: clamp(22px, 4vw, 40px);
  border-radius: var(--radius-xl);
  background: var(--surface-1);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.gate__logo .logo__word { font-size: 24px; }
.gate__releases { display: grid; gap: 12px; }
.gate__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px rgba(244, 192, 86, 0.2); }
.gate__list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.gate__release { display: grid; gap: 4px; min-width: 0; }
.gate__release img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 10px; background: var(--surface-3); }
.gate__release-title { font-size: 12px; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gate__release-year { font-size: 12px; color: var(--muted); }
.gate__skeleton { aspect-ratio: 2 / 3; border-radius: 10px; background: var(--surface-3); animation: pulse 1.6s infinite; }
.gate__title { font-family: var(--font-serif); font-weight: 400; font-size: clamp(32px, 5vw, 44px); line-height: 1; }
.gate__text { display: grid; gap: 10px; color: var(--text-2); font-size: 15px; }
.gate__text strong { color: var(--text); }
.gate__text a { color: var(--accent); text-decoration: underline; }
.gate__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.gate__actions .btn { flex: 1 1 180px; }
.gate__left { color: var(--text-2); font-size: 16px; }
@media (max-width: 480px) { .gate__list { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; } .gate__release-title, .gate__release-year { display: none; } }

/* ==========================================================================
   Banner cookie
   ========================================================================== */
.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: calc(16px + var(--tabbar-h));
  z-index: 300;
  max-width: 920px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 24px;
  padding: 18px 20px;
  border-radius: var(--radius-lg);
  background: rgba(16, 20, 31, 0.96);
  -webkit-backdrop-filter: blur(20px);
  backdrop-filter: blur(20px);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  animation: toast-in 0.3s ease both;
}
.cookie-banner__text { flex: 1 1 360px; display: grid; gap: 4px; }
.cookie-banner__text h2 { font-size: 16px; font-weight: 800; }
.cookie-banner__text p { font-size: 14px; color: var(--text-2); }
.cookie-banner__text a { color: var(--accent); text-decoration: underline; }
.cookie-banner__actions { display: flex; flex-wrap: wrap; gap: 10px; }

/* ==========================================================================
   Dialog laporan masalah
   ========================================================================== */
.report-dialog {
  position: fixed;
  inset: 0;
  z-index: 600;
  display: grid;
  place-items: center;
  padding: 16px;
  overflow-y: auto;
  background: rgba(3, 4, 8, 0.72);
  font-size: 15px;
  user-select: text;
}
.report-dialog__box {
  width: min(480px, 100%);
  display: grid;
  gap: 14px;
  padding: 24px;
  border-radius: var(--radius-xl);
  background: var(--surface-1);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.report-dialog h2 { font-family: var(--font-serif); font-weight: 400; font-size: 32px; line-height: 1; }
.report-dialog__context { color: var(--muted); font-size: 14px; }
.report-dialog fieldset { display: grid; gap: 8px; margin: 0; padding: 0; border: 0; }
.report-dialog legend { margin-bottom: 8px; font-weight: 700; }
.report-dialog fieldset label { display: flex; align-items: center; gap: 10px; color: var(--text-2); }
.report-dialog input[type='radio'] { accent-color: var(--accent); width: 18px; height: 18px; }
.report-dialog__field,
.legal-form label { display: grid; gap: 6px; font-size: 14px; color: var(--text-2); }
.report-dialog textarea,
.report-dialog input[type='email'],
.legal-form textarea,
.legal-form input,
.legal-form select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--text);
  font-size: 15px;
}
.report-dialog textarea:focus,
.report-dialog input:focus,
.legal-form textarea:focus,
.legal-form input:focus,
.legal-form select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(244, 192, 86, 0.2); }
.report-dialog__error { color: var(--danger); font-size: 14px; }
.report-dialog__actions { display: flex; justify-content: flex-end; gap: 10px; }
.report-dialog__box { max-height: 100%; overflow-y: auto; overscroll-behavior: contain; }
/* Player pendek: form dipadatkan agar tombol Kirim terlihat tanpa menggulir. */
@container watch (max-height: 520px) {
  .report-dialog { padding: 8px; }
  .report-dialog__box { width: min(620px, 100%); gap: 8px; padding: 14px 18px; }
  .report-dialog h2 { font-size: 22px; }
  .report-dialog fieldset { grid-template-columns: 1fr 1fr; gap: 4px 16px; }
  .report-dialog legend { margin-bottom: 4px; }
  .report-dialog textarea { height: 3.2em; min-height: 0; resize: none; }
  .report-dialog__field { gap: 4px; }
  .report-dialog textarea, .report-dialog input[type='email'] { padding: 7px 10px; }
}

/* ==========================================================================
   Akun: tombol di header, halaman Masuk/Daftar, Akun saya
   ========================================================================== */
.account-slot { display: flex; align-items: center; margin-left: 4px; }
.account__signin { min-height: 38px; padding: 0 14px; gap: 6px; font-size: 14px; }
.account__signin svg { width: 16px; height: 16px; }
.account__btn { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: transparent; }
.account__btn:hover .avatar--initial { box-shadow: 0 0 0 3px rgba(244, 192, 86, 0.3); }
.avatar.avatar--initial {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #d99a2b);
  color: var(--on-accent);
  font-size: 15px;
  font-weight: 800;
  transition: box-shadow 0.2s;
}
.avatar--lg.avatar--initial { width: 72px; height: 72px; font-size: 30px; }
.account__menu { width: min(300px, calc(100vw - 32px)); }
.account__who { display: flex; align-items: center; gap: 12px; padding: 8px 10px 14px; margin-bottom: 6px; border-bottom: 1px solid var(--line-soft); min-width: 0; }
.account__who > span:last-child { display: grid; gap: 4px; min-width: 0; }
.account__email { font-weight: 700; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.account__role {
  justify-self: start;
  display: inline-block;
  padding: 1px 8px;
  border-radius: 999px;
  background: rgba(244, 192, 86, 0.16);
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  vertical-align: middle;
}
.account__item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 10px;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 600;
  text-align: left;
}
.account__item svg { width: 18px; height: 18px; }
.account__item:hover, .account__item:focus-visible { background: var(--surface-2); color: var(--text); }
@media (max-width: 600px) {
  .account__signin { padding: 0 12px; }
  .topbar.is-searching .account-slot { display: none; }
}

/* Form bersama */
.field { display: grid; gap: 6px; }
.field__label { font-size: 14px; font-weight: 700; color: var(--text-2); }
.input {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--text);
  font-size: 16px; /* >= 16px: iOS tidak memperbesar halaman saat fokus */
}
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(244, 192, 86, 0.2); }
.field__pw { position: relative; }
.field__pw .input { padding-right: 52px; }
.field__toggle {
  position: absolute;
  top: 50%;
  right: 4px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 40px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  transform: translateY(-50%);
}
.field__toggle svg { width: 20px; height: 20px; }
.field__toggle:hover { color: var(--text); }
.field__hint { color: var(--dim); font-size: 13px; }
.form-error {
  padding: 10px 12px;
  border: 1px solid rgba(255, 143, 128, 0.4);
  border-radius: var(--radius);
  background: rgba(255, 143, 128, 0.08);
  color: var(--danger);
  font-size: 14px;
  font-weight: 600;
}
.form-error:focus { outline: none; }
.btn--danger { background: var(--danger); color: var(--ink); font-weight: 800; }
.btn--danger:hover { background: #ffa79b; }
.btn--danger-outline { color: var(--danger); box-shadow: inset 0 0 0 1px rgba(255, 143, 128, 0.5); }
.btn--danger-outline:hover { background: rgba(255, 143, 128, 0.08); }
.btn:disabled { opacity: 0.6; cursor: progress; }

/* Masuk / Daftar */
.auth {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: calc(var(--topbar-h) + 32px) var(--gutter) calc(48px + var(--tabbar-h));
  background: radial-gradient(60% 50% at 50% 0%, rgba(244, 192, 86, 0.08), transparent 70%);
}
.auth__card {
  width: min(440px, 100%);
  padding: 34px 32px 28px;
  border-radius: var(--radius-xl);
  background: var(--surface-1);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.auth__title { font-family: var(--font-serif); font-weight: 400; font-size: clamp(36px, 6vw, 44px); line-height: 1.05; }
.auth__sub { margin-top: 10px; color: var(--muted); font-size: 14px; }
.auth__form { display: grid; gap: 16px; margin-top: 24px; }
.auth__form .btn { width: 100%; margin-top: 4px; }
.auth__agree { color: var(--dim); font-size: 13px; }
.auth__agree a, .auth__foot a { color: var(--accent); font-weight: 700; }
.auth__agree a:hover, .auth__foot a:hover { text-decoration: underline; }
.auth__foot { display: grid; gap: 6px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line-soft); color: var(--text-2); font-size: 14px; text-align: center; }
.auth__muted { color: var(--dim); font-size: 13px; }
@media (max-width: 480px) { .auth__card { padding: 26px 20px 22px; } }

/* Akun saya */
.account-page { max-width: 820px; }
.account-page__head { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 22px; margin-bottom: 28px; }
.account-page__head .page__title { font-size: clamp(36px, 5vw, 52px); }
.account-page__email { margin-top: 6px; font-weight: 700; word-break: break-all; }
.account-page__signout { margin-left: auto; }
.panel { display: grid; gap: 12px; margin-top: 18px; padding: 24px; border-radius: var(--radius-lg); background: var(--surface-1); border: 1px solid var(--line); }
.panel__title { font-size: 18px; font-weight: 800; }
.panel__text { color: var(--muted); font-size: 14px; }
.panel__form { display: grid; gap: 14px; max-width: 440px; }
.panel__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.panel--danger { border-color: rgba(255, 143, 128, 0.3); }
.sync-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.sync-stat { display: grid; gap: 2px; min-width: 0; padding: 14px 16px; border-radius: var(--radius); background: var(--surface-2); border: 1px solid var(--line); }
a.sync-stat:hover { border-color: var(--accent); }
.sync-stats strong { font-family: var(--font-serif); font-weight: 400; font-size: 34px; line-height: 1; color: var(--accent); }
.sync-stats span { color: var(--muted); font-size: 13px; font-weight: 700; }
@media (max-width: 600px) {
  .account-page__signout { margin-left: 0; }
  .panel { padding: 20px 18px; }
}

/* ==========================================================================
   404
   ========================================================================== */
.not-found {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: calc(var(--topbar-h) + 40px) var(--gutter) 40px;
  text-align: center;
  background: radial-gradient(ellipse 50% 40% at 50% 30%, rgba(244, 227, 181, 0.08), transparent 70%);
}
.not-found h1 { font-family: var(--font-serif); font-weight: 400; font-size: clamp(52px, 9vw, 110px); line-height: 0.95; }
.not-found p:not(.eyebrow) { max-width: 560px; font-size: clamp(15px, 1.6vw, 19px); color: var(--text-2); }

/* ==========================================================================
   Halaman legal / FAQ (dirender server: /privacy, /terms, /faq, /disclaimer)
   ========================================================================== */
.legal-header {
  position: sticky;
  top: 0;
  z-index: 10;
  height: 72px;
  padding: 0 var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: rgba(7, 9, 15, 0.86);
  -webkit-backdrop-filter: blur(18px);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line-soft);
}
.legal-header .btn { min-height: 40px; font-size: 14px; }
.legal {
  max-width: 820px;
  margin: 0 auto;
  padding: 56px 20px 24px;
  color: var(--text-2);
  font-size: 16px;
  line-height: 1.7;
}
.legal h1 { font-family: var(--font-serif); font-weight: 400; color: var(--text); font-size: clamp(40px, 6vw, 64px); line-height: 1; margin-bottom: 12px; }
.legal .legal__updated { color: var(--dim); font-size: 14px; margin-bottom: 28px; }
.legal h2 { color: var(--text); font-size: 21px; font-weight: 800; letter-spacing: -0.01em; margin: 36px 0 10px; }
.legal p + p, .legal ul + p, .legal p + ul { margin-top: 12px; }
.legal ul { list-style: disc; padding-left: 1.4em; }
.legal li + li { margin-top: 6px; }
.legal a:not(.btn) { color: var(--accent); text-decoration: underline; }
.legal .callout {
  padding: 16px 18px;
  border-radius: var(--radius);
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  color: var(--text-2);
}
.legal .cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.faq-list { display: grid; gap: 8px; margin-top: 12px; }
.faq-list details { border-radius: var(--radius); background: var(--surface-1); border: 1px solid #1c2233; }
.faq-list summary {
  position: relative;
  padding: 18px 56px 18px 20px;
  list-style: none;
  color: var(--text);
  font-size: clamp(16px, 2vw, 18px);
  font-weight: 700;
  cursor: pointer;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: '+';
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent);
  font-size: 28px;
  font-weight: 400;
  transition: transform 0.25s;
}
.faq-list details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq-list summary:hover { background: var(--surface-2); border-radius: var(--radius); }
.faq-list details > div { padding: 0 20px 18px; font-size: 15px; }
.legal-form { display: grid; gap: 14px; margin-top: 14px; }
.legal-form .form-status { font-size: 14px; }
.legal-form .form-status.is-error { color: var(--danger); }
.legal-form .form-status.is-ok { color: var(--ok); }
.legal-form .btn { justify-self: start; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
