/* Mate Cineplay · tema "ruang screening" (gelap) dan "kertas naskah" (terang) */

/* ---------- Token warna ---------- */
:root, :root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0e0f13;
  --panel: #16181f;
  --panel-2: #1c1f28;
  --line: #2a2e3a;
  --line-strong: #3d4252;
  --text: #ecebe6;
  --muted: #9a9caa;
  --faint: #6b6e7c;
  --accent: #f2b544;          /* lampu marquee */
  --accent-text: #f2b544;     /* aksen untuk teks & garis */
  --accent-ink: #1a1405;
  --accent-soft: rgba(242,181,68,.08);
  --ok: #4fbf7a;
  --warn: #f2b544;
  --bad: #ef5b5b;
  --topbar: rgba(14,15,19,.92);
  --shadow: 0 0 40px rgba(0,0,0,.6);
  --glow: rgba(242,181,68,.10);
  --r-operator: #93a9ff; --r-editor: #c7a3ff; --r-qc: #6fd3c7; --r-talent: #f4a3c1;
}
:root[data-theme="light"] {
  color-scheme: light;
  --bg: #f6f4ef;
  --panel: #ffffff;
  --panel-2: #f1eee7;
  --line: #e2ddd2;
  --line-strong: #cbc4b5;
  --text: #1d1c19;
  --muted: #64625b;
  --faint: #9a968c;
  --accent: #f2b544;
  --accent-text: #8a5a00;
  --accent-ink: #1a1405;
  --accent-soft: rgba(242,181,68,.14);
  --ok: #1f8a4c;
  --warn: #9a6400;
  --bad: #c93636;
  --topbar: rgba(246,244,239,.92);
  --shadow: 0 0 40px rgba(0,0,0,.18);
  --glow: rgba(242,181,68,.22);
  --r-operator: #3653c9; --r-editor: #7339c4; --r-qc: #127a6f; --r-talent: #b8336a;
}
/* Belum memilih tema: ikuti pengaturan HP/laptop */
@media (prefers-color-scheme: light) {
  :root:not([data-theme]) {
    color-scheme: light;
    --bg: #f6f4ef; --panel: #ffffff; --panel-2: #f1eee7; --line: #e2ddd2; --line-strong: #cbc4b5;
    --text: #1d1c19; --muted: #64625b; --faint: #9a968c; --accent-text: #8a5a00; --accent-soft: rgba(242,181,68,.14);
    --ok: #1f8a4c; --warn: #9a6400; --bad: #c93636; --topbar: rgba(246,244,239,.92); --shadow: 0 0 40px rgba(0,0,0,.18);
    --glow: rgba(242,181,68,.22);
    --r-operator: #3653c9; --r-editor: #7339c4; --r-qc: #127a6f; --r-talent: #b8336a;
  }
}
:root {
  --radius: 12px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Bricolage Grotesque", var(--font);
  --safe-b: env(safe-area-inset-bottom, 0px);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 15px/1.55 var(--font); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .9em; background: var(--panel-2); padding: 1px 6px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -.01em; margin: 0 0 .5em; }
h2 { font-size: 1.4rem; } h3 { font-size: 1.1rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 18px 0; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }

/* ---------- Kerangka ---------- */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--panel); border-right: 1px solid var(--line); padding: 20px 14px 16px 26px;
  display: flex; flex-direction: column;
}
/* perforasi film di tepi kiri sidebar */
.sidebar::before {
  content: ""; position: absolute; left: 8px; top: 0; bottom: 0; width: 8px;
  background: radial-gradient(circle, var(--line) 2.5px, transparent 3px) center top / 8px 18px repeat-y;
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font-family: var(--display); font-size: 1.15rem; margin-bottom: 18px; }
.brand:hover { text-decoration: none; }
.brand strong { color: var(--accent-text); }
.brand-mark { width: 26px; height: 26px; border-radius: 7px; background:
  linear-gradient(135deg, var(--accent) 0 50%, transparent 50%), var(--panel-2); border: 1px solid var(--line); }
