:root {
  --bg: #0d0d0f; --panel: #16161a; --panel2: #1e1e24; --line: #2a2a32; --text: #ececf1; --muted: #8b8b98;
  --accent: #d8f53a; --accent-ink: #141600; --danger: #ff5c5c; --ok: #4ade80; --warn: #fbbf24; --info: #60a5fa;
  --radius: 12px;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 14px/1.5 Inter, system-ui, sans-serif; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.err { color: var(--danger); min-height: 1em; margin: 0; }
input, select, textarea, button { font: inherit; color: inherit; }
input, select, textarea {
  width: 100%; background: var(--panel2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; outline: none;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
textarea { resize: vertical; min-height: 72px; }
label { display: block; font-size: 12px; color: var(--muted); margin: 10px 0 4px; }
.btn { color: var(--text); text-decoration: none; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); background: var(--panel2); border-radius: 8px; padding: 8px 14px; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: #444; }
.btn.primary { background: var(--accent); color: var(--accent-ink) !important; border-color: var(--accent); font-weight: 600; }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--danger); }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.brand { font-family: 'Space Grotesk', system-ui, sans-serif, sans-serif; font-weight: 700; font-size: 18px; letter-spacing: -.02em; }
.brand span { color: var(--accent); }
.brand.big { font-size: 30px; }

.login { position: fixed; inset: 0; display: grid; place-items: center; padding: 16px; }
.login-card { width: 100%; max-width: 340px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 28px; display: grid; gap: 12px; }

.topbar { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line); position: sticky; top: 0; background: var(--bg); z-index: 5; flex-wrap: wrap; }
.topbar select { width: auto; min-width: 200px; }
.spacer { flex: 1; }
.pill { font-size: 12px; padding: 4px 10px; border-radius: 99px; border: 1px solid var(--line); }
.pill.on { color: var(--ok); border-color: rgba(74,222,128,.4); }
.pill.off { color: var(--muted); }
.tabs { display: flex; gap: 4px; padding: 8px 20px 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button { background: none; border: none; padding: 10px 14px; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button.active { color: var(--text); border-bottom-color: var(--accent); }
.count { background: var(--accent); color: var(--accent-ink); border-radius: 99px; padding: 0 7px; font-size: 11px; font-weight: 600; }
.count:empty { display: none; }
main { padding: 20px; }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.stats { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { font-size: 11px; padding: 2px 8px; border-radius: 99px; background: var(--panel2); border: 1px solid var(--line); color: var(--muted); }
.st-draft { color: var(--muted); }
.st-siap { color: var(--info); border-color: rgba(96,165,250,.4); }
.st-generate { color: var(--warn); border-color: rgba(251,191,36,.4); }
.st-review { color: #c084fc; border-color: rgba(192,132,252,.4); }
.st-ulang { color: var(--danger); border-color: rgba(255,92,92,.4); }
.st-final { color: var(--ok); border-color: rgba(74,222,128,.4); }

/* Kanvas storyboard: kolom per adegan */
.board { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 16px; align-items: flex-start;
  background-image: radial-gradient(#26262c 1px, transparent 1px); background-size: 18px 18px; border-radius: var(--radius); min-height: 60vh; padding: 16px; }
.scene { flex: 0 0 290px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.scene-head { padding: 12px; border-bottom: 1px solid var(--line); }
.scene-head h3 { margin: 0; font-size: 14px; display: flex; gap: 6px; align-items: center; }
.scene-head h3 .num { color: var(--accent); font-family: 'Space Grotesk', system-ui, sans-serif; }
.scene-head p { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.scene-actions { display: flex; gap: 6px; margin-top: 8px; }
.shots { padding: 10px; display: grid; gap: 8px; }
.shot { background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 10px; cursor: pointer; }
.shot:hover { border-color: var(--accent); }
.shot.active { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.shot .t { font-weight: 600; font-size: 13px; display: flex; justify-content: space-between; gap: 8px; }
.shot .meta { font-size: 11px; color: var(--muted); margin-top: 4px; }
.shot .tags { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 6px; }
.empty { color: var(--muted); padding: 40px; text-align: center; border: 1px dashed var(--line); border-radius: var(--radius); }

/* Drawer editor shot */
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(520px, 100vw); background: var(--panel); border-left: 1px solid var(--line); overflow-y: auto; z-index: 20; padding: 20px; box-shadow: -20px 0 40px rgba(0,0,0,.5); }
.drawer h2 { margin: 0; font-size: 16px; }
.dhead { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.checks { display: flex; flex-wrap: wrap; gap: 6px; }
.checks label { margin: 0; display: flex; gap: 6px; align-items: center; background: var(--panel2); border: 1px solid var(--line); border-radius: 99px; padding: 4px 10px; color: var(--text); font-size: 13px; cursor: pointer; }
.checks input { width: auto; }
.promptbox { background: #0a0a0c; border: 1px solid var(--line); border-radius: 10px; padding: 12px; font-size: 13px; white-space: pre-wrap; margin-top: 6px; }
.section { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.section h4 { margin: 0 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; align-items: center; }
.switch { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--text); margin-top: 8px; }
.switch input { width: auto; }

/* Bible */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.card h3 { margin: 0 0 4px; font-size: 15px; }
.card .desc { font-size: 13px; color: #c9c9d2; margin-top: 8px; }
.hint { font-size: 12px; color: var(--muted); background: var(--panel2); border-left: 3px solid var(--accent); padding: 8px 12px; border-radius: 6px; margin-bottom: 16px; max-width: 900px; }
.form-wrap { max-width: 900px; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 500; font-size: 12px; }
.table-wrap { overflow-x: auto; }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--accent); color: var(--accent-ink); padding: 10px 18px; border-radius: 10px; font-weight: 600; z-index: 50; }
.toast.bad { background: var(--danger); color: #fff; }

@media (max-width: 640px) {
  main { padding: 12px; }
  .topbar { padding: 10px 12px; }
  .topbar select { min-width: 0; flex: 1; }
  .grid2 { grid-template-columns: 1fr; }
  .scene { flex-basis: 260px; }
}

/* ================= Pemilih visual (modal) ================= */
.pk-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.6); backdrop-filter: blur(4px); z-index: 40; display: grid; place-items: center; padding: 16px; }
.pk-modal { width: min(1000px, 100%); max-height: min(720px, 92vh); background: #232327; border: 1px solid #34343b; border-radius: 24px; display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 30px 80px rgba(0,0,0,.6); }
.pk-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; }
.pk-head h3 { margin: 0; font-size: 18px; }
.pk-head-actions { display: flex; gap: 8px; }
.pk-pillbtn { background: #34343b; border: none; border-radius: 99px; padding: 8px 16px; font-weight: 600; cursor: pointer; }
.pk-x { background: #34343b; border: none; border-radius: 50%; width: 38px; height: 38px; font-size: 22px; cursor: pointer; line-height: 1; }
.pk-body { display: grid; grid-template-columns: 210px 1fr; flex: 1; min-height: 0; margin: 0 6px 6px; background: #2b2b30; border-radius: 18px; overflow: hidden; }
.pk-body.single { grid-template-columns: 1fr; }
.pk-side { padding: 14px; border-right: 1px solid #36363d; display: flex; flex-direction: column; gap: 4px; }
.pk-side button { text-align: left; background: none; border: none; padding: 10px 14px; border-radius: 10px; color: var(--muted); cursor: pointer; font-size: 15px; }
.pk-side button.active { background: #38383f; color: var(--text); }
.pk-main { padding: 20px; overflow-y: auto; }
.pk-title { margin-bottom: 14px; }
.pk-title.row { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.pk-title b { display: block; font-size: 16px; }
.pk-title span { color: var(--muted); font-size: 13px; }
.pk-search { width: 180px; }
.pk-desc { color: var(--muted); font-size: 12px; text-align: center; margin: 12px 0 0; min-height: 1.5em; }
.pk-form { max-width: 460px; }

/* Carousel */
.pk-carousel { position: relative; height: 300px; display: grid; place-items: center; overflow: hidden; }
.pk-arc { position: absolute; left: -10%; right: -10%; top: 30px; height: 600px; border-radius: 50%; background: #333339; border-top: 1px solid #45454d; }
.pk-card { position: relative; border-radius: 22px; border: 6px solid #1a1a1d; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.pk-card.center { width: min(400px, 60%); aspect-ratio: 16/9; display: grid; place-items: end start; padding: 12px; z-index: 2; }
.pk-card.center span { background: rgba(0,0,0,.45); padding: 4px 10px; border-radius: 99px; font-size: 13px; font-weight: 600; }
.pk-card.side { position: absolute; width: 170px; aspect-ratio: 1; cursor: pointer; top: 150px; opacity: .85; }
.pk-card.side.left { left: -30px; transform: rotate(-40deg); }
.pk-card.side.right { right: -30px; transform: rotate(40deg); }
.pk-nav { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 4px; }
.pk-circ { width: 38px; height: 38px; border-radius: 50%; border: 1px solid #4a4a52; background: #333339; cursor: pointer; font-size: 20px; }
.pk-chip { background: #3a3a41; border: 1px solid #4a4a52; padding: 8px 22px; border-radius: 99px; font-weight: 600; min-width: 120px; text-align: center; }

/* Roda */
.pk-wheels { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.pk-wheel { border-right: 1px solid #36363d; padding: 0 6px; }
.pk-wheel:last-child { border: none; }
.pk-wtitle { text-align: center; font-size: 11px; letter-spacing: .1em; color: var(--muted); font-weight: 600; margin-bottom: 14px; }
.pk-wbody { display: flex; flex-direction: column; gap: 10px; align-items: center; user-select: none; }
.pk-wpill { width: 100%; max-width: 180px; aspect-ratio: 1.55; border-radius: 99px; border: 2px solid #3d3d44; background: #303036; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; cursor: pointer; padding: 6px; }
.pk-wpill span { font-size: 12px; font-weight: 600; text-align: center; }
.pk-wpill.dim { opacity: .4; transform: scale(.92); }
.pk-wpill.dim:hover { opacity: .75; }
.pk-wpill.sel { border-color: #fff; background: #3c3c43; box-shadow: 0 0 0 4px #2b2b30, 0 0 0 5px #55555d; cursor: default; }

/* Grid kartu */
.pk-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.pk-tile { position: relative; background: none; border: none; padding: 0; cursor: pointer; text-align: center; display: flex; flex-direction: column; gap: 6px; }
.pk-tile b { font-size: 13px; }
.pk-prev { border-radius: 14px; overflow: hidden; border: 2px solid transparent; aspect-ratio: 16/10; background: #222; }
.pk-tile:hover .pk-prev { border-color: #55555d; }
.pk-tile.sel .pk-prev { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(216,245,58,.3); }
.pk-tile.add .pk-plus { display: grid; place-items: center; aspect-ratio: 16/10; border-radius: 14px; border: 1px solid #45454d; background: #333339; font-size: 30px; }
.pk-del { position: absolute; top: 6px; right: 6px; background: rgba(0,0,0,.6); border-radius: 50%; width: 24px; height: 24px; line-height: 24px; font-size: 16px; }
.pk-light { width: 100%; height: 100%; position: relative; }
.pk-person { position: absolute; left: 50%; bottom: 0; width: 34%; transform: translateX(-50%); fill: rgba(0,0,0,.82); }
.pk-sw { display: flex; height: 100%; }
.pk-sw i { flex: 1; }
.pk-asset { width: 100%; height: 100%; display: grid; place-items: center; font-size: 40px; font-family: 'Space Grotesk', system-ui, sans-serif; background: linear-gradient(135deg,#2a2a30,#3a3a42); color: var(--accent); }

/* Pratinjau gerakan kamera */
.pk-move { width: 100%; height: 100%; display: grid; place-items: center; background: repeating-linear-gradient(90deg,#1e2a1e 0 20px,#253325 20px 40px); }
.pk-frame { width: 60%; height: 60%; border: 2px dashed rgba(255,255,255,.6); position: relative; overflow: hidden; }
.pk-subj { position: absolute; left: 50%; top: 50%; width: 22px; height: 30px; margin: -15px 0 0 -11px; background: var(--accent); border-radius: 11px 11px 4px 4px; }
.mv-in .pk-subj { animation: mvIn 2s ease-in-out infinite alternate; }
.mv-out .pk-subj { animation: mvIn 2s ease-in-out infinite alternate-reverse; }
.mv-pan .pk-subj { animation: mvPan 2.4s ease-in-out infinite alternate; }
.mv-tilt .pk-subj, .mv-crane .pk-subj { animation: mvTilt 2.4s ease-in-out infinite alternate; }
.mv-down .pk-subj { animation: mvTilt 2.4s ease-in-out infinite alternate-reverse; }
.mv-track .pk-subj { animation: mvTrack 2s linear infinite; }
.mv-orbit .pk-subj { animation: mvOrbit 3s ease-in-out infinite; }
.mv-shake .pk-subj { animation: mvShake .5s ease-in-out infinite; }
@keyframes mvIn { from { transform: scale(.7); } to { transform: scale(1.8); } }
@keyframes mvPan { from { transform: translateX(-40px); } to { transform: translateX(40px); } }
@keyframes mvTilt { from { transform: translateY(30px); } to { transform: translateY(-30px); } }
@keyframes mvTrack { 0% { transform: translateX(0); } 50% { transform: translateX(3px) translateY(-2px); } 100% { transform: translateX(0); } }
@keyframes mvOrbit { 0% { transform: scaleX(1); } 50% { transform: scaleX(.3); } 100% { transform: scaleX(1); } }
@keyframes mvShake { 0%,100% { transform: translate(0,0) rotate(0); } 25% { transform: translate(1px,-1px) rotate(1deg); } 75% { transform: translate(-1px,1px) rotate(-1deg); } }
.pk-size { width: 100%; height: 100%; position: relative; background: #1f2630; overflow: hidden; }
.sz-ews .pk-subj { transform: scale(.4); } .sz-ws .pk-subj { transform: scale(.8); } .sz-ms .pk-subj { transform: scale(1.6) translateY(4px); }
.sz-mcu .pk-subj { transform: scale(2.4) translateY(5px); } .sz-cu .pk-subj { transform: scale(3.4) translateY(5px); } .sz-ecu .pk-subj { transform: scale(6); }
.sz-ots .pk-subj { transform: translateX(-30px) scale(1.5); } .sz-pov .pk-subj { transform: translateY(40px) scale(2); opacity: .7; }

/* ================= Studio ================= */
.studio { max-width: 1080px; margin: 0 auto; }
.studio-hero { font-family: 'Space Grotesk', system-ui, sans-serif; font-size: clamp(28px, 5vw, 46px); text-align: center; letter-spacing: -.03em; margin: 20px 0 24px; text-transform: uppercase; }
.studio-hero span { color: var(--accent); }
.studio-box { background: #1b1b20; border: 1px solid var(--line); border-radius: 22px; padding: 10px; }
.studio-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.schip { display: flex; align-items: center; gap: 10px; background: #26262c; border: 1px solid #303037; border-radius: 14px; padding: 8px 14px 8px 8px; cursor: pointer; text-align: left; flex: 1 0 auto; min-width: 150px; }
.schip:hover { border-color: #4a4a52; }
.schip small { display: block; font-family: ui-monospace, monospace; font-size: 10px; color: var(--muted); }
.schip b { display: block; font-size: 14px; max-width: 170px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.schip-ico { width: 40px; height: 40px; border-radius: 10px; flex: none; display: grid; place-items: center; border: 1px solid #3b3b42; background: #2e2e34; }
.schip-ico.refs { font-size: 22px; }
.schip-ico.cam { color: var(--info); }
.refs-row { display: flex; gap: 8px; padding: 10px 4px 0; flex-wrap: wrap; }
.ref { position: relative; }
.ref img { width: 72px; height: 72px; object-fit: cover; border-radius: 10px; display: block; }
.ref button { position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; border-radius: 50%; border: none; background: var(--danger); color: #fff; cursor: pointer; line-height: 1; }
.studio-input { position: relative; margin-top: 10px; }
.studio-input textarea { background: transparent; border: none; font-size: 16px; min-height: 90px; padding: 10px 12px; }
.mention { position: absolute; left: 12px; top: 100%; z-index: 10; background: #26262c; border: 1px solid #3b3b42; border-radius: 12px; min-width: 260px; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
.mi { padding: 8px 12px; display: flex; justify-content: space-between; gap: 12px; cursor: pointer; font-size: 13px; }
.mi span { color: var(--muted); font-size: 11px; }
.mi.on, .mi:hover { background: #34343b; }
.studio-bottom { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 8px; border-top: 1px solid #2a2a30; }
.studio-bottom select, .studio-bottom input { width: auto; }
.studio-bottom #stAudio { min-width: 180px; }
.btn.big { padding: 12px 26px; border-radius: 14px; display: flex; flex-direction: column; align-items: center; line-height: 1.2; font-family: 'Space Grotesk', system-ui, sans-serif; letter-spacing: .04em; }
.btn.big small { font-size: 11px; font-weight: 500; opacity: .75; font-family: Inter; letter-spacing: 0; }
.studio-preview { margin-top: 20px; }
.studio-preview h4 { margin: 0; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }

/* ================= Kanvas ================= */
.cv-wrap { position: relative; height: calc(100vh - 150px); min-height: 480px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.cv { position: absolute; inset: 0; background-color: #0e0e10; background-image: radial-gradient(#2c2c33 1.2px, transparent 1.2px); background-size: 18px 18px; cursor: grab; touch-action: none; }
.cv.panning { cursor: grabbing; }
.cv-world { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.cv-edges { position: absolute; left: 0; top: 0; width: 1px; height: 1px; overflow: visible; }
.edge { fill: none; stroke: #8a8a95; stroke-width: 2; pointer-events: none; }
.edge.tmp { stroke: var(--accent); stroke-dasharray: 6 4; }
.edge-hit { fill: none; stroke: transparent; stroke-width: 14; cursor: pointer; pointer-events: stroke; }
.edge-hit:hover + .edge { stroke: var(--danger); }
.cv-hint { position: absolute; left: 50%; top: 45%; transform: translate(-50%,-50%); color: #b5b5c0; font-size: 18px; pointer-events: none; display: flex; gap: 16px; align-items: center; white-space: nowrap; }
.cv-cursor { color: var(--accent); font-size: 26px; transform: rotate(-35deg); display: inline-block; }
.cv-tools { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); z-index: 5; background: #19191d; border: 1px solid var(--line); border-radius: 14px; padding: 6px; display: flex; flex-direction: column; gap: 4px; }
.cv-tools button { width: 40px; height: 40px; border: none; background: none; border-radius: 10px; cursor: pointer; display: grid; place-items: center; color: #d6d6de; }
.cv-tools button:hover { background: #2a2a30; color: var(--accent); }
.cv-tools hr { border: none; border-top: 1px solid var(--line); margin: 4px 6px; }
.cv-zoom { position: absolute; left: 10px; bottom: 10px; z-index: 5; display: flex; gap: 4px; align-items: center; background: #19191d; border: 1px solid var(--line); border-radius: 10px; padding: 4px; }
.cv-zoom button { border: none; background: #26262c; border-radius: 7px; min-width: 30px; height: 28px; cursor: pointer; padding: 0 8px; }
.cv-zoom span { font-size: 12px; color: var(--muted); min-width: 44px; text-align: center; }
.cv-help { position: absolute; right: 10px; bottom: 10px; z-index: 5; font-size: 11px; color: var(--muted); background: rgba(14,14,16,.85); padding: 6px 10px; border-radius: 8px; max-width: 60%; }
.cv-menu { position: absolute; z-index: 20; width: 240px; background: #222227; border: 1px solid #34343b; border-radius: 16px; padding: 8px; box-shadow: 0 20px 50px rgba(0,0,0,.6); }
.cvm-title { color: var(--muted); font-size: 12px; padding: 6px 10px; }
.cv-menu button { display: flex; align-items: center; gap: 10px; width: 100%; background: none; border: none; padding: 9px 10px; border-radius: 10px; cursor: pointer; font-size: 14px; text-align: left; }
.cv-menu button:hover { background: #303036; }
.cv-menu hr { border: none; border-top: 1px solid #34343b; margin: 6px 4px; }
.cvm-sub { position: relative; }
.cvm-new { font-size: 10px; color: var(--info); background: rgba(96,165,250,.15); padding: 1px 6px; border-radius: 99px; margin-left: auto; }
.cvm-arrow { color: var(--muted); }
.cvm-flyout { display: none; position: absolute; left: 100%; top: 0; margin-left: 8px; width: 170px; background: #222227; border: 1px solid #34343b; border-radius: 14px; padding: 6px; }
.cvm-sub.open .cvm-flyout, .cvm-sub:hover .cvm-flyout { display: block; }

.nd { position: absolute; width: 260px; background: #1c1c21; border: 1px solid #34343b; border-radius: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.35); cursor: default; }
.nd.sel { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), 0 8px 24px rgba(0,0,0,.4); }
.nd-head { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-bottom: 1px solid #2c2c33; cursor: move; font-size: 12px; font-weight: 600; color: #cfcfd8; user-select: none; touch-action: none; }
.nd-head span { flex: 1; }
.nd-x { background: none; border: none; color: var(--muted); font-size: 18px; cursor: pointer; line-height: 1; padding: 0 2px; }
.nd-x:hover { color: var(--danger); }
.nd-body { padding: 10px; display: grid; gap: 8px; }
.nd-body textarea { min-height: 70px; font-size: 13px; }
.nd-body input, .nd-body select { font-size: 13px; padding: 6px 8px; }
.nd-body img { width: 100%; border-radius: 8px; display: block; }
.nd-row { display: flex; gap: 6px; flex-wrap: wrap; }
.nd-row select { flex: 1; }
.nd-drop { border: 1px dashed #45454d; border-radius: 10px; padding: 26px 10px; text-align: center; color: var(--muted); cursor: pointer; font-size: 12px; }
.nd-drop:hover { border-color: var(--accent); color: var(--text); }
.nd-desc { font-size: 12px; margin: 0; color: #c9c9d2; }
.nd-kit { font-size: 13px; background: #26262c; border-radius: 8px; padding: 8px; }
.nd-prompt { font-size: 11px; background: #0a0a0c; border: 1px solid #2c2c33; border-radius: 8px; padding: 8px; max-height: 150px; overflow-y: auto; white-space: pre-wrap; color: #c9c9d2; }
.nd-video { width: 300px; border-color: #3d4a1a; }
.nd-timeline { width: 280px; }
.nd-note { background: #3b3416; border-color: #5c4f1a; }
.nd-note textarea { background: transparent; border: none; color: #fff3b8; }
.nd-tl { display: grid; gap: 4px; font-size: 12px; }
.tl-item { display: flex; gap: 8px; align-items: center; background: #26262c; border-radius: 6px; padding: 5px 8px; }
.tl-item b { color: var(--accent); }
.tl-item span { flex: 1; }
.tl-item em { color: var(--muted); font-style: normal; }
.tl-total { color: var(--muted); text-align: right; }
.port { position: absolute; top: 50px; width: 14px; height: 14px; border-radius: 50%; background: #1c1c21; border: 2px solid #8a8a95; }
.port.in { left: -8px; }
.port.out { right: -8px; cursor: crosshair; }
.port.out:hover { border-color: var(--accent); background: var(--accent); }

@media (max-width: 760px) {
  .pk-body { grid-template-columns: 1fr; }
  .pk-side { flex-direction: row; border-right: none; border-bottom: 1px solid #36363d; overflow-x: auto; }
  .pk-wheels { grid-template-columns: repeat(2, 1fr); row-gap: 20px; }
  .pk-card.side { width: 110px; }
  .cv-help { display: none; }
  .studio-bottom .spacer { display: none; }
}

/* Pilihan mesin */
.seg { display: inline-flex; background: #26262c; border: 1px solid #34343b; border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { background: none; border: none; padding: 6px 12px; border-radius: 7px; cursor: pointer; color: var(--muted); font-size: 13px; white-space: nowrap; }
.seg button.on { background: var(--accent); color: var(--accent-ink); font-weight: 600; }
.studio-engine { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 4px 8px 6px; font-size: 12px; }
.studio-engine .muted { flex: 1; min-width: 220px; }
.result-video { width: 100%; border-radius: 10px; margin-top: 10px; background: #000; }
.nd-status { display: flex; }
.nd .seg button { padding: 4px 8px; font-size: 12px; }
