/* KMR Studio Cloud: screening-room palette — aubergine seats, projector-amber light. */
:root {
  --velvet: #120D19; --velvet-2: #0C0811; --seat: #1C1526; --seat-2: #271E34;
  --glass: rgba(33, 25, 45, .72); --line: #33293F; --line-2: #4A3C5D;
  --screen: #F6F0E8; --muted: #A898B9; --amber: #FFB547; --amber-ink: #2A1A00;
  --grad: linear-gradient(135deg, #FFC766 0%, #FFB547 40%, #FF8A5B 100%);
  --rec: #FF6B7D; --go: #62D9A6; --sky: #7CB8FF;
  --display: 'Bricolage Grotesque', 'Segoe UI', system-ui, sans-serif;
  --body: 'Instrument Sans', 'Segoe UI', system-ui, sans-serif;
  --r-lg: 20px; --r-md: 14px; --r-sm: 10px;
  --shadow: 0 1px 0 rgba(255,255,255,.04) inset, 0 18px 40px -18px rgba(0,0,0,.7);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; background: var(--velvet); color: var(--screen); }
body { font: 400 15px/1.55 var(--body); -webkit-font-smoothing: antialiased; min-height: 100vh;
  background: radial-gradient(1100px 600px at 85% -10%, rgba(255,138,91,.09), transparent 60%), radial-gradient(900px 700px at -10% 110%, rgba(124,184,255,.06), transparent 60%), var(--velvet); background-attachment: fixed; }
a { color: var(--amber); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; color: inherit; }
video, img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--display); margin: 0; line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); font-weight: 800; }
h2 { font-size: 1.2rem; font-weight: 700; }
h3 { font-size: 1rem; font-weight: 600; }
p { margin: 6px 0; }
.muted { color: var(--muted); } .small { font-size: 13px; } .err { color: var(--rec); } .ok { color: var(--go); }
.ic { width: 18px; height: 18px; flex: none; }
.eyebrow { margin: 0 0 6px; font-size: 11.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--amber); }
.boot { min-height: 100vh; display: grid; place-items: center; }

/* shell */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; padding: 24px 14px 18px; display: flex; flex-direction: column; gap: 24px; border-right: 1px solid var(--line); background: linear-gradient(180deg, rgba(34,25,46,.9), rgba(18,13,25,.6) 70%); }
.brand { display: flex; align-items: center; gap: 11px; font: 800 1.2rem var(--display); letter-spacing: -0.02em; color: var(--screen); text-decoration: none; padding: 0 6px; }
.brand em { font-style: normal; font-weight: 500; color: var(--muted); margin-left: 4px; }
.brand-mark { width: 36px; height: 36px; border-radius: 11px; background: var(--grad); display: grid; place-items: center; flex: none; box-shadow: 0 0 0 1px rgba(255,255,255,.18) inset, 0 8px 26px rgba(255,160,80,.35); overflow: hidden; }
.brand-mark::after { content: ''; border-left: 11px solid var(--amber-ink); border-top: 7px solid transparent; border-bottom: 7px solid transparent; margin-left: 3px; }
.brand-mark.logo { background: #fff; } .brand-mark.logo::after { display: none; } .brand-mark img { width: 100%; height: 100%; object-fit: contain; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--r-sm); color: var(--muted); text-decoration: none; font-weight: 500; }
.nav a:hover { color: var(--screen); background: rgba(255,255,255,.04); }
.nav a.on { color: var(--screen); background: linear-gradient(90deg, rgba(255,181,71,.16), rgba(255,181,71,.03)); box-shadow: inset 3px 0 0 var(--amber); }
.nav .count { margin-left: auto; background: var(--amber); color: var(--amber-ink); font-size: 11.5px; font-weight: 700; border-radius: 99px; padding: 0 7px; }
.side-foot { margin-top: auto; display: grid; gap: 8px; }
.main { padding: 32px clamp(16px, 4vw, 44px) 120px; max-width: 1060px; width: 100%; min-width: 0; }
.topbar { display: none; }
.bottom { display: none; }
.page-head { display: flex; justify-content: space-between; align-items: end; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head p { color: var(--muted); margin: 6px 0 0; }

@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .topbar { display: flex; position: sticky; top: 0; z-index: 20; align-items: center; justify-content: space-between; padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top, 0px)); background: rgba(18,13,25,.9); backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); }
  .topbar .brand { font-size: 1.05rem; } .topbar .brand-mark { width: 30px; height: 30px; border-radius: 9px; }
  .main { padding: 18px 16px 110px; }
  .bottom { display: grid; grid-template-columns: repeat(6, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: rgba(18,13,25,.94); backdrop-filter: blur(14px); border-top: 1px solid var(--line); padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px)); }
  .bottom a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; color: var(--muted); text-decoration: none; font-size: 11.5px; font-weight: 600; position: relative; }
  .bottom a.on { color: var(--amber); }
  .bottom .count { position: absolute; top: 2px; left: 55%; background: var(--amber); color: var(--amber-ink); font-size: 10px; font-weight: 700; border-radius: 99px; padding: 0 5px; }
  .page-head { margin-bottom: 14px; }
}