.brand-lg { font-size: 1.6rem; justify-content: center; margin-bottom: 4px; }
.brand-lg .brand-mark { width: 34px; height: 34px; }
.nav-group { text-transform: uppercase; font-size: .72rem; letter-spacing: .12em; color: var(--muted); margin: 16px 8px 6px; }
.nav-item { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px; color: var(--text); font-size: .93rem; }
.nav-item:hover { background: var(--panel-2); text-decoration: none; }
.nav-item.is-active { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.nav-item.is-soon { color: var(--faint); cursor: default; }
.nav-item.is-soon em { flex: 0 0 auto; white-space: nowrap; font-style: normal; font-size: .68rem; border: 1px solid var(--line); border-radius: 99px; padding: 0 7px; }
.sidebar-foot { margin-top: auto; padding: 16px 8px 0; font-size: .75rem; color: var(--faint); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 14px; padding: 16px 28px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--topbar); backdrop-filter: blur(6px); z-index: 5; }
.page-title { font-size: 1.25rem; margin: 0; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me { display: flex; align-items: center; gap: 10px; }
.me form { margin: 0; }
.me-name { color: var(--text); font-weight: 500; }
.menu-btn { display: none; background: none; border: 1px solid var(--line); color: var(--text); border-radius: 8px; padding: 4px 10px; font-size: 1.1rem; cursor: pointer; }
.content { padding: 24px 28px 48px; max-width: 1180px; width: 100%; }

/* Tombol tema */
.theme-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel-2); color: var(--text); cursor: pointer; padding: 0; }
.theme-btn:hover { border-color: var(--line-strong); }
.theme-btn svg { width: 17px; height: 17px; }
.theme-btn .i-sun { display: none; }
:root[data-theme="dark"] .theme-btn .i-sun { display: block; }
:root[data-theme="dark"] .theme-btn .i-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) .theme-btn .i-sun { display: block; }
  :root:not([data-theme]) .theme-btn .i-moon { display: none; }
}
.guest-theme { position: fixed; top: 14px; right: 14px; }

