/* AmaresO Studio — gaya dasar (ink gelap + kuning brand, Plus Jakarta Sans) */
@font-face { font-family: 'PJS'; src: url('/static/fonts/PlusJakartaSans.woff2') format('woff2'), url('/static/fonts/PlusJakartaSans.ttf') format('truetype'); font-weight: 200 800; font-display: swap; }
@font-face { font-family: 'PJS'; src: url('/static/fonts/PlusJakartaSans-Italic.woff2') format('woff2'), url('/static/fonts/PlusJakartaSans-Italic.ttf') format('truetype'); font-weight: 200 800; font-style: italic; font-display: swap; }
@font-face { font-family: 'Silk'; src: url('/static/fonts/Silkscreen-Regular.woff2') format('woff2'), url('/static/fonts/Silkscreen-Regular.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'JBM'; src: url('/static/fonts/JetBrainsMono.woff2') format('woff2'), url('/static/fonts/JetBrainsMono.ttf') format('truetype'); font-weight: 100 800; font-display: swap; }

:root {
  --ink: #15130F; --ink2: #0E0D0A; --surface: #1E1B15; --raised: #27231B;
  --line: rgba(255,227,91,.14); --line-soft: rgba(255,255,255,.09); --line-strong: rgba(255,255,255,.16);
  --text: #F4F0E4; --muted: #A39B89; --muted2: #CFC8B6;
  --yellow: #FFE35B; --yellow-deep: #D9B921; --on-yellow: #1A1708;
  --ok: #8FE3A5; --warn: #FFB454; --bad: #FF7F70; --cyan: #7FE3D0;
  --radius: 14px; --radius-sm: 10px;
  --font: 'PJS', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --mono: 'JBM', ui-monospace, Menlo, Consolas, monospace;
  --pixel: 'Silk', var(--mono);
  color-scheme: dark;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; } /* atribut hidden selalu menang atas display komponen (mis. .chip) */
html, body { margin: 0; background: var(--ink); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.5; }
a { color: var(--yellow); }
a:hover { color: #FFF0A0; }
img, video { max-width: 100%; }
h1, h2, h3 { margin: 0; line-height: 1.15; text-wrap: balance; }
h1 { font-size: 34px; font-weight: 800; letter-spacing: -.015em; }
h2 { font-size: 22px; font-weight: 800; }
h3 { font-size: 17px; font-weight: 800; }
p { margin: 0; }
code, .mono { font-family: var(--mono); }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }
.pixel { font-family: var(--pixel); }
.muted { color: var(--muted); }
.muted2 { color: var(--muted2); }
.yellow { color: var(--yellow); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.nowrap { white-space: nowrap; }
.hidden { display: none !important; }
.stack { display: flex; flex-direction: column; gap: var(--gap, 16px); }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--gap, 12px); }
.between { justify-content: space-between; }
.grow { flex: 1 1 auto; min-width: 0; }
.wrap { max-width: 1232px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }

/* Header & footer */
.top { border-bottom: 1px solid var(--line-soft); position: sticky; top: 0; z-index: 20; background: rgba(21,19,15,.94); backdrop-filter: blur(8px); }
.top .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; padding-block: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-weight: 800; font-size: 18px; }
.brand img { width: 34px; height: 34px; border-radius: 8px; }
.brand b { color: var(--yellow); font-weight: 800; }
.nav { display: flex; flex-wrap: wrap; gap: 18px; margin-left: auto; font-size: 14px; }
.nav a { color: var(--muted2); text-decoration: none; }
.nav a.on, .nav a:hover { color: var(--text); font-weight: 700; }
.credit-pill { display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border-radius: 999px; background: var(--raised); border: 1px solid rgba(255,227,91,.25); font-size: 13px; font-weight: 700; color: var(--text); text-decoration: none; }
.credit-pill i { width: 9px; height: 9px; background: var(--yellow); transform: rotate(45deg); display: inline-block; }
.foot { border-top: 1px solid var(--line-soft); margin-top: 56px; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 10px 24px; padding-block: 24px; font-size: 13px; color: var(--muted); }
.foot a { color: var(--muted2); text-decoration: none; }
main.page { padding-block: 32px 40px; }

/* Tombol */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: var(--radius-sm); border: 1px solid transparent; background: var(--yellow); color: var(--on-yellow); font: inherit; font-weight: 800; font-size: 15px; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { background: #FFEA80; color: var(--on-yellow); }
.btn:disabled, .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
.btn.ghost { background: transparent; color: var(--text); border-color: var(--line-strong); font-weight: 700; }
.btn.ghost:hover { border-color: var(--muted); }
.btn.outline { background: transparent; color: var(--yellow); border-color: var(--yellow); }
.btn.danger { background: transparent; color: var(--bad); border-color: rgba(255,127,112,.5); }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 13px; }
.btn.lg { min-height: 52px; font-size: 16px; padding: 0 22px; }
.btn.block { width: 100%; }
.linkbtn { background: none; border: 0; color: var(--yellow); font: inherit; cursor: pointer; padding: 0; text-decoration: underline; }

/* Kartu & panel */
.card { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 22px; }
.card.tight { padding: 16px; }
.card.accent { border-color: rgba(255,227,91,.22); }
.panel-title { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-family: var(--mono); }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(var(--min, 280px), 1fr)); }
.split { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.split > .main { flex: 999 1 560px; min-width: 0; }
.split > .side { flex: 1 1 320px; min-width: 0; }

/* Chip & status */
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 700; background: var(--raised); color: var(--muted2); border: 1px solid var(--line-soft); }
.chip.ok { background: rgba(143,227,165,.12); color: var(--ok); border-color: transparent; }
.chip.warn { background: rgba(255,180,84,.12); color: var(--warn); border-color: transparent; }
.chip.bad, .chip.error { background: rgba(255,127,112,.12); color: var(--bad); border-color: transparent; }
.chip.y { background: var(--yellow); color: var(--on-yellow); border-color: transparent; }
.tag { font-size: 12px; font-weight: 800; padding: 4px 10px; border-radius: 999px; background: var(--raised); color: var(--yellow); border: 1px solid rgba(255,227,91,.3); }
.tag.soon { color: var(--muted2); border-color: var(--line-strong); background: transparent; }