/* building blocks */
.panel { background: var(--glass); backdrop-filter: blur(10px); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 20px 22px; box-shadow: var(--shadow); min-width: 0; }
.panel + .panel { margin-top: 14px; }
.panel-head { display: flex; justify-content: space-between; align-items: start; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.panel-head p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.step-no { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 99px; background: var(--seat-2); border: 1px solid var(--line-2); font: 700 12.5px var(--display); margin-right: 8px; color: var(--amber); }
.btn { border: 1px solid var(--line); background: var(--seat-2); padding: 10px 18px; border-radius: 99px; cursor: pointer; font-weight: 600; white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 8px; color: var(--screen); text-decoration: none; transition: background .15s, border-color .15s, transform .1s; }
.btn:hover { background: #30253F; border-color: var(--line-2); }
.btn:active { transform: translateY(1px); }
.btn .ic { width: 16px; height: 16px; }
.btn.primary { background: var(--grad); border-color: transparent; color: var(--amber-ink); box-shadow: 0 1px 0 rgba(255,255,255,.35) inset, 0 10px 30px -10px rgba(255,150,80,.6); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.quiet { background: transparent; } .btn.quiet:hover { background: rgba(255,255,255,.05); }
.btn.danger { color: var(--rec); }
.btn.big { padding: 14px 26px; font-size: 1.02rem; }
.btn.sm { padding: 7px 13px; font-size: 13.5px; }
.btn.icon { padding: 8px; border-radius: 10px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.field { display: grid; gap: 6px; min-width: 0; }
.field .label { font-size: 13px; font-weight: 600; color: var(--muted); }
.field input, .field textarea, .field select { width: 100%; background: var(--velvet-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 11px 13px; outline: none; min-width: 0; }
.field textarea { resize: vertical; min-height: 84px; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--amber); box-shadow: 0 0 0 3px rgba(255,181,71,.15); }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.form-grid .wide { grid-column: 1 / -1; }
.seg { display: inline-flex; background: var(--velvet-2); border: 1px solid var(--line); border-radius: 99px; padding: 4px; gap: 4px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 8px 14px; border-radius: 99px; cursor: pointer; font-weight: 600; color: var(--muted); font-size: 14px; }
.seg button.on { background: var(--seat-2); color: var(--screen); box-shadow: 0 0 0 1px var(--line-2) inset; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 99px; background: var(--seat-2); color: var(--muted); white-space: nowrap; }
.pill.ok { color: var(--go); background: rgba(98,217,166,.1); } .pill.bad { color: var(--rec); background: rgba(255,107,125,.1); } .pill.run { color: var(--amber); background: rgba(255,181,71,.1); }
.dot { width: 8px; height: 8px; border-radius: 99px; background: currentColor; flex: none; }
.pill.run .dot { animation: pulse 1.2s infinite; }
@keyframes pulse { 50% { opacity: .3; } }
.banner { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 14px 16px; border-radius: var(--r-md); background: rgba(255,181,71,.08); border: 1px solid rgba(255,181,71,.3); margin-bottom: 16px; }
.empty { text-align: center; padding: 34px 16px; color: var(--muted); }
code, .code { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; font-size: 13px; background: var(--velvet-2); border: 1px solid var(--line); padding: 2px 6px; border-radius: 6px; word-break: break-all; }
.copyline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.steps { margin: 8px 0; padding-left: 20px; color: var(--muted); } .steps li { margin: 4px 0; } .steps b { color: var(--screen); }
details.help { margin-top: 10px; } details.help summary { cursor: pointer; color: var(--amber); font-weight: 600; font-size: 14px; }

/* upload */
.drop { display: grid; place-items: center; text-align: center; gap: 8px; border: 2px dashed var(--line-2); border-radius: var(--r-lg); padding: 30px 16px; cursor: pointer; background: rgba(12,8,17,.5); transition: border-color .15s, background .15s; }
.drop:hover, .drop.over { border-color: var(--amber); background: rgba(255,181,71,.05); }
.drop .big-ic { width: 46px; height: 46px; border-radius: 14px; background: var(--seat-2); display: grid; place-items: center; color: var(--amber); }
.drop .big-ic .ic { width: 24px; height: 24px; }
.clips { display: grid; gap: 10px; margin-top: 14px; }
.clip { display: grid; grid-template-columns: auto 92px 1fr auto; gap: 12px; align-items: center; background: var(--seat); border: 1px solid var(--line); border-radius: var(--r-md); padding: 10px; min-width: 0; }
.clip .num { font: 700 13px var(--display); color: var(--muted); width: 22px; text-align: center; }
.clip video { width: 92px; height: 64px; object-fit: cover; border-radius: 9px; background: #000; }
.clip .info { min-width: 0; }
.clip .name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.clip .meta { font-size: 12.5px; color: var(--muted); }
.clip .acts { display: flex; gap: 4px; }
.clip .title-in { margin-top: 6px; }
.clip .title-in input { width: 100%; background: var(--velvet-2); border: 1px solid var(--line); border-radius: 8px; padding: 7px 10px; font-size: 14px; }
.bar { height: 6px; border-radius: 99px; background: var(--velvet-2); overflow: hidden; margin-top: 6px; }
.bar i { display: block; height: 100%; background: var(--grad); width: 0; transition: width .2s; }
.clip.failed { border-color: rgba(255,107,125,.5); }
@media (max-width: 560px) {
  .clip { grid-template-columns: 72px 1fr auto; }
  .clip .num { display: none; }
  .clip video { width: 72px; height: 72px; }
  .clip .acts { flex-direction: column; }
}
.opts { display: grid; gap: 14px; margin-top: 16px; }
.opt-row { display: flex; gap: 10px 16px; align-items: center; flex-wrap: wrap; }
.opt-row > .label { font-size: 13px; font-weight: 600; color: var(--muted); min-width: 64px; }

/* post to */
.targets { display: grid; gap: 10px; }
.tprof { border: 1px solid var(--line); border-radius: var(--r-md); padding: 12px; background: var(--seat); }
.tprof-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.tprof-head b { font-family: var(--display); }
.tchips { display: flex; gap: 8px; flex-wrap: wrap; }
.tchip { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--velvet-2); border-radius: 12px; padding: 8px 12px; cursor: pointer; font-weight: 600; font-size: 14px; user-select: none; }
.tchip input { position: absolute; opacity: 0; pointer-events: none; }
.tchip .box { width: 18px; height: 18px; border-radius: 6px; border: 1.5px solid var(--line-2); display: grid; place-items: center; }
.tchip.on { border-color: var(--amber); background: rgba(255,181,71,.08); }
.tchip.on .box { background: var(--amber); border-color: var(--amber); }
.tchip.on .box::after { content: ''; width: 9px; height: 5px; border: 2px solid var(--amber-ink); border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); }
.tchip.off { opacity: .5; cursor: default; border-style: dashed; }
.tchip small { color: var(--muted); font-weight: 500; }
.pl { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; flex: none; color: #fff; font: 800 11px var(--display); }
.pl.youtube { background: #FF0033; } .pl.instagram { background: linear-gradient(135deg, #FEDA75, #D62976 50%, #4F5BD5); } .pl.facebook { background: #1877F2; } .pl.linkedin { background: #0A66C2; } .pl.x { background: #000; border: 1px solid #444; } .pl.whatsapp { background: #25D366; }
.post-bar { position: sticky; bottom: 12px; z-index: 5; margin-top: 16px; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; padding: 12px 14px 12px 18px; border-radius: 99px; background: rgba(28,21,38,.94); border: 1px solid var(--line-2); backdrop-filter: blur(14px); box-shadow: 0 18px 40px -12px rgba(0,0,0,.8); }
@media (max-width: 820px) { .post-bar { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); border-radius: var(--r-lg); } .post-bar .btn { flex: 1; } }

/* history */
.job { display: grid; grid-template-columns: 120px 1fr; gap: 16px; }
.job .thumb { width: 120px; aspect-ratio: 9 / 16; max-height: 180px; object-fit: cover; border-radius: 12px; background: var(--velvet-2); border: 1px solid var(--line); display: grid; place-items: center; color: var(--muted); }
.job .thumb.wide { aspect-ratio: 16 / 9; height: auto; }
.job-head { display: flex; justify-content: space-between; gap: 10px; align-items: start; flex-wrap: wrap; }
.job-head h3 { font-size: 1.05rem; }
.rows { display: grid; gap: 8px; margin-top: 12px; }
.row { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 9px 12px; border-radius: 12px; background: var(--seat); border: 1px solid var(--line); min-width: 0; }
.row .who { min-width: 0; } .row .who b { font-weight: 600; } .row .who .muted { font-size: 13px; }
.row .msg { font-size: 13px; overflow-wrap: anywhere; }
.log { margin-top: 10px; font-size: 13px; color: var(--muted); }
@media (max-width: 560px) { .job { grid-template-columns: 1fr; } .job .thumb { width: 100%; max-height: 220px; aspect-ratio: auto; height: 160px; } .row { grid-template-columns: auto 1fr; } .row > :last-child { grid-column: 1 / -1; justify-self: start; } }

/* profiles */
.acc { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--line); }
.acc:first-of-type { border-top: 0; }
.acc .who b { display: block; } .acc .who span { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.acc-body { grid-column: 1 / -1; background: var(--seat); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px; }
.code-box { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.code-box .code-big { font: 800 1.6rem var(--display); letter-spacing: .12em; color: var(--amber); background: var(--velvet-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 6px 16px; }
@media (max-width: 560px) { .acc { grid-template-columns: auto 1fr; } .acc > .btn-row { grid-column: 1 / -1; } }

/* login and setup */
.center { min-height: 100vh; display: grid; place-items: center; padding: 20px 16px; }
.card { width: 100%; max-width: 420px; }
.card.wide { max-width: 640px; }
.card .brand { margin-bottom: 18px; padding: 0; }
.check { display: flex; gap: 10px; align-items: start; padding: 10px 0; border-top: 1px solid var(--line); }
.check:first-of-type { border-top: 0; }
.check .ck { width: 22px; height: 22px; border-radius: 99px; display: grid; place-items: center; flex: none; margin-top: 1px; background: var(--seat-2); color: var(--muted); font-weight: 700; font-size: 12px; }
.check.done .ck { background: var(--go); color: #06301f; }

/* toasts */
#toasts { position: fixed; right: 16px; bottom: 16px; z-index: 50; display: grid; gap: 8px; }
@media (max-width: 820px) { #toasts { left: 16px; bottom: calc(84px + env(safe-area-inset-bottom, 0px)); } }
.toast { background: rgba(246,240,232,.97); color: var(--velvet); padding: 12px 16px; border-radius: 12px; font-weight: 500; max-width: 420px; box-shadow: 0 18px 40px rgba(0,0,0,.5); animation: rise .2s ease-out; }
.toast.bad { background: #FFE3E6; color: #3a0710; }
@keyframes rise { from { transform: translateY(8px); opacity: 0; } }
.spin { width: 16px; height: 16px; border-radius: 99px; border: 2px solid currentColor; border-right-color: transparent; animation: sp .7s linear infinite; display: inline-block; }
@keyframes sp { to { transform: rotate(360deg); } }
.tchip.off { color: var(--muted); text-decoration: none; }
@media (max-width: 560px) {
  .seg { display: grid; grid-template-columns: 1fr 1fr; border-radius: 14px; width: 100%; }
  .seg button { border-radius: 10px; padding: 10px 8px; }
  .opt-row > .label { width: 100%; }
}
@media (max-width: 560px) { div.thumb { display: none; } }
.ai-note { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: 12px; background: rgba(255,181,71,.08); border: 1px solid rgba(255,181,71,.25); color: var(--amber); font-size: 14px; margin-bottom: 14px; }
.ai-note.warn { color: var(--screen); background: rgba(124,184,255,.08); border-color: rgba(124,184,255,.3); }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; max-width: 720px; }
@media (max-width: 560px) { .thumbs { grid-template-columns: repeat(3, 1fr); gap: 8px; } }
.th { position: relative; border: 2px solid var(--line); border-radius: 12px; background: var(--velvet-2); padding: 0; cursor: pointer; overflow: hidden; min-height: 90px; display: grid; place-items: center; color: var(--muted); font-weight: 600; font-size: 13px; }
.th img { width: 100%; height: 100%; max-height: 260px; object-fit: cover; display: block; }
.th span { display: inline-flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px; text-align: center; }
.th.on { border-color: var(--amber); box-shadow: 0 0 0 3px rgba(255,181,71,.25); }
.th.on::after { content: '✓'; position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 99px; background: var(--amber); color: var(--amber-ink); font-weight: 800; font-size: 13px; display: grid; place-items: center; }
.th.ph { cursor: default; aspect-ratio: 9 / 16; max-height: 200px; }
.th-words { flex: 1; min-width: 160px; background: var(--velvet-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 9px 12px; }
.check-row { display: flex; gap: 10px; align-items: flex-start; font-size: 14.5px; cursor: pointer; }
.check-row input { width: 18px; height: 18px; accent-color: #FFB547; margin-top: 2px; flex: none; }
.ask-first { margin: 16px 4px 0; }
.join-hint { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: rgba(124,184,255,.07); border: 1px dashed rgba(124,184,255,.35); font-size: 14px; color: var(--screen); }
.join-hint .ic { color: var(--sky); margin-top: 2px; }
.clip-play { position: relative; padding: 0; border: 0; background: none; cursor: pointer; border-radius: 9px; overflow: hidden; display: block; }
.clip-play .play-ic { position: absolute; inset: 0; margin: auto; width: 32px; height: 32px; border-radius: 99px; background: rgba(0,0,0,.55); color: #fff; display: grid; place-items: center; font-size: 13px; padding-left: 2px; border: 1px solid rgba(255,255,255,.4); }
.clip-play:hover .play-ic { background: var(--amber); color: var(--amber-ink); }
.player { position: fixed; inset: 0; z-index: 60; background: rgba(6,4,10,.85); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 16px; }
.player-box { width: min(920px, 100%); max-height: 100%; display: grid; gap: 8px; }
.player-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; color: var(--screen); }
.player-head b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.player video { width: 100%; max-height: calc(100vh - 110px); background: #000; border-radius: 14px; }
.explain { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
.explain > div { background: var(--seat); border: 1px solid var(--line); border-radius: var(--r-md); padding: 14px 16px; display: grid; gap: 4px; }
.explain span { color: var(--muted); font-size: 14px; }
@media (max-width: 560px) { .explain { grid-template-columns: 1fr; } }

.setup-step summary { cursor: pointer; list-style: none; display: flex; gap: 12px; align-items: center; }
.setup-step summary::-webkit-details-marker { display: none; }
.setup-title { display: grid; gap: 2px; flex: 1; min-width: 0; }
.setup-title b { font-size: 16.5px; }
.setup-body { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.setup-body p { margin: 6px 0; }
.setup-body .steps li { margin: 7px 0; line-height: 1.5; }
.setup-profs { display: grid; gap: 10px; margin-top: 8px; }
.setup-prof { background: var(--velvet-2); border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 12px; display: grid; gap: 8px; }
.setup-prof .tchip { cursor: default; }
@media (max-width: 720px) { .bottom a { font-size: 10.5px; } .setup-step summary .pill { font-size: 11px; } }