/* ---------- Komponen ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 18px; }
.card-accent { border-color: var(--accent); box-shadow: inset 4px 0 0 var(--accent); }
.card.empty { text-align: center; padding: 48px 22px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.grid-2.align-start { align-items: start; }
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar p { margin: 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: 500 .92rem var(--font);
  background: var(--panel-2); color: var(--text); border: 1px solid var(--line); border-radius: 9px; padding: 8px 14px; cursor: pointer; }
.btn:hover { border-color: var(--line-strong); text-decoration: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); font-weight: 600; }
.btn-primary:hover { filter: brightness(1.06); border-color: var(--accent); }
.btn-ghost { background: transparent; }
.btn-danger { color: var(--bad); }
.btn-sm { padding: 5px 10px; font-size: .85rem; }
.btn-block { width: 100%; padding: 11px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.field { display: block; margin-bottom: 14px; border: 0; padding: 0; }
.field > span, .field > legend { display: block; font-size: .85rem; color: var(--muted); margin-bottom: 6px; padding: 0; }
input:not([type=checkbox]):not([type=radio]):not([type=file]), select, textarea {
  width: 100%; background: var(--bg); color: var(--text); border: 1px solid var(--line); border-radius: 9px; padding: 9px 11px; font: inherit; }
textarea { resize: vertical; min-height: 80px; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: none; }
input[type=file] { color: var(--muted); font-size: .85rem; max-width: 100%; }
.input-sm { padding: 5px 8px !important; max-width: 110px; }
textarea.code { font-family: ui-monospace, Menlo, monospace; font-size: .8rem; }
.choice { display: flex; gap: 10px; align-items: flex-start; padding: 9px 10px; border: 1px solid var(--line); border-radius: 9px; margin-bottom: 8px; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.choice input { margin-top: 4px; accent-color: var(--accent); }
.choice span { display: flex; flex-direction: column; }
.choice small { color: var(--muted); font-size: .82rem; }
.form-narrow { max-width: 620px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.inline-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin: 0; }
.inline-form select, .inline-form input { width: auto; }

.alert { border-radius: 10px; padding: 11px 14px; margin-bottom: 14px; border: 1px solid; font-size: .92rem; }
.alert-success { border-color: color-mix(in srgb, var(--ok) 45%, transparent); background: color-mix(in srgb, var(--ok) 9%, transparent); }
.alert-error { border-color: color-mix(in srgb, var(--bad) 50%, transparent); background: color-mix(in srgb, var(--bad) 8%, transparent); }
.alert-warning { border-color: color-mix(in srgb, var(--accent) 60%, transparent); background: var(--accent-soft); }

.badge { display: inline-block; font-size: .74rem; font-weight: 500; padding: 1px 8px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.badge-sutradara { border-color: var(--accent-text); color: var(--accent-text); }
.badge-operator { border-color: var(--r-operator); color: var(--r-operator); }
.badge-editor { border-color: var(--r-editor); color: var(--r-editor); }
.badge-qc { border-color: var(--r-qc); color: var(--r-qc); }
.badge-talent { border-color: var(--r-talent); color: var(--r-talent); }
.badge-ok { border-color: var(--ok); color: var(--ok); }
.badge-warn { border-color: var(--warn); color: var(--warn); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.card .table-wrap { border: 0; background: transparent; margin: 0 -6px; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th { text-align: left; font-weight: 500; color: var(--muted); font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.table td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.table-compact td, .table-compact th { padding: 7px 8px; }
.table .is-muted td { opacity: .55; }
.actions { display: flex; gap: 6px; justify-content: flex-end; flex-wrap: wrap; }
.actions form { margin: 0; }

.dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0 0 14px; }
.dl dt { color: var(--muted); font-size: .88rem; }
.dl dd { margin: 0; }

.checks { list-style: none; padding: 0; margin: 0 0 14px; }
.check { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.check:last-child { border-bottom: 0; }
.check-icon { flex: 0 0 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 700; }
.check-ok .check-icon { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.check-warn .check-icon { background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); }
.check-fail .check-icon { background: color-mix(in srgb, var(--bad) 15%, transparent); color: var(--bad); }
.check-label { font-size: .93rem; }
.check-fix { font-size: .84rem; color: var(--muted); margin-top: 2px; }

.hero { margin-bottom: 18px; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: .72rem; color: var(--accent-text); margin: 0 0 4px; }
.hero-title { font-size: 2rem; margin: 0 0 6px; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.stat-label { font-size: .82rem; color: var(--muted); }
.stat-value { font-family: var(--display); font-size: 1.6rem; font-weight: 700; margin-top: 2px; }
.stat-value small { font-size: .9rem; color: var(--muted); font-weight: 500; }
.meter { height: 6px; border-radius: 99px; background: var(--panel-2); margin-top: 10px; overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--ok); border-radius: 99px; }
.meter span.is-hot { background: var(--accent); }

.roadmap { list-style: none; counter-reset: rm; padding: 0; margin: 0; }
.roadmap li { position: relative; padding: 0 0 14px 34px; display: flex; flex-direction: column; }
.roadmap li::before { counter-increment: rm; content: counter(rm); position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%; border: 1px solid var(--line); display: grid; place-items: center; font-size: .75rem; color: var(--muted); }
.roadmap li.is-done::before { content: "✓"; background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.roadmap li.is-gate::before { content: "◆"; color: var(--accent-text); border-color: var(--accent-text); }
.roadmap span { color: var(--muted); font-size: .88rem; }

.temp-pass { display: flex; align-items: center; gap: 10px; margin: 10px 0; }
.temp-pass code { font-size: 1.25rem; padding: 6px 12px; letter-spacing: .04em; }

/* Kartu install-ke-layar-utama */
.install-card { display: none; }
.install-card.is-visible { display: block; }

