/* DCBC MoGraph: light-table palette.
   Blue pencil = drafts and placeholders. Red pencil = needs you. Black ink = final. */
:root {
  --cel: #E4EAEE;
  --sheet: #F7F9FA;
  --paper: #FFFFFF;
  --ink: #000000;
  --graphite: #48525B;
  --rule: #C3CDD4;
  --rule-soft: #D8E0E5;
  --blue: #1F5FCC;
  --blue-wash: #DCE8FA;
  --red: #C8231B;
  --red-wash: #FBE3E1;
  --focus: #1F5FCC;
  --head: "Courier Prime", "Courier New", ui-monospace, monospace;
  --body: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r-sm: 3px;
  --r-md: 6px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--cel);
  color: var(--ink);
  font: 400 15px/1.55 var(--body);
}
a { color: var(--ink); text-underline-offset: 3px; }
a:hover { color: var(--blue); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
img { max-width: 100%; }
h1, h2, h3 { font-family: var(--head); font-weight: 700; line-height: 1.15; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: 30px; }
h2 { font-size: 21px; }
h3 { font-size: 16px; }
p { margin: 0 0 12px; }
.muted { color: var(--graphite); }
.small { font-size: 13px; }
.tc { font-family: var(--head); font-variant-numeric: tabular-nums; }

/* ---------- top bar ---------- */
.top {
  display: flex; align-items: center; gap: 20px;
  padding: 12px 24px; background: var(--paper);
  border-bottom: 1px solid var(--rule);
}
.top .logo img { height: 30px; display: block; }
.top .app { font-family: var(--head); font-weight: 700; font-size: 15px; }
.top nav { margin-left: auto; display: flex; gap: 18px; align-items: center; font-size: 14px; }
.top nav a { text-decoration: none; }
.worker-dot { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--graphite); text-decoration: none; }
.worker-dot i { width: 9px; height: 9px; border-radius: 50%; background: var(--rule); display: inline-block; }
.worker-dot.on i { background: var(--ink); box-shadow: 0 0 0 3px var(--rule-soft); }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: calc(100vh - 55px); }
.shell.wide { grid-template-columns: minmax(0, 1fr); }
.rail { border-right: 1px solid var(--rule); padding: 26px 18px; background: var(--sheet); }
.rail .pname { font-family: var(--head); font-weight: 700; font-size: 17px; line-height: 1.25; margin-bottom: 4px; word-break: break-word; }
.rail .pmeta { font-size: 13px; color: var(--graphite); margin-bottom: 22px; }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: s; }
.steps li { counter-increment: s; }
.steps a {
  display: grid; grid-template-columns: 28px 1fr; align-items: center; gap: 8px;
  padding: 9px 8px; border-radius: var(--r-md); text-decoration: none; color: var(--graphite);
}
.steps a::before {
  content: counter(s); font-family: var(--head); font-weight: 700; font-size: 13px;
  width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--rule);
  display: grid; place-items: center; background: var(--paper); color: var(--graphite);
}
.steps a.done::before { content: "\2713"; background: var(--ink); border-color: var(--ink); color: var(--paper); }
.steps a.attn::before { border-color: var(--red); color: var(--red); }
.steps a.cur { background: var(--paper); color: var(--ink); font-weight: 600; box-shadow: inset 0 0 0 1px var(--rule); }
.steps a .why { display: block; grid-column: 2; font-size: 12px; font-weight: 400; color: var(--red); margin-top: -2px; }
.rail .back { display: inline-block; margin-top: 26px; font-size: 13px; }

main { padding: 30px 36px 70px; min-width: 0; }
.page-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 6px 16px; margin-bottom: 22px; }
.page-head h1 { grid-column: 1; }
.page-head .actions { grid-column: 2; grid-row: 1; display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.page-head .lede { grid-column: 1 / -1; max-width: 72ch; color: var(--graphite); margin: 4px 0 0; }

/* ---------- surfaces ---------- */
.panel { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r-md); padding: 20px 22px; margin-bottom: 18px; }
.panel > h2, .panel > h3 { margin-bottom: 12px; }
.cols { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }

/* ---------- forms ---------- */
label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
label .hint { font-weight: 400; color: var(--graphite); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: var(--paper);
  border: 1px solid var(--rule); border-radius: var(--r-sm); padding: 9px 11px;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-wash); }
textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
textarea.script { min-height: 360px; font: 400 15px/1.7 var(--body); }
input[type=color] { width: 42px; height: 34px; padding: 2px; border: 1px solid var(--rule); border-radius: var(--r-sm); background: var(--paper); }
input[type=range] { width: 100%; accent-color: var(--ink); }
.field { margin-bottom: 14px; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 400; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: 600 14px/1 var(--body); padding: 11px 16px; border-radius: var(--r-sm);
  border: 1.5px solid var(--ink); background: var(--ink); color: var(--paper);
  cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: #222; color: var(--paper); }
.btn.ghost { background: var(--paper); color: var(--ink); }
.btn.ghost:hover { background: var(--sheet); color: var(--ink); }
.btn.quiet { background: transparent; border-color: transparent; color: var(--graphite); padding-left: 8px; padding-right: 8px; }
.btn.quiet:hover { color: var(--ink); background: var(--sheet); }
.btn.danger { background: var(--paper); color: var(--red); border-color: var(--red); }
.btn.sm { padding: 7px 11px; font-size: 13px; }
.btn[disabled], .btn.busy { opacity: .55; pointer-events: none; }
.btn.busy::after { content: ""; width: 12px; height: 12px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.inline { display: inline; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

/* ---------- flash ---------- */
.flash { padding: 11px 14px; border-radius: var(--r-sm); margin-bottom: 14px; border: 1px solid var(--rule); background: var(--paper); border-left: 4px solid var(--ink); }
.flash.err { border-left-color: var(--red); background: var(--red-wash); }
.flash.warn { border-left-color: var(--blue); background: var(--blue-wash); }

/* ---------- tags ---------- */
.tag { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 8px; border-radius: 20px; border: 1px solid var(--rule); color: var(--graphite); background: var(--paper); }
.tag.blue { color: var(--blue); border-color: var(--blue); background: var(--blue-wash); }
.tag.red { color: var(--red); border-color: var(--red); background: var(--red-wash); }
.tag.ink { color: var(--paper); background: var(--ink); border-color: var(--ink); }

/* ---------- home ---------- */
.projects { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; }
.pcard { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r-md); padding: 16px; text-decoration: none; display: block; }
.pcard:hover { border-color: var(--ink); color: var(--ink); }
.pcard .frame { aspect-ratio: 16/9; border: 1px solid var(--rule); border-radius: var(--r-sm); margin-bottom: 12px; display: grid; place-items: center; background: var(--sheet); position: relative; overflow: hidden; }
.pcard .frame.v916 { aspect-ratio: auto; height: 0; padding-bottom: 56.25%; }
.pcard .frame span { font-family: var(--head); font-size: 13px; color: var(--graphite); }
.pcard h3 { margin-bottom: 4px; }
.newform { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr auto; gap: 10px; align-items: end; }

/* ---------- script ---------- */
.seglist { list-style: none; margin: 0; padding: 0; max-height: 520px; overflow: auto; }
.seglist li { display: grid; grid-template-columns: 34px 1fr auto; gap: 8px; padding: 8px 0; border-bottom: 1px solid var(--rule-soft); font-size: 14px; }
.seglist .n { font-family: var(--head); color: var(--graphite); }
.seglist .t { font-family: var(--head); font-size: 12px; color: var(--graphite); white-space: nowrap; }
.seglist .spk { font-size: 12px; font-weight: 700; display: block; }
.swatches { display: flex; gap: 10px; flex-wrap: wrap; }
.swatches .sw { display: grid; justify-items: center; gap: 4px; font-size: 11px; color: var(--graphite); }

/* ---------- voice ---------- */
.takes { list-style: none; margin: 0; padding: 0; }
.takes li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--rule-soft); }
.takes audio { width: 100%; height: 36px; }
.current-vo { border: 1.5px solid var(--ink); }