/* Form */
.field { display: flex; flex-direction: column; gap: 7px; }
.field > label, .field > .label, legend { font-size: 14px; font-weight: 700; }
.field .help { font-size: 12.5px; color: var(--muted); }
.field .err { font-size: 12.5px; color: var(--bad); }
.input, select, textarea { width: 100%; min-height: 46px; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--ink); border: 1px solid var(--line-strong); color: var(--text); font: inherit; font-size: 15px; }
textarea { min-height: 84px; resize: vertical; line-height: 1.45; }
.input:focus, select:focus, textarea:focus { border-color: var(--yellow); outline: none; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.cards-pick { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.cards-pick label { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 12px; border: 1px solid var(--line-strong); cursor: pointer; }
.cards-pick label:has(input:checked) { border: 2px solid var(--yellow); background: var(--raised); padding: 11px; }
.cards-pick .sw { height: 56px; border-radius: 8px; }
.cards-pick .t { display: flex; gap: 8px; align-items: center; font-weight: 800; }
.cards-pick .d { font-size: 12.5px; color: var(--muted2); }
/* kartu presenter AI (tugas MT #6): foto 9:16 dipotong ke rasio 4:5, wajah di atas */
.cards-pick.avatars { grid-template-columns: repeat(auto-fill, minmax(136px, 1fr)); }
.cards-pick.avatars img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 12%; border-radius: 8px; background: var(--ink2); }
.cards-pick.avatars .t { font-size: 14px; }
.cards-pick.avatars .d { font-size: 12px; line-height: 1.35; }
/* Kualitas video AI (tugas MT #22): 3 kartu bergambar sejajar, juga di HP; harga di dasar kartu */
.q-pick { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.q-pick .q-img { width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 45%; border-radius: 8px; background: var(--ink2); }
.q-pick .q-res { font-weight: 600; font-size: 12px; color: var(--muted); }
.q-pick .q-price { margin-top: auto; font-weight: 800; font-size: 13.5px; color: var(--yellow); }
@media (max-width: 640px) {
  .q-pick { gap: 8px; }
  .q-pick label { padding: 8px; gap: 6px; }
  .q-pick label:has(input:checked) { padding: 7px; }
  .q-pick .t { flex-wrap: wrap; gap: 4px 6px; font-size: 14px; }
  .q-pick .d { font-size: 11.5px; }
  .q-pick .q-price { font-size: 12.5px; }
}
.checks { display: flex; flex-wrap: wrap; gap: 10px; }
.checks label { display: flex; align-items: center; gap: 10px; min-height: 46px; padding: 0 16px; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); font-weight: 700; cursor: pointer; }
.checks label:has(input:checked) { border-color: var(--yellow); background: var(--raised); }
input[type=checkbox], input[type=radio] { accent-color: var(--yellow); width: 18px; height: 18px; }
/* Bentuk video (tugas MT #16): ikon bentuk (persegi panjang sesuai rasio) di atas nama tempat posting; 3 kartu sejajar, juga di HP */
.f-pick { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.f-pick .f-shape { height: 64px; display: flex; align-items: center; justify-content: center; border-radius: 8px; background: var(--ink2); }
.f-pick .f-shape i { display: block; height: 48px; border: 2.5px solid var(--muted); border-radius: 5px; box-sizing: border-box; }
.f-pick label:has(input:checked) .f-shape i { border-color: var(--yellow); background: rgba(255,227,91,.12); }
.f-pick .f-9x16 { aspect-ratio: 9 / 16; }
.f-pick .f-4x5 { aspect-ratio: 4 / 5; }
.f-pick .f-1x1 { aspect-ratio: 1 / 1; }
.f-pick .f-ratio { display: inline-block; margin-left: 4px; font-family: var(--mono); font-size: 11.5px; color: var(--muted); }
@media (max-width: 640px) {
  .f-pick { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .f-pick label { padding: 8px; gap: 6px; }
  .f-pick label:has(input:checked) { padding: 7px; }
  .f-pick .t { flex-wrap: wrap; gap: 4px 6px; font-size: 14px; line-height: 1.2; }
  .f-pick .d { font-size: 11.5px; }
  .f-pick .f-shape { height: 52px; }
  .f-pick .f-shape i { height: 38px; }
}
.drop { display: flex; align-items: center; gap: 14px; padding: 12px; border: 1px dashed var(--line-strong); border-radius: 12px; }
.drop img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; background: var(--ink2); }
.form-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.notice { padding: 12px 16px; border-radius: 12px; background: var(--raised); border: 1px solid var(--line); font-size: 14px; }
.notice.bad { border-color: rgba(255,127,112,.4); color: #FFD3CC; background: rgba(255,127,112,.08); }
.notice.ok { border-color: rgba(143,227,165,.35); color: #D7F6E0; background: rgba(143,227,165,.07); }

/* Tabel */
.table-wrap { overflow-x: auto; border: 1px solid var(--line-soft); border-radius: var(--radius); }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 640px; }
table.t th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding: 12px 14px; background: var(--surface); border-bottom: 1px solid var(--line-soft); }
table.t td { padding: 12px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: top; }
table.t tr:last-child td { border-bottom: 0; }
table.t td.num, table.t th.num { text-align: right; font-variant-numeric: tabular-nums; }

/* Beranda */
.hero { display: flex; flex-wrap: wrap; gap: 28px 48px; align-items: flex-start; }
.hero h1 { font-size: clamp(34px, 5vw, 52px); line-height: 1.04; }
.hero h1 span { color: var(--yellow); }
.hero .lead { font-size: 17px; color: var(--muted2); max-width: 540px; }
.usp { display: flex; gap: 14px; align-items: baseline; padding: 14px 18px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-soft); font-size: 14px; }
.usp b { flex: none; width: 128px; color: var(--yellow); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.filters a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--text); text-decoration: none; font-size: 13px; font-weight: 600; }
.filters a.on { background: var(--yellow); border-color: var(--yellow); color: var(--on-yellow); font-weight: 800; }
.tool { display: flex; flex-direction: column; gap: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line-soft); overflow: hidden; text-decoration: none; color: var(--text); }
.tool:hover { border-color: rgba(255,227,91,.4); color: var(--text); }
.tool.off { opacity: .55; }
.tool .cover { position: relative; height: 240px; background: var(--ink2); overflow: hidden; }
.tool .cover video, .tool .cover img { width: 100%; height: 100%; object-fit: cover; object-position: center 30%; display: block; }
.tool .cover .ph { width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; }
.tool .cover .ph b { font-family: var(--pixel); font-size: 24px; color: rgba(255,255,255,.88); font-weight: 400; }
.tool .cover .badge { position: absolute; left: 10px; bottom: 10px; font-size: 12px; font-weight: 700; background: rgba(11,10,8,.82); padding: 4px 8px; border-radius: 6px; }
.tool .cover .ratio { position: absolute; right: 10px; bottom: 10px; font-family: var(--mono); font-size: 11px; background: rgba(11,10,8,.82); padding: 4px 7px; border-radius: 6px; }
.tool .cover .tag { position: absolute; right: 10px; top: 10px; background: rgba(21,19,15,.85); }
.tool .body { display: flex; flex-direction: column; gap: 8px; padding: 0 20px; }
.tool .name { font-size: 18px; font-weight: 800; }
.tool .desc { font-size: 14px; color: var(--muted2); }
.tool .meta { display: flex; justify-content: space-between; align-items: center; padding: 12px 20px 18px; border-top: 1px solid var(--line-soft); margin: 0 0 0; font-size: 13px; }
.tool .meta .price { font-weight: 800; color: var(--yellow); }
.steps3 { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.steps3 > div { display: flex; gap: 16px; padding: 20px; border-radius: 14px; border: 1px solid var(--line); }
.steps3 .n { font-family: var(--pixel); font-size: 26px; color: var(--yellow); line-height: 1; }

/* Stepper */
.stepper { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px 26px; font-size: 14px; }
.stepper li { display: flex; align-items: center; gap: 10px; color: var(--muted); }
.stepper li span { width: 28px; height: 28px; display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; border: 1px solid var(--line-strong); font-family: var(--pixel); }
.stepper li.on { color: var(--text); font-weight: 800; }
.stepper li.on span { background: var(--yellow); color: var(--on-yellow); border-color: var(--yellow); }
.stepper li.done span { background: rgba(143,227,165,.15); color: var(--ok); border-color: transparent; }

/* Proyek */
.proj { display: flex; gap: 16px; align-items: center; padding: 14px 16px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-soft); text-decoration: none; color: var(--text); }
.proj:hover { border-color: rgba(255,227,91,.35); color: var(--text); }
.proj .th { width: 54px; height: 96px; border-radius: 8px; background: var(--ink2); object-fit: cover; flex: none; }
/* Hapus paket / proyek oleh member (tugas MT #34): tombol di samping kartu (di HP: di bawah kartu, rata kanan) */
.proj-row { display: flex; gap: 10px; align-items: center; }
.proj-row > .proj { flex: 1; min-width: 0; }
.proj-row .proj b { overflow-wrap: anywhere; }
.proj-del { flex: none; margin: 0; }
.del-row { justify-content: space-between; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.del-row form { margin: 0; flex: none; }
@media (max-width: 640px) {
  .proj-row { flex-direction: column; align-items: stretch; gap: 6px; }
  .proj-row .proj-del { align-self: flex-end; }
}
.progress { height: 12px; border-radius: 999px; background: var(--raised); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--yellow); transition: width .6s; }
.steps-list { list-style: none; margin: 0; padding: 0; border-radius: 16px; background: var(--surface); border: 1px solid var(--line-soft); }
.steps-list li { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid var(--line-soft); }
.steps-list li:last-child { border-bottom: 0; }
.steps-list .dot { width: 30px; height: 30px; flex: none; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-weight: 800; border: 1px solid var(--line-strong); }
.steps-list .done .dot { background: rgba(143,227,165,.15); color: var(--ok); border-color: transparent; }
.steps-list .run .dot { background: var(--yellow); color: var(--on-yellow); border-color: transparent; }
.steps-list .fail .dot { background: rgba(255,127,112,.15); color: var(--bad); border-color: transparent; }
.video-card { display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line-soft); }
.video-card video { width: 100%; aspect-ratio: 9/16; max-height: 560px; object-fit: contain; background: #000; border-radius: 12px; }
.video-card video.fmt-4x5 { aspect-ratio: 4/5; }
.video-card video.fmt-1x1 { aspect-ratio: 1/1; }
.music-info { border-top: 1px solid var(--line-soft); padding-top: 10px; }
.music-proof summary { cursor: pointer; color: var(--muted); }
.music-proof pre { white-space: pre-wrap; overflow-wrap: anywhere; margin: 8px 0 6px; padding: 10px; background: var(--ink2); border: 1px solid var(--line-soft); border-radius: 10px; font-family: var(--mono); user-select: all; }

/* Editor storyboard */
.ed-top { display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center; }
.seg { display: inline-flex; padding: 4px; gap: 4px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-soft); }
.seg button { min-height: 36px; padding: 0 14px; border-radius: 9px; border: 0; background: transparent; color: var(--muted2); font: inherit; font-weight: 700; cursor: pointer; }
.seg button[aria-selected="true"] { background: var(--yellow); color: var(--on-yellow); font-weight: 800; }
.strip { overflow-x: auto; padding: 4px 2px 10px; }
.strip ol { list-style: none; margin: 0; padding: 0; display: flex; gap: 12px; min-width: max-content; }
.strip li button { display: flex; flex-direction: column; gap: 8px; width: 118px; padding: 0; border: 0; background: none; color: var(--text); text-align: left; cursor: pointer; font: inherit; }
.frame { position: relative; height: 210px; width: 118px; border-radius: 9px; overflow: hidden; background: var(--ink2); outline: 1px solid var(--line-soft); }
.frame.sel { outline: 3px solid var(--yellow); outline-offset: 2px; }
.frame .shot { position: absolute; inset: 0; background-size: cover; background-repeat: no-repeat; }
.frame .lbl { position: absolute; left: 6px; top: 6px; font-family: var(--pixel); font-size: 12px; background: rgba(11,10,8,.78); padding: 2px 6px; border-radius: 4px; }
.frame .tc { position: absolute; left: 6px; bottom: 6px; font-family: var(--mono); font-size: 11px; background: rgba(11,10,8,.78); padding: 2px 6px; border-radius: 4px; }
.frame .warnmark { position: absolute; right: 6px; top: 6px; width: 18px; height: 18px; border-radius: 50%; background: var(--warn); color: #1a1000; font-weight: 800; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.frame.live { background: radial-gradient(circle at 65% 65%, #4A3A22, #0B0A08 72%); }
.frame.text { background: linear-gradient(160deg, var(--raised), var(--ink2)); }
.frame.end { background: linear-gradient(var(--ink) 66%, var(--yellow) 66%); }
.frame .cap { position: absolute; left: 8px; right: 8px; top: 34px; font-size: 11px; font-weight: 800; line-height: 1.25; color: #fff; text-shadow: 0 1px 4px rgba(0,0,0,.8); }
.strip .t { font-size: 13px; font-weight: 700; line-height: 1.3; }
.ed-detail { display: flex; flex-wrap: wrap; gap: 22px; }
.ed-preview { position: relative; width: 236px; height: 420px; flex: none; border-radius: 12px; overflow: hidden; background: var(--ink2); border: 2px solid var(--yellow); }
.ed-preview .shot { position: absolute; inset: 0; background-size: cover; background-repeat: no-repeat; }
.ed-preview .hl { position: absolute; border: 2px solid var(--yellow); border-radius: 6px; box-shadow: 0 0 0 999px rgba(0,0,0,.5); }
.ed-preview .cap { position: absolute; left: 10px; right: 10px; top: 44px; text-align: center; font-size: 15px; font-weight: 800; color: #fff; text-shadow: 0 1px 6px rgba(0,0,0,.85); }
.ed-preview .note { position: absolute; left: 8px; bottom: 8px; right: 8px; font-family: var(--mono); font-size: 10px; background: rgba(11,10,8,.85); padding: 4px 6px; border-radius: 4px; }
.ed-fields { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.ed-fields .two { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.issue { font-size: 12.5px; }
.issue.warn { color: var(--warn); }
.issue.error { color: var(--bad); }
.cmt { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border-radius: 12px; background: var(--ink); }
.cmt.ai { background: var(--raised); border: 1px solid rgba(255,227,91,.25); }
.cmt .who { display: flex; justify-content: space-between; font-size: 12.5px; font-weight: 800; }
.cmt.ai .who b { color: var(--yellow); }
.diff { font-size: 12.5px; color: var(--muted2); }
.diff del { color: var(--muted); }
.diff ins { color: var(--ok); text-decoration: none; }
.toast { position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 50; padding: 12px 18px; border-radius: 12px; background: var(--raised); border: 1px solid var(--line); font-weight: 700; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; display: inline-block; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } .progress > i { transition: none; } }

/* Admin: gaya lama yang masih dipakai (log & kode); tata letak admin ada di bagian "Admin" paling bawah */
.code { font-family: var(--mono); font-size: 13px; line-height: 1.6; }
textarea.code { min-height: 220px; background: var(--ink2); }
pre.log { white-space: pre-wrap; background: var(--ink2); border: 1px solid var(--line-soft); border-radius: 12px; padding: 14px; font-family: var(--mono); font-size: 12.5px; max-height: 420px; overflow: auto; }
.legal { max-width: 760px; }
.legal p, .legal li { color: var(--muted2); margin-bottom: 10px; }

@media (max-width: 640px) {
  h1 { font-size: 28px; }
  .card { padding: 16px; }
  .usp b { width: 104px; }
  .top .wrap { gap: 10px 16px; }
  .top .wrap > .btn.sm { display: none; }
  .brand { font-size: 16px; }
  .brand img { width: 30px; height: 30px; }
  .nav { gap: 14px; }
}

/* ---------- Pratinjau editor ---------- */
.ed-preview .pv-chip { position: absolute; left: 10px; right: 10px; top: 46px; display: flex; justify-content: center; align-items: center; gap: 6px; }
.ed-preview .pv-chip span { max-width: 190px; text-align: center; font-size: 11.5px; font-weight: 800; line-height: 1.2; color: var(--on-yellow); background: var(--yellow); padding: 4px 8px; border-radius: 5px; box-shadow: 0 4px 10px rgba(0,0,0,.4); }
.ed-preview .pv-chip.step span { background: rgba(11,10,8,.85); color: #fff; }
.ed-preview .pv-chip b { width: 22px; height: 22px; flex: none; display: inline-flex; align-items: center; justify-content: center; background: var(--yellow); color: var(--on-yellow); font-family: var(--pixel); font-weight: 400; box-shadow: 2px 2px 0 #0B0A08; }
.ed-preview .pv-avatar { background-size: 120%; background-position: 50% 4%; }
.ed-preview .pv-ai { position: absolute; right: 10px; top: 46px; font-family: var(--mono); font-size: 9px; letter-spacing: .12em; padding: 2px 5px; border-radius: 4px; border: 1px solid rgba(255,255,255,.55); background: rgba(11,10,8,.72); color: #fff; }
.ed-preview .pv-chip.pv-low { top: auto; bottom: 168px; }
.ed-preview .pv-hint { position: absolute; right: 10px; top: 200px; font-family: var(--mono); font-size: 11px; background: rgba(11,10,8,.8); color: #fff; padding: 3px 7px; border-radius: 5px; }
.ed-preview .pv-prod { position: absolute; left: 38px; top: 110px; width: 160px; height: 190px; object-fit: contain; filter: drop-shadow(0 10px 18px rgba(0,0,0,.5)); }
.ed-preview .pv-text { position: absolute; left: 14px; right: 14px; top: 150px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.ed-preview .pv-text b { font-size: 22px; line-height: 1.05; color: var(--text); }
.ed-preview .pv-text i { font-size: 13px; font-weight: 800; color: var(--yellow); }
.ed-preview .pv-text span { font-size: 10.5px; color: var(--muted); }
.ed-preview .pv-blur { left: 20px; top: 70px; width: 196px; height: 260px; filter: blur(4px); opacity: .3; }
.ed-preview .pv-price { position: absolute; left: 14px; right: 14px; top: 130px; display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; }
.ed-preview .pv-price s { font-size: 15px; font-weight: 700; color: var(--muted); text-decoration-color: #E5484D; text-decoration-thickness: 3px; }
.ed-preview .pv-price i { font-size: 15px; font-weight: 700; font-style: normal; color: var(--muted); }
.ed-preview .pv-price b { font-size: 28px; line-height: 1.02; color: var(--yellow); }
.ed-preview .pv-price span { font-size: 10.5px; color: var(--muted); }
/* pustaka tahap 3 (tugas MT #43): pratinjau ringkas, zona isi = y 77–257 (sama dengan mesin: di bawah pita atas, di atas subtitle) */
.ed-preview .pv-p3 { position: absolute; left: 14px; right: 26px; top: 77px; height: 180px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; overflow: hidden; }
.ed-preview .pv-p3 i { font-style: normal; }
.ed-preview .pv-p3-t { font-size: 15px; line-height: 1.1; color: var(--text); }
.ed-preview .pv-p3 small { font-size: 9.5px; color: var(--muted); }
.ed-preview .pv-big { font-size: 26px; line-height: 1.02; color: var(--yellow); overflow-wrap: anywhere; }
.ed-preview .pv-p3 .pv-big i { font-size: 12px; color: var(--muted); }
.ed-preview .pv-checklist ul { list-style: none; margin: 0; padding: 0; width: 100%; display: flex; flex-direction: column; gap: 4px; }
.ed-preview .pv-checklist li { display: flex; align-items: center; gap: 6px; padding: 4px 6px; border-radius: 6px; background: rgba(11,10,8,.66); border: 1px solid rgba(255,255,255,.16); font-size: 10.5px; font-weight: 700; text-align: left; overflow-wrap: anywhere; }
.ed-preview .pv-checklist li i { width: 13px; height: 13px; flex: none; border-radius: 3px; background: var(--yellow); color: var(--on-yellow); display: inline-flex; align-items: center; justify-content: center; font-size: 9px; font-weight: 800; }
.ed-preview .pv-cols { display: flex; gap: 5px; width: 100%; }
.ed-preview .pv-cols span { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; padding: 6px; border-radius: 7px; background: rgba(11,10,8,.66); border: 1px solid rgba(255,255,255,.16); font-size: 10px; font-weight: 700; overflow-wrap: anywhere; }
.ed-preview .pv-cols .pv-after { border: 2px solid var(--yellow); font-weight: 800; }
.ed-preview .pv-cols small { font-weight: 800; color: #E5484D; }
.ed-preview .pv-cols .pv-after small { color: #8FE3A5; }
.ed-preview .pv-ring { width: 64px; height: 64px; border-radius: 50%; border: 5px solid var(--yellow); border-right-color: rgba(255,255,255,.18); box-sizing: border-box; }
.ed-preview .pv-quote { width: 100%; box-sizing: border-box; padding: 9px 10px; border-radius: 9px; background: #FFFDF8; color: #15130F; display: flex; flex-direction: column; gap: 5px; text-align: left; }
.ed-preview .pv-quote q { font-size: 11px; font-weight: 700; line-height: 1.3; overflow-wrap: anywhere; }
.ed-preview .pv-quote small { font-weight: 800; color: #4F4A40; }
.ed-preview .pv-bar { width: 80%; height: 8px; border-radius: 4px; background: rgba(255,255,255,.18); overflow: hidden; }
.ed-preview .pv-bar i { display: block; width: 70%; height: 100%; background: var(--yellow); }
.ed-preview .pv-stat_bar > span:not(.pv-bar) { font-size: 12px; font-weight: 800; color: var(--text); }
.ed-preview .pv-chat { width: 100%; border-radius: 9px; overflow: hidden; background: #F2EDE3; display: flex; flex-direction: column; gap: 4px; padding-bottom: 6px; color: #15130F; }
.ed-preview .pv-chat-h { display: flex; justify-content: space-between; align-items: center; padding: 4px 7px; background: var(--yellow); color: var(--on-yellow); font-size: 9.5px; font-weight: 800; }
.ed-preview .pv-chat-h em { font-style: normal; font-size: 8px; padding: 1px 5px; border-radius: 6px; background: #15130F; color: #fff; }
.ed-preview .pv-chat .l, .ed-preview .pv-chat .r { max-width: 78%; margin: 0 6px; padding: 4px 6px; border-radius: 7px; font-size: 9.5px; font-weight: 700; text-align: left; overflow-wrap: anywhere; }
.ed-preview .pv-chat .l { align-self: flex-start; background: #fff; }
.ed-preview .pv-chat .r { align-self: flex-end; background: var(--yellow); color: var(--on-yellow); }
.ed-preview .pv-map { position: relative; width: 100%; height: 88px; border-radius: 8px; background: repeating-linear-gradient(0deg, transparent 0 22px, rgba(255,255,255,.14) 22px 26px), repeating-linear-gradient(90deg, #2A2620 0 30px, rgba(255,255,255,.14) 30px 34px); }
.ed-preview .pv-map em { position: absolute; left: 5px; top: 5px; font-style: normal; font-size: 8px; padding: 1px 5px; border-radius: 6px; background: rgba(11,10,8,.75); color: #fff; }
.ed-preview .pv-map .pin { position: absolute; left: 50%; top: 22px; width: 18px; height: 18px; margin-left: -9px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: #E5484D; box-shadow: 0 0 0 3px #fff inset; }
.ed-preview .pv-addr { width: 100%; box-sizing: border-box; padding: 5px 7px; border-radius: 7px; background: rgba(11,10,8,.66); font-size: 10px; font-weight: 800; display: flex; flex-direction: column; gap: 2px; overflow-wrap: anywhere; }
.ed-preview .pv-end { position: absolute; left: 12px; right: 12px; top: 64px; display: flex; flex-direction: column; align-items: center; gap: 7px; text-align: center; }
.ed-preview .pv-end .pv-logo { width: 40px; height: 40px; border-radius: 10px; background: var(--yellow); color: var(--on-yellow); font-family: var(--pixel); display: flex; align-items: center; justify-content: center; font-size: 16px; }
.ed-preview .pv-end b { font-size: 16px; }
.ed-preview .pv-end span { font-size: 12px; font-weight: 800; }
.ed-preview .pv-end small { font-size: 10px; color: var(--muted2); }
.ed-preview .pv-end em { font-style: normal; font-size: 11.5px; font-weight: 800; color: var(--on-yellow); background: var(--yellow); padding: 6px 12px; border-radius: 7px; box-shadow: 2px 2px 0 #0B0A08; }
.ed-preview .pv-callout { position: absolute; left: 30px; right: 30px; top: 214px; display: flex; gap: 7px; align-items: center; padding: 7px 8px; border-radius: 8px; background: rgba(21,19,15,.9); border: 1.5px solid var(--yellow); font-size: 10.5px; font-weight: 800; color: #fff; }
.ed-preview .pv-callout b { width: 18px; height: 18px; flex: none; border-radius: 5px; display: flex; align-items: center; justify-content: center; background: var(--yellow); color: var(--on-yellow); font-family: var(--pixel); font-weight: 400; }
.ed-preview .pv-callout small { display: block; font-size: 9px; font-weight: 600; color: var(--muted2); }
.ed-preview .pv-callout.alert { border-color: #E5484D; background: rgba(40,12,14,.9); }
.ed-preview .pv-callout.alert b { background: #E5484D; color: #fff; }
.ed-preview .pv-callout.success { border-color: #7FE3D0; background: rgba(12,22,20,.9); }
.ed-preview .pv-callout.success b { background: #7FE3D0; color: #0B0A08; }
/* Balas komentar (tugas MT #37): gelembung putih + ekor kiri bawah, jawaban besar ber-outline (skala 236/540 dari mesin render) */
.ed-preview .pv-cm-veil { background: linear-gradient(180deg, rgba(11,10,8,.42) 0%, rgba(11,10,8,.1) 30%, rgba(11,10,8,.12) 42%, rgba(11,10,8,.66) 62%, rgba(11,10,8,.82) 100%); }
.ed-preview .pv-cm { position: absolute; left: 13px; top: 54px; max-width: 188px; box-sizing: border-box; padding: 5px 8px 6px 6px; border-radius: 6px; background: rgba(255,255,255,.96); color: #15130F; box-shadow: 0 4px 12px rgba(0,0,0,.35); display: flex; flex-direction: column; gap: 2px; }
.ed-preview .pv-cm::after { content: ''; position: absolute; left: 7px; top: 100%; border-top: 6px solid rgba(255,255,255,.96); border-right: 10px solid transparent; }
.ed-preview .pv-cm-who { display: flex; align-items: center; gap: 4px; font-size: 8px; font-weight: 600; color: #57524A; }
.ed-preview .pv-cm-who b { width: 13px; height: 13px; flex: none; border-radius: 50%; background: var(--yellow); color: var(--on-yellow); display: inline-flex; align-items: center; justify-content: center; font-size: 7px; }
.ed-preview .pv-cm-q { font-size: 10px; font-weight: 800; line-height: 1.22; overflow-wrap: anywhere; }
.ed-preview .pv-cm-q i { font-weight: 600; color: #8A8478; }
.ed-preview .pv-ans { position: absolute; left: 14px; right: 14px; top: 196px; text-align: center; font-size: 20px; font-weight: 800; line-height: 1.05; color: #fff; text-shadow: -1px -1px 0 #0B0A08, 1px -1px 0 #0B0A08, -1px 1px 0 #0B0A08, 1px 1px 0 #0B0A08, 0 3px 10px rgba(0,0,0,.55); overflow-wrap: anywhere; }
.ed-preview .pv-sub { position: absolute; left: 18px; right: 18px; top: 262px; text-align: center; font-size: 10px; font-weight: 700; color: #fff; background: rgba(11,10,8,.76); padding: 3px 6px; border-radius: 5px; }
/* Bingkai pratinjau editor per bentuk video (tugas MT #16): 4:5 = 236x295, 1:1 = 236x236; posisi tegak ikut dirapatkan */
.fmt-4x5 .frame { height: 148px; }
.fmt-1x1 .frame { height: 118px; }
.fmt-4x5 .frame .cap, .fmt-1x1 .frame .cap { top: 30px; }
.fmt-4x5 .ed-preview { height: 295px; }
.fmt-1x1 .ed-preview { height: 236px; }
.fmt-4x5 .ed-preview .cap { top: 20px; } .fmt-1x1 .ed-preview .cap { top: 14px; }
.fmt-4x5 .ed-preview .pv-chip { top: 20px; } .fmt-1x1 .ed-preview .pv-chip { top: 14px; }
.fmt-4x5 .ed-preview .pv-hint { top: 130px; } .fmt-1x1 .ed-preview .pv-hint { top: 96px; }
.fmt-4x5 .ed-preview .pv-prod { top: 64px; height: 130px; } .fmt-1x1 .ed-preview .pv-prod { top: 44px; height: 96px; }
.fmt-4x5 .ed-preview .pv-blur { top: 40px; height: 180px; } .fmt-1x1 .ed-preview .pv-blur { top: 24px; height: 150px; }
.fmt-4x5 .ed-preview .pv-text { top: 80px; } .fmt-1x1 .ed-preview .pv-text { top: 50px; }
.fmt-4x5 .ed-preview .pv-price { top: 70px; } .fmt-1x1 .ed-preview .pv-price { top: 44px; }
.fmt-4x5 .ed-preview .pv-end { top: 22px; gap: 5px; } .fmt-1x1 .ed-preview .pv-end { top: 10px; gap: 4px; }
.fmt-1x1 .ed-preview .pv-end .pv-logo { width: 30px; height: 30px; }
.fmt-4x5 .ed-preview .pv-callout { top: 150px; } .fmt-1x1 .ed-preview .pv-callout { top: 108px; }
.fmt-4x5 .ed-preview .pv-sub { top: 196px; } .fmt-1x1 .ed-preview .pv-sub { top: 150px; }

/* ---------- Contoh video: tombol putar & pemutar layar penuh ---------- */
.tool-wrap { position: relative; display: flex; }
.tool-wrap > .tool { flex: 1 1 auto; min-width: 0; }
.play-ico { position: relative; width: 48px; height: 48px; flex: none; border-radius: 50%; background: var(--yellow); box-shadow: 0 6px 18px rgba(0,0,0,.45); transition: transform .15s ease; }
.play-ico::after { content: ''; position: absolute; left: 19px; top: 15px; border-left: 15px solid var(--on-yellow); border-top: 9px solid transparent; border-bottom: 9px solid transparent; }
.cover-play { position: absolute; left: 50%; top: 120px; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 10px; padding: 6px 16px 6px 6px; border: 0; border-radius: 999px; background: rgba(11,10,8,.78); color: #fff; font: inherit; font-weight: 800; font-size: 14px; cursor: pointer; box-shadow: 0 8px 22px rgba(0,0,0,.45); }
.cover-play:hover .play-ico, .cover-play:focus-visible .play-ico, .sample-play:hover .play-ico, .sample-play:focus-visible .play-ico { transform: scale(1.08); }
.cover-play:focus-visible, .sample-play:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; }
.sample-thumb { position: relative; width: 120px; aspect-ratio: 9/16; flex: none; border-radius: 12px; overflow: hidden; background: #000; }
.sample-thumb img, .sample-thumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.sample-play { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px; background: linear-gradient(180deg, rgba(0,0,0,.05), rgba(0,0,0,.45)); color: #fff; font: inherit; font-weight: 800; font-size: 13px; cursor: pointer; }
html.lb-open { overflow: hidden; }
.lightbox { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; background: rgba(6,5,4,.96); }
.lightbox[hidden] { display: none; }
.lb-stage { flex: 1 1 auto; min-height: 0; display: flex; align-items: center; justify-content: center; padding: 12px; }
.lb-stage video { height: 100%; max-height: 100%; max-width: 100%; aspect-ratio: 9/16; background: #000; border-radius: 12px; }
.lb-stage:fullscreen { padding: 0; background: #000; }
.lb-stage:fullscreen video { border-radius: 0; }
.lb-bar { display: flex; align-items: center; gap: 10px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line-soft); }
.lb-title { flex: 1 1 auto; min-width: 0; font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 640px) {
  .lb-stage { padding: 0; }
  .lb-stage video { border-radius: 0; width: 100%; height: 100%; object-fit: contain; }
}
/* Ringkasan harga: durasi terpilih */
.dur-row { padding: 6px 10px; margin: 0 -10px; border-radius: 8px; border: 1px solid transparent; }
.dur-row.on { border-color: var(--yellow); background: var(--raised); }
.dur-row.on .muted { color: var(--text); font-weight: 700; }

/* ---------- Chat agen (Vidi & MT) ala WhatsApp ---------- */
.wa { display: flex; flex-direction: column; height: min(80vh, 860px); min-height: 460px; border: 1px solid var(--line-soft); border-radius: 16px; overflow: hidden; background: #0d0c09; }
.wa-head { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--surface); border-bottom: 1px solid var(--line-soft); }
.wa-ava { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 15px; background: var(--yellow); color: var(--on-yellow); }
.wa-ava.mt { background: var(--cyan); }
.wa-ava.evi { background: #C9B8FF; }
.wa-who { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.wa-who b { font-size: 16px; line-height: 1.2; }
.wa-who span { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-who span.on { color: var(--ok); }
.wa-log { flex: 1 1 auto; overflow-y: auto; padding: 10px 5% 14px; display: flex; flex-direction: column; gap: 2px; position: relative;
  background-color: #0d0c09; background-image: radial-gradient(rgba(255,227,91,.045) 1px, transparent 1px); background-size: 22px 22px; }
.wa-day { align-self: center; margin: 12px 0 6px; padding: 4px 12px; border-radius: 8px; background: var(--raised); color: var(--muted2); font-size: 12px; font-weight: 700; box-shadow: 0 1px 0 rgba(0,0,0,.35); }
.wa-row { display: flex; margin-top: 2px; }
.wa-row.first { margin-top: 8px; }
.wa-row.me { justify-content: flex-end; }
.wa-b { position: relative; max-width: min(80%, 640px); padding: 6px 9px 7px 10px; border-radius: 10px; font-size: 14.5px; line-height: 1.45; overflow-wrap: anywhere; box-shadow: 0 1px 0 rgba(0,0,0,.4); background: #24211a; color: var(--text); }
.wa-row.me .wa-b { background: #3d3514; }
.wa-row.first.them .wa-b { border-top-left-radius: 0; }
.wa-row.first.me .wa-b { border-top-right-radius: 0; }
.wa-row.first .wa-b::before { content: ""; position: absolute; top: 0; width: 8px; height: 13px; }
.wa-row.first.them .wa-b::before { left: -8px; background: linear-gradient(to bottom left, #24211a 50%, transparent 50%); }
.wa-row.first.me .wa-b::before { right: -8px; background: linear-gradient(to bottom right, #3d3514 50%, transparent 50%); }
.wa-row.failed .wa-b { box-shadow: inset 0 0 0 1px rgba(255,127,112,.55); }
.wa-name { display: block; font-size: 12.5px; font-weight: 800; color: var(--yellow); margin-bottom: 2px; }
.wa-name.mt { color: var(--cyan); }
.wa-name.evi { color: #C9B8FF; }
.wa-sys .full .btn { margin-top: 6px; }
.wa-text p { margin: 0 0 5px; } .wa-text p:last-child { margin-bottom: 0; }
.wa-text ul { margin: 2px 0 5px; padding-left: 18px; } .wa-text li { margin: 1px 0; }
.wa-text code { font-size: 12.5px; background: rgba(255,255,255,.07); padding: 0 4px; border-radius: 4px; }
.wa-text a { color: var(--yellow); word-break: break-all; }
.wa-meta { float: right; display: inline-flex; align-items: center; gap: 3px; margin: 8px 0 -5px 12px; font-size: 11px; color: rgba(244,240,228,.55); white-space: nowrap; line-height: 1; }
.wa-meta .tick { font-size: 12px; letter-spacing: -3px; padding-right: 3px; }
.wa-meta .tick.read { color: var(--yellow); }
.wa-meta .tick.bad { color: var(--bad); letter-spacing: 0; }
.wa-clip { max-height: 230px; overflow: hidden; -webkit-mask-image: linear-gradient(to bottom, #000 70%, transparent); mask-image: linear-gradient(to bottom, #000 70%, transparent); }
.wa-morebtn { display: inline-flex; align-items: center; gap: 4px; margin-top: 4px; padding: 0; border: 0; background: none; color: var(--yellow); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
.wa-atts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px; margin: 2px -5px 4px; border-radius: 8px; overflow: hidden; max-width: 380px; }
.wa-atts.one { grid-template-columns: 1fr; max-width: 300px; }
.wa-atts a.img { display: block; aspect-ratio: 1; background: #000; }
.wa-atts.one a.img { aspect-ratio: auto; }
.wa-atts img { display: block; width: 100%; height: 100%; object-fit: cover; }
.wa-atts.one img { height: auto; max-height: 380px; object-fit: contain; }
.wa-atts video { width: 100%; max-height: 360px; background: #000; display: block; }
.wa-atts .file { grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; padding: 10px; background: rgba(0,0,0,.25); color: var(--text); text-decoration: none; font-size: 13.5px; border-radius: 6px; }
/* kartu usulan & tugas: judul + panah, isi muncul saat diklik */
.wa-cards { display: flex; flex-direction: column; gap: 4px; margin: 6px 0 2px; clear: both; }
.wa-card { border-radius: 8px; background: rgba(0,0,0,.28); border-left: 3px solid var(--yellow); }
.wa-card > summary { list-style: none; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 8px; row-gap: 4px; align-items: center; padding: 8px 10px; cursor: pointer; font-size: 13.5px; }
.wa-card > summary::-webkit-details-marker { display: none; }
.wa-card > summary .t { grid-column: 2; grid-row: 1; min-width: 0; font-weight: 700; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.wa-card > summary .n { grid-column: 1; grid-row: 1; color: var(--muted); font-weight: 700; font-size: 12px; }
.wa-card > summary .chev { grid-column: 3; grid-row: 1 / span 2; width: 18px; height: 18px; display: grid; place-items: center; color: var(--muted2); transition: transform .15s; }
.wa-card[open] > summary .chev { transform: rotate(90deg); }
.wa-card .st { grid-column: 2; grid-row: 2; justify-self: start; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: var(--raised); color: var(--muted2); }
.wa-card .st.ok { background: rgba(143,227,165,.14); color: var(--ok); } .wa-card .st.warn { background: rgba(255,180,84,.14); color: var(--warn); } .wa-card .st.bad { background: rgba(255,127,112,.14); color: var(--bad); }
.wa-card .body { padding: 0 10px 10px; font-size: 13.5px; color: var(--muted2); display: flex; flex-direction: column; gap: 6px; }
.wa-card .body p { margin: 0; }
.wa-card .body .go { align-self: flex-start; font-weight: 800; font-size: 13px; text-decoration: none; }
/* pesan sistem: ringkas di tengah, bisa dibuka */
.wa-sys { align-self: center; max-width: min(92%, 560px); margin: 6px 0; font-size: 12.5px; color: var(--muted2); background: rgba(39,35,27,.92); border-radius: 8px; box-shadow: 0 1px 0 rgba(0,0,0,.35); text-align: center; }
.wa-sys > summary, .wa-sys > div { list-style: none; padding: 5px 12px; cursor: pointer; }
.wa-sys > div { cursor: default; }
.wa-sys > summary::-webkit-details-marker { display: none; }
.wa-sys > summary::after { content: " ›"; color: var(--muted); }
.wa-sys[open] > summary::after { content: " ⌄"; }
.wa-sys .full { padding: 0 12px 8px; text-align: left; white-space: pre-wrap; }
.wa-sys a { color: var(--yellow); font-weight: 700; white-space: nowrap; }
.wa-sys time { color: var(--muted); margin-left: 6px; }
.wa-hint { align-self: center; max-width: min(92%, 520px); margin: 10px 0 2px; padding: 6px 12px; border-radius: 8px; font-size: 12.5px; text-align: center; color: var(--warn); background: rgba(255,180,84,.08); }
.wa-typing .wa-b { display: inline-flex; gap: 4px; align-items: center; padding: 11px 14px; }
.wa-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted2); animation: wa-dot 1.2s infinite ease-in-out; }
.wa-typing i:nth-child(2) { animation-delay: .15s; } .wa-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes wa-dot { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }
.wa-empty { margin: auto; text-align: center; color: var(--muted); font-size: 13.5px; padding: 20px; }
.wa-compose { display: flex; align-items: flex-end; gap: 8px; padding: 8px 10px; background: var(--surface); border-top: 1px solid var(--line-soft); }
.wa-compose textarea { flex: 1 1 auto; min-height: 44px; max-height: 160px; resize: none; padding: 11px 16px; border-radius: 22px; border: 1px solid var(--line-soft); background: var(--raised); color: var(--text); font: inherit; font-size: 15px; line-height: 1.4; }
.wa-compose textarea:focus { outline: none; border-color: rgba(255,227,91,.45); }
.wa-ibtn { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; border: 0; background: none; color: var(--muted2); cursor: pointer; }
.wa-ibtn:hover { background: var(--raised); color: var(--text); }
.wa-ibtn.send { background: var(--yellow); color: var(--on-yellow); }
.wa-ibtn.send:hover { background: #FFEA80; color: var(--on-yellow); }
.wa-ibtn.send:disabled { opacity: .5; cursor: default; }
.wa-ibtn svg { width: 22px; height: 22px; }
.wa-files { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 10px 0; background: var(--surface); }
.wa-files:empty { display: none; }
.wa-files .chip button { background: none; border: 0; color: inherit; cursor: pointer; padding: 0 0 0 4px; }
.wa-status { padding: 0 14px 8px; background: var(--surface); font-size: 12.5px; color: var(--muted); }
.wa-status:empty { display: none; }
.prop-item { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--line-soft); border-radius: 10px; text-decoration: none; color: var(--text); }
.prop-item:hover { border-color: var(--yellow); }
details.card summary { cursor: pointer; }
@media (max-width: 640px) { .wa { height: calc(100dvh - 150px); border-radius: 12px; } .wa-log { padding: 8px 3% 12px; } .wa-b { max-width: 88%; } }

/* ==========================================================================
   Admin (panel pengelola). Semua kelas di sini khusus admin (.admin, .side-*, .a-*),
   jadi halaman pengguna tidak ikut berubah.
   ========================================================================== */
.chip.info { background: rgba(127,227,208,.12); color: var(--cyan); border-color: transparent; }
.notice.warn { border-color: rgba(255,180,84,.42); color: #FFE4C2; background: rgba(255,180,84,.08); }
.a-skip { position: absolute; left: -9999px; top: 8px; z-index: 100; padding: 10px 14px; border-radius: 10px; background: var(--yellow); color: var(--on-yellow); font-weight: 800; text-decoration: none; }
.a-skip:focus { left: 8px; }
.admin .ic, .a-login .ic { width: 18px; height: 18px; flex: none; }

/* ---------- Tata letak: menu samping (desktop), rel ikon (tablet), satu baris geser (HP) ---------- */
.admin { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.admin nav.side { position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto; display: flex; flex-direction: column; padding: 16px 12px; border-right: 1px solid var(--line-soft); background: #12100C; scrollbar-width: thin; scrollbar-color: var(--raised) transparent; }
.admin nav.side .brand { gap: 10px; padding: 4px 10px 16px; font-size: 15px; min-width: 0; }
.admin nav.side .brand img { width: 34px; height: 34px; border-radius: 9px; flex: none; }
.admin nav.side .brand span { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.admin nav.side .brand b { color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.admin nav.side .brand small { font-size: 12px; font-weight: 600; color: var(--muted); }
.side-menu { flex: 1 1 auto; display: flex; flex-direction: column; gap: 16px; }
.side-group { display: flex; flex-direction: column; gap: 2px; }
.side-label { padding: 0 12px 4px; font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.side-menu a, .side-foot a, .side-out { position: relative; display: flex; align-items: center; gap: 12px; width: 100%; min-height: 40px; padding: 0 12px; border: 0; border-radius: 10px; background: none; color: var(--muted2); font: inherit; font-size: 14px; font-weight: 600; text-align: left; text-decoration: none; cursor: pointer; }
.side-menu a:hover, .side-foot a:hover, .side-out:hover { background: rgba(255,255,255,.045); color: var(--text); }
.side-menu a.on { background: var(--raised); color: var(--yellow); font-weight: 800; }
.side-menu a.on::before { content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--yellow); }
.side-t { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side-badge { flex: none; min-width: 22px; height: 20px; padding: 0 6px; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; background: var(--yellow); color: var(--on-yellow); font-size: 12px; font-weight: 800; font-variant-numeric: tabular-nums; }
.side-foot { display: flex; flex-direction: column; gap: 2px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--line-soft); }
.side-foot form { margin: 0; }
.admin .content { min-width: 0; width: 100%; max-width: 1240px; padding: 28px clamp(20px, 3vw, 40px) 64px; display: flex; flex-direction: column; gap: 20px; }
.admin .content > h1 { font-size: 28px; letter-spacing: -.01em; }

@media (min-width: 641px) and (max-width: 1024px) {
  .admin { grid-template-columns: 88px minmax(0, 1fr); }
  .admin nav.side { padding: 12px 8px; }
  .admin nav.side .brand { justify-content: center; padding: 2px 0 12px; }
  .admin nav.side .brand span, .side-label { display: none; }
  .side-menu { gap: 8px; }
  .side-group + .side-group { padding-top: 8px; border-top: 1px solid var(--line-soft); }
  .side-menu a, .side-foot a, .side-out { flex-direction: column; justify-content: center; gap: 4px; min-height: 58px; padding: 7px 4px; font-size: 11px; font-weight: 700; line-height: 1.15; text-align: center; }
  .side-menu a.on { font-weight: 800; }
  .side-menu a.on::before { left: -8px; }
  .side-t { flex: none; white-space: normal; overflow: visible; }
  .side-badge { position: absolute; top: 4px; right: 12px; min-width: 18px; height: 18px; padding: 0 5px; font-size: 11px; }
}

@media (max-width: 640px) {
  .admin { display: block; }
  .admin nav.side { position: sticky; top: 0; z-index: 20; height: auto; flex-direction: row; align-items: center; gap: 2px; padding: 6px 8px; overflow-x: auto; overflow-y: hidden; border-right: 0; border-bottom: 1px solid var(--line-soft); background: rgba(18,16,12,.96); backdrop-filter: blur(8px); scrollbar-width: none; }
  .admin nav.side::-webkit-scrollbar { display: none; }
  .admin nav.side .brand { flex: none; padding: 0 6px 0 2px; }
  .admin nav.side .brand img { width: 30px; height: 30px; }
  .admin nav.side .brand span, .side-label { display: none; }
  .side-menu, .side-group, .side-foot { display: contents; }
  .side-group + .side-group::before, .side-foot::before { content: ""; flex: none; width: 1px; height: 22px; margin: 0 4px; background: var(--line-strong); }
  .side-menu a, .side-foot a, .side-out { flex: 0 0 auto; width: auto; min-height: 40px; padding: 0 11px; gap: 7px; font-size: 13.5px; white-space: nowrap; }
  .side-menu a.on::before { display: none; }
  .side-foot form { flex: none; }
  .side-badge { min-width: 19px; height: 19px; padding: 0 5px; font-size: 11px; }
  .admin .ic { width: 17px; height: 17px; }
  .admin .content { padding: 18px max(16px, env(safe-area-inset-right)) 48px max(16px, env(safe-area-inset-left)); gap: 16px; }
  .admin .content > h1 { font-size: 23px; }
}

/* ---------- Kepala halaman & pesan ---------- */
.a-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 20px; }
.a-head-main { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.a-back { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; min-height: 28px; font-size: 13.5px; font-weight: 700; color: var(--muted2); text-decoration: none; }
.a-back:hover { color: var(--text); }
.a-back .ic { width: 16px; height: 16px; }
.a-title { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; min-width: 0; }
.a-title h1 { font-size: 28px; letter-spacing: -.01em; overflow-wrap: anywhere; }
.a-intro { max-width: 72ch; font-size: 14.5px; color: var(--muted2); }
.a-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.a-actions form { margin: 0; }
.a-note { display: flex; align-items: flex-start; gap: 10px; }
.a-note > .ic { margin-top: 2px; }
.a-note > div { min-width: 0; overflow-wrap: anywhere; }
.a-note ol, .a-note ul { margin: 6px 0 0; padding-left: 20px; }

/* ---------- Kartu, kolom, daftar ---------- */
.a-card { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.a-card-h { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.a-card-h h2 { font-size: 18px; }
.a-card-h p { margin-top: 3px; font-size: 13.5px; color: var(--muted2); }
.a-card-f { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.a-card.a-danger { border-color: rgba(255,127,112,.3); }
.a-cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 20px; align-items: start; }
.a-cols > div { min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.a-grid2 { display: grid; gap: 14px 18px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.a-kv { margin: 0; }
.a-kv > div { display: flex; justify-content: space-between; gap: 16px; padding: 9px 0; border-bottom: 1px solid var(--line-soft); font-size: 14px; }
.a-kv > div:last-child { border-bottom: 0; }
.a-kv dt { flex: none; max-width: 48%; color: var(--muted); }
.a-kv dd { margin: 0; min-width: 0; text-align: right; overflow-wrap: anywhere; }
.a-list { list-style: none; margin: 0; padding: 0; }
.a-list li + li { border-top: 1px solid var(--line-soft); }
.a-list a { display: flex; align-items: center; gap: 10px; min-height: 48px; padding: 8px 2px; color: var(--text); text-decoration: none; }
.a-list a:hover b { color: var(--yellow); }
.a-list .t { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.a-list .t b { font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.a-list .t span { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.a-list .chip { flex: none; }
.a-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 28px 16px; text-align: center; font-size: 14px; color: var(--muted2); }
.a-empty .ic { width: 22px; height: 22px; color: var(--muted); }
.a-error { max-width: 560px; margin: 32px auto; align-items: center; text-align: center; }
.a-chip-sm { min-height: 22px; padding: 0 8px; font-size: 11.5px; vertical-align: 1px; margin-left: 6px; }
.admin .sub { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.admin .pre-wrap { white-space: pre-wrap; }
.a-bad { color: var(--bad); font-weight: 700; }
.a-upload { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; }
.a-fs-sub { display: flex; flex-direction: column; gap: 14px; }
.a-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; color: var(--muted2); }
.a-scenes { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.a-prog { display: inline-block; width: 72px; height: 6px; border-radius: 999px; background: var(--raised); overflow: hidden; vertical-align: middle; }
.a-prog > i { display: block; height: 100%; background: var(--yellow); }
.a-media { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 16px; }
/* kartu avatar presenter AI (Admin → Presenter AI, tugas MT #6) */
.a-avatar { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.a-avatar-photo { display: flex; flex-direction: column; gap: 10px; width: 150px; flex: none; }
.a-avatar-photo img { width: 150px; aspect-ratio: 9/16; object-fit: cover; object-position: 50% 10%; border-radius: 10px; background: #000; }
.a-avatar-fields { flex: 1 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.a-media img, .a-media video { width: 140px; aspect-ratio: 9/16; object-fit: cover; border-radius: 10px; background: #000; }
.a-media img.qris { aspect-ratio: auto; background: #fff; padding: 6px; }
.a-media img.logo { width: 64px; height: 64px; aspect-ratio: 1; border-radius: 14px; }
.a-proof { display: block; border-radius: 10px; overflow: hidden; }
.a-proof img { display: block; width: 100%; }
/* Hasil uji resep (tugas MT #14): video 9:16 di kiri, grid frame per adegan di kanan; bertumpuk di HP */
.a-uji { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px; align-items: start; margin-bottom: 12px; }
.a-uji video { width: 100%; aspect-ratio: 9/16; border-radius: 10px; background: #000; }
.a-uji-grid { display: block; border-radius: 8px; overflow: hidden; background: #fff; }
.a-uji-grid img { display: block; width: 100%; height: auto; }
.a-uji-frames { display: flex; flex-wrap: wrap; gap: 6px; font-size: 12.5px; }
.a-uji-frames a { padding: 3px 8px; border-radius: 999px; background: var(--raised); border: 1px solid var(--line-soft); white-space: nowrap; }
.a-uji-qa { display: flex; flex-wrap: wrap; gap: 4px; }
.a-uji-qa .chip { white-space: normal; margin-left: 0; }
.a-uji-form .a-choice { margin-top: 2px; }
@media (max-width: 640px) {
  .a-uji { grid-template-columns: minmax(0, 1fr); }
  .a-uji video { max-width: 240px; }
}
@media (max-width: 1100px) {
  .a-cols { grid-template-columns: minmax(0, 1fr); }
  .a-cols > .a-side-first { order: -1; }
}

/* ---------- Kartu angka & "perlu tindakanmu" ---------- */
.a-stats { display: grid; gap: 12px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1180px) { .a-stats { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); } }
.a-stat { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 16px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line-soft); color: var(--text); text-decoration: none; }
a.a-stat:hover { border-color: rgba(255,227,91,.38); color: var(--text); }
.a-stat-l { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--muted2); }
.a-stat-l .ic { width: 16px; height: 16px; color: var(--muted); }
.a-stat-v { font-size: 24px; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.a-stat-h { font-size: 12.5px; color: var(--muted); }
.a-stat.bad { border-color: rgba(255,127,112,.45); }
.a-stat.bad .a-stat-v { color: var(--bad); }
.a-stat.warn { border-color: rgba(255,180,84,.4); }
.a-stat form { margin-top: 4px; }
.a-todo { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.a-todo a { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--ink); border: 1px solid var(--line-soft); color: var(--text); text-decoration: none; }
.a-todo a:hover { border-color: rgba(255,227,91,.4); color: var(--text); }
.a-todo .n { flex: none; min-width: 36px; height: 36px; padding: 0 8px; border-radius: 10px; display: grid; place-items: center; background: var(--yellow); color: var(--on-yellow); font-weight: 800; font-variant-numeric: tabular-nums; }
.a-todo .n.bad { background: rgba(255,127,112,.16); color: var(--bad); }
.a-todo .n .ic { width: 18px; height: 18px; }
.a-todo .t { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.a-todo .t b { font-size: 14.5px; }
.a-todo .t span { font-size: 13px; color: var(--muted2); }
.a-todo a > .ic { color: var(--muted); }
.a-allgood { display: flex; align-items: center; gap: 12px; padding: 4px 0; color: var(--muted2); }
.a-allgood .ic { width: 36px; height: 36px; padding: 8px; border-radius: 10px; background: rgba(143,227,165,.14); color: var(--ok); }
.a-checks { list-style: none; margin: 0; padding: 0; }
.a-checks li { display: flex; align-items: flex-start; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.a-checks li:last-child { border-bottom: 0; }
.a-dot { flex: none; width: 28px; height: 28px; border-radius: 8px; display: grid; place-items: center; }
.a-dot .ic { width: 16px; height: 16px; }
.a-dot.ok { background: rgba(143,227,165,.14); color: var(--ok); }
.a-dot.warn { background: rgba(255,180,84,.14); color: var(--warn); }
.a-dot.bad { background: rgba(255,127,112,.16); color: var(--bad); }
.a-checks .t { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.a-checks .t b { font-size: 14px; }
.a-checks .t span { font-size: 13px; color: var(--muted2); overflow-wrap: anywhere; }
.a-checks .go { flex: none; align-self: center; font-size: 13px; font-weight: 700; white-space: nowrap; }
@media (max-width: 640px) {
  .a-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .a-stat { padding: 12px; }
  .a-stat-v { font-size: 19px; }
}

/* ---------- Tabel admin (jadi kartu di HP) ---------- */
.a-table tbody tr:hover td { background: rgba(255,255,255,.018); }
.a-table tr.hl td { background: rgba(255,227,91,.05); }
.a-table td .sub { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.a-table td.a-main a { font-weight: 700; text-decoration: none; }
.a-table td.a-main a:hover { text-decoration: underline; }
.a-table td.num, .a-table .chip, .a-table td .a-amt { white-space: nowrap; }
.admin .card > h2 { font-size: 18px; } /* judul kartu halaman Vidi/MT disamakan dengan kartu admin lain */
.admin .btn.danger:hover { background: rgba(255,127,112,.1); border-color: var(--bad); color: var(--bad); }
.admin input[type=color].input { width: 96px; padding: 4px; cursor: pointer; }
.a-table tr.a-empty-row td { padding: 0; }
.a-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.a-toolbar form { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
.a-toolbar .input, .a-toolbar select { width: auto; min-width: 220px; }
.a-search { flex: 1 1 320px; max-width: 520px; }
/* Admin → Master Prompt (tugas MT #34) */
.a-mp-filter select, .a-mp-filter .input[type=search] { min-width: 0 !important; width: 200px; }
.a-mp-date { display: inline-flex; align-items: center; gap: 6px; }
.a-mp-date .input { min-width: 0 !important; width: 160px; }
.a-table tr.a-row-off td { opacity: .72; }
.a-mp-imgs { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
.a-mp-imgs figure { margin: 0; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.a-mp-imgs figure.wide { grid-column: span 2; }
.a-mp-imgs img { width: 100%; aspect-ratio: 9/16; object-fit: cover; border-radius: 10px; background: #000; display: block; }
.a-mp-imgs figure.wide img { aspect-ratio: 3/2; }
.a-mp-who { display: flex; flex-direction: column; gap: 2px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
@media (max-width: 640px) {
  .a-mp-filter > * { flex: 1 1 100%; }
  .a-mp-filter select, .a-mp-filter .input[type=search] { width: 100%; min-width: 0 !important; }
  .a-mp-date { justify-content: space-between; }
  .a-mp-date .input { flex: 1; width: auto; }
}
.a-search .input { flex: 1 1 auto; min-width: 0 !important; }
@media (max-width: 640px) {
  .a-tablewrap { border: 0; border-radius: 0; overflow: visible; }
  table.t.a-table { display: block; min-width: 0; font-size: 14px; }
  table.t.a-table thead { display: none; }
  table.t.a-table tbody { display: flex; flex-direction: column; gap: 10px; }
  table.t.a-table tr { display: flex; flex-direction: column; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-soft); }
  table.t.a-table tbody tr:hover td, table.t.a-table tr.hl td { background: none; }
  table.t.a-table tr.hl { border-color: rgba(255,227,91,.4); }
  table.t.a-table td { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 30px; padding: 3px 0; border: 0; text-align: right; overflow-wrap: anywhere; }
  table.t.a-table td::before { content: attr(data-label); flex: none; max-width: 45%; text-align: left; font-size: 12.5px; font-weight: 600; color: var(--muted); white-space: normal; }
  table.t.a-table td.num { white-space: normal; flex-wrap: wrap; } /* label & nilai boleh turun baris di kartu HP, tidak saling menimpa */
  table.t.a-table td.num .sub { flex-basis: 100%; } /* catatan kecil turun ke baris sendiri; angka uang (.a-amt) tetap utuh satu baris */
  table.t.a-table td.a-main { display: block; min-height: 0; padding: 0 0 8px; margin-bottom: 4px; border-bottom: 1px solid var(--line-soft); text-align: left; font-size: 15px; }
  table.t.a-table td.a-main::before, table.t.a-table tr.a-empty-row td::before { display: none; }
  table.t.a-table tr.a-empty-row { padding: 0; }
  table.t.a-table tr.a-empty-row td { display: block; }
  table.t.a-table .chip { min-height: 26px; padding: 0 10px; font-size: 12.5px; }
  .a-card table.t.a-table tr { background: var(--ink); }
  .a-toolbar, .a-toolbar form, .a-search { width: 100%; max-width: none; }
  .a-toolbar .input, .a-toolbar select { flex: 1 1 auto; min-width: 0; }
}

/* ---------- Form admin ---------- */
.a-form { display: flex; flex-direction: column; gap: 22px; }
.a-fs { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.a-fs + .a-fs { padding-top: 22px; border-top: 1px solid var(--line-soft); }
.a-fs > h3 { font-size: 16px; }
.a-fs > h3 + p, .a-fs > .a-fs-desc { margin-top: -8px; font-size: 13.5px; color: var(--muted2); }
.admin .field .help { font-size: 13px; line-height: 1.45; }
.a-choicefs legend { margin-bottom: 8px; }
.a-choicefs > .help { display: block; margin: -4px 0 8px; }
.a-choice { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }
/* 4 pilihan (cara terima uang, mode uji): 2 × 2, bukan 3 + 1; di HP satu kolom */
.a-choice:has(> label:nth-child(4):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 640px) { .a-choice:has(> label:nth-child(4):last-child) { grid-template-columns: 1fr; } }
.a-choice label { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--ink); cursor: pointer; }
.a-choice label:has(input:checked) { border-color: var(--yellow); background: var(--raised); box-shadow: inset 0 0 0 1px var(--yellow); }
.a-choice input { flex: none; margin-top: 2px; }
.a-choice span { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.a-choice b { font-size: 14.5px; }
.a-choice small { font-size: 13px; line-height: 1.4; color: var(--muted2); }
.a-switch { position: relative; display: flex; align-items: flex-start; gap: 12px; padding: 2px 0; cursor: pointer; }
.a-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.a-switch-ui { position: relative; flex: none; width: 44px; height: 26px; margin-top: 1px; border-radius: 999px; background: var(--raised); border: 1px solid var(--line-strong); transition: background .15s, border-color .15s; }
.a-switch-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: var(--muted2); transition: transform .15s; }
.a-switch input:checked + .a-switch-ui { background: var(--yellow); border-color: var(--yellow); }
.a-switch input:checked + .a-switch-ui::after { transform: translateX(18px); background: var(--on-yellow); }
.a-switch input:focus-visible + .a-switch-ui { outline: 2px solid var(--yellow); outline-offset: 2px; }
.a-switch-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 14px; }
.a-switch-t b { font-weight: 700; }
.a-switch-t small { font-size: 13px; line-height: 1.4; color: var(--muted); }
.a-unit { display: flex; align-items: stretch; }
.a-unit > span { flex: none; display: flex; align-items: center; padding: 0 12px; border: 1px solid var(--line-strong); background: var(--raised); color: var(--muted2); font-size: 14px; font-weight: 700; }
.a-unit > span:first-child { border-right: 0; border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.a-unit > span:last-child { border-left: 0; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.a-unit > .input { min-width: 0; border-radius: 0; }
.a-unit > .input:first-child { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.a-unit > .input:last-child { border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.a-codebox { display: flex; align-items: center; gap: 8px; min-width: 0; }
.a-codebox code { flex: 1 1 auto; min-width: 0; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--ink2); border: 1px solid var(--line-soft); font-size: 13px; overflow-wrap: anywhere; }
.a-codebox .btn { flex: none; }
.a-inline { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; min-height: 46px; }
.a-inline b { font-size: 20px; font-variant-numeric: tabular-nums; }
.a-savebar { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin: 0 -22px -22px; padding: 14px 22px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line-soft); border-radius: 0 0 var(--radius) var(--radius); background: rgba(30,27,21,.97); backdrop-filter: blur(6px); }
.a-savebar .state { font-size: 13.5px; color: var(--muted); }
form.is-dirty .a-savebar { border-top-color: rgba(255,227,91,.45); }
form.is-dirty .a-savebar .state { color: var(--yellow); font-weight: 700; }
form[data-guard] :is(input, select, textarea) { scroll-margin-bottom: 110px; } /* isian yang ditunjuk browser tidak tertutup bilah Simpan */
.a-fold { border: 1px solid var(--line-soft); border-radius: 12px; background: var(--ink); }
.a-fold > summary { list-style: none; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 12px 16px; cursor: pointer; }
.a-fold > summary::-webkit-details-marker { display: none; }
.a-fold > summary > span { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.a-fold > summary b { font-size: 14.5px; }
.a-fold > summary small { font-size: 12.5px; color: var(--muted); }
.a-fold > summary > .ic { color: var(--muted); transition: transform .15s; }
.a-fold[open] > summary > .ic { transform: rotate(90deg); }
.a-fold > .a-fold-b { display: flex; flex-direction: column; gap: 14px; padding: 2px 16px 16px; }
.a-fold table.t, .a-fit table.t { min-width: 0; } /* tabel kecil di kolom isi yang sempit: muat tanpa terpotong (bukan 640px) */
.a-findbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.a-findbar .input { flex: 1 1 220px; max-width: 360px; }
.a-findbar output { font-size: 13px; color: var(--muted2); }
.a-rows { display: flex; flex-direction: column; gap: 8px; }
.a-rows-head, .a-rows-row { display: grid; grid-template-columns: var(--cols, 1fr 1fr) 44px; gap: 8px; align-items: center; }
.a-rows-head span { font-size: 12.5px; font-weight: 700; color: var(--muted); }
.a-rows-row .input { min-height: 44px; }
.a-rows-del { width: 44px; height: 44px; display: grid; place-items: center; border-radius: var(--radius-sm); border: 1px solid var(--line-strong); background: none; color: var(--muted2); font: inherit; cursor: pointer; }
.a-rows-del:hover { border-color: rgba(255,127,112,.6); color: var(--bad); }
.a-rows > .btn { align-self: flex-start; }
.a-rows-cell { display: block; min-width: 0; }
.a-rows-cell > span { display: none; }
.a-rows-row .input[aria-invalid="true"] { border-color: var(--bad); box-shadow: 0 0 0 1px var(--bad); }
.a-rows-err { margin: 0; font-size: 13.5px; line-height: 1.4; color: var(--bad); font-weight: 600; }
@media (max-width: 640px) {
  .admin .input, .admin select, .admin textarea, .admin .wa-compose textarea, .a-login .input { font-size: 16px; } /* cegah zoom otomatis iPhone */
  .admin .btn.sm { min-height: 40px; }
  .admin nav.side .brand, .a-back { min-height: 40px; }
  .a-card-h .a-actions a, .a-checks .go { display: inline-flex; align-items: center; min-height: 36px; }
  .a-title h1 { font-size: 23px; }
  .a-head .a-actions { width: 100%; }
  .a-savebar { margin: 0 -16px -16px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
  .a-savebar { flex-wrap: nowrap; gap: 10px; }
  .a-savebar .state { flex: 1 1 auto; min-width: 0; font-size: 12.5px; line-height: 1.3; }
  .a-savebar .btn { flex: none; }
  .a-rows-head { display: none; }
  .a-rows-row { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 10px; border: 1px solid var(--line-soft); border-radius: 12px; }
  .a-rows-cell > span { display: block; margin-bottom: 4px; font-size: 12px; font-weight: 700; color: var(--muted); }
  .a-rows-del { grid-column: 1 / -1; justify-self: end; display: inline-flex; align-items: center; gap: 6px; width: auto; height: auto; min-height: 44px; padding: 0 14px; font-size: 13.5px; line-height: 1.2; white-space: nowrap; }
  .a-rows-del::after { content: "Hapus baris"; }
  .a-kv > div { flex-direction: column; gap: 2px; }
  .a-kv dt { max-width: none; font-size: 12.5px; }
  .a-kv dd { text-align: left; }
}

/* ---------- Pengaturan: daftar kelompok + isi ---------- */
.a-settings { display: grid; grid-template-columns: 236px minmax(0, 1fr); gap: 24px; align-items: start; }
.a-setnav { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 2px; }
.a-setnav a { display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px; border-radius: 10px; color: var(--muted2); text-decoration: none; }
.a-setnav a:hover { background: rgba(255,255,255,.04); color: var(--text); }
.a-setnav a .ic { margin-top: 1px; color: var(--muted); }
.a-setnav a span { display: flex; flex-direction: column; min-width: 0; }
.a-setnav a b { font-size: 14px; font-weight: 700; color: var(--text); }
.a-setnav a small { font-size: 12.5px; line-height: 1.35; color: var(--muted); }
.a-setnav a.on { background: var(--raised); }
.a-setnav a.on b, .a-setnav a.on .ic { color: var(--yellow); }
.a-setnav .sep { height: 1px; margin: 6px 12px; background: var(--line-soft); }
@media (max-width: 1100px) {
  .a-settings { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .a-setnav { position: static; flex-direction: row; gap: 6px; overflow-x: auto; margin: 0 -4px; padding: 2px 4px 4px; scrollbar-width: none; }
  .a-setnav::-webkit-scrollbar { display: none; }
  .a-setnav a { flex: none; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 999px; }
  .a-setnav a small, .a-setnav .sep { display: none; }
  .a-setnav a b { font-size: 13.5px; white-space: nowrap; }
  .a-setnav a .ic { margin: 0; width: 16px; height: 16px; }
  .a-setnav a.on { border-color: var(--yellow); }
}

/* Biaya fal (tugas MT #20): baris dengan selisih > 10% */
.a-table tr.a-row-warn td { background: rgba(255,180,84,.08); }
.a-table tr.a-row-warn td.a-main { box-shadow: inset 3px 0 0 var(--warn); }

/* ---------- Master Prompt (tugas MT #24) ---------- */
.mp-top { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.mp-sheet { flex: 999 1 540px; min-width: 0; }
.mp-sheet img { width: 100%; height: auto; border-radius: 12px; display: block; background: var(--ink2); }
.mp-side { flex: 1 1 300px; min-width: 0; }
.mp-lock { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px dashed var(--line-strong); border-radius: 12px; background: var(--ink2); font-size: 13.5px; color: var(--muted2); }
.mp-lock b { font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: var(--yellow); }
.mp-ph { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 220px; border-radius: 12px; background: var(--ink2); color: var(--muted); font-size: 14px; text-align: center; padding: 12px; }
.mp-ph.tall { width: 176px; height: 313px; min-height: 0; }
.mp-kv { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.mp-kv span { color: var(--muted); }
.mp-kv b { text-align: right; }
.mp-plan { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 14px; }
.mp-plan li { display: flex; flex-direction: column; }
.mp-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 540px), 1fr)); }
.mp-scene { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.mp-scene.dirty { border-color: rgba(255,180,84,.55); }
.mp-scene.editing { border-color: rgba(255,227,91,.4); }
.mp-sh { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.mp-title { display: flex; align-items: center; gap: 10px; }
.mp-title > div { display: flex; flex-direction: column; }
.mp-no { width: 32px; height: 32px; border-radius: 9px; background: var(--yellow); color: var(--on-yellow); font-weight: 800; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.mp-dirty { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; padding: 10px 12px; border-radius: 10px; background: rgba(255,180,84,.1); border: 1px solid rgba(255,180,84,.4); color: var(--warn); font-size: 13.5px; }
.mp-body { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.mp-photo { flex: 0 0 176px; display: flex; flex-direction: column; gap: 8px; }
.mp-photo img { width: 176px; height: 313px; object-fit: cover; border-radius: 12px; display: block; background: var(--ink2); }
.mp-tools { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.mp-tools .btn { padding: 0 8px; gap: 6px; min-height: 44px; }
.mp-fields { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.mp-editbox { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 12px; border: 1px solid var(--yellow); background: var(--ink2); }
.mp-editbox b { color: var(--yellow); font-size: 14px; }
.mp-dl { margin: 0; display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 6px 10px; font-size: 14px; }
.mp-dl dt { color: var(--muted); }
.mp-dl dd { margin: 0; }
.mp-sel { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mp-f { gap: 5px; min-width: 0; }
.mp-f > label { font-size: 13px; font-weight: 600; color: var(--muted2); }
.mp-f select, .mp-f .input { min-height: 42px; padding: 8px 10px; font-size: 14px; }
.mp-custom { border-color: var(--yellow) !important; margin-top: 4px; }
.mp-dialog { display: flex; flex-direction: column; gap: 6px; }
.mp-dialog .linkbtn { align-self: flex-start; }
.mp-dialog textarea { min-height: 64px; font-size: 15px; }
.mp-count { font-size: 12px; font-weight: 700; }
.mp-count.ok { color: var(--ok); }
.mp-count.warn { color: var(--yellow); }
.mp-count.bad { color: var(--warn); }
.mp-bar { height: 4px; border-radius: 4px; background: var(--raised); overflow: hidden; }
.mp-bar i { display: block; height: 4px; background: var(--yellow); }
.mp-prompt { display: flex; flex-direction: column; gap: 8px; padding: 12px; border-radius: 12px; background: var(--ink2); border: 1px solid var(--line-soft); }
.mp-prompt pre { margin: 0; font-family: var(--mono); font-size: 12px; line-height: 1.55; color: var(--muted2); white-space: pre-wrap; word-break: break-word; }
.mp-next { display: flex; flex-wrap: wrap; gap: 20px; align-items: center; justify-content: space-between; }
.mp-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; color: var(--muted2); }
/* Master Prompt: pilih model (tugas MT #30) */
.mp-models { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr)); }
.mp-model { gap: 12px; }
.mp-model .cover { height: 168px; }
.mp-model .cover img { object-position: center; }
.mp-model .body { padding: 0 18px; gap: 6px; }
.mp-model .name { font-size: 17px; }
.mp-model .meta { padding: 12px 18px 16px; margin-top: auto; gap: 10px; }
.mp-model .meta .price { white-space: nowrap; }
.mp-hook { font-size: 13px; font-style: italic; color: var(--muted); border-left: 2px solid var(--yellow); padding-left: 10px; }
.mp-soon { font-style: normal; border: 1px dashed var(--line-strong); border-radius: 6px; padding: 1px 6px; }
.mp-picked { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; padding: 14px; }
.mp-picked img { width: 120px; height: 78px; border-radius: 10px; object-fit: cover; flex: none; }
.proj .th.mp-th { width: 96px; height: 62px; }
.mp-sheets { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); }
.mp-cast { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.mp-pre { white-space: pre-line; }
.mp-who { color: var(--yellow); margin-right: 4px; }
/* Pilihan karakter: buatkan otomatis / sheet sendiri (tugas MT #28) */
.mp-char { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.mp-char > legend { padding: 0; margin-bottom: 8px; }
.mp-opts { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.mp-opt { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 12px; cursor: pointer; }
.mp-opt input { margin-top: 3px; accent-color: var(--yellow); }
.mp-opt:has(input:checked) { border-color: var(--yellow); background: rgba(255,227,91,.06); }
.mp-own { padding: 14px; border: 1px dashed var(--line-strong); border-radius: 12px; }
.mp-own .drop img { width: 96px; height: 64px; }
/* Aktor bebas (tugas MT #39): baris aktor di form, pilih aktor & produk per adegan */
.mp-actors { min-width: 0; }
.mp-actor { border: 1px solid var(--line-strong); border-radius: 14px; padding: 14px; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 12px; background: var(--ink2); }
.mp-actor[hidden] { display: none; }
.mp-actor legend { float: left; padding: 0; margin: 0; }
.mp-actor-grid { display: grid; gap: 12px; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.mp-opts-sm .mp-opt { padding: 10px 12px; }
.mp-castbox { display: flex; flex-direction: column; gap: 6px; }
.mp-castpick { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0; }
.mp-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; min-height: 36px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 13px; cursor: pointer; }
.mp-chip input { accent-color: var(--yellow); }
.mp-chip:has(input:checked) { border-color: var(--yellow); background: rgba(255,227,91,.08); }
.mp-chip:has(input:disabled:not(:checked)) { opacity: .5; cursor: not-allowed; }
.mp-chip.mp-prod:has(input:checked) { border-color: var(--ok); background: rgba(143,227,165,.1); }
@media (max-width: 640px) {
  .mp-actor-grid { grid-template-columns: minmax(0, 1fr); }
  .mp-photo { flex-basis: 100%; align-items: center; }
  .mp-sel { grid-template-columns: minmax(0, 1fr); }
  .mp-dl { grid-template-columns: 84px minmax(0, 1fr); }
}
/* Rakit Video (tugas MT #25) */
.rk-intro { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; justify-content: space-between; }
.rk-flow { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.rk-flow li { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: 999px; color: var(--muted2); }
.rk-flow b { width: 20px; height: 20px; border-radius: 6px; background: var(--yellow); color: var(--on-yellow); display: inline-flex; align-items: center; justify-content: center; font-size: 12px; }
.rk-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 520px), 1fr)); }
.rk-scene { background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.rk-scene.empty { border-style: dashed; }
.rk-body { display: flex; gap: 14px; align-items: flex-start; }
.rk-ref { flex: 0 0 96px; display: flex; flex-direction: column; gap: 4px; align-items: center; }
.rk-ref img { width: 96px; height: 171px; object-fit: cover; border-radius: 10px; background: var(--ink2); display: block; }
.rk-clip { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.rk-clip video { width: 132px; height: 235px; object-fit: cover; border-radius: 10px; background: #000; flex: none; }
.rk-clip.compact video { width: 96px; height: 171px; }
.rk-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.rk-tag { align-self: flex-start; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--muted2); }
.rk-tag.ok { color: var(--ok); border-color: rgba(143,227,165,.45); }
.rk-tag.warn { color: var(--warn); border-color: rgba(255,180,84,.5); }
.rk-move { display: flex; flex-direction: column; gap: 2px; }
.rk-move select { min-height: 40px; padding: 6px 8px; font-size: 14px; }
.rk-drop { display: flex; gap: 12px; align-items: center; padding: 14px; border: 1px dashed var(--line-strong); border-radius: 12px; cursor: pointer; min-height: 88px; }
.rk-drop:hover, .rk-drop:focus-within { border-color: var(--yellow); }
.rk-drop img { width: 48px; height: 85px; object-fit: cover; border-radius: 8px; opacity: .55; }
.rk-sug { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; }
.rk-sug input { margin-top: 3px; accent-color: var(--yellow); flex: none; }
.rk-cues { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 2px; }
.rk-pool { display: flex; flex-direction: column; gap: 10px; }
.rk-poolgrid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); }
.rk-rep { margin: 0; padding-left: 0; list-style: none; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.rk-rep li { padding: 8px 12px; border-radius: 10px; border: 1px solid var(--line-soft); }
.rk-rep li.ok { border-color: rgba(143,227,165,.35); }
.rk-rep li.warn { border-color: rgba(255,180,84,.45); color: var(--warn); }
.rk-rep li.bad { border-color: rgba(255,127,112,.5); color: var(--bad); }
.rk-opts { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.rk-q { border: 0; padding: 0; margin: 0; }
.rk-go { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; padding: 14px; border-radius: 12px; background: var(--ink2); border: 1px solid var(--line); }
.rk-result { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.rk-result video { width: min(100%, 300px); aspect-ratio: 9 / 16; border-radius: 12px; background: #000; }
.rk-result > .stack { flex: 1 1 240px; }
/* Video jadi (tugas MT #38): kartu di halaman paket & bagian atas halaman Rakit */
.rk-done { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; }
.rk-done.ok, #rk-out.ok { border-color: rgba(143,227,165,.4); }
.rk-done > video { width: min(100%, 220px); aspect-ratio: 9 / 16; border-radius: 12px; background: #000; flex: none; }
.rk-done > .stack { flex: 1 1 260px; min-width: 0; }
.rk-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.rk-acts { display: flex; flex-wrap: wrap; gap: 10px; }
.rk-acts .btn { flex: 1 1 160px; }
@media (max-width: 640px) {
  .rk-body { flex-direction: column; }
  .rk-ref { flex-direction: row; flex-basis: auto; }
  .rk-ref img { width: 64px; height: 114px; }
  .rk-clip video { width: 108px; height: 192px; }
  .rk-done > video, .rk-result video { width: min(100%, 260px); margin: 0 auto; }
}

/* ---------- Cek naskah & Mode lanjutan (tugas MT #15) ---------- */
.script-list { list-style: none; padding: 0; margin: 0; }
.script-line .two { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.script-line textarea, .script-line .input { width: 100%; min-width: 0; }
.hook-pick { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.hook-pick .hk-vo { font-size: 14px; line-height: 1.4; color: var(--text); overflow-wrap: anywhere; }
.hook-pick > label { min-width: 0; }
.hook-pick .d, .cards-pick .d { overflow-wrap: anywhere; } /* URL/kata panjang tidak membuat HP 360 px bergeser (MT-TOLAK 1 #4) */
.script-next { padding: 6px 0 4px; }
.script-next .btn.block { max-width: 520px; width: 100%; }
.ed-modes { align-items: center; }
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 700; color: var(--muted2); min-height: 36px; }
.switch input { width: 18px; height: 18px; accent-color: var(--yellow); }
.own-script > summary { cursor: pointer; font-size: 14px; font-weight: 700; }
.own-script textarea { width: 100%; }
/* Atur sendiri (tugas MT #13): pustaka efek suara/transisi/maskot terlipat; bawaan Otomatis */
.atur-sendiri > summary { cursor: pointer; font-size: 14px; padding: 6px 0; line-height: 1.5; }
.atur-sendiri > summary .tiny { font-weight: 400; overflow-wrap: anywhere; }
.ed-fields .atur-sendiri { border-top: 1px solid var(--line-soft); padding-top: 4px; }
@media (max-width: 640px) {
  .hook-pick { grid-template-columns: 1fr; }
  .script-line .two { grid-template-columns: 1fr; }
}
/* Produk bergerak & foto produkmu (tugas MT #17) */
.ed-preview .pv-move { top: 72px; animation: pv-move 3.2s ease-in-out infinite alternate; transform-origin: 50% 55%; }
@keyframes pv-move { from { transform: scale(1); } to { transform: scale(1.09); } }
@media (prefers-reduced-motion: reduce) { .ed-preview .pv-move { animation: none; } }
.prod-card .prod-pv { border-radius: 12px; border: 1px solid var(--line-soft); background: #1C1914; display: flex; align-items: center; justify-content: center; padding: 10px; }
.prod-card .prod-pv img { display: block; max-width: 100%; max-height: 220px; object-fit: contain; }
.prod-card .prod-pv.checker { background-color: #EDEAE3; background-image: linear-gradient(45deg, #D9D4CA 25%, transparent 25%, transparent 75%, #D9D4CA 75%), linear-gradient(45deg, #D9D4CA 25%, transparent 25%, transparent 75%, #D9D4CA 75%); background-size: 16px 16px; background-position: 0 0, 8px 8px; }
.prod-card .linkbtn { align-self: flex-start; }
.ai-note { border-left: 3px solid var(--warn, #E8B44C); }
/* Master Prompt: kirim ke Gemini / Flow (tugas MT #45) */
.mp-send { display: flex; flex-wrap: wrap; gap: 6px 8px; align-items: center; padding: 10px 12px; border-radius: 12px; background: var(--ink2); border: 1px solid var(--line-soft); }
.mp-send .lbl { font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); font-family: var(--mono); width: 100%; }
.mp-send .btn { min-height: 40px; }
.mp-send .mp-chip { margin-left: auto; }
.mp-chip.sent:has(input:checked) { border-color: var(--ok); background: rgba(143,227,165,.1); color: var(--ok); }
.mp-scene.sent .mp-no { background: var(--ok); }
.mp-sendcard .mp-progress { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.mp-sendcard .mp-progress .progress { flex: 1; height: 8px; }
.mp-sendcard .next { display: flex; gap: 10px; align-items: center; padding: 10px; border-radius: 12px; border: 1px dashed var(--line-strong); }
.mp-sendcard .next img { width: 48px; height: 85px; object-fit: cover; border-radius: 8px; background: var(--ink2); flex: none; }
.mp-sendcard .acts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.mp-sendcard .acts .btn { min-height: 42px; padding: 0 10px; white-space: normal; text-align: center; line-height: 1.2; }
.mp-sendcard .acts [data-act="sent-next"] { grid-column: 1 / -1; }
/* Master Prompt: otomatis penuh dengan key Gemini member (tugas MT #46) */
.mp-autocard .progress { height: 8px; }
.mp-send [data-act="auto"] { min-height: 40px; }

/* ---------- AmaresO KIT di VPS pembeli (tugas MT #49) ---------- */
.kit-head { display: flex; align-items: center; gap: 12px; font-size: 14px; color: var(--muted2); }
.kit-head .pixel { display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center; border-radius: 9px; background: var(--yellow); color: var(--on-yellow); font-size: 18px; }
.kit-head b { color: var(--text); }
.kit-cols { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 900px) { .kit-cols { grid-template-columns: minmax(0, 1fr) 320px; } }
.kit-term { white-space: pre-wrap; overflow-wrap: anywhere; max-height: 260px; overflow: auto; }
.kit-terms { border: 1px solid var(--line-soft); border-radius: 12px; padding: 14px; margin: 0; }
.kit-terms legend { padding: 0 6px; }
.kit-terms .mp-opt { border-color: var(--line-soft); }
.kit-list { margin: 0; padding-left: 20px; font-size: 14px; color: var(--muted2); display: flex; flex-direction: column; gap: 6px; }
.kit-list code { font-size: 12.5px; }
.kit-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.kit-sub .input { flex: 1 1 160px; min-width: 0; }
.kit-ct { display: flex; align-items: center; gap: 12px; }
.kit-ic { display: inline-flex; width: 40px; height: 40px; align-items: center; justify-content: center; border-radius: 12px; background: var(--raised); color: var(--yellow); flex: none; }
.kit-ic .ic { width: 20px; height: 20px; }
.kit-cards .card { align-items: stretch; }
.kit-flow { border-color: rgba(255,227,91,.22); }
.kit-foot b { color: var(--muted2); }
.kit-banner { background: rgba(255,227,91,.1); border-bottom: 1px solid rgba(255,227,91,.3); font-size: 14px; }
.kit-banner .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding-block: 10px; }
.kit-banner.wajib { background: rgba(255,127,112,.1); border-color: rgba(255,127,112,.4); }
.kit-banner em { color: var(--bad); font-style: normal; font-weight: 700; }
/* Foto per adegan (tugas MT #53): pilihan thumbnail foto asli di editor, rapat di HP 360 px */
.photo-pick .pp-row { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); }
.photo-pick .pp-opt { display: flex; flex-direction: column; gap: 6px; padding: 6px; border-radius: 10px; border: 1px solid var(--line-strong); cursor: pointer; position: relative; min-width: 0; }
.photo-pick .pp-opt:has(input:checked) { border: 2px solid var(--yellow); background: var(--raised); padding: 5px; }
.photo-pick .pp-opt:has(input:focus-visible) { outline: 2px solid var(--yellow); outline-offset: 2px; }
.photo-pick .pp-opt input { position: absolute; top: 10px; left: 10px; margin: 0; }
.photo-pick .pp-opt img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; background: var(--ink2); display: block; }
.photo-pick .pp-l { font-size: 12.5px; line-height: 1.3; overflow-wrap: anywhere; }
/* Otomatis di Flow KIT (tugas MT #50): browser jarak jauh & antrean adegan, ramah HP 360 px */
.kf-screen { position: relative; width: 100%; aspect-ratio: 1280 / 800; background: var(--ink2); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; touch-action: manipulation; }
.kf-screen img { display: block; width: 100%; height: 100%; object-fit: contain; cursor: pointer; user-select: none; -webkit-user-select: none; }
.kf-wait { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; margin: 0; }
.kf-type { display: flex; gap: 8px; }
.kf-type .input { flex: 1 1 auto; min-width: 0; }
.kf-shot img { width: 100%; max-width: 640px; border-radius: 10px; border: 1px solid var(--line-soft); background: var(--ink2); }
.kf-list { display: flex; flex-direction: column; gap: 10px; }
.kf-item { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 12px; align-items: start; padding: 12px; border: 1px solid var(--line-soft); border-radius: 12px; background: var(--ink); }
.kf-item img { width: 64px; aspect-ratio: 9 / 16; object-fit: cover; border-radius: 8px; background: var(--ink2); }
.kf-item .kf-h { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.kf-item .kf-acts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.kf-item textarea { width: 100%; min-height: 120px; margin-top: 8px; }
.kf-item .btn.sm { min-height: 40px; }
