@font-face { font-family: 'Poppins'; font-weight: 400; src: url('../fonts/Poppins-Regular.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Poppins'; font-weight: 500; src: url('../fonts/Poppins-Medium.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Poppins'; font-weight: 700; src: url('../fonts/Poppins-Bold.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Outfit'; font-weight: 100 900; src: url('../fonts/Outfit-Bold.ttf') format('truetype'); font-display: swap; }

/* Warna diambil dari logo: api oranye-merah di atas ungu anggur gelap */
:root {
  --bg: #160a12; --bg2: #1d0d17; --surface: #25111c; --surface2: #311825; --line: #4c2a39; --line2: #6a3d50;
  --text: #fff5ef; --muted: #cfb3b9; --faint: #a58a92;
  --amber: #ffb020; --orange: #ff6a1f; --red: #e8173f; --flame: linear-gradient(100deg, #ffb020, #ff6a1f 48%, #e8173f);
  --good: #35d0a5; --good-bg: #123d33; --bad: #ff8fa3; --bad-bg: #541a2c; --info-bg: #3b2030;
  --r: 11px; --r-lg: 18px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); color-scheme: dark; }
body { margin: 0; background: var(--bg); color: var(--text); font: 400 15px/1.55 Poppins, system-ui, sans-serif; }
h1, h2, h3, h4, p, figure { margin: 0; }
h1, h2, h3, h4, .wordmark { font-family: Outfit, Poppins, sans-serif; }
a { color: var(--amber); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .45; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; }
.hidden { display: none !important; }
.engine-frame, .offscreen { position: fixed; width: 1px; height: 1px; left: -10px; top: -10px; border: 0; opacity: 0; pointer-events: none; }
.grow { flex: 1; min-width: 0; }
.boot { min-height: 100vh; display: grid; place-items: center; }
.boot img { animation: breathe 1.4s ease-in-out infinite; border-radius: 18px; }
.boot-err { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 24px; text-align: center; }

.wordmark { font-size: 21px; font-weight: 800; letter-spacing: -.02em; transform: skewX(-9deg); display: inline-block; white-space: nowrap; }
.wordmark b { color: var(--text); font-weight: 800; }
.wordmark i { font-style: normal; background: var(--flame); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 800; }
.brand { display: flex; align-items: center; gap: 10px; }
.logo-img { display: block; border-radius: 24%; }
.logo-anim { position: relative; display: block; border-radius: 26%; animation: logoIn .7s cubic-bezier(.2, 1.4, .4, 1) both; }
.logo-anim::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 0 22px rgba(255, 106, 31, .55); animation: breathe 3s ease-in-out infinite; pointer-events: none; }

/* Kerangka */
.shell { display: grid; grid-template-columns: 212px minmax(0, 1fr); min-height: 100vh; }
.rail { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 22px; padding: 18px 14px; background: var(--bg2); border-right: 1px solid var(--line); overflow-y: auto; }
.rail-nav { display: flex; flex-direction: column; gap: 4px; }
.rail-link, .rail-btn { display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: var(--r); color: var(--muted); text-decoration: none; font-weight: 500; background: none; border: 0; width: 100%; text-align: left; transition: background .15s, color .15s; }
.rail-link:hover, .rail-btn:hover { background: var(--surface); color: var(--text); }
.rail-link.on { background: var(--surface2); color: var(--text); box-shadow: inset 3px 0 0 var(--orange); }
.rail-foot { margin-top: auto; display: flex; flex-direction: column; gap: 6px; }
.credit-pill, .plan-pill { display: flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 10px; border-radius: 999px; font-size: 13px; }
.credit-pill { background: var(--surface2); border: 1px solid var(--line2); color: var(--amber); }
.credit-pill b { color: var(--text); }
.plan-pill { background: none; border: 1px dashed var(--line2); color: var(--muted); }
.content { min-width: 0; }
.studio-layout { display: grid; grid-template-columns: minmax(0, 1fr) 400px; min-height: 100vh; }
.work { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: flex; align-items: center; gap: 10px; padding: 12px 26px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.title-input { flex: 1; min-width: 140px; border: 1px solid transparent; background: transparent; padding: 7px 10px; border-radius: 8px; font: 700 17px Outfit, Poppins, sans-serif; }
.title-input:hover, .title-input:focus { border-color: var(--line2); background: var(--surface); }
.save-badge { font-size: 12px; color: var(--faint); white-space: nowrap; }
.save-badge.busy { color: var(--amber); }

/* Penunjuk langkah berbentuk pita film */
.stepper { position: relative; display: flex; gap: 8px; margin: 18px 26px 0; padding: 14px 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); }
.stepper::before, .stepper::after { content: ''; position: absolute; left: 12px; right: 12px; height: 5px; background: repeating-linear-gradient(90deg, var(--line2) 0 9px, transparent 9px 19px); border-radius: 2px; opacity: .8; }
.stepper::before { top: 4px; } .stepper::after { bottom: 5px; }
.reel { position: absolute; left: 0; bottom: 0; right: 0; height: 3px; overflow: hidden; border-radius: 0 0 14px 14px; }
.reel i { display: block; height: 100%; background: var(--flame); transition: width .5s cubic-bezier(.2, .8, .2, 1); }
.step-tab { flex: 1; display: flex; align-items: center; gap: 9px; padding: 8px 10px; background: transparent; border: 0; border-radius: 9px; font-weight: 500; color: var(--muted); text-align: left; min-width: 0; transition: background .18s, color .18s; }
.step-tab:hover { background: var(--surface2); color: var(--text); }
.step-tab .n { flex: none; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--surface2); color: var(--muted); }
.step-tab[aria-current='step'] { color: var(--text); background: var(--surface2); }
.step-tab[aria-current='step'] .n { background: var(--flame); color: #220a10; box-shadow: 0 0 16px rgba(255, 106, 31, .55); }
.step-tab.done .n { color: var(--good); }
.step-tab[aria-current='step'].done .n { color: #220a10; }
.step-tab span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.panel { padding: 22px 26px 80px; max-width: 900px; width: 100%; }
.step-page { animation: stepIn .32s cubic-bezier(.2, .8, .2, 1); }
.panel h2, .page h2 { font-size: 28px; font-weight: 800; line-height: 1.15; letter-spacing: -.02em; margin-bottom: 6px; }
.lead { color: var(--muted); margin-bottom: 18px; max-width: 62ch; }
.block { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 18px; margin-bottom: 14px; display: flex; flex-direction: column; gap: 12px; }
.block h3 { font-size: 17px; font-weight: 700; }
.block-gap { margin-bottom: 14px; }
label.field, .field { display: block; }
label.field > span, .field-label { display: block; font-weight: 500; font-size: 14px; margin-bottom: 6px; }
input[type=text], input[type=password], input[type=email], input[type=number], input[type=search], input[type=date], select, textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line2); border-radius: var(--r); background: var(--bg); color: var(--text); }
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, select:focus, textarea:focus { border-color: var(--orange); outline: 2px solid rgba(255, 106, 31, .35); outline-offset: 0; }
select option { background: var(--surface); }
select.mini { width: auto; padding: 5px 8px; }
textarea { resize: vertical; min-height: 78px; display: block; }
textarea.code { font: 12.5px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; min-height: 118px; }
.hint { font-size: 13px; color: var(--muted); }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row.nowrap { flex-wrap: nowrap; }
.row.nowrap > input { flex: 1; min-width: 0; }
.row.between { justify-content: space-between; align-items: flex-start; }
.row.end { justify-content: flex-end; margin-top: 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.with-button { display: flex; gap: 10px; align-items: flex-end; }
.with-button .field { flex: 1; min-width: 0; }
.check { display: flex; align-items: center; gap: 9px; font-size: 14px; }
.check input { accent-color: var(--orange); width: 17px; height: 17px; flex: none; }
input[type=range] { width: 100%; accent-color: var(--orange); }

.btn { position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 15px; border-radius: var(--r); border: 1px solid var(--line2); background: var(--surface2); color: var(--text); font-weight: 500; min-height: 42px; text-decoration: none; transition: transform .12s, border-color .15s, filter .15s; }
.btn:hover:not(:disabled) { border-color: var(--amber); }
.btn:active:not(:disabled) { transform: scale(.97); }
.btn.primary { background: #ff6a1f; border-color: #ff6a1f; color: #220a10; font-weight: 700; }
.btn.primary:hover:not(:disabled) { filter: brightness(1.1); border-color: #ff6a1f; }
.btn.go { background: var(--flame); border: 0; color: #220a10; font-weight: 700; box-shadow: 0 6px 22px rgba(232, 23, 63, .32); }
.btn.go:hover:not(:disabled) { filter: brightness(1.08); }
.btn.go::after { content: ''; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .45), transparent); animation: sheen 3.6s ease-in-out infinite; pointer-events: none; }
.btn.big { min-height: 50px; font-size: 16px; width: 100%; flex: none; }
.btn.danger { background: var(--red); border-color: var(--red); color: #fff; font-weight: 700; }
.btn.small { padding: 6px 11px; min-height: 34px; font-size: 13px; }
.btn.ghost-danger { background: none; color: var(--bad); border-color: var(--line2); }
.btn.link { border: 0; background: none; color: var(--amber); padding: 4px 0; min-height: 0; text-decoration: underline; }
.fix-btn { margin-top: 8px; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border: 1px solid var(--line2); border-radius: 999px; background: var(--surface2); font-weight: 500; font-size: 14px; transition: border-color .15s; }
.chip:hover { border-color: var(--amber); }
.chip[aria-pressed='true'] { background: var(--flame); color: #220a10; border-color: transparent; font-weight: 700; }
.chip.soft { background: none; }
.chip.add { background: none; border-style: dashed; color: var(--amber); }
.preset-bar { display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 14px; padding: 12px 14px; border: 1px dashed var(--line2); border-radius: 14px; }
.preset-title { display: flex; flex-direction: column; }

.style-grid, .char-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 10px; }
.pick-card { display: block; padding: 5px; border: 2px solid transparent; border-radius: 13px; background: none; text-align: left; font-size: 13px; color: inherit; text-decoration: none; transition: transform .16s, background .16s; align-self: start; }
.pick-card:hover { transform: translateY(-3px); background: var(--surface2); }
.pick-card .thumb { display: grid; place-items: center; aspect-ratio: 9/14; overflow: hidden; border-radius: 9px; background: var(--bg); color: var(--amber); }
.pick-card canvas, .char-card canvas { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.pick-card b { display: block; margin: 6px 2px 0; font-weight: 700; line-height: 1.25; }
.pick-card small { display: block; margin: 2px 2px 3px; color: var(--muted); font-size: 12px; line-height: 1.3; }
.pick-card[aria-pressed='true'] { border-color: var(--orange); background: var(--surface2); box-shadow: 0 0 18px rgba(255, 106, 31, .28); }
.pick-card.add .thumb { border: 2px dashed var(--line2); background: none; }
.char-grid .thumb, .char-card .thumb { background: #efe6ff; }
.char-grid .add .thumb { background: none; }
.char .thumb canvas { object-position: center; }

.exchange { display: flex; flex-direction: column; gap: 14px; }
.ex-step { display: flex; gap: 10px; }
.ex-n { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--surface2); border: 1px solid var(--line2); display: grid; place-items: center; font-size: 12px; font-weight: 700; color: var(--amber); }
.ex-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.msg { padding: 10px 12px; border-radius: var(--r); font-size: 14px; }
.msg .btn { margin-top: 8px; }
.msg.err { background: var(--bad-bg); color: #ffdbe2; }
.msg.ok { background: var(--good-bg); color: #c8f7e7; }
.msg.info, .callout { background: var(--info-bg); color: var(--text); }
.callout { padding: 12px 14px; border-radius: var(--r); margin-bottom: 14px; border-left: 3px solid var(--orange); }
.block .callout { margin-bottom: 0; }

.ideas { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; }
.idea { text-align: left; padding: 14px; background: var(--surface2); border: 2px solid var(--line); border-radius: 14px; transition: transform .16s, border-color .16s; }
.idea:hover { border-color: var(--orange); transform: translateY(-3px); }
.idea[aria-pressed='true'] { border-color: var(--orange); }
.idea b { display: block; margin-bottom: 6px; line-height: 1.3; font-family: Outfit, Poppins, sans-serif; font-size: 16px; }
.idea q { display: block; quotes: none; font-weight: 500; margin-bottom: 8px; font-size: 14px; color: var(--amber); }
.idea p { color: var(--muted); font-size: 13px; }

.scene-row { display: grid; grid-template-columns: 32px 1fr; gap: 10px; padding: 12px 0; border-top: 1px solid var(--line); }
.block h3 + .scene-row { border-top: 0; padding-top: 0; }
.scene-n { width: 30px; height: 30px; border: 1px solid var(--line2); border-radius: 8px; background: var(--surface2); color: var(--amber); font-weight: 700; font-size: 13px; display: grid; place-items: center; padding: 0; }
.scene-row textarea { min-height: 62px; }
.scene-meta { display: grid; grid-template-columns: 1fr 130px 150px; gap: 8px; margin-top: 8px; }
.scene-visual { font-size: 13px; color: var(--muted); margin-top: 6px; }

.seg { display: flex; gap: 6px; padding: 5px; background: var(--bg); border-radius: 13px; flex-wrap: wrap; }
.seg button { flex: 1 1 110px; padding: 8px 10px; border: 0; border-radius: 9px; background: none; color: var(--muted); }
.seg b { display: block; font-size: 14px; } .seg small { display: block; font-size: 12px; }
.seg button[aria-selected='true'] { background: var(--surface2); color: var(--text); box-shadow: inset 0 -2px 0 var(--orange); }
.dropzone { position: relative; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 26px; border: 2px dashed var(--line2); border-radius: 14px; cursor: pointer; text-align: center; color: var(--amber); transition: border-color .15s; }
.dropzone:hover { border-color: var(--amber); }
.dropzone b { color: var(--text); }
.file-input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.file-plain { font-size: 13px; width: 100%; color: var(--muted); }

.wave-wrap { position: relative; touch-action: none; user-select: none; }
.wave { width: 100%; height: 112px; display: block; background: var(--bg); border-radius: var(--r); }
.cut { position: absolute; top: 0; bottom: 0; width: 22px; margin-left: -11px; cursor: ew-resize; background: none; border: 0; padding: 0; touch-action: none; }
.cut::before { content: ''; position: absolute; left: 10px; top: 0; bottom: 0; width: 2px; background: var(--text); }
.cut::after { content: ''; position: absolute; left: 5px; bottom: -3px; width: 12px; height: 12px; border-radius: 50%; background: var(--text); box-shadow: 0 0 0 3px var(--orange); }
.timing { display: grid; grid-template-columns: 34px 100px 1fr; gap: 8px; padding: 6px 0; font-size: 13px; align-items: center; border-top: 1px solid var(--line); }
.timing span:last-child { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

.group-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; font-weight: 700; }
.badge { font-size: 12px; font-weight: 500; padding: 3px 10px; border-radius: 999px; background: var(--surface2); color: var(--muted); white-space: nowrap; margin-left: 6px; }
.badge.done { background: var(--good-bg); color: var(--good); }
.progress { height: 10px; background: var(--bg); border-radius: 99px; overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--flame); width: 0; transition: width .4s; }
.copy-row { display: flex; gap: 8px; align-items: flex-start; }
.copy-row > textarea, .copy-row > input { flex: 1; min-width: 0; }
.copy-field { margin-bottom: 4px; }

/* Panel preview */
.studio { background: var(--bg2); border-left: 1px solid var(--line); padding: 16px 20px; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; gap: 12px; }
.frame-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 13px; color: var(--muted); }
.frame-chips, .mini-chips { display: flex; gap: 3px; flex-wrap: wrap; }
.frame-chips { background: var(--surface); padding: 3px; border-radius: 9px; }
.frame-chips button, .mini-chips button { padding: 4px 9px; font-size: 12px; border: 0; border-radius: 7px; background: none; color: var(--muted); font-weight: 500; }
.mini-chips button { background: var(--surface2); }
.frame-chips button[aria-pressed='true'], .mini-chips button[aria-pressed='true'] { background: var(--orange); color: #220a10; font-weight: 700; }
.phone-shell { align-self: center; padding: 8px; background: #0a0409; border-radius: 34px; box-shadow: 0 0 0 1px var(--line2), 0 18px 50px rgba(0, 0, 0, .5); width: min(100%, 262px); flex: none; }
.phone-shell.glow { box-shadow: 0 0 0 1px var(--line2), 0 0 70px rgba(255, 106, 31, .4); }
.phone-screen { position: relative; overflow: hidden; border-radius: 26px; aspect-ratio: 9/16; background: var(--surface); }
.phone-screen canvas { display: block; width: 100%; height: 100%; }
.safe-overlay { position: absolute; inset: 0; pointer-events: none; color: #fff; font-size: 11px; }
.z { position: absolute; background: rgba(232, 23, 63, .22); }
.z-top { left: 0; right: 0; top: 0; height: var(--t); display: flex; align-items: flex-end; justify-content: center; padding-bottom: 4px; border-bottom: 1px dashed rgba(255, 255, 255, .75); }
.z-bottom { left: 0; right: 0; bottom: 0; height: var(--b); padding: 8px 10px; display: flex; flex-direction: column; border-top: 1px dashed rgba(255, 255, 255, .75); }
.z-right { top: var(--t); right: 0; bottom: var(--b); width: var(--r); display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 12px; padding-bottom: 6px; border-left: 1px dashed rgba(255, 255, 255, .75); }
.z-right i { display: block; color: #fff; filter: drop-shadow(0 1px 1px #000); }
.z span, .z b { text-shadow: 0 1px 2px #000; }
.transport { display: flex; align-items: center; gap: 10px; }
.play { flex: none; width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--flame); color: #220a10; display: grid; place-items: center; box-shadow: 0 0 16px rgba(255, 106, 31, .5); transition: transform .12s; }
.play:active { transform: scale(.92); }
.time { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.strip { display: flex; gap: 5px; overflow-x: auto; padding: 2px 2px 4px; flex: none; }
.strip button { flex: none; min-width: 36px; height: 36px; padding: 0 6px; border-radius: 7px; border: 1px solid var(--line2); background: var(--surface); color: var(--text); font-size: 12px; font-weight: 500; }
.strip button.ready { background: var(--good-bg); border-color: #2e8c72; }
.strip button.err { background: var(--bad-bg); border-color: var(--red); }
.strip button.now { outline: 2px solid var(--amber); outline-offset: 1px; }
.note { font-size: 13px; color: var(--muted); }
.note.warn { color: #ffd7a0; background: #4a2c13; padding: 8px 10px; border-radius: 9px; flex: none; }
.err-note { background: var(--bad-bg); color: #ffdbe2; padding: 10px 12px; border-radius: var(--r); font-size: 13px; }
.layout-panel { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); flex: none; }
.layout-panel summary { padding: 10px 12px; cursor: pointer; font-weight: 500; font-size: 14px; }
.layout-body { padding: 2px 12px 12px; display: flex; flex-direction: column; gap: 11px; }
.lf { display: flex; flex-direction: column; gap: 5px; }
.lf > span { font-size: 12.5px; color: var(--muted); }
.res-field { font-size: 13px; color: var(--muted); display: block; flex: none; }
.res-field span { display: block; margin-bottom: 4px; }

/* Panduan */
.coach-ring { position: fixed; z-index: 30; border-radius: 13px; pointer-events: none; box-shadow: 0 0 0 2px var(--amber), 0 0 22px rgba(255, 176, 32, .75); animation: ringPulse 1.5s ease-in-out infinite; }
.coach { pointer-events: none; position: fixed; z-index: 31; width: min(300px, calc(100vw - 16px)); background: #fff5ef; color: #220a10; border-radius: 13px; padding: 12px 14px; box-shadow: 0 12px 34px rgba(0, 0, 0, .55); animation: coachIn .3s cubic-bezier(.2, 1.3, .4, 1); }
.coach::before { content: ''; position: absolute; left: calc(var(--tail, 30px) - 8px); top: -8px; border: 8px solid transparent; border-top: 0; border-bottom-color: #fff5ef; }
.coach.above::before { top: auto; bottom: -8px; border: 8px solid transparent; border-bottom: 0; border-top-color: #fff5ef; }
.coach-step { font: 800 13px Outfit, Poppins, sans-serif; color: #c9352c; }
.coach p { font-size: 14px; line-height: 1.4; margin: 2px 0 6px; font-weight: 500; }
.coach-off { pointer-events: auto; background: none; border: 0; padding: 0; font-size: 12px; color: #6a4450; text-decoration: underline; }

dialog { border: 1px solid var(--line2); border-radius: var(--r-lg); padding: 22px; max-width: 480px; width: calc(100vw - 32px); max-height: calc(100vh - 32px); overflow-y: auto; background: var(--surface); color: var(--text); animation: dlgIn .25s cubic-bezier(.2, 1.1, .4, 1); }
dialog.wide { max-width: 700px; }
dialog::backdrop { background: rgba(10, 3, 8, .72); backdrop-filter: blur(3px); }
dialog h3 { font-size: 21px; font-weight: 800; margin-bottom: 8px; padding-right: 26px; }
dialog h4 { font-size: 15px; margin: 16px 0 8px; }
dialog > * + * { margin-top: 10px; }
.dlg-x { position: absolute; right: 14px; top: 14px; background: none; border: 0; color: var(--muted); padding: 4px; margin: 0; }
.welcome-head { display: flex; align-items: center; gap: 12px; }
.welcome-slide { text-align: center; padding: 14px 6px 4px; animation: stepIn .3s; }
.welcome-slide h3 { padding: 0; margin: 4px 0; }
.slide-icon { width: 78px; height: 78px; border-radius: 22px; margin: 0 auto 10px; display: grid; place-items: center; background: var(--flame); color: #220a10; box-shadow: 0 0 34px rgba(255, 106, 31, .5); animation: floaty 3s ease-in-out infinite; }
.slide-n { font-size: 13px; color: var(--amber); font-weight: 500; }
.dots { display: flex; justify-content: center; gap: 7px; }
.dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--line2); transition: background .2s, transform .2s; }
.dots i.on { background: var(--orange); transform: scale(1.3); }
.howto { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.howto li { display: flex; gap: 10px; font-size: 14px; }
.howto .n { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--flame); color: #220a10; font-size: 13px; }
.howto li > div { flex: 1; min-width: 0; }
.mock { display: flex; align-items: center; gap: 8px; justify-content: space-between; margin-top: 6px; padding: 8px 10px; background: var(--bg); border-radius: 9px; font-size: 12.5px; color: var(--muted); }
.mock i { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--orange); color: #220a10; flex: none; }
.pay-icon { width: 62px; height: 62px; display: grid; place-items: center; border-radius: 18px; background: var(--flame); color: #220a10; }
.pay-list { padding-left: 18px; margin: 8px 0; font-size: 14px; display: flex; flex-direction: column; gap: 5px; }
.code-box { display: block; padding: 12px; background: var(--bg); border-radius: 9px; font-size: 18px; text-align: center; letter-spacing: .04em; user-select: all; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #fff5ef; color: #220a10; padding: 10px 18px; border-radius: 999px; font-size: 14px; font-weight: 500; z-index: 40; max-width: calc(100vw - 32px); margin: 0; box-shadow: 0 10px 30px rgba(0, 0, 0, .5); animation: toastIn .28s cubic-bezier(.2, 1.3, .4, 1); }
.toast.bad { background: var(--bad-bg); color: #ffdbe2; }
.confetti { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 45; margin: 0; }
.confetti i { position: absolute; top: -20px; width: 9px; height: 15px; border-radius: 2px; animation: fall 2s cubic-bezier(.3, .4, .5, 1) forwards; }

/* Halaman member */
.page { padding: 24px 26px 70px; max-width: 980px; animation: stepIn .3s; }
.page.wide { max-width: 1160px; }
.sec { font-size: 18px; margin: 24px 0 10px; }
.project-list { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.project-row { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; flex-wrap: wrap; }
.project-row.current { border-color: var(--orange); }
.project-row.dim, tr.dim { opacity: .55; }
.char-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(146px, 1fr)); gap: 12px; }
.char-card { padding: 8px; background: var(--surface); border: 2px solid var(--line); border-radius: 14px; display: flex; flex-direction: column; gap: 3px; transition: transform .16s; }
.char-card:hover { transform: translateY(-3px); }
.char-card.selected { border-color: var(--orange); }
.char-card .thumb { display: block; aspect-ratio: 9/13; overflow: hidden; border-radius: 9px; }
.char-card small { color: var(--muted); font-size: 12px; min-height: 2.6em; line-height: 1.3; }
.char-card .row { gap: 5px; margin-top: 4px; }
.char-form-grid { display: grid; grid-template-columns: 170px 1fr; gap: 16px; margin-bottom: 12px; }
.char-form-grid > div:last-child { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.char-prev { background: #efe6ff; border-radius: 12px; overflow: hidden; aspect-ratio: 9/16; }
.char-prev canvas { display: block; width: 100%; height: 100%; }
.color-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 6px 14px; }
.color-row { display: flex; align-items: center; gap: 8px; font-size: 13.5px; min-height: 36px; }
.color-row input[type=color] { width: 40px; height: 30px; padding: 1px; border: 1px solid var(--line2); border-radius: 7px; background: var(--bg); }
.color-row input[type=color]:disabled { opacity: .3; }
.color-row input[type=checkbox] { accent-color: var(--orange); width: 17px; height: 17px; flex: none; }
.tick-space { width: 17px; flex: none; }

/* Admin */
.tabs { display: flex; gap: 4px; margin: 14px 0 18px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button { padding: 10px 14px; border: 0; background: none; color: var(--muted); font-weight: 500; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs button[aria-selected='true'] { color: var(--text); border-color: var(--orange); }
.admin-content { display: flex; flex-direction: column; gap: 14px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(165px, 1fr)); gap: 10px; }
.tile { padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; }
.tile b { display: block; font: 800 28px Outfit, Poppins, sans-serif; font-variant-numeric: tabular-nums; }
.tile span { font-size: 13px; color: var(--muted); }
.charts { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 400px), 1fr)); gap: 10px; }
.mini-chart { padding: 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 13px; }
.mini-chart figcaption { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; font-size: 14px; }
.mini-chart svg { width: 100%; display: block; }
.mini-chart .bar { fill: var(--orange); }
.mini-chart g:hover .bar { fill: var(--amber); }
.mini-chart .tick { fill: var(--muted); font-size: 11px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; font-weight: 500; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line2); white-space: nowrap; }
td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; font-variant-numeric: tabular-nums; }
.data-table summary { cursor: pointer; color: var(--muted); font-size: 14px; }
.ledger { display: flex; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.settings-form { max-width: 720px; }

/* Halaman depan */
.landing { position: relative; min-height: 100vh; overflow: hidden; padding: 22px clamp(16px, 5vw, 64px) 30px; }
.land-glow { position: absolute; right: -14%; bottom: -30%; width: 70vw; height: 70vw; background: radial-gradient(closest-side, rgba(232, 23, 63, .4), rgba(255, 106, 31, .16) 55%, transparent); pointer-events: none; animation: breathe 6s ease-in-out infinite; }
.land-top, .land-main, .land-steps, .land-foot { position: relative; max-width: 1180px; margin-inline: auto; }
.land-main { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr); gap: clamp(20px, 5vw, 70px); align-items: center; margin-top: 26px; }
.land-copy h1 { font-size: clamp(42px, 6.4vw, 84px); line-height: .98; font-weight: 800; letter-spacing: -.035em; transform: skewX(-5deg); transform-origin: left; animation: stepIn .7s both; }
.flame { background: var(--flame); -webkit-background-clip: text; background-clip: text; color: transparent; }
.land-lead { margin: 18px 0 20px; font-size: 18px; color: var(--muted); max-width: 44ch; animation: stepIn .7s .1s both; }
.auth-card { display: flex; flex-direction: column; gap: 11px; max-width: 420px; padding: 20px; background: var(--surface); border: 1px solid var(--line2); border-radius: var(--r-lg); animation: stepIn .7s .2s both; }
.auth-card h2 { font-size: 21px; font-weight: 800; }
.land-phone { justify-self: center; animation: phoneIn .9s .15s cubic-bezier(.2, 1, .3, 1) both; }
.land-phone .phone-shell { width: min(72vw, 310px); transform: rotate(3deg); transition: transform .4s; }
.land-phone .phone-shell:hover { transform: rotate(0); }
.land-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 40px; }
.land-step { padding: 16px; background: rgba(37, 17, 28, .8); border: 1px solid var(--line); border-radius: 14px; }
.land-step .n { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--flame); color: #220a10; margin-bottom: 8px; }
.land-step b { font-family: Outfit, Poppins, sans-serif; font-size: 17px; }
.land-step p { font-size: 14px; color: var(--muted); }
.land-foot { margin-top: 26px; font-size: 13px; color: var(--faint); text-align: center; }

@keyframes stepIn { from { opacity: 0; transform: translateY(10px); } }
@keyframes logoIn { from { opacity: 0; transform: scale(.5) rotate(-10deg); } }
@keyframes breathe { 50% { opacity: .55; } }
@keyframes sheen { 0%, 62% { left: -60%; } 86%, 100% { left: 130%; } }
@keyframes ringPulse { 50% { box-shadow: 0 0 0 4px var(--amber), 0 0 30px rgba(255, 176, 32, .9); } }
@keyframes coachIn { from { opacity: 0; transform: translateY(8px) scale(.96); } }
@keyframes dlgIn { from { opacity: 0; transform: translateY(14px) scale(.98); } }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 12px); } }
@keyframes floaty { 50% { transform: translateY(-6px); } }
@keyframes fall { to { transform: translateY(110vh) rotate(540deg); opacity: .8; } }
@keyframes phoneIn { from { opacity: 0; transform: translateY(40px) rotate(8deg); } }

@media (max-width: 1240px) {
  .studio-layout { grid-template-columns: minmax(0, 1fr) 340px; }
  .studio { padding: 14px; }
}
@media (max-width: 1020px) {
  .shell { display: block; padding-bottom: 66px; }
  .rail { position: static; height: auto; flex-direction: row; align-items: center; padding: 10px 14px; gap: 10px; border-right: 0; border-bottom: 1px solid var(--line); overflow: visible; }
  .rail-foot { margin: 0 0 0 auto; flex-direction: row; align-items: center; }
  .rail-foot .rail-btn { width: auto; padding: 8px; } .rail-foot .rail-btn span, .plan-pill { display: none; }
  .rail-nav { position: fixed; z-index: 25; left: 0; right: 0; bottom: 0; flex-direction: row; background: var(--bg2); border-top: 1px solid var(--line); padding: 6px max(8px, env(safe-area-inset-left)) calc(6px + env(safe-area-inset-bottom)); }
  .rail-link { flex: 1; flex-direction: column; gap: 2px; font-size: 11px; padding: 6px 2px; text-align: center; }
  .rail-link.on { box-shadow: inset 0 -2px 0 var(--orange); }
  .studio-layout { grid-template-columns: 1fr; }
  .studio { position: static; height: auto; order: -1; border-left: 0; border-bottom: 1px solid var(--line); }
  .studio .phone-shell { width: min(58vw, 230px); }
  .panel, .topbar, .page { padding-left: 16px; padding-right: 16px; }
  .stepper { margin: 12px 16px 0; }
  .land-main { grid-template-columns: 1fr; }
  .land-phone { grid-row: 1; }
  .land-phone .phone-shell { width: min(60vw, 240px); }
  .land-steps { grid-template-columns: repeat(2, 1fr); }
  .auth-card { max-width: none; }
}
@media (max-width: 560px) {
  .step-tab { flex-direction: column; gap: 3px; padding: 6px 1px; font-size: 11.5px; text-align: center; }
  .style-grid, .char-grid { display: flex; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; }
  .style-grid .pick-card, .char-grid .pick-card { flex: 0 0 118px; scroll-snap-align: start; }
  .grid2, .grid3, .char-form-grid { grid-template-columns: 1fr; }
  .char-prev { max-width: 170px; }
  .scene-meta { grid-template-columns: 1fr 1fr; }
  .scene-meta > :first-child { grid-column: 1 / -1; }
  .panel h2, .page h2 { font-size: 24px; }
  .timing { grid-template-columns: 30px 88px 1fr; }
  .with-button { flex-direction: column; align-items: stretch; }
  .row.nowrap { flex-wrap: wrap; }
  .charts { grid-template-columns: 1fr; }
  .brand .wordmark { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