/* ---------- Halaman tamu ---------- */
body.guest { display: grid; place-items: center; min-height: 100vh; padding: 24px 16px;
  background: radial-gradient(ellipse at top, var(--glow), transparent 55%), var(--bg); }
.guest-wrap { width: 100%; max-width: 420px; }
.guest-wrap.is-wide { max-width: 1040px; }
.tagline { text-align: center; color: var(--muted); margin: 0 0 22px; }
.form-card h2 { margin-bottom: 14px; }
.install-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; align-items: start; }

/* ---------- Menu bawah (mode aplikasi HP) ---------- */
.tabbar { display: none; }
.only-mobile { display: none !important; }

/* ---------- Mobile ---------- */
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 30; left: 0; top: 0; width: 272px; padding-bottom: calc(16px + var(--safe-b)); transform: translateX(-100%); transition: transform .2s ease; box-shadow: var(--shadow); }
  body.nav-open .sidebar { transform: none; }
  body.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 25; }
  .menu-btn { display: none; }
  .topbar { padding: 12px 16px; padding-top: calc(12px + env(safe-area-inset-top, 0px)); }
  .me-name, .me form { display: none; }
  .only-mobile { display: flex !important; }
  .content { padding: 18px 16px calc(96px + var(--safe-b)); }
  .grid-2, .install-grid { grid-template-columns: 1fr; }
  .hero-title { font-size: 1.6rem; }
  .card { padding: 18px 16px; }

  .tabbar {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
    background: var(--topbar); backdrop-filter: blur(10px); border-top: 1px solid var(--line);
    padding: 6px 6px calc(6px + var(--safe-b));
  }
  .tab { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 2px; border-radius: 10px;
    color: var(--muted); font-size: .7rem; font-weight: 500; background: none; border: 0; font-family: inherit; cursor: pointer; }
  .tab:hover { text-decoration: none; }
  .tab svg { width: 22px; height: 22px; }
  .tab.is-active { color: var(--accent-text); }

  /* tabel jadi kartu bertumpuk */
  .table-stack thead { display: none; }
  .table-stack, .table-stack tbody, .table-stack tr, .table-stack td { display: block; width: 100%; }
  .table-stack tr { padding: 12px 14px; border-bottom: 1px solid var(--line); }
  .table-stack tr:last-child { border-bottom: 0; }
  .table-stack td { border: 0; padding: 3px 0; }
  .table-stack td[data-label]::before { content: attr(data-label) ": "; color: var(--muted); font-size: .82rem; }
  .table-stack td.actions { display: flex; justify-content: flex-start; padding-top: 8px; }
}

/* Saat dibuka sebagai aplikasi terpasang (tanpa address bar) */
@media (display-mode: standalone) {
  body { overscroll-behavior-y: none; }
}