/* ---------- assets ---------- */
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 16px; }
.slot { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r-md); overflow: hidden; display: flex; flex-direction: column; scroll-margin-top: 20px; }
.slot.missing.req { border-color: var(--red); }
.slot.placeholder { border-style: dashed; border-color: var(--blue); }
.slot .thumb { height: 190px; background: var(--sheet) repeating-conic-gradient(var(--rule-soft) 0 25%, transparent 0 50%) 0 0 / 16px 16px; display: grid; place-items: center; border-bottom: 1px solid var(--rule); }
.slot .thumb { overflow: hidden; }
.slot .thumb img { width: 100%; height: 100%; max-height: 190px; object-fit: contain; padding: 12px; }
.slot .thumb .ph { width: 70px; height: 100px; position: relative; }
.slot .thumb .ph::before { content: ""; position: absolute; left: 18px; top: 0; width: 34px; height: 34px; border-radius: 50%; border: 2px dashed var(--blue); }
.slot .thumb .ph::after { content: ""; position: absolute; left: 4px; top: 40px; width: 62px; height: 58px; border-radius: 14px 14px 4px 4px; border: 2px dashed var(--blue); }
.slot .thumb .file { font-family: var(--head); font-weight: 700; font-size: 22px; color: var(--graphite); }
.slot .thumb .empty { color: var(--graphite); font-size: 13px; }
.slot .body { padding: 14px 14px 6px; flex: 1; }
.slot .body h3 { font-size: 15px; margin-bottom: 4px; }
.slot .body .desc { font-size: 13px; color: var(--graphite); margin-bottom: 6px; }
.slot .body .need { font-size: 12px; color: var(--graphite); }
.slot .acts { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 14px 14px; }
.slot .acts form { margin: 0; }
.filebtn { position: relative; overflow: hidden; }
.filebtn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.breakdown dl { display: grid; grid-template-columns: 130px 1fr; gap: 6px 14px; margin: 0; font-size: 14px; }
.breakdown dt { color: var(--graphite); }
.breakdown dd { margin: 0; }

/* Freepik dialog */
dialog { border: 1px solid var(--rule); border-radius: var(--r-md); padding: 0; width: min(920px, 94vw); max-height: 86vh; }
dialog::backdrop { background: rgba(20, 28, 34, .45); }
.dlg-head { display: flex; gap: 10px; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--rule); position: sticky; top: 0; background: var(--paper); }
.dlg-head form { display: flex; gap: 8px; flex: 1; }
.fp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; padding: 16px; }
.fp-item { border: 1px solid var(--rule); border-radius: var(--r-sm); padding: 8px; background: var(--paper); display: flex; flex-direction: column; gap: 6px; }
.fp-item img { aspect-ratio: 1; object-fit: contain; background: var(--sheet); border-radius: 2px; }
.fp-item .t { font-size: 12px; line-height: 1.3; height: 2.6em; overflow: hidden; }
.fp-msg { padding: 24px 16px; color: var(--graphite); }

