/* StudioKiryatif — donker atelier: koel inkt, één warm-naar-violet verloop voor wat creëert. */
:root {
  --bg: #0B0D12; --s1: #12151C; --s2: #191D27; --s3: #222736; --line: #2A3040; --fg: #EEF0F5; --fg2: #A4ABBD; --fg3: #6B7286;
  --a1: #FF6A3D; --a2: #9B6BFF; --grad: linear-gradient(120deg, var(--a1), var(--a2)); --ok: #3DD68C; --bad: #FF5C6C; --r: 14px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--fg); font: 500 14px/1.45 "Plus Jakarta Sans", system-ui, sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
[hidden] { display: none !important; }
a { color: var(--a2); }
.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.muted { color: var(--fg2); } .small { font-size: 12.5px; } .err { color: var(--bad); min-height: 1.2em; margin: 0; }
.logo { display: flex; align-items: center; gap: 10px; font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.logo b { font-weight: 800; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mark { width: 26px; height: 26px; border-radius: 8px; background: var(--grad); position: relative; box-shadow: 0 6px 18px #ff6a3d40; }
.mark::after { content: ""; position: absolute; left: 9px; top: 7px; border-left: 10px solid #fff; border-top: 6px solid transparent; border-bottom: 6px solid transparent; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 11px; background: var(--s3); font-weight: 600; white-space: nowrap; transition: filter .15s, transform .1s; }
.btn:hover { filter: brightness(1.15); } .btn:active { transform: scale(.98); }
.btn.primary { background: var(--grad); color: #fff; box-shadow: 0 8px 24px #9b6bff33; }
.btn.ghost { background: transparent; border: 1px solid var(--line); }
.btn.big { height: 52px; font-size: 16px; padding: 0 26px; border-radius: 14px; }
.btn[disabled] { opacity: .5; pointer-events: none; }
.iconbtn { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; color: var(--fg2); } .iconbtn:hover { background: var(--s3); color: var(--fg); }
input, select, textarea { background: var(--s1); border: 1px solid var(--line); border-radius: 10px; padding: 9px 12px; outline: none; width: 100%; }
input:focus, select:focus, textarea:focus { border-color: var(--a2); box-shadow: 0 0 0 3px #9b6bff26; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; color: var(--fg2); font-weight: 600; }
label.chk { flex-direction: row; align-items: center; gap: 8px; color: var(--fg); } label.chk input { width: auto; accent-color: var(--a2); }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; background: var(--s1); border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.seg button { height: 34px; padding: 0 12px; border-radius: 9px; color: var(--fg2); font-weight: 600; }
.seg button.on { background: var(--s3); color: var(--fg); box-shadow: 0 1px 6px #0006; }
.seg.sm button { height: 28px; padding: 0 9px; font-size: 12.5px; }
.themes { display: flex; gap: 8px; flex-wrap: wrap; }
.themes button { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px 0 8px; border-radius: 11px; background: var(--s1); border: 1px solid var(--line); font-weight: 600; font-size: 13px; }
.themes button i { width: 22px; height: 22px; border-radius: 6px; display: block; }
.themes button.on { border-color: var(--a2); box-shadow: 0 0 0 3px #9b6bff26; }
.themes.sm button { height: 30px; padding: 0 6px; } .themes.sm button span { display: none; } .themes.sm button i { width: 18px; height: 18px; }

/* auth */
#auth { min-height: 100%; display: grid; place-items: center; padding: 24px; background: radial-gradient(80% 60% at 70% 0%, #9b6bff22, transparent 60%), radial-gradient(60% 50% at 10% 100%, #ff6a3d1c, transparent 60%); }
.auth-card { width: min(400px, 100%); background: var(--s1); border: 1px solid var(--line); border-radius: 20px; padding: 30px; display: flex; flex-direction: column; gap: 14px; box-shadow: 0 30px 80px #000a; }
.auth-card form { display: flex; flex-direction: column; gap: 12px; }

/* shell */
#app { display: grid; grid-template-columns: 250px minmax(0, 1fr); height: 100%; }
#side { background: var(--s1); border-right: 1px solid var(--line); padding: 18px 14px; display: flex; flex-direction: column; gap: 16px; min-height: 0; }
.snav { display: flex; flex-direction: column; gap: 2px; }
.snav button { display: flex; align-items: center; gap: 10px; height: 38px; padding: 0 10px; border-radius: 10px; color: var(--fg2); font-weight: 600; text-align: left; }
.snav button:hover { background: var(--s2); color: var(--fg); } .snav button.on { background: var(--s3); color: var(--fg); }
.slist { flex: 1; min-height: 0; overflow-y: auto; display: flex; flex-direction: column; gap: 2px; border-top: 1px solid var(--line); padding-top: 12px; }
.slist button { text-align: left; padding: 8px 10px; border-radius: 9px; color: var(--fg2); display: flex; flex-direction: column; gap: 1px; }
.slist button b { color: var(--fg); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .slist button small { color: var(--fg3); }
.slist button:hover { background: var(--s2); } .slist button.on { background: var(--s3); }
.me { display: flex; align-items: center; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; font-weight: 600; }
.me span:first-child { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.credits { font-size: 11.5px; color: var(--fg2); background: var(--s3); padding: 3px 8px; border-radius: 99px; }
#main { min-width: 0; min-height: 0; overflow: auto; }
.view { padding: 28px 32px; }
.view h2 { margin: 0 0 14px; font-size: 22px; letter-spacing: -.01em; }
.vhead { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

/* compose */
.compose { max-width: 860px; margin: 4vh auto 0; display: flex; flex-direction: column; gap: 18px; }
.eyebrow { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.compose h1 { margin: 0; font-size: clamp(26px, 3.6vw, 40px); letter-spacing: -.025em; line-height: 1.1; text-wrap: balance; }
.compose textarea { font-size: 16px; padding: 16px 18px; border-radius: 16px; resize: vertical; min-height: 120px; line-height: 1.5; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chips button { padding: 7px 12px; border-radius: 99px; background: var(--s1); border: 1px solid var(--line); color: var(--fg2); font-size: 13px; }
.chips button:hover { color: var(--fg); border-color: var(--fg3); }
.opts { display: flex; flex-direction: column; gap: 12px; background: var(--s1); border: 1px solid var(--line); border-radius: 16px; padding: 16px; }
.opt { display: grid; grid-template-columns: 70px minmax(0, 1fr); align-items: center; gap: 12px; }
.opt > span { color: var(--fg2); font-weight: 600; font-size: 13px; }
#b-gen { align-self: flex-start; }
.busy { position: relative; pointer-events: none; } .busy::after { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(90deg, transparent, #ffffff30, transparent); animation: shine 1.2s infinite; }
@keyframes shine { from { transform: translateX(-100%); } to { transform: translateX(100%); } }

/* editor */
#v-editor { padding: 0; height: 100%; display: flex; flex-direction: column; }
.ebar { display: flex; align-items: center; gap: 12px; padding: 12px 20px; border-bottom: 1px solid var(--line); background: var(--s1); flex-wrap: wrap; }
.title-in { flex: 1; min-width: 160px; max-width: 420px; background: transparent; border-color: transparent; font-size: 16px; font-weight: 700; }
.title-in:hover { border-color: var(--line); }
.saved { color: var(--fg3); font-size: 12px; min-width: 70px; text-align: right; }
.ework { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 400px; }
.stage { min-width: 0; padding: 22px; display: flex; flex-direction: column; gap: 14px; overflow: auto; background: radial-gradient(70% 60% at 50% 30%, #1a1f2e, var(--bg)); }
.pwrap { margin: 0 auto; width: 100%; max-width: 980px; aspect-ratio: 16 / 9; border-radius: 14px; overflow: hidden; background: #000; box-shadow: 0 30px 70px #000c, 0 0 0 1px var(--line); }
.pwrap.p916 { max-width: 380px; aspect-ratio: 9 / 16; } .pwrap.p11 { max-width: 560px; aspect-ratio: 1; } .pwrap.p45 { max-width: 480px; aspect-ratio: 4 / 5; }
hyperframes-player { display: block; width: 100%; height: 100%; }
.timeline { display: flex; gap: 3px; height: 30px; max-width: 980px; width: 100%; margin: 0 auto; }
.timeline button { border-radius: 7px; background: var(--s3); color: var(--fg2); font-size: 11px; font-weight: 700; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; padding: 0 6px; min-width: 0; }
.timeline button.on { background: var(--grad); color: #fff; }
.renderbox { max-width: 980px; width: 100%; margin: 0 auto; background: var(--s1); border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.prog { height: 8px; border-radius: 99px; background: var(--s3); overflow: hidden; } .prog i { display: block; height: 100%; width: 0; background: var(--grad); transition: width .4s; }
.renderbox video { width: 100%; max-height: 60vh; border-radius: 10px; background: #000; }
.scenes { border-left: 1px solid var(--line); background: var(--s1); display: flex; flex-direction: column; min-height: 0; }
.shead { display: flex; align-items: baseline; justify-content: space-between; padding: 14px 16px 8px; }
#scene-list { flex: 1; min-height: 0; overflow-y: auto; padding: 0 12px 12px; display: flex; flex-direction: column; gap: 10px; }
.card { background: var(--s2); border: 1px solid var(--line); border-radius: 14px; padding: 12px; display: flex; flex-direction: column; gap: 9px; }
.card.on { border-color: var(--a2); box-shadow: 0 0 0 3px #9b6bff1f; }
.chead { display: flex; align-items: center; gap: 6px; }
.chead .num { width: 24px; height: 24px; border-radius: 7px; background: var(--s3); display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.chead select { width: auto; padding: 4px 8px; font-weight: 700; flex: 1; }
.chead .dur { width: 64px; padding: 4px 8px; text-align: right; }
.card label { font-size: 11.5px; } .card input, .card textarea { padding: 7px 10px; font-size: 13.5px; } .card textarea { resize: vertical; min-height: 54px; }
.imgpick { display: flex; align-items: center; gap: 10px; } .imgpick img { width: 72px; height: 48px; object-fit: cover; border-radius: 7px; background: var(--s3); }
.ai { display: flex; gap: 6px; } .ai input { font-size: 12.5px; } .ai .btn { height: 34px; padding: 0 10px; font-size: 12.5px; }
.addrow { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); } .addrow select { flex: 1; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.vcard { background: var(--s1); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.vcard video { width: 100%; aspect-ratio: 16/9; background: #000; object-fit: contain; }
.vcard .meta { padding: 10px 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; margin-top: 12px; }
.mgrid button, .mgrid div { aspect-ratio: 4/3; border-radius: 12px; overflow: hidden; background: var(--s2); border: 1px solid var(--line); display: grid; place-items: center; color: var(--fg3); font-size: 12px; }
.mgrid img { width: 100%; height: 100%; object-fit: cover; }
.brandform { max-width: 560px; display: flex; flex-direction: column; gap: 14px; margin-top: 10px; }
.logo-pick { display: flex; align-items: center; gap: 10px; } .logo-prev { width: 120px; height: 60px; border-radius: 10px; background: var(--s2); border: 1px solid var(--line); display: grid; place-items: center; color: var(--fg3); font-size: 12px; overflow: hidden; }
.logo-prev img { max-width: 100%; max-height: 100%; object-fit: contain; }
.colors { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; align-items: end; } .colors input[type=color] { height: 40px; padding: 4px; } .colors .chk { grid-column: 1 / -1; }
dialog { background: var(--s1); color: var(--fg); border: 1px solid var(--line); border-radius: 16px; width: min(720px, calc(100% - 24px)); padding: 16px; }
dialog::backdrop { background: #000b; } .dhead { display: flex; align-items: center; justify-content: space-between; }
#toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--s3); border: 1px solid var(--line); padding: 11px 16px; border-radius: 12px; z-index: 99; box-shadow: 0 16px 40px #000a; max-width: 90vw; }
@media (max-width: 1100px) { .ework { grid-template-columns: 1fr; } .scenes { border-left: 0; border-top: 1px solid var(--line); } }
@media (max-width: 760px) { #app { grid-template-columns: 1fr; } #side { display: none; } .view { padding: 18px 16px; } .opt { grid-template-columns: 1fr; } }
.sw-in { font-size: 13px; font-weight: 600; white-space: nowrap; } .sm-sel { width: auto; padding: 6px 8px; font-size: 13px; }
.urlrow { display: flex; align-items: center; gap: 10px; background: var(--s1); border: 1px solid var(--line); border-radius: 12px; padding: 0 12px; }
.urlrow input { border: 0; background: transparent; box-shadow: none !important; padding: 12px 0; } .urlrow .ico { color: var(--fg3); }
.h3 { margin: 26px 0 6px; font-size: 15px; } .stockform { display: flex; gap: 8px; margin-top: 10px; } .stockform input { flex: 1; }
.mgrid .sr { position: relative; } .mgrid .sr small { position: absolute; left: 6px; bottom: 6px; background: #000b; color: #fff; padding: 2px 6px; border-radius: 6px; font-size: 10.5px; }
.say-row { display: flex; gap: 6px; align-items: flex-start; } .say-row label { flex: 1; } .say-row .iconbtn { margin-top: 20px; background: var(--s3); }
.row-end { display: flex; justify-content: flex-end; margin-top: 10px; } code { background: var(--s3); padding: 1px 5px; border-radius: 5px; font-size: 12px; }
#d-batch textarea { margin-top: 8px; font-family: ui-monospace, monospace; font-size: 13px; }
.plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; margin-top: 12px; max-width: 980px; }
.plan { background: var(--s1); border: 1px solid var(--line); border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.plan.hot { border-color: var(--a2); box-shadow: 0 0 0 3px #9b6bff22; } .plan h3 { margin: 0; font-size: 18px; } .plan .price { font-size: 30px; font-weight: 800; letter-spacing: -.02em; } .plan .price small { font-size: 13px; color: var(--fg2); font-weight: 600; }
.plan ul { margin: 0; padding-left: 18px; color: var(--fg2); display: flex; flex-direction: column; gap: 4px; } .plan .btn { margin-top: auto; }