/* ---------- Fase 1 · Bible ---------- */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0 18px; }
.form-wide { max-width: 920px; }
.form-wide h3 { margin-top: 8px; }
.card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.card-head h3 { margin: 0; }
.card-head .dl { margin: 0; flex: 1; }
.lead { font-size: 1.05rem; margin: 2px 0 6px; }
.group-title { margin: 22px 0 10px; }
.ok-text { color: var(--ok); }
.warn-text { color: var(--warn); font-style: normal; }
.clamp { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin: 6px 0; }
details { margin: 8px 0; }
details summary { cursor: pointer; color: var(--accent-text); font-size: .9rem; }
details[open] summary { margin-bottom: 6px; }
.list { list-style: none; padding: 0; margin: 0; }
.list li { padding: 8px 0; border-bottom: 1px solid var(--line); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.list li:last-child { border-bottom: 0; }
.list .inline-form { margin-left: auto; }
.checks-compact .check { padding: 6px 0; }
.danger-zone { margin: 8px 0 24px; text-align: right; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.card-link { display: block; color: var(--text); margin: 0; transition: border-color .15s ease, transform .15s ease; }
.card-link:hover { border-color: var(--line-strong); text-decoration: none; transform: translateY(-1px); }
.card-link h3 { margin: 6px 0 2px; }
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.meta-row { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 10px; }
.badge-status-aktif { border-color: var(--ok); color: var(--ok); }
.badge-status-draft { border-color: var(--accent-text); color: var(--accent-text); }

.people { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; }
.person { display: flex; gap: 12px; align-items: center; padding: 10px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel); color: var(--text); }
.person:hover { border-color: var(--line-strong); text-decoration: none; }
.person img, .avatar { flex: 0 0 56px; width: 56px; height: 56px; border-radius: 12px; object-fit: cover; }
.avatar { display: grid; place-items: center; background: var(--panel-2); color: var(--muted); font-family: var(--display); font-size: 1.3rem; }
.person-text { display: flex; flex-direction: column; min-width: 0; }
.card .people .person { background: var(--bg); }

.talent-card { display: flex; gap: 14px; align-items: center; }
.portrait { flex: 0 0 76px; width: 76px; height: 96px; border-radius: 12px; object-fit: cover; }
.portrait-empty { display: grid; place-items: center; background: var(--panel-2); color: var(--muted); font-family: var(--display); font-size: 1.6rem; }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.tag { font-size: .72rem; padding: 1px 8px; border-radius: 99px; background: var(--panel-2); color: var(--muted); }
.tag.is-ok { color: var(--ok); background: color-mix(in srgb, var(--ok) 12%, transparent); }
.tag.is-warn { color: var(--warn); background: color-mix(in srgb, var(--warn) 12%, transparent); }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin: 10px 0 12px; }
.gallery-audio { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.thumb { margin: 0; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--bg); }
.thumb.is-official { border-color: var(--ok); box-shadow: 0 0 0 1px var(--ok); }
.thumb img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; background: var(--panel-2); }
.angle-card .thumb img { aspect-ratio: 9 / 16; max-height: 360px; }
.thumb audio { width: 100%; display: block; padding: 8px 8px 0; }
.thumb figcaption { padding: 6px 8px 8px; display: flex; flex-direction: column; gap: 4px; }
.thumb-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.thumb-actions form { margin: 0; }
.file-chip { display: block; padding: 18px 10px; text-align: center; word-break: break-all; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent-text); font: inherit; font-size: .8rem; cursor: pointer; }
.link-btn.is-danger { color: var(--bad); }
.upload-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 10px; border: 1px dashed var(--line-strong); border-radius: 10px; margin: 0; }
.upload-row select, .upload-row input:not([type=file]) { width: auto; flex: 1 1 160px; }

.prompt-box { position: relative; margin: 10px 0 12px; }
.prompt-box textarea { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .8rem; line-height: 1.5; background: var(--panel-2); padding-bottom: 44px; }
.prompt-box .btn { position: absolute; right: 10px; bottom: 12px; }
.steps { margin: 6px 0 10px; padding-left: 20px; color: var(--muted); }
.steps li { margin: 2px 0; }

.angle-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0 14px; }
.angle-key { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 7px; background: var(--accent); color: var(--accent-ink); font-size: .9rem; margin-right: 4px; }
.angle-desc { display: flex; gap: 8px; margin: 10px 0 4px; }
.angle-card .gallery { grid-template-columns: minmax(0, 220px); }

.loc-card { padding: 0; overflow: hidden; }
.loc-card > :not(.loc-cover) { margin-left: 18px; margin-right: 18px; }
.loc-card .card-top { margin-top: 12px; }
.loc-card p { margin-bottom: 14px; }
.loc-cover { display: block; width: 100%; height: 160px; object-fit: cover; background: var(--panel-2); }
.loc-cover-empty { display: grid; place-items: center; color: var(--faint); font-size: .85rem; }