/* ---------- storyboard: the light table ---------- */
.strip-wrap { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r-md); padding: 18px 18px 12px; margin-bottom: 22px; }
.strip-meta { display: flex; justify-content: space-between; font-size: 13px; color: var(--graphite); margin-bottom: 10px; }
.strip { display: flex; gap: 4px; overflow-x: auto; padding-bottom: 8px; }
.strip .cel { flex-shrink: 0; }
.cel {
  --pegs: var(--cel);
  position: relative; flex: 0 0 auto; min-width: 74px; height: 116px;
  background: var(--sheet); border: 1px solid var(--rule); border-radius: 2px;
  padding: 22px 8px 8px; text-decoration: none; color: var(--ink);
  display: flex; flex-direction: column; justify-content: space-between;
}
.cel::before {
  /* peg bar: round hole between two slots, like animation paper */
  content: ""; position: absolute; top: 7px; left: 50%; transform: translateX(-50%);
  width: 46px; height: 7px;
  background:
    radial-gradient(circle at 50% 50%, var(--rule) 3.2px, transparent 3.6px) center / 8px 7px no-repeat,
    linear-gradient(var(--rule), var(--rule)) left center / 13px 4px no-repeat,
    linear-gradient(var(--rule), var(--rule)) right center / 13px 4px no-repeat;
}
.cel:hover { border-color: var(--ink); color: var(--ink); }
.cel.sel { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: var(--paper); }
.cel.locked { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.cel.locked::before { filter: invert(1); }
.cel.ph { border-color: var(--blue); border-style: dashed; }
.cel .no { font-family: var(--head); font-weight: 700; font-size: 18px; }
.cel .tp { font-size: 11px; line-height: 1.25; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.cel .du { font-family: var(--head); font-size: 11px; }
.ruler { display: flex; justify-content: space-between; font-family: var(--head); font-size: 11px; color: var(--graphite); border-top: 1px solid var(--rule); padding-top: 4px; }

.scene-ed { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 18px; align-items: start; }
.stage { aspect-ratio: var(--ar, 16/9); max-height: 380px; margin: 0 auto 14px; width: 100%; border: 1px solid var(--rule); border-radius: 2px; position: relative; overflow: hidden; background: var(--pal-bg, #fff); }
.stage.tall { width: auto; height: 380px; }
.stage .bgimg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.stage .lay { position: absolute; inset: 8% 8%; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center; gap: 6px; color: var(--pal-text, #111); }
.stage .t1 { font-weight: 800; font-size: clamp(14px, 3.4vw, 30px); line-height: 1.1; }
.stage .t2 { font-size: clamp(11px, 1.6vw, 15px); opacity: .8; }
.stage .hl { background: linear-gradient(transparent 55%, var(--pal-secondary, #ffc93c) 55%); padding: 0 4px; }
.stage .chars { display: flex; gap: 8%; align-items: flex-end; height: 70%; }
.stage .chars img, .stage .chars .phc { height: 100%; max-width: 40%; object-fit: contain; }
.stage .phc { aspect-ratio: 2/3; border: 2px dashed var(--blue); border-radius: 40% 40% 8px 8px; display: grid; place-items: center; font-size: 11px; color: var(--blue); background: rgba(255,255,255,.6); padding: 4px; }
.stage .prod { max-height: 62%; }
.stage .badge { position: absolute; left: 8px; top: 8px; font-size: 11px; background: var(--paper); border: 1px solid var(--rule); padding: 1px 6px; border-radius: 2px; color: var(--graphite); }
.stage .dot { display: inline-block; width: 22px; height: 22px; border-radius: 50%; background: var(--pal-primary, #1F4FFF); }
.vo-line { font-size: 15px; line-height: 1.6; padding: 12px 14px; background: var(--sheet); border-radius: var(--r-sm); border: 1px solid var(--rule-soft); }
.vo-line .w { border-bottom: 1px dotted var(--rule); }
.regen { border: 1.5px solid var(--ink); border-radius: var(--r-md); padding: 14px; background: var(--paper); margin-bottom: 16px; }
.regen textarea { min-height: 70px; }
.versions { list-style: none; margin: 0; padding: 0; font-size: 13px; max-height: 260px; overflow: auto; }
.versions li { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--rule-soft); }
.versions li.cur { font-weight: 700; }

/* ---------- render ---------- */
.checks { list-style: none; padding: 0; margin: 0 0 14px; }
.checks li { padding: 7px 0 7px 28px; position: relative; border-bottom: 1px solid var(--rule-soft); font-size: 14px; }
.checks li::before { content: "\2713"; position: absolute; left: 4px; top: 7px; font-weight: 700; }
.checks li.no::before { content: "!"; color: var(--red); left: 8px; }
.checks li.no { color: var(--red); }
.jobs { width: 100%; border-collapse: collapse; font-size: 14px; }
.jobs th { text-align: left; font-weight: 600; font-size: 12px; color: var(--graphite); padding: 6px 8px; border-bottom: 1px solid var(--rule); }
.jobs td { padding: 10px 8px; border-bottom: 1px solid var(--rule-soft); vertical-align: top; }
.bar { height: 6px; background: var(--rule-soft); border-radius: 3px; overflow: hidden; margin-top: 6px; min-width: 120px; }
.bar i { display: block; height: 100%; background: var(--ink); width: 0; transition: width .4s; }
.bar.fail i { background: var(--red); }
.logtail { font-family: ui-monospace, Consolas, monospace; font-size: 11px; color: var(--graphite); white-space: pre-wrap; margin-top: 6px; max-height: 80px; overflow: hidden; }
video.preview { width: 100%; max-height: 420px; background: #000; border-radius: var(--r-sm); }

/* ---------- settings ---------- */
.keyrow { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.code { font-family: ui-monospace, Consolas, monospace; font-size: 13px; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r-sm); padding: 10px 12px; word-break: break-all; }
ol.howto { padding-left: 20px; margin: 0 0 12px; }
ol.howto li { margin-bottom: 6px; }
.report { list-style: none; padding: 0; margin: 8px 0 0; font-size: 13px; }
.report li { padding: 4px 0; }
.report .pass { font-weight: 700; }
.report .fail { color: var(--red); font-weight: 700; }

/* ---------- login ---------- */
.login { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login .box { width: min(380px, 100%); background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r-md); padding: 28px; }
.login .box img { height: 40px; margin-bottom: 18px; }

@media (max-width: 960px) {
  .shell { grid-template-columns: 1fr; }
  .rail { border-right: 0; border-bottom: 1px solid var(--rule); padding: 16px; }
  .steps { display: flex; overflow-x: auto; gap: 4px; }
  .steps a { grid-template-columns: 26px auto; white-space: nowrap; }
  .steps a .why { display: none; }
  .rail .pmeta, .rail .back { display: none; }
  main { padding: 20px 16px 60px; }
  .cols, .scene-ed, .grid2, .grid3, .keyrow { grid-template-columns: 1fr; }
  .newform { grid-template-columns: 1fr 1fr; }
  .page-head { grid-template-columns: 1fr; }
  .page-head .actions { grid-column: 1; grid-row: auto; justify-content: flex-start; }
  .top { padding: 10px 16px; gap: 12px; }
  .top .app { display: none; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ===================== 0.2 ===================== */
.linklike { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.linklike:hover { color: var(--blue); }
.stack { display: grid; gap: 8px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--rule); }
.tabs a { text-decoration: none; padding: 9px 14px; border: 1px solid transparent; border-bottom: 0; border-radius: var(--r-md) var(--r-md) 0 0; color: var(--graphite); font-weight: 600; font-size: 14px; }
.tabs a.on { background: var(--paper); border-color: var(--rule); color: var(--ink); margin-bottom: -1px; }

/* library */
.libgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.libcard { background: var(--paper); border: 1px solid var(--rule); border-radius: var(--r-md); text-decoration: none; display: flex; flex-direction: column; overflow: hidden; }
.libcard:hover { border-color: var(--ink); color: var(--ink); }
.libcard .thumb, .bigthumb { background: var(--sheet) repeating-conic-gradient(var(--rule-soft) 0 25%, transparent 0 50%) 0 0 / 16px 16px; display: grid; place-items: center; }
.libcard .thumb { height: 150px; border-bottom: 1px solid var(--rule); overflow: hidden; }
.libcard .thumb img { width: 100%; height: 150px; object-fit: contain; padding: 10px; }
.libcard .file, .bigthumb .file { font-family: var(--head); font-weight: 700; font-size: 22px; color: var(--graphite); }
.libcard .nm { padding: 10px 10px 4px; font-weight: 600; font-size: 14px; }
.libcard .meta { padding: 0 10px 10px; display: flex; gap: 4px; flex-wrap: wrap; align-items: center; }
.bigthumb { height: 440px; border: 1px solid var(--rule); border-radius: var(--r-sm); overflow: hidden; }
.bigthumb img { width: 100%; height: 440px; object-fit: contain; padding: 16px; }
.minigrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(90px, 1fr)); gap: 8px; }
.mini { text-decoration: none; font-size: 12px; display: grid; gap: 4px; }
.mini { overflow: hidden; }
.mini img { height: 80px; width: 100%; object-fit: contain; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--r-sm); }

/* studio and colour editor */
.studio { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(300px, 1fr); gap: 18px; align-items: start; }
.stagebox { position: relative; height: 600px; background: var(--sheet) repeating-conic-gradient(var(--rule-soft) 0 25%, transparent 0 50%) 0 0 / 18px 18px; border: 1px solid var(--rule); border-radius: var(--r-sm); overflow: hidden; }
#art, #art > svg, #overlay, #preview, #preview svg { position: absolute; inset: 0; width: 100%; height: 100%; }
#art > svg { cursor: crosshair; }
#overlay { cursor: crosshair; }
#overlay .pivot { cursor: grab; }
#preview { background: var(--sheet); }
.partbtns { margin-top: 12px; display: grid; gap: 10px; max-height: 640px; overflow: auto; }
.pgroup .row { gap: 4px; margin-top: 4px; }
.partbtns .btn.on { background: var(--ink); color: var(--paper); }
.partlist, .layerlist, .swatchlist { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.partlist li { display: grid; grid-template-columns: 14px 1fr auto; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--rule-soft); }
.partlist li i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.layerlist { max-height: 260px; overflow: auto; }
.layerlist li { padding: 3px 0; }
.swatchlist li { display: grid; grid-template-columns: 46px 90px 1fr; gap: 10px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--rule-soft); }
.swatchlist .hex { font-family: var(--head); }

/* voice lines */
.volines { list-style: none; margin: 10px 0 0; padding: 0; }
.volines li { display: grid; grid-template-columns: 34px minmax(0, 1fr) 280px; gap: 12px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--rule-soft); }
.volines li.ready .n { color: var(--ink); font-weight: 700; }
.volines .n { color: var(--graphite); padding-top: 6px; }
.volines .spk { display: block; font-size: 12px; font-weight: 700; margin-bottom: 4px; }
.volines textarea { min-height: 56px; font-size: 14px; }
.volines .acts { display: grid; gap: 6px; justify-items: start; }
.volines audio { width: 100%; height: 34px; }
.volines .err { color: var(--red); margin-top: 4px; }

/* tutorial screens */
.screens { display: grid; gap: 18px; }
.screen { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); gap: 18px; border-top: 1px solid var(--rule-soft); padding-top: 16px; }
.shot { position: relative; align-self: start; border: 1px solid var(--rule); border-radius: var(--r-sm); cursor: crosshair; max-height: 560px; overflow: auto; }
.shot img { display: block; width: 100%; }
.spots { position: absolute; inset: 0; pointer-events: none; }
.spot { position: absolute; border: 2px solid var(--red); background: rgba(200, 35, 27, .12); border-radius: 6px; pointer-events: auto; cursor: grab; display: grid; place-items: center; font: 700 12px/1 var(--body); color: var(--red); min-width: 18px; min-height: 14px; }
.spot.type { border-color: var(--blue); color: var(--blue); background: rgba(31, 95, 204, .12); }
.spot.highlight { border-style: dashed; }
.spotlist { padding-left: 20px; margin: 10px 0; display: grid; gap: 8px; }
.spotlist li { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.spotlist select, .spotlist input[type=text] { width: auto; flex: 1; min-width: 120px; padding: 6px 8px; }
.spotlist input[type=range] { width: 90px; }

/* finishing */
.frame16 { position: relative; width: 100%; max-height: 300px; background: linear-gradient(135deg, var(--sheet), var(--rule-soft)); border: 1px solid var(--rule); border-radius: 2px; overflow: hidden; margin: 0 auto; }
.frame16 .item { position: absolute; transform: translate(-50%, -50%); cursor: grab; touch-action: none; outline: 1px dashed var(--blue); outline-offset: 2px; }
.frame16 .item img { width: 100%; display: block; pointer-events: none; }
.frame16 .wmtext { display: block; text-align: center; font: 800 clamp(10px, 3vw, 34px)/1 var(--body); color: #fff; text-shadow: 0 1px 3px rgba(0, 0, 0, .5); white-space: nowrap; }

/* notes */
.notebar { display: flex; gap: 8px; align-items: center; margin-top: 10px; flex-wrap: wrap; }
.notebar input[type=text] { flex: 1; min-width: 200px; }
.notebar .stamp { background: var(--ink); color: var(--paper); padding: 6px 8px; border-radius: var(--r-sm); font-size: 13px; }
.notes { list-style: none; margin: 12px 0 0; padding: 0; }
.notes li { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 10px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid var(--rule-soft); font-size: 14px; }
.notes li.applied { color: var(--graphite); }
.sharebox { display: flex; gap: 6px; margin-top: 8px; }
.sharebox input { font-size: 12px; padding: 5px 8px; }
.checks-inline { display: grid; gap: 4px; max-height: 200px; overflow: auto; }
.review-main { max-width: 960px; margin: 0 auto; padding: 28px 16px 60px; }

@media (max-width: 960px) {
  .studio, .screen { grid-template-columns: 1fr; }
  .stagebox { height: 420px; }
  .volines li { grid-template-columns: 30px 1fr; }
  .volines .acts { grid-column: 2; }
}

/* 0.3: motion brief */
.seg { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0; border: 1px solid var(--rule); border-radius: var(--r-md); overflow: hidden; }
.seg-opt { position: relative; margin: 0; cursor: pointer; border-left: 1px solid var(--rule); }
.seg-opt:first-child { border-left: 0; }
.seg-opt input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg-opt span { display: block; padding: 10px 12px; background: var(--sheet); height: 100%; }
.seg-opt b { display: block; font-size: 14px; }
.seg-opt small { display: block; color: var(--graphite); font-size: 12px; line-height: 1.35; margin-top: 2px; }
.seg-opt input:checked + span { background: var(--paper); box-shadow: inset 0 -3px 0 var(--ink); }
.seg-opt input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: -2px; }
.lbl { font-weight: 600; font-size: 14px; margin-bottom: 6px; padding: 0; }
.seglist.shots .onscreen { font-family: var(--head); font-size: 13px; }
.motion-box { margin-bottom: 14px; }
.motion-canvas { aspect-ratio: var(--ar, 16/9); max-height: 400px; width: 100%; margin: 0 auto; background: #000; border: 1px solid var(--ink); border-radius: 2px; overflow: hidden; }
.motion-canvas.tall { max-width: 260px; }
.motion-canvas svg { display: block; width: 100%; height: 100%; }
.motion-bar { display: grid; grid-template-columns: auto 1fr 64px; gap: 10px; align-items: center; margin-top: 8px; }
.motion-bar input[type=range] { width: 100%; accent-color: var(--ink); }
.motion-bar [data-time] { text-align: right; font-family: var(--head); }
textarea.code { font: 400 12px/1.5 var(--head); white-space: pre; tab-size: 2; }
details.advanced summary { cursor: pointer; font-weight: 600; font-size: 14px; }
@media (max-width: 640px) { .seg { grid-template-columns: 1fr; } .seg-opt { border-left: 0; border-top: 1px solid var(--rule); } .seg-opt:first-child { border-top: 0; } }