@media (max-width: 860px) {
  .grid-3, .angle-grid { grid-template-columns: 1fr; }
  .card-head { flex-wrap: wrap; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .people { grid-template-columns: 1fr; }
  .prompt-box .btn { position: static; margin-top: 8px; width: 100%; }
  .prompt-box textarea { padding-bottom: 9px; }
}

.stats-inline { margin-bottom: 8px; }
.stats-inline .stat { background: var(--bg); }
.stat-link { color: var(--text); }
.stat-link:hover { border-color: var(--line-strong); text-decoration: none; }

/* ---------- Fase 2 · Produksi ---------- */
:root { --st-draft: var(--faint); --st-prompt: #6d8cff; --st-sbw: #f2b544; --st-sba: #b07cff; --st-gen: #3fb5a8; --st-rev: #ef5b5b; --st-ok: #4fbf7a; }
:root[data-theme="light"] { --st-prompt: #3653c9; --st-sbw: #9a6400; --st-sba: #7339c4; --st-gen: #127a6f; --st-rev: #c93636; --st-ok: #1f8a4c; }
.bad-text { color: var(--bad); }
.crumbs { display: flex; gap: 6px 14px; flex-wrap: wrap; margin: -6px 0 14px; }
.crumbs a.is-current { color: var(--text); font-weight: 600; }
.stat-text { font-size: 1.15rem; }
fieldset.plain { border: 0; padding: 0; margin: 0; min-width: 0; }
pre.script { white-space: pre-wrap; font: .8rem/1.55 ui-monospace, SFMono-Regular, Menlo, monospace; background: var(--panel-2); padding: 12px; border-radius: 10px; max-height: 480px; overflow: auto; }
.progress-log { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: var(--panel-2); font-size: .88rem; display: grid; gap: 4px; }

.pill { display: inline-block; font-size: .74rem; font-weight: 600; padding: 2px 9px; border-radius: 99px; border: 1px solid currentColor; white-space: nowrap; }
.st-draft { color: var(--st-draft); } .st-prompt_siap { color: var(--st-prompt); } .st-storyboard_menunggu { color: var(--st-sbw); }
.st-storyboard_disetujui { color: var(--st-sba); } .st-generated { color: var(--st-gen); } .st-revisi { color: var(--st-rev); } .st-lolos_qc { color: var(--st-ok); }
.bar .st-draft, .bar span.st-draft { background: var(--st-draft); } .bar .st-prompt_siap { background: var(--st-prompt); } .bar .st-storyboard_menunggu { background: var(--st-sbw); }
.bar .st-storyboard_disetujui { background: var(--st-sba); } .bar .st-generated { background: var(--st-gen); } .bar .st-revisi { background: var(--st-rev); } .bar .st-lolos_qc { background: var(--st-ok); }

.strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-bottom: 18px; }
.strip-card { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); color: var(--text); position: relative; }
.strip-card:hover { border-color: var(--line-strong); text-decoration: none; }
.strip-num { font-family: var(--display); font-size: 1.5rem; font-weight: 700; line-height: 1; }
.strip-card .badge { align-self: flex-start; }
.strip-card .meter { margin-top: 4px; }
.status-siap_edit, .status-editing { border-color: var(--st-gen); } .status-review_final { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.status-siap_posting, .status-tayang { border-color: var(--ok); }
.strip-status { color: var(--muted); }

.bar-row { display: grid; grid-template-columns: 120px 1fr auto; gap: 10px; align-items: center; padding: 5px 0; font-size: .9rem; }
.bar { height: 8px; border-radius: 99px; background: var(--panel-2); overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--accent); border-radius: 99px; }

.anatomy { display: flex; gap: 4px; flex-wrap: wrap; }
.seg { padding: 10px 12px; border-radius: 8px; font-size: .82rem; border: 1px solid var(--line); color: var(--text); }
.seg-edit { background: var(--panel-2); color: var(--muted); }
.seg-gen { flex: 1 1 140px; border-color: currentColor; font-weight: 600; }
.seg-gen:hover { text-decoration: none; background: var(--accent-soft); }
.seg-empty { flex: 1; color: var(--faint); border-style: dashed; }

.pipeline { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 12px; }
.pipe-step { font-size: .76rem; padding: 4px 10px; border-radius: 99px; background: var(--panel-2); color: var(--faint); }
.pipe-step.is-done { color: var(--ok); }
.pipe-step.is-now { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.pipe-step.is-revisi { background: var(--bad); color: #fff; font-weight: 600; }
.gate p { margin: 0; }
.qc-form .field { margin-bottom: 10px; }
.alert ul { margin: 6px 0 0; padding-left: 18px; }

.word-meter { min-width: 200px; text-align: right; }
.word-meter .meter { margin-top: 4px; }
.meter span.is-bad { background: var(--bad); }
.beats { display: grid; gap: 10px; }
.beat { display: grid; grid-template-columns: 92px 1fr; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--bg); position: relative; }
.beat-time { display: grid; gap: 8px; align-content: start; }
.beat-time label span { display: block; font-size: .75rem; color: var(--muted); margin-bottom: 2px; }
.beat-time input { text-align: center; font-weight: 600; }
.beat-main .field { margin-bottom: 8px; }
.beat-del { position: absolute; right: 12px; bottom: 10px; }
.beat .grid-3, .beat .grid-2 { gap: 0 10px; }

.notes { list-style: none; padding: 0; margin: 10px 0; display: grid; gap: 8px; }
.notes li { display: flex; gap: 8px; flex-wrap: wrap; align-items: baseline; padding: 10px; border-radius: 10px; background: var(--panel-2); }
.notes li.is-resolved { opacity: .55; }
.notes form { margin-left: auto; }
details.sub { margin-left: 10px; }

.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 10px; }
.kan-col { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 120px; }
.kan-head { font-size: .95rem; margin: 2px 2px 4px; display: flex; justify-content: space-between; align-items: center; }
.kan-card { display: flex; flex-direction: column; gap: 3px; padding: 10px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--text); }
.kan-card:hover { border-color: var(--line-strong); text-decoration: none; }
.kan-card img { width: 100%; height: 110px; object-fit: cover; border-radius: 8px; margin-bottom: 4px; }

.desk-card { margin: 0; }
.desk-img { width: 100%; aspect-ratio: 9 / 16; max-height: 320px; object-fit: cover; border-radius: 10px; background: var(--panel-2); }
.mini-strip { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.mini { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); font-size: .8rem; font-weight: 600; color: var(--muted); }
.mini:hover { text-decoration: none; border-color: var(--line-strong); }
.mini.status-produksi { color: var(--st-prompt); border-color: var(--st-prompt); }
.mini.status-siap_edit, .mini.status-editing { color: var(--st-gen); border-color: var(--st-gen); }
.mini.status-review_final { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.mini.status-siap_posting, .mini.status-tayang { background: color-mix(in srgb, var(--ok) 18%, transparent); color: var(--ok); border-color: var(--ok); }

.patch { padding: 12px 0; border-bottom: 1px solid var(--line); }
.patch.is-resolved { opacity: .55; }
.patch-line { display: grid; gap: 4px; margin: 6px 0 0 10px; }
.patch-line code { display: block; padding: 8px 10px; white-space: pre-wrap; }
.patch-line .btn { justify-self: start; }
.side-line { padding: 8px 0; border-bottom: 1px solid var(--line); }
.side-line p { margin: 4px 0 0; }

@media (max-width: 860px) {
  .beat { grid-template-columns: 1fr; }
  .beat-time { grid-template-columns: 1fr 1fr; }
  .beat-del { position: static; justify-self: end; }
  .bar-row { grid-template-columns: 90px 1fr; }
  .bar-row > :last-child { grid-column: 2; }
  .kanban { grid-auto-columns: 82%; }
  .word-meter { text-align: left; width: 100%; }
}
